OpenShadingLanguage 1.00
# Compiled by oslc 1.3.2
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,99} %write{2147483647,-1}
param	float	Fac	0 		 %read{99,99} %write{2147483647,-1}
oparam	vector	VectorOut	0 0 0 		 %read{99,99} %write{32,99}
local	float	___623_f	 %read{10,84} %write{9,75}
local	int	___623_i	 %read{11,91} %write{10,82}
local	float	___623_t	 %read{21,94} %write{18,84}
local	float	___623_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,97} %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}
code ___main___
# intern/cycles/kernel/shaders/node_vector_curves.osl:45
# 	VectorOut[0] = ramp_lookup(ramp, VectorIn[0], 0);
	compref		$tmp2 VectorIn $const1 	%filename{"intern/cycles/kernel/shaders/node_vector_curves.osl"} %line{45} %argrw{"wrr"}
	functioncall	$const2 32 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:22
# 	float f = clamp((at + 1.0) * 0.5, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1);
	add		$tmp4 $tmp2 $const3 	%line{22} %argrw{"wrr"}
	mul		$tmp5 $tmp4 $const4 	%argrw{"wrr"}
	functioncall	$const6 7 	%argrw{"r"}
# intern/cycles/kernel/shaders/stdosl.h:144
# PERCOMP1 (round)
	min		$tmp6 $tmp5 $const3 	%filename{"intern/cycles/kernel/shaders/stdosl.h"} %line{144} %argrw{"wrr"}
	max		$tmp3 $tmp6 $const5 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:22
# 	float f = clamp((at + 1.0) * 0.5, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1);
	sub		$tmp7 $const7 $const8 	%filename{"intern/cycles/kernel/shaders/node_vector_curves.osl"} %line{22} %argrw{"wrr"}
	assign		$tmp8 $tmp7 	%argrw{"wr"}
	mul		___623_f $tmp3 $tmp8 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:25
# 	int i = (int)f;
	assign		___623_i ___623_f 	%line{25} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:26
