if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 140;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 41) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 42) ~ bgp_large_community then bgp_local_pref = 110;
if (OWNAS, 1, 43) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 44) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 45) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 46) ~ bgp_large_community then bgp_local_pref = 120;
if (OWNAS, 1, 47) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 48) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 49) ~ bgp_large_community then bgp_local_pref = 100;
if (OWNAS, 1, 50) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 51) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 52) ~ bgp_large_community then bgp_local_pref = 130;
if (OWNAS, 1, 53) ~ bgp_large_community then bgp_local_pref = 150;
if (OWNAS, 3, 10) ~ bgp_large_community then bgp_local_pref = bgp_local_pref - 1;
bgp_local_pref = bgp_local_pref - bgp_path.len * 15;