-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
uper.c
6044 lines (4881 loc) · 166 KB
/
uper.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* The MIT License (MIT)
*
* Copyright (c) 2018-2019 Erik Moqvist
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* This file was generated by asn1tools version 0.166.0 Sat Oct 21 11:14:46 2023.
*/
#include <string.h>
#include "uper.h"
struct encoder_t {
uint8_t *buf_p;
ssize_t size;
ssize_t pos;
};
struct decoder_t {
const uint8_t *buf_p;
ssize_t size;
ssize_t pos;
};
static void encoder_init(struct encoder_t *self_p,
uint8_t *buf_p,
size_t size)
{
self_p->buf_p = buf_p;
self_p->size = (8 * (ssize_t)size);
self_p->pos = 0;
}
static ssize_t encoder_get_result(const struct encoder_t *self_p)
{
if (self_p->size >= 0) {
return ((self_p->pos + 7) / 8);
} else {
return (self_p->pos);
}
}
static void encoder_abort(struct encoder_t *self_p,
ssize_t error)
{
if (self_p->size >= 0) {
self_p->size = -error;
self_p->pos = -error;
}
}
static ssize_t encoder_alloc(struct encoder_t *self_p,
size_t size)
{
ssize_t pos;
if ((self_p->pos + (ssize_t)size) <= self_p->size) {
pos = self_p->pos;
self_p->pos += (ssize_t)size;
} else {
pos = -ENOMEM;
encoder_abort(self_p, ENOMEM);
}
return (pos);
}
static void encoder_append_bit(struct encoder_t *self_p,
int value)
{
ssize_t pos;
pos = encoder_alloc(self_p, 1);
if (pos < 0) {
return;
}
if ((pos % 8) == 0) {
self_p->buf_p[pos / 8] = 0;
}
self_p->buf_p[pos / 8] |= (uint8_t)(value << (7 - (pos % 8)));
}
static void encoder_append_bytes(struct encoder_t *self_p,
const uint8_t *buf_p,
size_t size)
{
size_t i;
ssize_t pos;
size_t byte_pos;
size_t pos_in_byte;
pos = encoder_alloc(self_p, 8u * size);
if (pos < 0) {
return;
}
byte_pos = ((size_t)pos / 8u);
pos_in_byte = ((size_t)pos % 8u);
if (pos_in_byte == 0u) {
(void)memcpy(&self_p->buf_p[byte_pos], buf_p, size);
} else {
for (i = 0; i < size; i++) {
self_p->buf_p[byte_pos + i] |= (buf_p[i] >> pos_in_byte);
self_p->buf_p[byte_pos + i + 1] = (buf_p[i] << (8u - pos_in_byte));
}
}
}
static void encoder_append_uint8(struct encoder_t *self_p,
uint8_t value)
{
uint8_t buf[1];
buf[0] = (uint8_t)value;
encoder_append_bytes(self_p, &buf[0], sizeof(buf));
}
static void encoder_append_uint16(struct encoder_t *self_p,
uint16_t value)
{
uint8_t buf[2];
buf[0] = (uint8_t)(value >> 8);
buf[1] = (uint8_t)value;
encoder_append_bytes(self_p, &buf[0], sizeof(buf));
}
static void encoder_append_uint32(struct encoder_t *self_p,
uint32_t value)
{
uint8_t buf[4];
buf[0] = (uint8_t)(value >> 24);
buf[1] = (uint8_t)(value >> 16);
buf[2] = (uint8_t)(value >> 8);
buf[3] = (uint8_t)value;
encoder_append_bytes(self_p, &buf[0], sizeof(buf));
}
static void encoder_append_uint64(struct encoder_t *self_p,
uint64_t value)
{
uint8_t buf[8];
buf[0] = (uint8_t)(value >> 56);
buf[1] = (uint8_t)(value >> 48);
buf[2] = (uint8_t)(value >> 40);
buf[3] = (uint8_t)(value >> 32);
buf[4] = (uint8_t)(value >> 24);
buf[5] = (uint8_t)(value >> 16);
buf[6] = (uint8_t)(value >> 8);
buf[7] = (uint8_t)value;
encoder_append_bytes(self_p, &buf[0], sizeof(buf));
}
static void encoder_append_int8(struct encoder_t *self_p,
int8_t value)
{
encoder_append_uint8(self_p, (uint8_t)value + 128);
}
static void encoder_append_int16(struct encoder_t *self_p,
int16_t value)
{
encoder_append_uint16(self_p, (uint16_t)value + 32768);
}
static void encoder_append_int32(struct encoder_t *self_p,
int32_t value)
{
encoder_append_uint32(self_p, (uint32_t)value + 2147483648);
}
static void encoder_append_int64(struct encoder_t *self_p,
int64_t value)
{
uint64_t u64_value;
u64_value = (uint64_t)value;
u64_value += 9223372036854775808ull;
encoder_append_uint64(self_p, u64_value);
}
static void encoder_append_bool(struct encoder_t *self_p, bool value)
{
encoder_append_bit(self_p, value ? 1 : 0);
}
static void encoder_append_non_negative_binary_integer(struct encoder_t *self_p,
uint64_t value,
size_t size)
{
size_t i;
for (i = 0; i < size; i++) {
encoder_append_bit(self_p, (value >> (size - i - 1)) & 1);
}
}
static void decoder_init(struct decoder_t *self_p,
const uint8_t *buf_p,
size_t size)
{
self_p->buf_p = buf_p;
self_p->size = (8 * (ssize_t)size);
self_p->pos = 0;
}
static ssize_t decoder_get_result(const struct decoder_t *self_p)
{
if (self_p->size >= 0) {
return ((self_p->pos + 7) / 8);
} else {
return (self_p->pos);
}
}
static void decoder_abort(struct decoder_t *self_p,
ssize_t error)
{
if (self_p->size >= 0) {
self_p->size = -error;
self_p->pos = -error;
}
}
static ssize_t decoder_free(struct decoder_t *self_p,
size_t size)
{
ssize_t pos;
if ((self_p->pos + (ssize_t)size) <= self_p->size) {
pos = self_p->pos;
self_p->pos += (ssize_t)size;
} else {
pos = -EOUTOFDATA;
decoder_abort(self_p, EOUTOFDATA);
}
return (pos);
}
static int decoder_read_bit(struct decoder_t *self_p)
{
ssize_t pos;
int value;
pos = decoder_free(self_p, 1);
if (pos >= 0) {
value = ((self_p->buf_p[pos / 8] >> (7 - (pos % 8))) & 1);
} else {
value = 0;
}
return (value);
}
static void decoder_read_bytes(struct decoder_t *self_p,
uint8_t *buf_p,
size_t size)
{
size_t i;
ssize_t pos;
size_t byte_pos;
size_t pos_in_byte;
pos = decoder_free(self_p, 8u * size);
if (pos < 0) {
return;
}
byte_pos = ((size_t)pos / 8u);
pos_in_byte = ((size_t)pos % 8u);
if (pos_in_byte == 0) {
(void)memcpy(buf_p, &self_p->buf_p[byte_pos], size);
} else {
for (i = 0; i < size; i++) {
buf_p[i] = (self_p->buf_p[byte_pos + i] << pos_in_byte);
buf_p[i] |= (self_p->buf_p[byte_pos + i + 1] >> (8u - pos_in_byte));
}
}
}
static uint8_t decoder_read_uint8(struct decoder_t *self_p)
{
uint8_t value = 0;
decoder_read_bytes(self_p, &value, sizeof(value));
return (value);
}
static uint16_t decoder_read_uint16(struct decoder_t *self_p)
{
uint8_t buf[2];
decoder_read_bytes(self_p, &buf[0], sizeof(buf));
return (((uint16_t)buf[0] << 8) | (uint16_t)buf[1]);
}
static uint32_t decoder_read_uint32(struct decoder_t *self_p)
{
uint8_t buf[4];
decoder_read_bytes(self_p, &buf[0], sizeof(buf));
return (((uint32_t)buf[0] << 24)
| ((uint32_t)buf[1] << 16)
| ((uint32_t)buf[2] << 8)
| (uint32_t)buf[3]);
}
static uint64_t decoder_read_uint64(struct decoder_t *self_p)
{
uint8_t buf[8];
decoder_read_bytes(self_p, &buf[0], sizeof(buf));
return (((uint64_t)buf[0] << 56)
| ((uint64_t)buf[1] << 48)
| ((uint64_t)buf[2] << 40)
| ((uint64_t)buf[3] << 32)
| ((uint64_t)buf[4] << 24)
| ((uint64_t)buf[5] << 16)
| ((uint64_t)buf[6] << 8)
| (uint64_t)buf[7]);
}
static int8_t decoder_read_int8(struct decoder_t *self_p)
{
int8_t value;
value = (int8_t)decoder_read_uint8(self_p);
value -= 128;
return (value);
}
static int16_t decoder_read_int16(struct decoder_t *self_p)
{
int16_t value;
value = (int16_t)decoder_read_uint16(self_p);
value -= 32768;
return (value);
}
static int32_t decoder_read_int32(struct decoder_t *self_p)
{
int32_t value;
value = (int32_t)decoder_read_uint32(self_p);
value -= 2147483648;
return (value);
}
static int64_t decoder_read_int64(struct decoder_t *self_p)
{
uint64_t value;
value = decoder_read_uint64(self_p);
value -= 9223372036854775808ull;
return ((int64_t)value);
}
static bool decoder_read_bool(struct decoder_t *self_p)
{
return (decoder_read_bit(self_p) != 0);
}
static uint64_t decoder_read_non_negative_binary_integer(struct decoder_t *self_p,
size_t size)
{
size_t i;
uint64_t value;
value = 0;
for (i = 0; i < size; i++) {
value <<= 1;
value |= (uint64_t)decoder_read_bit(self_p);
}
return (value);
}
static void uper_c_source_a_encode_inner(
struct encoder_t *encoder_p,
const struct uper_c_source_a_t *src_p)
{
encoder_append_int8(encoder_p, src_p->a);
encoder_append_int16(encoder_p, src_p->b);
encoder_append_int32(encoder_p, src_p->c);
encoder_append_int64(encoder_p, src_p->d);
encoder_append_uint8(encoder_p, src_p->e);
encoder_append_uint16(encoder_p, src_p->f);
encoder_append_uint32(encoder_p, src_p->g);
encoder_append_uint64(encoder_p, src_p->h);
encoder_append_bool(encoder_p, src_p->i);
encoder_append_bytes(encoder_p,
&src_p->j.buf[0],
11);
}
static void uper_c_source_a_decode_inner(
struct decoder_t *decoder_p,
struct uper_c_source_a_t *dst_p)
{
dst_p->a = decoder_read_int8(decoder_p);
dst_p->b = decoder_read_int16(decoder_p);
dst_p->c = decoder_read_int32(decoder_p);
dst_p->d = decoder_read_int64(decoder_p);
dst_p->e = decoder_read_uint8(decoder_p);
dst_p->f = decoder_read_uint16(decoder_p);
dst_p->g = decoder_read_uint32(decoder_p);
dst_p->h = decoder_read_uint64(decoder_p);
dst_p->i = decoder_read_bool(decoder_p);
decoder_read_bytes(decoder_p,
&dst_p->j.buf[0],
11);
}
static void uper_c_source_ab_encode_inner(
struct encoder_t *encoder_p,
const struct uper_c_source_ab_t *src_p)
{
encoder_append_non_negative_binary_integer(
encoder_p,
(uint64_t)(src_p->a - -1),
1);
encoder_append_non_negative_binary_integer(
encoder_p,
(uint64_t)(src_p->b - 10000),
10);
}
static void uper_c_source_ab_decode_inner(
struct decoder_t *decoder_p,
struct uper_c_source_ab_t *dst_p)
{
dst_p->a = (int8_t)decoder_read_non_negative_binary_integer(
decoder_p,
1);
dst_p->a += -1;
dst_p->b = (uint16_t)decoder_read_non_negative_binary_integer(
decoder_p,
10);
dst_p->b += 10000;
}
static void uper_c_source_q_encode_inner(
struct encoder_t *encoder_p,
const struct uper_c_source_q_t *src_p)
{
switch (src_p->choice) {
case uper_c_source_q_choice_c001_e:
encoder_append_non_negative_binary_integer(encoder_p, 0, 9);
encoder_append_bool(encoder_p, src_p->value.c001);
break;
case uper_c_source_q_choice_c002_e:
encoder_append_non_negative_binary_integer(encoder_p, 1, 9);
encoder_append_bool(encoder_p, src_p->value.c002);
break;
case uper_c_source_q_choice_c003_e:
encoder_append_non_negative_binary_integer(encoder_p, 2, 9);
encoder_append_bool(encoder_p, src_p->value.c003);
break;
case uper_c_source_q_choice_c004_e:
encoder_append_non_negative_binary_integer(encoder_p, 3, 9);
encoder_append_bool(encoder_p, src_p->value.c004);
break;
case uper_c_source_q_choice_c005_e:
encoder_append_non_negative_binary_integer(encoder_p, 4, 9);
encoder_append_bool(encoder_p, src_p->value.c005);
break;
case uper_c_source_q_choice_c006_e:
encoder_append_non_negative_binary_integer(encoder_p, 5, 9);
encoder_append_bool(encoder_p, src_p->value.c006);
break;
case uper_c_source_q_choice_c007_e:
encoder_append_non_negative_binary_integer(encoder_p, 6, 9);
encoder_append_bool(encoder_p, src_p->value.c007);
break;
case uper_c_source_q_choice_c008_e:
encoder_append_non_negative_binary_integer(encoder_p, 7, 9);
encoder_append_bool(encoder_p, src_p->value.c008);
break;
case uper_c_source_q_choice_c009_e:
encoder_append_non_negative_binary_integer(encoder_p, 8, 9);
encoder_append_bool(encoder_p, src_p->value.c009);
break;
case uper_c_source_q_choice_c010_e:
encoder_append_non_negative_binary_integer(encoder_p, 9, 9);
encoder_append_bool(encoder_p, src_p->value.c010);
break;
case uper_c_source_q_choice_c011_e:
encoder_append_non_negative_binary_integer(encoder_p, 10, 9);
encoder_append_bool(encoder_p, src_p->value.c011);
break;
case uper_c_source_q_choice_c012_e:
encoder_append_non_negative_binary_integer(encoder_p, 11, 9);
encoder_append_bool(encoder_p, src_p->value.c012);
break;
case uper_c_source_q_choice_c013_e:
encoder_append_non_negative_binary_integer(encoder_p, 12, 9);
encoder_append_bool(encoder_p, src_p->value.c013);
break;
case uper_c_source_q_choice_c014_e:
encoder_append_non_negative_binary_integer(encoder_p, 13, 9);
encoder_append_bool(encoder_p, src_p->value.c014);
break;
case uper_c_source_q_choice_c015_e:
encoder_append_non_negative_binary_integer(encoder_p, 14, 9);
encoder_append_bool(encoder_p, src_p->value.c015);
break;
case uper_c_source_q_choice_c016_e:
encoder_append_non_negative_binary_integer(encoder_p, 15, 9);
encoder_append_bool(encoder_p, src_p->value.c016);
break;
case uper_c_source_q_choice_c017_e:
encoder_append_non_negative_binary_integer(encoder_p, 16, 9);
encoder_append_bool(encoder_p, src_p->value.c017);
break;
case uper_c_source_q_choice_c018_e:
encoder_append_non_negative_binary_integer(encoder_p, 17, 9);
encoder_append_bool(encoder_p, src_p->value.c018);
break;
case uper_c_source_q_choice_c019_e:
encoder_append_non_negative_binary_integer(encoder_p, 18, 9);
encoder_append_bool(encoder_p, src_p->value.c019);
break;
case uper_c_source_q_choice_c020_e:
encoder_append_non_negative_binary_integer(encoder_p, 19, 9);
encoder_append_bool(encoder_p, src_p->value.c020);
break;
case uper_c_source_q_choice_c021_e:
encoder_append_non_negative_binary_integer(encoder_p, 20, 9);
encoder_append_bool(encoder_p, src_p->value.c021);
break;
case uper_c_source_q_choice_c022_e:
encoder_append_non_negative_binary_integer(encoder_p, 21, 9);
encoder_append_bool(encoder_p, src_p->value.c022);
break;
case uper_c_source_q_choice_c023_e:
encoder_append_non_negative_binary_integer(encoder_p, 22, 9);
encoder_append_bool(encoder_p, src_p->value.c023);
break;
case uper_c_source_q_choice_c024_e:
encoder_append_non_negative_binary_integer(encoder_p, 23, 9);
encoder_append_bool(encoder_p, src_p->value.c024);
break;
case uper_c_source_q_choice_c025_e:
encoder_append_non_negative_binary_integer(encoder_p, 24, 9);
encoder_append_bool(encoder_p, src_p->value.c025);
break;
case uper_c_source_q_choice_c026_e:
encoder_append_non_negative_binary_integer(encoder_p, 25, 9);
encoder_append_bool(encoder_p, src_p->value.c026);
break;
case uper_c_source_q_choice_c027_e:
encoder_append_non_negative_binary_integer(encoder_p, 26, 9);
encoder_append_bool(encoder_p, src_p->value.c027);
break;
case uper_c_source_q_choice_c028_e:
encoder_append_non_negative_binary_integer(encoder_p, 27, 9);
encoder_append_bool(encoder_p, src_p->value.c028);
break;
case uper_c_source_q_choice_c029_e:
encoder_append_non_negative_binary_integer(encoder_p, 28, 9);
encoder_append_bool(encoder_p, src_p->value.c029);
break;
case uper_c_source_q_choice_c030_e:
encoder_append_non_negative_binary_integer(encoder_p, 29, 9);
encoder_append_bool(encoder_p, src_p->value.c030);
break;
case uper_c_source_q_choice_c031_e:
encoder_append_non_negative_binary_integer(encoder_p, 30, 9);
encoder_append_bool(encoder_p, src_p->value.c031);
break;
case uper_c_source_q_choice_c032_e:
encoder_append_non_negative_binary_integer(encoder_p, 31, 9);
encoder_append_bool(encoder_p, src_p->value.c032);
break;
case uper_c_source_q_choice_c033_e:
encoder_append_non_negative_binary_integer(encoder_p, 32, 9);
encoder_append_bool(encoder_p, src_p->value.c033);
break;
case uper_c_source_q_choice_c034_e:
encoder_append_non_negative_binary_integer(encoder_p, 33, 9);
encoder_append_bool(encoder_p, src_p->value.c034);
break;
case uper_c_source_q_choice_c035_e:
encoder_append_non_negative_binary_integer(encoder_p, 34, 9);
encoder_append_bool(encoder_p, src_p->value.c035);
break;
case uper_c_source_q_choice_c036_e:
encoder_append_non_negative_binary_integer(encoder_p, 35, 9);
encoder_append_bool(encoder_p, src_p->value.c036);
break;
case uper_c_source_q_choice_c037_e:
encoder_append_non_negative_binary_integer(encoder_p, 36, 9);
encoder_append_bool(encoder_p, src_p->value.c037);
break;
case uper_c_source_q_choice_c038_e:
encoder_append_non_negative_binary_integer(encoder_p, 37, 9);
encoder_append_bool(encoder_p, src_p->value.c038);
break;
case uper_c_source_q_choice_c039_e:
encoder_append_non_negative_binary_integer(encoder_p, 38, 9);
encoder_append_bool(encoder_p, src_p->value.c039);
break;
case uper_c_source_q_choice_c040_e:
encoder_append_non_negative_binary_integer(encoder_p, 39, 9);
encoder_append_bool(encoder_p, src_p->value.c040);
break;
case uper_c_source_q_choice_c041_e:
encoder_append_non_negative_binary_integer(encoder_p, 40, 9);
encoder_append_bool(encoder_p, src_p->value.c041);
break;
case uper_c_source_q_choice_c042_e:
encoder_append_non_negative_binary_integer(encoder_p, 41, 9);
encoder_append_bool(encoder_p, src_p->value.c042);
break;
case uper_c_source_q_choice_c043_e:
encoder_append_non_negative_binary_integer(encoder_p, 42, 9);
encoder_append_bool(encoder_p, src_p->value.c043);
break;
case uper_c_source_q_choice_c044_e:
encoder_append_non_negative_binary_integer(encoder_p, 43, 9);
encoder_append_bool(encoder_p, src_p->value.c044);
break;
case uper_c_source_q_choice_c045_e:
encoder_append_non_negative_binary_integer(encoder_p, 44, 9);
encoder_append_bool(encoder_p, src_p->value.c045);
break;
case uper_c_source_q_choice_c046_e:
encoder_append_non_negative_binary_integer(encoder_p, 45, 9);
encoder_append_bool(encoder_p, src_p->value.c046);
break;
case uper_c_source_q_choice_c047_e:
encoder_append_non_negative_binary_integer(encoder_p, 46, 9);
encoder_append_bool(encoder_p, src_p->value.c047);
break;
case uper_c_source_q_choice_c048_e:
encoder_append_non_negative_binary_integer(encoder_p, 47, 9);
encoder_append_bool(encoder_p, src_p->value.c048);
break;
case uper_c_source_q_choice_c049_e:
encoder_append_non_negative_binary_integer(encoder_p, 48, 9);
encoder_append_bool(encoder_p, src_p->value.c049);
break;
case uper_c_source_q_choice_c050_e:
encoder_append_non_negative_binary_integer(encoder_p, 49, 9);
encoder_append_bool(encoder_p, src_p->value.c050);
break;
case uper_c_source_q_choice_c051_e:
encoder_append_non_negative_binary_integer(encoder_p, 50, 9);
encoder_append_bool(encoder_p, src_p->value.c051);
break;
case uper_c_source_q_choice_c052_e:
encoder_append_non_negative_binary_integer(encoder_p, 51, 9);
encoder_append_bool(encoder_p, src_p->value.c052);
break;
case uper_c_source_q_choice_c053_e:
encoder_append_non_negative_binary_integer(encoder_p, 52, 9);
encoder_append_bool(encoder_p, src_p->value.c053);
break;
case uper_c_source_q_choice_c054_e:
encoder_append_non_negative_binary_integer(encoder_p, 53, 9);
encoder_append_bool(encoder_p, src_p->value.c054);
break;
case uper_c_source_q_choice_c055_e:
encoder_append_non_negative_binary_integer(encoder_p, 54, 9);
encoder_append_bool(encoder_p, src_p->value.c055);
break;
case uper_c_source_q_choice_c056_e:
encoder_append_non_negative_binary_integer(encoder_p, 55, 9);
encoder_append_bool(encoder_p, src_p->value.c056);
break;
case uper_c_source_q_choice_c057_e:
encoder_append_non_negative_binary_integer(encoder_p, 56, 9);
encoder_append_bool(encoder_p, src_p->value.c057);
break;
case uper_c_source_q_choice_c058_e:
encoder_append_non_negative_binary_integer(encoder_p, 57, 9);
encoder_append_bool(encoder_p, src_p->value.c058);
break;
case uper_c_source_q_choice_c059_e:
encoder_append_non_negative_binary_integer(encoder_p, 58, 9);
encoder_append_bool(encoder_p, src_p->value.c059);
break;
case uper_c_source_q_choice_c060_e:
encoder_append_non_negative_binary_integer(encoder_p, 59, 9);
encoder_append_bool(encoder_p, src_p->value.c060);
break;
case uper_c_source_q_choice_c061_e:
encoder_append_non_negative_binary_integer(encoder_p, 60, 9);
encoder_append_bool(encoder_p, src_p->value.c061);
break;
case uper_c_source_q_choice_c062_e:
encoder_append_non_negative_binary_integer(encoder_p, 61, 9);
encoder_append_bool(encoder_p, src_p->value.c062);
break;
case uper_c_source_q_choice_c063_e:
encoder_append_non_negative_binary_integer(encoder_p, 62, 9);
encoder_append_bool(encoder_p, src_p->value.c063);
break;
case uper_c_source_q_choice_c064_e:
encoder_append_non_negative_binary_integer(encoder_p, 63, 9);
encoder_append_bool(encoder_p, src_p->value.c064);
break;
case uper_c_source_q_choice_c065_e:
encoder_append_non_negative_binary_integer(encoder_p, 64, 9);
encoder_append_bool(encoder_p, src_p->value.c065);
break;
case uper_c_source_q_choice_c066_e:
encoder_append_non_negative_binary_integer(encoder_p, 65, 9);
encoder_append_bool(encoder_p, src_p->value.c066);
break;
case uper_c_source_q_choice_c067_e:
encoder_append_non_negative_binary_integer(encoder_p, 66, 9);
encoder_append_bool(encoder_p, src_p->value.c067);
break;
case uper_c_source_q_choice_c068_e:
encoder_append_non_negative_binary_integer(encoder_p, 67, 9);
encoder_append_bool(encoder_p, src_p->value.c068);
break;
case uper_c_source_q_choice_c069_e:
encoder_append_non_negative_binary_integer(encoder_p, 68, 9);
encoder_append_bool(encoder_p, src_p->value.c069);
break;
case uper_c_source_q_choice_c070_e:
encoder_append_non_negative_binary_integer(encoder_p, 69, 9);
encoder_append_bool(encoder_p, src_p->value.c070);
break;
case uper_c_source_q_choice_c071_e:
encoder_append_non_negative_binary_integer(encoder_p, 70, 9);
encoder_append_bool(encoder_p, src_p->value.c071);
break;
case uper_c_source_q_choice_c072_e:
encoder_append_non_negative_binary_integer(encoder_p, 71, 9);
encoder_append_bool(encoder_p, src_p->value.c072);
break;
case uper_c_source_q_choice_c073_e:
encoder_append_non_negative_binary_integer(encoder_p, 72, 9);
encoder_append_bool(encoder_p, src_p->value.c073);
break;
case uper_c_source_q_choice_c074_e:
encoder_append_non_negative_binary_integer(encoder_p, 73, 9);
encoder_append_bool(encoder_p, src_p->value.c074);
break;
case uper_c_source_q_choice_c075_e:
encoder_append_non_negative_binary_integer(encoder_p, 74, 9);
encoder_append_bool(encoder_p, src_p->value.c075);
break;
case uper_c_source_q_choice_c076_e:
encoder_append_non_negative_binary_integer(encoder_p, 75, 9);
encoder_append_bool(encoder_p, src_p->value.c076);
break;
case uper_c_source_q_choice_c077_e:
encoder_append_non_negative_binary_integer(encoder_p, 76, 9);
encoder_append_bool(encoder_p, src_p->value.c077);
break;
case uper_c_source_q_choice_c078_e:
encoder_append_non_negative_binary_integer(encoder_p, 77, 9);
encoder_append_bool(encoder_p, src_p->value.c078);
break;
case uper_c_source_q_choice_c079_e:
encoder_append_non_negative_binary_integer(encoder_p, 78, 9);
encoder_append_bool(encoder_p, src_p->value.c079);
break;
case uper_c_source_q_choice_c080_e:
encoder_append_non_negative_binary_integer(encoder_p, 79, 9);
encoder_append_bool(encoder_p, src_p->value.c080);
break;
case uper_c_source_q_choice_c081_e:
encoder_append_non_negative_binary_integer(encoder_p, 80, 9);
encoder_append_bool(encoder_p, src_p->value.c081);
break;
case uper_c_source_q_choice_c082_e:
encoder_append_non_negative_binary_integer(encoder_p, 81, 9);
encoder_append_bool(encoder_p, src_p->value.c082);
break;
case uper_c_source_q_choice_c083_e:
encoder_append_non_negative_binary_integer(encoder_p, 82, 9);
encoder_append_bool(encoder_p, src_p->value.c083);
break;
case uper_c_source_q_choice_c084_e:
encoder_append_non_negative_binary_integer(encoder_p, 83, 9);
encoder_append_bool(encoder_p, src_p->value.c084);
break;
case uper_c_source_q_choice_c085_e:
encoder_append_non_negative_binary_integer(encoder_p, 84, 9);
encoder_append_bool(encoder_p, src_p->value.c085);
break;
case uper_c_source_q_choice_c086_e:
encoder_append_non_negative_binary_integer(encoder_p, 85, 9);
encoder_append_bool(encoder_p, src_p->value.c086);
break;
case uper_c_source_q_choice_c087_e:
encoder_append_non_negative_binary_integer(encoder_p, 86, 9);
encoder_append_bool(encoder_p, src_p->value.c087);
break;
case uper_c_source_q_choice_c088_e:
encoder_append_non_negative_binary_integer(encoder_p, 87, 9);
encoder_append_bool(encoder_p, src_p->value.c088);
break;
case uper_c_source_q_choice_c089_e:
encoder_append_non_negative_binary_integer(encoder_p, 88, 9);
encoder_append_bool(encoder_p, src_p->value.c089);
break;
case uper_c_source_q_choice_c090_e:
encoder_append_non_negative_binary_integer(encoder_p, 89, 9);
encoder_append_bool(encoder_p, src_p->value.c090);
break;
case uper_c_source_q_choice_c091_e:
encoder_append_non_negative_binary_integer(encoder_p, 90, 9);
encoder_append_bool(encoder_p, src_p->value.c091);
break;
case uper_c_source_q_choice_c092_e:
encoder_append_non_negative_binary_integer(encoder_p, 91, 9);
encoder_append_bool(encoder_p, src_p->value.c092);
break;
case uper_c_source_q_choice_c093_e:
encoder_append_non_negative_binary_integer(encoder_p, 92, 9);
encoder_append_bool(encoder_p, src_p->value.c093);
break;
case uper_c_source_q_choice_c094_e:
encoder_append_non_negative_binary_integer(encoder_p, 93, 9);
encoder_append_bool(encoder_p, src_p->value.c094);
break;
case uper_c_source_q_choice_c095_e:
encoder_append_non_negative_binary_integer(encoder_p, 94, 9);
encoder_append_bool(encoder_p, src_p->value.c095);
break;
case uper_c_source_q_choice_c096_e:
encoder_append_non_negative_binary_integer(encoder_p, 95, 9);
encoder_append_bool(encoder_p, src_p->value.c096);
break;
case uper_c_source_q_choice_c097_e:
encoder_append_non_negative_binary_integer(encoder_p, 96, 9);
encoder_append_bool(encoder_p, src_p->value.c097);
break;
case uper_c_source_q_choice_c098_e:
encoder_append_non_negative_binary_integer(encoder_p, 97, 9);
encoder_append_bool(encoder_p, src_p->value.c098);
break;
case uper_c_source_q_choice_c099_e:
encoder_append_non_negative_binary_integer(encoder_p, 98, 9);
encoder_append_bool(encoder_p, src_p->value.c099);
break;
case uper_c_source_q_choice_c100_e:
encoder_append_non_negative_binary_integer(encoder_p, 99, 9);
encoder_append_bool(encoder_p, src_p->value.c100);
break;
case uper_c_source_q_choice_c101_e:
encoder_append_non_negative_binary_integer(encoder_p, 100, 9);
encoder_append_bool(encoder_p, src_p->value.c101);
break;