# 	if (i < 0) i = 0;
	lt		$tmp9 ___623_i $const1 	%line{26} %argrw{"wrr"}
	if		$tmp9 14 14 	%argrw{"r"}
	assign		___623_i $const1 	%argrw{"wr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:27
# 	if (i >= RAMP_TABLE_SIZE) i = RAMP_TABLE_SIZE - 1;
	ge		$tmp10 ___623_i $const7 	%line{27} %argrw{"wrr"}
	if		$tmp10 17 17 	%argrw{"r"}
	sub		___623_i $const7 $const8 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:28
# 	float t = f - (float)i;
	assign		$tmp11 ___623_i 	%line{28} %argrw{"wr"}
	sub		___623_t ___623_f $tmp11 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:30
# 	float result = ramp[i][component];
	aref		$tmp12 ramp ___623_i 	%line{30} %argrw{"wrr"}
	compref		___623_result $tmp12 $const1 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:32
# 	if (t > 0.0)
	gt		$tmp13 ___623_t $const5 	%line{32} %argrw{"wrr"}
	if		$tmp13 30 30 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:33
# 		result = (1.0 - t) * result + t * ramp[i + 1][component];
	sub		$tmp14 $const3 ___623_t 	%line{33} %argrw{"wrr"}
	mul		$tmp15 $tmp14 ___623_result 	%argrw{"wrr"}
	add		$tmp16 ___623_i $const8 	%argrw{"wrr"}
	aref		$tmp18 ramp $tmp16 	%argrw{"wrr"}
	compref		$tmp17 $tmp18 $const1 	%argrw{"wrr"}
	mul		$tmp19 ___623_t $tmp17 	%argrw{"wrr"}
	add		___623_result $tmp15 $tmp19 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:35
# 	return result * 2.0 - 1.0;
	mul		$tmp20 ___623_result $const9 	%line{35} %argrw{"wrr"}
	sub		$tmp1 $tmp20 $const3 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:45
# 	VectorOut[0] = ramp_lookup(ramp, VectorIn[0], 0);
	compassign	VectorOut $const1 $tmp1 	%line{45} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:46
# 	VectorOut[1] = ramp_lookup(ramp, VectorIn[1], 1);
	compref		$tmp22 VectorIn $const8 	%line{46} %argrw{"wrr"}
	functioncall	$const2 65 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:22
# 	float f = clamp((at + 1.0) * 0.5, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1);
	add		$tmp24 $tmp22 $const3 	%line{22} %argrw{"wrr"}
	mul		$tmp25 $tmp24 $const4 	%argrw{"wrr"}
	functioncall	$const6 40 	%argrw{"r"}
# intern/cycles/kernel/shaders/stdosl.h:144
# PERCOMP1 (round)
	min		$tmp26 $tmp25 $const3 	%filename{"intern/cycles/kernel/shaders/stdosl.h"} %line{144} %argrw{"wrr"}
	max		$tmp23 $tmp26 $const5 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:22
# 	float f = clamp((at + 1.0) * 0.5, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1);
	sub		$tmp27 $const7 $const8 	%filename{"intern/cycles/kernel/shaders/node_vector_curves.osl"} %line{22} %argrw{"wrr"}
	assign		$tmp28 $tmp27 	%argrw{"wr"}
	mul		___623_f $tmp23 $tmp28 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:25
# 	int i = (int)f;
	assign		___623_i ___623_f 	%line{25} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:26
# 	if (i < 0) i = 0;
	lt		$tmp29 ___623_i $const1 	%line{26} %argrw{"wrr"}
	if		$tmp29 47 47 	%argrw{"r"}
	assign		___623_i $const1 	%argrw{"wr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:27
# 	if (i >= RAMP_TABLE_SIZE) i = RAMP_TABLE_SIZE - 1;
	ge		$tmp30 ___623_i $const7 	%line{27} %argrw{"wrr"}
	if		$tmp30 50 50 	%argrw{"r"}
	sub		___623_i $const7 $const8 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:28
# 	float t = f - (float)i;
	assign		$tmp31 ___623_i 	%line{28} %argrw{"wr"}
	sub		___623_t ___623_f $tmp31 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:30
# 	float result = ramp[i][component];
	aref		$tmp32 ramp ___623_i 	%line{30} %argrw{"wrr"}
	compref		___623_result $tmp32 $const8 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:32
# 	if (t > 0.0)
	gt		$tmp33 ___623_t $const5 	%line{32} %argrw{"wrr"}
	if		$tmp33 63 63 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:33
# 		result = (1.0 - t) * result + t * ramp[i + 1][component];
	sub		$tmp34 $const3 ___623_t 	%line{33} %argrw{"wrr"}
	mul		$tmp35 $tmp34 ___623_result 	%argrw{"wrr"}
	add		$tmp36 ___623_i $const8 	%argrw{"wrr"}
	aref		$tmp38 ramp $tmp36 	%argrw{"wrr"}
	compref		$tmp37 $tmp38 $const8 	%argrw{"wrr"}
	mul		$tmp39 ___623_t $tmp37 	%argrw{"wrr"}
	add		___623_result $tmp35 $tmp39 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:35
# 	return result * 2.0 - 1.0;
	mul		$tmp40 ___623_result $const9 	%line{35} %argrw{"wrr"}
	sub		$tmp21 $tmp40 $const3 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:46
# 	VectorOut[1] = ramp_lookup(ramp, VectorIn[1], 1);
	compassign	VectorOut $const8 $tmp21 	%line{46} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:47
# 	VectorOut[2] = ramp_lookup(ramp, VectorIn[2], 2);
	compref		$tmp42 VectorIn $const10 	%line{47} %argrw{"wrr"}
	functioncall	$const2 98 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:22
# 	float f = clamp((at + 1.0) * 0.5, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1);
	add		$tmp44 $tmp42 $const3 	%line{22} %argrw{"wrr"}
	mul		$tmp45 $tmp44 $const4 	%argrw{"wrr"}
	functioncall	$const6 73 	%argrw{"r"}
# intern/cycles/kernel/shaders/stdosl.h:144
# PERCOMP1 (round)
	min		$tmp46 $tmp45 $const3 	%filename{"intern/cycles/kernel/shaders/stdosl.h"} %line{144} %argrw{"wrr"}
	max		$tmp43 $tmp46 $const5 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:22
# 	float f = clamp((at + 1.0) * 0.5, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1);
	sub		$tmp47 $const7 $const8 	%filename{"intern/cycles/kernel/shaders/node_vector_curves.osl"} %line{22} %argrw{"wrr"}
	assign		$tmp48 $tmp47 	%argrw{"wr"}
	mul		___623_f $tmp43 $tmp48 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:25
# 	int i = (int)f;
	assign		___623_i ___623_f 	%line{25} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:26
# 	if (i < 0) i = 0;
	lt		$tmp49 ___623_i $const1 	%line{26} %argrw{"wrr"}
	if		$tmp49 80 80 	%argrw{"r"}
	assign		___623_i $const1 	%argrw{"wr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:27
# 	if (i >= RAMP_TABLE_SIZE) i = RAMP_TABLE_SIZE - 1;
	ge		$tmp50 ___623_i $const7 	%line{27} %argrw{"wrr"}
	if		$tmp50 83 83 	%argrw{"r"}
	sub		___623_i $const7 $const8 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:28
# 	float t = f - (float)i;
	assign		$tmp51 ___623_i 	%line{28} %argrw{"wr"}
	sub		___623_t ___623_f $tmp51 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:30
# 	float result = ramp[i][component];
	aref		$tmp52 ramp ___623_i 	%line{30} %argrw{"wrr"}
	compref		___623_result $tmp52 $const10 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:32
# 	if (t > 0.0)
	gt		$tmp53 ___623_t $const5 	%line{32} %argrw{"wrr"}
	if		$tmp53 96 96 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:33
# 		result = (1.0 - t) * result + t * ramp[i + 1][component];
	sub		$tmp54 $const3 ___623_t 	%line{33} %argrw{"wrr"}
	mul		$tmp55 $tmp54 ___623_result 	%argrw{"wrr"}
	add		$tmp56 ___623_i $const8 	%argrw{"wrr"}
	aref		$tmp58 ramp $tmp56 	%argrw{"wrr"}
	compref		$tmp57 $tmp58 $const10 	%argrw{"wrr"}
	mul		$tmp59 ___623_t $tmp57 	%argrw{"wrr"}
	add		___623_result $tmp55 $tmp59 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:35
# 	return result * 2.0 - 1.0;
	mul		$tmp60 ___623_result $const9 	%line{35} %argrw{"wrr"}
	sub		$tmp41 $tmp60 $const3 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:47
# 	VectorOut[2] = ramp_lookup(ramp, VectorIn[2], 2);
	compassign	VectorOut $const10 $tmp41 	%line{47} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_vector_curves.osl:49
# 	VectorOut = mix(VectorIn, VectorOut, Fac);
	mix		VectorOut VectorIn VectorOut Fac 	%line{49} %argrw{"wrrr"}
	end
