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1,1,1,1,1},
98 {3,3,3,3,0,0,0,0,1,1,1,1,2,2,2,2},
99 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
100 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
101 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
104 int type_db[16][16] =
106 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
107 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
108 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
109 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
110 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
111 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
112 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
113 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
114 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
115 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
116 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
117 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
118 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
119 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
120 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
121 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
124 int channel_db[16][16] =
126 {8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15},
127 {24,24,25,25,26,26,27,27,28,28,29,29,30,30,31,31},
128 {40,40,41,41,42,42,43,43,44,44,45,45,46,46,47,47},
129 {56,56,57,57,58,58,59,59,60,60,61,61,62,62,63,63},
130 {0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7},
131 {16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23},
132 {32,32,33,33,34,34,35,35,36,36,37,37,38,38,39,39},
133 {48,48,49,49,50,50,51,51,52,52,53,53,54,54,55,55},
134 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
135 {1,1,5,5,0,0,4,4,3,3,7,7,2,2,6,6},
136 {12,12,8,8,13,13,9,9,14,14,10,10,15,15,11,11},
137 {20,20,16,16,21,21,17,17,22,22,18,18,23,23,19,19},
138 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
139 {1,1,5,5,0,0,4,4,3,3,7,7,2,2,6,6},
140 {12,12,8,8,13,13,9,9,14,14,10,10,15,15,11,11},
141 {20,20,16,16,21,21,17,17,22,22,18,18,23,23,19,19},
152 int gain_db[16][16] =
154 {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
155 {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
156 {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
157 {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
158 {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
159 {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
160 {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
161 {1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
162 {1,1,0,0,0,0,1,1,1,1,0,0,1,1,0,0},
163 {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1},
164 {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1},
165 {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1},
166 {1,1,0,0,0,0,1,1,1,1,0,0,1,1,0,0},
167 {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1},
168 {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1},
169 {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1}
172 int delay_db[16][16] =
174 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
175 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
176 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
177 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
178 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
179 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
180 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
181 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
183 {1,0,1,0,0,1,0,1,1,0,1,0,1,0,1,0},
184 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
185 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
186 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
188 {1,0,1,0,0,1,0,1,1,0,1,0,1,0,1,0},
189 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
190 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
191 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
196 {224,224,224,224,212,212,212,212,213,213,213,213,214,214,214,214},
197 {221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221},
198 {222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222},
199 {223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223},
200 {224,224,224,224,212,212,212,212,213,213,213,213,214,214,214,214},
201 {221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221},
202 {222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222},
203 {223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223},
204 {224,224,224,224,212,212,212,212,213,213,213,213,214,214,214,214},
205 {221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221},
206 {222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222},
207 {223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223},
208 {224,224,224,224,212,212,212,212,213,213,213,213,214,214,214,214},
209 {221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221},
210 {222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222},
211 {223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223}
214 int ppm_db[16] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
218 int crate_index[16] ={0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3};
227 for (
int i = 0;
i < 16;
i++) {
228 for (
int j = 0; j < 16; j++) {
229 int ic = crate_index[
i];
230 int icc =
i * 16 + j - 64 *
ic;