ccgo_linux_riscv64.go 116 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048
  1. // Code generated for linux/riscv64 by 'generator -no-main-minimize -DHAVE_LIBBSD --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-macro=m_ --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -extended-errors -ignore-unsupported-alignment -ignore-link-errors -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libbsd/include/linux/riscv64 -lbsd -o libxdmcp.go --package-name libxdmcp .libs/libXdmcp.a', DO NOT EDIT.
  2. //go:build linux && riscv64
  3. package libxdmcp
  4. import (
  5. "reflect"
  6. "unsafe"
  7. "modernc.org/libbsd"
  8. "modernc.org/libc"
  9. )
  10. var _ reflect.Type
  11. var _ unsafe.Pointer
  12. const m_AT_EACCESS = 0x200
  13. const m_AT_EMPTY_PATH = 0x1000
  14. const m_AT_NO_AUTOMOUNT = 0x800
  15. const m_AT_RECURSIVE = 0x8000
  16. const m_AT_REMOVEDIR = 0x200
  17. const m_AT_STATX_DONT_SYNC = 0x4000
  18. const m_AT_STATX_FORCE_SYNC = 0x2000
  19. const m_AT_STATX_SYNC_AS_STAT = 0x0000
  20. const m_AT_STATX_SYNC_TYPE = 0x6000
  21. const m_AT_SYMLINK_FOLLOW = 0x400
  22. const m_AT_SYMLINK_NOFOLLOW = 0x100
  23. const m_Above = 0
  24. const m_AllTemporary = 0
  25. const m_AllocAll = 1
  26. const m_AllocNone = 0
  27. const m_AllowExposures = 1
  28. const m_AlreadyGrabbed = 1
  29. const m_Always = 2
  30. const m_AnyButton = 0
  31. const m_AnyKey = 0
  32. const m_AnyPropertyType = 0
  33. const m_ArcChord = 0
  34. const m_ArcPieSlice = 1
  35. const m_AsyncBoth = 6
  36. const m_AsyncKeyboard = 3
  37. const m_AsyncPointer = 0
  38. const m_AutoRepeatModeDefault = 2
  39. const m_AutoRepeatModeOff = 0
  40. const m_AutoRepeatModeOn = 1
  41. const m_BIG_ENDIAN = "__BIG_ENDIAN"
  42. const m_BYTE_ORDER = "__BYTE_ORDER"
  43. const m_BadAccess = 10
  44. const m_BadAlloc = 11
  45. const m_BadAtom = 5
  46. const m_BadColor = 12
  47. const m_BadCursor = 6
  48. const m_BadDrawable = 9
  49. const m_BadFont = 7
  50. const m_BadGC = 13
  51. const m_BadIDChoice = 14
  52. const m_BadImplementation = 17
  53. const m_BadLength = 16
  54. const m_BadMatch = 8
  55. const m_BadName = 15
  56. const m_BadPixmap = 4
  57. const m_BadRequest = 1
  58. const m_BadValue = 2
  59. const m_BadWindow = 3
  60. const m_Below = 1
  61. const m_BottomIf = 3
  62. const m_Button1 = 1
  63. const m_Button2 = 2
  64. const m_Button3 = 3
  65. const m_Button4 = 4
  66. const m_Button5 = 5
  67. const m_ButtonPress = 4
  68. const m_ButtonRelease = 5
  69. const m_CLOCKS_PER_SEC = 1000000
  70. const m_CLOCK_BOOTTIME = 7
  71. const m_CLOCK_BOOTTIME_ALARM = 9
  72. const m_CLOCK_MONOTONIC = 1
  73. const m_CLOCK_MONOTONIC_COARSE = 6
  74. const m_CLOCK_MONOTONIC_RAW = 4
  75. const m_CLOCK_PROCESS_CPUTIME_ID = 2
  76. const m_CLOCK_REALTIME = 0
  77. const m_CLOCK_REALTIME_ALARM = 8
  78. const m_CLOCK_REALTIME_COARSE = 5
  79. const m_CLOCK_SGI_CYCLE = 10
  80. const m_CLOCK_TAI = 11
  81. const m_CLOCK_THREAD_CPUTIME_ID = 3
  82. const m_CapButt = 1
  83. const m_CapNotLast = 0
  84. const m_CapProjecting = 3
  85. const m_CapRound = 2
  86. const m_CenterGravity = 5
  87. const m_CirculateNotify = 26
  88. const m_CirculateRequest = 27
  89. const m_ClientMessage = 33
  90. const m_ClipByChildren = 0
  91. const m_ColormapInstalled = 1
  92. const m_ColormapNotify = 32
  93. const m_ColormapUninstalled = 0
  94. const m_Complex = 0
  95. const m_ConfigureNotify = 22
  96. const m_ConfigureRequest = 23
  97. const m_ControlMapIndex = 2
  98. const m_Convex = 2
  99. const m_CoordModeOrigin = 0
  100. const m_CoordModePrevious = 1
  101. const m_CopyFromParent = 0
  102. const m_CreateNotify = 16
  103. const m_CurrentTime = 0
  104. const m_CursorShape = 0
  105. const m_DN_ACCESS = 0x00000001
  106. const m_DN_ATTRIB = 0x00000020
  107. const m_DN_CREATE = 0x00000004
  108. const m_DN_DELETE = 0x00000008
  109. const m_DN_MODIFY = 0x00000002
  110. const m_DN_MULTISHOT = 0x80000000
  111. const m_DN_RENAME = 0x00000010
  112. const m_DefaultBlanking = 2
  113. const m_DefaultExposures = 2
  114. const m_DestroyAll = 0
  115. const m_DestroyNotify = 17
  116. const m_DirectColor = 5
  117. const m_DisableAccess = 0
  118. const m_DisableScreenInterval = 0
  119. const m_DisableScreenSaver = 0
  120. const m_DontAllowExposures = 0
  121. const m_DontPreferBlanking = 0
  122. const m_EXIT_FAILURE = 1
  123. const m_EXIT_SUCCESS = 0
  124. const m_EastGravity = 6
  125. const m_EnableAccess = 1
  126. const m_EnterNotify = 7
  127. const m_EvenOddRule = 0
  128. const m_Expose = 12
  129. const m_FALLOC_FL_KEEP_SIZE = 1
  130. const m_FALLOC_FL_PUNCH_HOLE = 2
  131. const m_FALSE = 0
  132. const m_FAPPEND = "O_APPEND"
  133. const m_FASYNC = "O_ASYNC"
  134. const m_FD_CLOEXEC = 1
  135. const m_FD_SETSIZE = 1024
  136. const m_FFSYNC = "O_SYNC"
  137. const m_FNDELAY = "O_NDELAY"
  138. const m_FNONBLOCK = "O_NONBLOCK"
  139. const m_FUNCPROTO = 15
  140. const m_F_ADD_SEALS = 1033
  141. const m_F_CANCELLK = 1029
  142. const m_F_DUPFD = 0
  143. const m_F_DUPFD_CLOEXEC = 1030
  144. const m_F_GETFD = 1
  145. const m_F_GETFL = 3
  146. const m_F_GETLEASE = 1025
  147. const m_F_GETLK = 5
  148. const m_F_GETOWN = 9
  149. const m_F_GETOWNER_UIDS = 17
  150. const m_F_GETOWN_EX = 16
  151. const m_F_GETPIPE_SZ = 1032
  152. const m_F_GETSIG = 11
  153. const m_F_GET_FILE_RW_HINT = 1037
  154. const m_F_GET_RW_HINT = 1035
  155. const m_F_GET_SEALS = 1034
  156. const m_F_LOCK = 1
  157. const m_F_NOTIFY = 1026
  158. const m_F_OFD_GETLK = 36
  159. const m_F_OFD_SETLK = 37
  160. const m_F_OFD_SETLKW = 38
  161. const m_F_OK = 0
  162. const m_F_OWNER_GID = 2
  163. const m_F_OWNER_PGRP = 2
  164. const m_F_OWNER_PID = 1
  165. const m_F_OWNER_TID = 0
  166. const m_F_RDLCK = 0
  167. const m_F_SEAL_FUTURE_WRITE = 0x0010
  168. const m_F_SEAL_GROW = 0x0004
  169. const m_F_SEAL_SEAL = 0x0001
  170. const m_F_SEAL_SHRINK = 0x0002
  171. const m_F_SEAL_WRITE = 0x0008
  172. const m_F_SETFD = 2
  173. const m_F_SETFL = 4
  174. const m_F_SETLEASE = 1024
  175. const m_F_SETLK = 6
  176. const m_F_SETLKW = 7
  177. const m_F_SETOWN = 8
  178. const m_F_SETOWN_EX = 15
  179. const m_F_SETPIPE_SZ = 1031
  180. const m_F_SETSIG = 10
  181. const m_F_SET_FILE_RW_HINT = 1038
  182. const m_F_SET_RW_HINT = 1036
  183. const m_F_TEST = 3
  184. const m_F_TLOCK = 2
  185. const m_F_ULOCK = 0
  186. const m_F_UNLCK = 2
  187. const m_F_WRLCK = 1
  188. const m_FamilyChaos = 2
  189. const m_FamilyDECnet = 1
  190. const m_FamilyInternet = 0
  191. const m_FamilyInternet6 = 6
  192. const m_FamilyServerInterpreted = 5
  193. const m_FillOpaqueStippled = 3
  194. const m_FillSolid = 0
  195. const m_FillStippled = 2
  196. const m_FillTiled = 1
  197. const m_FirstExtensionError = 128
  198. const m_FocusIn = 9
  199. const m_FocusOut = 10
  200. const m_FontChange = 255
  201. const m_FontLeftToRight = 0
  202. const m_FontRightToLeft = 1
  203. const m_ForgetGravity = 0
  204. const m_GCLastBit = 22
  205. const m_GXand = 0x1
  206. const m_GXandInverted = 0x4
  207. const m_GXandReverse = 0x2
  208. const m_GXclear = 0x0
  209. const m_GXcopy = 0x3
  210. const m_GXcopyInverted = 0xc
  211. const m_GXequiv = 0x9
  212. const m_GXinvert = 0xa
  213. const m_GXnand = 0xe
  214. const m_GXnoop = 0x5
  215. const m_GXnor = 0x8
  216. const m_GXor = 0x7
  217. const m_GXorInverted = 0xd
  218. const m_GXorReverse = 0xb
  219. const m_GXset = 0xf
  220. const m_GXxor = 0x6
  221. const m_GenericEvent = 35
  222. const m_GrabFrozen = 4
  223. const m_GrabInvalidTime = 2
  224. const m_GrabModeAsync = 1
  225. const m_GrabModeSync = 0
  226. const m_GrabNotViewable = 3
  227. const m_GrabSuccess = 0
  228. const m_GraphicsExpose = 13
  229. const m_GravityNotify = 24
  230. const m_GrayScale = 1
  231. const m_HASXDMAUTH = 1
  232. const m_HAVE_ARC4RANDOM_BUF = 1
  233. const m_HAVE_CONFIG_H = 1
  234. const m_HAVE_DLFCN_H = 1
  235. const m_HAVE_INTTYPES_H = 1
  236. const m_HAVE_LIBBSD = 1
  237. const m_HAVE_LRAND48 = 1
  238. const m_HAVE_MEMORY_H = 1
  239. const m_HAVE_SRAND48 = 1
  240. const m_HAVE_STDINT_H = 1
  241. const m_HAVE_STDLIB_H = 1
  242. const m_HAVE_STRINGS_H = 1
  243. const m_HAVE_STRING_H = 1
  244. const m_HAVE_SYS_STAT_H = 1
  245. const m_HAVE_SYS_TYPES_H = 1
  246. const m_HAVE_UNISTD_H = 1
  247. const m_HostDelete = 1
  248. const m_HostInsert = 0
  249. const m_INT16_MAX = 0x7fff
  250. const m_INT32_MAX = 0x7fffffff
  251. const m_INT64_MAX = 0x7fffffffffffffff
  252. const m_INT8_MAX = 0x7f
  253. const m_INTMAX_MAX = "INT64_MAX"
  254. const m_INTMAX_MIN = "INT64_MIN"
  255. const m_INTPTR_MAX = "INT64_MAX"
  256. const m_INTPTR_MIN = "INT64_MIN"
  257. const m_INT_FAST16_MAX = "INT32_MAX"
  258. const m_INT_FAST16_MIN = "INT32_MIN"
  259. const m_INT_FAST32_MAX = "INT32_MAX"
  260. const m_INT_FAST32_MIN = "INT32_MIN"
  261. const m_INT_FAST64_MAX = "INT64_MAX"
  262. const m_INT_FAST64_MIN = "INT64_MIN"
  263. const m_INT_FAST8_MAX = "INT8_MAX"
  264. const m_INT_FAST8_MIN = "INT8_MIN"
  265. const m_INT_LEAST16_MAX = "INT16_MAX"
  266. const m_INT_LEAST16_MIN = "INT16_MIN"
  267. const m_INT_LEAST32_MAX = "INT32_MAX"
  268. const m_INT_LEAST32_MIN = "INT32_MIN"
  269. const m_INT_LEAST64_MAX = "INT64_MAX"
  270. const m_INT_LEAST64_MIN = "INT64_MIN"
  271. const m_INT_LEAST8_MAX = "INT8_MAX"
  272. const m_INT_LEAST8_MIN = "INT8_MIN"
  273. const m_ITIMER_PROF = 2
  274. const m_ITIMER_REAL = 0
  275. const m_ITIMER_VIRTUAL = 1
  276. const m_IncludeInferiors = 1
  277. const m_InputFocus = 1
  278. const m_InputOnly = 2
  279. const m_InputOutput = 1
  280. const m_IsUnmapped = 0
  281. const m_IsUnviewable = 1
  282. const m_IsViewable = 2
  283. const m_JoinBevel = 2
  284. const m_JoinMiter = 0
  285. const m_JoinRound = 1
  286. const m_KeyPress = 2
  287. const m_KeyRelease = 3
  288. const m_KeymapNotify = 11
  289. const m_LASTEvent = 36
  290. const m_LITTLE_ENDIAN = "__LITTLE_ENDIAN"
  291. const m_LSBFirst = 0
  292. const m_LT_OBJDIR = ".libs/"
  293. const m_L_INCR = 1
  294. const m_L_SET = 0
  295. const m_L_XTND = 2
  296. const m_LastExtensionError = 255
  297. const m_LeaveNotify = 8
  298. const m_LedModeOff = 0
  299. const m_LedModeOn = 1
  300. const m_LineDoubleDash = 2
  301. const m_LineOnOffDash = 1
  302. const m_LineSolid = 0
  303. const m_LockMapIndex = 1
  304. const m_LowerHighest = 1
  305. const m_MAX_HANDLE_SZ = 128
  306. const m_MSBFirst = 1
  307. const m_MapNotify = 19
  308. const m_MapRequest = 20
  309. const m_MappingBusy = 1
  310. const m_MappingFailed = 2
  311. const m_MappingKeyboard = 1
  312. const m_MappingModifier = 0
  313. const m_MappingNotify = 34
  314. const m_MappingPointer = 2
  315. const m_MappingSuccess = 0
  316. const m_Mod1MapIndex = 3
  317. const m_Mod2MapIndex = 4
  318. const m_Mod3MapIndex = 5
  319. const m_Mod4MapIndex = 6
  320. const m_Mod5MapIndex = 7
  321. const m_MotionNotify = 6
  322. const m_NDEBUG = 1
  323. const m_NeedFunctionPrototypes = 1
  324. const m_NeedNestedPrototypes = 1
  325. const m_NeedVarargsPrototypes = 1
  326. const m_NeedWidePrototypes = 0
  327. const m_NoEventMask = 0
  328. const m_NoExpose = 14
  329. const m_NoSymbol = 0
  330. const m_Nonconvex = 1
  331. const m_None = 0
  332. const m_NorthEastGravity = 3
  333. const m_NorthGravity = 2
  334. const m_NorthWestGravity = 1
  335. const m_NotUseful = 0
  336. const m_NotifyAncestor = 0
  337. const m_NotifyDetailNone = 7
  338. const m_NotifyGrab = 1
  339. const m_NotifyHint = 1
  340. const m_NotifyInferior = 2
  341. const m_NotifyNonlinear = 3
  342. const m_NotifyNonlinearVirtual = 4
  343. const m_NotifyNormal = 0
  344. const m_NotifyPointer = 5
  345. const m_NotifyPointerRoot = 6
  346. const m_NotifyUngrab = 2
  347. const m_NotifyVirtual = 1
  348. const m_NotifyWhileGrabbed = 3
  349. const m_O_APPEND = 02000
  350. const m_O_ASYNC = 020000
  351. const m_O_CLOEXEC = 02000000
  352. const m_O_CREAT = 0100
  353. const m_O_DIRECT = 040000
  354. const m_O_DIRECTORY = 0200000
  355. const m_O_DSYNC = 010000
  356. const m_O_EXCL = 0200
  357. const m_O_EXEC = "O_PATH"
  358. const m_O_LARGEFILE = 0100000
  359. const m_O_NDELAY = "O_NONBLOCK"
  360. const m_O_NOATIME = 01000000
  361. const m_O_NOCTTY = 0400
  362. const m_O_NOFOLLOW = 0400000
  363. const m_O_NONBLOCK = 04000
  364. const m_O_PATH = 010000000
  365. const m_O_RDONLY = 00
  366. const m_O_RDWR = 02
  367. const m_O_RSYNC = 04010000
  368. const m_O_SEARCH = "O_PATH"
  369. const m_O_SYNC = 04010000
  370. const m_O_TMPFILE = 020200000
  371. const m_O_TRUNC = 01000
  372. const m_O_TTY_INIT = 0
  373. const m_O_WRONLY = 01
  374. const m_Opposite = 4
  375. const m_PACKAGE = "libXdmcp"
  376. const m_PACKAGE_BUGREPORT = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg"
  377. const m_PACKAGE_NAME = "libXdmcp"
  378. const m_PACKAGE_STRING = "libXdmcp 1.1.2"
  379. const m_PACKAGE_TARNAME = "libXdmcp"
  380. const m_PACKAGE_URL = ""
  381. const m_PACKAGE_VERSION = "1.1.2"
  382. const m_PACKAGE_VERSION_MAJOR = 1
  383. const m_PACKAGE_VERSION_MINOR = 1
  384. const m_PACKAGE_VERSION_PATCHLEVEL = 2
  385. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  386. const m_POSIX_CLOSE_RESTART = 0
  387. const m_POSIX_FADV_DONTNEED = 4
  388. const m_POSIX_FADV_NOREUSE = 5
  389. const m_POSIX_FADV_NORMAL = 0
  390. const m_POSIX_FADV_RANDOM = 1
  391. const m_POSIX_FADV_SEQUENTIAL = 2
  392. const m_POSIX_FADV_WILLNEED = 3
  393. const m_PTRDIFF_MAX = "INT64_MAX"
  394. const m_PTRDIFF_MIN = "INT64_MIN"
  395. const m_ParentRelative = 1
  396. const m_PlaceOnBottom = 1
  397. const m_PlaceOnTop = 0
  398. const m_PointerRoot = 1
  399. const m_PointerWindow = 0
  400. const m_PreferBlanking = 1
  401. const m_PropModeAppend = 2
  402. const m_PropModePrepend = 1
  403. const m_PropModeReplace = 0
  404. const m_PropertyDelete = 1
  405. const m_PropertyNewValue = 0
  406. const m_PropertyNotify = 28
  407. const m_PseudoColor = 3
  408. const m_RAND_MAX = 0x7fffffff
  409. const m_RWF_WRITE_LIFE_NOT_SET = 0
  410. const m_RWH_WRITE_LIFE_EXTREME = 5
  411. const m_RWH_WRITE_LIFE_LONG = 4
  412. const m_RWH_WRITE_LIFE_MEDIUM = 3
  413. const m_RWH_WRITE_LIFE_NONE = 1
  414. const m_RWH_WRITE_LIFE_SHORT = 2
  415. const m_R_OK = 4
  416. const m_RaiseLowest = 0
  417. const m_ReparentNotify = 21
  418. const m_ReplayKeyboard = 5
  419. const m_ReplayPointer = 2
  420. const m_ResizeRequest = 25
  421. const m_RetainPermanent = 1
  422. const m_RetainTemporary = 2
  423. const m_RevertToParent = 2
  424. const m_SEEK_DATA = 3
  425. const m_SEEK_HOLE = 4
  426. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  427. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  428. const m_SIZE_MAX = "UINT64_MAX"
  429. const m_SPLICE_F_GIFT = 8
  430. const m_SPLICE_F_MORE = 4
  431. const m_SPLICE_F_MOVE = 1
  432. const m_SPLICE_F_NONBLOCK = 2
  433. const m_STDC_HEADERS = 1
  434. const m_STDERR_FILENO = 2
  435. const m_STDIN_FILENO = 0
  436. const m_STDOUT_FILENO = 1
  437. const m_SYNC_FILE_RANGE_WAIT_AFTER = 4
  438. const m_SYNC_FILE_RANGE_WAIT_BEFORE = 1
  439. const m_SYNC_FILE_RANGE_WRITE = 2
  440. const m_S_IRGRP = 0040
  441. const m_S_IROTH = 0004
  442. const m_S_IRUSR = 0400
  443. const m_S_IRWXG = 0070
  444. const m_S_IRWXO = 0007
  445. const m_S_IRWXU = 0700
  446. const m_S_ISGID = 02000
  447. const m_S_ISUID = 04000
  448. const m_S_ISVTX = 01000
  449. const m_S_IWGRP = 0020
  450. const m_S_IWOTH = 0002
  451. const m_S_IWUSR = 0200
  452. const m_S_IXGRP = 0010
  453. const m_S_IXOTH = 0001
  454. const m_S_IXUSR = 0100
  455. const m_ScreenSaverActive = 1
  456. const m_ScreenSaverReset = 0
  457. const m_SelectionClear = 29
  458. const m_SelectionNotify = 31
  459. const m_SelectionRequest = 30
  460. const m_SetModeDelete = 1
  461. const m_SetModeInsert = 0
  462. const m_ShiftMapIndex = 0
  463. const m_SouthEastGravity = 9
  464. const m_SouthGravity = 8
  465. const m_SouthWestGravity = 7
  466. const m_StaticColor = 2
  467. const m_StaticGravity = 10
  468. const m_StaticGray = 0
  469. const m_StippleShape = 2
  470. const m_Success = 0
  471. const m_SyncBoth = 7
  472. const m_SyncKeyboard = 4
  473. const m_SyncPointer = 1
  474. const m_TIMER_ABSTIME = 1
  475. const m_TIME_UTC = 1
  476. const m_TRUE = 1
  477. const m_TileShape = 1
  478. const m_TopIf = 2
  479. const m_TrueColor = 4
  480. const m_UINT16_MAX = 65535
  481. const m_UINT32_MAX = "0xffffffffu"
  482. const m_UINT64_MAX = "0xffffffffffffffffu"
  483. const m_UINT8_MAX = 255
  484. const m_UINTMAX_MAX = "UINT64_MAX"
  485. const m_UINTPTR_MAX = "UINT64_MAX"
  486. const m_UINT_FAST16_MAX = "UINT32_MAX"
  487. const m_UINT_FAST32_MAX = "UINT32_MAX"
  488. const m_UINT_FAST64_MAX = "UINT64_MAX"
  489. const m_UINT_FAST8_MAX = "UINT8_MAX"
  490. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  491. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  492. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  493. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  494. const m_UnmapGravity = 0
  495. const m_UnmapNotify = 18
  496. const m_Unsorted = 0
  497. const m_VERSION = "1.1.2"
  498. const m_VisibilityFullyObscured = 2
  499. const m_VisibilityNotify = 15
  500. const m_VisibilityPartiallyObscured = 1
  501. const m_VisibilityUnobscured = 0
  502. const m_WINT_MAX = "UINT32_MAX"
  503. const m_WINT_MIN = 0
  504. const m_WNOHANG = 1
  505. const m_WUNTRACED = 2
  506. const m_W_OK = 2
  507. const m_WestGravity = 4
  508. const m_WhenMapped = 1
  509. const m_WindingRule = 1
  510. const m_XDM_DEFAULT_MCAST_ADDR6 = "ff02:0:0:0:0:0:0:12b"
  511. const m_XDM_KA_RTX_LIMIT = 4
  512. const m_XDM_MAX_MSGLEN = 8192
  513. const m_XDM_MAX_RTX = 32
  514. const m_XDM_MIN_RTX = 2
  515. const m_XDM_PROTOCOL_VERSION = 1
  516. const m_XDM_RTX_LIMIT = 7
  517. const m_XDM_UDP_PORT = 177
  518. const m_XMD_H = 1
  519. const m_XYBitmap = 0
  520. const m_XYPixmap = 1
  521. const m_X_BIG_ENDIAN = "BIG_ENDIAN"
  522. const m_X_BYTE_ORDER = "BYTE_ORDER"
  523. const m_X_LITTLE_ENDIAN = "LITTLE_ENDIAN"
  524. const m_X_OK = 1
  525. const m_X_PROTOCOL = 11
  526. const m_X_PROTOCOL_REVISION = 0
  527. const m_YSorted = 1
  528. const m_YXBanded = 3
  529. const m_YXSorted = 2
  530. const m_ZPixmap = 2
  531. const m__ALL_SOURCE = 1
  532. const m__CS_GNU_LIBC_VERSION = 2
  533. const m__CS_GNU_LIBPTHREAD_VERSION = 3
  534. const m__CS_PATH = 0
  535. const m__CS_POSIX_V5_WIDTH_RESTRICTED_ENVS = 4
  536. const m__CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116
  537. const m__CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117
  538. const m__CS_POSIX_V6_ILP32_OFF32_LIBS = 1118
  539. const m__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119
  540. const m__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120
  541. const m__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121
  542. const m__CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122
  543. const m__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123
  544. const m__CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124
  545. const m__CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125
  546. const m__CS_POSIX_V6_LP64_OFF64_LIBS = 1126
  547. const m__CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127
  548. const m__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128
  549. const m__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129
  550. const m__CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130
  551. const m__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131
  552. const m__CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 1
  553. const m__CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132
  554. const m__CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133
  555. const m__CS_POSIX_V7_ILP32_OFF32_LIBS = 1134
  556. const m__CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135
  557. const m__CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136
  558. const m__CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137
  559. const m__CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138
  560. const m__CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139
  561. const m__CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140
  562. const m__CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141
  563. const m__CS_POSIX_V7_LP64_OFF64_LIBS = 1142
  564. const m__CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143
  565. const m__CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144
  566. const m__CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145
  567. const m__CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146
  568. const m__CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147
  569. const m__CS_POSIX_V7_THREADS_CFLAGS = 1150
  570. const m__CS_POSIX_V7_THREADS_LDFLAGS = 1151
  571. const m__CS_POSIX_V7_WIDTH_RESTRICTED_ENVS = 5
  572. const m__CS_V6_ENV = 1148
  573. const m__CS_V7_ENV = 1149
  574. const m__GNU_SOURCE = 1
  575. const m__LP64 = 1
  576. const m__PC_2_SYMLINKS = 20
  577. const m__PC_ALLOC_SIZE_MIN = 18
  578. const m__PC_ASYNC_IO = 10
  579. const m__PC_CHOWN_RESTRICTED = 6
  580. const m__PC_FILESIZEBITS = 13
  581. const m__PC_LINK_MAX = 0
  582. const m__PC_MAX_CANON = 1
  583. const m__PC_MAX_INPUT = 2
  584. const m__PC_NAME_MAX = 3
  585. const m__PC_NO_TRUNC = 7
  586. const m__PC_PATH_MAX = 4
  587. const m__PC_PIPE_BUF = 5
  588. const m__PC_PRIO_IO = 11
  589. const m__PC_REC_INCR_XFER_SIZE = 14
  590. const m__PC_REC_MAX_XFER_SIZE = 15
  591. const m__PC_REC_MIN_XFER_SIZE = 16
  592. const m__PC_REC_XFER_ALIGN = 17
  593. const m__PC_SOCK_MAXBUF = 12
  594. const m__PC_SYMLINK_MAX = 19
  595. const m__PC_SYNC_IO = 9
  596. const m__PC_VDISABLE = 8
  597. const m__POSIX2_C_BIND = "_POSIX_VERSION"
  598. const m__POSIX2_VERSION = "_POSIX_VERSION"
  599. const m__POSIX_ADVISORY_INFO = "_POSIX_VERSION"
  600. const m__POSIX_ASYNCHRONOUS_IO = "_POSIX_VERSION"
  601. const m__POSIX_BARRIERS = "_POSIX_VERSION"
  602. const m__POSIX_CHOWN_RESTRICTED = 1
  603. const m__POSIX_CLOCK_SELECTION = "_POSIX_VERSION"
  604. const m__POSIX_CPUTIME = "_POSIX_VERSION"
  605. const m__POSIX_FSYNC = "_POSIX_VERSION"
  606. const m__POSIX_IPV6 = "_POSIX_VERSION"
  607. const m__POSIX_JOB_CONTROL = 1
  608. const m__POSIX_MAPPED_FILES = "_POSIX_VERSION"
  609. const m__POSIX_MEMLOCK = "_POSIX_VERSION"
  610. const m__POSIX_MEMLOCK_RANGE = "_POSIX_VERSION"
  611. const m__POSIX_MEMORY_PROTECTION = "_POSIX_VERSION"
  612. const m__POSIX_MESSAGE_PASSING = "_POSIX_VERSION"
  613. const m__POSIX_MONOTONIC_CLOCK = "_POSIX_VERSION"
  614. const m__POSIX_NO_TRUNC = 1
  615. const m__POSIX_PTHREAD_SEMANTICS = 1
  616. const m__POSIX_RAW_SOCKETS = "_POSIX_VERSION"
  617. const m__POSIX_READER_WRITER_LOCKS = "_POSIX_VERSION"
  618. const m__POSIX_REALTIME_SIGNALS = "_POSIX_VERSION"
  619. const m__POSIX_REGEXP = 1
  620. const m__POSIX_SAVED_IDS = 1
  621. const m__POSIX_SEMAPHORES = "_POSIX_VERSION"
  622. const m__POSIX_SHARED_MEMORY_OBJECTS = "_POSIX_VERSION"
  623. const m__POSIX_SHELL = 1
  624. const m__POSIX_SPAWN = "_POSIX_VERSION"
  625. const m__POSIX_SPIN_LOCKS = "_POSIX_VERSION"
  626. const m__POSIX_THREADS = "_POSIX_VERSION"
  627. const m__POSIX_THREAD_ATTR_STACKADDR = "_POSIX_VERSION"
  628. const m__POSIX_THREAD_ATTR_STACKSIZE = "_POSIX_VERSION"
  629. const m__POSIX_THREAD_CPUTIME = "_POSIX_VERSION"
  630. const m__POSIX_THREAD_PRIORITY_SCHEDULING = "_POSIX_VERSION"
  631. const m__POSIX_THREAD_PROCESS_SHARED = "_POSIX_VERSION"
  632. const m__POSIX_THREAD_SAFE_FUNCTIONS = "_POSIX_VERSION"
  633. const m__POSIX_TIMEOUTS = "_POSIX_VERSION"
  634. const m__POSIX_TIMERS = "_POSIX_VERSION"
  635. const m__POSIX_V6_LP64_OFF64 = 1
  636. const m__POSIX_V7_LP64_OFF64 = 1
  637. const m__POSIX_VDISABLE = 0
  638. const m__POSIX_VERSION = 200809
  639. const m__SC_2_CHAR_TERM = 95
  640. const m__SC_2_C_BIND = 47
  641. const m__SC_2_C_DEV = 48
  642. const m__SC_2_FORT_DEV = 49
  643. const m__SC_2_FORT_RUN = 50
  644. const m__SC_2_LOCALEDEF = 52
  645. const m__SC_2_PBS = 168
  646. const m__SC_2_PBS_ACCOUNTING = 169
  647. const m__SC_2_PBS_CHECKPOINT = 175
  648. const m__SC_2_PBS_LOCATE = 170
  649. const m__SC_2_PBS_MESSAGE = 171
  650. const m__SC_2_PBS_TRACK = 172
  651. const m__SC_2_SW_DEV = 51
  652. const m__SC_2_UPE = 97
  653. const m__SC_2_VERSION = 46
  654. const m__SC_ADVISORY_INFO = 132
  655. const m__SC_AIO_LISTIO_MAX = 23
  656. const m__SC_AIO_MAX = 24
  657. const m__SC_AIO_PRIO_DELTA_MAX = 25
  658. const m__SC_ARG_MAX = 0
  659. const m__SC_ASYNCHRONOUS_IO = 12
  660. const m__SC_ATEXIT_MAX = 87
  661. const m__SC_AVPHYS_PAGES = 86
  662. const m__SC_BARRIERS = 133
  663. const m__SC_BC_BASE_MAX = 36
  664. const m__SC_BC_DIM_MAX = 37
  665. const m__SC_BC_SCALE_MAX = 38
  666. const m__SC_BC_STRING_MAX = 39
  667. const m__SC_CHILD_MAX = 1
  668. const m__SC_CLK_TCK = 2
  669. const m__SC_CLOCK_SELECTION = 137
  670. const m__SC_COLL_WEIGHTS_MAX = 40
  671. const m__SC_CPUTIME = 138
  672. const m__SC_DELAYTIMER_MAX = 26
  673. const m__SC_EXPR_NEST_MAX = 42
  674. const m__SC_FSYNC = 15
  675. const m__SC_GETGR_R_SIZE_MAX = 69
  676. const m__SC_GETPW_R_SIZE_MAX = 70
  677. const m__SC_HOST_NAME_MAX = 180
  678. const m__SC_IOV_MAX = 60
  679. const m__SC_IPV6 = 235
  680. const m__SC_JOB_CONTROL = 7
  681. const m__SC_LINE_MAX = 43
  682. const m__SC_LOGIN_NAME_MAX = 71
  683. const m__SC_MAPPED_FILES = 16
  684. const m__SC_MEMLOCK = 17
  685. const m__SC_MEMLOCK_RANGE = 18
  686. const m__SC_MEMORY_PROTECTION = 19
  687. const m__SC_MESSAGE_PASSING = 20
  688. const m__SC_MINSIGSTKSZ = 249
  689. const m__SC_MONOTONIC_CLOCK = 149
  690. const m__SC_MQ_OPEN_MAX = 27
  691. const m__SC_MQ_PRIO_MAX = 28
  692. const m__SC_NGROUPS_MAX = 3
  693. const m__SC_NPROCESSORS_CONF = 83
  694. const m__SC_NPROCESSORS_ONLN = 84
  695. const m__SC_NZERO = 109
  696. const m__SC_OPEN_MAX = 4
  697. const m__SC_PAGESIZE = 30
  698. const m__SC_PAGE_SIZE = 30
  699. const m__SC_PASS_MAX = 88
  700. const m__SC_PHYS_PAGES = 85
  701. const m__SC_PRIORITIZED_IO = 13
  702. const m__SC_PRIORITY_SCHEDULING = 10
  703. const m__SC_RAW_SOCKETS = 236
  704. const m__SC_READER_WRITER_LOCKS = 153
  705. const m__SC_REALTIME_SIGNALS = 9
  706. const m__SC_REGEXP = 155
  707. const m__SC_RE_DUP_MAX = 44
  708. const m__SC_RTSIG_MAX = 31
  709. const m__SC_SAVED_IDS = 8
  710. const m__SC_SEMAPHORES = 21
  711. const m__SC_SEM_NSEMS_MAX = 32
  712. const m__SC_SEM_VALUE_MAX = 33
  713. const m__SC_SHARED_MEMORY_OBJECTS = 22
  714. const m__SC_SHELL = 157
  715. const m__SC_SIGQUEUE_MAX = 34
  716. const m__SC_SIGSTKSZ = 250
  717. const m__SC_SPAWN = 159
  718. const m__SC_SPIN_LOCKS = 154
  719. const m__SC_SPORADIC_SERVER = 160
  720. const m__SC_SS_REPL_MAX = 241
  721. const m__SC_STREAMS = 174
  722. const m__SC_STREAM_MAX = 5
  723. const m__SC_SYMLOOP_MAX = 173
  724. const m__SC_SYNCHRONIZED_IO = 14
  725. const m__SC_THREADS = 67
  726. const m__SC_THREAD_ATTR_STACKADDR = 77
  727. const m__SC_THREAD_ATTR_STACKSIZE = 78
  728. const m__SC_THREAD_CPUTIME = 139
  729. const m__SC_THREAD_DESTRUCTOR_ITERATIONS = 73
  730. const m__SC_THREAD_KEYS_MAX = 74
  731. const m__SC_THREAD_PRIORITY_SCHEDULING = 79
  732. const m__SC_THREAD_PRIO_INHERIT = 80
  733. const m__SC_THREAD_PRIO_PROTECT = 81
  734. const m__SC_THREAD_PROCESS_SHARED = 82
  735. const m__SC_THREAD_ROBUST_PRIO_INHERIT = 247
  736. const m__SC_THREAD_ROBUST_PRIO_PROTECT = 248
  737. const m__SC_THREAD_SAFE_FUNCTIONS = 68
  738. const m__SC_THREAD_SPORADIC_SERVER = 161
  739. const m__SC_THREAD_STACK_MIN = 75
  740. const m__SC_THREAD_THREADS_MAX = 76
  741. const m__SC_TIMEOUTS = 164
  742. const m__SC_TIMERS = 11
  743. const m__SC_TIMER_MAX = 35
  744. const m__SC_TRACE = 181
  745. const m__SC_TRACE_EVENT_FILTER = 182
  746. const m__SC_TRACE_EVENT_NAME_MAX = 242
  747. const m__SC_TRACE_INHERIT = 183
  748. const m__SC_TRACE_LOG = 184
  749. const m__SC_TRACE_NAME_MAX = 243
  750. const m__SC_TRACE_SYS_MAX = 244
  751. const m__SC_TRACE_USER_EVENT_MAX = 245
  752. const m__SC_TTY_NAME_MAX = 72
  753. const m__SC_TYPED_MEMORY_OBJECTS = 165
  754. const m__SC_TZNAME_MAX = 6
  755. const m__SC_UIO_MAXIOV = 60
  756. const m__SC_V6_ILP32_OFF32 = 176
  757. const m__SC_V6_ILP32_OFFBIG = 177
  758. const m__SC_V6_LP64_OFF64 = 178
  759. const m__SC_V6_LPBIG_OFFBIG = 179
  760. const m__SC_V7_ILP32_OFF32 = 237
  761. const m__SC_V7_ILP32_OFFBIG = 238
  762. const m__SC_V7_LP64_OFF64 = 239
  763. const m__SC_V7_LPBIG_OFFBIG = 240
  764. const m__SC_VERSION = 29
  765. const m__SC_XBS5_ILP32_OFF32 = 125
  766. const m__SC_XBS5_ILP32_OFFBIG = 126
  767. const m__SC_XBS5_LP64_OFF64 = 127
  768. const m__SC_XBS5_LPBIG_OFFBIG = 128
  769. const m__SC_XOPEN_CRYPT = 92
  770. const m__SC_XOPEN_ENH_I18N = 93
  771. const m__SC_XOPEN_LEGACY = 129
  772. const m__SC_XOPEN_REALTIME = 130
  773. const m__SC_XOPEN_REALTIME_THREADS = 131
  774. const m__SC_XOPEN_SHM = 94
  775. const m__SC_XOPEN_STREAMS = 246
  776. const m__SC_XOPEN_UNIX = 91
  777. const m__SC_XOPEN_VERSION = 89
  778. const m__SC_XOPEN_XCU_VERSION = 90
  779. const m__SC_XOPEN_XPG2 = 98
  780. const m__SC_XOPEN_XPG3 = 99
  781. const m__SC_XOPEN_XPG4 = 100
  782. const m__STDC_PREDEF_H = 1
  783. const m__TANDEM_SOURCE = 1
  784. const m__XOPEN_ENH_I18N = 1
  785. const m__XOPEN_UNIX = 1
  786. const m__XOPEN_VERSION = 700
  787. const m__X_INLINE = "inline"
  788. const m__X_RESTRICT_KYWD = "restrict"
  789. const m__Xconst = "const"
  790. const m___ATOMIC_ACQUIRE = 2
  791. const m___ATOMIC_ACQ_REL = 4
  792. const m___ATOMIC_CONSUME = 1
  793. const m___ATOMIC_RELAXED = 0
  794. const m___ATOMIC_RELEASE = 3
  795. const m___ATOMIC_SEQ_CST = 5
  796. const m___BIGGEST_ALIGNMENT__ = 16
  797. const m___BIG_ENDIAN = 4321
  798. const m___BYTE_ORDER = 1234
  799. const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  800. const m___CCGO__ = 1
  801. const m___CHAR_BIT__ = 8
  802. const m___CHAR_UNSIGNED__ = 1
  803. const m___DBL_DECIMAL_DIG__ = 17
  804. const m___DBL_DIG__ = 15
  805. const m___DBL_HAS_DENORM__ = 1
  806. const m___DBL_HAS_INFINITY__ = 1
  807. const m___DBL_HAS_QUIET_NAN__ = 1
  808. const m___DBL_IS_IEC_60559__ = 1
  809. const m___DBL_MANT_DIG__ = 53
  810. const m___DBL_MAX_10_EXP__ = 308
  811. const m___DBL_MAX_EXP__ = 1024
  812. const m___DECIMAL_DIG__ = 36
  813. const m___DEC_EVAL_METHOD__ = 2
  814. const m___ELF__ = 1
  815. const m___EXTENSIONS__ = 1
  816. const m___FINITE_MATH_ONLY__ = 0
  817. const m___FLOAT_WORD_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  818. const m___FLT128_DECIMAL_DIG__ = 36
  819. const m___FLT128_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  820. const m___FLT128_DIG__ = 33
  821. const m___FLT128_EPSILON__ = 1.92592994438723585305597794258492732e-34
  822. const m___FLT128_HAS_DENORM__ = 1
  823. const m___FLT128_HAS_INFINITY__ = 1
  824. const m___FLT128_HAS_QUIET_NAN__ = 1
  825. const m___FLT128_IS_IEC_60559__ = 1
  826. const m___FLT128_MANT_DIG__ = 113
  827. const m___FLT128_MAX_10_EXP__ = 4932
  828. const m___FLT128_MAX_EXP__ = 16384
  829. const m___FLT128_MAX__ = "1.18973149535723176508575932662800702e+4932"
  830. const m___FLT128_MIN__ = 3.36210314311209350626267781732175260e-4932
  831. const m___FLT128_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  832. const m___FLT16_DECIMAL_DIG__ = 5
  833. const m___FLT16_DENORM_MIN__ = 5.96046447753906250000000000000000000e-8
  834. const m___FLT16_DIG__ = 3
  835. const m___FLT16_EPSILON__ = 9.76562500000000000000000000000000000e-4
  836. const m___FLT16_HAS_DENORM__ = 1
  837. const m___FLT16_HAS_INFINITY__ = 1
  838. const m___FLT16_HAS_QUIET_NAN__ = 1
  839. const m___FLT16_IS_IEC_60559__ = 1
  840. const m___FLT16_MANT_DIG__ = 11
  841. const m___FLT16_MAX_10_EXP__ = 4
  842. const m___FLT16_MAX_EXP__ = 16
  843. const m___FLT16_MAX__ = 6.55040000000000000000000000000000000e+4
  844. const m___FLT16_MIN__ = 6.10351562500000000000000000000000000e-5
  845. const m___FLT16_NORM_MAX__ = 6.55040000000000000000000000000000000e+4
  846. const m___FLT32X_DECIMAL_DIG__ = 17
  847. const m___FLT32X_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  848. const m___FLT32X_DIG__ = 15
  849. const m___FLT32X_EPSILON__ = 2.22044604925031308084726333618164062e-16
  850. const m___FLT32X_HAS_DENORM__ = 1
  851. const m___FLT32X_HAS_INFINITY__ = 1
  852. const m___FLT32X_HAS_QUIET_NAN__ = 1
  853. const m___FLT32X_IS_IEC_60559__ = 1
  854. const m___FLT32X_MANT_DIG__ = 53
  855. const m___FLT32X_MAX_10_EXP__ = 308
  856. const m___FLT32X_MAX_EXP__ = 1024
  857. const m___FLT32X_MAX__ = 1.79769313486231570814527423731704357e+308
  858. const m___FLT32X_MIN__ = 2.22507385850720138309023271733240406e-308
  859. const m___FLT32X_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  860. const m___FLT32_DECIMAL_DIG__ = 9
  861. const m___FLT32_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  862. const m___FLT32_DIG__ = 6
  863. const m___FLT32_EPSILON__ = 1.19209289550781250000000000000000000e-7
  864. const m___FLT32_HAS_DENORM__ = 1
  865. const m___FLT32_HAS_INFINITY__ = 1
  866. const m___FLT32_HAS_QUIET_NAN__ = 1
  867. const m___FLT32_IS_IEC_60559__ = 1
  868. const m___FLT32_MANT_DIG__ = 24
  869. const m___FLT32_MAX_10_EXP__ = 38
  870. const m___FLT32_MAX_EXP__ = 128
  871. const m___FLT32_MAX__ = 3.40282346638528859811704183484516925e+38
  872. const m___FLT32_MIN__ = 1.17549435082228750796873653722224568e-38
  873. const m___FLT32_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  874. const m___FLT64X_DECIMAL_DIG__ = 36
  875. const m___FLT64X_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  876. const m___FLT64X_DIG__ = 33
  877. const m___FLT64X_EPSILON__ = 1.92592994438723585305597794258492732e-34
  878. const m___FLT64X_HAS_DENORM__ = 1
  879. const m___FLT64X_HAS_INFINITY__ = 1
  880. const m___FLT64X_HAS_QUIET_NAN__ = 1
  881. const m___FLT64X_IS_IEC_60559__ = 1
  882. const m___FLT64X_MANT_DIG__ = 113
  883. const m___FLT64X_MAX_10_EXP__ = 4932
  884. const m___FLT64X_MAX_EXP__ = 16384
  885. const m___FLT64X_MAX__ = "1.18973149535723176508575932662800702e+4932"
  886. const m___FLT64X_MIN__ = 3.36210314311209350626267781732175260e-4932
  887. const m___FLT64X_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  888. const m___FLT64_DECIMAL_DIG__ = 17
  889. const m___FLT64_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  890. const m___FLT64_DIG__ = 15
  891. const m___FLT64_EPSILON__ = 2.22044604925031308084726333618164062e-16
  892. const m___FLT64_HAS_DENORM__ = 1
  893. const m___FLT64_HAS_INFINITY__ = 1
  894. const m___FLT64_HAS_QUIET_NAN__ = 1
  895. const m___FLT64_IS_IEC_60559__ = 1
  896. const m___FLT64_MANT_DIG__ = 53
  897. const m___FLT64_MAX_10_EXP__ = 308
  898. const m___FLT64_MAX_EXP__ = 1024
  899. const m___FLT64_MAX__ = 1.79769313486231570814527423731704357e+308
  900. const m___FLT64_MIN__ = 2.22507385850720138309023271733240406e-308
  901. const m___FLT64_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  902. const m___FLT_DECIMAL_DIG__ = 9
  903. const m___FLT_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  904. const m___FLT_DIG__ = 6
  905. const m___FLT_EPSILON__ = 1.19209289550781250000000000000000000e-7
  906. const m___FLT_EVAL_METHOD_TS_18661_3__ = 0
  907. const m___FLT_EVAL_METHOD__ = 0
  908. const m___FLT_HAS_DENORM__ = 1
  909. const m___FLT_HAS_INFINITY__ = 1
  910. const m___FLT_HAS_QUIET_NAN__ = 1
  911. const m___FLT_IS_IEC_60559__ = 1
  912. const m___FLT_MANT_DIG__ = 24
  913. const m___FLT_MAX_10_EXP__ = 38
  914. const m___FLT_MAX_EXP__ = 128
  915. const m___FLT_MAX__ = 3.40282346638528859811704183484516925e+38
  916. const m___FLT_MIN__ = 1.17549435082228750796873653722224568e-38
  917. const m___FLT_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  918. const m___FLT_RADIX__ = 2
  919. const m___FP_FAST_FMA = 1
  920. const m___FP_FAST_FMAF = 1
  921. const m___FP_FAST_FMAF32 = 1
  922. const m___FP_FAST_FMAF32x = 1
  923. const m___FP_FAST_FMAF64 = 1
  924. const m___FUNCTION__ = "__func__"
  925. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2
  926. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2
  927. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  928. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2
  929. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  930. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2
  931. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  932. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  933. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2
  934. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  935. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  936. const m___GCC_HAVE_DWARF2_CFI_ASM = 1
  937. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  938. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  939. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  940. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  941. const m___GCC_IEC_559 = 2
  942. const m___GCC_IEC_559_COMPLEX = 2
  943. const m___GNUC_EXECUTION_CHARSET_NAME = "UTF-8"
  944. const m___GNUC_MINOR__ = 2
  945. const m___GNUC_PATCHLEVEL__ = 0
  946. const m___GNUC_STDC_INLINE__ = 1
  947. const m___GNUC_WIDE_EXECUTION_CHARSET_NAME = "UTF-32LE"
  948. const m___GNUC__ = 14
  949. const m___GXX_ABI_VERSION = 1019
  950. const m___INT16_MAX__ = 0x7fff
  951. const m___INT32_MAX__ = 0x7fffffff
  952. const m___INT32_TYPE__ = "int"
  953. const m___INT64_MAX__ = 0x7fffffffffffffff
  954. const m___INT8_MAX__ = 0x7f
  955. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  956. const m___INTMAX_WIDTH__ = 64
  957. const m___INTPTR_MAX__ = 0x7fffffffffffffff
  958. const m___INTPTR_WIDTH__ = 64
  959. const m___INT_FAST16_MAX__ = 0x7fffffffffffffff
  960. const m___INT_FAST16_WIDTH__ = 64
  961. const m___INT_FAST32_MAX__ = 0x7fffffffffffffff
  962. const m___INT_FAST32_WIDTH__ = 64
  963. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  964. const m___INT_FAST64_WIDTH__ = 64
  965. const m___INT_FAST8_MAX__ = 0x7f
  966. const m___INT_FAST8_WIDTH__ = 8
  967. const m___INT_LEAST16_MAX__ = 0x7fff
  968. const m___INT_LEAST16_WIDTH__ = 16
  969. const m___INT_LEAST32_MAX__ = 0x7fffffff
  970. const m___INT_LEAST32_TYPE__ = "int"
  971. const m___INT_LEAST32_WIDTH__ = 32
  972. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  973. const m___INT_LEAST64_WIDTH__ = 64
  974. const m___INT_LEAST8_MAX__ = 0x7f
  975. const m___INT_LEAST8_WIDTH__ = 8
  976. const m___INT_MAX__ = 0x7fffffff
  977. const m___INT_WIDTH__ = 32
  978. const m___LDBL_DECIMAL_DIG__ = 36
  979. const m___LDBL_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  980. const m___LDBL_DIG__ = 33
  981. const m___LDBL_EPSILON__ = 1.92592994438723585305597794258492732e-34
  982. const m___LDBL_HAS_DENORM__ = 1
  983. const m___LDBL_HAS_INFINITY__ = 1
  984. const m___LDBL_HAS_QUIET_NAN__ = 1
  985. const m___LDBL_IS_IEC_60559__ = 1
  986. const m___LDBL_MANT_DIG__ = 113
  987. const m___LDBL_MAX_10_EXP__ = 4932
  988. const m___LDBL_MAX_EXP__ = 16384
  989. const m___LDBL_MAX__ = "1.18973149535723176508575932662800702e+4932"
  990. const m___LDBL_MIN__ = 3.36210314311209350626267781732175260e-4932
  991. const m___LDBL_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  992. const m___LITTLE_ENDIAN = 1234
  993. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  994. const m___LONG_LONG_WIDTH__ = 64
  995. const m___LONG_MAX = 0x7fffffffffffffff
  996. const m___LONG_MAX__ = 0x7fffffffffffffff
  997. const m___LONG_WIDTH__ = 64
  998. const m___LP64__ = 1
  999. const m___NO_INLINE__ = 1
  1000. const m___ORDER_BIG_ENDIAN__ = 4321
  1001. const m___ORDER_LITTLE_ENDIAN__ = 1234
  1002. const m___ORDER_PDP_ENDIAN__ = 3412
  1003. const m___PDP_ENDIAN = 3412
  1004. const m___PIC__ = 2
  1005. const m___PIE__ = 2
  1006. const m___PRAGMA_REDEFINE_EXTNAME = 1
  1007. const m___PRETTY_FUNCTION__ = "__func__"
  1008. const m___PTRDIFF_MAX__ = 0x7fffffffffffffff
  1009. const m___PTRDIFF_WIDTH__ = 64
  1010. const m___SCHAR_MAX__ = 0x7f
  1011. const m___SCHAR_WIDTH__ = 8
  1012. const m___SHRT_MAX__ = 0x7fff
  1013. const m___SHRT_WIDTH__ = 16
  1014. const m___SIG_ATOMIC_MAX__ = 0x7fffffff
  1015. const m___SIG_ATOMIC_TYPE__ = "int"
  1016. const m___SIG_ATOMIC_WIDTH__ = 32
  1017. const m___SIZEOF_DOUBLE__ = 8
  1018. const m___SIZEOF_FLOAT__ = 4
  1019. const m___SIZEOF_INT128__ = 16
  1020. const m___SIZEOF_INT__ = 4
  1021. const m___SIZEOF_LONG_DOUBLE__ = 8
  1022. const m___SIZEOF_LONG_LONG__ = 8
  1023. const m___SIZEOF_LONG__ = 8
  1024. const m___SIZEOF_POINTER__ = 8
  1025. const m___SIZEOF_PTRDIFF_T__ = 8
  1026. const m___SIZEOF_SHORT__ = 2
  1027. const m___SIZEOF_SIZE_T__ = 8
  1028. const m___SIZEOF_WCHAR_T__ = 4
  1029. const m___SIZEOF_WINT_T__ = 4
  1030. const m___SIZE_MAX__ = 0xffffffffffffffff
  1031. const m___SIZE_WIDTH__ = 64
  1032. const m___STDC_HOSTED__ = 1
  1033. const m___STDC_IEC_559_COMPLEX__ = 1
  1034. const m___STDC_IEC_559__ = 1
  1035. const m___STDC_IEC_60559_BFP__ = 201404
  1036. const m___STDC_IEC_60559_COMPLEX__ = 201404
  1037. const m___STDC_ISO_10646__ = 201706
  1038. const m___STDC_UTF_16__ = 1
  1039. const m___STDC_UTF_32__ = 1
  1040. const m___STDC_VERSION__ = 201710
  1041. const m___STDC__ = 1
  1042. const m___UINT16_MAX__ = 0xffff
  1043. const m___UINT32_MAX__ = 0xffffffff
  1044. const m___UINT64_MAX__ = 0xffffffffffffffff
  1045. const m___UINT8_MAX__ = 0xff
  1046. const m___UINTMAX_MAX__ = 0xffffffffffffffff
  1047. const m___UINTPTR_MAX__ = 0xffffffffffffffff
  1048. const m___UINT_FAST16_MAX__ = 0xffffffffffffffff
  1049. const m___UINT_FAST32_MAX__ = 0xffffffffffffffff
  1050. const m___UINT_FAST64_MAX__ = 0xffffffffffffffff
  1051. const m___UINT_FAST8_MAX__ = 0xff
  1052. const m___UINT_LEAST16_MAX__ = 0xffff
  1053. const m___UINT_LEAST32_MAX__ = 0xffffffff
  1054. const m___UINT_LEAST64_MAX__ = 0xffffffffffffffff
  1055. const m___UINT_LEAST8_MAX__ = 0xff
  1056. const m___USE_TIME_BITS64 = 1
  1057. const m___VERSION__ = "14.2.0"
  1058. const m___WCHAR_MAX__ = 0x7fffffff
  1059. const m___WCHAR_TYPE__ = "int"
  1060. const m___WCHAR_WIDTH__ = 32
  1061. const m___WINT_MAX__ = 0xffffffff
  1062. const m___WINT_MIN__ = 0
  1063. const m___WINT_WIDTH__ = 32
  1064. const m___gnu_linux__ = 1
  1065. const m___inline = "inline"
  1066. const m___linux = 1
  1067. const m___linux__ = 1
  1068. const m___pic__ = 2
  1069. const m___pie__ = 2
  1070. const m___restrict = "restrict"
  1071. const m___restrict_arr = "restrict"
  1072. const m___riscv = 1
  1073. const m___riscv_a = 2001000
  1074. const m___riscv_arch_test = 1
  1075. const m___riscv_atomic = 1
  1076. const m___riscv_c = 2000000
  1077. const m___riscv_cmodel_medany = 1
  1078. const m___riscv_compressed = 1
  1079. const m___riscv_d = 2002000
  1080. const m___riscv_div = 1
  1081. const m___riscv_f = 2002000
  1082. const m___riscv_fdiv = 1
  1083. const m___riscv_flen = 64
  1084. const m___riscv_float_abi_double = 1
  1085. const m___riscv_fsqrt = 1
  1086. const m___riscv_i = 2001000
  1087. const m___riscv_m = 2000000
  1088. const m___riscv_misaligned_slow = 1
  1089. const m___riscv_mul = 1
  1090. const m___riscv_muldiv = 1
  1091. const m___riscv_xlen = 64
  1092. const m___riscv_zicsr = 2000000
  1093. const m___riscv_zifencei = 2000000
  1094. const m___tm_gmtoff = "tm_gmtoff"
  1095. const m___tm_zone = "tm_zone"
  1096. const m___unix = 1
  1097. const m___unix__ = 1
  1098. const m_alloca = "__builtin_alloca"
  1099. const m_linux = 1
  1100. const m_loff_t = "off_t"
  1101. const m_unix = 1
  1102. type t__builtin_va_list = uintptr
  1103. type t__predefined_size_t = uint64
  1104. type t__predefined_wchar_t = int32
  1105. type t__predefined_ptrdiff_t = int64
  1106. type Tblksize_t = int32
  1107. type Tnlink_t = uint32
  1108. type Tsize_t = uint64
  1109. type Tssize_t = int64
  1110. type Tregister_t = int64
  1111. type Ttime_t = int64
  1112. type Tsuseconds_t = int64
  1113. type Tint8_t = int8
  1114. type Tint16_t = int16
  1115. type Tint32_t = int32
  1116. type Tint64_t = int64
  1117. type Tu_int64_t = uint64
  1118. type Tmode_t = uint32
  1119. type Toff_t = int64
  1120. type Tino_t = uint64
  1121. type Tdev_t = uint64
  1122. type Tblkcnt_t = int64
  1123. type Tfsblkcnt_t = uint64
  1124. type Tfsfilcnt_t = uint64
  1125. type Ttimer_t = uintptr
  1126. type Tclockid_t = int32
  1127. type Tclock_t = int64
  1128. type Tpid_t = int32
  1129. type Tid_t = uint32
  1130. type Tuid_t = uint32
  1131. type Tgid_t = uint32
  1132. type Tkey_t = int32
  1133. type Tuseconds_t = uint32
  1134. type Tpthread_t = uintptr
  1135. type Tpthread_once_t = int32
  1136. type Tpthread_key_t = uint32
  1137. type Tpthread_spinlock_t = int32
  1138. type Tpthread_mutexattr_t = struct {
  1139. F__attr uint32
  1140. }
  1141. type Tpthread_condattr_t = struct {
  1142. F__attr uint32
  1143. }
  1144. type Tpthread_barrierattr_t = struct {
  1145. F__attr uint32
  1146. }
  1147. type Tpthread_rwlockattr_t = struct {
  1148. F__attr [2]uint32
  1149. }
  1150. type Tpthread_attr_t = struct {
  1151. F__u struct {
  1152. F__vi [0][14]int32
  1153. F__s [0][7]uint64
  1154. F__i [14]int32
  1155. }
  1156. }
  1157. type Tpthread_mutex_t = struct {
  1158. F__u struct {
  1159. F__vi [0][10]int32
  1160. F__p [0][5]uintptr
  1161. F__i [10]int32
  1162. }
  1163. }
  1164. type Tpthread_cond_t = struct {
  1165. F__u struct {
  1166. F__vi [0][12]int32
  1167. F__p [0][6]uintptr
  1168. F__i [12]int32
  1169. }
  1170. }
  1171. type Tpthread_rwlock_t = struct {
  1172. F__u struct {
  1173. F__vi [0][14]int32
  1174. F__p [0][7]uintptr
  1175. F__i [14]int32
  1176. }
  1177. }
  1178. type Tpthread_barrier_t = struct {
  1179. F__u struct {
  1180. F__vi [0][8]int32
  1181. F__p [0][4]uintptr
  1182. F__i [8]int32
  1183. }
  1184. }
  1185. type Tu_int8_t = uint8
  1186. type Tu_int16_t = uint16
  1187. type Tu_int32_t = uint32
  1188. type Tcaddr_t = uintptr
  1189. type Tu_char = uint8
  1190. type Tu_short = uint16
  1191. type Tushort = uint16
  1192. type Tu_int = uint32
  1193. type Tuint = uint32
  1194. type Tu_long = uint64
  1195. type Tulong = uint64
  1196. type Tquad_t = int64
  1197. type Tu_quad_t = uint64
  1198. type Tuint16_t = uint16
  1199. type Tuint32_t = uint32
  1200. type Tuint64_t = uint64
  1201. type Ttimeval = struct {
  1202. Ftv_sec Ttime_t
  1203. Ftv_usec Tsuseconds_t
  1204. }
  1205. type Ttimespec = struct {
  1206. Ftv_sec Ttime_t
  1207. Ftv_nsec int64
  1208. }
  1209. type Tsigset_t = struct {
  1210. F__bits [16]uint64
  1211. }
  1212. type t__sigset_t = Tsigset_t
  1213. type Tfd_mask = uint64
  1214. type Tfd_set = struct {
  1215. Ffds_bits [16]uint64
  1216. }
  1217. type Tlocale_t = uintptr
  1218. type Tiovec = struct {
  1219. Fiov_base uintptr
  1220. Fiov_len Tsize_t
  1221. }
  1222. type Tflock = struct {
  1223. Fl_type int16
  1224. Fl_whence int16
  1225. Fl_start Toff_t
  1226. Fl_len Toff_t
  1227. Fl_pid Tpid_t
  1228. }
  1229. type Tfile_handle = struct {
  1230. Fhandle_bytes uint32
  1231. Fhandle_type int32
  1232. }
  1233. type Tf_owner_ex = struct {
  1234. Ftype1 int32
  1235. Fpid Tpid_t
  1236. }
  1237. type Tintptr_t = int64
  1238. type Titimerval = struct {
  1239. Fit_interval Ttimeval
  1240. Fit_value Ttimeval
  1241. }
  1242. type Ttimezone = struct {
  1243. Ftz_minuteswest int32
  1244. Ftz_dsttime int32
  1245. }
  1246. type Ttm = struct {
  1247. Ftm_sec int32
  1248. Ftm_min int32
  1249. Ftm_hour int32
  1250. Ftm_mday int32
  1251. Ftm_mon int32
  1252. Ftm_year int32
  1253. Ftm_wday int32
  1254. Ftm_yday int32
  1255. Ftm_isdst int32
  1256. Ftm_gmtoff int64
  1257. Ftm_zone uintptr
  1258. }
  1259. type Titimerspec = struct {
  1260. Fit_interval Ttimespec
  1261. Fit_value Ttimespec
  1262. }
  1263. type TXID = uint64
  1264. type TMask = uint64
  1265. type TAtom = uint64
  1266. type TVisualID = uint64
  1267. type TTime = uint64
  1268. type TWindow = uint64
  1269. type TDrawable = uint64
  1270. type TFont = uint64
  1271. type TPixmap = uint64
  1272. type TCursor = uint64
  1273. type TColormap = uint64
  1274. type TGContext = uint64
  1275. type TKeySym = uint64
  1276. type TKeyCode = uint8
  1277. type TINT64 = int64
  1278. type TINT32 = int32
  1279. type TINT16 = int16
  1280. type TINT8 = int8
  1281. type TCARD64 = uint64
  1282. type TCARD32 = uint32
  1283. type TCARD16 = uint16
  1284. type TCARD8 = uint8
  1285. type TBITS32 = uint32
  1286. type TBITS16 = uint16
  1287. type TBYTE = uint8
  1288. type TBOOL = uint8
  1289. type TxdmOpCode = int32
  1290. const _BROADCAST_QUERY = 1
  1291. const _QUERY = 2
  1292. const _INDIRECT_QUERY = 3
  1293. const _FORWARD_QUERY = 4
  1294. const _WILLING = 5
  1295. const _UNWILLING = 6
  1296. const _REQUEST = 7
  1297. const _ACCEPT = 8
  1298. const _DECLINE = 9
  1299. const _MANAGE = 10
  1300. const _REFUSE = 11
  1301. const _FAILED = 12
  1302. const _KEEPALIVE = 13
  1303. const _ALIVE = 14
  1304. type Txdmcp_states = int32
  1305. const _XDM_QUERY = 0
  1306. const _XDM_BROADCAST = 1
  1307. const _XDM_INDIRECT = 2
  1308. const _XDM_COLLECT_QUERY = 3
  1309. const _XDM_COLLECT_BROADCAST_QUERY = 4
  1310. const _XDM_COLLECT_INDIRECT_QUERY = 5
  1311. const _XDM_START_CONNECTION = 6
  1312. const _XDM_AWAIT_REQUEST_RESPONSE = 7
  1313. const _XDM_AWAIT_MANAGE_RESPONSE = 8
  1314. const _XDM_MANAGE = 9
  1315. const _XDM_RUN_SESSION = 10
  1316. const _XDM_OFF = 11
  1317. const _XDM_AWAIT_USER_INPUT = 12
  1318. const _XDM_KEEPALIVE = 13
  1319. const _XDM_AWAIT_ALIVE_RESPONSE = 14
  1320. const _XDM_KEEP_ME_LAST = 15
  1321. type TCARD8Ptr = uintptr
  1322. type TCARD16Ptr = uintptr
  1323. type TCARD32Ptr = uintptr
  1324. type TARRAY8 = struct {
  1325. Flength TCARD16
  1326. Fdata TCARD8Ptr
  1327. }
  1328. type T_ARRAY8 = TARRAY8
  1329. type TARRAY8Ptr = uintptr
  1330. type TARRAY16 = struct {
  1331. Flength TCARD8
  1332. Fdata TCARD16Ptr
  1333. }
  1334. type T_ARRAY16 = TARRAY16
  1335. type TARRAY16Ptr = uintptr
  1336. type TARRAY32 = struct {
  1337. Flength TCARD8
  1338. Fdata TCARD32Ptr
  1339. }
  1340. type T_ARRAY32 = TARRAY32
  1341. type TARRAY32Ptr = uintptr
  1342. type TARRAYofARRAY8 = struct {
  1343. Flength TCARD8
  1344. Fdata TARRAY8Ptr
  1345. }
  1346. type T_ARRAYofARRAY8 = TARRAYofARRAY8
  1347. type TARRAYofARRAY8Ptr = uintptr
  1348. type TXdmcpHeader = struct {
  1349. Fversion TCARD16
  1350. Fopcode TCARD16
  1351. Flength TCARD16
  1352. }
  1353. type T_XdmcpHeader = TXdmcpHeader
  1354. type TXdmcpHeaderPtr = uintptr
  1355. type TXdmcpBuffer = struct {
  1356. Fdata uintptr
  1357. Fsize int32
  1358. Fpointer int32
  1359. Fcount int32
  1360. }
  1361. type T_XdmcpBuffer = TXdmcpBuffer
  1362. type TXdmcpBufferPtr = uintptr
  1363. type TXdmAuthKeyRec = struct {
  1364. Fdata [8]TBYTE
  1365. }
  1366. type T_XdmAuthKey = TXdmAuthKeyRec
  1367. type TXdmAuthKeyPtr = uintptr
  1368. type TXdmcpNetaddr = uintptr
  1369. type Tuintptr_t = uint64
  1370. type Tintmax_t = int64
  1371. type Tuint8_t = uint8
  1372. type Tuintmax_t = uint64
  1373. type Tint_fast8_t = int8
  1374. type Tint_fast64_t = int64
  1375. type Tint_least8_t = int8
  1376. type Tint_least16_t = int16
  1377. type Tint_least32_t = int32
  1378. type Tint_least64_t = int64
  1379. type Tuint_fast8_t = uint8
  1380. type Tuint_fast64_t = uint64
  1381. type Tuint_least8_t = uint8
  1382. type Tuint_least16_t = uint16
  1383. type Tuint_least32_t = uint32
  1384. type Tuint_least64_t = uint64
  1385. type Tint_fast16_t = int32
  1386. type Tint_fast32_t = int32
  1387. type Tuint_fast16_t = uint32
  1388. type Tuint_fast32_t = uint32
  1389. type Twchar_t = int32
  1390. type Tdiv_t = struct {
  1391. Fquot int32
  1392. Frem int32
  1393. }
  1394. type Tldiv_t = struct {
  1395. Fquot int64
  1396. Frem int64
  1397. }
  1398. type Tlldiv_t = struct {
  1399. Fquot int64
  1400. Frem int64
  1401. }
  1402. // C documentation
  1403. //
  1404. // /*
  1405. // * This variant of malloc does not return NULL if zero size is passed into.
  1406. // */
  1407. func _xmalloc(tls *libc.TLS, size Tsize_t) (r uintptr) {
  1408. var v1 uint64
  1409. _ = v1
  1410. if size != 0 {
  1411. v1 = size
  1412. } else {
  1413. v1 = uint64(1)
  1414. }
  1415. return libc.Xmalloc(tls, v1)
  1416. }
  1417. // C documentation
  1418. //
  1419. // /*
  1420. // * This variant of calloc does not return NULL if zero count is passed into.
  1421. // */
  1422. func _xcalloc(tls *libc.TLS, n Tsize_t, size Tsize_t) (r uintptr) {
  1423. var v1 uint64
  1424. _ = v1
  1425. if n != 0 {
  1426. v1 = n
  1427. } else {
  1428. v1 = uint64(1)
  1429. }
  1430. return libc.Xcalloc(tls, v1, size)
  1431. }
  1432. // C documentation
  1433. //
  1434. // /*
  1435. // * This variant of realloc does not return NULL if zero size is passed into
  1436. // */
  1437. func _xrealloc(tls *libc.TLS, ptr uintptr, size Tsize_t) (r uintptr) {
  1438. var v1 uint64
  1439. _ = v1
  1440. if size != 0 {
  1441. v1 = size
  1442. } else {
  1443. v1 = uint64(1)
  1444. }
  1445. return libc.Xrealloc(tls, ptr, v1)
  1446. }
  1447. func XXdmcpAllocARRAY8(tls *libc.TLS, array TARRAY8Ptr, length int32) (r int32) {
  1448. /* length defined in ARRAY8 struct is a CARD16 (not CARD8 like the rest) */
  1449. if length > int32(m_UINT16_MAX) || length < 0 {
  1450. (*T_ARRAY8)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  1451. } else {
  1452. (*T_ARRAY8)(unsafe.Pointer(array)).Fdata = _xmalloc(tls, libc.Uint64FromInt32(length)*uint64(1))
  1453. }
  1454. if (*T_ARRAY8)(unsafe.Pointer(array)).Fdata == libc.UintptrFromInt32(0) {
  1455. (*T_ARRAY8)(unsafe.Pointer(array)).Flength = uint16(0)
  1456. return m_FALSE
  1457. }
  1458. (*T_ARRAY8)(unsafe.Pointer(array)).Flength = libc.Uint16FromInt32(length)
  1459. return int32(m_TRUE)
  1460. }
  1461. func XXdmcpAllocARRAY16(tls *libc.TLS, array TARRAY16Ptr, length int32) (r int32) {
  1462. /* length defined in ARRAY16 struct is a CARD8 */
  1463. if length > int32(m_UINT8_MAX) || length < 0 {
  1464. (*T_ARRAY16)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  1465. } else {
  1466. (*T_ARRAY16)(unsafe.Pointer(array)).Fdata = _xmalloc(tls, libc.Uint64FromInt32(length)*uint64(2))
  1467. }
  1468. if (*T_ARRAY16)(unsafe.Pointer(array)).Fdata == libc.UintptrFromInt32(0) {
  1469. (*T_ARRAY16)(unsafe.Pointer(array)).Flength = uint8(0)
  1470. return m_FALSE
  1471. }
  1472. (*T_ARRAY16)(unsafe.Pointer(array)).Flength = libc.Uint8FromInt32(length)
  1473. return int32(m_TRUE)
  1474. }
  1475. func XXdmcpAllocARRAY32(tls *libc.TLS, array TARRAY32Ptr, length int32) (r int32) {
  1476. /* length defined in ARRAY32 struct is a CARD8 */
  1477. if length > int32(m_UINT8_MAX) || length < 0 {
  1478. (*T_ARRAY32)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  1479. } else {
  1480. (*T_ARRAY32)(unsafe.Pointer(array)).Fdata = _xmalloc(tls, libc.Uint64FromInt32(length)*uint64(4))
  1481. }
  1482. if (*T_ARRAY32)(unsafe.Pointer(array)).Fdata == libc.UintptrFromInt32(0) {
  1483. (*T_ARRAY32)(unsafe.Pointer(array)).Flength = uint8(0)
  1484. return m_FALSE
  1485. }
  1486. (*T_ARRAY32)(unsafe.Pointer(array)).Flength = libc.Uint8FromInt32(length)
  1487. return int32(m_TRUE)
  1488. }
  1489. func XXdmcpAllocARRAYofARRAY8(tls *libc.TLS, array TARRAYofARRAY8Ptr, length int32) (r int32) {
  1490. /* length defined in ARRAYofARRAY8 struct is a CARD8 */
  1491. if length > int32(m_UINT8_MAX) || length < 0 {
  1492. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  1493. } else {
  1494. /*
  1495. * Use calloc to ensure the pointers are cleared out so we
  1496. * don't try to free garbage if XdmcpDisposeARRAYofARRAY8()
  1497. * is called before the caller sets them to valid pointers.
  1498. */
  1499. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = _xcalloc(tls, libc.Uint64FromInt32(length), uint64(16))
  1500. }
  1501. if (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata == libc.UintptrFromInt32(0) {
  1502. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = uint8(0)
  1503. return m_FALSE
  1504. }
  1505. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = libc.Uint8FromInt32(length)
  1506. return int32(m_TRUE)
  1507. }
  1508. func XXdmcpARRAY8Equal(tls *libc.TLS, array1 TARRAY8Ptr, array2 TARRAY8Ptr) (r int32) {
  1509. if libc.Int32FromUint16((*T_ARRAY8)(unsafe.Pointer(array1)).Flength) != libc.Int32FromUint16((*T_ARRAY8)(unsafe.Pointer(array2)).Flength) {
  1510. return m_FALSE
  1511. }
  1512. if libc.Xmemcmp(tls, (*T_ARRAY8)(unsafe.Pointer(array1)).Fdata, (*T_ARRAY8)(unsafe.Pointer(array2)).Fdata, uint64((*T_ARRAY8)(unsafe.Pointer(array1)).Flength)) != 0 {
  1513. return m_FALSE
  1514. }
  1515. return int32(m_TRUE)
  1516. }
  1517. func XXdmcpCopyARRAY8(tls *libc.TLS, src TARRAY8Ptr, dst TARRAY8Ptr) (r int32) {
  1518. if !(XXdmcpAllocARRAY8(tls, dst, libc.Int32FromUint16((*T_ARRAY8)(unsafe.Pointer(src)).Flength)) != 0) {
  1519. return m_FALSE
  1520. }
  1521. libc.Xmemmove(tls, (*T_ARRAY8)(unsafe.Pointer(dst)).Fdata, (*T_ARRAY8)(unsafe.Pointer(src)).Fdata, uint64((*T_ARRAY8)(unsafe.Pointer(src)).Flength)*uint64(1))
  1522. return int32(m_TRUE)
  1523. }
  1524. func XXdmcpReallocARRAY8(tls *libc.TLS, array TARRAY8Ptr, length int32) (r int32) {
  1525. var newData TCARD8Ptr
  1526. _ = newData
  1527. /* length defined in ARRAY8 struct is a CARD16 (not CARD8 like the rest) */
  1528. if length > int32(m_UINT16_MAX) || length < 0 {
  1529. return m_FALSE
  1530. }
  1531. newData = _xrealloc(tls, (*T_ARRAY8)(unsafe.Pointer(array)).Fdata, libc.Uint64FromInt32(length)*uint64(1))
  1532. if !(newData != 0) {
  1533. return m_FALSE
  1534. }
  1535. (*T_ARRAY8)(unsafe.Pointer(array)).Flength = libc.Uint16FromInt32(length)
  1536. (*T_ARRAY8)(unsafe.Pointer(array)).Fdata = newData
  1537. return int32(m_TRUE)
  1538. }
  1539. func XXdmcpReallocARRAYofARRAY8(tls *libc.TLS, array TARRAYofARRAY8Ptr, length int32) (r int32) {
  1540. var newData TARRAY8Ptr
  1541. _ = newData
  1542. /* length defined in ARRAYofARRAY8 struct is a CARD8 */
  1543. if length > int32(m_UINT8_MAX) || length < 0 {
  1544. return m_FALSE
  1545. }
  1546. newData = _xrealloc(tls, (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata, libc.Uint64FromInt32(length)*uint64(16))
  1547. if !(newData != 0) {
  1548. return m_FALSE
  1549. }
  1550. if length > libc.Int32FromUint8((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength) {
  1551. libc.Xmemset(tls, newData+uintptr((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength)*16, 0, libc.Uint64FromInt32(length-libc.Int32FromUint8((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength))*uint64(16))
  1552. }
  1553. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = libc.Uint8FromInt32(length)
  1554. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = newData
  1555. return int32(m_TRUE)
  1556. }
  1557. func XXdmcpReallocARRAY16(tls *libc.TLS, array TARRAY16Ptr, length int32) (r int32) {
  1558. var newData TCARD16Ptr
  1559. _ = newData
  1560. /* length defined in ARRAY16 struct is a CARD8 */
  1561. if length > int32(m_UINT8_MAX) || length < 0 {
  1562. return m_FALSE
  1563. }
  1564. newData = _xrealloc(tls, (*T_ARRAY16)(unsafe.Pointer(array)).Fdata, libc.Uint64FromInt32(length)*uint64(2))
  1565. if !(newData != 0) {
  1566. return m_FALSE
  1567. }
  1568. (*T_ARRAY16)(unsafe.Pointer(array)).Flength = libc.Uint8FromInt32(length)
  1569. (*T_ARRAY16)(unsafe.Pointer(array)).Fdata = newData
  1570. return int32(m_TRUE)
  1571. }
  1572. func XXdmcpReallocARRAY32(tls *libc.TLS, array TARRAY32Ptr, length int32) (r int32) {
  1573. var newData TCARD32Ptr
  1574. _ = newData
  1575. /* length defined in ARRAY32 struct is a CARD8 */
  1576. if length > int32(m_UINT8_MAX) || length < 0 {
  1577. return m_FALSE
  1578. }
  1579. newData = _xrealloc(tls, (*T_ARRAY32)(unsafe.Pointer(array)).Fdata, libc.Uint64FromInt32(length)*uint64(4))
  1580. if !(newData != 0) {
  1581. return m_FALSE
  1582. }
  1583. (*T_ARRAY32)(unsafe.Pointer(array)).Flength = libc.Uint8FromInt32(length)
  1584. (*T_ARRAY32)(unsafe.Pointer(array)).Fdata = newData
  1585. return int32(m_TRUE)
  1586. }
  1587. func XXdmcpDisposeARRAY8(tls *libc.TLS, array TARRAY8Ptr) {
  1588. libc.Xfree(tls, (*T_ARRAY8)(unsafe.Pointer(array)).Fdata)
  1589. (*T_ARRAY8)(unsafe.Pointer(array)).Flength = uint16(0)
  1590. (*T_ARRAY8)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  1591. }
  1592. func XXdmcpDisposeARRAY16(tls *libc.TLS, array TARRAY16Ptr) {
  1593. libc.Xfree(tls, (*T_ARRAY16)(unsafe.Pointer(array)).Fdata)
  1594. (*T_ARRAY16)(unsafe.Pointer(array)).Flength = uint8(0)
  1595. (*T_ARRAY16)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  1596. }
  1597. func XXdmcpDisposeARRAY32(tls *libc.TLS, array TARRAY32Ptr) {
  1598. libc.Xfree(tls, (*T_ARRAY32)(unsafe.Pointer(array)).Fdata)
  1599. (*T_ARRAY32)(unsafe.Pointer(array)).Flength = uint8(0)
  1600. (*T_ARRAY32)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  1601. }
  1602. func XXdmcpDisposeARRAYofARRAY8(tls *libc.TLS, array TARRAYofARRAY8Ptr) {
  1603. var i int32
  1604. _ = i
  1605. if (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata != libc.UintptrFromInt32(0) {
  1606. i = 0
  1607. for {
  1608. if !(i < libc.Int32FromUint8((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength)) {
  1609. break
  1610. }
  1611. XXdmcpDisposeARRAY8(tls, (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata+uintptr(i)*16)
  1612. goto _1
  1613. _1:
  1614. ;
  1615. i++
  1616. }
  1617. libc.Xfree(tls, (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata)
  1618. }
  1619. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = uint8(0)
  1620. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  1621. }
  1622. const m_AF_ALG = "PF_ALG"
  1623. const m_AF_APPLETALK = "PF_APPLETALK"
  1624. const m_AF_ASH = "PF_ASH"
  1625. const m_AF_ATMPVC = "PF_ATMPVC"
  1626. const m_AF_ATMSVC = "PF_ATMSVC"
  1627. const m_AF_AX25 = "PF_AX25"
  1628. const m_AF_BLUETOOTH = "PF_BLUETOOTH"
  1629. const m_AF_BRIDGE = "PF_BRIDGE"
  1630. const m_AF_CAIF = "PF_CAIF"
  1631. const m_AF_CAN = "PF_CAN"
  1632. const m_AF_DECnet = "PF_DECnet"
  1633. const m_AF_ECONET = "PF_ECONET"
  1634. const m_AF_FILE = "AF_LOCAL"
  1635. const m_AF_IB = "PF_IB"
  1636. const m_AF_IEEE802154 = "PF_IEEE802154"
  1637. const m_AF_INET = "PF_INET"
  1638. const m_AF_INET6 = "PF_INET6"
  1639. const m_AF_IPX = "PF_IPX"
  1640. const m_AF_IRDA = "PF_IRDA"
  1641. const m_AF_ISDN = "PF_ISDN"
  1642. const m_AF_IUCV = "PF_IUCV"
  1643. const m_AF_KCM = "PF_KCM"
  1644. const m_AF_KEY = "PF_KEY"
  1645. const m_AF_LLC = "PF_LLC"
  1646. const m_AF_LOCAL = "PF_LOCAL"
  1647. const m_AF_MAX = "PF_MAX"
  1648. const m_AF_MPLS = "PF_MPLS"
  1649. const m_AF_NETBEUI = "PF_NETBEUI"
  1650. const m_AF_NETLINK = "PF_NETLINK"
  1651. const m_AF_NETROM = "PF_NETROM"
  1652. const m_AF_NFC = "PF_NFC"
  1653. const m_AF_PACKET = "PF_PACKET"
  1654. const m_AF_PHONET = "PF_PHONET"
  1655. const m_AF_PPPOX = "PF_PPPOX"
  1656. const m_AF_QIPCRTR = "PF_QIPCRTR"
  1657. const m_AF_RDS = "PF_RDS"
  1658. const m_AF_ROSE = "PF_ROSE"
  1659. const m_AF_ROUTE = "PF_ROUTE"
  1660. const m_AF_RXRPC = "PF_RXRPC"
  1661. const m_AF_SECURITY = "PF_SECURITY"
  1662. const m_AF_SMC = "PF_SMC"
  1663. const m_AF_SNA = "PF_SNA"
  1664. const m_AF_TIPC = "PF_TIPC"
  1665. const m_AF_UNIX = "AF_LOCAL"
  1666. const m_AF_UNSPEC = "PF_UNSPEC"
  1667. const m_AF_VSOCK = "PF_VSOCK"
  1668. const m_AF_WANPIPE = "PF_WANPIPE"
  1669. const m_AF_X25 = "PF_X25"
  1670. const m_AF_XDP = "PF_XDP"
  1671. const m_MSG_BATCH = 0x40000
  1672. const m_MSG_CMSG_CLOEXEC = 0x40000000
  1673. const m_MSG_CONFIRM = 0x0800
  1674. const m_MSG_CTRUNC = 0x0008
  1675. const m_MSG_DONTROUTE = 0x0004
  1676. const m_MSG_DONTWAIT = 0x0040
  1677. const m_MSG_EOR = 0x0080
  1678. const m_MSG_ERRQUEUE = 0x2000
  1679. const m_MSG_FASTOPEN = 0x20000000
  1680. const m_MSG_FIN = 0x0200
  1681. const m_MSG_MORE = 0x8000
  1682. const m_MSG_NOSIGNAL = 0x4000
  1683. const m_MSG_OOB = 0x0001
  1684. const m_MSG_PEEK = 0x0002
  1685. const m_MSG_PROXY = 0x0010
  1686. const m_MSG_RST = 0x1000
  1687. const m_MSG_SYN = 0x0400
  1688. const m_MSG_TRUNC = 0x0020
  1689. const m_MSG_WAITALL = 0x0100
  1690. const m_MSG_WAITFORONE = 0x10000
  1691. const m_MSG_ZEROCOPY = 0x4000000
  1692. const m_PF_ALG = 38
  1693. const m_PF_APPLETALK = 5
  1694. const m_PF_ASH = 18
  1695. const m_PF_ATMPVC = 8
  1696. const m_PF_ATMSVC = 20
  1697. const m_PF_AX25 = 3
  1698. const m_PF_BLUETOOTH = 31
  1699. const m_PF_BRIDGE = 7
  1700. const m_PF_CAIF = 37
  1701. const m_PF_CAN = 29
  1702. const m_PF_DECnet = 12
  1703. const m_PF_ECONET = 19
  1704. const m_PF_FILE = "PF_LOCAL"
  1705. const m_PF_IB = 27
  1706. const m_PF_IEEE802154 = 36
  1707. const m_PF_INET = 2
  1708. const m_PF_INET6 = 10
  1709. const m_PF_IPX = 4
  1710. const m_PF_IRDA = 23
  1711. const m_PF_ISDN = 34
  1712. const m_PF_IUCV = 32
  1713. const m_PF_KCM = 41
  1714. const m_PF_KEY = 15
  1715. const m_PF_LLC = 26
  1716. const m_PF_LOCAL = 1
  1717. const m_PF_MAX = 45
  1718. const m_PF_MPLS = 28
  1719. const m_PF_NETBEUI = 13
  1720. const m_PF_NETLINK = 16
  1721. const m_PF_NETROM = 6
  1722. const m_PF_NFC = 39
  1723. const m_PF_PACKET = 17
  1724. const m_PF_PHONET = 35
  1725. const m_PF_PPPOX = 24
  1726. const m_PF_QIPCRTR = 42
  1727. const m_PF_RDS = 21
  1728. const m_PF_ROSE = 11
  1729. const m_PF_ROUTE = "PF_NETLINK"
  1730. const m_PF_RXRPC = 33
  1731. const m_PF_SECURITY = 14
  1732. const m_PF_SMC = 43
  1733. const m_PF_SNA = 22
  1734. const m_PF_TIPC = 30
  1735. const m_PF_UNIX = "PF_LOCAL"
  1736. const m_PF_UNSPEC = 0
  1737. const m_PF_VSOCK = 40
  1738. const m_PF_WANPIPE = 25
  1739. const m_PF_X25 = 9
  1740. const m_PF_XDP = 44
  1741. const m_SCM_CREDENTIALS = 0x02
  1742. const m_SCM_RIGHTS = 0x01
  1743. const m_SCM_TIMESTAMP = "SO_TIMESTAMP"
  1744. const m_SCM_TIMESTAMPING = "SO_TIMESTAMPING"
  1745. const m_SCM_TIMESTAMPING_OPT_STATS = 54
  1746. const m_SCM_TIMESTAMPING_PKTINFO = 58
  1747. const m_SCM_TIMESTAMPNS = "SO_TIMESTAMPNS"
  1748. const m_SCM_TXTIME = "SO_TXTIME"
  1749. const m_SCM_WIFI_STATUS = "SO_WIFI_STATUS"
  1750. const m_SHUT_RD = 0
  1751. const m_SHUT_RDWR = 2
  1752. const m_SHUT_WR = 1
  1753. const m_SOCK_CLOEXEC = 02000000
  1754. const m_SOCK_DCCP = 6
  1755. const m_SOCK_DGRAM = 2
  1756. const m_SOCK_NONBLOCK = 04000
  1757. const m_SOCK_PACKET = 10
  1758. const m_SOCK_RAW = 3
  1759. const m_SOCK_RDM = 4
  1760. const m_SOCK_SEQPACKET = 5
  1761. const m_SOCK_STREAM = 1
  1762. const m_SOL_AAL = 265
  1763. const m_SOL_ALG = 279
  1764. const m_SOL_ATM = 264
  1765. const m_SOL_BLUETOOTH = 274
  1766. const m_SOL_CAIF = 278
  1767. const m_SOL_DCCP = 269
  1768. const m_SOL_DECNET = 261
  1769. const m_SOL_ICMPV6 = 58
  1770. const m_SOL_IP = 0
  1771. const m_SOL_IPV6 = 41
  1772. const m_SOL_IRDA = 266
  1773. const m_SOL_IUCV = 277
  1774. const m_SOL_KCM = 281
  1775. const m_SOL_LLC = 268
  1776. const m_SOL_NETBEUI = 267
  1777. const m_SOL_NETLINK = 270
  1778. const m_SOL_NFC = 280
  1779. const m_SOL_PACKET = 263
  1780. const m_SOL_PNPIPE = 275
  1781. const m_SOL_PPPOL2TP = 273
  1782. const m_SOL_RAW = 255
  1783. const m_SOL_RDS = 276
  1784. const m_SOL_RXRPC = 272
  1785. const m_SOL_SOCKET = 1
  1786. const m_SOL_TIPC = 271
  1787. const m_SOL_TLS = 282
  1788. const m_SOL_X25 = 262
  1789. const m_SOL_XDP = 283
  1790. const m_SOMAXCONN = 128
  1791. const m_SO_ACCEPTCONN = 30
  1792. const m_SO_ATTACH_BPF = 50
  1793. const m_SO_ATTACH_FILTER = 26
  1794. const m_SO_ATTACH_REUSEPORT_CBPF = 51
  1795. const m_SO_ATTACH_REUSEPORT_EBPF = 52
  1796. const m_SO_BINDTODEVICE = 25
  1797. const m_SO_BINDTOIFINDEX = 62
  1798. const m_SO_BPF_EXTENSIONS = 48
  1799. const m_SO_BROADCAST = 6
  1800. const m_SO_BSDCOMPAT = 14
  1801. const m_SO_BUSY_POLL = 46
  1802. const m_SO_BUSY_POLL_BUDGET = 70
  1803. const m_SO_CNX_ADVICE = 53
  1804. const m_SO_COOKIE = 57
  1805. const m_SO_DEBUG = 1
  1806. const m_SO_DETACH_BPF = "SO_DETACH_FILTER"
  1807. const m_SO_DETACH_FILTER = 27
  1808. const m_SO_DETACH_REUSEPORT_BPF = 68
  1809. const m_SO_DOMAIN = 39
  1810. const m_SO_DONTROUTE = 5
  1811. const m_SO_ERROR = 4
  1812. const m_SO_GET_FILTER = "SO_ATTACH_FILTER"
  1813. const m_SO_INCOMING_CPU = 49
  1814. const m_SO_INCOMING_NAPI_ID = 56
  1815. const m_SO_KEEPALIVE = 9
  1816. const m_SO_LINGER = 13
  1817. const m_SO_LOCK_FILTER = 44
  1818. const m_SO_MARK = 36
  1819. const m_SO_MAX_PACING_RATE = 47
  1820. const m_SO_MEMINFO = 55
  1821. const m_SO_NOFCS = 43
  1822. const m_SO_NO_CHECK = 11
  1823. const m_SO_OOBINLINE = 10
  1824. const m_SO_PASSCRED = 16
  1825. const m_SO_PASSSEC = 34
  1826. const m_SO_PEEK_OFF = 42
  1827. const m_SO_PEERCRED = 17
  1828. const m_SO_PEERGROUPS = 59
  1829. const m_SO_PEERNAME = 28
  1830. const m_SO_PEERSEC = 31
  1831. const m_SO_PREFER_BUSY_POLL = 69
  1832. const m_SO_PRIORITY = 12
  1833. const m_SO_PROTOCOL = 38
  1834. const m_SO_RCVBUF = 8
  1835. const m_SO_RCVBUFFORCE = 33
  1836. const m_SO_RCVLOWAT = 18
  1837. const m_SO_RCVTIMEO = 20
  1838. const m_SO_REUSEADDR = 2
  1839. const m_SO_REUSEPORT = 15
  1840. const m_SO_RXQ_OVFL = 40
  1841. const m_SO_SECURITY_AUTHENTICATION = 22
  1842. const m_SO_SECURITY_ENCRYPTION_NETWORK = 24
  1843. const m_SO_SECURITY_ENCRYPTION_TRANSPORT = 23
  1844. const m_SO_SELECT_ERR_QUEUE = 45
  1845. const m_SO_SNDBUF = 7
  1846. const m_SO_SNDBUFFORCE = 32
  1847. const m_SO_SNDLOWAT = 19
  1848. const m_SO_SNDTIMEO = 21
  1849. const m_SO_TIMESTAMP = 29
  1850. const m_SO_TIMESTAMPING = 37
  1851. const m_SO_TIMESTAMPNS = 35
  1852. const m_SO_TXTIME = 61
  1853. const m_SO_TYPE = 3
  1854. const m_SO_WIFI_STATUS = 41
  1855. const m_SO_ZEROCOPY = 60
  1856. type Tsocklen_t = uint32
  1857. type Tsa_family_t = uint16
  1858. type Tmsghdr = struct {
  1859. Fmsg_name uintptr
  1860. Fmsg_namelen Tsocklen_t
  1861. Fmsg_iov uintptr
  1862. Fmsg_iovlen int32
  1863. F__pad1 int32
  1864. Fmsg_control uintptr
  1865. Fmsg_controllen Tsocklen_t
  1866. F__pad2 int32
  1867. Fmsg_flags int32
  1868. }
  1869. type Tcmsghdr = struct {
  1870. Fcmsg_len Tsocklen_t
  1871. F__pad1 int32
  1872. Fcmsg_level int32
  1873. Fcmsg_type int32
  1874. }
  1875. type Tucred = struct {
  1876. Fpid Tpid_t
  1877. Fuid Tuid_t
  1878. Fgid Tgid_t
  1879. }
  1880. type Tmmsghdr = struct {
  1881. Fmsg_hdr Tmsghdr
  1882. Fmsg_len uint32
  1883. }
  1884. type Tlinger = struct {
  1885. Fl_onoff int32
  1886. Fl_linger int32
  1887. }
  1888. type Tsockaddr = struct {
  1889. Fsa_family Tsa_family_t
  1890. Fsa_data [14]uint8
  1891. }
  1892. type Tsockaddr_storage = struct {
  1893. Fss_family Tsa_family_t
  1894. F__ss_padding [118]uint8
  1895. F__ss_align uint64
  1896. }
  1897. func XXdmcpFill(tls *libc.TLS, fd int32, buffer TXdmcpBufferPtr, from TXdmcpNetaddr, fromlen uintptr) (r int32) {
  1898. var newBuf uintptr
  1899. _ = newBuf
  1900. if (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize < int32(m_XDM_MAX_MSGLEN) {
  1901. newBuf = libc.Xmalloc(tls, uint64(m_XDM_MAX_MSGLEN))
  1902. if newBuf != 0 {
  1903. libc.Xfree(tls, (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata)
  1904. (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata = newBuf
  1905. (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize = int32(m_XDM_MAX_MSGLEN)
  1906. }
  1907. }
  1908. (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer = 0
  1909. (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount = int32(libc.Xrecvfrom(tls, fd, (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata, libc.Uint64FromInt32((*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize), 0, from, fromlen))
  1910. if (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount < int32(6) {
  1911. (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount = 0
  1912. return m_FALSE
  1913. }
  1914. return int32(m_TRUE)
  1915. }
  1916. func XXdmcpFlush(tls *libc.TLS, fd int32, buffer TXdmcpBufferPtr, to TXdmcpNetaddr, tolen int32) (r int32) {
  1917. var result int32
  1918. _ = result
  1919. result = int32(libc.Xsendto(tls, fd, (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata, libc.Uint64FromInt32((*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer), 0, to, libc.Uint32FromInt32(tolen)))
  1920. if result != (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer {
  1921. return m_FALSE
  1922. }
  1923. return int32(m_TRUE)
  1924. }
  1925. const m_Time_t = "time_t"
  1926. const m_random = "lrand48"
  1927. const m_srandom = "srand48"
  1928. func XXdmcpGenerateKey(tls *libc.TLS, key TXdmAuthKeyPtr) {
  1929. libbsd.Xarc4random_buf(tls, key, libc.Uint64FromInt32(8))
  1930. }
  1931. func XXdmcpCompareKeys(tls *libc.TLS, a TXdmAuthKeyPtr, b TXdmAuthKeyPtr) (r int32) {
  1932. var i int32
  1933. _ = i
  1934. i = 0
  1935. for {
  1936. if !(i < int32(8)) {
  1937. break
  1938. }
  1939. if libc.Int32FromUint8(*(*TBYTE)(unsafe.Pointer(a + uintptr(i)))) != libc.Int32FromUint8(*(*TBYTE)(unsafe.Pointer(b + uintptr(i)))) {
  1940. return m_FALSE
  1941. }
  1942. goto _1
  1943. _1:
  1944. ;
  1945. i++
  1946. }
  1947. return int32(m_TRUE)
  1948. }
  1949. func XXdmcpIncrementKey(tls *libc.TLS, key TXdmAuthKeyPtr) {
  1950. var i, v3 int32
  1951. var v1 TBYTE
  1952. var v2 uintptr
  1953. _, _, _, _ = i, v1, v2, v3
  1954. i = int32(7)
  1955. for {
  1956. v2 = key + uintptr(i)
  1957. *(*TBYTE)(unsafe.Pointer(v2))++
  1958. v1 = *(*TBYTE)(unsafe.Pointer(v2))
  1959. if !(libc.Int32FromUint8(v1) == 0) {
  1960. break
  1961. }
  1962. i--
  1963. v3 = i
  1964. if v3 < 0 {
  1965. break
  1966. }
  1967. }
  1968. }
  1969. func XXdmcpDecrementKey(tls *libc.TLS, key TXdmAuthKeyPtr) {
  1970. var i, v3 int32
  1971. var v1 TBYTE
  1972. var v2 uintptr
  1973. _, _, _, _ = i, v1, v2, v3
  1974. i = int32(7)
  1975. for {
  1976. v2 = key + uintptr(i)
  1977. v1 = *(*TBYTE)(unsafe.Pointer(v2))
  1978. *(*TBYTE)(unsafe.Pointer(v2))--
  1979. if !(libc.Int32FromUint8(v1) == 0) {
  1980. break
  1981. }
  1982. i--
  1983. v3 = i
  1984. if v3 < 0 {
  1985. break
  1986. }
  1987. }
  1988. }
  1989. func XXdmcpReadHeader(tls *libc.TLS, buffer TXdmcpBufferPtr, header TXdmcpHeaderPtr) (r int32) {
  1990. if XXdmcpReadCARD16(tls, buffer, header) != 0 && XXdmcpReadCARD16(tls, buffer, header+2) != 0 && XXdmcpReadCARD16(tls, buffer, header+4) != 0 {
  1991. return int32(m_TRUE)
  1992. }
  1993. return m_FALSE
  1994. }
  1995. func XXdmcpReadRemaining(tls *libc.TLS, buffer TXdmcpBufferPtr) (r int32) {
  1996. return (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount - (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer
  1997. }
  1998. func XXdmcpReadARRAY8(tls *libc.TLS, buffer TXdmcpBufferPtr, array TARRAY8Ptr) (r int32) {
  1999. var i int32
  2000. _ = i
  2001. /*
  2002. * When returning FALSE, guarantee that array->data = 0.
  2003. * This allows the user to safely call XdmcpDisposeARRAY8(array)
  2004. * regardless of the return value below.
  2005. * Note that XdmcpDisposeARRAY*(array) will call free(array->data),
  2006. * so we must guarantee that array->data is NULL or a malloced pointer.
  2007. */
  2008. if !(XXdmcpReadCARD16(tls, buffer, array) != 0) {
  2009. (*T_ARRAY8)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2010. return m_FALSE
  2011. }
  2012. if !((*T_ARRAY8)(unsafe.Pointer(array)).Flength != 0) {
  2013. (*T_ARRAY8)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2014. return int32(m_TRUE)
  2015. }
  2016. (*T_ARRAY8)(unsafe.Pointer(array)).Fdata = libc.Xmalloc(tls, uint64((*T_ARRAY8)(unsafe.Pointer(array)).Flength)*uint64(1))
  2017. if !((*T_ARRAY8)(unsafe.Pointer(array)).Fdata != 0) {
  2018. return m_FALSE
  2019. }
  2020. i = 0
  2021. for {
  2022. if !(i < libc.Int32FromUint16((*T_ARRAY8)(unsafe.Pointer(array)).Flength)) {
  2023. break
  2024. }
  2025. if !(XXdmcpReadCARD8(tls, buffer, (*T_ARRAY8)(unsafe.Pointer(array)).Fdata+uintptr(i)) != 0) {
  2026. libc.Xfree(tls, (*T_ARRAY8)(unsafe.Pointer(array)).Fdata)
  2027. (*T_ARRAY8)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2028. (*T_ARRAY8)(unsafe.Pointer(array)).Flength = uint16(0)
  2029. return m_FALSE
  2030. }
  2031. goto _1
  2032. _1:
  2033. ;
  2034. i++
  2035. }
  2036. return int32(m_TRUE)
  2037. }
  2038. func XXdmcpReadARRAY16(tls *libc.TLS, buffer TXdmcpBufferPtr, array TARRAY16Ptr) (r int32) {
  2039. var i int32
  2040. _ = i
  2041. /*
  2042. * When returning FALSE, guarantee that array->data = 0.
  2043. * This allows the user to safely call XdmcpDisposeARRAY16(array)
  2044. * regardless of the return value below.
  2045. * Note that XdmcpDisposeARRAY*(array) will call free(array->data),
  2046. * so we must guarantee that array->data is NULL or a malloced pointer.
  2047. */
  2048. if !(XXdmcpReadCARD8(tls, buffer, array) != 0) {
  2049. (*T_ARRAY16)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2050. return m_FALSE
  2051. }
  2052. if !((*T_ARRAY16)(unsafe.Pointer(array)).Flength != 0) {
  2053. (*T_ARRAY16)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2054. return int32(m_TRUE)
  2055. }
  2056. (*T_ARRAY16)(unsafe.Pointer(array)).Fdata = libc.Xmalloc(tls, uint64((*T_ARRAY16)(unsafe.Pointer(array)).Flength)*uint64(2))
  2057. if !((*T_ARRAY16)(unsafe.Pointer(array)).Fdata != 0) {
  2058. return m_FALSE
  2059. }
  2060. i = 0
  2061. for {
  2062. if !(i < libc.Int32FromUint8((*T_ARRAY16)(unsafe.Pointer(array)).Flength)) {
  2063. break
  2064. }
  2065. if !(XXdmcpReadCARD16(tls, buffer, (*T_ARRAY16)(unsafe.Pointer(array)).Fdata+uintptr(i)*2) != 0) {
  2066. libc.Xfree(tls, (*T_ARRAY16)(unsafe.Pointer(array)).Fdata)
  2067. (*T_ARRAY16)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2068. (*T_ARRAY16)(unsafe.Pointer(array)).Flength = uint8(0)
  2069. return m_FALSE
  2070. }
  2071. goto _1
  2072. _1:
  2073. ;
  2074. i++
  2075. }
  2076. return int32(m_TRUE)
  2077. }
  2078. func XXdmcpReadARRAY32(tls *libc.TLS, buffer TXdmcpBufferPtr, array TARRAY32Ptr) (r int32) {
  2079. var i int32
  2080. _ = i
  2081. /*
  2082. * When returning FALSE, guarantee that array->data = 0.
  2083. * This allows the user to safely call XdmcpDisposeARRAY32(array)
  2084. * regardless of the return value below.
  2085. * Note that XdmcpDisposeARRAY*(array) will call free(array->data),
  2086. * so we must guarantee that array->data is NULL or a malloced pointer.
  2087. */
  2088. if !(XXdmcpReadCARD8(tls, buffer, array) != 0) {
  2089. (*T_ARRAY32)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2090. return m_FALSE
  2091. }
  2092. if !((*T_ARRAY32)(unsafe.Pointer(array)).Flength != 0) {
  2093. (*T_ARRAY32)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2094. return int32(m_TRUE)
  2095. }
  2096. (*T_ARRAY32)(unsafe.Pointer(array)).Fdata = libc.Xmalloc(tls, uint64((*T_ARRAY32)(unsafe.Pointer(array)).Flength)*uint64(4))
  2097. if !((*T_ARRAY32)(unsafe.Pointer(array)).Fdata != 0) {
  2098. return m_FALSE
  2099. }
  2100. i = 0
  2101. for {
  2102. if !(i < libc.Int32FromUint8((*T_ARRAY32)(unsafe.Pointer(array)).Flength)) {
  2103. break
  2104. }
  2105. if !(XXdmcpReadCARD32(tls, buffer, (*T_ARRAY32)(unsafe.Pointer(array)).Fdata+uintptr(i)*4) != 0) {
  2106. libc.Xfree(tls, (*T_ARRAY32)(unsafe.Pointer(array)).Fdata)
  2107. (*T_ARRAY32)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2108. (*T_ARRAY32)(unsafe.Pointer(array)).Flength = uint8(0)
  2109. return m_FALSE
  2110. }
  2111. goto _1
  2112. _1:
  2113. ;
  2114. i++
  2115. }
  2116. return int32(m_TRUE)
  2117. }
  2118. func XXdmcpReadARRAYofARRAY8(tls *libc.TLS, buffer TXdmcpBufferPtr, array TARRAYofARRAY8Ptr) (r int32) {
  2119. var i TCARD8
  2120. _ = i
  2121. /*
  2122. * When returning FALSE, guarantee that array->data = 0.
  2123. * This allows the user to safely call XdmcpDisposeARRAYofARRAY8(array)
  2124. * regardless of the return value below.
  2125. * Note that XdmcpDisposeARRAY*(array) will call free(array->data),
  2126. * so we must guarantee that array->data is NULL or a malloced pointer.
  2127. */
  2128. if !(XXdmcpReadCARD8(tls, buffer, array) != 0) {
  2129. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2130. return m_FALSE
  2131. }
  2132. if !((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength != 0) {
  2133. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = libc.UintptrFromInt32(0)
  2134. return int32(m_TRUE)
  2135. }
  2136. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = libc.Xmalloc(tls, uint64((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength)*uint64(16))
  2137. if !((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata != 0) {
  2138. return m_FALSE
  2139. }
  2140. i = uint8(0)
  2141. for {
  2142. if !(libc.Int32FromUint8(i) < libc.Int32FromUint8((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength)) {
  2143. break
  2144. }
  2145. if !(XXdmcpReadARRAY8(tls, buffer, (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata+uintptr(i)*16) != 0) {
  2146. /*
  2147. * We must free all of the arrays allocated thus far in the loop
  2148. * and free array->data and finally set array->data = 0;
  2149. * The easiest way to do this is to reset the length and call
  2150. * XdmcpDisposeARRAYofARRAY8(array).
  2151. */
  2152. (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = i
  2153. XXdmcpDisposeARRAYofARRAY8(tls, array)
  2154. return m_FALSE
  2155. }
  2156. goto _1
  2157. _1:
  2158. ;
  2159. i++
  2160. }
  2161. return int32(m_TRUE)
  2162. }
  2163. func XXdmcpReadCARD8(tls *libc.TLS, buffer TXdmcpBufferPtr, valuep TCARD8Ptr) (r int32) {
  2164. var v1 int32
  2165. var v2 uintptr
  2166. _, _ = v1, v2
  2167. if (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer >= (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount {
  2168. return m_FALSE
  2169. }
  2170. v2 = buffer + 12
  2171. v1 = *(*int32)(unsafe.Pointer(v2))
  2172. *(*int32)(unsafe.Pointer(v2))++
  2173. *(*TCARD8)(unsafe.Pointer(valuep)) = *(*TBYTE)(unsafe.Pointer((*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata + uintptr(v1)))
  2174. return int32(m_TRUE)
  2175. }
  2176. func XXdmcpReadCARD16(tls *libc.TLS, buffer TXdmcpBufferPtr, valuep TCARD16Ptr) (r int32) {
  2177. bp := tls.Alloc(16)
  2178. defer tls.Free(16)
  2179. var _ /* high at bp+0 */ TCARD8
  2180. var _ /* low at bp+1 */ TCARD8
  2181. if XXdmcpReadCARD8(tls, buffer, bp) != 0 && XXdmcpReadCARD8(tls, buffer, bp+1) != 0 {
  2182. *(*TCARD16)(unsafe.Pointer(valuep)) = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(*(*TCARD8)(unsafe.Pointer(bp))))<<int32(8) | libc.Int32FromUint16(uint16(*(*TCARD8)(unsafe.Pointer(bp + 1)))))
  2183. return int32(m_TRUE)
  2184. }
  2185. return m_FALSE
  2186. }
  2187. func XXdmcpReadCARD32(tls *libc.TLS, buffer TXdmcpBufferPtr, valuep TCARD32Ptr) (r int32) {
  2188. bp := tls.Alloc(16)
  2189. defer tls.Free(16)
  2190. var _ /* byte0 at bp+0 */ TCARD8
  2191. var _ /* byte1 at bp+1 */ TCARD8
  2192. var _ /* byte2 at bp+2 */ TCARD8
  2193. var _ /* byte3 at bp+3 */ TCARD8
  2194. if XXdmcpReadCARD8(tls, buffer, bp) != 0 && XXdmcpReadCARD8(tls, buffer, bp+1) != 0 && XXdmcpReadCARD8(tls, buffer, bp+2) != 0 && XXdmcpReadCARD8(tls, buffer, bp+3) != 0 {
  2195. *(*TCARD32)(unsafe.Pointer(valuep)) = uint32(*(*TCARD8)(unsafe.Pointer(bp)))<<libc.Int32FromInt32(24) | uint32(*(*TCARD8)(unsafe.Pointer(bp + 1)))<<libc.Int32FromInt32(16) | uint32(*(*TCARD8)(unsafe.Pointer(bp + 2)))<<libc.Int32FromInt32(8) | uint32(*(*TCARD8)(unsafe.Pointer(bp + 3)))
  2196. return int32(m_TRUE)
  2197. }
  2198. return m_FALSE
  2199. }
  2200. type Tauth_cblock = [8]uint8
  2201. type Tauth_wrapper_schedule = [16]Tauth_ks_struct
  2202. type Tauth_ks_struct = struct {
  2203. F_1 Tauth_cblock
  2204. }
  2205. func XXdmcpUnwrap(tls *libc.TLS, input uintptr, wrapper uintptr, output uintptr, bytes int32) {
  2206. bp := tls.Alloc(160)
  2207. defer tls.Free(160)
  2208. var i, j, k, v3 int32
  2209. var _ /* blocks at bp+8 */ [2][8]uint8
  2210. var _ /* expand_wrapper at bp+24 */ [8]uint8
  2211. var _ /* schedule at bp+32 */ Tauth_wrapper_schedule
  2212. var _ /* tmp at bp+0 */ [8]uint8
  2213. _, _, _, _ = i, j, k, v3
  2214. X_XdmcpWrapperToOddParity(tls, wrapper, bp+24)
  2215. X_XdmcpAuthSetup(tls, bp+24, bp+32)
  2216. k = 0
  2217. j = 0
  2218. for {
  2219. if !(j < bytes) {
  2220. break
  2221. }
  2222. if bytes-j < int32(8) {
  2223. return
  2224. } /* bad input length */
  2225. i = 0
  2226. for {
  2227. if !(i < int32(8)) {
  2228. break
  2229. }
  2230. *(*uint8)(unsafe.Pointer(bp + 8 + uintptr(k)*8 + uintptr(i))) = *(*uint8)(unsafe.Pointer(input + uintptr(j+i)))
  2231. goto _2
  2232. _2:
  2233. ;
  2234. i++
  2235. }
  2236. X_XdmcpAuthDoIt(tls, input+uintptr(j), bp, bp+32, 0)
  2237. /* block chaining */
  2238. if k == 0 {
  2239. v3 = int32(1)
  2240. } else {
  2241. v3 = 0
  2242. }
  2243. k = v3
  2244. i = 0
  2245. for {
  2246. if !(i < int32(8)) {
  2247. break
  2248. }
  2249. if j == 0 {
  2250. *(*uint8)(unsafe.Pointer(output + uintptr(j+i))) = (*(*[8]uint8)(unsafe.Pointer(bp)))[i]
  2251. } else {
  2252. *(*uint8)(unsafe.Pointer(output + uintptr(j+i))) = libc.Uint8FromInt32(libc.Int32FromUint8((*(*[8]uint8)(unsafe.Pointer(bp)))[i]) ^ libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 8 + uintptr(k)*8 + uintptr(i)))))
  2253. }
  2254. goto _4
  2255. _4:
  2256. ;
  2257. i++
  2258. }
  2259. goto _1
  2260. _1:
  2261. ;
  2262. j += int32(8)
  2263. }
  2264. }
  2265. func XXdmcpWrap(tls *libc.TLS, input uintptr, wrapper uintptr, output uintptr, bytes int32) {
  2266. bp := tls.Alloc(144)
  2267. defer tls.Free(144)
  2268. var i, j, len1 int32
  2269. var _ /* expand_wrapper at bp+8 */ [8]uint8
  2270. var _ /* schedule at bp+16 */ Tauth_wrapper_schedule
  2271. var _ /* tmp at bp+0 */ [8]uint8
  2272. _, _, _ = i, j, len1
  2273. X_XdmcpWrapperToOddParity(tls, wrapper, bp+8)
  2274. X_XdmcpAuthSetup(tls, bp+8, bp+16)
  2275. j = 0
  2276. for {
  2277. if !(j < bytes) {
  2278. break
  2279. }
  2280. len1 = int32(8)
  2281. if bytes-j < len1 {
  2282. len1 = bytes - j
  2283. }
  2284. /* block chaining */
  2285. i = 0
  2286. for {
  2287. if !(i < len1) {
  2288. break
  2289. }
  2290. if j == 0 {
  2291. (*(*[8]uint8)(unsafe.Pointer(bp)))[i] = *(*uint8)(unsafe.Pointer(input + uintptr(i)))
  2292. } else {
  2293. (*(*[8]uint8)(unsafe.Pointer(bp)))[i] = libc.Uint8FromInt32(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(input + uintptr(j+i)))) ^ libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(output + uintptr(j-int32(8)+i)))))
  2294. }
  2295. goto _2
  2296. _2:
  2297. ;
  2298. i++
  2299. }
  2300. for {
  2301. if !(i < int32(8)) {
  2302. break
  2303. }
  2304. if j == 0 {
  2305. (*(*[8]uint8)(unsafe.Pointer(bp)))[i] = uint8(0)
  2306. } else {
  2307. (*(*[8]uint8)(unsafe.Pointer(bp)))[i] = libc.Uint8FromInt32(0 ^ libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(output + uintptr(j-int32(8)+i)))))
  2308. }
  2309. goto _3
  2310. _3:
  2311. ;
  2312. i++
  2313. }
  2314. X_XdmcpAuthDoIt(tls, bp, output+uintptr(j), bp+16, int32(1))
  2315. goto _1
  2316. _1:
  2317. ;
  2318. j += int32(8)
  2319. }
  2320. }
  2321. /*
  2322. * Given a 56 bit wrapper in XDMCP format, create a 56
  2323. * bit wrapper in 7-bits + odd parity format
  2324. */
  2325. func _OddParity(tls *libc.TLS, c uint8) (r int32) {
  2326. c = libc.Uint8FromInt32(libc.Int32FromUint8(c) ^ libc.Int32FromUint8(c)>>int32(4))
  2327. c = libc.Uint8FromInt32(libc.Int32FromUint8(c) ^ libc.Int32FromUint8(c)>>int32(2))
  2328. c = libc.Uint8FromInt32(libc.Int32FromUint8(c) ^ libc.Int32FromUint8(c)>>int32(1))
  2329. return ^libc.Int32FromUint8(c) & int32(0x1)
  2330. }
  2331. /*
  2332. * Spread the 56 bit wrapper among 8 bytes, using the upper 7 bits
  2333. * of each byte, and storing an odd parity bit in the low bit
  2334. */
  2335. func X_XdmcpWrapperToOddParity(tls *libc.TLS, in uintptr, out uintptr) {
  2336. var ashift, bshift, i int32
  2337. var c uint8
  2338. _, _, _, _ = ashift, bshift, c, i
  2339. ashift = int32(7)
  2340. bshift = int32(1)
  2341. i = 0
  2342. for {
  2343. if !(i < int32(7)) {
  2344. break
  2345. }
  2346. c = libc.Uint8FromInt32((libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(in + uintptr(i))))<<ashift | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(in + uintptr(i+int32(1)))))>>bshift) & int32(0x7f))
  2347. *(*uint8)(unsafe.Pointer(out + uintptr(i))) = libc.Uint8FromInt32(libc.Int32FromUint8(c)<<int32(1) | _OddParity(tls, c))
  2348. ashift--
  2349. bshift++
  2350. goto _1
  2351. _1:
  2352. ;
  2353. i++
  2354. }
  2355. c = *(*uint8)(unsafe.Pointer(in + uintptr(i)))
  2356. *(*uint8)(unsafe.Pointer(out + uintptr(i))) = libc.Uint8FromInt32(libc.Int32FromUint8(c)<<int32(1) | _OddParity(tls, c))
  2357. }
  2358. func XXdmcpWriteHeader(tls *libc.TLS, buffer TXdmcpBufferPtr, header TXdmcpHeaderPtr) (r int32) {
  2359. var newData uintptr
  2360. _ = newData
  2361. if (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize < int32(6)+libc.Int32FromUint16((*T_XdmcpHeader)(unsafe.Pointer(header)).Flength) {
  2362. newData = libc.Xmalloc(tls, libc.Uint64FromInt32(m_XDM_MAX_MSGLEN)*libc.Uint64FromInt64(1))
  2363. if !(newData != 0) {
  2364. return m_FALSE
  2365. }
  2366. libc.Xfree(tls, (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata)
  2367. (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata = newData
  2368. (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize = int32(m_XDM_MAX_MSGLEN)
  2369. }
  2370. (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer = 0
  2371. if !(XXdmcpWriteCARD16(tls, buffer, uint32((*T_XdmcpHeader)(unsafe.Pointer(header)).Fversion)) != 0) {
  2372. return m_FALSE
  2373. }
  2374. if !(XXdmcpWriteCARD16(tls, buffer, uint32((*T_XdmcpHeader)(unsafe.Pointer(header)).Fopcode)) != 0) {
  2375. return m_FALSE
  2376. }
  2377. if !(XXdmcpWriteCARD16(tls, buffer, uint32((*T_XdmcpHeader)(unsafe.Pointer(header)).Flength)) != 0) {
  2378. return m_FALSE
  2379. }
  2380. return int32(m_TRUE)
  2381. }
  2382. func XXdmcpWriteARRAY8(tls *libc.TLS, buffer TXdmcpBufferPtr, array TARRAY8Ptr) (r int32) {
  2383. var i int32
  2384. _ = i
  2385. if !(XXdmcpWriteCARD16(tls, buffer, uint32((*T_ARRAY8)(unsafe.Pointer(array)).Flength)) != 0) {
  2386. return m_FALSE
  2387. }
  2388. i = 0
  2389. for {
  2390. if !(i < libc.Int32FromUint16((*T_ARRAY8)(unsafe.Pointer(array)).Flength)) {
  2391. break
  2392. }
  2393. if !(XXdmcpWriteCARD8(tls, buffer, uint32(*(*TCARD8)(unsafe.Pointer((*T_ARRAY8)(unsafe.Pointer(array)).Fdata + uintptr(i))))) != 0) {
  2394. return m_FALSE
  2395. }
  2396. goto _1
  2397. _1:
  2398. ;
  2399. i++
  2400. }
  2401. return int32(m_TRUE)
  2402. }
  2403. func XXdmcpWriteARRAY16(tls *libc.TLS, buffer TXdmcpBufferPtr, array TARRAY16Ptr) (r int32) {
  2404. var i int32
  2405. _ = i
  2406. if !(XXdmcpWriteCARD8(tls, buffer, uint32((*T_ARRAY16)(unsafe.Pointer(array)).Flength)) != 0) {
  2407. return m_FALSE
  2408. }
  2409. i = 0
  2410. for {
  2411. if !(i < libc.Int32FromUint8((*T_ARRAY16)(unsafe.Pointer(array)).Flength)) {
  2412. break
  2413. }
  2414. if !(XXdmcpWriteCARD16(tls, buffer, uint32(*(*TCARD16)(unsafe.Pointer((*T_ARRAY16)(unsafe.Pointer(array)).Fdata + uintptr(i)*2)))) != 0) {
  2415. return m_FALSE
  2416. }
  2417. goto _1
  2418. _1:
  2419. ;
  2420. i++
  2421. }
  2422. return int32(m_TRUE)
  2423. }
  2424. func XXdmcpWriteARRAY32(tls *libc.TLS, buffer TXdmcpBufferPtr, array TARRAY32Ptr) (r int32) {
  2425. var i int32
  2426. _ = i
  2427. if !(XXdmcpWriteCARD8(tls, buffer, uint32((*T_ARRAY32)(unsafe.Pointer(array)).Flength)) != 0) {
  2428. return m_FALSE
  2429. }
  2430. i = 0
  2431. for {
  2432. if !(i < libc.Int32FromUint8((*T_ARRAY32)(unsafe.Pointer(array)).Flength)) {
  2433. break
  2434. }
  2435. if !(XXdmcpWriteCARD32(tls, buffer, *(*TCARD32)(unsafe.Pointer((*T_ARRAY32)(unsafe.Pointer(array)).Fdata + uintptr(i)*4))) != 0) {
  2436. return m_FALSE
  2437. }
  2438. goto _1
  2439. _1:
  2440. ;
  2441. i++
  2442. }
  2443. return int32(m_TRUE)
  2444. }
  2445. func XXdmcpWriteARRAYofARRAY8(tls *libc.TLS, buffer TXdmcpBufferPtr, array TARRAYofARRAY8Ptr) (r int32) {
  2446. var i int32
  2447. _ = i
  2448. if !(XXdmcpWriteCARD8(tls, buffer, uint32((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength)) != 0) {
  2449. return m_FALSE
  2450. }
  2451. i = 0
  2452. for {
  2453. if !(i < libc.Int32FromUint8((*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength)) {
  2454. break
  2455. }
  2456. if !(XXdmcpWriteARRAY8(tls, buffer, (*T_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata+uintptr(i)*16) != 0) {
  2457. return m_FALSE
  2458. }
  2459. goto _1
  2460. _1:
  2461. ;
  2462. i++
  2463. }
  2464. return int32(m_TRUE)
  2465. }
  2466. func XXdmcpWriteCARD8(tls *libc.TLS, buffer TXdmcpBufferPtr, value uint32) (r int32) {
  2467. var v1 int32
  2468. var v2 uintptr
  2469. _, _ = v1, v2
  2470. if (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer >= (*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize {
  2471. return m_FALSE
  2472. }
  2473. v2 = buffer + 12
  2474. v1 = *(*int32)(unsafe.Pointer(v2))
  2475. *(*int32)(unsafe.Pointer(v2))++
  2476. *(*TBYTE)(unsafe.Pointer((*T_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata + uintptr(v1))) = uint8(value)
  2477. return int32(m_TRUE)
  2478. }
  2479. func XXdmcpWriteCARD16(tls *libc.TLS, buffer TXdmcpBufferPtr, value uint32) (r int32) {
  2480. if !(XXdmcpWriteCARD8(tls, buffer, value>>int32(8)) != 0) {
  2481. return m_FALSE
  2482. }
  2483. if !(XXdmcpWriteCARD8(tls, buffer, value&uint32(0xff)) != 0) {
  2484. return m_FALSE
  2485. }
  2486. return int32(m_TRUE)
  2487. }
  2488. func XXdmcpWriteCARD32(tls *libc.TLS, buffer TXdmcpBufferPtr, value uint32) (r int32) {
  2489. if !(XXdmcpWriteCARD8(tls, buffer, value>>int32(24)) != 0) {
  2490. return m_FALSE
  2491. }
  2492. if !(XXdmcpWriteCARD8(tls, buffer, value>>int32(16)&uint32(0xff)) != 0) {
  2493. return m_FALSE
  2494. }
  2495. if !(XXdmcpWriteCARD8(tls, buffer, value>>int32(8)&uint32(0xff)) != 0) {
  2496. return m_FALSE
  2497. }
  2498. if !(XXdmcpWriteCARD8(tls, buffer, value&uint32(0xff)) != 0) {
  2499. return m_FALSE
  2500. }
  2501. return int32(m_TRUE)
  2502. }
  2503. const m_HALF_ITERATIONS = 8
  2504. const m_ITERATIONS = 16
  2505. /* des routines for non-usa - eay 10/9/1991 eay@psych.psy.uq.oz.au
  2506. * These routines were written for speed not size so they are bigger than
  2507. * needed. I have removed some of the loop unrolling, this will reduce
  2508. * code size at the expense of some speed.
  2509. * 25/9/1991 eay - much faster _XdmcpAuthSetup (4 times faster).
  2510. * 19/9/1991 eay - cleaned up the IP and FP code.
  2511. * 10/9/1991 eay - first release.
  2512. * The des routines this file has been made from can be found in
  2513. * ftp.psy.uq.oz.au /pub/DES
  2514. * This particular version derived from OpenBSD Revsion 1.3.
  2515. */
  2516. /*
  2517. *
  2518. * Export Requirements.
  2519. * You may not export or re-export this software or any copy or
  2520. * adaptation in violation of any applicable laws or regulations.
  2521. *
  2522. * Without limiting the generality of the foregoing, hardware, software,
  2523. * technology or services provided under this license agreement may not
  2524. * be exported, reexported, transferred or downloaded to or within (or to
  2525. * a national resident of) countries under U.S. economic embargo
  2526. * including the following countries:
  2527. *
  2528. * Cuba, Iran, Libya, North Korea, Sudan and Syria. This list is subject
  2529. * to change.
  2530. *
  2531. * Hardware, software, technology or services may not be exported,
  2532. * reexported, transferred or downloaded to persons or entities listed on
  2533. * the U.S. Department of Commerce Denied Persons List, Entity List of
  2534. * proliferation concern or on any U.S. Treasury Department Designated
  2535. * Nationals exclusion list, or to parties directly or indirectly
  2536. * involved in the development or production of nuclear, chemical,
  2537. * biological weapons or in missile technology programs as specified in
  2538. * the U.S. Export Administration Regulations (15 CFR 744).
  2539. *
  2540. * By accepting this license agreement you confirm that you are not
  2541. * located in (or a national resident of) any country under U.S. economic
  2542. * embargo, not identified on any U.S. Department of Commerce Denied
  2543. * Persons List, Entity List or Treasury Department Designated Nationals
  2544. * exclusion list, and not directly or indirectly involved in the
  2545. * development or production of nuclear, chemical, biological weapons or
  2546. * in missile technology programs as specified in the U.S. Export
  2547. * Administration Regulations.
  2548. *
  2549. *
  2550. * Local Country Import Requirements. The software you are about to
  2551. * download contains cryptography technology. Some countries regulate the
  2552. * import, use and/or export of certain products with cryptography. The
  2553. * X.org Foundation makes no claims as to the applicability of local
  2554. * country import, use and/or export regulations in relation to the
  2555. * download of this product. If you are located outside the U.S. and
  2556. * Canada you are advised to consult your local country regulations to
  2557. * insure compliance.
  2558. */
  2559. var _skb = [8][64]TCARD32{
  2560. 0: {
  2561. 1: uint32(0x00000010),
  2562. 2: uint32(0x20000000),
  2563. 3: uint32(0x20000010),
  2564. 4: uint32(0x00010000),
  2565. 5: uint32(0x00010010),
  2566. 6: uint32(0x20010000),
  2567. 7: uint32(0x20010010),
  2568. 8: uint32(0x00000800),
  2569. 9: uint32(0x00000810),
  2570. 10: uint32(0x20000800),
  2571. 11: uint32(0x20000810),
  2572. 12: uint32(0x00010800),
  2573. 13: uint32(0x00010810),
  2574. 14: uint32(0x20010800),
  2575. 15: uint32(0x20010810),
  2576. 16: uint32(0x00000020),
  2577. 17: uint32(0x00000030),
  2578. 18: uint32(0x20000020),
  2579. 19: uint32(0x20000030),
  2580. 20: uint32(0x00010020),
  2581. 21: uint32(0x00010030),
  2582. 22: uint32(0x20010020),
  2583. 23: uint32(0x20010030),
  2584. 24: uint32(0x00000820),
  2585. 25: uint32(0x00000830),
  2586. 26: uint32(0x20000820),
  2587. 27: uint32(0x20000830),
  2588. 28: uint32(0x00010820),
  2589. 29: uint32(0x00010830),
  2590. 30: uint32(0x20010820),
  2591. 31: uint32(0x20010830),
  2592. 32: uint32(0x00080000),
  2593. 33: uint32(0x00080010),
  2594. 34: uint32(0x20080000),
  2595. 35: uint32(0x20080010),
  2596. 36: uint32(0x00090000),
  2597. 37: uint32(0x00090010),
  2598. 38: uint32(0x20090000),
  2599. 39: uint32(0x20090010),
  2600. 40: uint32(0x00080800),
  2601. 41: uint32(0x00080810),
  2602. 42: uint32(0x20080800),
  2603. 43: uint32(0x20080810),
  2604. 44: uint32(0x00090800),
  2605. 45: uint32(0x00090810),
  2606. 46: uint32(0x20090800),
  2607. 47: uint32(0x20090810),
  2608. 48: uint32(0x00080020),
  2609. 49: uint32(0x00080030),
  2610. 50: uint32(0x20080020),
  2611. 51: uint32(0x20080030),
  2612. 52: uint32(0x00090020),
  2613. 53: uint32(0x00090030),
  2614. 54: uint32(0x20090020),
  2615. 55: uint32(0x20090030),
  2616. 56: uint32(0x00080820),
  2617. 57: uint32(0x00080830),
  2618. 58: uint32(0x20080820),
  2619. 59: uint32(0x20080830),
  2620. 60: uint32(0x00090820),
  2621. 61: uint32(0x00090830),
  2622. 62: uint32(0x20090820),
  2623. 63: uint32(0x20090830),
  2624. },
  2625. 1: {
  2626. 1: uint32(0x02000000),
  2627. 2: uint32(0x00002000),
  2628. 3: uint32(0x02002000),
  2629. 4: uint32(0x00200000),
  2630. 5: uint32(0x02200000),
  2631. 6: uint32(0x00202000),
  2632. 7: uint32(0x02202000),
  2633. 8: uint32(0x00000004),
  2634. 9: uint32(0x02000004),
  2635. 10: uint32(0x00002004),
  2636. 11: uint32(0x02002004),
  2637. 12: uint32(0x00200004),
  2638. 13: uint32(0x02200004),
  2639. 14: uint32(0x00202004),
  2640. 15: uint32(0x02202004),
  2641. 16: uint32(0x00000400),
  2642. 17: uint32(0x02000400),
  2643. 18: uint32(0x00002400),
  2644. 19: uint32(0x02002400),
  2645. 20: uint32(0x00200400),
  2646. 21: uint32(0x02200400),
  2647. 22: uint32(0x00202400),
  2648. 23: uint32(0x02202400),
  2649. 24: uint32(0x00000404),
  2650. 25: uint32(0x02000404),
  2651. 26: uint32(0x00002404),
  2652. 27: uint32(0x02002404),
  2653. 28: uint32(0x00200404),
  2654. 29: uint32(0x02200404),
  2655. 30: uint32(0x00202404),
  2656. 31: uint32(0x02202404),
  2657. 32: uint32(0x10000000),
  2658. 33: uint32(0x12000000),
  2659. 34: uint32(0x10002000),
  2660. 35: uint32(0x12002000),
  2661. 36: uint32(0x10200000),
  2662. 37: uint32(0x12200000),
  2663. 38: uint32(0x10202000),
  2664. 39: uint32(0x12202000),
  2665. 40: uint32(0x10000004),
  2666. 41: uint32(0x12000004),
  2667. 42: uint32(0x10002004),
  2668. 43: uint32(0x12002004),
  2669. 44: uint32(0x10200004),
  2670. 45: uint32(0x12200004),
  2671. 46: uint32(0x10202004),
  2672. 47: uint32(0x12202004),
  2673. 48: uint32(0x10000400),
  2674. 49: uint32(0x12000400),
  2675. 50: uint32(0x10002400),
  2676. 51: uint32(0x12002400),
  2677. 52: uint32(0x10200400),
  2678. 53: uint32(0x12200400),
  2679. 54: uint32(0x10202400),
  2680. 55: uint32(0x12202400),
  2681. 56: uint32(0x10000404),
  2682. 57: uint32(0x12000404),
  2683. 58: uint32(0x10002404),
  2684. 59: uint32(0x12002404),
  2685. 60: uint32(0x10200404),
  2686. 61: uint32(0x12200404),
  2687. 62: uint32(0x10202404),
  2688. 63: uint32(0x12202404),
  2689. },
  2690. 2: {
  2691. 1: uint32(0x00000001),
  2692. 2: uint32(0x00040000),
  2693. 3: uint32(0x00040001),
  2694. 4: uint32(0x01000000),
  2695. 5: uint32(0x01000001),
  2696. 6: uint32(0x01040000),
  2697. 7: uint32(0x01040001),
  2698. 8: uint32(0x00000002),
  2699. 9: uint32(0x00000003),
  2700. 10: uint32(0x00040002),
  2701. 11: uint32(0x00040003),
  2702. 12: uint32(0x01000002),
  2703. 13: uint32(0x01000003),
  2704. 14: uint32(0x01040002),
  2705. 15: uint32(0x01040003),
  2706. 16: uint32(0x00000200),
  2707. 17: uint32(0x00000201),
  2708. 18: uint32(0x00040200),
  2709. 19: uint32(0x00040201),
  2710. 20: uint32(0x01000200),
  2711. 21: uint32(0x01000201),
  2712. 22: uint32(0x01040200),
  2713. 23: uint32(0x01040201),
  2714. 24: uint32(0x00000202),
  2715. 25: uint32(0x00000203),
  2716. 26: uint32(0x00040202),
  2717. 27: uint32(0x00040203),
  2718. 28: uint32(0x01000202),
  2719. 29: uint32(0x01000203),
  2720. 30: uint32(0x01040202),
  2721. 31: uint32(0x01040203),
  2722. 32: uint32(0x08000000),
  2723. 33: uint32(0x08000001),
  2724. 34: uint32(0x08040000),
  2725. 35: uint32(0x08040001),
  2726. 36: uint32(0x09000000),
  2727. 37: uint32(0x09000001),
  2728. 38: uint32(0x09040000),
  2729. 39: uint32(0x09040001),
  2730. 40: uint32(0x08000002),
  2731. 41: uint32(0x08000003),
  2732. 42: uint32(0x08040002),
  2733. 43: uint32(0x08040003),
  2734. 44: uint32(0x09000002),
  2735. 45: uint32(0x09000003),
  2736. 46: uint32(0x09040002),
  2737. 47: uint32(0x09040003),
  2738. 48: uint32(0x08000200),
  2739. 49: uint32(0x08000201),
  2740. 50: uint32(0x08040200),
  2741. 51: uint32(0x08040201),
  2742. 52: uint32(0x09000200),
  2743. 53: uint32(0x09000201),
  2744. 54: uint32(0x09040200),
  2745. 55: uint32(0x09040201),
  2746. 56: uint32(0x08000202),
  2747. 57: uint32(0x08000203),
  2748. 58: uint32(0x08040202),
  2749. 59: uint32(0x08040203),
  2750. 60: uint32(0x09000202),
  2751. 61: uint32(0x09000203),
  2752. 62: uint32(0x09040202),
  2753. 63: uint32(0x09040203),
  2754. },
  2755. 3: {
  2756. 1: uint32(0x00100000),
  2757. 2: uint32(0x00000100),
  2758. 3: uint32(0x00100100),
  2759. 4: uint32(0x00000008),
  2760. 5: uint32(0x00100008),
  2761. 6: uint32(0x00000108),
  2762. 7: uint32(0x00100108),
  2763. 8: uint32(0x00001000),
  2764. 9: uint32(0x00101000),
  2765. 10: uint32(0x00001100),
  2766. 11: uint32(0x00101100),
  2767. 12: uint32(0x00001008),
  2768. 13: uint32(0x00101008),
  2769. 14: uint32(0x00001108),
  2770. 15: uint32(0x00101108),
  2771. 16: uint32(0x04000000),
  2772. 17: uint32(0x04100000),
  2773. 18: uint32(0x04000100),
  2774. 19: uint32(0x04100100),
  2775. 20: uint32(0x04000008),
  2776. 21: uint32(0x04100008),
  2777. 22: uint32(0x04000108),
  2778. 23: uint32(0x04100108),
  2779. 24: uint32(0x04001000),
  2780. 25: uint32(0x04101000),
  2781. 26: uint32(0x04001100),
  2782. 27: uint32(0x04101100),
  2783. 28: uint32(0x04001008),
  2784. 29: uint32(0x04101008),
  2785. 30: uint32(0x04001108),
  2786. 31: uint32(0x04101108),
  2787. 32: uint32(0x00020000),
  2788. 33: uint32(0x00120000),
  2789. 34: uint32(0x00020100),
  2790. 35: uint32(0x00120100),
  2791. 36: uint32(0x00020008),
  2792. 37: uint32(0x00120008),
  2793. 38: uint32(0x00020108),
  2794. 39: uint32(0x00120108),
  2795. 40: uint32(0x00021000),
  2796. 41: uint32(0x00121000),
  2797. 42: uint32(0x00021100),
  2798. 43: uint32(0x00121100),
  2799. 44: uint32(0x00021008),
  2800. 45: uint32(0x00121008),
  2801. 46: uint32(0x00021108),
  2802. 47: uint32(0x00121108),
  2803. 48: uint32(0x04020000),
  2804. 49: uint32(0x04120000),
  2805. 50: uint32(0x04020100),
  2806. 51: uint32(0x04120100),
  2807. 52: uint32(0x04020008),
  2808. 53: uint32(0x04120008),
  2809. 54: uint32(0x04020108),
  2810. 55: uint32(0x04120108),
  2811. 56: uint32(0x04021000),
  2812. 57: uint32(0x04121000),
  2813. 58: uint32(0x04021100),
  2814. 59: uint32(0x04121100),
  2815. 60: uint32(0x04021008),
  2816. 61: uint32(0x04121008),
  2817. 62: uint32(0x04021108),
  2818. 63: uint32(0x04121108),
  2819. },
  2820. 4: {
  2821. 1: uint32(0x10000000),
  2822. 2: uint32(0x00010000),
  2823. 3: uint32(0x10010000),
  2824. 4: uint32(0x00000004),
  2825. 5: uint32(0x10000004),
  2826. 6: uint32(0x00010004),
  2827. 7: uint32(0x10010004),
  2828. 8: uint32(0x20000000),
  2829. 9: uint32(0x30000000),
  2830. 10: uint32(0x20010000),
  2831. 11: uint32(0x30010000),
  2832. 12: uint32(0x20000004),
  2833. 13: uint32(0x30000004),
  2834. 14: uint32(0x20010004),
  2835. 15: uint32(0x30010004),
  2836. 16: uint32(0x00100000),
  2837. 17: uint32(0x10100000),
  2838. 18: uint32(0x00110000),
  2839. 19: uint32(0x10110000),
  2840. 20: uint32(0x00100004),
  2841. 21: uint32(0x10100004),
  2842. 22: uint32(0x00110004),
  2843. 23: uint32(0x10110004),
  2844. 24: uint32(0x20100000),
  2845. 25: uint32(0x30100000),
  2846. 26: uint32(0x20110000),
  2847. 27: uint32(0x30110000),
  2848. 28: uint32(0x20100004),
  2849. 29: uint32(0x30100004),
  2850. 30: uint32(0x20110004),
  2851. 31: uint32(0x30110004),
  2852. 32: uint32(0x00001000),
  2853. 33: uint32(0x10001000),
  2854. 34: uint32(0x00011000),
  2855. 35: uint32(0x10011000),
  2856. 36: uint32(0x00001004),
  2857. 37: uint32(0x10001004),
  2858. 38: uint32(0x00011004),
  2859. 39: uint32(0x10011004),
  2860. 40: uint32(0x20001000),
  2861. 41: uint32(0x30001000),
  2862. 42: uint32(0x20011000),
  2863. 43: uint32(0x30011000),
  2864. 44: uint32(0x20001004),
  2865. 45: uint32(0x30001004),
  2866. 46: uint32(0x20011004),
  2867. 47: uint32(0x30011004),
  2868. 48: uint32(0x00101000),
  2869. 49: uint32(0x10101000),
  2870. 50: uint32(0x00111000),
  2871. 51: uint32(0x10111000),
  2872. 52: uint32(0x00101004),
  2873. 53: uint32(0x10101004),
  2874. 54: uint32(0x00111004),
  2875. 55: uint32(0x10111004),
  2876. 56: uint32(0x20101000),
  2877. 57: uint32(0x30101000),
  2878. 58: uint32(0x20111000),
  2879. 59: uint32(0x30111000),
  2880. 60: uint32(0x20101004),
  2881. 61: uint32(0x30101004),
  2882. 62: uint32(0x20111004),
  2883. 63: uint32(0x30111004),
  2884. },
  2885. 5: {
  2886. 1: uint32(0x08000000),
  2887. 2: uint32(0x00000008),
  2888. 3: uint32(0x08000008),
  2889. 4: uint32(0x00000400),
  2890. 5: uint32(0x08000400),
  2891. 6: uint32(0x00000408),
  2892. 7: uint32(0x08000408),
  2893. 8: uint32(0x00020000),
  2894. 9: uint32(0x08020000),
  2895. 10: uint32(0x00020008),
  2896. 11: uint32(0x08020008),
  2897. 12: uint32(0x00020400),
  2898. 13: uint32(0x08020400),
  2899. 14: uint32(0x00020408),
  2900. 15: uint32(0x08020408),
  2901. 16: uint32(0x00000001),
  2902. 17: uint32(0x08000001),
  2903. 18: uint32(0x00000009),
  2904. 19: uint32(0x08000009),
  2905. 20: uint32(0x00000401),
  2906. 21: uint32(0x08000401),
  2907. 22: uint32(0x00000409),
  2908. 23: uint32(0x08000409),
  2909. 24: uint32(0x00020001),
  2910. 25: uint32(0x08020001),
  2911. 26: uint32(0x00020009),
  2912. 27: uint32(0x08020009),
  2913. 28: uint32(0x00020401),
  2914. 29: uint32(0x08020401),
  2915. 30: uint32(0x00020409),
  2916. 31: uint32(0x08020409),
  2917. 32: uint32(0x02000000),
  2918. 33: uint32(0x0A000000),
  2919. 34: uint32(0x02000008),
  2920. 35: uint32(0x0A000008),
  2921. 36: uint32(0x02000400),
  2922. 37: uint32(0x0A000400),
  2923. 38: uint32(0x02000408),
  2924. 39: uint32(0x0A000408),
  2925. 40: uint32(0x02020000),
  2926. 41: uint32(0x0A020000),
  2927. 42: uint32(0x02020008),
  2928. 43: uint32(0x0A020008),
  2929. 44: uint32(0x02020400),
  2930. 45: uint32(0x0A020400),
  2931. 46: uint32(0x02020408),
  2932. 47: uint32(0x0A020408),
  2933. 48: uint32(0x02000001),
  2934. 49: uint32(0x0A000001),
  2935. 50: uint32(0x02000009),
  2936. 51: uint32(0x0A000009),
  2937. 52: uint32(0x02000401),
  2938. 53: uint32(0x0A000401),
  2939. 54: uint32(0x02000409),
  2940. 55: uint32(0x0A000409),
  2941. 56: uint32(0x02020001),
  2942. 57: uint32(0x0A020001),
  2943. 58: uint32(0x02020009),
  2944. 59: uint32(0x0A020009),
  2945. 60: uint32(0x02020401),
  2946. 61: uint32(0x0A020401),
  2947. 62: uint32(0x02020409),
  2948. 63: uint32(0x0A020409),
  2949. },
  2950. 6: {
  2951. 1: uint32(0x00000100),
  2952. 2: uint32(0x00080000),
  2953. 3: uint32(0x00080100),
  2954. 4: uint32(0x01000000),
  2955. 5: uint32(0x01000100),
  2956. 6: uint32(0x01080000),
  2957. 7: uint32(0x01080100),
  2958. 8: uint32(0x00000010),
  2959. 9: uint32(0x00000110),
  2960. 10: uint32(0x00080010),
  2961. 11: uint32(0x00080110),
  2962. 12: uint32(0x01000010),
  2963. 13: uint32(0x01000110),
  2964. 14: uint32(0x01080010),
  2965. 15: uint32(0x01080110),
  2966. 16: uint32(0x00200000),
  2967. 17: uint32(0x00200100),
  2968. 18: uint32(0x00280000),
  2969. 19: uint32(0x00280100),
  2970. 20: uint32(0x01200000),
  2971. 21: uint32(0x01200100),
  2972. 22: uint32(0x01280000),
  2973. 23: uint32(0x01280100),
  2974. 24: uint32(0x00200010),
  2975. 25: uint32(0x00200110),
  2976. 26: uint32(0x00280010),
  2977. 27: uint32(0x00280110),
  2978. 28: uint32(0x01200010),
  2979. 29: uint32(0x01200110),
  2980. 30: uint32(0x01280010),
  2981. 31: uint32(0x01280110),
  2982. 32: uint32(0x00000200),
  2983. 33: uint32(0x00000300),
  2984. 34: uint32(0x00080200),
  2985. 35: uint32(0x00080300),
  2986. 36: uint32(0x01000200),
  2987. 37: uint32(0x01000300),
  2988. 38: uint32(0x01080200),
  2989. 39: uint32(0x01080300),
  2990. 40: uint32(0x00000210),
  2991. 41: uint32(0x00000310),
  2992. 42: uint32(0x00080210),
  2993. 43: uint32(0x00080310),
  2994. 44: uint32(0x01000210),
  2995. 45: uint32(0x01000310),
  2996. 46: uint32(0x01080210),
  2997. 47: uint32(0x01080310),
  2998. 48: uint32(0x00200200),
  2999. 49: uint32(0x00200300),
  3000. 50: uint32(0x00280200),
  3001. 51: uint32(0x00280300),
  3002. 52: uint32(0x01200200),
  3003. 53: uint32(0x01200300),
  3004. 54: uint32(0x01280200),
  3005. 55: uint32(0x01280300),
  3006. 56: uint32(0x00200210),
  3007. 57: uint32(0x00200310),
  3008. 58: uint32(0x00280210),
  3009. 59: uint32(0x00280310),
  3010. 60: uint32(0x01200210),
  3011. 61: uint32(0x01200310),
  3012. 62: uint32(0x01280210),
  3013. 63: uint32(0x01280310),
  3014. },
  3015. 7: {
  3016. 1: uint32(0x04000000),
  3017. 2: uint32(0x00040000),
  3018. 3: uint32(0x04040000),
  3019. 4: uint32(0x00000002),
  3020. 5: uint32(0x04000002),
  3021. 6: uint32(0x00040002),
  3022. 7: uint32(0x04040002),
  3023. 8: uint32(0x00002000),
  3024. 9: uint32(0x04002000),
  3025. 10: uint32(0x00042000),
  3026. 11: uint32(0x04042000),
  3027. 12: uint32(0x00002002),
  3028. 13: uint32(0x04002002),
  3029. 14: uint32(0x00042002),
  3030. 15: uint32(0x04042002),
  3031. 16: uint32(0x00000020),
  3032. 17: uint32(0x04000020),
  3033. 18: uint32(0x00040020),
  3034. 19: uint32(0x04040020),
  3035. 20: uint32(0x00000022),
  3036. 21: uint32(0x04000022),
  3037. 22: uint32(0x00040022),
  3038. 23: uint32(0x04040022),
  3039. 24: uint32(0x00002020),
  3040. 25: uint32(0x04002020),
  3041. 26: uint32(0x00042020),
  3042. 27: uint32(0x04042020),
  3043. 28: uint32(0x00002022),
  3044. 29: uint32(0x04002022),
  3045. 30: uint32(0x00042022),
  3046. 31: uint32(0x04042022),
  3047. 32: uint32(0x00000800),
  3048. 33: uint32(0x04000800),
  3049. 34: uint32(0x00040800),
  3050. 35: uint32(0x04040800),
  3051. 36: uint32(0x00000802),
  3052. 37: uint32(0x04000802),
  3053. 38: uint32(0x00040802),
  3054. 39: uint32(0x04040802),
  3055. 40: uint32(0x00002800),
  3056. 41: uint32(0x04002800),
  3057. 42: uint32(0x00042800),
  3058. 43: uint32(0x04042800),
  3059. 44: uint32(0x00002802),
  3060. 45: uint32(0x04002802),
  3061. 46: uint32(0x00042802),
  3062. 47: uint32(0x04042802),
  3063. 48: uint32(0x00000820),
  3064. 49: uint32(0x04000820),
  3065. 50: uint32(0x00040820),
  3066. 51: uint32(0x04040820),
  3067. 52: uint32(0x00000822),
  3068. 53: uint32(0x04000822),
  3069. 54: uint32(0x00040822),
  3070. 55: uint32(0x04040822),
  3071. 56: uint32(0x00002820),
  3072. 57: uint32(0x04002820),
  3073. 58: uint32(0x00042820),
  3074. 59: uint32(0x04042820),
  3075. 60: uint32(0x00002822),
  3076. 61: uint32(0x04002822),
  3077. 62: uint32(0x00042822),
  3078. 63: uint32(0x04042822),
  3079. },
  3080. }
  3081. var _SPtrans = [8][64]TCARD32{
  3082. 0: {
  3083. 0: uint32(0x00410100),
  3084. 1: uint32(0x00010000),
  3085. 2: uint32(0x40400000),
  3086. 3: uint32(0x40410100),
  3087. 4: uint32(0x00400000),
  3088. 5: uint32(0x40010100),
  3089. 6: uint32(0x40010000),
  3090. 7: uint32(0x40400000),
  3091. 8: uint32(0x40010100),
  3092. 9: uint32(0x00410100),
  3093. 10: uint32(0x00410000),
  3094. 11: uint32(0x40000100),
  3095. 12: uint32(0x40400100),
  3096. 13: uint32(0x00400000),
  3097. 15: uint32(0x40010000),
  3098. 16: uint32(0x00010000),
  3099. 17: uint32(0x40000000),
  3100. 18: uint32(0x00400100),
  3101. 19: uint32(0x00010100),
  3102. 20: uint32(0x40410100),
  3103. 21: uint32(0x00410000),
  3104. 22: uint32(0x40000100),
  3105. 23: uint32(0x00400100),
  3106. 24: uint32(0x40000000),
  3107. 25: uint32(0x00000100),
  3108. 26: uint32(0x00010100),
  3109. 27: uint32(0x40410000),
  3110. 28: uint32(0x00000100),
  3111. 29: uint32(0x40400100),
  3112. 30: uint32(0x40410000),
  3113. 33: uint32(0x40410100),
  3114. 34: uint32(0x00400100),
  3115. 35: uint32(0x40010000),
  3116. 36: uint32(0x00410100),
  3117. 37: uint32(0x00010000),
  3118. 38: uint32(0x40000100),
  3119. 39: uint32(0x00400100),
  3120. 40: uint32(0x40410000),
  3121. 41: uint32(0x00000100),
  3122. 42: uint32(0x00010100),
  3123. 43: uint32(0x40400000),
  3124. 44: uint32(0x40010100),
  3125. 45: uint32(0x40000000),
  3126. 46: uint32(0x40400000),
  3127. 47: uint32(0x00410000),
  3128. 48: uint32(0x40410100),
  3129. 49: uint32(0x00010100),
  3130. 50: uint32(0x00410000),
  3131. 51: uint32(0x40400100),
  3132. 52: uint32(0x00400000),
  3133. 53: uint32(0x40000100),
  3134. 54: uint32(0x40010000),
  3135. 56: uint32(0x00010000),
  3136. 57: uint32(0x00400000),
  3137. 58: uint32(0x40400100),
  3138. 59: uint32(0x00410100),
  3139. 60: uint32(0x40000000),
  3140. 61: uint32(0x40410000),
  3141. 62: uint32(0x00000100),
  3142. 63: uint32(0x40010100),
  3143. },
  3144. 1: {
  3145. 0: uint32(0x08021002),
  3146. 2: uint32(0x00021000),
  3147. 3: uint32(0x08020000),
  3148. 4: uint32(0x08000002),
  3149. 5: uint32(0x00001002),
  3150. 6: uint32(0x08001000),
  3151. 7: uint32(0x00021000),
  3152. 8: uint32(0x00001000),
  3153. 9: uint32(0x08020002),
  3154. 10: uint32(0x00000002),
  3155. 11: uint32(0x08001000),
  3156. 12: uint32(0x00020002),
  3157. 13: uint32(0x08021000),
  3158. 14: uint32(0x08020000),
  3159. 15: uint32(0x00000002),
  3160. 16: uint32(0x00020000),
  3161. 17: uint32(0x08001002),
  3162. 18: uint32(0x08020002),
  3163. 19: uint32(0x00001000),
  3164. 20: uint32(0x00021002),
  3165. 21: uint32(0x08000000),
  3166. 23: uint32(0x00020002),
  3167. 24: uint32(0x08001002),
  3168. 25: uint32(0x00021002),
  3169. 26: uint32(0x08021000),
  3170. 27: uint32(0x08000002),
  3171. 28: uint32(0x08000000),
  3172. 29: uint32(0x00020000),
  3173. 30: uint32(0x00001002),
  3174. 31: uint32(0x08021002),
  3175. 32: uint32(0x00020002),
  3176. 33: uint32(0x08021000),
  3177. 34: uint32(0x08001000),
  3178. 35: uint32(0x00021002),
  3179. 36: uint32(0x08021002),
  3180. 37: uint32(0x00020002),
  3181. 38: uint32(0x08000002),
  3182. 40: uint32(0x08000000),
  3183. 41: uint32(0x00001002),
  3184. 42: uint32(0x00020000),
  3185. 43: uint32(0x08020002),
  3186. 44: uint32(0x00001000),
  3187. 45: uint32(0x08000000),
  3188. 46: uint32(0x00021002),
  3189. 47: uint32(0x08001002),
  3190. 48: uint32(0x08021000),
  3191. 49: uint32(0x00001000),
  3192. 51: uint32(0x08000002),
  3193. 52: uint32(0x00000002),
  3194. 53: uint32(0x08021002),
  3195. 54: uint32(0x00021000),
  3196. 55: uint32(0x08020000),
  3197. 56: uint32(0x08020002),
  3198. 57: uint32(0x00020000),
  3199. 58: uint32(0x00001002),
  3200. 59: uint32(0x08001000),
  3201. 60: uint32(0x08001002),
  3202. 61: uint32(0x00000002),
  3203. 62: uint32(0x08020000),
  3204. 63: uint32(0x00021000),
  3205. },
  3206. 2: {
  3207. 0: uint32(0x20800000),
  3208. 1: uint32(0x00808020),
  3209. 2: uint32(0x00000020),
  3210. 3: uint32(0x20800020),
  3211. 4: uint32(0x20008000),
  3212. 5: uint32(0x00800000),
  3213. 6: uint32(0x20800020),
  3214. 7: uint32(0x00008020),
  3215. 8: uint32(0x00800020),
  3216. 9: uint32(0x00008000),
  3217. 10: uint32(0x00808000),
  3218. 11: uint32(0x20000000),
  3219. 12: uint32(0x20808020),
  3220. 13: uint32(0x20000020),
  3221. 14: uint32(0x20000000),
  3222. 15: uint32(0x20808000),
  3223. 17: uint32(0x20008000),
  3224. 18: uint32(0x00808020),
  3225. 19: uint32(0x00000020),
  3226. 20: uint32(0x20000020),
  3227. 21: uint32(0x20808020),
  3228. 22: uint32(0x00008000),
  3229. 23: uint32(0x20800000),
  3230. 24: uint32(0x20808000),
  3231. 25: uint32(0x00800020),
  3232. 26: uint32(0x20008020),
  3233. 27: uint32(0x00808000),
  3234. 28: uint32(0x00008020),
  3235. 30: uint32(0x00800000),
  3236. 31: uint32(0x20008020),
  3237. 32: uint32(0x00808020),
  3238. 33: uint32(0x00000020),
  3239. 34: uint32(0x20000000),
  3240. 35: uint32(0x00008000),
  3241. 36: uint32(0x20000020),
  3242. 37: uint32(0x20008000),
  3243. 38: uint32(0x00808000),
  3244. 39: uint32(0x20800020),
  3245. 41: uint32(0x00808020),
  3246. 42: uint32(0x00008020),
  3247. 43: uint32(0x20808000),
  3248. 44: uint32(0x20008000),
  3249. 45: uint32(0x00800000),
  3250. 46: uint32(0x20808020),
  3251. 47: uint32(0x20000000),
  3252. 48: uint32(0x20008020),
  3253. 49: uint32(0x20800000),
  3254. 50: uint32(0x00800000),
  3255. 51: uint32(0x20808020),
  3256. 52: uint32(0x00008000),
  3257. 53: uint32(0x00800020),
  3258. 54: uint32(0x20800020),
  3259. 55: uint32(0x00008020),
  3260. 56: uint32(0x00800020),
  3261. 58: uint32(0x20808000),
  3262. 59: uint32(0x20000020),
  3263. 60: uint32(0x20800000),
  3264. 61: uint32(0x20008020),
  3265. 62: uint32(0x00000020),
  3266. 63: uint32(0x00808000),
  3267. },
  3268. 3: {
  3269. 0: uint32(0x00080201),
  3270. 1: uint32(0x02000200),
  3271. 2: uint32(0x00000001),
  3272. 3: uint32(0x02080201),
  3273. 5: uint32(0x02080000),
  3274. 6: uint32(0x02000201),
  3275. 7: uint32(0x00080001),
  3276. 8: uint32(0x02080200),
  3277. 9: uint32(0x02000001),
  3278. 10: uint32(0x02000000),
  3279. 11: uint32(0x00000201),
  3280. 12: uint32(0x02000001),
  3281. 13: uint32(0x00080201),
  3282. 14: uint32(0x00080000),
  3283. 15: uint32(0x02000000),
  3284. 16: uint32(0x02080001),
  3285. 17: uint32(0x00080200),
  3286. 18: uint32(0x00000200),
  3287. 19: uint32(0x00000001),
  3288. 20: uint32(0x00080200),
  3289. 21: uint32(0x02000201),
  3290. 22: uint32(0x02080000),
  3291. 23: uint32(0x00000200),
  3292. 24: uint32(0x00000201),
  3293. 26: uint32(0x00080001),
  3294. 27: uint32(0x02080200),
  3295. 28: uint32(0x02000200),
  3296. 29: uint32(0x02080001),
  3297. 30: uint32(0x02080201),
  3298. 31: uint32(0x00080000),
  3299. 32: uint32(0x02080001),
  3300. 33: uint32(0x00000201),
  3301. 34: uint32(0x00080000),
  3302. 35: uint32(0x02000001),
  3303. 36: uint32(0x00080200),
  3304. 37: uint32(0x02000200),
  3305. 38: uint32(0x00000001),
  3306. 39: uint32(0x02080000),
  3307. 40: uint32(0x02000201),
  3308. 42: uint32(0x00000200),
  3309. 43: uint32(0x00080001),
  3310. 45: uint32(0x02080001),
  3311. 46: uint32(0x02080200),
  3312. 47: uint32(0x00000200),
  3313. 48: uint32(0x02000000),
  3314. 49: uint32(0x02080201),
  3315. 50: uint32(0x00080201),
  3316. 51: uint32(0x00080000),
  3317. 52: uint32(0x02080201),
  3318. 53: uint32(0x00000001),
  3319. 54: uint32(0x02000200),
  3320. 55: uint32(0x00080201),
  3321. 56: uint32(0x00080001),
  3322. 57: uint32(0x00080200),
  3323. 58: uint32(0x02080000),
  3324. 59: uint32(0x02000201),
  3325. 60: uint32(0x00000201),
  3326. 61: uint32(0x02000000),
  3327. 62: uint32(0x02000001),
  3328. 63: uint32(0x02080200),
  3329. },
  3330. 4: {
  3331. 0: uint32(0x01000000),
  3332. 1: uint32(0x00002000),
  3333. 2: uint32(0x00000080),
  3334. 3: uint32(0x01002084),
  3335. 4: uint32(0x01002004),
  3336. 5: uint32(0x01000080),
  3337. 6: uint32(0x00002084),
  3338. 7: uint32(0x01002000),
  3339. 8: uint32(0x00002000),
  3340. 9: uint32(0x00000004),
  3341. 10: uint32(0x01000004),
  3342. 11: uint32(0x00002080),
  3343. 12: uint32(0x01000084),
  3344. 13: uint32(0x01002004),
  3345. 14: uint32(0x01002080),
  3346. 16: uint32(0x00002080),
  3347. 17: uint32(0x01000000),
  3348. 18: uint32(0x00002004),
  3349. 19: uint32(0x00000084),
  3350. 20: uint32(0x01000080),
  3351. 21: uint32(0x00002084),
  3352. 23: uint32(0x01000004),
  3353. 24: uint32(0x00000004),
  3354. 25: uint32(0x01000084),
  3355. 26: uint32(0x01002084),
  3356. 27: uint32(0x00002004),
  3357. 28: uint32(0x01002000),
  3358. 29: uint32(0x00000080),
  3359. 30: uint32(0x00000084),
  3360. 31: uint32(0x01002080),
  3361. 32: uint32(0x01002080),
  3362. 33: uint32(0x01000084),
  3363. 34: uint32(0x00002004),
  3364. 35: uint32(0x01002000),
  3365. 36: uint32(0x00002000),
  3366. 37: uint32(0x00000004),
  3367. 38: uint32(0x01000004),
  3368. 39: uint32(0x01000080),
  3369. 40: uint32(0x01000000),
  3370. 41: uint32(0x00002080),
  3371. 42: uint32(0x01002084),
  3372. 44: uint32(0x00002084),
  3373. 45: uint32(0x01000000),
  3374. 46: uint32(0x00000080),
  3375. 47: uint32(0x00002004),
  3376. 48: uint32(0x01000084),
  3377. 49: uint32(0x00000080),
  3378. 51: uint32(0x01002084),
  3379. 52: uint32(0x01002004),
  3380. 53: uint32(0x01002080),
  3381. 54: uint32(0x00000084),
  3382. 55: uint32(0x00002000),
  3383. 56: uint32(0x00002080),
  3384. 57: uint32(0x01002004),
  3385. 58: uint32(0x01000080),
  3386. 59: uint32(0x00000084),
  3387. 60: uint32(0x00000004),
  3388. 61: uint32(0x00002084),
  3389. 62: uint32(0x01002000),
  3390. 63: uint32(0x01000004),
  3391. },
  3392. 5: {
  3393. 0: uint32(0x10000008),
  3394. 1: uint32(0x00040008),
  3395. 3: uint32(0x10040400),
  3396. 4: uint32(0x00040008),
  3397. 5: uint32(0x00000400),
  3398. 6: uint32(0x10000408),
  3399. 7: uint32(0x00040000),
  3400. 8: uint32(0x00000408),
  3401. 9: uint32(0x10040408),
  3402. 10: uint32(0x00040400),
  3403. 11: uint32(0x10000000),
  3404. 12: uint32(0x10000400),
  3405. 13: uint32(0x10000008),
  3406. 14: uint32(0x10040000),
  3407. 15: uint32(0x00040408),
  3408. 16: uint32(0x00040000),
  3409. 17: uint32(0x10000408),
  3410. 18: uint32(0x10040008),
  3411. 20: uint32(0x00000400),
  3412. 21: uint32(0x00000008),
  3413. 22: uint32(0x10040400),
  3414. 23: uint32(0x10040008),
  3415. 24: uint32(0x10040408),
  3416. 25: uint32(0x10040000),
  3417. 26: uint32(0x10000000),
  3418. 27: uint32(0x00000408),
  3419. 28: uint32(0x00000008),
  3420. 29: uint32(0x00040400),
  3421. 30: uint32(0x00040408),
  3422. 31: uint32(0x10000400),
  3423. 32: uint32(0x00000408),
  3424. 33: uint32(0x10000000),
  3425. 34: uint32(0x10000400),
  3426. 35: uint32(0x00040408),
  3427. 36: uint32(0x10040400),
  3428. 37: uint32(0x00040008),
  3429. 39: uint32(0x10000400),
  3430. 40: uint32(0x10000000),
  3431. 41: uint32(0x00000400),
  3432. 42: uint32(0x10040008),
  3433. 43: uint32(0x00040000),
  3434. 44: uint32(0x00040008),
  3435. 45: uint32(0x10040408),
  3436. 46: uint32(0x00040400),
  3437. 47: uint32(0x00000008),
  3438. 48: uint32(0x10040408),
  3439. 49: uint32(0x00040400),
  3440. 50: uint32(0x00040000),
  3441. 51: uint32(0x10000408),
  3442. 52: uint32(0x10000008),
  3443. 53: uint32(0x10040000),
  3444. 54: uint32(0x00040408),
  3445. 56: uint32(0x00000400),
  3446. 57: uint32(0x10000008),
  3447. 58: uint32(0x10000408),
  3448. 59: uint32(0x10040400),
  3449. 60: uint32(0x10040000),
  3450. 61: uint32(0x00000408),
  3451. 62: uint32(0x00000008),
  3452. 63: uint32(0x10040008),
  3453. },
  3454. 6: {
  3455. 0: uint32(0x00000800),
  3456. 1: uint32(0x00000040),
  3457. 2: uint32(0x00200040),
  3458. 3: uint32(0x80200000),
  3459. 4: uint32(0x80200840),
  3460. 5: uint32(0x80000800),
  3461. 6: uint32(0x00000840),
  3462. 8: uint32(0x00200000),
  3463. 9: uint32(0x80200040),
  3464. 10: uint32(0x80000040),
  3465. 11: uint32(0x00200800),
  3466. 12: uint32(0x80000000),
  3467. 13: uint32(0x00200840),
  3468. 14: uint32(0x00200800),
  3469. 15: uint32(0x80000040),
  3470. 16: uint32(0x80200040),
  3471. 17: uint32(0x00000800),
  3472. 18: uint32(0x80000800),
  3473. 19: uint32(0x80200840),
  3474. 21: uint32(0x00200040),
  3475. 22: uint32(0x80200000),
  3476. 23: uint32(0x00000840),
  3477. 24: uint32(0x80200800),
  3478. 25: uint32(0x80000840),
  3479. 26: uint32(0x00200840),
  3480. 27: uint32(0x80000000),
  3481. 28: uint32(0x80000840),
  3482. 29: uint32(0x80200800),
  3483. 30: uint32(0x00000040),
  3484. 31: uint32(0x00200000),
  3485. 32: uint32(0x80000840),
  3486. 33: uint32(0x00200800),
  3487. 34: uint32(0x80200800),
  3488. 35: uint32(0x80000040),
  3489. 36: uint32(0x00000800),
  3490. 37: uint32(0x00000040),
  3491. 38: uint32(0x00200000),
  3492. 39: uint32(0x80200800),
  3493. 40: uint32(0x80200040),
  3494. 41: uint32(0x80000840),
  3495. 42: uint32(0x00000840),
  3496. 44: uint32(0x00000040),
  3497. 45: uint32(0x80200000),
  3498. 46: uint32(0x80000000),
  3499. 47: uint32(0x00200040),
  3500. 49: uint32(0x80200040),
  3501. 50: uint32(0x00200040),
  3502. 51: uint32(0x00000840),
  3503. 52: uint32(0x80000040),
  3504. 53: uint32(0x00000800),
  3505. 54: uint32(0x80200840),
  3506. 55: uint32(0x00200000),
  3507. 56: uint32(0x00200840),
  3508. 57: uint32(0x80000000),
  3509. 58: uint32(0x80000800),
  3510. 59: uint32(0x80200840),
  3511. 60: uint32(0x80200000),
  3512. 61: uint32(0x00200840),
  3513. 62: uint32(0x00200800),
  3514. 63: uint32(0x80000800),
  3515. },
  3516. 7: {
  3517. 0: uint32(0x04100010),
  3518. 1: uint32(0x04104000),
  3519. 2: uint32(0x00004010),
  3520. 4: uint32(0x04004000),
  3521. 5: uint32(0x00100010),
  3522. 6: uint32(0x04100000),
  3523. 7: uint32(0x04104010),
  3524. 8: uint32(0x00000010),
  3525. 9: uint32(0x04000000),
  3526. 10: uint32(0x00104000),
  3527. 11: uint32(0x00004010),
  3528. 12: uint32(0x00104010),
  3529. 13: uint32(0x04004010),
  3530. 14: uint32(0x04000010),
  3531. 15: uint32(0x04100000),
  3532. 16: uint32(0x00004000),
  3533. 17: uint32(0x00104010),
  3534. 18: uint32(0x00100010),
  3535. 19: uint32(0x04004000),
  3536. 20: uint32(0x04104010),
  3537. 21: uint32(0x04000010),
  3538. 23: uint32(0x00104000),
  3539. 24: uint32(0x04000000),
  3540. 25: uint32(0x00100000),
  3541. 26: uint32(0x04004010),
  3542. 27: uint32(0x04100010),
  3543. 28: uint32(0x00100000),
  3544. 29: uint32(0x00004000),
  3545. 30: uint32(0x04104000),
  3546. 31: uint32(0x00000010),
  3547. 32: uint32(0x00100000),
  3548. 33: uint32(0x00004000),
  3549. 34: uint32(0x04000010),
  3550. 35: uint32(0x04104010),
  3551. 36: uint32(0x00004010),
  3552. 37: uint32(0x04000000),
  3553. 39: uint32(0x00104000),
  3554. 40: uint32(0x04100010),
  3555. 41: uint32(0x04004010),
  3556. 42: uint32(0x04004000),
  3557. 43: uint32(0x00100010),
  3558. 44: uint32(0x04104000),
  3559. 45: uint32(0x00000010),
  3560. 46: uint32(0x00100010),
  3561. 47: uint32(0x04004000),
  3562. 48: uint32(0x04104010),
  3563. 49: uint32(0x00100000),
  3564. 50: uint32(0x04100000),
  3565. 51: uint32(0x04000010),
  3566. 52: uint32(0x00104000),
  3567. 53: uint32(0x00004010),
  3568. 54: uint32(0x04004010),
  3569. 55: uint32(0x04100000),
  3570. 56: uint32(0x00000010),
  3571. 57: uint32(0x04104000),
  3572. 58: uint32(0x00104010),
  3573. 60: uint32(0x04000000),
  3574. 61: uint32(0x04100010),
  3575. 62: uint32(0x00004000),
  3576. 63: uint32(0x00104010),
  3577. },
  3578. }
  3579. var _shifts2 = [16]uint8{
  3580. 2: uint8(1),
  3581. 3: uint8(1),
  3582. 4: uint8(1),
  3583. 5: uint8(1),
  3584. 6: uint8(1),
  3585. 7: uint8(1),
  3586. 9: uint8(1),
  3587. 10: uint8(1),
  3588. 11: uint8(1),
  3589. 12: uint8(1),
  3590. 13: uint8(1),
  3591. 14: uint8(1),
  3592. }
  3593. func X_XdmcpAuthSetup(tls *libc.TLS, key uintptr, schedule uintptr) {
  3594. var c, d, s, t TCARD32
  3595. var i int32
  3596. var in, k, v1, v10, v11, v2, v3, v4, v5, v6, v7, v8 uintptr
  3597. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, d, i, in, k, s, t, v1, v10, v11, v2, v3, v4, v5, v6, v7, v8
  3598. k = schedule
  3599. in = key
  3600. v1 = in
  3601. in++
  3602. c = uint32(*(*TCARD8)(unsafe.Pointer(v1)))
  3603. v2 = in
  3604. in++
  3605. c |= uint32(*(*TCARD8)(unsafe.Pointer(v2))) << int32(8)
  3606. v3 = in
  3607. in++
  3608. c |= uint32(*(*TCARD8)(unsafe.Pointer(v3))) << int32(16)
  3609. v4 = in
  3610. in++
  3611. c |= uint32(*(*TCARD8)(unsafe.Pointer(v4))) << int32(24)
  3612. v5 = in
  3613. in++
  3614. d = uint32(*(*TCARD8)(unsafe.Pointer(v5)))
  3615. v6 = in
  3616. in++
  3617. d |= uint32(*(*TCARD8)(unsafe.Pointer(v6))) << int32(8)
  3618. v7 = in
  3619. in++
  3620. d |= uint32(*(*TCARD8)(unsafe.Pointer(v7))) << int32(16)
  3621. v8 = in
  3622. in++
  3623. d |= uint32(*(*TCARD8)(unsafe.Pointer(v8))) << int32(24)
  3624. /* do PC1 in 60 simple operations */
  3625. t = (d>>libc.Int32FromInt32(4) ^ c) & libc.Uint32FromInt32(libc.Int32FromInt32(0x0f0f0f0f))
  3626. c ^= t
  3627. d ^= t << libc.Int32FromInt32(4)
  3628. t = (c<<(libc.Int32FromInt32(16) - -libc.Int32FromInt32(2)) ^ c) & libc.Uint32FromUint32(0xcccc0000)
  3629. c = c ^ t ^ t>>(libc.Int32FromInt32(16) - -libc.Int32FromInt32(2))
  3630. t = (c<<(libc.Int32FromInt32(16) - -libc.Int32FromInt32(1)) ^ c) & libc.Uint32FromUint32(0xaaaa0000)
  3631. c = c ^ t ^ t>>(libc.Int32FromInt32(16) - -libc.Int32FromInt32(1))
  3632. t = (c<<(libc.Int32FromInt32(16)-libc.Int32FromInt32(8)) ^ c) & libc.Uint32FromInt32(libc.Int32FromInt32(0x00ff0000))
  3633. c = c ^ t ^ t>>(libc.Int32FromInt32(16)-libc.Int32FromInt32(8))
  3634. t = (c<<(libc.Int32FromInt32(16) - -libc.Int32FromInt32(1)) ^ c) & libc.Uint32FromUint32(0xaaaa0000)
  3635. c = c ^ t ^ t>>(libc.Int32FromInt32(16) - -libc.Int32FromInt32(1))
  3636. t = (d<<(libc.Int32FromInt32(16) - -libc.Int32FromInt32(8)) ^ d) & libc.Uint32FromUint32(0xff000000)
  3637. d = d ^ t ^ t>>(libc.Int32FromInt32(16) - -libc.Int32FromInt32(8))
  3638. t = (d<<(libc.Int32FromInt32(16)-libc.Int32FromInt32(8)) ^ d) & libc.Uint32FromInt32(libc.Int32FromInt32(0x00ff0000))
  3639. d = d ^ t ^ t>>(libc.Int32FromInt32(16)-libc.Int32FromInt32(8))
  3640. t = (d<<(libc.Int32FromInt32(16)-libc.Int32FromInt32(2)) ^ d) & libc.Uint32FromInt32(libc.Int32FromInt32(0x33330000))
  3641. d = d ^ t ^ t>>(libc.Int32FromInt32(16)-libc.Int32FromInt32(2))
  3642. d = d&uint32(0x00aa00aa)<<int32(7) | d&uint32(0x55005500)>>int32(7) | d&uint32(0xaa55aa55)
  3643. d = d>>libc.Int32FromInt32(8) | c&uint32(0xf0000000)>>int32(4)
  3644. c &= uint32(0x0fffffff)
  3645. i = 0
  3646. for {
  3647. if !(i < int32(m_ITERATIONS)) {
  3648. break
  3649. }
  3650. if _shifts2[i] != 0 {
  3651. c = c>>libc.Int32FromInt32(2) | c<<libc.Int32FromInt32(26)
  3652. d = d>>libc.Int32FromInt32(2) | d<<libc.Int32FromInt32(26)
  3653. } else {
  3654. c = c>>libc.Int32FromInt32(1) | c<<libc.Int32FromInt32(27)
  3655. d = d>>libc.Int32FromInt32(1) | d<<libc.Int32FromInt32(27)
  3656. }
  3657. c &= uint32(0x0fffffff)
  3658. d &= uint32(0x0fffffff)
  3659. /* could be a few less shifts but I am to lazy at this
  3660. * point in time to investigate */
  3661. s = *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_skb)) + uintptr(c&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_skb)) + 1*256 + uintptr(c>>libc.Int32FromInt32(6)&uint32(0x03)|c>>libc.Int32FromInt32(7)&uint32(0x3c))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_skb)) + 2*256 + uintptr(c>>libc.Int32FromInt32(13)&uint32(0x0f)|c>>libc.Int32FromInt32(14)&uint32(0x30))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_skb)) + 3*256 + uintptr(c>>libc.Int32FromInt32(20)&uint32(0x01)|c>>libc.Int32FromInt32(21)&uint32(0x06)|c>>libc.Int32FromInt32(22)&uint32(0x38))*4))
  3662. t = *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_skb)) + 4*256 + uintptr(d&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_skb)) + 5*256 + uintptr(d>>libc.Int32FromInt32(7)&uint32(0x03)|d>>libc.Int32FromInt32(8)&uint32(0x3c))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_skb)) + 6*256 + uintptr(d>>libc.Int32FromInt32(15)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_skb)) + 7*256 + uintptr(d>>libc.Int32FromInt32(21)&uint32(0x0f)|d>>libc.Int32FromInt32(22)&uint32(0x30))*4))
  3663. /* table contained 0213 4657 */
  3664. v10 = k
  3665. k += 4
  3666. *(*TCARD32)(unsafe.Pointer(v10)) = t<<libc.Int32FromInt32(16) | s&libc.Uint32FromInt32(0x0000ffff)
  3667. s = s>>libc.Int32FromInt32(16) | t&libc.Uint32FromUint32(0xffff0000)
  3668. s = s<<libc.Int32FromInt32(4) | s>>libc.Int32FromInt32(28)
  3669. v11 = k
  3670. k += 4
  3671. *(*TCARD32)(unsafe.Pointer(v11)) = s
  3672. goto _9
  3673. _9:
  3674. ;
  3675. i++
  3676. }
  3677. return
  3678. }
  3679. func X_XdmcpAuthDoIt(tls *libc.TLS, input uintptr, output uintptr, ks uintptr, encrypt int32) {
  3680. var i int32
  3681. var in, out, s, v1, v11, v12, v13, v14, v15, v16, v17, v18, v2, v3, v4, v5, v6, v7, v8 uintptr
  3682. var l, r, t, u TCARD32
  3683. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, in, l, out, r, s, t, u, v1, v11, v12, v13, v14, v15, v16, v17, v18, v2, v3, v4, v5, v6, v7, v8
  3684. in = input
  3685. out = output
  3686. v1 = in
  3687. in++
  3688. l = uint32(*(*TCARD8)(unsafe.Pointer(v1)))
  3689. v2 = in
  3690. in++
  3691. l |= uint32(*(*TCARD8)(unsafe.Pointer(v2))) << int32(8)
  3692. v3 = in
  3693. in++
  3694. l |= uint32(*(*TCARD8)(unsafe.Pointer(v3))) << int32(16)
  3695. v4 = in
  3696. in++
  3697. l |= uint32(*(*TCARD8)(unsafe.Pointer(v4))) << int32(24)
  3698. v5 = in
  3699. in++
  3700. r = uint32(*(*TCARD8)(unsafe.Pointer(v5)))
  3701. v6 = in
  3702. in++
  3703. r |= uint32(*(*TCARD8)(unsafe.Pointer(v6))) << int32(8)
  3704. v7 = in
  3705. in++
  3706. r |= uint32(*(*TCARD8)(unsafe.Pointer(v7))) << int32(16)
  3707. v8 = in
  3708. in++
  3709. r |= uint32(*(*TCARD8)(unsafe.Pointer(v8))) << int32(24)
  3710. /* do IP */
  3711. t = (r>>libc.Int32FromInt32(4) ^ l) & libc.Uint32FromInt32(libc.Int32FromInt32(0x0f0f0f0f))
  3712. l ^= t
  3713. r ^= t << libc.Int32FromInt32(4)
  3714. t = (l>>libc.Int32FromInt32(16) ^ r) & libc.Uint32FromInt32(libc.Int32FromInt32(0x0000ffff))
  3715. r ^= t
  3716. l ^= t << libc.Int32FromInt32(16)
  3717. t = (r>>libc.Int32FromInt32(2) ^ l) & libc.Uint32FromInt32(libc.Int32FromInt32(0x33333333))
  3718. l ^= t
  3719. r ^= t << libc.Int32FromInt32(2)
  3720. t = (l>>libc.Int32FromInt32(8) ^ r) & libc.Uint32FromInt32(libc.Int32FromInt32(0x00ff00ff))
  3721. r ^= t
  3722. l ^= t << libc.Int32FromInt32(8)
  3723. t = (r>>libc.Int32FromInt32(1) ^ l) & libc.Uint32FromInt32(libc.Int32FromInt32(0x55555555))
  3724. l ^= t
  3725. r ^= t << libc.Int32FromInt32(1)
  3726. /* r and l are reversed - remember that :-) */
  3727. t = l
  3728. l = r
  3729. r = t
  3730. s = ks
  3731. if encrypt != 0 {
  3732. i = 0
  3733. for {
  3734. if !(i < libc.Int32FromInt32(m_ITERATIONS)*libc.Int32FromInt32(2)) {
  3735. break
  3736. }
  3737. t = r<<libc.Int32FromInt32(1) | r>>libc.Int32FromInt32(31)
  3738. u = t ^ *(*TCARD32)(unsafe.Pointer(s + uintptr(i)*4))
  3739. t = t ^ *(*TCARD32)(unsafe.Pointer(s + uintptr(i+int32(1))*4))
  3740. t = t>>libc.Int32FromInt32(4) | t<<libc.Int32FromInt32(28)
  3741. l ^= *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 1*256 + uintptr(t&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 3*256 + uintptr(t>>libc.Int32FromInt32(8)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 5*256 + uintptr(t>>libc.Int32FromInt32(16)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 7*256 + uintptr(t>>libc.Int32FromInt32(24)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + uintptr(u&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 2*256 + uintptr(u>>libc.Int32FromInt32(8)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 4*256 + uintptr(u>>libc.Int32FromInt32(16)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 6*256 + uintptr(u>>libc.Int32FromInt32(24)&uint32(0x3f))*4)) /* 1 */
  3742. t = l<<libc.Int32FromInt32(1) | l>>libc.Int32FromInt32(31)
  3743. u = t ^ *(*TCARD32)(unsafe.Pointer(s + uintptr(i+int32(2))*4))
  3744. t = t ^ *(*TCARD32)(unsafe.Pointer(s + uintptr(i+int32(2)+int32(1))*4))
  3745. t = t>>libc.Int32FromInt32(4) | t<<libc.Int32FromInt32(28)
  3746. r ^= *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 1*256 + uintptr(t&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 3*256 + uintptr(t>>libc.Int32FromInt32(8)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 5*256 + uintptr(t>>libc.Int32FromInt32(16)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 7*256 + uintptr(t>>libc.Int32FromInt32(24)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + uintptr(u&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 2*256 + uintptr(u>>libc.Int32FromInt32(8)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 4*256 + uintptr(u>>libc.Int32FromInt32(16)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 6*256 + uintptr(u>>libc.Int32FromInt32(24)&uint32(0x3f))*4)) /* 2 */
  3747. goto _9
  3748. _9:
  3749. ;
  3750. i += int32(4)
  3751. }
  3752. } else {
  3753. i = libc.Int32FromInt32(m_ITERATIONS)*libc.Int32FromInt32(2) - libc.Int32FromInt32(2)
  3754. for {
  3755. if !(i >= 0) {
  3756. break
  3757. }
  3758. t = r<<libc.Int32FromInt32(1) | r>>libc.Int32FromInt32(31)
  3759. u = t ^ *(*TCARD32)(unsafe.Pointer(s + uintptr(i)*4))
  3760. t = t ^ *(*TCARD32)(unsafe.Pointer(s + uintptr(i+int32(1))*4))
  3761. t = t>>libc.Int32FromInt32(4) | t<<libc.Int32FromInt32(28)
  3762. l ^= *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 1*256 + uintptr(t&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 3*256 + uintptr(t>>libc.Int32FromInt32(8)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 5*256 + uintptr(t>>libc.Int32FromInt32(16)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 7*256 + uintptr(t>>libc.Int32FromInt32(24)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + uintptr(u&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 2*256 + uintptr(u>>libc.Int32FromInt32(8)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 4*256 + uintptr(u>>libc.Int32FromInt32(16)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 6*256 + uintptr(u>>libc.Int32FromInt32(24)&uint32(0x3f))*4)) /* 1 */
  3763. t = l<<libc.Int32FromInt32(1) | l>>libc.Int32FromInt32(31)
  3764. u = t ^ *(*TCARD32)(unsafe.Pointer(s + uintptr(i-int32(2))*4))
  3765. t = t ^ *(*TCARD32)(unsafe.Pointer(s + uintptr(i-int32(2)+int32(1))*4))
  3766. t = t>>libc.Int32FromInt32(4) | t<<libc.Int32FromInt32(28)
  3767. r ^= *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 1*256 + uintptr(t&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 3*256 + uintptr(t>>libc.Int32FromInt32(8)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 5*256 + uintptr(t>>libc.Int32FromInt32(16)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 7*256 + uintptr(t>>libc.Int32FromInt32(24)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + uintptr(u&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 2*256 + uintptr(u>>libc.Int32FromInt32(8)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 4*256 + uintptr(u>>libc.Int32FromInt32(16)&uint32(0x3f))*4)) | *(*TCARD32)(unsafe.Pointer(uintptr(unsafe.Pointer(&_SPtrans)) + 6*256 + uintptr(u>>libc.Int32FromInt32(24)&uint32(0x3f))*4)) /* 2 */
  3768. goto _10
  3769. _10:
  3770. ;
  3771. i -= int32(4)
  3772. }
  3773. }
  3774. /* swap l and r
  3775. * we will not do the swap so just remember they are
  3776. * reversed for the rest of the subroutine
  3777. * luckily by FP fixes this problem :-) */
  3778. t = (r>>libc.Int32FromInt32(1) ^ l) & libc.Uint32FromInt32(libc.Int32FromInt32(0x55555555))
  3779. l ^= t
  3780. r ^= t << libc.Int32FromInt32(1)
  3781. t = (l>>libc.Int32FromInt32(8) ^ r) & libc.Uint32FromInt32(libc.Int32FromInt32(0x00ff00ff))
  3782. r ^= t
  3783. l ^= t << libc.Int32FromInt32(8)
  3784. t = (r>>libc.Int32FromInt32(2) ^ l) & libc.Uint32FromInt32(libc.Int32FromInt32(0x33333333))
  3785. l ^= t
  3786. r ^= t << libc.Int32FromInt32(2)
  3787. t = (l>>libc.Int32FromInt32(16) ^ r) & libc.Uint32FromInt32(libc.Int32FromInt32(0x0000ffff))
  3788. r ^= t
  3789. l ^= t << libc.Int32FromInt32(16)
  3790. t = (r>>libc.Int32FromInt32(4) ^ l) & libc.Uint32FromInt32(libc.Int32FromInt32(0x0f0f0f0f))
  3791. l ^= t
  3792. r ^= t << libc.Int32FromInt32(4)
  3793. v11 = out
  3794. out++
  3795. *(*TCARD8)(unsafe.Pointer(v11)) = uint8(l & libc.Uint32FromInt32(0xff))
  3796. v12 = out
  3797. out++
  3798. *(*TCARD8)(unsafe.Pointer(v12)) = uint8(l >> libc.Int32FromInt32(8) & libc.Uint32FromInt32(0xff))
  3799. v13 = out
  3800. out++
  3801. *(*TCARD8)(unsafe.Pointer(v13)) = uint8(l >> libc.Int32FromInt32(16) & libc.Uint32FromInt32(0xff))
  3802. v14 = out
  3803. out++
  3804. *(*TCARD8)(unsafe.Pointer(v14)) = uint8(l >> libc.Int32FromInt32(24) & libc.Uint32FromInt32(0xff))
  3805. v15 = out
  3806. out++
  3807. *(*TCARD8)(unsafe.Pointer(v15)) = uint8(r & libc.Uint32FromInt32(0xff))
  3808. v16 = out
  3809. out++
  3810. *(*TCARD8)(unsafe.Pointer(v16)) = uint8(r >> libc.Int32FromInt32(8) & libc.Uint32FromInt32(0xff))
  3811. v17 = out
  3812. out++
  3813. *(*TCARD8)(unsafe.Pointer(v17)) = uint8(r >> libc.Int32FromInt32(16) & libc.Uint32FromInt32(0xff))
  3814. v18 = out
  3815. out++
  3816. *(*TCARD8)(unsafe.Pointer(v18)) = uint8(r >> libc.Int32FromInt32(24) & libc.Uint32FromInt32(0xff))
  3817. return
  3818. }