This repository has been archived by the owner on May 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
c2go_header.i.go
2674 lines (2651 loc) · 98.8 KB
/
c2go_header.i.go
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
package libc
import unsafe "unsafe"
type Size_t = uint64
type Time_t = int64
type Clockid_t = int32
type Struct_timespec struct {
Tv_sec int64
Xbf_0 int32
Tv_nsec int64
Xbf_1 int32
}
type Pthread_t = *Struct___pthread
type Pthread_once_t = int32
type Pthread_key_t = uint32
type Pthread_spinlock_t = int32
type _cgoa_1__exit struct {
X__attr uint32
}
type Pthread_mutexattr_t = _cgoa_1__exit
type _cgoa_2__exit struct {
X__attr uint32
}
type Pthread_condattr_t = _cgoa_2__exit
type _cgoa_3__exit struct {
X__attr uint32
}
type Pthread_barrierattr_t = _cgoa_3__exit
type _cgoa_4__exit struct {
X__attr [2]uint32
}
type Pthread_rwlockattr_t = _cgoa_4__exit
type Struct___sigset_t struct {
X__bits [16]uint64
}
type Sigset_t = Struct___sigset_t
type _cgoa_6__exit struct {
X__i [14]int32
}
type _cgoa_5__exit struct {
X__u _cgoa_6__exit
}
type Pthread_attr_t = _cgoa_5__exit
type _cgoa_8__exit struct {
X__i [10]int32
}
type _cgoa_7__exit struct {
X__u _cgoa_8__exit
}
type Pthread_mutex_t = _cgoa_7__exit
type _cgoa_10__exit struct {
X__i [12]int32
}
type _cgoa_9__exit struct {
X__u _cgoa_10__exit
}
type Pthread_cond_t = _cgoa_9__exit
type _cgoa_12__exit struct {
X__i [14]int32
}
type _cgoa_11__exit struct {
X__u _cgoa_12__exit
}
type Pthread_rwlock_t = _cgoa_11__exit
type _cgoa_14__exit struct {
X__i [8]int32
}
type _cgoa_13__exit struct {
X__u _cgoa_14__exit
}
type Pthread_barrier_t = _cgoa_13__exit
type Pid_t = int32
type struct_sched_param struct {
sched_priority int32
__reserved1 int32
__reserved2 [4]int64
__reserved3 int32
}
type Timer_t = unsafe.Pointer
type Clock_t = int64
type Locale_t = *Struct___locale_struct
type struct_tm struct {
tm_sec int32
tm_min int32
tm_hour int32
tm_mday int32
tm_mon int32
tm_year int32
tm_wday int32
tm_yday int32
tm_isdst int32
tm_gmtoff int64
tm_zone *int8
}
type struct_itimerspec struct {
it_interval Struct_timespec
it_value Struct_timespec
}
type struct___ptcb struct {
__f func(unsafe.Pointer)
__x unsafe.Pointer
__next *struct___ptcb
}
type Wchar_t = uint32
type _cgoa_15__exit struct {
Quot int32
Rem int32
}
type Div_t = _cgoa_15__exit
type _cgoa_16__exit struct {
Quot int64
Rem int64
}
type Ldiv_t = _cgoa_16__exit
type _cgoa_17__exit struct {
Quot int64
Rem int64
}
type Lldiv_t = _cgoa_17__exit
type Ssize_t = int64
type Off_t = int64
type FILE = Struct__IO_FILE
type Va_list = []interface {
}
type X__isoc_va_list = []interface {
}
type Union__G_fpos64_t struct {
X__opaque [16]int8
}
type Fpos_t = Union__G_fpos64_t
type Struct___locale_struct struct {
Cat [6]*struct___locale_map
}
type struct_tls_module struct {
next *struct_tls_module
image unsafe.Pointer
len uint64
size uint64
align uint64
offset uint64
}
type struct___libc struct {
can_do_threads int8
threaded int8
secure int8
need_locks int8
threads_minus_1 int32
auxv *uint64
tls_head *struct_tls_module
tls_size uint64
tls_align uint64
tls_cnt uint64
page_size uint64
global_locale Struct___locale_struct
}
type Struct___pthread struct {
Tid int32
Errno_val int32
Sys_r1 int64
Locale *Struct___locale_struct
}
type Intptr_t = int64
type Uid_t = uint32
type Gid_t = uint32
type Useconds_t = uint32
type Mode_t = uint32
type struct_flock struct {
l_type int16
l_whence int16
l_start int64
l_len int64
l_pid int32
}
type syscall_arg_t = int64
func __alt_socketcall(sys int32, sock int32, cp int32, a int64, b int64, c int64, d int64, e int64, f int64) int64 {
var r int64
if cp != 0 {
r = __syscall_cp(int64(sys), int64(a), int64(b), int64(c), int64(d), int64(e), int64(f))
} else {
r = __syscall6(int64(sys), int64(a), int64(b), int64(c), int64(d), int64(e), int64(f))
}
if r != int64(-38) {
return r
}
return r
}
type struct_cpu_set_t struct {
__bits [16]uint64
}
type cpu_set_t = struct_cpu_set_t
func __CPU_AND_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set_t, __src2 *struct_cpu_set_t) {
var __i uint64
for __i = uint64(0); __i < __size/8; __i++ {
*(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__dest)))) + uintptr(__i)*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src1)))) + uintptr(__i)*8)) & *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src2)))) + uintptr(__i)*8))
}
}
func __CPU_OR_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set_t, __src2 *struct_cpu_set_t) {
var __i uint64
for __i = uint64(0); __i < __size/8; __i++ {
*(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__dest)))) + uintptr(__i)*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src1)))) + uintptr(__i)*8)) | *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src2)))) + uintptr(__i)*8))
}
}
func __CPU_XOR_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set_t, __src2 *struct_cpu_set_t) {
var __i uint64
for __i = uint64(0); __i < __size/8; __i++ {
*(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__dest)))) + uintptr(__i)*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src1)))) + uintptr(__i)*8)) ^ *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src2)))) + uintptr(__i)*8))
}
}
type Cookie_read_function_t = func(unsafe.Pointer, *int8, uint64) int64
type Cookie_write_function_t = func(unsafe.Pointer, *int8, uint64) int64
type Cookie_seek_function_t = func(unsafe.Pointer, *int64, int32) int32
type Cookie_close_function_t = func(unsafe.Pointer) int32
type Struct__IO_cookie_io_functions_t struct {
Read func(unsafe.Pointer, *int8, uint64) int64
Write func(unsafe.Pointer, *int8, uint64) int64
Seek func(unsafe.Pointer, *int64, int32) int32
Close func(unsafe.Pointer) int32
}
type Cookie_io_functions_t = Struct__IO_cookie_io_functions_t
type Suseconds_t = int64
type Struct_timeval struct {
Tv_sec int64
Tv_usec int64
}
type fd_mask = uint64
type _cgoa_18_alarm struct {
fds_bits [16]uint64
}
type fd_set = _cgoa_18_alarm
type struct_itimerval struct {
it_interval Struct_timeval
it_value Struct_timeval
}
type struct_timezone struct {
tz_minuteswest int32
tz_dsttime int32
}
type struct_utsname struct {
sysname [65]int8
nodename [65]int8
release [65]int8
version [65]int8
machine [65]int8
__domainname [65]int8
}
type Struct_winsize struct {
Ws_row uint16
Ws_col uint16
Ws_xpixel uint16
Ws_ypixel uint16
}
type Id_t = uint32
type rlim_t = uint64
type struct_rlimit struct {
rlim_cur uint64
rlim_max uint64
}
type struct_rusage struct {
ru_utime Struct_timeval
ru_stime Struct_timeval
ru_maxrss int64
ru_ixrss int64
ru_idrss int64
ru_isrss int64
ru_minflt int64
ru_majflt int64
ru_nswap int64
ru_inblock int64
ru_oublock int64
ru_msgsnd int64
ru_msgrcv int64
ru_nsignals int64
ru_nvcsw int64
ru_nivcsw int64
__reserved [16]int64
}
type Struct_iovec struct {
Iov_base unsafe.Pointer
Iov_len uint64
}
type stack_t = struct_sigaltstack
type greg_t = int32
type gregset_t = [18]int32
type struct_sigcontext struct {
trap_no uint64
error_code uint64
oldmask uint64
arm_r0 uint64
arm_r1 uint64
arm_r2 uint64
arm_r3 uint64
arm_r4 uint64
arm_r5 uint64
arm_r6 uint64
arm_r7 uint64
arm_r8 uint64
arm_r9 uint64
arm_r10 uint64
arm_fp uint64
arm_ip uint64
arm_sp uint64
arm_lr uint64
arm_pc uint64
arm_cpsr uint64
fault_address uint64
}
type mcontext_t = struct_sigcontext
type struct_sigaltstack struct {
ss_sp unsafe.Pointer
ss_flags int32
ss_size uint64
}
type struct___ucontext struct {
uc_flags uint64
uc_link *struct___ucontext
uc_stack struct_sigaltstack
uc_mcontext struct_sigcontext
uc_sigmask Struct___sigset_t
uc_regspace [64]uint64
}
type ucontext_t = struct___ucontext
type union_sigval struct {
sival_ptr unsafe.Pointer
}
type _cgoa_22_setxid struct {
si_pid int32
si_uid uint32
}
type _cgoa_23_setxid struct {
si_timerid int32
si_overrun int32
}
type _cgoa_21_setxid struct {
__piduid _cgoa_22_setxid
}
type _cgoa_25_setxid struct {
si_status int32
si_utime int64
si_stime int64
}
type _cgoa_24_setxid struct {
__sigchld _cgoa_25_setxid
}
type _cgoa_20_setxid struct {
__first _cgoa_21_setxid
__second _cgoa_24_setxid
}
type _cgoa_28_setxid struct {
si_lower unsafe.Pointer
si_upper unsafe.Pointer
}
type _cgoa_27_setxid struct {
__addr_bnd _cgoa_28_setxid
}
type _cgoa_26_setxid struct {
si_addr unsafe.Pointer
si_addr_lsb int16
__first _cgoa_27_setxid
}
type _cgoa_29_setxid struct {
si_band int64
si_fd int32
}
type _cgoa_30_setxid struct {
si_call_addr unsafe.Pointer
si_syscall int32
si_arch uint32
}
type _cgoa_19_setxid struct {
__pad [112]int8
}
type _cgoa_18_setxid struct {
si_signo int32
si_errno int32
si_code int32
__si_fields _cgoa_19_setxid
}
type siginfo_t = _cgoa_18_setxid
type _cgoa_31_setxid struct {
sa_handler func(int32)
}
type struct_sigaction struct {
__sa_handler _cgoa_31_setxid
sa_mask Struct___sigset_t
sa_flags int32
sa_restorer func()
}
type _cgoa_33_setxid struct {
sigev_notify_function func(union_sigval)
sigev_notify_attributes *_cgoa_5__exit
}
type _cgoa_32_setxid struct {
__pad [48]int8
}
type struct_sigevent struct {
sigev_value union_sigval
sigev_signo int32
sigev_notify int32
__sev_fields _cgoa_32_setxid
}
type sig_t = func(int32)
type sig_atomic_t = int32
type cc_t = uint8
type speed_t = uint32
type tcflag_t = uint32
type struct_termios struct {
c_iflag uint32
c_oflag uint32
c_cflag uint32
c_lflag uint32
c_line uint8
c_cc [32]uint8
__c_ispeed uint32
__c_ospeed uint32
}
type struct_crypt_data struct {
initialized int32
__buf [256]int8
}
type Uintptr_t = uint64
type Int8_t = int8
type Int16_t = int16
type Int32_t = int32
type Int64_t = int64
type Intmax_t = int64
type Uint8_t = uint8
type Uint16_t = uint16
type Uint32_t = uint32
type Uint64_t = uint64
type Uintmax_t = uint64
type int_fast8_t = int8
type int_fast64_t = int64
type int_least8_t = int8
type int_least16_t = int16
type int_least32_t = int32
type int_least64_t = int64
type uint_fast8_t = uint8
type uint_fast64_t = uint64
type uint_least8_t = uint8
type uint_least16_t = uint16
type uint_least32_t = uint32
type uint_least64_t = uint64
type int_fast16_t = int32
type int_fast32_t = int32
type uint_fast16_t = uint32
type uint_fast32_t = uint32
type struct_expanded_key struct {
l [16]uint32
r [16]uint32
}
func X__isspace(_c int32) int32 {
return func() int32 {
if _c == ' ' || uint32(_c)-uint32('\t') < uint32(5) {
return 1
} else {
return 0
}
}()
}
func a_fetch_and(p *int32, v int32) int32 {
var old int32
for {
old = a_ll(p)
if !!(a_sc(p, old&v) != 0) {
break
}
}
return old
}
func a_fetch_or(p *int32, v int32) int32 {
var old int32
for {
old = a_ll(p)
if !!(a_sc(p, old|v) != 0) {
break
}
}
return old
}
func a_and(p *int32, v int32) {
a_fetch_and(p, v)
}
func a_or(p *int32, v int32) {
a_fetch_or(p, v)
}
func a_inc(p *int32) {
a_fetch_add(p, int32(1))
}
func a_dec(p *int32) {
a_fetch_add(p, -1)
}
func a_store(p *int32, v int32) {
a_swap(p, v)
}
func a_barrier() {
var tmp int32 = int32(0)
_ = tmp
a_cas(&tmp, int32(0), int32(0))
}
func a_and_64(p *uint64, v uint64) {
type _cgoa_1_ffs struct {
v uint64
}
var u _cgoa_1_ffs
u.v = v
if *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(0))*4))+uint32(1) != 0 {
a_and((*int32)(unsafe.Pointer(p)), int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(0))*4))))
}
if *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(1))*4))+uint32(1) != 0 {
a_and((*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(p))))+uintptr(int32(1))*4)), int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(1))*4))))
}
}
func a_or_64(p *uint64, v uint64) {
type _cgoa_2_ffs struct {
v uint64
}
var u _cgoa_2_ffs
u.v = v
if *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(0))*4)) != 0 {
a_or((*int32)(unsafe.Pointer(p)), int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(0))*4))))
}
if *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(1))*4)) != 0 {
a_or((*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(p))))+uintptr(int32(1))*4)), int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(1))*4))))
}
}
func a_or_l(p unsafe.Pointer, v int64) {
if 8 == 4 {
a_or((*int32)(p), int32(v))
} else {
a_or_64((*uint64)(p), uint64(v))
}
}
func a_crash() {
*(*int8)(nil) = int8(0)
}
func a_ctz_32(x uint32) int32 {
return int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&_cgos_debruijn32_ffs)))) + uintptr(x&-x*uint32(124511785)>>int32(27)))))
}
var _cgos_debruijn32_ffs [32]int8 = [32]int8{int8(0), int8(1), int8(23), int8(2), int8(29), int8(24), int8(19), int8(3), int8(30), int8(27), int8(25), int8(11), int8(20), int8(8), int8(4), int8(13), int8(31), int8(22), int8(28), int8(18), int8(26), int8(10), int8(7), int8(12), int8(21), int8(17), int8(9), int8(6), int8(16), int8(5), int8(15), int8(14)}
func a_ctz_64(x uint64) int32 {
if false {
var y uint32 = uint32(x)
if !(y != 0) {
y = uint32(x >> int32(32))
return int32(32) + a_ctz_32(y)
}
return a_ctz_32(y)
}
return int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&_cgos_debruijn64_ffs)))) + uintptr(x&-x*uint64(157587932685088877)>>int32(58)))))
}
var _cgos_debruijn64_ffs [64]int8 = [64]int8{int8(0), int8(1), int8(2), int8(53), int8(3), int8(7), int8(54), int8(27), int8(4), int8(38), int8(41), int8(8), int8(34), int8(55), int8(48), int8(28), int8(62), int8(5), int8(39), int8(46), int8(44), int8(42), int8(22), int8(9), int8(24), int8(35), int8(59), int8(56), int8(49), int8(18), int8(29), int8(11), int8(63), int8(52), int8(6), int8(26), int8(37), int8(40), int8(33), int8(47), int8(61), int8(45), int8(43), int8(21), int8(23), int8(58), int8(17), int8(10), int8(51), int8(25), int8(36), int8(32), int8(60), int8(20), int8(57), int8(16), int8(50), int8(31), int8(19), int8(15), int8(30), int8(14), int8(13), int8(12)}
func a_ctz_l(x uint64) int32 {
return func() int32 {
if false {
return a_ctz_32(uint32(x))
} else {
return a_ctz_64(uint64(x))
}
}()
}
func a_clz_64(x uint64) int32 {
var y uint32
var r int32
if x>>int32(32) != 0 {
func() int32 {
y = uint32(x >> int32(32))
return func() (_cgo_ret int32) {
_cgo_addr := &r
*_cgo_addr = int32(0)
return *_cgo_addr
}()
}()
} else {
func() int32 {
y = uint32(x)
return func() (_cgo_ret int32) {
_cgo_addr := &r
*_cgo_addr = int32(32)
return *_cgo_addr
}()
}()
}
if y>>int32(16) != 0 {
y >>= int32(16)
} else {
r |= int32(16)
}
if y>>int32(8) != 0 {
y >>= int32(8)
} else {
r |= int32(8)
}
if y>>int32(4) != 0 {
y >>= int32(4)
} else {
r |= int32(4)
}
if y>>int32(2) != 0 {
y >>= int32(2)
} else {
r |= int32(2)
}
return r | func() int32 {
if !(y>>int32(1) != 0) {
return 1
} else {
return 0
}
}()
}
func a_clz_32(x uint32) int32 {
x >>= int32(1)
x |= x >> int32(1)
x |= x >> int32(2)
x |= x >> int32(4)
x |= x >> int32(8)
x |= x >> int32(16)
x++
return int32(31) - a_ctz_32(x)
}
type _cgoa_18_forkpty struct {
__e_termination int16
__e_exit int16
}
type struct_utmpx struct {
ut_type int16
__ut_pad1 int16
ut_pid int32
ut_line [32]int8
ut_id [4]int8
ut_user [32]int8
ut_host [256]int8
ut_exit _cgoa_18_forkpty
ut_session int32
__ut_pad2 int32
ut_tv Struct_timeval
ut_addr_v6 [4]uint32
__unused [20]int8
}
type struct_lastlog struct {
ll_time int64
ll_line [32]int8
ll_host [256]int8
}
const (
P_ALL int32 = int32(0)
P_PID int32 = int32(1)
P_PGID int32 = int32(2)
P_PIDFD int32 = int32(3)
)
type idtype_t = int32
type Nlink_t = uint32
type Ino_t = uint64
type Dev_t = uint64
type Blksize_t = int64
type Blkcnt_t = int64
type _cgoa_18_get_current_dir_name struct {
tv_sec int64
tv_nsec int64
}
type struct_stat struct {
st_dev uint64
__st_dev_padding int32
__st_ino_truncated int64
st_mode uint32
st_nlink uint32
st_uid uint32
st_gid uint32
st_rdev uint64
__st_rdev_padding int32
st_size int64
st_blksize int64
st_blocks int64
__st_atim32 _cgoa_18_get_current_dir_name
__st_mtim32 _cgoa_18_get_current_dir_name
__st_ctim32 _cgoa_18_get_current_dir_name
st_ino uint64
st_atim Struct_timespec
st_mtim Struct_timespec
st_ctim Struct_timespec
}
type Elf32_Half = uint16
type Elf64_Half = uint16
type Elf32_Word = uint32
type Elf32_Sword = int32
type Elf64_Word = uint32
type Elf64_Sword = int32
type Elf32_Xword = uint64
type Elf32_Sxword = int64
type Elf64_Xword = uint64
type Elf64_Sxword = int64
type Elf32_Addr = uint32
type Elf64_Addr = uint64
type Elf32_Off = uint32
type Elf64_Off = uint64
type Elf32_Section = uint16
type Elf64_Section = uint16
type Elf32_Versym = uint16
type Elf64_Versym = uint16
type _cgoa_1_getauxval struct {
e_ident [16]uint8
e_type uint16
e_machine uint16
e_version uint32
e_entry uint32
e_phoff uint32
e_shoff uint32
e_flags uint32
e_ehsize uint16
e_phentsize uint16
e_phnum uint16
e_shentsize uint16
e_shnum uint16
e_shstrndx uint16
}
type Elf32_Ehdr = _cgoa_1_getauxval
type _cgoa_2_getauxval struct {
e_ident [16]uint8
e_type uint16
e_machine uint16
e_version uint32
e_entry uint64
e_phoff uint64
e_shoff uint64
e_flags uint32
e_ehsize uint16
e_phentsize uint16
e_phnum uint16
e_shentsize uint16
e_shnum uint16
e_shstrndx uint16
}
type Elf64_Ehdr = _cgoa_2_getauxval
type _cgoa_3_getauxval struct {
sh_name uint32
sh_type uint32
sh_flags uint32
sh_addr uint32
sh_offset uint32
sh_size uint32
sh_link uint32
sh_info uint32
sh_addralign uint32
sh_entsize uint32
}
type Elf32_Shdr = _cgoa_3_getauxval
type _cgoa_4_getauxval struct {
sh_name uint32
sh_type uint32
sh_flags uint64
sh_addr uint64
sh_offset uint64
sh_size uint64
sh_link uint32
sh_info uint32
sh_addralign uint64
sh_entsize uint64
}
type Elf64_Shdr = _cgoa_4_getauxval
type _cgoa_5_getauxval struct {
ch_type uint32
ch_size uint32
ch_addralign uint32
}
type Elf32_Chdr = _cgoa_5_getauxval
type _cgoa_6_getauxval struct {
ch_type uint32
ch_reserved uint32
ch_size uint64
ch_addralign uint64
}
type Elf64_Chdr = _cgoa_6_getauxval
type _cgoa_7_getauxval struct {
st_name uint32
st_value uint32
st_size uint32
st_info uint8
st_other uint8
st_shndx uint16
}
type Elf32_Sym = _cgoa_7_getauxval
type _cgoa_8_getauxval struct {
st_name uint32
st_info uint8
st_other uint8
st_shndx uint16
st_value uint64
st_size uint64
}
type Elf64_Sym = _cgoa_8_getauxval
type _cgoa_9_getauxval struct {
si_boundto uint16
si_flags uint16
}
type Elf32_Syminfo = _cgoa_9_getauxval
type _cgoa_10_getauxval struct {
si_boundto uint16
si_flags uint16
}
type Elf64_Syminfo = _cgoa_10_getauxval
type _cgoa_11_getauxval struct {
r_offset uint32
r_info uint32
}
type Elf32_Rel = _cgoa_11_getauxval
type _cgoa_12_getauxval struct {
r_offset uint64
r_info uint64
}
type Elf64_Rel = _cgoa_12_getauxval
type _cgoa_13_getauxval struct {
r_offset uint32
r_info uint32
r_addend int32
}
type Elf32_Rela = _cgoa_13_getauxval
type _cgoa_14_getauxval struct {
r_offset uint64
r_info uint64
r_addend int64
}
type Elf64_Rela = _cgoa_14_getauxval
type _cgoa_15_getauxval struct {
p_type uint32
p_offset uint32
p_vaddr uint32
p_paddr uint32
p_filesz uint32
p_memsz uint32
p_flags uint32
p_align uint32
}
type Elf32_Phdr = _cgoa_15_getauxval
type _cgoa_16_getauxval struct {
p_type uint32
p_flags uint32
p_offset uint64
p_vaddr uint64
p_paddr uint64
p_filesz uint64
p_memsz uint64
p_align uint64
}
type Elf64_Phdr = _cgoa_16_getauxval
type _cgoa_18_getauxval struct {
d_val uint32
}
type _cgoa_17_getauxval struct {
d_tag int32
d_un _cgoa_18_getauxval
}
type Elf32_Dyn = _cgoa_17_getauxval
type _cgoa_20_getauxval struct {
d_val uint64
}
type _cgoa_19_getauxval struct {
d_tag int64
d_un _cgoa_20_getauxval
}
type Elf64_Dyn = _cgoa_19_getauxval
type _cgoa_21_getauxval struct {
vd_version uint16
vd_flags uint16
vd_ndx uint16
vd_cnt uint16
vd_hash uint32
vd_aux uint32
vd_next uint32
}
type Elf32_Verdef = _cgoa_21_getauxval
type _cgoa_22_getauxval struct {
vd_version uint16
vd_flags uint16
vd_ndx uint16
vd_cnt uint16
vd_hash uint32
vd_aux uint32
vd_next uint32
}
type Elf64_Verdef = _cgoa_22_getauxval
type _cgoa_23_getauxval struct {
vda_name uint32
vda_next uint32
}
type Elf32_Verdaux = _cgoa_23_getauxval
type _cgoa_24_getauxval struct {
vda_name uint32
vda_next uint32
}
type Elf64_Verdaux = _cgoa_24_getauxval
type _cgoa_25_getauxval struct {
vn_version uint16
vn_cnt uint16
vn_file uint32
vn_aux uint32
vn_next uint32
}
type Elf32_Verneed = _cgoa_25_getauxval
type _cgoa_26_getauxval struct {
vn_version uint16
vn_cnt uint16
vn_file uint32
vn_aux uint32
vn_next uint32
}
type Elf64_Verneed = _cgoa_26_getauxval
type _cgoa_27_getauxval struct {
vna_hash uint32
vna_flags uint16
vna_other uint16
vna_name uint32
vna_next uint32
}
type Elf32_Vernaux = _cgoa_27_getauxval
type _cgoa_28_getauxval struct {
vna_hash uint32
vna_flags uint16
vna_other uint16
vna_name uint32
vna_next uint32
}
type Elf64_Vernaux = _cgoa_28_getauxval
type _cgoa_30_getauxval struct {
a_val uint32
}
type _cgoa_29_getauxval struct {
a_type uint32
a_un _cgoa_30_getauxval
}
type Elf32_auxv_t = _cgoa_29_getauxval
type _cgoa_32_getauxval struct {
a_val uint64
}
type _cgoa_31_getauxval struct {
a_type uint64
a_un _cgoa_32_getauxval
}
type Elf64_auxv_t = _cgoa_31_getauxval
type _cgoa_33_getauxval struct {
n_namesz uint32
n_descsz uint32
n_type uint32
}
type Elf32_Nhdr = _cgoa_33_getauxval
type _cgoa_34_getauxval struct {
n_namesz uint32
n_descsz uint32
n_type uint32
}
type Elf64_Nhdr = _cgoa_34_getauxval
type _cgoa_35_getauxval struct {
m_value uint64
m_info uint32
m_poffset uint32
m_repeat uint16
m_stride uint16
}
type Elf32_Move = _cgoa_35_getauxval
type _cgoa_36_getauxval struct {
m_value uint64
m_info uint64
m_poffset uint64
m_repeat uint16
m_stride uint16
}
type Elf64_Move = _cgoa_36_getauxval
type _cgoa_38_getauxval struct {
gt_current_g_value uint32
gt_unused uint32
}
type _cgoa_39_getauxval struct {
gt_g_value uint32
gt_bytes uint32
}
type _cgoa_37_getauxval struct {
gt_header _cgoa_38_getauxval
}
type Elf32_gptab = _cgoa_37_getauxval
type _cgoa_40_getauxval struct {
ri_gprmask uint32
ri_cprmask [4]uint32
ri_gp_value int32
}
type Elf32_RegInfo = _cgoa_40_getauxval
type _cgoa_41_getauxval struct {
kind uint8
size uint8