diff --git a/go.mod b/go.mod index aceedcb4..4e7f10fa 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ module github.com/conductorone/baton-postgresql -go 1.22.7 +go 1.22.10 -toolchain go1.23.2 +toolchain go1.23.4 require ( - github.com/conductorone/baton-sdk v0.2.51 + github.com/conductorone/baton-sdk v0.2.65 github.com/georgysavva/scany v1.2.2 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/jackc/pgx/v4 v4.18.3 @@ -14,11 +14,10 @@ require ( ) require ( - filippo.io/age v1.2.0 // indirect + filippo.io/age v1.2.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect - github.com/allegro/bigcache/v3 v3.1.0 // indirect github.com/aws/aws-sdk-go-v2 v1.32.4 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect github.com/aws/aws-sdk-go-v2/config v1.28.3 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.44 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 // indirect @@ -27,7 +26,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.4 // indirect @@ -35,13 +34,15 @@ require ( github.com/aws/aws-sdk-go-v2/service/sso v1.24.5 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 // indirect - github.com/aws/smithy-go v1.22.0 // indirect + github.com/aws/smithy-go v1.22.1 // indirect github.com/benbjohnson/clock v1.3.5 // indirect - github.com/deckarep/golang-set/v2 v2.6.0 // indirect + github.com/deckarep/golang-set/v2 v2.7.0 // indirect + github.com/dolthub/maphash v0.1.0 // indirect github.com/doug-martin/goqu/v9 v9.19.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/gammazero/deque v1.0.0 // indirect github.com/glebarez/go-sqlite v1.22.0 // indirect github.com/go-jose/go-jose/v3 v3.0.3 // indirect github.com/go-ole/go-ole v1.3.0 // indirect @@ -59,8 +60,9 @@ require ( github.com/jackc/puddle v1.3.0 // indirect github.com/klauspost/compress v1.17.11 // indirect github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect - github.com/magiconair/properties v1.8.7 // indirect + github.com/magiconair/properties v1.8.9 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/maypok86/otter v1.2.4 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect @@ -74,33 +76,33 @@ require ( github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.7.0 // indirect + github.com/spf13/cast v1.7.1 // indirect github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.9.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/otel v1.31.0 // indirect - go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel v1.33.0 // indirect + go.opentelemetry.io/otel/metric v1.33.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.3.1 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.24.0 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/text v0.19.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + golang.org/x/crypto v0.32.0 // indirect + golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect + golang.org/x/net v0.34.0 // indirect + golang.org/x/oauth2 v0.25.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.29.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect google.golang.org/grpc v1.68.0 // indirect - google.golang.org/protobuf v1.35.1 // indirect + google.golang.org/protobuf v1.36.3 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - modernc.org/libc v1.61.0 // indirect - modernc.org/mathutil v1.6.0 // indirect - modernc.org/memory v1.8.0 // indirect - modernc.org/sqlite v1.33.1 // indirect + modernc.org/libc v1.61.8 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.8.2 // indirect + modernc.org/sqlite v1.34.4 // indirect ) diff --git a/go.sum b/go.sum index 2dff76f0..0ffe4f54 100644 --- a/go.sum +++ b/go.sum @@ -1,20 +1,18 @@ c2sp.org/CCTV/age v0.0.0-20240306222714-3ec4d716e805 h1:u2qwJeEvnypw+OCPUHmoZE3IqwfuN5kgDfo5MLzpNM0= c2sp.org/CCTV/age v0.0.0-20240306222714-3ec4d716e805/go.mod h1:FomMrUJ2Lxt5jCLmZkG3FHa72zUprnhd3v/Z18Snm4w= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -filippo.io/age v1.2.0 h1:vRDp7pUMaAJzXNIWJVAZnEf/Dyi4Vu4wI8S1LBzufhE= -filippo.io/age v1.2.0/go.mod h1:JL9ew2lTN+Pyft4RiNGguFfOpewKwSHm5ayKD/A4004= +filippo.io/age v1.2.1 h1:X0TZjehAZylOIj4DubWYU1vWQxv9bJpo+Uu2/LGhi1o= +filippo.io/age v1.2.1/go.mod h1:JL9ew2lTN+Pyft4RiNGguFfOpewKwSHm5ayKD/A4004= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk= -github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I= github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE= github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 h1:pT3hpW0cOHRJx8Y0DfJUEQuqPild8jRGmSFmBgvydr0= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6/go.mod h1:j/I2++U0xX+cr44QjHay4Cvxj6FUbnxrgmqN3H1jTZA= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 h1:lL7IfaFzngfx0ZwUGOZdsFFnQ5uLvR0hWqqhyE7Q9M8= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7/go.mod h1:QraP0UcVlQJsmHfioCrveWOC1nbiWUl3ej08h4mXWoc= github.com/aws/aws-sdk-go-v2/config v1.28.3 h1:kL5uAptPcPKaJ4q0sDUjUIdueO18Q7JDzl64GpVwdOM= github.com/aws/aws-sdk-go-v2/config v1.28.3/go.mod h1:SPEn1KA8YbgQnwiJ/OISU4fz7+F6Fe309Jf0QTsRCl4= github.com/aws/aws-sdk-go-v2/credentials v1.17.44 h1:qqfs5kulLUHUEXlHEZXLJkgGoF3kkUeFUTVA585cFpU= @@ -31,8 +29,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvK github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23 h1:1SZBDiRzzs3sNhOMVApyWPduWYGAX0imGy06XiBnCAM= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23/go.mod h1:i9TkxgbZmHVh2S0La6CAXtnyFhlCX/pJ0JsOvBAS6Mk= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4 h1:aaPpoG15S2qHkWm4KlEyF01zovK1nW4BBbyXuHNSE90= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4/go.mod h1:eD9gS2EARTKgGr/W5xwgY/ik9z/zqpW+m/xOQbVxrMk= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4 h1:tHxQi/XHPK0ctd/wdOw0t7Xrc2OxcRCnVzv8lwWPu0c= @@ -47,8 +45,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 h1:zcx9LiGWZ6i6pjdcoE9oXAB6 github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4/go.mod h1:Tp/ly1cTjRLGBBmNccFumbZ8oqpZlpdhFf80SrRh4is= github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 h1:yDxvkz3/uOKfxnv8YhzOi9m+2OGIxF+on3KOISbK5IU= github.com/aws/aws-sdk-go-v2/service/sts v1.32.4/go.mod h1:9XEUty5v5UAsMiFOBJrNibZgwCeOma73jgGwwhgffa8= -github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= -github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= +github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -59,8 +57,8 @@ github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go/v2 v2.2.0 h1:/5znzg5n373N/3ESjHF5SMLxiW4RKB05Ql//KWfeTFs= github.com/cockroachdb/cockroach-go/v2 v2.2.0/go.mod h1:u3MiKYGupPPjkn3ozknpMUpxPaNLTFWAya419/zv6eI= -github.com/conductorone/baton-sdk v0.2.51 h1:YKvf3LtSWWRIPnOYgc+fOtEuNIjVcrkYs99y8j461qU= -github.com/conductorone/baton-sdk v0.2.51/go.mod h1:CYyNk1kPIEgZmc3Z16TmpS1l3KbkNSjyJk16KuQw+JM= +github.com/conductorone/baton-sdk v0.2.65 h1:lD/MQ15GBCZQ0uCJ+QhBfrxnL36gxFKgdqYmPDBJrGY= +github.com/conductorone/baton-sdk v0.2.65/go.mod h1:++OGHvXelWE8B/n4539ZgsXkwyV376AF/AAP+HhXJ1M= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -69,9 +67,11 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= -github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/deckarep/golang-set/v2 v2.7.0 h1:gIloKvD7yH2oip4VLhsv3JyLLFnC0Y2mlusgcvJYW5k= +github.com/deckarep/golang-set/v2 v2.7.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dolthub/maphash v0.1.0 h1:bsQ7JsF4FkkWyrP3oCnFJgrCUAFbFf3kOl4L/QxPDyQ= +github.com/dolthub/maphash v0.1.0/go.mod h1:gkg4Ch4CdCDu5h6PMriVLawB7koZ+5ijb9puGMV50a4= github.com/doug-martin/goqu/v9 v9.19.0 h1:PD7t1X3tRcUiSdc5TEyOFKujZA5gs3VSA7wxSvBx7qo= github.com/doug-martin/goqu/v9 v9.19.0/go.mod h1:nf0Wc2/hV3gYK9LiyqIrzBEVGlI8qW3GuDCEobC4wBQ= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -86,6 +86,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34= +github.com/gammazero/deque v1.0.0/go.mod h1:iflpYvtGfM3U8S8j+sZEKIak3SAKYpA5/SQewgfXDKo= github.com/georgysavva/scany v1.2.2 h1:ckhXrq3HuM+myrLaYg9fEbA/gUFysUz8NSWq12DjoGU= github.com/georgysavva/scany v1.2.2/go.mod h1:vGBpL5XRLOocMFFa55pj0P04DrL3I7qKVRL49K6Eu5o= github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ= @@ -228,8 +230,8 @@ github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 h1:7UMa6KCCMjZEMDtTVdcGu0B1GmmC7QJKiCCjyTAWQy0= github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -244,6 +246,8 @@ github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/maypok86/otter v1.2.4 h1:HhW1Pq6VdJkmWwcZZq19BlEQkHtI8xgsQzBVXJU0nfc= +github.com/maypok86/otter v1.2.4/go.mod h1:mKLfoI7v1HOmQMwFgX4QkRk23mX6ge3RDvjdHOWG4R4= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= @@ -294,8 +298,8 @@ github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9yS github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= -github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= +github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -316,8 +320,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= @@ -330,18 +334,20 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= +go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= +go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= +go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -384,11 +390,11 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY= -golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= +golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA= +golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -399,8 +405,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -415,11 +421,11 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= -golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70= +golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -427,8 +433,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -455,16 +461,16 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -475,8 +481,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -494,8 +500,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -507,8 +513,8 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -516,8 +522,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= +google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= @@ -542,27 +548,27 @@ gorm.io/gorm v1.21.4/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -modernc.org/cc/v4 v4.21.4 h1:3Be/Rdo1fpr8GrQ7IVw9OHtplU4gWbb+wNgeoBMmGLQ= -modernc.org/cc/v4 v4.21.4/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ= -modernc.org/ccgo/v4 v4.21.0 h1:kKPI3dF7RIag8YcToh5ZwDcVMIv6VGa0ED5cvh0LMW4= -modernc.org/ccgo/v4 v4.21.0/go.mod h1:h6kt6H/A2+ew/3MW/p6KEoQmrq/i3pr0J/SiwiaF/g0= +modernc.org/cc/v4 v4.24.4 h1:TFkx1s6dCkQpd6dKurBNmpo+G8Zl4Sq/ztJ+2+DEsh0= +modernc.org/cc/v4 v4.24.4/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= +modernc.org/ccgo/v4 v4.23.12 h1:UF08a38c4B+K3VoGipBrVWLFUCHd8+X20QZtFAIlQNk= +modernc.org/ccgo/v4 v4.23.12/go.mod h1:vdN4h2WR5aEoNondUx26K7G8X+nuBscYnAEWSRmN2/0= modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= -modernc.org/gc/v2 v2.5.0 h1:bJ9ChznK1L1mUtAQtxi0wi5AtAs5jQuw4PrPHO5pb6M= -modernc.org/gc/v2 v2.5.0/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= -modernc.org/libc v1.61.0 h1:eGFcvWpqlnoGwzZeZe3PWJkkKbM/3SUGyk1DVZQ0TpE= -modernc.org/libc v1.61.0/go.mod h1:DvxVX89wtGTu+r72MLGhygpfi3aUGgZRdAYGCAVVud0= -modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= -modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= -modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= -modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sortutil v1.2.0 h1:jQiD3PfS2REGJNzNCMMaLSp/wdMNieTbKX920Cqdgqc= -modernc.org/sortutil v1.2.0/go.mod h1:TKU2s7kJMf1AE84OoiGppNHJwvB753OYfNl2WRb++Ss= -modernc.org/sqlite v1.33.1 h1:trb6Z3YYoeM9eDL1O8do81kP+0ejv+YzgyFo+Gwy0nM= -modernc.org/sqlite v1.33.1/go.mod h1:pXV2xHxhzXZsgT/RtTFAPY6JJDEvOTcTdwADQCCWD4k= -modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= -modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= +modernc.org/gc/v2 v2.6.1 h1:+Qf6xdG8l7B27TQ8D8lw/iFMUj1RXRBOuMUWziJOsk8= +modernc.org/gc/v2 v2.6.1/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= +modernc.org/libc v1.61.8 h1:50KrjlFFoKq9ABh+bNVUf5SfVfQ4NY7CEyFBh65qc60= +modernc.org/libc v1.61.8/go.mod h1:XloulGc0yIRM+91kbwrp7jNi/mfYPAvDOD2qwzWEij0= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.8.2 h1:cL9L4bcoAObu4NkxOlKWBWtNHIsnnACGF/TbqQ6sbcI= +modernc.org/memory v1.8.2/go.mod h1:ZbjSvMO5NQ1A2i3bWeDiVMxIorXwdClKE/0SZ+BMotU= +modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= +modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= +modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= +modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= +modernc.org/sqlite v1.34.4 h1:sjdARozcL5KJBvYQvLlZEmctRgW9xqIZc2ncN7PU0P8= +modernc.org/sqlite v1.34.4/go.mod h1:3QQFCG2SEMtc2nv+Wq4cQCH7Hjcg+p/RMlS1XK+zwbk= +modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= +modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/pkg/connector/connector.go b/pkg/connector/connector.go index b323d791..fb288cb9 100644 --- a/pkg/connector/connector.go +++ b/pkg/connector/connector.go @@ -39,6 +39,16 @@ func (c *Postgresql) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error return &v2.ConnectorMetadata{ DisplayName: "Postgresql", Annotations: annos, + AccountCreationSchema: &v2.ConnectorAccountCreationSchema{ + FieldMap: map[string]*v2.ConnectorAccountCreationSchema_Field{ + "email": { + DisplayName: "email", + Required: true, + Description: "This email will be used as the login for the user.", + Field: &v2.ConnectorAccountCreationSchema_Field_StringField{}, + }, + }, + }, }, nil } diff --git a/vendor/filippo.io/age/README.md b/vendor/filippo.io/age/README.md index b2ccbd05..3d69d5be 100644 --- a/vendor/filippo.io/age/README.md +++ b/vendor/filippo.io/age/README.md @@ -157,6 +157,39 @@ go install filippo.io/age/cmd/...@latest Help from new packagers is very welcome. +### Verifying the release signatures + +If you download the pre-built binaries, you can check their +[Sigsum](https://www.sigsum.org) proofs, which are like signatures with extra +transparency: you can cryptographically verify that every proof is logged in a +public append-only log, so you can hold the age project accountable for every +binary release we ever produced. This is similar to what the [Go Checksum +Database](https://go.dev/blog/module-mirror-launch) provides. + +``` +cat << EOF > age-sigsum-key.pub +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM1WpnEswJLPzvXJDiswowy48U+G+G1kmgwUE2eaRHZG +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAz2WM5CyPLqiNjk7CLl4roDXwKhQ0QExXLebukZEZFS +EOF +cat << EOF > sigsum-trust-policy.txt +log 154f49976b59ff09a123675f58cb3e346e0455753c3c3b15d465dcb4f6512b0b https://poc.sigsum.org/jellyfish +witness poc.sigsum.org/nisse 1c25f8a44c635457e2e391d1efbca7d4c2951a0aef06225a881e46b98962ac6c +witness rgdd.se/poc-witness 28c92a5a3a054d317c86fc2eeb6a7ab2054d6217100d0be67ded5b74323c5806 +group demo-quorum-rule all poc.sigsum.org/nisse rgdd.se/poc-witness +quorum demo-quorum-rule +EOF + +curl -JLO "https://dl.filippo.io/age/v1.2.0?for=darwin/arm64" +curl -JLO "https://dl.filippo.io/age/v1.2.0?for=darwin/arm64&proof" + +go install sigsum.org/sigsum-go/cmd/sigsum-verify@v0.8.0 +sigsum-verify -k age-sigsum-key.pub -p sigsum-trust-policy.txt \ + age-v1.2.0-darwin-arm64.tar.gz.proof < age-v1.2.0-darwin-arm64.tar.gz +``` + +You can learn more about what's happening above in the [Sigsum +docs](https://www.sigsum.org/getting-started/). + ## Usage For the full documentation, read [the age(1) man page](https://filippo.io/age/age.1). diff --git a/vendor/filippo.io/age/internal/format/format.go b/vendor/filippo.io/age/internal/format/format.go index aa77b756..0f22e6fa 100644 --- a/vendor/filippo.io/age/internal/format/format.go +++ b/vendor/filippo.io/age/internal/format/format.go @@ -201,7 +201,7 @@ func (r *StanzaReader) ReadStanza() (s *Stanza, err error) { b, err := DecodeString(strings.TrimSuffix(string(line), "\n")) if err != nil { if bytes.HasPrefix(line, footerPrefix) || bytes.HasPrefix(line, stanzaPrefix) { - return nil, fmt.Errorf("malformed body line %q: stanza ended without a short line\nNote: this might be a file encrypted with an old beta version of age or rage. Use age v1.0.0-beta6 or rage to decrypt it.", line) + return nil, fmt.Errorf("malformed body line %q: stanza ended without a short line\nnote: this might be a file encrypted with an old beta version of age or rage; use age v1.0.0-beta6 or rage to decrypt it", line) } return nil, errorf("malformed body line %q: %v", line, err) } diff --git a/vendor/filippo.io/age/internal/stream/stream.go b/vendor/filippo.io/age/internal/stream/stream.go index 7cf02c47..7551274b 100644 --- a/vendor/filippo.io/age/internal/stream/stream.go +++ b/vendor/filippo.io/age/internal/stream/stream.go @@ -12,7 +12,6 @@ import ( "io" "golang.org/x/crypto/chacha20poly1305" - "golang.org/x/crypto/poly1305" ) const ChunkSize = 64 * 1024 @@ -29,7 +28,7 @@ type Reader struct { } const ( - encChunkSize = ChunkSize + poly1305.TagSize + encChunkSize = ChunkSize + chacha20poly1305.Overhead lastChunkFlag = 0x01 ) diff --git a/vendor/github.com/allegro/bigcache/v3/.codecov.yml b/vendor/github.com/allegro/bigcache/v3/.codecov.yml deleted file mode 100644 index d8c862ec..00000000 --- a/vendor/github.com/allegro/bigcache/v3/.codecov.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -codecov: - require_ci_to_pass: true -comment: - behavior: default - layout: reach, diff, flags, files, footer - require_base: false - require_changes: false - require_head: true -coverage: - precision: 2 - range: - - 70 - - 100 - round: down - status: - changes: false - patch: true - project: true -parsers: - gcov: - branch_detection: - conditional: true - loop: true - macro: false - method: false - javascript: - enable_partials: false diff --git a/vendor/github.com/allegro/bigcache/v3/.gitignore b/vendor/github.com/allegro/bigcache/v3/.gitignore deleted file mode 100644 index 78869152..00000000 --- a/vendor/github.com/allegro/bigcache/v3/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.idea -.DS_Store -/server/server.exe -/server/server -/server/server_dar* -/server/server_fre* -/server/server_win* -/server/server_net* -/server/server_ope* -/server/server_lin* -CHANGELOG.md diff --git a/vendor/github.com/allegro/bigcache/v3/README.md b/vendor/github.com/allegro/bigcache/v3/README.md deleted file mode 100644 index 253749be..00000000 --- a/vendor/github.com/allegro/bigcache/v3/README.md +++ /dev/null @@ -1,204 +0,0 @@ -# BigCache [![Build Status](https://github.com/allegro/bigcache/workflows/build/badge.svg)](https://github.com/allegro/bigcache/actions?query=workflow%3Abuild) [![Coverage Status](https://coveralls.io/repos/github/allegro/bigcache/badge.svg?branch=master)](https://coveralls.io/github/allegro/bigcache?branch=master) [![GoDoc](https://godoc.org/github.com/allegro/bigcache/v3?status.svg)](https://godoc.org/github.com/allegro/bigcache/v3) [![Go Report Card](https://goreportcard.com/badge/github.com/allegro/bigcache/v3)](https://goreportcard.com/report/github.com/allegro/bigcache/v3) - -Fast, concurrent, evicting in-memory cache written to keep big number of entries without impact on performance. -BigCache keeps entries on heap but omits GC for them. To achieve that, operations on byte slices take place, -therefore entries (de)serialization in front of the cache will be needed in most use cases. - -Requires Go 1.12 or newer. - -## Usage - -### Simple initialization - -```go -import ( - "fmt" - "context" - "github.com/allegro/bigcache/v3" -) - -cache, _ := bigcache.New(context.Background(), bigcache.DefaultConfig(10 * time.Minute)) - -cache.Set("my-unique-key", []byte("value")) - -entry, _ := cache.Get("my-unique-key") -fmt.Println(string(entry)) -``` - -### Custom initialization - -When cache load can be predicted in advance then it is better to use custom initialization because additional memory -allocation can be avoided in that way. - -```go -import ( - "log" - - "github.com/allegro/bigcache/v3" -) - -config := bigcache.Config { - // number of shards (must be a power of 2) - Shards: 1024, - - // time after which entry can be evicted - LifeWindow: 10 * time.Minute, - - // Interval between removing expired entries (clean up). - // If set to <= 0 then no action is performed. - // Setting to < 1 second is counterproductive — bigcache has a one second resolution. - CleanWindow: 5 * time.Minute, - - // rps * lifeWindow, used only in initial memory allocation - MaxEntriesInWindow: 1000 * 10 * 60, - - // max entry size in bytes, used only in initial memory allocation - MaxEntrySize: 500, - - // prints information about additional memory allocation - Verbose: true, - - // cache will not allocate more memory than this limit, value in MB - // if value is reached then the oldest entries can be overridden for the new ones - // 0 value means no size limit - HardMaxCacheSize: 8192, - - // callback fired when the oldest entry is removed because of its expiration time or no space left - // for the new entry, or because delete was called. A bitmask representing the reason will be returned. - // Default value is nil which means no callback and it prevents from unwrapping the oldest entry. - OnRemove: nil, - - // OnRemoveWithReason is a callback fired when the oldest entry is removed because of its expiration time or no space left - // for the new entry, or because delete was called. A constant representing the reason will be passed through. - // Default value is nil which means no callback and it prevents from unwrapping the oldest entry. - // Ignored if OnRemove is specified. - OnRemoveWithReason: nil, - } - -cache, initErr := bigcache.New(context.Background(), config) -if initErr != nil { - log.Fatal(initErr) -} - -cache.Set("my-unique-key", []byte("value")) - -if entry, err := cache.Get("my-unique-key"); err == nil { - fmt.Println(string(entry)) -} -``` - -### `LifeWindow` & `CleanWindow` - -1. `LifeWindow` is a time. After that time, an entry can be called dead but not deleted. - -2. `CleanWindow` is a time. After that time, all the dead entries will be deleted, but not the entries that still have life. - -## [Benchmarks](https://github.com/allegro/bigcache-bench) - -Three caches were compared: bigcache, [freecache](https://github.com/coocood/freecache) and map. -Benchmark tests were made using an -i7-6700K CPU @ 4.00GHz with 32GB of RAM on Ubuntu 18.04 LTS (5.2.12-050212-generic). - -Benchmarks source code can be found [here](https://github.com/allegro/bigcache-bench) - -### Writes and reads - -```bash -go version -go version go1.13 linux/amd64 - -go test -bench=. -benchmem -benchtime=4s ./... -timeout 30m -goos: linux -goarch: amd64 -pkg: github.com/allegro/bigcache/v3/caches_bench -BenchmarkMapSet-8 12999889 376 ns/op 199 B/op 3 allocs/op -BenchmarkConcurrentMapSet-8 4355726 1275 ns/op 337 B/op 8 allocs/op -BenchmarkFreeCacheSet-8 11068976 703 ns/op 328 B/op 2 allocs/op -BenchmarkBigCacheSet-8 10183717 478 ns/op 304 B/op 2 allocs/op -BenchmarkMapGet-8 16536015 324 ns/op 23 B/op 1 allocs/op -BenchmarkConcurrentMapGet-8 13165708 401 ns/op 24 B/op 2 allocs/op -BenchmarkFreeCacheGet-8 10137682 690 ns/op 136 B/op 2 allocs/op -BenchmarkBigCacheGet-8 11423854 450 ns/op 152 B/op 4 allocs/op -BenchmarkBigCacheSetParallel-8 34233472 148 ns/op 317 B/op 3 allocs/op -BenchmarkFreeCacheSetParallel-8 34222654 268 ns/op 350 B/op 3 allocs/op -BenchmarkConcurrentMapSetParallel-8 19635688 240 ns/op 200 B/op 6 allocs/op -BenchmarkBigCacheGetParallel-8 60547064 86.1 ns/op 152 B/op 4 allocs/op -BenchmarkFreeCacheGetParallel-8 50701280 147 ns/op 136 B/op 3 allocs/op -BenchmarkConcurrentMapGetParallel-8 27353288 175 ns/op 24 B/op 2 allocs/op -PASS -ok github.com/allegro/bigcache/v3/caches_bench 256.257s -``` - -Writes and reads in bigcache are faster than in freecache. -Writes to map are the slowest. - -### GC pause time - -```bash -go version -go version go1.13 linux/amd64 - -go run caches_gc_overhead_comparison.go - -Number of entries: 20000000 -GC pause for bigcache: 1.506077ms -GC pause for freecache: 5.594416ms -GC pause for map: 9.347015ms -``` - -``` -go version -go version go1.13 linux/arm64 - -go run caches_gc_overhead_comparison.go -Number of entries: 20000000 -GC pause for bigcache: 22.382827ms -GC pause for freecache: 41.264651ms -GC pause for map: 72.236853ms -``` - -Test shows how long are the GC pauses for caches filled with 20mln of entries. -Bigcache and freecache have very similar GC pause time. - -### Memory usage - -You may encounter system memory reporting what appears to be an exponential increase, however this is expected behaviour. Go runtime allocates memory in chunks or 'spans' and will inform the OS when they are no longer required by changing their state to 'idle'. The 'spans' will remain part of the process resource usage until the OS needs to repurpose the address. Further reading available [here](https://utcc.utoronto.ca/~cks/space/blog/programming/GoNoMemoryFreeing). - -## How it works - -BigCache relies on optimization presented in 1.5 version of Go ([issue-9477](https://github.com/golang/go/issues/9477)). -This optimization states that if map without pointers in keys and values is used then GC will omit its content. -Therefore BigCache uses `map[uint64]uint32` where keys are hashed and values are offsets of entries. - -Entries are kept in byte slices, to omit GC again. -Byte slices size can grow to gigabytes without impact on performance -because GC will only see single pointer to it. - -### Collisions - -BigCache does not handle collisions. When new item is inserted and it's hash collides with previously stored item, new item overwrites previously stored value. - -## Bigcache vs Freecache - -Both caches provide the same core features but they reduce GC overhead in different ways. -Bigcache relies on `map[uint64]uint32`, freecache implements its own mapping built on -slices to reduce number of pointers. - -Results from benchmark tests are presented above. -One of the advantage of bigcache over freecache is that you don’t need to know -the size of the cache in advance, because when bigcache is full, -it can allocate additional memory for new entries instead of -overwriting existing ones as freecache does currently. -However hard max size in bigcache also can be set, check [HardMaxCacheSize](https://godoc.org/github.com/allegro/bigcache#Config). - -## HTTP Server - -This package also includes an easily deployable HTTP implementation of BigCache, which can be found in the [server](/server) package. - -## More - -Bigcache genesis is described in allegro.tech blog post: [writing a very fast cache service in Go](http://allegro.tech/2016/03/writing-fast-cache-service-in-go.html) - -## License - -BigCache is released under the Apache 2.0 license (see [LICENSE](LICENSE)) diff --git a/vendor/github.com/allegro/bigcache/v3/bigcache.go b/vendor/github.com/allegro/bigcache/v3/bigcache.go deleted file mode 100644 index 17e2aca7..00000000 --- a/vendor/github.com/allegro/bigcache/v3/bigcache.go +++ /dev/null @@ -1,270 +0,0 @@ -package bigcache - -import ( - "context" - "fmt" - "time" -) - -const ( - minimumEntriesInShard = 10 // Minimum number of entries in single shard -) - -// BigCache is fast, concurrent, evicting cache created to keep big number of entries without impact on performance. -// It keeps entries on heap but omits GC for them. To achieve that, operations take place on byte arrays, -// therefore entries (de)serialization in front of the cache will be needed in most use cases. -type BigCache struct { - shards []*cacheShard - lifeWindow uint64 - clock clock - hash Hasher - config Config - shardMask uint64 - close chan struct{} -} - -// Response will contain metadata about the entry for which GetWithInfo(key) was called -type Response struct { - EntryStatus RemoveReason -} - -// RemoveReason is a value used to signal to the user why a particular key was removed in the OnRemove callback. -type RemoveReason uint32 - -const ( - // Expired means the key is past its LifeWindow. - Expired = RemoveReason(1) - // NoSpace means the key is the oldest and the cache size was at its maximum when Set was called, or the - // entry exceeded the maximum shard size. - NoSpace = RemoveReason(2) - // Deleted means Delete was called and this key was removed as a result. - Deleted = RemoveReason(3) -) - -// New initialize new instance of BigCache -func New(ctx context.Context, config Config) (*BigCache, error) { - return newBigCache(ctx, config, &systemClock{}) -} - -// NewBigCache initialize new instance of BigCache -// -// Deprecated: NewBigCache is deprecated, please use New(ctx, config) instead, -// New takes in context and can gracefully -// shutdown with context cancellations -func NewBigCache(config Config) (*BigCache, error) { - return newBigCache(context.Background(), config, &systemClock{}) -} - -func newBigCache(ctx context.Context, config Config, clock clock) (*BigCache, error) { - if !isPowerOfTwo(config.Shards) { - return nil, fmt.Errorf("Shards number must be power of two") - } - if config.MaxEntrySize < 0 { - return nil, fmt.Errorf("MaxEntrySize must be >= 0") - } - if config.MaxEntriesInWindow < 0 { - return nil, fmt.Errorf("MaxEntriesInWindow must be >= 0") - } - if config.HardMaxCacheSize < 0 { - return nil, fmt.Errorf("HardMaxCacheSize must be >= 0") - } - - if config.Hasher == nil { - config.Hasher = newDefaultHasher() - } - - cache := &BigCache{ - shards: make([]*cacheShard, config.Shards), - lifeWindow: uint64(config.LifeWindow.Seconds()), - clock: clock, - hash: config.Hasher, - config: config, - shardMask: uint64(config.Shards - 1), - close: make(chan struct{}), - } - - var onRemove func(wrappedEntry []byte, reason RemoveReason) - if config.OnRemoveWithMetadata != nil { - onRemove = cache.providedOnRemoveWithMetadata - } else if config.OnRemove != nil { - onRemove = cache.providedOnRemove - } else if config.OnRemoveWithReason != nil { - onRemove = cache.providedOnRemoveWithReason - } else { - onRemove = cache.notProvidedOnRemove - } - - for i := 0; i < config.Shards; i++ { - cache.shards[i] = initNewShard(config, onRemove, clock) - } - - if config.CleanWindow > 0 { - go func() { - ticker := time.NewTicker(config.CleanWindow) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - fmt.Println("ctx done, shutting down bigcache cleanup routine") - return - case t := <-ticker.C: - cache.cleanUp(uint64(t.Unix())) - case <-cache.close: - return - } - } - }() - } - - return cache, nil -} - -// Close is used to signal a shutdown of the cache when you are done with it. -// This allows the cleaning goroutines to exit and ensures references are not -// kept to the cache preventing GC of the entire cache. -func (c *BigCache) Close() error { - close(c.close) - return nil -} - -// Get reads entry for the key. -// It returns an ErrEntryNotFound when -// no entry exists for the given key. -func (c *BigCache) Get(key string) ([]byte, error) { - hashedKey := c.hash.Sum64(key) - shard := c.getShard(hashedKey) - return shard.get(key, hashedKey) -} - -// GetWithInfo reads entry for the key with Response info. -// It returns an ErrEntryNotFound when -// no entry exists for the given key. -func (c *BigCache) GetWithInfo(key string) ([]byte, Response, error) { - hashedKey := c.hash.Sum64(key) - shard := c.getShard(hashedKey) - return shard.getWithInfo(key, hashedKey) -} - -// Set saves entry under the key -func (c *BigCache) Set(key string, entry []byte) error { - hashedKey := c.hash.Sum64(key) - shard := c.getShard(hashedKey) - return shard.set(key, hashedKey, entry) -} - -// Append appends entry under the key if key exists, otherwise -// it will set the key (same behaviour as Set()). With Append() you can -// concatenate multiple entries under the same key in an lock optimized way. -func (c *BigCache) Append(key string, entry []byte) error { - hashedKey := c.hash.Sum64(key) - shard := c.getShard(hashedKey) - return shard.append(key, hashedKey, entry) -} - -// Delete removes the key -func (c *BigCache) Delete(key string) error { - hashedKey := c.hash.Sum64(key) - shard := c.getShard(hashedKey) - return shard.del(hashedKey) -} - -// Reset empties all cache shards -func (c *BigCache) Reset() error { - for _, shard := range c.shards { - shard.reset(c.config) - } - return nil -} - -// ResetStats resets cache stats -func (c *BigCache) ResetStats() error { - for _, shard := range c.shards { - shard.resetStats() - } - return nil -} - -// Len computes number of entries in cache -func (c *BigCache) Len() int { - var len int - for _, shard := range c.shards { - len += shard.len() - } - return len -} - -// Capacity returns amount of bytes store in the cache. -func (c *BigCache) Capacity() int { - var len int - for _, shard := range c.shards { - len += shard.capacity() - } - return len -} - -// Stats returns cache's statistics -func (c *BigCache) Stats() Stats { - var s Stats - for _, shard := range c.shards { - tmp := shard.getStats() - s.Hits += tmp.Hits - s.Misses += tmp.Misses - s.DelHits += tmp.DelHits - s.DelMisses += tmp.DelMisses - s.Collisions += tmp.Collisions - } - return s -} - -// KeyMetadata returns number of times a cached resource was requested. -func (c *BigCache) KeyMetadata(key string) Metadata { - hashedKey := c.hash.Sum64(key) - shard := c.getShard(hashedKey) - return shard.getKeyMetadataWithLock(hashedKey) -} - -// Iterator returns iterator function to iterate over EntryInfo's from whole cache. -func (c *BigCache) Iterator() *EntryInfoIterator { - return newIterator(c) -} - -func (c *BigCache) onEvict(oldestEntry []byte, currentTimestamp uint64, evict func(reason RemoveReason) error) bool { - oldestTimestamp := readTimestampFromEntry(oldestEntry) - if currentTimestamp < oldestTimestamp { - return false - } - if currentTimestamp-oldestTimestamp > c.lifeWindow { - evict(Expired) - return true - } - return false -} - -func (c *BigCache) cleanUp(currentTimestamp uint64) { - for _, shard := range c.shards { - shard.cleanUp(currentTimestamp) - } -} - -func (c *BigCache) getShard(hashedKey uint64) (shard *cacheShard) { - return c.shards[hashedKey&c.shardMask] -} - -func (c *BigCache) providedOnRemove(wrappedEntry []byte, reason RemoveReason) { - c.config.OnRemove(readKeyFromEntry(wrappedEntry), readEntry(wrappedEntry)) -} - -func (c *BigCache) providedOnRemoveWithReason(wrappedEntry []byte, reason RemoveReason) { - if c.config.onRemoveFilter == 0 || (1< 0 { - c.config.OnRemoveWithReason(readKeyFromEntry(wrappedEntry), readEntry(wrappedEntry), reason) - } -} - -func (c *BigCache) notProvidedOnRemove(wrappedEntry []byte, reason RemoveReason) { -} - -func (c *BigCache) providedOnRemoveWithMetadata(wrappedEntry []byte, reason RemoveReason) { - hashedKey := c.hash.Sum64(readKeyFromEntry(wrappedEntry)) - shard := c.getShard(hashedKey) - c.config.OnRemoveWithMetadata(readKeyFromEntry(wrappedEntry), readEntry(wrappedEntry), shard.getKeyMetadata(hashedKey)) -} diff --git a/vendor/github.com/allegro/bigcache/v3/bytes.go b/vendor/github.com/allegro/bigcache/v3/bytes.go deleted file mode 100644 index 2bf2e9a9..00000000 --- a/vendor/github.com/allegro/bigcache/v3/bytes.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build !appengine - -package bigcache - -import ( - "unsafe" -) - -func bytesToString(b []byte) string { - return *(*string)(unsafe.Pointer(&b)) -} diff --git a/vendor/github.com/allegro/bigcache/v3/bytes_appengine.go b/vendor/github.com/allegro/bigcache/v3/bytes_appengine.go deleted file mode 100644 index 3892f3b5..00000000 --- a/vendor/github.com/allegro/bigcache/v3/bytes_appengine.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build appengine - -package bigcache - -func bytesToString(b []byte) string { - return string(b) -} diff --git a/vendor/github.com/allegro/bigcache/v3/clock.go b/vendor/github.com/allegro/bigcache/v3/clock.go deleted file mode 100644 index 195d01af..00000000 --- a/vendor/github.com/allegro/bigcache/v3/clock.go +++ /dev/null @@ -1,14 +0,0 @@ -package bigcache - -import "time" - -type clock interface { - Epoch() int64 -} - -type systemClock struct { -} - -func (c systemClock) Epoch() int64 { - return time.Now().Unix() -} diff --git a/vendor/github.com/allegro/bigcache/v3/config.go b/vendor/github.com/allegro/bigcache/v3/config.go deleted file mode 100644 index 63a4e9b1..00000000 --- a/vendor/github.com/allegro/bigcache/v3/config.go +++ /dev/null @@ -1,97 +0,0 @@ -package bigcache - -import "time" - -// Config for BigCache -type Config struct { - // Number of cache shards, value must be a power of two - Shards int - // Time after which entry can be evicted - LifeWindow time.Duration - // Interval between removing expired entries (clean up). - // If set to <= 0 then no action is performed. Setting to < 1 second is counterproductive — bigcache has a one second resolution. - CleanWindow time.Duration - // Max number of entries in life window. Used only to calculate initial size for cache shards. - // When proper value is set then additional memory allocation does not occur. - MaxEntriesInWindow int - // Max size of entry in bytes. Used only to calculate initial size for cache shards. - MaxEntrySize int - // StatsEnabled if true calculate the number of times a cached resource was requested. - StatsEnabled bool - // Verbose mode prints information about new memory allocation - Verbose bool - // Hasher used to map between string keys and unsigned 64bit integers, by default fnv64 hashing is used. - Hasher Hasher - // HardMaxCacheSize is a limit for BytesQueue size in MB. - // It can protect application from consuming all available memory on machine, therefore from running OOM Killer. - // Default value is 0 which means unlimited size. When the limit is higher than 0 and reached then - // the oldest entries are overridden for the new ones. The max memory consumption will be bigger than - // HardMaxCacheSize due to Shards' s additional memory. Every Shard consumes additional memory for map of keys - // and statistics (map[uint64]uint32) the size of this map is equal to number of entries in - // cache ~ 2×(64+32)×n bits + overhead or map itself. - HardMaxCacheSize int - // OnRemove is a callback fired when the oldest entry is removed because of its expiration time or no space left - // for the new entry, or because delete was called. - // Default value is nil which means no callback and it prevents from unwrapping the oldest entry. - // ignored if OnRemoveWithMetadata is specified. - OnRemove func(key string, entry []byte) - // OnRemoveWithMetadata is a callback fired when the oldest entry is removed because of its expiration time or no space left - // for the new entry, or because delete was called. A structure representing details about that specific entry. - // Default value is nil which means no callback and it prevents from unwrapping the oldest entry. - OnRemoveWithMetadata func(key string, entry []byte, keyMetadata Metadata) - // OnRemoveWithReason is a callback fired when the oldest entry is removed because of its expiration time or no space left - // for the new entry, or because delete was called. A constant representing the reason will be passed through. - // Default value is nil which means no callback and it prevents from unwrapping the oldest entry. - // Ignored if OnRemove is specified. - OnRemoveWithReason func(key string, entry []byte, reason RemoveReason) - - onRemoveFilter int - - // Logger is a logging interface and used in combination with `Verbose` - // Defaults to `DefaultLogger()` - Logger Logger -} - -// DefaultConfig initializes config with default values. -// When load for BigCache can be predicted in advance then it is better to use custom config. -func DefaultConfig(eviction time.Duration) Config { - return Config{ - Shards: 1024, - LifeWindow: eviction, - CleanWindow: 1 * time.Second, - MaxEntriesInWindow: 1000 * 10 * 60, - MaxEntrySize: 500, - StatsEnabled: false, - Verbose: true, - Hasher: newDefaultHasher(), - HardMaxCacheSize: 0, - Logger: DefaultLogger(), - } -} - -// initialShardSize computes initial shard size -func (c Config) initialShardSize() int { - return max(c.MaxEntriesInWindow/c.Shards, minimumEntriesInShard) -} - -// maximumShardSizeInBytes computes maximum shard size in bytes -func (c Config) maximumShardSizeInBytes() int { - maxShardSize := 0 - - if c.HardMaxCacheSize > 0 { - maxShardSize = convertMBToBytes(c.HardMaxCacheSize) / c.Shards - } - - return maxShardSize -} - -// OnRemoveFilterSet sets which remove reasons will trigger a call to OnRemoveWithReason. -// Filtering out reasons prevents bigcache from unwrapping them, which saves cpu. -func (c Config) OnRemoveFilterSet(reasons ...RemoveReason) Config { - c.onRemoveFilter = 0 - for i := range reasons { - c.onRemoveFilter |= 1 << uint(reasons[i]) - } - - return c -} diff --git a/vendor/github.com/allegro/bigcache/v3/encoding.go b/vendor/github.com/allegro/bigcache/v3/encoding.go deleted file mode 100644 index fc861251..00000000 --- a/vendor/github.com/allegro/bigcache/v3/encoding.go +++ /dev/null @@ -1,83 +0,0 @@ -package bigcache - -import ( - "encoding/binary" -) - -const ( - timestampSizeInBytes = 8 // Number of bytes used for timestamp - hashSizeInBytes = 8 // Number of bytes used for hash - keySizeInBytes = 2 // Number of bytes used for size of entry key - headersSizeInBytes = timestampSizeInBytes + hashSizeInBytes + keySizeInBytes // Number of bytes used for all headers -) - -func wrapEntry(timestamp uint64, hash uint64, key string, entry []byte, buffer *[]byte) []byte { - keyLength := len(key) - blobLength := len(entry) + headersSizeInBytes + keyLength - - if blobLength > len(*buffer) { - *buffer = make([]byte, blobLength) - } - blob := *buffer - - binary.LittleEndian.PutUint64(blob, timestamp) - binary.LittleEndian.PutUint64(blob[timestampSizeInBytes:], hash) - binary.LittleEndian.PutUint16(blob[timestampSizeInBytes+hashSizeInBytes:], uint16(keyLength)) - copy(blob[headersSizeInBytes:], key) - copy(blob[headersSizeInBytes+keyLength:], entry) - - return blob[:blobLength] -} - -func appendToWrappedEntry(timestamp uint64, wrappedEntry []byte, entry []byte, buffer *[]byte) []byte { - blobLength := len(wrappedEntry) + len(entry) - if blobLength > len(*buffer) { - *buffer = make([]byte, blobLength) - } - - blob := *buffer - - binary.LittleEndian.PutUint64(blob, timestamp) - copy(blob[timestampSizeInBytes:], wrappedEntry[timestampSizeInBytes:]) - copy(blob[len(wrappedEntry):], entry) - - return blob[:blobLength] -} - -func readEntry(data []byte) []byte { - length := binary.LittleEndian.Uint16(data[timestampSizeInBytes+hashSizeInBytes:]) - - // copy on read - dst := make([]byte, len(data)-int(headersSizeInBytes+length)) - copy(dst, data[headersSizeInBytes+length:]) - - return dst -} - -func readTimestampFromEntry(data []byte) uint64 { - return binary.LittleEndian.Uint64(data) -} - -func readKeyFromEntry(data []byte) string { - length := binary.LittleEndian.Uint16(data[timestampSizeInBytes+hashSizeInBytes:]) - - // copy on read - dst := make([]byte, length) - copy(dst, data[headersSizeInBytes:headersSizeInBytes+length]) - - return bytesToString(dst) -} - -func compareKeyFromEntry(data []byte, key string) bool { - length := binary.LittleEndian.Uint16(data[timestampSizeInBytes+hashSizeInBytes:]) - - return bytesToString(data[headersSizeInBytes:headersSizeInBytes+length]) == key -} - -func readHashFromEntry(data []byte) uint64 { - return binary.LittleEndian.Uint64(data[timestampSizeInBytes:]) -} - -func resetKeyFromEntry(data []byte) { - binary.LittleEndian.PutUint64(data[timestampSizeInBytes:], 0) -} diff --git a/vendor/github.com/allegro/bigcache/v3/entry_not_found_error.go b/vendor/github.com/allegro/bigcache/v3/entry_not_found_error.go deleted file mode 100644 index 8993384d..00000000 --- a/vendor/github.com/allegro/bigcache/v3/entry_not_found_error.go +++ /dev/null @@ -1,8 +0,0 @@ -package bigcache - -import "errors" - -var ( - // ErrEntryNotFound is an error type struct which is returned when entry was not found for provided key - ErrEntryNotFound = errors.New("Entry not found") -) diff --git a/vendor/github.com/allegro/bigcache/v3/fnv.go b/vendor/github.com/allegro/bigcache/v3/fnv.go deleted file mode 100644 index 188c9aa6..00000000 --- a/vendor/github.com/allegro/bigcache/v3/fnv.go +++ /dev/null @@ -1,28 +0,0 @@ -package bigcache - -// newDefaultHasher returns a new 64-bit FNV-1a Hasher which makes no memory allocations. -// Its Sum64 method will lay the value out in big-endian byte order. -// See https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function -func newDefaultHasher() Hasher { - return fnv64a{} -} - -type fnv64a struct{} - -const ( - // offset64 FNVa offset basis. See https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function#FNV-1a_hash - offset64 = 14695981039346656037 - // prime64 FNVa prime value. See https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function#FNV-1a_hash - prime64 = 1099511628211 -) - -// Sum64 gets the string and returns its uint64 hash value. -func (f fnv64a) Sum64(key string) uint64 { - var hash uint64 = offset64 - for i := 0; i < len(key); i++ { - hash ^= uint64(key[i]) - hash *= prime64 - } - - return hash -} diff --git a/vendor/github.com/allegro/bigcache/v3/hash.go b/vendor/github.com/allegro/bigcache/v3/hash.go deleted file mode 100644 index 5f8ade77..00000000 --- a/vendor/github.com/allegro/bigcache/v3/hash.go +++ /dev/null @@ -1,8 +0,0 @@ -package bigcache - -// Hasher is responsible for generating unsigned, 64 bit hash of provided string. Hasher should minimize collisions -// (generating same hash for different strings) and while performance is also important fast functions are preferable (i.e. -// you can use FarmHash family). -type Hasher interface { - Sum64(string) uint64 -} diff --git a/vendor/github.com/allegro/bigcache/v3/iterator.go b/vendor/github.com/allegro/bigcache/v3/iterator.go deleted file mode 100644 index db2a2ef4..00000000 --- a/vendor/github.com/allegro/bigcache/v3/iterator.go +++ /dev/null @@ -1,146 +0,0 @@ -package bigcache - -import ( - "sync" -) - -type iteratorError string - -func (e iteratorError) Error() string { - return string(e) -} - -// ErrInvalidIteratorState is reported when iterator is in invalid state -const ErrInvalidIteratorState = iteratorError("Iterator is in invalid state. Use SetNext() to move to next position") - -// ErrCannotRetrieveEntry is reported when entry cannot be retrieved from underlying -const ErrCannotRetrieveEntry = iteratorError("Could not retrieve entry from cache") - -var emptyEntryInfo = EntryInfo{} - -// EntryInfo holds informations about entry in the cache -type EntryInfo struct { - timestamp uint64 - hash uint64 - key string - value []byte - err error -} - -// Key returns entry's underlying key -func (e EntryInfo) Key() string { - return e.key -} - -// Hash returns entry's hash value -func (e EntryInfo) Hash() uint64 { - return e.hash -} - -// Timestamp returns entry's timestamp (time of insertion) -func (e EntryInfo) Timestamp() uint64 { - return e.timestamp -} - -// Value returns entry's underlying value -func (e EntryInfo) Value() []byte { - return e.value -} - -// EntryInfoIterator allows to iterate over entries in the cache -type EntryInfoIterator struct { - mutex sync.Mutex - cache *BigCache - currentShard int - currentIndex int - currentEntryInfo EntryInfo - elements []uint64 - elementsCount int - valid bool -} - -// SetNext moves to next element and returns true if it exists. -func (it *EntryInfoIterator) SetNext() bool { - it.mutex.Lock() - - it.valid = false - it.currentIndex++ - - if it.elementsCount > it.currentIndex { - it.valid = true - - empty := it.setCurrentEntry() - it.mutex.Unlock() - - if empty { - return it.SetNext() - } - return true - } - - for i := it.currentShard + 1; i < it.cache.config.Shards; i++ { - it.elements, it.elementsCount = it.cache.shards[i].copyHashedKeys() - - // Non empty shard - stick with it - if it.elementsCount > 0 { - it.currentIndex = 0 - it.currentShard = i - it.valid = true - - empty := it.setCurrentEntry() - it.mutex.Unlock() - - if empty { - return it.SetNext() - } - return true - } - } - it.mutex.Unlock() - return false -} - -func (it *EntryInfoIterator) setCurrentEntry() bool { - var entryNotFound = false - entry, err := it.cache.shards[it.currentShard].getEntry(it.elements[it.currentIndex]) - - if err == ErrEntryNotFound { - it.currentEntryInfo = emptyEntryInfo - entryNotFound = true - } else if err != nil { - it.currentEntryInfo = EntryInfo{ - err: err, - } - } else { - it.currentEntryInfo = EntryInfo{ - timestamp: readTimestampFromEntry(entry), - hash: readHashFromEntry(entry), - key: readKeyFromEntry(entry), - value: readEntry(entry), - err: err, - } - } - - return entryNotFound -} - -func newIterator(cache *BigCache) *EntryInfoIterator { - elements, count := cache.shards[0].copyHashedKeys() - - return &EntryInfoIterator{ - cache: cache, - currentShard: 0, - currentIndex: -1, - elements: elements, - elementsCount: count, - } -} - -// Value returns current value from the iterator -func (it *EntryInfoIterator) Value() (EntryInfo, error) { - if !it.valid { - return emptyEntryInfo, ErrInvalidIteratorState - } - - return it.currentEntryInfo, it.currentEntryInfo.err -} diff --git a/vendor/github.com/allegro/bigcache/v3/logger.go b/vendor/github.com/allegro/bigcache/v3/logger.go deleted file mode 100644 index 50e84abc..00000000 --- a/vendor/github.com/allegro/bigcache/v3/logger.go +++ /dev/null @@ -1,30 +0,0 @@ -package bigcache - -import ( - "log" - "os" -) - -// Logger is invoked when `Config.Verbose=true` -type Logger interface { - Printf(format string, v ...interface{}) -} - -// this is a safeguard, breaking on compile time in case -// `log.Logger` does not adhere to our `Logger` interface. -// see https://golang.org/doc/faq#guarantee_satisfies_interface -var _ Logger = &log.Logger{} - -// DefaultLogger returns a `Logger` implementation -// backed by stdlib's log -func DefaultLogger() *log.Logger { - return log.New(os.Stdout, "", log.LstdFlags) -} - -func newLogger(custom Logger) Logger { - if custom != nil { - return custom - } - - return DefaultLogger() -} diff --git a/vendor/github.com/allegro/bigcache/v3/queue/bytes_queue.go b/vendor/github.com/allegro/bigcache/v3/queue/bytes_queue.go deleted file mode 100644 index 3ef0f6d9..00000000 --- a/vendor/github.com/allegro/bigcache/v3/queue/bytes_queue.go +++ /dev/null @@ -1,269 +0,0 @@ -package queue - -import ( - "encoding/binary" - "log" - "time" -) - -const ( - // Number of bytes to encode 0 in uvarint format - minimumHeaderSize = 17 // 1 byte blobsize + timestampSizeInBytes + hashSizeInBytes - // Bytes before left margin are not used. Zero index means element does not exist in queue, useful while reading slice from index - leftMarginIndex = 1 -) - -var ( - errEmptyQueue = &queueError{"Empty queue"} - errInvalidIndex = &queueError{"Index must be greater than zero. Invalid index."} - errIndexOutOfBounds = &queueError{"Index out of range"} -) - -// BytesQueue is a non-thread safe queue type of fifo based on bytes array. -// For every push operation index of entry is returned. It can be used to read the entry later -type BytesQueue struct { - full bool - array []byte - capacity int - maxCapacity int - head int - tail int - count int - rightMargin int - headerBuffer []byte - verbose bool -} - -type queueError struct { - message string -} - -// getNeededSize returns the number of bytes an entry of length need in the queue -func getNeededSize(length int) int { - var header int - switch { - case length < 127: // 1<<7-1 - header = 1 - case length < 16382: // 1<<14-2 - header = 2 - case length < 2097149: // 1<<21 -3 - header = 3 - case length < 268435452: // 1<<28 -4 - header = 4 - default: - header = 5 - } - - return length + header -} - -// NewBytesQueue initialize new bytes queue. -// capacity is used in bytes array allocation -// When verbose flag is set then information about memory allocation are printed -func NewBytesQueue(capacity int, maxCapacity int, verbose bool) *BytesQueue { - return &BytesQueue{ - array: make([]byte, capacity), - capacity: capacity, - maxCapacity: maxCapacity, - headerBuffer: make([]byte, binary.MaxVarintLen32), - tail: leftMarginIndex, - head: leftMarginIndex, - rightMargin: leftMarginIndex, - verbose: verbose, - } -} - -// Reset removes all entries from queue -func (q *BytesQueue) Reset() { - // Just reset indexes - q.tail = leftMarginIndex - q.head = leftMarginIndex - q.rightMargin = leftMarginIndex - q.count = 0 - q.full = false -} - -// Push copies entry at the end of queue and moves tail pointer. Allocates more space if needed. -// Returns index for pushed data or error if maximum size queue limit is reached. -func (q *BytesQueue) Push(data []byte) (int, error) { - neededSize := getNeededSize(len(data)) - - if !q.canInsertAfterTail(neededSize) { - if q.canInsertBeforeHead(neededSize) { - q.tail = leftMarginIndex - } else if q.capacity+neededSize >= q.maxCapacity && q.maxCapacity > 0 { - return -1, &queueError{"Full queue. Maximum size limit reached."} - } else { - q.allocateAdditionalMemory(neededSize) - } - } - - index := q.tail - - q.push(data, neededSize) - - return index, nil -} - -func (q *BytesQueue) allocateAdditionalMemory(minimum int) { - start := time.Now() - if q.capacity < minimum { - q.capacity += minimum - } - q.capacity = q.capacity * 2 - if q.capacity > q.maxCapacity && q.maxCapacity > 0 { - q.capacity = q.maxCapacity - } - - oldArray := q.array - q.array = make([]byte, q.capacity) - - if leftMarginIndex != q.rightMargin { - copy(q.array, oldArray[:q.rightMargin]) - - if q.tail <= q.head { - if q.tail != q.head { - // created slice is slightly larger then need but this is fine after only the needed bytes are copied - q.push(make([]byte, q.head-q.tail), q.head-q.tail) - } - - q.head = leftMarginIndex - q.tail = q.rightMargin - } - } - - q.full = false - - if q.verbose { - log.Printf("Allocated new queue in %s; Capacity: %d \n", time.Since(start), q.capacity) - } -} - -func (q *BytesQueue) push(data []byte, len int) { - headerEntrySize := binary.PutUvarint(q.headerBuffer, uint64(len)) - q.copy(q.headerBuffer, headerEntrySize) - - q.copy(data, len-headerEntrySize) - - if q.tail > q.head { - q.rightMargin = q.tail - } - if q.tail == q.head { - q.full = true - } - - q.count++ -} - -func (q *BytesQueue) copy(data []byte, len int) { - q.tail += copy(q.array[q.tail:], data[:len]) -} - -// Pop reads the oldest entry from queue and moves head pointer to the next one -func (q *BytesQueue) Pop() ([]byte, error) { - data, blockSize, err := q.peek(q.head) - if err != nil { - return nil, err - } - - q.head += blockSize - q.count-- - - if q.head == q.rightMargin { - q.head = leftMarginIndex - if q.tail == q.rightMargin { - q.tail = leftMarginIndex - } - q.rightMargin = q.tail - } - - q.full = false - - return data, nil -} - -// Peek reads the oldest entry from list without moving head pointer -func (q *BytesQueue) Peek() ([]byte, error) { - data, _, err := q.peek(q.head) - return data, err -} - -// Get reads entry from index -func (q *BytesQueue) Get(index int) ([]byte, error) { - data, _, err := q.peek(index) - return data, err -} - -// CheckGet checks if an entry can be read from index -func (q *BytesQueue) CheckGet(index int) error { - return q.peekCheckErr(index) -} - -// Capacity returns number of allocated bytes for queue -func (q *BytesQueue) Capacity() int { - return q.capacity -} - -// Len returns number of entries kept in queue -func (q *BytesQueue) Len() int { - return q.count -} - -// Error returns error message -func (e *queueError) Error() string { - return e.message -} - -// peekCheckErr is identical to peek, but does not actually return any data -func (q *BytesQueue) peekCheckErr(index int) error { - - if q.count == 0 { - return errEmptyQueue - } - - if index <= 0 { - return errInvalidIndex - } - - if index >= len(q.array) { - return errIndexOutOfBounds - } - return nil -} - -// peek returns the data from index and the number of bytes to encode the length of the data in uvarint format -func (q *BytesQueue) peek(index int) ([]byte, int, error) { - err := q.peekCheckErr(index) - if err != nil { - return nil, 0, err - } - - blockSize, n := binary.Uvarint(q.array[index:]) - return q.array[index+n : index+int(blockSize)], int(blockSize), nil -} - -// canInsertAfterTail returns true if it's possible to insert an entry of size of need after the tail of the queue -func (q *BytesQueue) canInsertAfterTail(need int) bool { - if q.full { - return false - } - if q.tail >= q.head { - return q.capacity-q.tail >= need - } - // 1. there is exactly need bytes between head and tail, so we do not need - // to reserve extra space for a potential empty entry when realloc this queue - // 2. still have unused space between tail and head, then we must reserve - // at least headerEntrySize bytes so we can put an empty entry - return q.head-q.tail == need || q.head-q.tail >= need+minimumHeaderSize -} - -// canInsertBeforeHead returns true if it's possible to insert an entry of size of need before the head of the queue -func (q *BytesQueue) canInsertBeforeHead(need int) bool { - if q.full { - return false - } - if q.tail >= q.head { - return q.head-leftMarginIndex == need || q.head-leftMarginIndex >= need+minimumHeaderSize - } - return q.head-q.tail == need || q.head-q.tail >= need+minimumHeaderSize -} diff --git a/vendor/github.com/allegro/bigcache/v3/shard.go b/vendor/github.com/allegro/bigcache/v3/shard.go deleted file mode 100644 index e80a759a..00000000 --- a/vendor/github.com/allegro/bigcache/v3/shard.go +++ /dev/null @@ -1,454 +0,0 @@ -package bigcache - -import ( - "fmt" - "sync" - "sync/atomic" - - "github.com/allegro/bigcache/v3/queue" -) - -type onRemoveCallback func(wrappedEntry []byte, reason RemoveReason) - -// Metadata contains information of a specific entry -type Metadata struct { - RequestCount uint32 -} - -type cacheShard struct { - hashmap map[uint64]uint32 - entries queue.BytesQueue - lock sync.RWMutex - entryBuffer []byte - onRemove onRemoveCallback - - isVerbose bool - statsEnabled bool - logger Logger - clock clock - lifeWindow uint64 - - hashmapStats map[uint64]uint32 - stats Stats - cleanEnabled bool -} - -func (s *cacheShard) getWithInfo(key string, hashedKey uint64) (entry []byte, resp Response, err error) { - currentTime := uint64(s.clock.Epoch()) - s.lock.RLock() - wrappedEntry, err := s.getWrappedEntry(hashedKey) - if err != nil { - s.lock.RUnlock() - return nil, resp, err - } - if entryKey := readKeyFromEntry(wrappedEntry); key != entryKey { - s.lock.RUnlock() - s.collision() - if s.isVerbose { - s.logger.Printf("Collision detected. Both %q and %q have the same hash %x", key, entryKey, hashedKey) - } - return nil, resp, ErrEntryNotFound - } - - entry = readEntry(wrappedEntry) - if s.isExpired(wrappedEntry, currentTime) { - resp.EntryStatus = Expired - } - s.lock.RUnlock() - s.hit(hashedKey) - return entry, resp, nil -} - -func (s *cacheShard) get(key string, hashedKey uint64) ([]byte, error) { - s.lock.RLock() - wrappedEntry, err := s.getWrappedEntry(hashedKey) - if err != nil { - s.lock.RUnlock() - return nil, err - } - if entryKey := readKeyFromEntry(wrappedEntry); key != entryKey { - s.lock.RUnlock() - s.collision() - if s.isVerbose { - s.logger.Printf("Collision detected. Both %q and %q have the same hash %x", key, entryKey, hashedKey) - } - return nil, ErrEntryNotFound - } - entry := readEntry(wrappedEntry) - s.lock.RUnlock() - s.hit(hashedKey) - - return entry, nil -} - -func (s *cacheShard) getWrappedEntry(hashedKey uint64) ([]byte, error) { - itemIndex := s.hashmap[hashedKey] - - if itemIndex == 0 { - s.miss() - return nil, ErrEntryNotFound - } - - wrappedEntry, err := s.entries.Get(int(itemIndex)) - if err != nil { - s.miss() - return nil, err - } - - return wrappedEntry, err -} - -func (s *cacheShard) getValidWrapEntry(key string, hashedKey uint64) ([]byte, error) { - wrappedEntry, err := s.getWrappedEntry(hashedKey) - if err != nil { - return nil, err - } - - if !compareKeyFromEntry(wrappedEntry, key) { - s.collision() - if s.isVerbose { - s.logger.Printf("Collision detected. Both %q and %q have the same hash %x", key, readKeyFromEntry(wrappedEntry), hashedKey) - } - - return nil, ErrEntryNotFound - } - s.hitWithoutLock(hashedKey) - - return wrappedEntry, nil -} - -func (s *cacheShard) set(key string, hashedKey uint64, entry []byte) error { - currentTimestamp := uint64(s.clock.Epoch()) - - s.lock.Lock() - - if previousIndex := s.hashmap[hashedKey]; previousIndex != 0 { - if previousEntry, err := s.entries.Get(int(previousIndex)); err == nil { - resetKeyFromEntry(previousEntry) - //remove hashkey - delete(s.hashmap, hashedKey) - } - } - - if !s.cleanEnabled { - if oldestEntry, err := s.entries.Peek(); err == nil { - s.onEvict(oldestEntry, currentTimestamp, s.removeOldestEntry) - } - } - - w := wrapEntry(currentTimestamp, hashedKey, key, entry, &s.entryBuffer) - - for { - if index, err := s.entries.Push(w); err == nil { - s.hashmap[hashedKey] = uint32(index) - s.lock.Unlock() - return nil - } - if s.removeOldestEntry(NoSpace) != nil { - s.lock.Unlock() - return fmt.Errorf("entry is bigger than max shard size") - } - } -} - -func (s *cacheShard) addNewWithoutLock(key string, hashedKey uint64, entry []byte) error { - currentTimestamp := uint64(s.clock.Epoch()) - - if !s.cleanEnabled { - if oldestEntry, err := s.entries.Peek(); err == nil { - s.onEvict(oldestEntry, currentTimestamp, s.removeOldestEntry) - } - } - - w := wrapEntry(currentTimestamp, hashedKey, key, entry, &s.entryBuffer) - - for { - if index, err := s.entries.Push(w); err == nil { - s.hashmap[hashedKey] = uint32(index) - return nil - } - if s.removeOldestEntry(NoSpace) != nil { - return fmt.Errorf("entry is bigger than max shard size") - } - } -} - -func (s *cacheShard) setWrappedEntryWithoutLock(currentTimestamp uint64, w []byte, hashedKey uint64) error { - if previousIndex := s.hashmap[hashedKey]; previousIndex != 0 { - if previousEntry, err := s.entries.Get(int(previousIndex)); err == nil { - resetKeyFromEntry(previousEntry) - } - } - - if !s.cleanEnabled { - if oldestEntry, err := s.entries.Peek(); err == nil { - s.onEvict(oldestEntry, currentTimestamp, s.removeOldestEntry) - } - } - - for { - if index, err := s.entries.Push(w); err == nil { - s.hashmap[hashedKey] = uint32(index) - return nil - } - if s.removeOldestEntry(NoSpace) != nil { - return fmt.Errorf("entry is bigger than max shard size") - } - } -} - -func (s *cacheShard) append(key string, hashedKey uint64, entry []byte) error { - s.lock.Lock() - wrappedEntry, err := s.getValidWrapEntry(key, hashedKey) - - if err == ErrEntryNotFound { - err = s.addNewWithoutLock(key, hashedKey, entry) - s.lock.Unlock() - return err - } - if err != nil { - s.lock.Unlock() - return err - } - - currentTimestamp := uint64(s.clock.Epoch()) - - w := appendToWrappedEntry(currentTimestamp, wrappedEntry, entry, &s.entryBuffer) - - err = s.setWrappedEntryWithoutLock(currentTimestamp, w, hashedKey) - s.lock.Unlock() - - return err -} - -func (s *cacheShard) del(hashedKey uint64) error { - // Optimistic pre-check using only readlock - s.lock.RLock() - { - itemIndex := s.hashmap[hashedKey] - - if itemIndex == 0 { - s.lock.RUnlock() - s.delmiss() - return ErrEntryNotFound - } - - if err := s.entries.CheckGet(int(itemIndex)); err != nil { - s.lock.RUnlock() - s.delmiss() - return err - } - } - s.lock.RUnlock() - - s.lock.Lock() - { - // After obtaining the writelock, we need to read the same again, - // since the data delivered earlier may be stale now - itemIndex := s.hashmap[hashedKey] - - if itemIndex == 0 { - s.lock.Unlock() - s.delmiss() - return ErrEntryNotFound - } - - wrappedEntry, err := s.entries.Get(int(itemIndex)) - if err != nil { - s.lock.Unlock() - s.delmiss() - return err - } - - delete(s.hashmap, hashedKey) - s.onRemove(wrappedEntry, Deleted) - if s.statsEnabled { - delete(s.hashmapStats, hashedKey) - } - resetKeyFromEntry(wrappedEntry) - } - s.lock.Unlock() - - s.delhit() - return nil -} - -func (s *cacheShard) onEvict(oldestEntry []byte, currentTimestamp uint64, evict func(reason RemoveReason) error) bool { - if s.isExpired(oldestEntry, currentTimestamp) { - evict(Expired) - return true - } - return false -} - -func (s *cacheShard) isExpired(oldestEntry []byte, currentTimestamp uint64) bool { - oldestTimestamp := readTimestampFromEntry(oldestEntry) - if currentTimestamp <= oldestTimestamp { // if currentTimestamp < oldestTimestamp, the result will out of uint64 limits; - return false - } - return currentTimestamp-oldestTimestamp > s.lifeWindow -} - -func (s *cacheShard) cleanUp(currentTimestamp uint64) { - s.lock.Lock() - for { - if oldestEntry, err := s.entries.Peek(); err != nil { - break - } else if evicted := s.onEvict(oldestEntry, currentTimestamp, s.removeOldestEntry); !evicted { - break - } - } - s.lock.Unlock() -} - -func (s *cacheShard) getEntry(hashedKey uint64) ([]byte, error) { - s.lock.RLock() - - entry, err := s.getWrappedEntry(hashedKey) - // copy entry - newEntry := make([]byte, len(entry)) - copy(newEntry, entry) - - s.lock.RUnlock() - - return newEntry, err -} - -func (s *cacheShard) copyHashedKeys() (keys []uint64, next int) { - s.lock.RLock() - keys = make([]uint64, len(s.hashmap)) - - for key := range s.hashmap { - keys[next] = key - next++ - } - - s.lock.RUnlock() - return keys, next -} - -func (s *cacheShard) removeOldestEntry(reason RemoveReason) error { - oldest, err := s.entries.Pop() - if err == nil { - hash := readHashFromEntry(oldest) - if hash == 0 { - // entry has been explicitly deleted with resetKeyFromEntry, ignore - return nil - } - delete(s.hashmap, hash) - s.onRemove(oldest, reason) - if s.statsEnabled { - delete(s.hashmapStats, hash) - } - return nil - } - return err -} - -func (s *cacheShard) reset(config Config) { - s.lock.Lock() - s.hashmap = make(map[uint64]uint32, config.initialShardSize()) - s.entryBuffer = make([]byte, config.MaxEntrySize+headersSizeInBytes) - s.entries.Reset() - s.lock.Unlock() -} - -func (s *cacheShard) resetStats() { - s.lock.Lock() - s.stats = Stats{} - s.lock.Unlock() -} - -func (s *cacheShard) len() int { - s.lock.RLock() - res := len(s.hashmap) - s.lock.RUnlock() - return res -} - -func (s *cacheShard) capacity() int { - s.lock.RLock() - res := s.entries.Capacity() - s.lock.RUnlock() - return res -} - -func (s *cacheShard) getStats() Stats { - var stats = Stats{ - Hits: atomic.LoadInt64(&s.stats.Hits), - Misses: atomic.LoadInt64(&s.stats.Misses), - DelHits: atomic.LoadInt64(&s.stats.DelHits), - DelMisses: atomic.LoadInt64(&s.stats.DelMisses), - Collisions: atomic.LoadInt64(&s.stats.Collisions), - } - return stats -} - -func (s *cacheShard) getKeyMetadataWithLock(key uint64) Metadata { - s.lock.RLock() - c := s.hashmapStats[key] - s.lock.RUnlock() - return Metadata{ - RequestCount: c, - } -} - -func (s *cacheShard) getKeyMetadata(key uint64) Metadata { - return Metadata{ - RequestCount: s.hashmapStats[key], - } -} - -func (s *cacheShard) hit(key uint64) { - atomic.AddInt64(&s.stats.Hits, 1) - if s.statsEnabled { - s.lock.Lock() - s.hashmapStats[key]++ - s.lock.Unlock() - } -} - -func (s *cacheShard) hitWithoutLock(key uint64) { - atomic.AddInt64(&s.stats.Hits, 1) - if s.statsEnabled { - s.hashmapStats[key]++ - } -} - -func (s *cacheShard) miss() { - atomic.AddInt64(&s.stats.Misses, 1) -} - -func (s *cacheShard) delhit() { - atomic.AddInt64(&s.stats.DelHits, 1) -} - -func (s *cacheShard) delmiss() { - atomic.AddInt64(&s.stats.DelMisses, 1) -} - -func (s *cacheShard) collision() { - atomic.AddInt64(&s.stats.Collisions, 1) -} - -func initNewShard(config Config, callback onRemoveCallback, clock clock) *cacheShard { - bytesQueueInitialCapacity := config.initialShardSize() * config.MaxEntrySize - maximumShardSizeInBytes := config.maximumShardSizeInBytes() - if maximumShardSizeInBytes > 0 && bytesQueueInitialCapacity > maximumShardSizeInBytes { - bytesQueueInitialCapacity = maximumShardSizeInBytes - } - return &cacheShard{ - hashmap: make(map[uint64]uint32, config.initialShardSize()), - hashmapStats: make(map[uint64]uint32, config.initialShardSize()), - entries: *queue.NewBytesQueue(bytesQueueInitialCapacity, maximumShardSizeInBytes, config.Verbose), - entryBuffer: make([]byte, config.MaxEntrySize+headersSizeInBytes), - onRemove: callback, - - isVerbose: config.Verbose, - logger: newLogger(config.Logger), - clock: clock, - lifeWindow: uint64(config.LifeWindow.Seconds()), - statsEnabled: config.StatsEnabled, - cleanEnabled: config.CleanWindow > 0, - } -} diff --git a/vendor/github.com/allegro/bigcache/v3/stats.go b/vendor/github.com/allegro/bigcache/v3/stats.go deleted file mode 100644 index 07157132..00000000 --- a/vendor/github.com/allegro/bigcache/v3/stats.go +++ /dev/null @@ -1,15 +0,0 @@ -package bigcache - -// Stats stores cache statistics -type Stats struct { - // Hits is a number of successfully found keys - Hits int64 `json:"hits"` - // Misses is a number of not found keys - Misses int64 `json:"misses"` - // DelHits is a number of successfully deleted keys - DelHits int64 `json:"delete_hits"` - // DelMisses is a number of not deleted keys - DelMisses int64 `json:"delete_misses"` - // Collisions is a number of happened key-collisions - Collisions int64 `json:"collisions"` -} diff --git a/vendor/github.com/allegro/bigcache/v3/utils.go b/vendor/github.com/allegro/bigcache/v3/utils.go deleted file mode 100644 index 2b6ac4f1..00000000 --- a/vendor/github.com/allegro/bigcache/v3/utils.go +++ /dev/null @@ -1,23 +0,0 @@ -package bigcache - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func convertMBToBytes(value int) int { - return value * 1024 * 1024 -} - -func isPowerOfTwo(number int) bool { - return (number != 0) && (number&(number-1)) == 0 -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md index 3cd35b13..a4872987 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.6.7 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. + # v1.6.6 (2024-10-04) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go index a10d7565..78af41cb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go @@ -3,4 +3,4 @@ package eventstream // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.6.6" +const goModuleVersion = "1.6.7" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md index 297618fc..8ab28d3a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.12.1 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. + # v1.12.0 (2024-10-04) * **Feature**: Add support for HTTP client metrics. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go index 4e50b257..1514acbe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go @@ -3,4 +3,4 @@ package acceptencoding // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.12.0" +const goModuleVersion = "1.12.1" diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index c63f18f5..56b19e3a 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,12 @@ +# Release (2024-11-15) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.22.1 + * **Bug Fix**: Fix failure to replace URI path segments when their names overlap. + # Release (2024-10-03) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go index e78926c9..9ae30854 100644 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go +++ b/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go @@ -22,33 +22,33 @@ func bufCap(b []byte, n int) []byte { // replacePathElement replaces a single element in the path []byte. // Escape is used to control whether the value will be escaped using Amazon path escape style. func replacePathElement(path, fieldBuf []byte, key, val string, escape bool) ([]byte, []byte, error) { - fieldBuf = bufCap(fieldBuf, len(key)+3) // { [+] } + // search for "{}". If not found, search for the greedy version "{+}". If none are found, return error + fieldBuf = bufCap(fieldBuf, len(key)+2) // { } fieldBuf = append(fieldBuf, uriTokenStart) fieldBuf = append(fieldBuf, key...) + fieldBuf = append(fieldBuf, uriTokenStop) start := bytes.Index(path, fieldBuf) - end := start + len(fieldBuf) - if start < 0 || len(path[end:]) == 0 { - // TODO what to do about error? - return path, fieldBuf, fmt.Errorf("invalid path index, start=%d,end=%d. %s", start, end, path) - } - encodeSep := true - if path[end] == uriTokenSkip { - // '+' token means do not escape slashes + if start < 0 { + fieldBuf = bufCap(fieldBuf, len(key)+3) // { [+] } + fieldBuf = append(fieldBuf, uriTokenStart) + fieldBuf = append(fieldBuf, key...) + fieldBuf = append(fieldBuf, uriTokenSkip) + fieldBuf = append(fieldBuf, uriTokenStop) + + start = bytes.Index(path, fieldBuf) + if start < 0 { + return path, fieldBuf, fmt.Errorf("invalid path index, start=%d. %s", start, path) + } encodeSep = false - end++ } + end := start + len(fieldBuf) if escape { val = EscapePath(val, encodeSep) } - if path[end] != uriTokenStop { - return path, fieldBuf, fmt.Errorf("invalid path element, does not contain token stop, %s", path) - } - end++ - fieldBuf = bufCap(fieldBuf, len(val)) fieldBuf = append(fieldBuf, val...) diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index d7a7627b..212eae4f 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.22.0" +const goModuleVersion = "1.22.1" diff --git a/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go b/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go index 52c2759f..f6c80280 100644 --- a/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go +++ b/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go @@ -256,6 +256,7 @@ func (cw *wrapper) runServer(ctx context.Context, serverCred *tlsV1.Credential) if waitErr != nil { l.Error("error closing connector wrapper", zap.Error(waitErr)) } + os.Exit(1) } }() @@ -360,7 +361,7 @@ func (cw *wrapper) Close() error { if cw.serverStdin != nil { err = cw.serverStdin.Close() - if err != nil { + if err != nil && errors.Is(err, os.ErrClosed) { return fmt.Errorf("error closing connector service stdin: %w", err) } } diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go index bf326c35..51866e6b 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go @@ -495,6 +495,85 @@ func (x *AppTrait) GetFlags() []AppTrait_AppFlag { return nil } +type SecretTrait struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Profile *structpb.Struct `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + LastUsedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"` + CreatedById *ResourceId `protobuf:"bytes,5,opt,name=created_by_id,json=createdById,proto3" json:"created_by_id,omitempty"` +} + +func (x *SecretTrait) Reset() { + *x = SecretTrait{} + if protoimpl.UnsafeEnabled { + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecretTrait) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretTrait) ProtoMessage() {} + +func (x *SecretTrait) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecretTrait.ProtoReflect.Descriptor instead. +func (*SecretTrait) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_annotation_trait_proto_rawDescGZIP(), []int{4} +} + +func (x *SecretTrait) GetProfile() *structpb.Struct { + if x != nil { + return x.Profile + } + return nil +} + +func (x *SecretTrait) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *SecretTrait) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *SecretTrait) GetLastUsedAt() *timestamppb.Timestamp { + if x != nil { + return x.LastUsedAt + } + return nil +} + +func (x *SecretTrait) GetCreatedById() *ResourceId { + if x != nil { + return x.CreatedById + } + return nil +} + type UserTrait_Email struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -508,7 +587,7 @@ type UserTrait_Email struct { func (x *UserTrait_Email) Reset() { *x = UserTrait_Email{} if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[4] + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -521,7 +600,7 @@ func (x *UserTrait_Email) String() string { func (*UserTrait_Email) ProtoMessage() {} func (x *UserTrait_Email) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[4] + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -563,7 +642,7 @@ type UserTrait_Status struct { func (x *UserTrait_Status) Reset() { *x = UserTrait_Status{} if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[5] + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -576,7 +655,7 @@ func (x *UserTrait_Status) String() string { func (*UserTrait_Status) ProtoMessage() {} func (x *UserTrait_Status) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[5] + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -617,7 +696,7 @@ type UserTrait_MFAStatus struct { func (x *UserTrait_MFAStatus) Reset() { *x = UserTrait_MFAStatus{} if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[6] + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -630,7 +709,7 @@ func (x *UserTrait_MFAStatus) String() string { func (*UserTrait_MFAStatus) ProtoMessage() {} func (x *UserTrait_MFAStatus) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[6] + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -664,7 +743,7 @@ type UserTrait_SSOStatus struct { func (x *UserTrait_SSOStatus) Reset() { *x = UserTrait_SSOStatus{} if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[7] + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -677,7 +756,7 @@ func (x *UserTrait_SSOStatus) String() string { func (*UserTrait_SSOStatus) ProtoMessage() {} func (x *UserTrait_SSOStatus) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[7] + mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -708,6 +787,8 @@ var file_c1_connector_v2_annotation_trait_proto_rawDesc = []byte{ 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x1b, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, @@ -822,11 +903,30 @@ var file_c1_connector_v2_annotation_trait_proto_rawDesc = []byte{ 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x53, 0x41, 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x49, 0x44, 0x43, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x42, 0x4f, - 0x4f, 0x4b, 0x4d, 0x41, 0x52, 0x4b, 0x10, 0x05, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, - 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, - 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4f, 0x4b, 0x4d, 0x41, 0x52, 0x4b, 0x10, 0x05, 0x22, 0xb5, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, + 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x73, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x49, 0x64, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x49, 0x64, + 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, + 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -842,7 +942,7 @@ func file_c1_connector_v2_annotation_trait_proto_rawDescGZIP() []byte { } var file_c1_connector_v2_annotation_trait_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_c1_connector_v2_annotation_trait_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_c1_connector_v2_annotation_trait_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_c1_connector_v2_annotation_trait_proto_goTypes = []interface{}{ (UserTrait_AccountType)(0), // 0: c1.connector.v2.UserTrait.AccountType (UserTrait_Status_Status)(0), // 1: c1.connector.v2.UserTrait.Status.Status @@ -851,37 +951,44 @@ var file_c1_connector_v2_annotation_trait_proto_goTypes = []interface{}{ (*GroupTrait)(nil), // 4: c1.connector.v2.GroupTrait (*RoleTrait)(nil), // 5: c1.connector.v2.RoleTrait (*AppTrait)(nil), // 6: c1.connector.v2.AppTrait - (*UserTrait_Email)(nil), // 7: c1.connector.v2.UserTrait.Email - (*UserTrait_Status)(nil), // 8: c1.connector.v2.UserTrait.Status - (*UserTrait_MFAStatus)(nil), // 9: c1.connector.v2.UserTrait.MFAStatus - (*UserTrait_SSOStatus)(nil), // 10: c1.connector.v2.UserTrait.SSOStatus - (*structpb.Struct)(nil), // 11: google.protobuf.Struct - (*AssetRef)(nil), // 12: c1.connector.v2.AssetRef - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp + (*SecretTrait)(nil), // 7: c1.connector.v2.SecretTrait + (*UserTrait_Email)(nil), // 8: c1.connector.v2.UserTrait.Email + (*UserTrait_Status)(nil), // 9: c1.connector.v2.UserTrait.Status + (*UserTrait_MFAStatus)(nil), // 10: c1.connector.v2.UserTrait.MFAStatus + (*UserTrait_SSOStatus)(nil), // 11: c1.connector.v2.UserTrait.SSOStatus + (*structpb.Struct)(nil), // 12: google.protobuf.Struct + (*AssetRef)(nil), // 13: c1.connector.v2.AssetRef + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (*ResourceId)(nil), // 15: c1.connector.v2.ResourceId } var file_c1_connector_v2_annotation_trait_proto_depIdxs = []int32{ - 7, // 0: c1.connector.v2.UserTrait.emails:type_name -> c1.connector.v2.UserTrait.Email - 8, // 1: c1.connector.v2.UserTrait.status:type_name -> c1.connector.v2.UserTrait.Status - 11, // 2: c1.connector.v2.UserTrait.profile:type_name -> google.protobuf.Struct - 12, // 3: c1.connector.v2.UserTrait.icon:type_name -> c1.connector.v2.AssetRef + 8, // 0: c1.connector.v2.UserTrait.emails:type_name -> c1.connector.v2.UserTrait.Email + 9, // 1: c1.connector.v2.UserTrait.status:type_name -> c1.connector.v2.UserTrait.Status + 12, // 2: c1.connector.v2.UserTrait.profile:type_name -> google.protobuf.Struct + 13, // 3: c1.connector.v2.UserTrait.icon:type_name -> c1.connector.v2.AssetRef 0, // 4: c1.connector.v2.UserTrait.account_type:type_name -> c1.connector.v2.UserTrait.AccountType - 13, // 5: c1.connector.v2.UserTrait.created_at:type_name -> google.protobuf.Timestamp - 13, // 6: c1.connector.v2.UserTrait.last_login:type_name -> google.protobuf.Timestamp - 9, // 7: c1.connector.v2.UserTrait.mfa_status:type_name -> c1.connector.v2.UserTrait.MFAStatus - 10, // 8: c1.connector.v2.UserTrait.sso_status:type_name -> c1.connector.v2.UserTrait.SSOStatus - 12, // 9: c1.connector.v2.GroupTrait.icon:type_name -> c1.connector.v2.AssetRef - 11, // 10: c1.connector.v2.GroupTrait.profile:type_name -> google.protobuf.Struct - 11, // 11: c1.connector.v2.RoleTrait.profile:type_name -> google.protobuf.Struct - 12, // 12: c1.connector.v2.AppTrait.icon:type_name -> c1.connector.v2.AssetRef - 12, // 13: c1.connector.v2.AppTrait.logo:type_name -> c1.connector.v2.AssetRef - 11, // 14: c1.connector.v2.AppTrait.profile:type_name -> google.protobuf.Struct + 14, // 5: c1.connector.v2.UserTrait.created_at:type_name -> google.protobuf.Timestamp + 14, // 6: c1.connector.v2.UserTrait.last_login:type_name -> google.protobuf.Timestamp + 10, // 7: c1.connector.v2.UserTrait.mfa_status:type_name -> c1.connector.v2.UserTrait.MFAStatus + 11, // 8: c1.connector.v2.UserTrait.sso_status:type_name -> c1.connector.v2.UserTrait.SSOStatus + 13, // 9: c1.connector.v2.GroupTrait.icon:type_name -> c1.connector.v2.AssetRef + 12, // 10: c1.connector.v2.GroupTrait.profile:type_name -> google.protobuf.Struct + 12, // 11: c1.connector.v2.RoleTrait.profile:type_name -> google.protobuf.Struct + 13, // 12: c1.connector.v2.AppTrait.icon:type_name -> c1.connector.v2.AssetRef + 13, // 13: c1.connector.v2.AppTrait.logo:type_name -> c1.connector.v2.AssetRef + 12, // 14: c1.connector.v2.AppTrait.profile:type_name -> google.protobuf.Struct 2, // 15: c1.connector.v2.AppTrait.flags:type_name -> c1.connector.v2.AppTrait.AppFlag - 1, // 16: c1.connector.v2.UserTrait.Status.status:type_name -> c1.connector.v2.UserTrait.Status.Status - 17, // [17:17] is the sub-list for method output_type - 17, // [17:17] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 12, // 16: c1.connector.v2.SecretTrait.profile:type_name -> google.protobuf.Struct + 14, // 17: c1.connector.v2.SecretTrait.created_at:type_name -> google.protobuf.Timestamp + 14, // 18: c1.connector.v2.SecretTrait.expires_at:type_name -> google.protobuf.Timestamp + 14, // 19: c1.connector.v2.SecretTrait.last_used_at:type_name -> google.protobuf.Timestamp + 15, // 20: c1.connector.v2.SecretTrait.created_by_id:type_name -> c1.connector.v2.ResourceId + 1, // 21: c1.connector.v2.UserTrait.Status.status:type_name -> c1.connector.v2.UserTrait.Status.Status + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_c1_connector_v2_annotation_trait_proto_init() } @@ -890,6 +997,7 @@ func file_c1_connector_v2_annotation_trait_proto_init() { return } file_c1_connector_v2_asset_proto_init() + file_c1_connector_v2_resource_proto_init() if !protoimpl.UnsafeEnabled { file_c1_connector_v2_annotation_trait_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserTrait); i { @@ -940,7 +1048,7 @@ func file_c1_connector_v2_annotation_trait_proto_init() { } } file_c1_connector_v2_annotation_trait_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserTrait_Email); i { + switch v := v.(*SecretTrait); i { case 0: return &v.state case 1: @@ -952,7 +1060,7 @@ func file_c1_connector_v2_annotation_trait_proto_init() { } } file_c1_connector_v2_annotation_trait_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserTrait_Status); i { + switch v := v.(*UserTrait_Email); i { case 0: return &v.state case 1: @@ -964,7 +1072,7 @@ func file_c1_connector_v2_annotation_trait_proto_init() { } } file_c1_connector_v2_annotation_trait_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserTrait_MFAStatus); i { + switch v := v.(*UserTrait_Status); i { case 0: return &v.state case 1: @@ -976,6 +1084,18 @@ func file_c1_connector_v2_annotation_trait_proto_init() { } } file_c1_connector_v2_annotation_trait_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserTrait_MFAStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_c1_connector_v2_annotation_trait_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserTrait_SSOStatus); i { case 0: return &v.state @@ -994,7 +1114,7 @@ func file_c1_connector_v2_annotation_trait_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_c1_connector_v2_annotation_trait_proto_rawDesc, NumEnums: 3, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.validate.go index d613aa4a..0cc95e45 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.validate.go @@ -913,6 +913,250 @@ var _ interface { ErrorName() string } = AppTraitValidationError{} +// Validate checks the field values on SecretTrait with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SecretTrait) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretTrait with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SecretTraitMultiError, or +// nil if none found. +func (m *SecretTrait) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretTrait) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetProfile()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "Profile", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "Profile", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProfile()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretTraitValidationError{ + field: "Profile", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCreatedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretTraitValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetExpiresAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "ExpiresAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "ExpiresAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpiresAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretTraitValidationError{ + field: "ExpiresAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUsedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "LastUsedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "LastUsedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUsedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretTraitValidationError{ + field: "LastUsedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCreatedById()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "CreatedById", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretTraitValidationError{ + field: "CreatedById", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCreatedById()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretTraitValidationError{ + field: "CreatedById", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return SecretTraitMultiError(errors) + } + + return nil +} + +// SecretTraitMultiError is an error wrapping multiple validation errors +// returned by SecretTrait.ValidateAll() if the designated constraints aren't met. +type SecretTraitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretTraitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretTraitMultiError) AllErrors() []error { return m } + +// SecretTraitValidationError is the validation error returned by +// SecretTrait.Validate if the designated constraints aren't met. +type SecretTraitValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SecretTraitValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SecretTraitValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SecretTraitValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SecretTraitValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SecretTraitValidationError) ErrorName() string { return "SecretTraitValidationError" } + +// Error satisfies the builtin error interface +func (e SecretTraitValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSecretTrait.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SecretTraitValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SecretTraitValidationError{} + // Validate checks the field values on UserTrait_Email with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go index 71f18f6a..e5d257d5 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go @@ -35,6 +35,7 @@ const ( Capability_CAPABILITY_CREDENTIAL_ROTATION Capability = 6 Capability_CAPABILITY_RESOURCE_CREATE Capability = 7 Capability_CAPABILITY_RESOURCE_DELETE Capability = 8 + Capability_CAPABILITY_SYNC_SECRETS Capability = 9 ) // Enum value maps for Capability. @@ -49,6 +50,7 @@ var ( 6: "CAPABILITY_CREDENTIAL_ROTATION", 7: "CAPABILITY_RESOURCE_CREATE", 8: "CAPABILITY_RESOURCE_DELETE", + 9: "CAPABILITY_SYNC_SECRETS", } Capability_value = map[string]int32{ "CAPABILITY_UNSPECIFIED": 0, @@ -60,6 +62,7 @@ var ( "CAPABILITY_CREDENTIAL_ROTATION": 6, "CAPABILITY_RESOURCE_CREATE": 7, "CAPABILITY_RESOURCE_DELETE": 8, + "CAPABILITY_SYNC_SECRETS": 9, } ) @@ -241,14 +244,15 @@ type ConnectorMetadata struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - HelpUrl string `protobuf:"bytes,2,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"` - Icon *AssetRef `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"` - Logo *AssetRef `protobuf:"bytes,4,opt,name=logo,proto3" json:"logo,omitempty"` - Profile *structpb.Struct `protobuf:"bytes,5,opt,name=profile,proto3" json:"profile,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty"` - Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` - Capabilities *ConnectorCapabilities `protobuf:"bytes,8,opt,name=capabilities,proto3" json:"capabilities,omitempty"` + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + HelpUrl string `protobuf:"bytes,2,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"` + Icon *AssetRef `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"` + Logo *AssetRef `protobuf:"bytes,4,opt,name=logo,proto3" json:"logo,omitempty"` + Profile *structpb.Struct `protobuf:"bytes,5,opt,name=profile,proto3" json:"profile,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty"` + Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` + Capabilities *ConnectorCapabilities `protobuf:"bytes,8,opt,name=capabilities,proto3" json:"capabilities,omitempty"` + AccountCreationSchema *ConnectorAccountCreationSchema `protobuf:"bytes,9,opt,name=account_creation_schema,json=accountCreationSchema,proto3" json:"account_creation_schema,omitempty"` } func (x *ConnectorMetadata) Reset() { @@ -339,6 +343,13 @@ func (x *ConnectorMetadata) GetCapabilities() *ConnectorCapabilities { return nil } +func (x *ConnectorMetadata) GetAccountCreationSchema() *ConnectorAccountCreationSchema { + if x != nil { + return x.AccountCreationSchema + } + return nil +} + type CredentialDetails struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -794,6 +805,464 @@ func (x *ConnectorServiceValidateResponse) GetAnnotations() []*anypb.Any { return nil } +type ConnectorAccountCreationSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FieldMap map[string]*ConnectorAccountCreationSchema_Field `protobuf:"bytes,1,rep,name=field_map,json=fieldMap,proto3" json:"field_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ConnectorAccountCreationSchema) Reset() { + *x = ConnectorAccountCreationSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_c1_connector_v2_connector_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectorAccountCreationSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectorAccountCreationSchema) ProtoMessage() {} + +func (x *ConnectorAccountCreationSchema) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_connector_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectorAccountCreationSchema.ProtoReflect.Descriptor instead. +func (*ConnectorAccountCreationSchema) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{12} +} + +func (x *ConnectorAccountCreationSchema) GetFieldMap() map[string]*ConnectorAccountCreationSchema_Field { + if x != nil { + return x.FieldMap + } + return nil +} + +type ConnectorAccountCreationSchema_Field struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Placeholder string `protobuf:"bytes,4,opt,name=placeholder,proto3" json:"placeholder,omitempty"` + Order int32 `protobuf:"varint,5,opt,name=order,proto3" json:"order,omitempty"` + Deprecated bool `protobuf:"varint,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + // Types that are assignable to Field: + // + // *ConnectorAccountCreationSchema_Field_StringField + // *ConnectorAccountCreationSchema_Field_BoolField + // *ConnectorAccountCreationSchema_Field_StringListField + // *ConnectorAccountCreationSchema_Field_IntField + // *ConnectorAccountCreationSchema_Field_MapField + Field isConnectorAccountCreationSchema_Field_Field `protobuf_oneof:"field"` +} + +func (x *ConnectorAccountCreationSchema_Field) Reset() { + *x = ConnectorAccountCreationSchema_Field{} + if protoimpl.UnsafeEnabled { + mi := &file_c1_connector_v2_connector_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectorAccountCreationSchema_Field) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectorAccountCreationSchema_Field) ProtoMessage() {} + +func (x *ConnectorAccountCreationSchema_Field) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_connector_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectorAccountCreationSchema_Field.ProtoReflect.Descriptor instead. +func (*ConnectorAccountCreationSchema_Field) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{12, 1} +} + +func (x *ConnectorAccountCreationSchema_Field) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *ConnectorAccountCreationSchema_Field) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *ConnectorAccountCreationSchema_Field) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ConnectorAccountCreationSchema_Field) GetPlaceholder() string { + if x != nil { + return x.Placeholder + } + return "" +} + +func (x *ConnectorAccountCreationSchema_Field) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +func (x *ConnectorAccountCreationSchema_Field) GetDeprecated() bool { + if x != nil { + return x.Deprecated + } + return false +} + +func (m *ConnectorAccountCreationSchema_Field) GetField() isConnectorAccountCreationSchema_Field_Field { + if m != nil { + return m.Field + } + return nil +} + +func (x *ConnectorAccountCreationSchema_Field) GetStringField() *ConnectorAccountCreationSchema_StringField { + if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_StringField); ok { + return x.StringField + } + return nil +} + +func (x *ConnectorAccountCreationSchema_Field) GetBoolField() *ConnectorAccountCreationSchema_BoolField { + if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_BoolField); ok { + return x.BoolField + } + return nil +} + +func (x *ConnectorAccountCreationSchema_Field) GetStringListField() *ConnectorAccountCreationSchema_StringListField { + if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_StringListField); ok { + return x.StringListField + } + return nil +} + +func (x *ConnectorAccountCreationSchema_Field) GetIntField() *ConnectorAccountCreationSchema_IntField { + if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_IntField); ok { + return x.IntField + } + return nil +} + +func (x *ConnectorAccountCreationSchema_Field) GetMapField() *ConnectorAccountCreationSchema_MapField { + if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_MapField); ok { + return x.MapField + } + return nil +} + +type isConnectorAccountCreationSchema_Field_Field interface { + isConnectorAccountCreationSchema_Field_Field() +} + +type ConnectorAccountCreationSchema_Field_StringField struct { + StringField *ConnectorAccountCreationSchema_StringField `protobuf:"bytes,100,opt,name=string_field,json=stringField,proto3,oneof"` +} + +type ConnectorAccountCreationSchema_Field_BoolField struct { + BoolField *ConnectorAccountCreationSchema_BoolField `protobuf:"bytes,101,opt,name=bool_field,json=boolField,proto3,oneof"` +} + +type ConnectorAccountCreationSchema_Field_StringListField struct { + StringListField *ConnectorAccountCreationSchema_StringListField `protobuf:"bytes,102,opt,name=string_list_field,json=stringListField,proto3,oneof"` +} + +type ConnectorAccountCreationSchema_Field_IntField struct { + IntField *ConnectorAccountCreationSchema_IntField `protobuf:"bytes,103,opt,name=int_field,json=intField,proto3,oneof"` +} + +type ConnectorAccountCreationSchema_Field_MapField struct { + MapField *ConnectorAccountCreationSchema_MapField `protobuf:"bytes,104,opt,name=map_field,json=mapField,proto3,oneof"` +} + +func (*ConnectorAccountCreationSchema_Field_StringField) isConnectorAccountCreationSchema_Field_Field() { +} + +func (*ConnectorAccountCreationSchema_Field_BoolField) isConnectorAccountCreationSchema_Field_Field() { +} + +func (*ConnectorAccountCreationSchema_Field_StringListField) isConnectorAccountCreationSchema_Field_Field() { +} + +func (*ConnectorAccountCreationSchema_Field_IntField) isConnectorAccountCreationSchema_Field_Field() { +} + +func (*ConnectorAccountCreationSchema_Field_MapField) isConnectorAccountCreationSchema_Field_Field() { +} + +type ConnectorAccountCreationSchema_StringField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DefaultValue *string `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3,oneof" json:"default_value,omitempty"` +} + +func (x *ConnectorAccountCreationSchema_StringField) Reset() { + *x = ConnectorAccountCreationSchema_StringField{} + if protoimpl.UnsafeEnabled { + mi := &file_c1_connector_v2_connector_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectorAccountCreationSchema_StringField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectorAccountCreationSchema_StringField) ProtoMessage() {} + +func (x *ConnectorAccountCreationSchema_StringField) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_connector_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectorAccountCreationSchema_StringField.ProtoReflect.Descriptor instead. +func (*ConnectorAccountCreationSchema_StringField) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{12, 2} +} + +func (x *ConnectorAccountCreationSchema_StringField) GetDefaultValue() string { + if x != nil && x.DefaultValue != nil { + return *x.DefaultValue + } + return "" +} + +type ConnectorAccountCreationSchema_BoolField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DefaultValue *bool `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3,oneof" json:"default_value,omitempty"` +} + +func (x *ConnectorAccountCreationSchema_BoolField) Reset() { + *x = ConnectorAccountCreationSchema_BoolField{} + if protoimpl.UnsafeEnabled { + mi := &file_c1_connector_v2_connector_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectorAccountCreationSchema_BoolField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectorAccountCreationSchema_BoolField) ProtoMessage() {} + +func (x *ConnectorAccountCreationSchema_BoolField) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_connector_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectorAccountCreationSchema_BoolField.ProtoReflect.Descriptor instead. +func (*ConnectorAccountCreationSchema_BoolField) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{12, 3} +} + +func (x *ConnectorAccountCreationSchema_BoolField) GetDefaultValue() bool { + if x != nil && x.DefaultValue != nil { + return *x.DefaultValue + } + return false +} + +type ConnectorAccountCreationSchema_StringListField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DefaultValue []string `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` +} + +func (x *ConnectorAccountCreationSchema_StringListField) Reset() { + *x = ConnectorAccountCreationSchema_StringListField{} + if protoimpl.UnsafeEnabled { + mi := &file_c1_connector_v2_connector_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectorAccountCreationSchema_StringListField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectorAccountCreationSchema_StringListField) ProtoMessage() {} + +func (x *ConnectorAccountCreationSchema_StringListField) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_connector_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectorAccountCreationSchema_StringListField.ProtoReflect.Descriptor instead. +func (*ConnectorAccountCreationSchema_StringListField) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{12, 4} +} + +func (x *ConnectorAccountCreationSchema_StringListField) GetDefaultValue() []string { + if x != nil { + return x.DefaultValue + } + return nil +} + +type ConnectorAccountCreationSchema_IntField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DefaultValue *int32 `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3,oneof" json:"default_value,omitempty"` +} + +func (x *ConnectorAccountCreationSchema_IntField) Reset() { + *x = ConnectorAccountCreationSchema_IntField{} + if protoimpl.UnsafeEnabled { + mi := &file_c1_connector_v2_connector_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectorAccountCreationSchema_IntField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectorAccountCreationSchema_IntField) ProtoMessage() {} + +func (x *ConnectorAccountCreationSchema_IntField) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_connector_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectorAccountCreationSchema_IntField.ProtoReflect.Descriptor instead. +func (*ConnectorAccountCreationSchema_IntField) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{12, 5} +} + +func (x *ConnectorAccountCreationSchema_IntField) GetDefaultValue() int32 { + if x != nil && x.DefaultValue != nil { + return *x.DefaultValue + } + return 0 +} + +type ConnectorAccountCreationSchema_MapField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DefaultValue map[string]*ConnectorAccountCreationSchema_Field `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ConnectorAccountCreationSchema_MapField) Reset() { + *x = ConnectorAccountCreationSchema_MapField{} + if protoimpl.UnsafeEnabled { + mi := &file_c1_connector_v2_connector_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectorAccountCreationSchema_MapField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectorAccountCreationSchema_MapField) ProtoMessage() {} + +func (x *ConnectorAccountCreationSchema_MapField) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_connector_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectorAccountCreationSchema_MapField.ProtoReflect.Descriptor instead. +func (*ConnectorAccountCreationSchema_MapField) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_connector_proto_rawDescGZIP(), []int{12, 6} +} + +func (x *ConnectorAccountCreationSchema_MapField) GetDefaultValue() map[string]*ConnectorAccountCreationSchema_Field { + if x != nil { + return x.DefaultValue + } + return nil +} + var File_c1_connector_v2_connector_proto protoreflect.FileDescriptor var file_c1_connector_v2_connector_proto_rawDesc = []byte{ @@ -820,7 +1289,7 @@ var file_c1_connector_v2_connector_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbf, 0x03, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa8, 0x04, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0b, @@ -848,163 +1317,262 @@ var file_c1_connector_v2_connector_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x8e, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x7d, - 0x0a, 0x1f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x1d, - 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x7a, 0x0a, - 0x1e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1c, 0x63, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8e, 0x02, 0x0a, 0x24, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x12, 0x73, 0x0a, 0x1c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, - 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x73, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x71, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x19, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x02, 0x0a, 0x23, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x17, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x15, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x22, 0x8e, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x7d, 0x0a, 0x1f, 0x63, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x1d, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x7a, 0x0a, 0x1e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x73, 0x0a, 0x1c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, - 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x73, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x71, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x19, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x02, 0x0a, 0x15, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x52, 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x16, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, - 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, - 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, - 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, - 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x22, 0x24, 0x0a, 0x22, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x65, 0x0a, 0x23, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x21, 0x0a, 0x1f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x20, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x95, - 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, - 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, - 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, - 0x4e, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x41, 0x50, 0x41, - 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x45, 0x45, - 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x23, 0x0a, - 0x1f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x4f, - 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, - 0x10, 0x05, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, - 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x4f, 0x54, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, - 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x52, - 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, - 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x44, 0x45, - 0x4c, 0x45, 0x54, 0x45, 0x10, 0x08, 0x2a, 0xf2, 0x01, 0x0a, 0x20, 0x43, 0x61, 0x70, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x2f, 0x43, - 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, - 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, - 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, - 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, - 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, - 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, - 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, - 0x44, 0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x2b, - 0x0a, 0x27, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, + 0x6f, 0x6e, 0x22, 0x8e, 0x02, 0x0a, 0x24, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x73, 0x0a, 0x1c, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x71, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x19, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x02, 0x0a, 0x23, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x73, 0x0a, 0x1c, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x71, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x19, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x65, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x02, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x65, 0x0a, + 0x1a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63, + 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x18, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x16, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, + 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x24, 0x0a, 0x22, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, + 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x65, 0x0a, 0x23, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x21, 0x0a, 0x1f, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x20, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa5, 0x0b, 0x0a, 0x1e, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x09, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x1a, 0x72, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4b, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xa8, 0x05, 0x0a, 0x05, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, + 0x6c, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x63, + 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x0a, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x60, 0x0a, + 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x64, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, + 0x5a, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x65, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, + 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x6d, 0x0a, 0x11, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x69, + 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x57, 0x0a, 0x09, 0x69, 0x6e, + 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x49, + 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x12, 0x57, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x07, 0x0a, 0x05, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x1a, 0x49, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x1a, 0x47, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, + 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x36, 0x0a, 0x0f, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x1a, 0x46, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, + 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xf3, 0x01, 0x0a, 0x08, 0x4d, 0x61, + 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x6f, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, + 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x76, 0x0a, 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4b, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, + 0xb2, 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, + 0x0a, 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, + 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, + 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, + 0x54, 0x59, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x41, 0x50, + 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x45, + 0x45, 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, + 0x54, 0x59, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x23, + 0x0a, 0x1f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x41, 0x43, 0x43, + 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x05, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, + 0x59, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x4f, 0x54, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x50, 0x41, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x08, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, 0x50, 0x41, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, + 0x54, 0x53, 0x10, 0x09, 0x2a, 0xf2, 0x01, 0x0a, 0x20, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, + 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, + 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x33, + 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x03, 0x32, 0xeb, 0x02, 0x0a, 0x10, + 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, + 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, + 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, + 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x44, 0x4f, + 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27, + 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, + 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x03, 0x32, 0xeb, 0x02, 0x0a, 0x10, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x07, 0x43, - 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, - 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, - 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, - 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x07, 0x43, 0x6c, 0x65, + 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, + 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, + 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1020,59 +1588,78 @@ func file_c1_connector_v2_connector_proto_rawDescGZIP() []byte { } var file_c1_connector_v2_connector_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_c1_connector_v2_connector_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_c1_connector_v2_connector_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_c1_connector_v2_connector_proto_goTypes = []interface{}{ - (Capability)(0), // 0: c1.connector.v2.Capability - (CapabilityDetailCredentialOption)(0), // 1: c1.connector.v2.CapabilityDetailCredentialOption - (*ConnectorServiceCleanupRequest)(nil), // 2: c1.connector.v2.ConnectorServiceCleanupRequest - (*ConnectorServiceCleanupResponse)(nil), // 3: c1.connector.v2.ConnectorServiceCleanupResponse - (*ConnectorMetadata)(nil), // 4: c1.connector.v2.ConnectorMetadata - (*CredentialDetails)(nil), // 5: c1.connector.v2.CredentialDetails - (*CredentialDetailsAccountProvisioning)(nil), // 6: c1.connector.v2.CredentialDetailsAccountProvisioning - (*CredentialDetailsCredentialRotation)(nil), // 7: c1.connector.v2.CredentialDetailsCredentialRotation - (*ConnectorCapabilities)(nil), // 8: c1.connector.v2.ConnectorCapabilities - (*ResourceTypeCapability)(nil), // 9: c1.connector.v2.ResourceTypeCapability - (*ConnectorServiceGetMetadataRequest)(nil), // 10: c1.connector.v2.ConnectorServiceGetMetadataRequest - (*ConnectorServiceGetMetadataResponse)(nil), // 11: c1.connector.v2.ConnectorServiceGetMetadataResponse - (*ConnectorServiceValidateRequest)(nil), // 12: c1.connector.v2.ConnectorServiceValidateRequest - (*ConnectorServiceValidateResponse)(nil), // 13: c1.connector.v2.ConnectorServiceValidateResponse - (*anypb.Any)(nil), // 14: google.protobuf.Any - (*AssetRef)(nil), // 15: c1.connector.v2.AssetRef - (*structpb.Struct)(nil), // 16: google.protobuf.Struct - (*ResourceType)(nil), // 17: c1.connector.v2.ResourceType + (Capability)(0), // 0: c1.connector.v2.Capability + (CapabilityDetailCredentialOption)(0), // 1: c1.connector.v2.CapabilityDetailCredentialOption + (*ConnectorServiceCleanupRequest)(nil), // 2: c1.connector.v2.ConnectorServiceCleanupRequest + (*ConnectorServiceCleanupResponse)(nil), // 3: c1.connector.v2.ConnectorServiceCleanupResponse + (*ConnectorMetadata)(nil), // 4: c1.connector.v2.ConnectorMetadata + (*CredentialDetails)(nil), // 5: c1.connector.v2.CredentialDetails + (*CredentialDetailsAccountProvisioning)(nil), // 6: c1.connector.v2.CredentialDetailsAccountProvisioning + (*CredentialDetailsCredentialRotation)(nil), // 7: c1.connector.v2.CredentialDetailsCredentialRotation + (*ConnectorCapabilities)(nil), // 8: c1.connector.v2.ConnectorCapabilities + (*ResourceTypeCapability)(nil), // 9: c1.connector.v2.ResourceTypeCapability + (*ConnectorServiceGetMetadataRequest)(nil), // 10: c1.connector.v2.ConnectorServiceGetMetadataRequest + (*ConnectorServiceGetMetadataResponse)(nil), // 11: c1.connector.v2.ConnectorServiceGetMetadataResponse + (*ConnectorServiceValidateRequest)(nil), // 12: c1.connector.v2.ConnectorServiceValidateRequest + (*ConnectorServiceValidateResponse)(nil), // 13: c1.connector.v2.ConnectorServiceValidateResponse + (*ConnectorAccountCreationSchema)(nil), // 14: c1.connector.v2.ConnectorAccountCreationSchema + nil, // 15: c1.connector.v2.ConnectorAccountCreationSchema.FieldMapEntry + (*ConnectorAccountCreationSchema_Field)(nil), // 16: c1.connector.v2.ConnectorAccountCreationSchema.Field + (*ConnectorAccountCreationSchema_StringField)(nil), // 17: c1.connector.v2.ConnectorAccountCreationSchema.StringField + (*ConnectorAccountCreationSchema_BoolField)(nil), // 18: c1.connector.v2.ConnectorAccountCreationSchema.BoolField + (*ConnectorAccountCreationSchema_StringListField)(nil), // 19: c1.connector.v2.ConnectorAccountCreationSchema.StringListField + (*ConnectorAccountCreationSchema_IntField)(nil), // 20: c1.connector.v2.ConnectorAccountCreationSchema.IntField + (*ConnectorAccountCreationSchema_MapField)(nil), // 21: c1.connector.v2.ConnectorAccountCreationSchema.MapField + nil, // 22: c1.connector.v2.ConnectorAccountCreationSchema.MapField.DefaultValueEntry + (*anypb.Any)(nil), // 23: google.protobuf.Any + (*AssetRef)(nil), // 24: c1.connector.v2.AssetRef + (*structpb.Struct)(nil), // 25: google.protobuf.Struct + (*ResourceType)(nil), // 26: c1.connector.v2.ResourceType } var file_c1_connector_v2_connector_proto_depIdxs = []int32{ - 14, // 0: c1.connector.v2.ConnectorServiceCleanupRequest.annotations:type_name -> google.protobuf.Any - 14, // 1: c1.connector.v2.ConnectorServiceCleanupResponse.annotations:type_name -> google.protobuf.Any - 15, // 2: c1.connector.v2.ConnectorMetadata.icon:type_name -> c1.connector.v2.AssetRef - 15, // 3: c1.connector.v2.ConnectorMetadata.logo:type_name -> c1.connector.v2.AssetRef - 16, // 4: c1.connector.v2.ConnectorMetadata.profile:type_name -> google.protobuf.Struct - 14, // 5: c1.connector.v2.ConnectorMetadata.annotations:type_name -> google.protobuf.Any + 23, // 0: c1.connector.v2.ConnectorServiceCleanupRequest.annotations:type_name -> google.protobuf.Any + 23, // 1: c1.connector.v2.ConnectorServiceCleanupResponse.annotations:type_name -> google.protobuf.Any + 24, // 2: c1.connector.v2.ConnectorMetadata.icon:type_name -> c1.connector.v2.AssetRef + 24, // 3: c1.connector.v2.ConnectorMetadata.logo:type_name -> c1.connector.v2.AssetRef + 25, // 4: c1.connector.v2.ConnectorMetadata.profile:type_name -> google.protobuf.Struct + 23, // 5: c1.connector.v2.ConnectorMetadata.annotations:type_name -> google.protobuf.Any 8, // 6: c1.connector.v2.ConnectorMetadata.capabilities:type_name -> c1.connector.v2.ConnectorCapabilities - 6, // 7: c1.connector.v2.CredentialDetails.capability_account_provisioning:type_name -> c1.connector.v2.CredentialDetailsAccountProvisioning - 7, // 8: c1.connector.v2.CredentialDetails.capability_credential_rotation:type_name -> c1.connector.v2.CredentialDetailsCredentialRotation - 1, // 9: c1.connector.v2.CredentialDetailsAccountProvisioning.supported_credential_options:type_name -> c1.connector.v2.CapabilityDetailCredentialOption - 1, // 10: c1.connector.v2.CredentialDetailsAccountProvisioning.preferred_credential_option:type_name -> c1.connector.v2.CapabilityDetailCredentialOption - 1, // 11: c1.connector.v2.CredentialDetailsCredentialRotation.supported_credential_options:type_name -> c1.connector.v2.CapabilityDetailCredentialOption - 1, // 12: c1.connector.v2.CredentialDetailsCredentialRotation.preferred_credential_option:type_name -> c1.connector.v2.CapabilityDetailCredentialOption - 9, // 13: c1.connector.v2.ConnectorCapabilities.resource_type_capabilities:type_name -> c1.connector.v2.ResourceTypeCapability - 0, // 14: c1.connector.v2.ConnectorCapabilities.connector_capabilities:type_name -> c1.connector.v2.Capability - 5, // 15: c1.connector.v2.ConnectorCapabilities.credential_details:type_name -> c1.connector.v2.CredentialDetails - 17, // 16: c1.connector.v2.ResourceTypeCapability.resource_type:type_name -> c1.connector.v2.ResourceType - 0, // 17: c1.connector.v2.ResourceTypeCapability.capabilities:type_name -> c1.connector.v2.Capability - 4, // 18: c1.connector.v2.ConnectorServiceGetMetadataResponse.metadata:type_name -> c1.connector.v2.ConnectorMetadata - 14, // 19: c1.connector.v2.ConnectorServiceValidateResponse.annotations:type_name -> google.protobuf.Any - 10, // 20: c1.connector.v2.ConnectorService.GetMetadata:input_type -> c1.connector.v2.ConnectorServiceGetMetadataRequest - 12, // 21: c1.connector.v2.ConnectorService.Validate:input_type -> c1.connector.v2.ConnectorServiceValidateRequest - 2, // 22: c1.connector.v2.ConnectorService.Cleanup:input_type -> c1.connector.v2.ConnectorServiceCleanupRequest - 11, // 23: c1.connector.v2.ConnectorService.GetMetadata:output_type -> c1.connector.v2.ConnectorServiceGetMetadataResponse - 13, // 24: c1.connector.v2.ConnectorService.Validate:output_type -> c1.connector.v2.ConnectorServiceValidateResponse - 3, // 25: c1.connector.v2.ConnectorService.Cleanup:output_type -> c1.connector.v2.ConnectorServiceCleanupResponse - 23, // [23:26] is the sub-list for method output_type - 20, // [20:23] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 14, // 7: c1.connector.v2.ConnectorMetadata.account_creation_schema:type_name -> c1.connector.v2.ConnectorAccountCreationSchema + 6, // 8: c1.connector.v2.CredentialDetails.capability_account_provisioning:type_name -> c1.connector.v2.CredentialDetailsAccountProvisioning + 7, // 9: c1.connector.v2.CredentialDetails.capability_credential_rotation:type_name -> c1.connector.v2.CredentialDetailsCredentialRotation + 1, // 10: c1.connector.v2.CredentialDetailsAccountProvisioning.supported_credential_options:type_name -> c1.connector.v2.CapabilityDetailCredentialOption + 1, // 11: c1.connector.v2.CredentialDetailsAccountProvisioning.preferred_credential_option:type_name -> c1.connector.v2.CapabilityDetailCredentialOption + 1, // 12: c1.connector.v2.CredentialDetailsCredentialRotation.supported_credential_options:type_name -> c1.connector.v2.CapabilityDetailCredentialOption + 1, // 13: c1.connector.v2.CredentialDetailsCredentialRotation.preferred_credential_option:type_name -> c1.connector.v2.CapabilityDetailCredentialOption + 9, // 14: c1.connector.v2.ConnectorCapabilities.resource_type_capabilities:type_name -> c1.connector.v2.ResourceTypeCapability + 0, // 15: c1.connector.v2.ConnectorCapabilities.connector_capabilities:type_name -> c1.connector.v2.Capability + 5, // 16: c1.connector.v2.ConnectorCapabilities.credential_details:type_name -> c1.connector.v2.CredentialDetails + 26, // 17: c1.connector.v2.ResourceTypeCapability.resource_type:type_name -> c1.connector.v2.ResourceType + 0, // 18: c1.connector.v2.ResourceTypeCapability.capabilities:type_name -> c1.connector.v2.Capability + 4, // 19: c1.connector.v2.ConnectorServiceGetMetadataResponse.metadata:type_name -> c1.connector.v2.ConnectorMetadata + 23, // 20: c1.connector.v2.ConnectorServiceValidateResponse.annotations:type_name -> google.protobuf.Any + 15, // 21: c1.connector.v2.ConnectorAccountCreationSchema.field_map:type_name -> c1.connector.v2.ConnectorAccountCreationSchema.FieldMapEntry + 16, // 22: c1.connector.v2.ConnectorAccountCreationSchema.FieldMapEntry.value:type_name -> c1.connector.v2.ConnectorAccountCreationSchema.Field + 17, // 23: c1.connector.v2.ConnectorAccountCreationSchema.Field.string_field:type_name -> c1.connector.v2.ConnectorAccountCreationSchema.StringField + 18, // 24: c1.connector.v2.ConnectorAccountCreationSchema.Field.bool_field:type_name -> c1.connector.v2.ConnectorAccountCreationSchema.BoolField + 19, // 25: c1.connector.v2.ConnectorAccountCreationSchema.Field.string_list_field:type_name -> c1.connector.v2.ConnectorAccountCreationSchema.StringListField + 20, // 26: c1.connector.v2.ConnectorAccountCreationSchema.Field.int_field:type_name -> c1.connector.v2.ConnectorAccountCreationSchema.IntField + 21, // 27: c1.connector.v2.ConnectorAccountCreationSchema.Field.map_field:type_name -> c1.connector.v2.ConnectorAccountCreationSchema.MapField + 22, // 28: c1.connector.v2.ConnectorAccountCreationSchema.MapField.default_value:type_name -> c1.connector.v2.ConnectorAccountCreationSchema.MapField.DefaultValueEntry + 16, // 29: c1.connector.v2.ConnectorAccountCreationSchema.MapField.DefaultValueEntry.value:type_name -> c1.connector.v2.ConnectorAccountCreationSchema.Field + 10, // 30: c1.connector.v2.ConnectorService.GetMetadata:input_type -> c1.connector.v2.ConnectorServiceGetMetadataRequest + 12, // 31: c1.connector.v2.ConnectorService.Validate:input_type -> c1.connector.v2.ConnectorServiceValidateRequest + 2, // 32: c1.connector.v2.ConnectorService.Cleanup:input_type -> c1.connector.v2.ConnectorServiceCleanupRequest + 11, // 33: c1.connector.v2.ConnectorService.GetMetadata:output_type -> c1.connector.v2.ConnectorServiceGetMetadataResponse + 13, // 34: c1.connector.v2.ConnectorService.Validate:output_type -> c1.connector.v2.ConnectorServiceValidateResponse + 3, // 35: c1.connector.v2.ConnectorService.Cleanup:output_type -> c1.connector.v2.ConnectorServiceCleanupResponse + 33, // [33:36] is the sub-list for method output_type + 30, // [30:33] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name } func init() { file_c1_connector_v2_connector_proto_init() } @@ -1227,14 +1814,108 @@ func file_c1_connector_v2_connector_proto_init() { return nil } } + file_c1_connector_v2_connector_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectorAccountCreationSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_c1_connector_v2_connector_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectorAccountCreationSchema_Field); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_c1_connector_v2_connector_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectorAccountCreationSchema_StringField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_c1_connector_v2_connector_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectorAccountCreationSchema_BoolField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_c1_connector_v2_connector_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectorAccountCreationSchema_StringListField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_c1_connector_v2_connector_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectorAccountCreationSchema_IntField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_c1_connector_v2_connector_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectorAccountCreationSchema_MapField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_c1_connector_v2_connector_proto_msgTypes[14].OneofWrappers = []interface{}{ + (*ConnectorAccountCreationSchema_Field_StringField)(nil), + (*ConnectorAccountCreationSchema_Field_BoolField)(nil), + (*ConnectorAccountCreationSchema_Field_StringListField)(nil), + (*ConnectorAccountCreationSchema_Field_IntField)(nil), + (*ConnectorAccountCreationSchema_Field_MapField)(nil), } + file_c1_connector_v2_connector_proto_msgTypes[15].OneofWrappers = []interface{}{} + file_c1_connector_v2_connector_proto_msgTypes[16].OneofWrappers = []interface{}{} + file_c1_connector_v2_connector_proto_msgTypes[18].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_c1_connector_v2_connector_proto_rawDesc, NumEnums: 2, - NumMessages: 12, + NumMessages: 21, NumExtensions: 0, NumServices: 1, }, diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go index dd6cde15..ea53b24c 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go @@ -554,6 +554,35 @@ func (m *ConnectorMetadata) validate(all bool) error { } } + if all { + switch v := interface{}(m.GetAccountCreationSchema()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectorMetadataValidationError{ + field: "AccountCreationSchema", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectorMetadataValidationError{ + field: "AccountCreationSchema", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAccountCreationSchema()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectorMetadataValidationError{ + field: "AccountCreationSchema", + reason: "embedded message failed validation", + cause: err, + } + } + } + if len(errors) > 0 { return ConnectorMetadataMultiError(errors) } @@ -1784,3 +1813,1070 @@ var _ interface { Cause() error ErrorName() string } = ConnectorServiceValidateResponseValidationError{} + +// Validate checks the field values on ConnectorAccountCreationSchema with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ConnectorAccountCreationSchema) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConnectorAccountCreationSchema with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ConnectorAccountCreationSchemaMultiError, or nil if none found. +func (m *ConnectorAccountCreationSchema) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectorAccountCreationSchema) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + { + sorted_keys := make([]string, len(m.GetFieldMap())) + i := 0 + for key := range m.GetFieldMap() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetFieldMap()[key] + _ = val + + // no validation rules for FieldMap[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectorAccountCreationSchemaValidationError{ + field: fmt.Sprintf("FieldMap[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectorAccountCreationSchemaValidationError{ + field: fmt.Sprintf("FieldMap[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectorAccountCreationSchemaValidationError{ + field: fmt.Sprintf("FieldMap[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return ConnectorAccountCreationSchemaMultiError(errors) + } + + return nil +} + +// ConnectorAccountCreationSchemaMultiError is an error wrapping multiple +// validation errors returned by ConnectorAccountCreationSchema.ValidateAll() +// if the designated constraints aren't met. +type ConnectorAccountCreationSchemaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectorAccountCreationSchemaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectorAccountCreationSchemaMultiError) AllErrors() []error { return m } + +// ConnectorAccountCreationSchemaValidationError is the validation error +// returned by ConnectorAccountCreationSchema.Validate if the designated +// constraints aren't met. +type ConnectorAccountCreationSchemaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectorAccountCreationSchemaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectorAccountCreationSchemaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConnectorAccountCreationSchemaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectorAccountCreationSchemaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectorAccountCreationSchemaValidationError) ErrorName() string { + return "ConnectorAccountCreationSchemaValidationError" +} + +// Error satisfies the builtin error interface +func (e ConnectorAccountCreationSchemaValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConnectorAccountCreationSchema.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectorAccountCreationSchemaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectorAccountCreationSchemaValidationError{} + +// Validate checks the field values on ConnectorAccountCreationSchema_Field +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *ConnectorAccountCreationSchema_Field) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConnectorAccountCreationSchema_Field +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// ConnectorAccountCreationSchema_FieldMultiError, or nil if none found. +func (m *ConnectorAccountCreationSchema_Field) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectorAccountCreationSchema_Field) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for DisplayName + + // no validation rules for Required + + // no validation rules for Description + + // no validation rules for Placeholder + + // no validation rules for Order + + // no validation rules for Deprecated + + switch v := m.Field.(type) { + case *ConnectorAccountCreationSchema_Field_StringField: + if v == nil { + err := ConnectorAccountCreationSchema_FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetStringField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "StringField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "StringField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectorAccountCreationSchema_FieldValidationError{ + field: "StringField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ConnectorAccountCreationSchema_Field_BoolField: + if v == nil { + err := ConnectorAccountCreationSchema_FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBoolField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "BoolField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "BoolField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBoolField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectorAccountCreationSchema_FieldValidationError{ + field: "BoolField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ConnectorAccountCreationSchema_Field_StringListField: + if v == nil { + err := ConnectorAccountCreationSchema_FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetStringListField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "StringListField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "StringListField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringListField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectorAccountCreationSchema_FieldValidationError{ + field: "StringListField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ConnectorAccountCreationSchema_Field_IntField: + if v == nil { + err := ConnectorAccountCreationSchema_FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetIntField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "IntField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "IntField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIntField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectorAccountCreationSchema_FieldValidationError{ + field: "IntField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ConnectorAccountCreationSchema_Field_MapField: + if v == nil { + err := ConnectorAccountCreationSchema_FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMapField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "MapField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_FieldValidationError{ + field: "MapField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMapField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectorAccountCreationSchema_FieldValidationError{ + field: "MapField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return ConnectorAccountCreationSchema_FieldMultiError(errors) + } + + return nil +} + +// ConnectorAccountCreationSchema_FieldMultiError is an error wrapping multiple +// validation errors returned by +// ConnectorAccountCreationSchema_Field.ValidateAll() if the designated +// constraints aren't met. +type ConnectorAccountCreationSchema_FieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectorAccountCreationSchema_FieldMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectorAccountCreationSchema_FieldMultiError) AllErrors() []error { return m } + +// ConnectorAccountCreationSchema_FieldValidationError is the validation error +// returned by ConnectorAccountCreationSchema_Field.Validate if the designated +// constraints aren't met. +type ConnectorAccountCreationSchema_FieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectorAccountCreationSchema_FieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectorAccountCreationSchema_FieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConnectorAccountCreationSchema_FieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectorAccountCreationSchema_FieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectorAccountCreationSchema_FieldValidationError) ErrorName() string { + return "ConnectorAccountCreationSchema_FieldValidationError" +} + +// Error satisfies the builtin error interface +func (e ConnectorAccountCreationSchema_FieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConnectorAccountCreationSchema_Field.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectorAccountCreationSchema_FieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectorAccountCreationSchema_FieldValidationError{} + +// Validate checks the field values on +// ConnectorAccountCreationSchema_StringField with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *ConnectorAccountCreationSchema_StringField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ConnectorAccountCreationSchema_StringField with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ConnectorAccountCreationSchema_StringFieldMultiError, or nil if none found. +func (m *ConnectorAccountCreationSchema_StringField) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectorAccountCreationSchema_StringField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.DefaultValue != nil { + // no validation rules for DefaultValue + } + + if len(errors) > 0 { + return ConnectorAccountCreationSchema_StringFieldMultiError(errors) + } + + return nil +} + +// ConnectorAccountCreationSchema_StringFieldMultiError is an error wrapping +// multiple validation errors returned by +// ConnectorAccountCreationSchema_StringField.ValidateAll() if the designated +// constraints aren't met. +type ConnectorAccountCreationSchema_StringFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectorAccountCreationSchema_StringFieldMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectorAccountCreationSchema_StringFieldMultiError) AllErrors() []error { return m } + +// ConnectorAccountCreationSchema_StringFieldValidationError is the validation +// error returned by ConnectorAccountCreationSchema_StringField.Validate if +// the designated constraints aren't met. +type ConnectorAccountCreationSchema_StringFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectorAccountCreationSchema_StringFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectorAccountCreationSchema_StringFieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConnectorAccountCreationSchema_StringFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectorAccountCreationSchema_StringFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectorAccountCreationSchema_StringFieldValidationError) ErrorName() string { + return "ConnectorAccountCreationSchema_StringFieldValidationError" +} + +// Error satisfies the builtin error interface +func (e ConnectorAccountCreationSchema_StringFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConnectorAccountCreationSchema_StringField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectorAccountCreationSchema_StringFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectorAccountCreationSchema_StringFieldValidationError{} + +// Validate checks the field values on ConnectorAccountCreationSchema_BoolField +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *ConnectorAccountCreationSchema_BoolField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ConnectorAccountCreationSchema_BoolField with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ConnectorAccountCreationSchema_BoolFieldMultiError, or nil if none found. +func (m *ConnectorAccountCreationSchema_BoolField) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectorAccountCreationSchema_BoolField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.DefaultValue != nil { + // no validation rules for DefaultValue + } + + if len(errors) > 0 { + return ConnectorAccountCreationSchema_BoolFieldMultiError(errors) + } + + return nil +} + +// ConnectorAccountCreationSchema_BoolFieldMultiError is an error wrapping +// multiple validation errors returned by +// ConnectorAccountCreationSchema_BoolField.ValidateAll() if the designated +// constraints aren't met. +type ConnectorAccountCreationSchema_BoolFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectorAccountCreationSchema_BoolFieldMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectorAccountCreationSchema_BoolFieldMultiError) AllErrors() []error { return m } + +// ConnectorAccountCreationSchema_BoolFieldValidationError is the validation +// error returned by ConnectorAccountCreationSchema_BoolField.Validate if the +// designated constraints aren't met. +type ConnectorAccountCreationSchema_BoolFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectorAccountCreationSchema_BoolFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectorAccountCreationSchema_BoolFieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConnectorAccountCreationSchema_BoolFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectorAccountCreationSchema_BoolFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectorAccountCreationSchema_BoolFieldValidationError) ErrorName() string { + return "ConnectorAccountCreationSchema_BoolFieldValidationError" +} + +// Error satisfies the builtin error interface +func (e ConnectorAccountCreationSchema_BoolFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConnectorAccountCreationSchema_BoolField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectorAccountCreationSchema_BoolFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectorAccountCreationSchema_BoolFieldValidationError{} + +// Validate checks the field values on +// ConnectorAccountCreationSchema_StringListField with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *ConnectorAccountCreationSchema_StringListField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ConnectorAccountCreationSchema_StringListField with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// ConnectorAccountCreationSchema_StringListFieldMultiError, or nil if none found. +func (m *ConnectorAccountCreationSchema_StringListField) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectorAccountCreationSchema_StringListField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ConnectorAccountCreationSchema_StringListFieldMultiError(errors) + } + + return nil +} + +// ConnectorAccountCreationSchema_StringListFieldMultiError is an error +// wrapping multiple validation errors returned by +// ConnectorAccountCreationSchema_StringListField.ValidateAll() if the +// designated constraints aren't met. +type ConnectorAccountCreationSchema_StringListFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectorAccountCreationSchema_StringListFieldMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectorAccountCreationSchema_StringListFieldMultiError) AllErrors() []error { return m } + +// ConnectorAccountCreationSchema_StringListFieldValidationError is the +// validation error returned by +// ConnectorAccountCreationSchema_StringListField.Validate if the designated +// constraints aren't met. +type ConnectorAccountCreationSchema_StringListFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectorAccountCreationSchema_StringListFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectorAccountCreationSchema_StringListFieldValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e ConnectorAccountCreationSchema_StringListFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectorAccountCreationSchema_StringListFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectorAccountCreationSchema_StringListFieldValidationError) ErrorName() string { + return "ConnectorAccountCreationSchema_StringListFieldValidationError" +} + +// Error satisfies the builtin error interface +func (e ConnectorAccountCreationSchema_StringListFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConnectorAccountCreationSchema_StringListField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectorAccountCreationSchema_StringListFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectorAccountCreationSchema_StringListFieldValidationError{} + +// Validate checks the field values on ConnectorAccountCreationSchema_IntField +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *ConnectorAccountCreationSchema_IntField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ConnectorAccountCreationSchema_IntField with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// ConnectorAccountCreationSchema_IntFieldMultiError, or nil if none found. +func (m *ConnectorAccountCreationSchema_IntField) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectorAccountCreationSchema_IntField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.DefaultValue != nil { + // no validation rules for DefaultValue + } + + if len(errors) > 0 { + return ConnectorAccountCreationSchema_IntFieldMultiError(errors) + } + + return nil +} + +// ConnectorAccountCreationSchema_IntFieldMultiError is an error wrapping +// multiple validation errors returned by +// ConnectorAccountCreationSchema_IntField.ValidateAll() if the designated +// constraints aren't met. +type ConnectorAccountCreationSchema_IntFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectorAccountCreationSchema_IntFieldMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectorAccountCreationSchema_IntFieldMultiError) AllErrors() []error { return m } + +// ConnectorAccountCreationSchema_IntFieldValidationError is the validation +// error returned by ConnectorAccountCreationSchema_IntField.Validate if the +// designated constraints aren't met. +type ConnectorAccountCreationSchema_IntFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectorAccountCreationSchema_IntFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectorAccountCreationSchema_IntFieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConnectorAccountCreationSchema_IntFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectorAccountCreationSchema_IntFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectorAccountCreationSchema_IntFieldValidationError) ErrorName() string { + return "ConnectorAccountCreationSchema_IntFieldValidationError" +} + +// Error satisfies the builtin error interface +func (e ConnectorAccountCreationSchema_IntFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConnectorAccountCreationSchema_IntField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectorAccountCreationSchema_IntFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectorAccountCreationSchema_IntFieldValidationError{} + +// Validate checks the field values on ConnectorAccountCreationSchema_MapField +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *ConnectorAccountCreationSchema_MapField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ConnectorAccountCreationSchema_MapField with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// ConnectorAccountCreationSchema_MapFieldMultiError, or nil if none found. +func (m *ConnectorAccountCreationSchema_MapField) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectorAccountCreationSchema_MapField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + { + sorted_keys := make([]string, len(m.GetDefaultValue())) + i := 0 + for key := range m.GetDefaultValue() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetDefaultValue()[key] + _ = val + + // no validation rules for DefaultValue[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_MapFieldValidationError{ + field: fmt.Sprintf("DefaultValue[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectorAccountCreationSchema_MapFieldValidationError{ + field: fmt.Sprintf("DefaultValue[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectorAccountCreationSchema_MapFieldValidationError{ + field: fmt.Sprintf("DefaultValue[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return ConnectorAccountCreationSchema_MapFieldMultiError(errors) + } + + return nil +} + +// ConnectorAccountCreationSchema_MapFieldMultiError is an error wrapping +// multiple validation errors returned by +// ConnectorAccountCreationSchema_MapField.ValidateAll() if the designated +// constraints aren't met. +type ConnectorAccountCreationSchema_MapFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectorAccountCreationSchema_MapFieldMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectorAccountCreationSchema_MapFieldMultiError) AllErrors() []error { return m } + +// ConnectorAccountCreationSchema_MapFieldValidationError is the validation +// error returned by ConnectorAccountCreationSchema_MapField.Validate if the +// designated constraints aren't met. +type ConnectorAccountCreationSchema_MapFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectorAccountCreationSchema_MapFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectorAccountCreationSchema_MapFieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConnectorAccountCreationSchema_MapFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectorAccountCreationSchema_MapFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectorAccountCreationSchema_MapFieldValidationError) ErrorName() string { + return "ConnectorAccountCreationSchema_MapFieldValidationError" +} + +// Error satisfies the builtin error interface +func (e ConnectorAccountCreationSchema_MapFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConnectorAccountCreationSchema_MapField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectorAccountCreationSchema_MapFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectorAccountCreationSchema_MapFieldValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go index 2d329336..b7949b66 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go @@ -31,6 +31,7 @@ const ( ResourceType_TRAIT_GROUP ResourceType_Trait = 2 ResourceType_TRAIT_ROLE ResourceType_Trait = 3 ResourceType_TRAIT_APP ResourceType_Trait = 4 + ResourceType_TRAIT_SECRET ResourceType_Trait = 5 ) // Enum value maps for ResourceType_Trait. @@ -41,6 +42,7 @@ var ( 2: "TRAIT_GROUP", 3: "TRAIT_ROLE", 4: "TRAIT_APP", + 5: "TRAIT_SECRET", } ResourceType_Trait_value = map[string]int32{ "TRAIT_UNSPECIFIED": 0, @@ -48,6 +50,7 @@ var ( "TRAIT_GROUP": 2, "TRAIT_ROLE": 3, "TRAIT_APP": 4, + "TRAIT_SECRET": 5, } ) @@ -1004,12 +1007,14 @@ type EncryptedData struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` - KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - Schema string `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` // optional - EncryptedBytes []byte `protobuf:"bytes,6,opt,name=encrypted_bytes,json=encryptedBytes,proto3" json:"encrypted_bytes,omitempty"` // if 'schema' is set, this should be JSON. + Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` + // Deprecated: Do not use. + KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + Schema string `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` // optional + EncryptedBytes []byte `protobuf:"bytes,6,opt,name=encrypted_bytes,json=encryptedBytes,proto3" json:"encrypted_bytes,omitempty"` // if 'schema' is set, this should be JSON. + KeyIds []string `protobuf:"bytes,7,rep,name=key_ids,json=keyIds,proto3" json:"key_ids,omitempty"` } func (x *EncryptedData) Reset() { @@ -1051,6 +1056,7 @@ func (x *EncryptedData) GetProvider() string { return "" } +// Deprecated: Do not use. func (x *EncryptedData) GetKeyId() string { if x != nil { return x.KeyId @@ -1086,6 +1092,13 @@ func (x *EncryptedData) GetEncryptedBytes() []byte { return nil } +func (x *EncryptedData) GetKeyIds() []string { + if x != nil { + return x.KeyIds + } + return nil +} + type PlaintextData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1983,7 +1996,7 @@ var file_c1_connector_v2_resource_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x03, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x03, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, @@ -2003,369 +2016,372 @@ var file_c1_connector_v2_resource_proto_rawDesc = []byte{ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x22, 0x5e, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x22, 0x70, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x52, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x52, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x52, 0x41, 0x49, 0x54, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x52, 0x41, 0x49, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x52, 0x41, - 0x49, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x04, 0x22, 0xf1, 0x01, 0x0a, 0x2c, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x49, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x52, 0x41, 0x49, + 0x54, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x10, 0x05, 0x22, 0xf1, 0x01, 0x0a, 0x2c, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x27, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, + 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd2, + 0x01, 0x0a, 0x2d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x31, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6c, + 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, + 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x4e, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, + 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x55, 0x0a, 0x15, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, - 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, - 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, - 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd2, 0x01, 0x0a, - 0x2d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, - 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, - 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, - 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x4e, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x64, 0x22, 0x50, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x17, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, + 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, + 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x73, 0x22, 0xd7, 0x01, 0x0a, 0x18, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x22, 0x85, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x82, 0x02, + 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, + 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x55, 0x0a, 0x15, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, - 0x22, 0x50, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x17, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, - 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, - 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, - 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x73, 0x22, 0xd7, 0x01, 0x0a, 0x18, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, - 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0b, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x06, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x52, 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, + 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, + 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x22, 0xf7, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, + 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x50, 0x0a, 0x0b, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x4e, 0x6f, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x03, 0x73, 0x73, 0x6f, 0x18, + 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x53, 0x4f, 0x48, 0x00, 0x52, + 0x03, 0x73, 0x73, 0x6f, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28, + 0x08, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x0c, 0x0a, 0x0a, 0x4e, 0x6f, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x28, 0x0a, 0x03, 0x53, 0x53, 0x4f, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, + 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, - 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, - 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x65, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x22, 0xf7, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, - 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x12, 0x50, 0x0a, 0x0b, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x6f, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x03, 0x73, 0x73, 0x6f, 0x18, 0x66, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x53, 0x4f, 0x48, 0x00, 0x52, 0x03, 0x73, - 0x73, 0x6f, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28, 0x08, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x0c, 0x0a, 0x0a, 0x4e, 0x6f, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x28, 0x0a, 0x03, 0x53, 0x53, 0x4f, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, - 0x09, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x64, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x45, 0x0a, - 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, 0x0a, 0x0d, - 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0xa0, 0x01, - 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xb9, 0x01, 0x0a, 0x0d, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x0a, - 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, - 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, - 0x6a, 0x77, 0x6b, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, - 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x48, 0x00, 0x52, 0x12, 0x6a, 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, - 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0x8c, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x2f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, - 0x80, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x26, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, - 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, - 0xf0, 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, - 0x08, 0x20, 0x01, 0x28, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, - 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, + 0x0e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, + 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, - 0x01, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, - 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, - 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, - 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, - 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, - 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, - 0x54, 0x53, 0x5f, 0x50, 0x52, 0x49, 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, - 0x10, 0x02, 0x22, 0xc1, 0x02, 0x0a, 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, + 0x0a, 0x0d, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, + 0xa0, 0x01, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd6, 0x01, 0x0a, + 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, 0x6b, 0x65, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, + 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, + 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, + 0x65, 0x79, 0x49, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, + 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a, + 0x77, 0x6b, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57, + 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x48, 0x00, 0x52, 0x12, 0x6a, 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, + 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, + 0x75, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x8c, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, + 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, - 0x08, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, - 0x64, 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x08, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x26, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0, + 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, + 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, + 0x20, 0x01, 0x28, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, + 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, + 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, + 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53, + 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, + 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, + 0x53, 0x5f, 0x50, 0x52, 0x49, 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10, + 0x02, 0x22, 0xc1, 0x02, 0x0a, 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, + 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, + 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, + 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, + 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, - 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, - 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, - 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, - 0x36, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, - 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, - 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x52, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, - 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, - 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x3e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, + 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, + 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0x92, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, - 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, - 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, - 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, - 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x3e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0x92, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x61, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, 0x15, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, + 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, + 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go index c4c261a3..dcb31055 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go @@ -7,13 +7,6 @@ import ( "fmt" "os" - "github.com/conductorone/baton-sdk/internal/connector" - v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" - v1 "github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1" - "github.com/conductorone/baton-sdk/pkg/connectorrunner" - "github.com/conductorone/baton-sdk/pkg/field" - "github.com/conductorone/baton-sdk/pkg/logging" - "github.com/conductorone/baton-sdk/pkg/types" "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -21,6 +14,15 @@ import ( "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/structpb" + + "github.com/conductorone/baton-sdk/internal/connector" + v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" + v1 "github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1" + "github.com/conductorone/baton-sdk/pkg/connectorrunner" + "github.com/conductorone/baton-sdk/pkg/field" + "github.com/conductorone/baton-sdk/pkg/logging" + "github.com/conductorone/baton-sdk/pkg/types" ) type GetConnectorFunc func(context.Context, *viper.Viper) (types.ConnectorServer, error) @@ -113,12 +115,21 @@ func MakeMainCommand( case v.GetBool("event-feed"): opts = append(opts, connectorrunner.WithOnDemandEventStream()) case v.GetString("create-account-login") != "": + profileMap := v.GetStringMap("create-account-profile") + if profileMap == nil { + profileMap = make(map[string]interface{}) + } + profile, err := structpb.NewStruct(profileMap) + if err != nil { + return err + } opts = append(opts, connectorrunner.WithProvisioningEnabled(), connectorrunner.WithOnDemandCreateAccount( v.GetString("file"), v.GetString("create-account-login"), v.GetString("create-account-email"), + profile, )) case v.GetString("delete-resource") != "": opts = append(opts, diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go index 1c1082ca..f3310918 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go @@ -11,6 +11,7 @@ import ( "time" "golang.org/x/sync/semaphore" + "google.golang.org/protobuf/types/known/structpb" "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" "go.uber.org/zap" @@ -140,8 +141,11 @@ func (c *connectorRunner) run(ctx context.Context) error { // Acquire a worker slot before we call Next() so we don't claim a task before we can actually process it. err = sem.Acquire(ctx, 1) if err != nil { - // Any error returned from Acquire() is due to the context being cancelled. - sem.Release(1) + if errors.Is(err, context.Canceled) { + // Any error returned from Acquire() is due to the context being cancelled. + // Except for some tests where error is context deadline exceeded + sem.Release(1) + } return c.handleContextCancel(ctx) } l.Debug("runner: worker claimed, checking for next task") @@ -260,8 +264,9 @@ type revokeConfig struct { } type createAccountConfig struct { - login string - email string + login string + email string + profile *structpb.Struct } type deleteResourceConfig struct { @@ -408,13 +413,14 @@ func WithOnDemandRevoke(c1zPath string, grantID string) Option { } } -func WithOnDemandCreateAccount(c1zPath string, login string, email string) Option { +func WithOnDemandCreateAccount(c1zPath string, login string, email string, profile *structpb.Struct) Option { return func(ctx context.Context, cfg *runnerConfig) error { cfg.onDemand = true cfg.c1zPath = c1zPath cfg.createAccountConfig = &createAccountConfig{ - login: login, - email: email, + login: login, + email: email, + profile: profile, } return nil } @@ -583,7 +589,7 @@ func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Op tm = local.NewRevoker(ctx, cfg.c1zPath, cfg.revokeConfig.grantID) case cfg.createAccountConfig != nil: - tm = local.NewCreateAccountManager(ctx, cfg.c1zPath, cfg.createAccountConfig.login, cfg.createAccountConfig.email) + tm = local.NewCreateAccountManager(ctx, cfg.c1zPath, cfg.createAccountConfig.login, cfg.createAccountConfig.email, cfg.createAccountConfig.profile) case cfg.deleteResourceConfig != nil: tm = local.NewResourceDeleter(ctx, cfg.c1zPath, cfg.deleteResourceConfig.resourceId, cfg.deleteResourceConfig.resourceType) diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go index bb7ae52e..a8b8b95b 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go @@ -113,6 +113,7 @@ func (j *JWKEncryptionProvider) Encrypt(ctx context.Context, conf *v2.Encryption Description: plainText.Description, Schema: plainText.Schema, EncryptedBytes: []byte(encCipherText), + KeyIds: []string{tp}, }, nil } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go index 7191d217..2ceebc6a 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go @@ -84,22 +84,15 @@ func (c *C1File) GetEntitlement(ctx context.Context, request *reader_v2.Entitlem } func (c *C1File) PutEntitlements(ctx context.Context, entitlementObjs ...*v2.Entitlement) error { - err := c.db.WithTx(func(tx *goqu.TxDatabase) error { - err := bulkPutConnectorObjectTx(ctx, c, tx, entitlements.Name(), - func(entitlement *v2.Entitlement) (goqu.Record, error) { - return goqu.Record{ - "resource_id": entitlement.Resource.Id.Resource, - "resource_type_id": entitlement.Resource.Id.ResourceType, - }, nil - }, - entitlementObjs..., - ) - if err != nil { - return err - } - - return nil - }) + err := bulkPutConnectorObject(ctx, c, entitlements.Name(), + func(entitlement *v2.Entitlement) (goqu.Record, error) { + return goqu.Record{ + "resource_id": entitlement.Resource.Id.Resource, + "resource_type_id": entitlement.Resource.Id.ResourceType, + }, nil + }, + entitlementObjs..., + ) if err != nil { return err } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go index daa1a86f..432f9093 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go @@ -168,24 +168,18 @@ func (c *C1File) ListGrantsForResourceType( } func (c *C1File) PutGrants(ctx context.Context, bulkGrants ...*v2.Grant) error { - err := c.db.WithTx(func(tx *goqu.TxDatabase) error { - err := bulkPutConnectorObjectTx(ctx, c, tx, grants.Name(), - func(grant *v2.Grant) (goqu.Record, error) { - return goqu.Record{ - "resource_type_id": grant.Entitlement.Resource.Id.ResourceType, - "resource_id": grant.Entitlement.Resource.Id.Resource, - "entitlement_id": grant.Entitlement.Id, - "principal_resource_type_id": grant.Principal.Id.ResourceType, - "principal_resource_id": grant.Principal.Id.Resource, - }, nil - }, - bulkGrants..., - ) - if err != nil { - return err - } - return nil - }) + err := bulkPutConnectorObject(ctx, c, grants.Name(), + func(grant *v2.Grant) (goqu.Record, error) { + return goqu.Record{ + "resource_type_id": grant.Entitlement.Resource.Id.ResourceType, + "resource_id": grant.Entitlement.Resource.Id.Resource, + "entitlement_id": grant.Entitlement.Id, + "principal_resource_type_id": grant.Principal.Id.ResourceType, + "principal_resource_id": grant.Principal.Id.Resource, + }, nil + }, + bulkGrants..., + ) if err != nil { return err } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go index a0bb4d71..4b12f40e 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go @@ -79,18 +79,12 @@ func (c *C1File) GetResourceType(ctx context.Context, request *reader_v2.Resourc } func (c *C1File) PutResourceTypes(ctx context.Context, resourceTypesObjs ...*v2.ResourceType) error { - err := c.db.WithTx(func(tx *goqu.TxDatabase) error { - err := bulkPutConnectorObjectTx(ctx, c, tx, resourceTypes.Name(), - func(resource *v2.ResourceType) (goqu.Record, error) { - return nil, nil - }, - resourceTypesObjs..., - ) - if err != nil { - return err - } - return nil - }) + err := bulkPutConnectorObject(ctx, c, resourceTypes.Name(), + func(resource *v2.ResourceType) (goqu.Record, error) { + return nil, nil + }, + resourceTypesObjs..., + ) if err != nil { return err } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go index dc235699..40e0542d 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go @@ -98,27 +98,21 @@ func (c *C1File) GetResource(ctx context.Context, request *reader_v2.ResourcesRe } func (c *C1File) PutResources(ctx context.Context, resourceObjs ...*v2.Resource) error { - err := c.db.WithTx(func(tx *goqu.TxDatabase) error { - err := bulkPutConnectorObjectTx(ctx, c, tx, resources.Name(), - func(resource *v2.Resource) (goqu.Record, error) { - fields := goqu.Record{ - "resource_type_id": resource.Id.ResourceType, - "external_id": fmt.Sprintf("%s:%s", resource.Id.ResourceType, resource.Id.Resource), - } - - if resource.ParentResourceId != nil { - fields["parent_resource_type_id"] = resource.ParentResourceId.ResourceType - fields["parent_resource_id"] = resource.ParentResourceId.Resource - } - return fields, nil - }, - resourceObjs..., - ) - if err != nil { - return err - } - return nil - }) + err := bulkPutConnectorObject(ctx, c, resources.Name(), + func(resource *v2.Resource) (goqu.Record, error) { + fields := goqu.Record{ + "resource_type_id": resource.Id.ResourceType, + "external_id": fmt.Sprintf("%s:%s", resource.Id.ResourceType, resource.Id.Resource), + } + + if resource.ParentResourceId != nil { + fields["parent_resource_type_id"] = resource.ParentResourceId.ResourceType + fields["parent_resource_id"] = resource.ParentResourceId.Resource + } + return fields, nil + }, + resourceObjs..., + ) if err != nil { return err } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go index 968e9277..b1f8ff8e 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go @@ -233,20 +233,21 @@ func (c *C1File) listConnectorObjects(ctx context.Context, tableName string, req var protoMarshaler = proto.MarshalOptions{Deterministic: true} -func bulkPutConnectorObjectTx[T proto.Message](ctx context.Context, c *C1File, - tx *goqu.TxDatabase, +func bulkPutConnectorObject[T proto.Message](ctx context.Context, c *C1File, tableName string, extractFields func(m T) (goqu.Record, error), msgs ...T) error { + if len(msgs) == 0 { + return nil + } + err := c.validateSyncDb(ctx) if err != nil { return err } - baseQ := tx.Insert(tableName).Prepared(true) - baseQ = baseQ.OnConflict(goqu.DoUpdate("external_id, sync_id", goqu.C("data").Set(goqu.I("EXCLUDED.data")))) - - for _, m := range msgs { + rows := make([]*goqu.Record, len(msgs)) + for i, m := range msgs { messageBlob, err := protoMarshaler.Marshal(m) if err != nil { return err @@ -270,16 +271,35 @@ func bulkPutConnectorObjectTx[T proto.Message](ctx context.Context, c *C1File, fields["data"] = messageBlob fields["sync_id"] = c.currentSyncID fields["discovered_at"] = time.Now().Format("2006-01-02 15:04:05.999999999") - q := baseQ.Rows(fields) - query, args, err := q.ToSQL() + rows[i] = &fields + } + chunkSize := 100 + chunks := len(rows) / chunkSize + if len(rows)%chunkSize != 0 { + chunks++ + } + + for i := 0; i < chunks; i++ { + start := i * chunkSize + end := (i + 1) * chunkSize + if end > len(rows) { + end = len(rows) + } + chunkedRows := rows[start:end] + query, args, err := c.db.Insert(tableName). + OnConflict(goqu.DoUpdate("external_id, sync_id", goqu.C("data").Set(goqu.I("EXCLUDED.data")))). + Rows(chunkedRows). + Prepared(true). + ToSQL() if err != nil { return err } - _, err = tx.Exec(query, args...) + _, err = c.db.Exec(query, args...) if err != nil { return err } } + return nil } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go index 9d1f7a79..c6e8006b 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go @@ -60,10 +60,13 @@ func (c *C1File) getLatestUnfinishedSync(ctx context.Context) (*syncRun, error) return nil, err } + // Don't resume syncs that started over a week ago + oneWeekAgo := time.Now().AddDate(0, 0, -7) ret := &syncRun{} q := c.db.From(syncRuns.Name()) q = q.Select("sync_id", "started_at", "ended_at", "sync_token") q = q.Where(goqu.C("ended_at").IsNull()) + q = q.Where(goqu.C("started_at").Gte(oneWeekAgo)) q = q.Order(goqu.C("started_at").Desc()) q = q.Limit(1) diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go index 1ba36a3a..5baa8050 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go @@ -12,10 +12,14 @@ var ( TicketingField = BoolField("ticketing", WithDescription("This must be set to enable ticketing support"), WithPersistent(true)) c1zTmpDirField = StringField("c1z-temp-dir", WithHidden(true), WithDescription("The directory to store temporary files in. It must exist, "+ "and write access is required. Defaults to the OS temporary directory."), WithPersistent(true)) - clientIDField = StringField("client-id", WithDescription("The client ID used to authenticate with ConductorOne"), WithPersistent(true)) - clientSecretField = StringField("client-secret", WithDescription("The client secret used to authenticate with ConductorOne"), WithPersistent(true)) - createAccountEmailField = StringField("create-account-email", WithHidden(true), WithDescription("The email of the account to create"), WithPersistent(true)) - createAccountLoginField = StringField("create-account-login", WithHidden(true), WithDescription("The login of the account to create"), WithPersistent(true)) + clientIDField = StringField("client-id", WithDescription("The client ID used to authenticate with ConductorOne"), WithPersistent(true)) + clientSecretField = StringField("client-secret", WithDescription("The client secret used to authenticate with ConductorOne"), WithPersistent(true)) + createAccountEmailField = StringField("create-account-email", WithHidden(true), WithDescription("The email of the account to create"), WithPersistent(true)) + createAccountLoginField = StringField("create-account-login", WithHidden(true), WithDescription("The login of the account to create"), WithPersistent(true)) + createAccountProfileField = StringField("create-account-profile", + WithHidden(true), + WithDescription("JSON-formatted object of map keys and values like '{ 'key': 'value' }'"), + WithPersistent(true)) deleteResourceField = StringField("delete-resource", WithHidden(true), WithDescription("The id of the resource to delete"), WithPersistent(true)) deleteResourceTypeField = StringField("delete-resource-type", WithHidden(true), WithDescription("The type of the resource to delete"), WithPersistent(true)) eventFeedField = StringField("event-feed", WithHidden(true), WithDescription("Read feed events to stdout"), WithPersistent(true)) @@ -47,6 +51,7 @@ var DefaultFields = []SchemaField{ clientSecretField, createAccountEmailField, createAccountLoginField, + createAccountProfileField, deleteResourceField, deleteResourceTypeField, eventFeedField, diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/pagination/generic_bag.go b/vendor/github.com/conductorone/baton-sdk/pkg/pagination/generic_bag.go new file mode 100644 index 00000000..87d5613a --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pkg/pagination/generic_bag.go @@ -0,0 +1,118 @@ +package pagination + +import ( + "encoding/json" + "fmt" +) + +var ErrNoToken = fmt.Errorf("pagination token cannot be nil") + +type genericSerializedPaginationBag[T any] struct { + States []T `json:"states"` + CurrentState *T `json:"current_state"` +} + +// GenBag holds pagination states that can be serialized for use as page tokens. It acts as a stack that you can push and pop +// pagination operations from. +// This is a generic version of the Bag struct. +type GenBag[T any] struct { + states []T + currentState *T +} + +func GenBagFromToken[T any](pToken *Token) (*GenBag[T], error) { + if pToken == nil { + return nil, ErrNoToken + } + + bag := &GenBag[T]{} + err := bag.Unmarshal(pToken.Token) + if err != nil { + return nil, err + } + return bag, nil +} + +func (pb *GenBag[T]) push(s T) { + if pb.currentState == nil { + pb.currentState = &s + return + } + + pb.states = append(pb.states, *pb.currentState) + pb.currentState = &s +} + +func (pb *GenBag[T]) pop() *T { + if pb.currentState == nil { + return nil + } + + ret := *pb.currentState + + if len(pb.states) > 0 { + pb.currentState = &pb.states[len(pb.states)-1] + pb.states = pb.states[:len(pb.states)-1] + } else { + pb.currentState = nil + } + + return &ret +} + +// Push pushes a new page state onto the stack. +func (pb *GenBag[T]) Push(state T) { + pb.push(state) +} + +// Pop returns the current page action, and makes the top of the stack the current. +func (pb *GenBag[T]) Pop() *T { + return pb.pop() +} + +// Current returns the current page state for the bag. +func (pb *GenBag[T]) Current() *T { + if pb.currentState == nil { + return nil + } + + current := *pb.currentState + return ¤t +} + +// Unmarshal takes an input string and unmarshals it onto the state object. +func (pb *GenBag[T]) Unmarshal(input string) error { + var target genericSerializedPaginationBag[T] + + if input != "" { + err := json.Unmarshal([]byte(input), &target) + if err != nil { + return fmt.Errorf("page token corrupt: %w", err) + } + + pb.states = target.States + pb.currentState = target.CurrentState + } else { + pb.states = nil + pb.currentState = nil + } + + return nil +} + +// Marshal returns a string encoding of the state object. +func (pb *GenBag[T]) Marshal() (string, error) { + if pb.currentState == nil { + return "", nil + } + + data, err := json.Marshal(genericSerializedPaginationBag[T]{ + States: pb.states, + CurrentState: pb.currentState, + }) + if err != nil { + return "", err + } + + return string(data), nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/provisioner/provisioner.go b/vendor/github.com/conductorone/baton-sdk/pkg/provisioner/provisioner.go index bb8b9501..55895536 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/provisioner/provisioner.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/provisioner/provisioner.go @@ -6,6 +6,7 @@ import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" "go.uber.org/zap" + "google.golang.org/protobuf/types/known/structpb" v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" reader_v2 "github.com/conductorone/baton-sdk/pb/c1/reader/v2" @@ -29,8 +30,9 @@ type Provisioner struct { revokeGrantID string - createAccountLogin string - createAccountEmail string + createAccountLogin string + createAccountEmail string + createAccountProfile *structpb.Struct deleteResourceID string deleteResourceType string @@ -239,8 +241,9 @@ func (p *Provisioner) createAccount(ctx context.Context) error { _, err = p.connector.CreateAccount(ctx, &v2.CreateAccountRequest{ AccountInfo: &v2.AccountInfo{ - Emails: emails, - Login: p.createAccountLogin, + Emails: emails, + Login: p.createAccountLogin, + Profile: p.createAccountProfile, }, CredentialOptions: opts, EncryptionConfigs: config, @@ -319,12 +322,13 @@ func NewResourceDeleter(c types.ConnectorClient, dbPath string, resourceId strin } } -func NewCreateAccountManager(c types.ConnectorClient, dbPath string, login string, email string) *Provisioner { +func NewCreateAccountManager(c types.ConnectorClient, dbPath string, login string, email string, profile *structpb.Struct) *Provisioner { return &Provisioner{ - dbPath: dbPath, - connector: c, - createAccountLogin: login, - createAccountEmail: email, + dbPath: dbPath, + connector: c, + createAccountLogin: login, + createAccountEmail: email, + createAccountProfile: profile, } } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/http.go b/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/http.go index 9db8c5b2..12fe545f 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/http.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/http.go @@ -13,18 +13,21 @@ var limitHeaders = []string{ "X-Ratelimit-Limit", "Ratelimit-Limit", "X-RateLimit-Requests-Limit", // Linear uses a non-standard header + "X-Rate-Limit-Limit", // Okta uses a non-standard header } var remainingHeaders = []string{ "X-Ratelimit-Remaining", "Ratelimit-Remaining", "X-RateLimit-Requests-Remaining", // Linear uses a non-standard header + "X-Rate-Limit-Remaining", // Okta uses a non-standard header } var resetAtHeaders = []string{ "X-Ratelimit-Reset", "Ratelimit-Reset", "X-RateLimit-Requests-Reset", // Linear uses a non-standard header + "X-Rate-Limit-Reset", // Okta uses a non-standard header "Retry-After", // Often returned with 429 } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go index 8a796cd6..424d857c 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go @@ -1,3 +1,3 @@ package sdk -const Version = "v0.2.50" +const Version = "v0.2.64" diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go index c399e7ed..8696b6d4 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/expand/graph.go @@ -39,17 +39,17 @@ type Node struct { // This is because the graph can have cycles, and we address them by reducing // _all_ nodes in a cycle into a single node. type EntitlementGraph struct { - NextNodeID int `json:"next_node_id"` // Automatically incremented so that each node has a unique ID. - NextEdgeID int `json:"next_edge_id"` // Automatically incremented so that each edge has a unique ID. - Nodes map[int]Node `json:"nodes"` // The mapping of all node IDs to nodes. - EntitlementsToNodes map[string]int `json:"entitlements_to_nodes"` // Internal mapping of entitlements to nodes for quicker lookup. - SourcesToDestinations map[int]map[int]int `json:"sources_to_destinations"` // Internal mapping of outgoing edges by node ID. - DestinationsToSources map[int]map[int]int `json:"destinations_to_sources"` // Internal mapping of incoming edges by node ID. - Edges map[int]Edge `json:"edges"` // Adjacency list. Source node -> descendant node - Loaded bool `json:"loaded"` - Depth int `json:"depth"` - Actions []EntitlementGraphAction `json:"actions"` - HasNoCycles bool `json:"has_no_cycles"` + NextNodeID int `json:"next_node_id"` // Automatically incremented so that each node has a unique ID. + NextEdgeID int `json:"next_edge_id"` // Automatically incremented so that each edge has a unique ID. + Nodes map[int]Node `json:"nodes"` // The mapping of all node IDs to nodes. + EntitlementsToNodes map[string]int `json:"entitlements_to_nodes"` // Internal mapping of entitlements to nodes for quicker lookup. + SourcesToDestinations map[int]map[int]int `json:"sources_to_destinations"` // Internal mapping of outgoing edges by node ID. + DestinationsToSources map[int]map[int]int `json:"destinations_to_sources"` // Internal mapping of incoming edges by node ID. + Edges map[int]Edge `json:"edges"` // Adjacency list. Source node -> descendant node + Loaded bool `json:"loaded"` + Depth int `json:"depth"` + Actions []*EntitlementGraphAction `json:"actions"` + HasNoCycles bool `json:"has_no_cycles"` } func NewEntitlementGraph(_ context.Context) *EntitlementGraph { @@ -288,3 +288,24 @@ func (g *EntitlementGraph) AddEdge( g.DestinationsToSources[dstNode.Id][srcNode.Id] = edge.EdgeID return nil } + +func (g *EntitlementGraph) DeleteEdge(ctx context.Context, srcEntitlementID string, dstEntitlementID string) error { + srcNode := g.GetNode(srcEntitlementID) + if srcNode == nil { + return ErrNoEntitlement + } + dstNode := g.GetNode(dstEntitlementID) + if dstNode == nil { + return ErrNoEntitlement + } + + if destinations, ok := g.SourcesToDestinations[srcNode.Id]; ok { + if edgeID, ok := destinations[dstNode.Id]; ok { + delete(destinations, dstNode.Id) + delete(g.DestinationsToSources[dstNode.Id], srcNode.Id) + delete(g.Edges, edgeID) + return nil + } + } + return nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go index 99bd5c89..9502c18d 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go @@ -42,6 +42,120 @@ type Syncer interface { Close(context.Context) error } +type ProgressCounts struct { + ResourceTypes int + Resources map[string]int + EntitlementsProgress map[string]int + LastEntitlementLog map[string]time.Time + GrantsProgress map[string]int + LastGrantLog map[string]time.Time + LastActionLog time.Time +} + +const maxLogFrequency = 10 * time.Second + +// TODO: use a mutex or a syncmap for when this code becomes parallel +func NewProgressCounts() *ProgressCounts { + return &ProgressCounts{ + Resources: make(map[string]int), + EntitlementsProgress: make(map[string]int), + LastEntitlementLog: make(map[string]time.Time), + GrantsProgress: make(map[string]int), + LastGrantLog: make(map[string]time.Time), + LastActionLog: time.Time{}, + } +} + +func (p *ProgressCounts) LogResourceTypesProgress(ctx context.Context) { + l := ctxzap.Extract(ctx) + l.Info("Synced resource types", zap.Int("count", p.ResourceTypes)) +} + +func (p *ProgressCounts) LogResourcesProgress(ctx context.Context, resourceType string) { + l := ctxzap.Extract(ctx) + resources := p.Resources[resourceType] + l.Info("Synced resources", zap.String("resource_type_id", resourceType), zap.Int("count", resources)) +} + +func (p *ProgressCounts) LogEntitlementsProgress(ctx context.Context, resourceType string) { + entitlementsProgress := p.EntitlementsProgress[resourceType] + resources := p.Resources[resourceType] + if resources == 0 { + return + } + percentComplete := (entitlementsProgress * 100) / resources + + l := ctxzap.Extract(ctx) + switch { + case entitlementsProgress > resources: + l.Error("more entitlement resources than resources", + zap.String("resource_type_id", resourceType), + zap.Int("synced", entitlementsProgress), + zap.Int("total", resources), + ) + case percentComplete == 100: + l.Info("Synced entitlements", + zap.String("resource_type_id", resourceType), + zap.Int("count", entitlementsProgress), + zap.Int("total", resources), + ) + p.LastEntitlementLog[resourceType] = time.Time{} + case time.Since(p.LastEntitlementLog[resourceType]) > maxLogFrequency: + l.Info("Syncing entitlements", + zap.String("resource_type_id", resourceType), + zap.Int("synced", entitlementsProgress), + zap.Int("total", resources), + zap.Int("percent_complete", percentComplete), + ) + p.LastEntitlementLog[resourceType] = time.Now() + } +} + +func (p *ProgressCounts) LogGrantsProgress(ctx context.Context, resourceType string) { + grantsProgress := p.GrantsProgress[resourceType] + resources := p.Resources[resourceType] + if resources == 0 { + return + } + percentComplete := (grantsProgress * 100) / resources + + l := ctxzap.Extract(ctx) + switch { + case grantsProgress > resources: + l.Error("more grant resources than resources", + zap.String("resource_type_id", resourceType), + zap.Int("synced", grantsProgress), + zap.Int("total", resources), + ) + case percentComplete == 100: + l.Info("Synced grants", + zap.String("resource_type_id", resourceType), + zap.Int("count", grantsProgress), + zap.Int("total", resources), + ) + p.LastGrantLog[resourceType] = time.Time{} + case time.Since(p.LastGrantLog[resourceType]) > maxLogFrequency: + l.Info("Syncing grants", + zap.String("resource_type_id", resourceType), + zap.Int("synced", grantsProgress), + zap.Int("total", resources), + zap.Int("percent_complete", percentComplete), + ) + p.LastGrantLog[resourceType] = time.Now() + } +} + +func (p *ProgressCounts) LogExpandProgress(ctx context.Context, actions []*expand.EntitlementGraphAction) { + actionsLen := len(actions) + if time.Since(p.LastActionLog) < maxLogFrequency { + return + } + p.LastActionLog = time.Now() + + l := ctxzap.Extract(ctx) + l.Info("Expanding grants", zap.Int("actions_remaining", actionsLen)) +} + // syncer orchestrates a connector sync and stores the results using the provided datasource.Writer. type syncer struct { c1zManager manager.Manager @@ -55,6 +169,7 @@ type syncer struct { tmpDir string skipFullSync bool lastCheckPointTime time.Time + counts *ProgressCounts skipEGForResourceType map[string]bool } @@ -146,6 +261,18 @@ func shouldWaitAndRetry(ctx context.Context, err error) bool { } } +func isWarning(ctx context.Context, err error) bool { + if err == nil { + return false + } + + if status.Code(err) == codes.NotFound { + return true + } + + return false +} + // Sync starts the syncing process. The sync process is driven by the action stack that is part of the state object. // For each page of data that is required to be fetched from the connector, a new action is pushed on to the stack. Once // an action is completed, it is popped off of the queue. Before processing each action, we checkpoint the state object @@ -199,12 +326,17 @@ func (s *syncer) Sync(ctx context.Context) error { } s.state = state + var warnings []error for s.state.Current() != nil { err = s.Checkpoint(ctx) if err != nil { return err } + // TODO: count actions divided by warnings and error if warning percentage is too high + if len(warnings) > 10 { + return fmt.Errorf("too many warnings, exiting sync. warnings: %v", warnings) + } select { case <-runCtx.Done(): err = context.Cause(runCtx) @@ -254,6 +386,12 @@ func (s *syncer) Sync(ctx context.Context) error { case SyncEntitlementsOp: err = s.SyncEntitlements(ctx) + if isWarning(ctx, err) { + l.Warn("skipping sync entitlement action", zap.Any("stateAction", stateAction), zap.Error(err)) + warnings = append(warnings, err) + s.state.FinishAction(ctx) + continue + } if !shouldWaitAndRetry(ctx, err) { return err } @@ -261,6 +399,12 @@ func (s *syncer) Sync(ctx context.Context) error { case SyncGrantsOp: err = s.SyncGrants(ctx) + if isWarning(ctx, err) { + l.Warn("skipping sync grant action", zap.Any("stateAction", stateAction), zap.Error(err)) + warnings = append(warnings, err) + s.state.FinishAction(ctx) + continue + } if !shouldWaitAndRetry(ctx, err) { return err } @@ -307,6 +451,9 @@ func (s *syncer) Sync(ctx context.Context) error { l.Error("error clearing connector caches", zap.Error(err)) } + if len(warnings) > 0 { + l.Warn("sync completed with warnings", zap.Int("warning_count", len(warnings)), zap.Any("warnings", warnings)) + } return nil } @@ -374,9 +521,11 @@ func (s *syncer) SyncResourceTypes(ctx context.Context) error { return err } + s.counts.ResourceTypes += len(resp.List) s.handleProgress(ctx, s.state.Current(), len(resp.List)) if resp.NextPageToken == "" { + s.counts.LogResourceTypesProgress(ctx) s.state.FinishAction(ctx) return nil } @@ -467,7 +616,11 @@ func (s *syncer) syncResources(ctx context.Context) error { s.handleProgress(ctx, s.state.Current(), len(resp.List)) + resourceTypeId := s.state.ResourceTypeID(ctx) + s.counts.Resources[resourceTypeId] += len(resp.List) + if resp.NextPageToken == "" { + s.counts.LogResourcesProgress(ctx, resourceTypeId) s.state.FinishAction(ctx) } else { err = s.state.NextPage(ctx, resp.NextPageToken) @@ -535,6 +688,8 @@ func (s *syncer) validateResourceTraits(ctx context.Context, r *v2.Resource) err trait = &v2.UserTrait{} case v2.ResourceType_TRAIT_ROLE: trait = &v2.RoleTrait{} + case v2.ResourceType_TRAIT_SECRET: + trait = &v2.SecretTrait{} default: } @@ -660,6 +815,9 @@ func (s *syncer) syncEntitlementsForResource(ctx context.Context, resourceID *v2 return err } } else { + s.counts.EntitlementsProgress[resourceID.ResourceType] += 1 + s.counts.LogEntitlementsProgress(ctx, resourceID.ResourceType) + s.state.FinishAction(ctx) } @@ -816,7 +974,7 @@ func (s *syncer) SyncAssets(ctx context.Context) error { } // SyncGrantExpansion -// TODO(morgabra) Docs +// TODO(morgabra) Docs. func (s *syncer) SyncGrantExpansion(ctx context.Context) error { l := ctxzap.Extract(ctx) entitlementGraph := s.state.EntitlementGraph(ctx) @@ -840,6 +998,7 @@ func (s *syncer) SyncGrantExpansion(ctx context.Context) error { return err } } else { + l.Info("Finished loading entitlement graph", zap.Int("edges", len(entitlementGraph.Edges))) entitlementGraph.Loaded = true } @@ -1087,7 +1246,6 @@ func (s *syncer) fetchEtaggedGrantsForResource( Resource: resource, Annotations: storeAnnos, PageToken: npt, - PageSize: 1000, }) if err != nil { return nil, false, err @@ -1199,6 +1357,8 @@ func (s *syncer) syncGrantsForResource(ctx context.Context, resourceID *v2.Resou return nil } + s.counts.GrantsProgress[resourceID.ResourceType] += 1 + s.counts.LogGrantsProgress(ctx, resourceID.ResourceType) s.state.FinishAction(ctx) return nil @@ -1209,7 +1369,6 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) { graph := s.state.EntitlementGraph(ctx) l = l.With(zap.Int("depth", graph.Depth)) - l.Debug("runGrantExpandActions: start", zap.Any("graph", graph)) // Peek the next action on the stack if len(graph.Actions) == 0 { @@ -1240,7 +1399,6 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) { // Fetch a page of source grants sourceGrants, err := s.store.ListGrantsForEntitlement(ctx, &reader_v2.GrantsReaderServiceListGrantsForEntitlementRequest{ Entitlement: sourceEntitlement.GetEntitlement(), - PageSize: 1000, PageToken: action.PageToken, }) if err != nil { @@ -1248,6 +1406,7 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) { return false, fmt.Errorf("runGrantExpandActions: error fetching source grants: %w", err) } + var newGrants []*v2.Grant = make([]*v2.Grant, 0) for _, sourceGrant := range sourceGrants.List { // Skip this grant if it is not for a resource type we care about if len(action.ResourceTypeIDs) > 0 { @@ -1289,7 +1448,6 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) { req := &reader_v2.GrantsReaderServiceListGrantsForEntitlementRequest{ Entitlement: descendantEntitlement.GetEntitlement(), PrincipalId: sourceGrant.GetPrincipal().GetId(), - PageSize: 1000, PageToken: pageToken, Annotations: nil, } @@ -1350,13 +1508,14 @@ func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) { zap.String("grant_id", descendantGrant.GetId()), zap.Any("sources", sources), ) - - err = s.store.PutGrants(ctx, descendantGrant) - if err != nil { - l.Error("runGrantExpandActions: error updating descendant grant", zap.Error(err)) - return false, fmt.Errorf("runGrantExpandActions: error updating descendant grant: %w", err) - } } + newGrants = append(newGrants, descendantGrants...) + } + + err = s.store.PutGrants(ctx, newGrants...) + if err != nil { + l.Error("runGrantExpandActions: error updating descendant grants", zap.Error(err)) + return false, fmt.Errorf("runGrantExpandActions: error updating descendant grants: %w", err) } // If we have no more pages of work, pop the action off the stack and mark this edge in the graph as done @@ -1378,10 +1537,15 @@ func (s *syncer) newExpandedGrant(_ context.Context, descEntitlement *v2.Entitle return nil, fmt.Errorf("newExpandedGrant: principal is nil") } + // Add immutable annotation since this function is only called if no direct grant exists + var annos annotations.Annotations + annos.Update(&v2.GrantImmutable{}) + grant := &v2.Grant{ Id: fmt.Sprintf("%s:%s:%s", descEntitlement.Id, principal.Id.ResourceType, principal.Id.Resource), Entitlement: descEntitlement, Principal: principal, + Annotations: annos, } return grant, nil @@ -1395,10 +1559,19 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error { l = l.With(zap.Int("depth", graph.Depth)) l.Debug("expandGrantsForEntitlements: start", zap.Any("graph", graph)) + s.counts.LogExpandProgress(ctx, graph.Actions) + actionsDone, err := s.runGrantExpandActions(ctx) if err != nil { - l.Error("expandGrantsForEntitlements: error running graph actions", zap.Error(err)) - return fmt.Errorf("expandGrantsForEntitlements: error running graph actions: %w", err) + // Skip action and delete the edge that caused the error. + erroredAction := graph.Actions[0] + l.Error("expandGrantsForEntitlements: error running graph action", zap.Error(err), zap.Any("action", erroredAction)) + _ = graph.DeleteEdge(ctx, erroredAction.SourceEntitlementID, erroredAction.DescendantEntitlementID) + graph.Actions = graph.Actions[1:] + if len(graph.Actions) == 0 { + actionsDone = true + } + // TODO: return a warning } if !actionsDone { return nil @@ -1432,7 +1605,7 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error { if grantInfo.IsExpanded { continue } - graph.Actions = append(graph.Actions, expand.EntitlementGraphAction{ + graph.Actions = append(graph.Actions, &expand.EntitlementGraphAction{ SourceEntitlementID: sourceEntitlementID, DescendantEntitlementID: descendantEntitlementID, PageToken: "", @@ -1560,6 +1733,7 @@ func NewSyncer(ctx context.Context, c types.ConnectorClient, opts ...SyncOpt) (S s := &syncer{ connector: c, skipEGForResourceType: make(map[string]bool), + counts: NewProgressCounts(), } for _, o := range opts { diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go index a7660576..d63e95a8 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go @@ -139,12 +139,13 @@ func (c *c1ApiTaskManager) finishTask(ctx context.Context, task *v1.Task, resp p finishCtx, finishCanc := context.WithTimeout(context.Background(), time.Second*30) defer finishCanc() + var err2 error var marshalledResp *anypb.Any if resp != nil { - marshalledResp, err = anypb.New(resp) - if err != nil { - l.Error("c1_api_task_manager.finishTask(): error while attempting to marshal response", zap.Error(err)) - return err + marshalledResp, err2 = anypb.New(resp) + if err2 != nil { + l.Error("c1_api_task_manager.finishTask(): error while attempting to marshal response", zap.Error(err2)) + return err2 } } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/accounter.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/accounter.go index 4173c250..37c6dba3 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/accounter.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/accounter.go @@ -5,6 +5,8 @@ import ( "sync" "time" + "google.golang.org/protobuf/types/known/structpb" + v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1" "github.com/conductorone/baton-sdk/pkg/provisioner" "github.com/conductorone/baton-sdk/pkg/tasks" @@ -15,8 +17,9 @@ type localAccountManager struct { dbPath string o sync.Once - login string - email string + login string + email string + profile *structpb.Struct } func (m *localAccountManager) GetTempDir() string { @@ -38,7 +41,7 @@ func (m *localAccountManager) Next(ctx context.Context) (*v1.Task, time.Duration } func (m *localAccountManager) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error { - accountManager := provisioner.NewCreateAccountManager(cc, m.dbPath, m.login, m.email) + accountManager := provisioner.NewCreateAccountManager(cc, m.dbPath, m.login, m.email, m.profile) err := accountManager.Run(ctx) if err != nil { @@ -54,10 +57,11 @@ func (m *localAccountManager) Process(ctx context.Context, task *v1.Task, cc typ } // NewGranter returns a task manager that queues a sync task. -func NewCreateAccountManager(ctx context.Context, dbPath string, login string, email string) tasks.Manager { +func NewCreateAccountManager(ctx context.Context, dbPath string, login string, email string, profile *structpb.Struct) tasks.Manager { return &localAccountManager{ - dbPath: dbPath, - login: login, - email: email, + dbPath: dbPath, + login: login, + email: email, + profile: profile, } } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/resource.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/resource.go index a49dff15..585d9bea 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/resource.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/resource.go @@ -154,6 +154,30 @@ func WithAppTrait(opts ...AppTraitOption) ResourceOption { } } +func WithSecretTrait(opts ...SecretTraitOption) ResourceOption { + return func(r *v2.Resource) error { + rt := &v2.SecretTrait{} + + annos := annotations.Annotations(r.Annotations) + _, err := annos.Pick(rt) + if err != nil { + return err + } + + for _, o := range opts { + err := o(rt) + if err != nil { + return err + } + } + + annos.Update(rt) + r.Annotations = annos + + return nil + } +} + func convertIDToString(id interface{}) (string, error) { var resourceID string switch objID := id.(type) { @@ -296,3 +320,20 @@ func NewAppResource( return ret, nil } + +func NewSecretResource( + name string, + resourceType *v2.ResourceType, + objectID interface{}, + traitOpts []SecretTraitOption, + opts ...ResourceOption, +) (*v2.Resource, error) { + opts = append(opts, WithSecretTrait(traitOpts...)) + + ret, err := NewResource(name, resourceType, objectID, opts...) + if err != nil { + return nil, err + } + + return ret, nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/secret_trait.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/secret_trait.go new file mode 100644 index 00000000..2852a90f --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/secret_trait.go @@ -0,0 +1,53 @@ +package resource + +import ( + "time" + + "google.golang.org/protobuf/types/known/timestamppb" + + v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" +) + +type SecretTraitOption func(t *v2.SecretTrait) error + +func WithSecretCreatedAt(createdAt time.Time) SecretTraitOption { + return func(t *v2.SecretTrait) error { + t.CreatedAt = timestamppb.New(createdAt) + return nil + } +} + +func WithSecretLastUsedAt(lastUsed time.Time) SecretTraitOption { + return func(t *v2.SecretTrait) error { + t.LastUsedAt = timestamppb.New(lastUsed) + return nil + } +} + +func WithSecretExpiresAt(expiresAt time.Time) SecretTraitOption { + return func(t *v2.SecretTrait) error { + t.ExpiresAt = timestamppb.New(expiresAt) + return nil + } +} + +func WithSecretCreatedByID(createdById *v2.ResourceId) SecretTraitOption { + return func(t *v2.SecretTrait) error { + t.CreatedById = createdById + return nil + } +} + +// NewSecretTrait creates a new `SecretTrait` with the given options. +func NewSecretTrait(opts ...SecretTraitOption) (*v2.SecretTrait, error) { + SecretTrait := &v2.SecretTrait{} + + for _, opt := range opts { + err := opt(SecretTrait) + if err != nil { + return nil, err + } + } + + return SecretTrait, nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go index 5b08851b..9fb32424 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/dbcache.go @@ -47,13 +47,13 @@ type CacheRow struct { } const ( - failStartTransaction = "Failed to start a transaction" - errQueryingTable = "Error querying cache table" - failRollback = "Failed to rollback transaction" - failInsert = "Failed to insert response data into cache table" - failScanResponse = "Failed to scan rows for cached response" - cacheTTLThreshold = 60 - cacheTTLMultiplier int64 = 5 + failStartTransaction = "Failed to start a transaction" + errQueryingTable = "Error querying cache table" + failRollback = "Failed to rollback transaction" + failInsert = "Failed to insert response data into cache table" + failScanResponse = "Failed to scan rows for cached response" + cacheTTLThreshold = 60 + cacheTTLMultiplier uint64 = 5 ) var errNilConnection = errors.New("database connection is nil") @@ -67,8 +67,9 @@ func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) { var ( err error dc = &DBCache{ - waitDuration: defaultWaitDuration, // Default Cleanup interval, 60 seconds - stats: true, + waitDuration: defaultWaitDuration, // Default Cleanup interval, 60 seconds + stats: true, + //nolint:gosec // disable G115 expirationTime: time.Duration(cfg.TTL) * time.Second, } ) @@ -110,6 +111,7 @@ func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) { } if cfg.TTL > cacheTTLThreshold { + //nolint:gosec // disable G115 dc.waitDuration = time.Duration(cfg.TTL*cacheTTLMultiplier) * time.Second // set as a fraction of the Cache TTL } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go index d7eaa561..63f769db 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/gocache.go @@ -4,32 +4,23 @@ import ( "bufio" "bytes" "context" - "errors" "fmt" + "math" "net/http" "net/http/httputil" "os" "strconv" "time" - bigCache "github.com/allegro/bigcache/v3" "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" + "github.com/maypok86/otter" "go.uber.org/zap" ) const ( - cacheTTLMaximum = 31536000 // 31536000 seconds = one year - cacheTTLDefault = 3600 // 3600 seconds = one hour - defaultCacheSize = 5 // MB -) - -type CacheBehavior string - -const ( - CacheBehaviorDefault CacheBehavior = "default" - // On the first time setting a value, make it empty. Get will return not found, so uhttp Do() will set it again. - // Then actually set the value. This effectively makes the cache only cache things that have been requested more than once. - CacheBehaviorSparse CacheBehavior = "sparse" + cacheTTLMaximum uint64 = 31536000 // 31536000 seconds = one year + cacheTTLDefault uint64 = 3600 // 3600 seconds = one hour + defaultCacheSize uint = 5 // MB ) type CacheBackend string @@ -42,10 +33,9 @@ const ( type CacheConfig struct { LogDebug bool - TTL int64 // If 0, cache is disabled - MaxSize int // MB - Behavior CacheBehavior - Backend CacheBackend + TTL uint64 // If 0, cache is disabled + MaxSize uint // MB + Backend CacheBackend // If noop, cache is disabled } type CacheStats struct { @@ -56,8 +46,7 @@ type CacheStats struct { type ContextKey struct{} type GoCache struct { - rootLibrary *bigCache.BigCache - behavior CacheBehavior + rootLibrary *otter.Cache[string, []byte] } type NoopCache struct { @@ -90,7 +79,7 @@ func (n *NoopCache) Stats(ctx context.Context) CacheStats { } func (cc *CacheConfig) ToString() string { - return fmt.Sprintf("Backend: %v, TTL: %d, MaxSize: %dMB, LogDebug: %t, Behavior: %v", cc.Backend, cc.TTL, cc.MaxSize, cc.LogDebug, cc.Behavior) + return fmt.Sprintf("Backend: %v, TTL: %d, MaxSize: %dMB, LogDebug: %t", cc.Backend, cc.TTL, cc.MaxSize, cc.LogDebug) } func DefaultCacheConfig() CacheConfig { @@ -98,7 +87,6 @@ func DefaultCacheConfig() CacheConfig { TTL: cacheTTLDefault, MaxSize: defaultCacheSize, LogDebug: false, - Behavior: CacheBehaviorDefault, Backend: CacheBackendMemory, } } @@ -107,15 +95,11 @@ func NewCacheConfigFromEnv() *CacheConfig { config := DefaultCacheConfig() cacheMaxSize, err := strconv.ParseInt(os.Getenv("BATON_HTTP_CACHE_MAX_SIZE"), 10, 64) - if err == nil { - config.MaxSize = int(cacheMaxSize) + if err == nil && cacheMaxSize >= 0 { + config.MaxSize = uint(cacheMaxSize) } - // read the `BATON_HTTP_CACHE_TTL` environment variable and return - // the value as a number of seconds between 0 and an arbitrary maximum. Note: - // this means that passing a value of `-1` will set the TTL to zero rather than - // infinity. - cacheTTL, err := strconv.ParseInt(os.Getenv("BATON_HTTP_CACHE_TTL"), 10, 64) + cacheTTL, err := strconv.ParseUint(os.Getenv("BATON_HTTP_CACHE_TTL"), 10, 64) if err == nil { config.TTL = min(cacheTTLMaximum, max(0, cacheTTL)) } @@ -130,14 +114,6 @@ func NewCacheConfigFromEnv() *CacheConfig { config.Backend = CacheBackendNoop } - cacheBehavior := os.Getenv("BATON_HTTP_CACHE_BEHAVIOR") - switch cacheBehavior { - case "sparse": - config.Behavior = CacheBehaviorSparse - case "default": - config.Behavior = CacheBehaviorDefault - } - disableCache, err := strconv.ParseBool(os.Getenv("BATON_DISABLE_HTTP_CACHE")) if err != nil { disableCache = false @@ -170,8 +146,8 @@ func NewHttpCache(ctx context.Context, config *CacheConfig) (icache, error) { l.Info("http cache config", zap.String("config", config.ToString())) - if config.TTL <= 0 { - l.Debug("CacheTTL is <=0, disabling cache.", zap.Int64("CacheTTL", config.TTL)) + if config.TTL == 0 { + l.Debug("CacheTTL is 0, disabling cache.", zap.Uint64("CacheTTL", config.TTL)) return NewNoopCache(ctx), nil } @@ -203,35 +179,26 @@ func NewHttpCache(ctx context.Context, config *CacheConfig) (icache, error) { func NewGoCache(ctx context.Context, cfg CacheConfig) (*GoCache, error) { l := ctxzap.Extract(ctx) gc := GoCache{} - gc.behavior = cfg.Behavior - config := bigCache.DefaultConfig(time.Duration(cfg.TTL) * time.Second) - config.Verbose = cfg.LogDebug - config.Shards = 4 - if cfg.MaxSize > 0 && cfg.MaxSize < config.Shards { - // BigCache's config.maximumShardSizeInBytes does integer division, which returns zero if there are more shards than megabytes. - // Zero means unlimited cache size on each shard, so max size is effectively ignored. - // Work around this bug by increasing the max size to the number of shards. (4, so 4MB) - cfg.MaxSize = config.Shards - } - config.HardMaxCacheSize = cfg.MaxSize // value in MB, 0 value means no size limit - cache, err := bigCache.New(ctx, config) + maxSize := cfg.MaxSize * 1024 * 1024 + if maxSize > math.MaxInt { + return nil, fmt.Errorf("error converting max size to bytes") + } + //nolint:gosec // disable G115: we check the max size + cache, err := otter.MustBuilder[string, []byte](int(maxSize)). + CollectStats(). + Cost(func(key string, value []byte) uint32 { + return uint32(len(key) + len(value)) + }). + WithTTL(time.Duration(cfg.TTL) * time.Second). + Build() + if err != nil { - l.Error("bigcache initialization error", zap.Error(err)) + l.Error("cache initialization error", zap.Error(err)) return nil, err } - l.Debug("bigcache config", - zap.Dict("config", - zap.Int("Shards", config.Shards), - zap.Duration("LifeWindow", config.LifeWindow), - zap.Duration("CleanWindow", config.CleanWindow), - zap.Int("MaxEntriesInWindow", config.MaxEntriesInWindow), - zap.Int("MaxEntrySize", config.MaxEntrySize), - zap.Bool("StatsEnabled", config.StatsEnabled), - zap.Bool("Verbose", config.Verbose), - zap.Int("HardMaxCacheSize", config.HardMaxCacheSize), - )) - gc.rootLibrary = cache + l.Debug("otter cache initialized", zap.Int("capacity", cache.Capacity())) + gc.rootLibrary = &cache return &gc, nil } @@ -242,8 +209,8 @@ func (g *GoCache) Stats(ctx context.Context) CacheStats { } stats := g.rootLibrary.Stats() return CacheStats{ - Hits: stats.Hits, - Misses: stats.Misses, + Hits: stats.Hits(), + Misses: stats.Misses(), } } @@ -257,12 +224,9 @@ func (g *GoCache) Get(req *http.Request) (*http.Response, error) { return nil, err } - entry, err := g.rootLibrary.Get(key) - if err != nil { - if errors.Is(err, bigCache.ErrEntryNotFound) { - return nil, nil - } - return nil, err + entry, ok := g.rootLibrary.Get(key) + if !ok { + return nil, nil } if len(entry) == 0 { @@ -293,23 +257,9 @@ func (g *GoCache) Set(req *http.Request, value *http.Response) error { return err } - // If in sparse mode, the first time we call set on a key we make the value empty bytes. - // Subsequent calls to set actually set the value. - if g.behavior == CacheBehaviorSparse { - _, err := g.rootLibrary.Get(key) - if err != nil && !errors.Is(err, bigCache.ErrEntryNotFound) { - return err - } - - if errors.Is(err, bigCache.ErrEntryNotFound) { - newValue = []byte{} - } - } - - err = g.rootLibrary.Set(key, newValue) - if err != nil { - return err - } + // Otter's cost function rejects large responses if there's not enough room + // TODO: return some error or warning that we couldn't set? + _ = g.rootLibrary.Set(key, newValue) return nil } @@ -319,10 +269,7 @@ func (g *GoCache) Delete(key string) error { return nil } - err := g.rootLibrary.Delete(key) - if err != nil { - return err - } + g.rootLibrary.Delete(key) return nil } @@ -334,14 +281,7 @@ func (g *GoCache) Clear(ctx context.Context) error { return nil } - err := g.rootLibrary.Reset() - if err != nil { - return err - } - err = g.rootLibrary.ResetStats() - if err != nil { - return err - } + g.rootLibrary.Clear() l.Debug("reset cache") return nil @@ -352,5 +292,5 @@ func (g *GoCache) Has(key string) bool { return false } _, found := g.rootLibrary.Get(key) - return found == nil + return found } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go index bb2628d4..47f4c074 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go @@ -30,6 +30,7 @@ const ( applicationFormUrlencoded = "application/x-www-form-urlencoded" applicationVndApiJSON = "application/vnd.api+json" acceptHeader = "Accept" + authorizationHeader = "Authorization" ) const maxBodySize = 4096 @@ -206,6 +207,9 @@ func WithErrorResponse(resource ErrorResponse) DoOption { func WithRatelimitData(resource *v2.RateLimitDescription) DoOption { return func(resp *WrapperResponse) error { + if resource == nil { + return fmt.Errorf("WithRatelimitData: rate limit description is nil") + } rl, err := ratelimit.ExtractRateLimitData(resp.StatusCode, &resp.Header) if err != nil { return err @@ -357,7 +361,7 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo switch resp.StatusCode { case http.StatusRequestTimeout: return resp, WrapErrorsWithRateLimitInfo(codes.DeadlineExceeded, resp, optErrs...) - case http.StatusTooManyRequests, http.StatusServiceUnavailable: + case http.StatusTooManyRequests, http.StatusBadGateway, http.StatusServiceUnavailable: return resp, WrapErrorsWithRateLimitInfo(codes.Unavailable, resp, optErrs...) case http.StatusNotFound: return resp, WrapErrorsWithRateLimitInfo(codes.NotFound, resp, optErrs...) @@ -365,6 +369,8 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo return resp, WrapErrorsWithRateLimitInfo(codes.Unauthenticated, resp, optErrs...) case http.StatusForbidden: return resp, WrapErrorsWithRateLimitInfo(codes.PermissionDenied, resp, optErrs...) + case http.StatusConflict: + return resp, WrapErrorsWithRateLimitInfo(codes.AlreadyExists, resp, optErrs...) case http.StatusNotImplemented: return resp, WrapErrorsWithRateLimitInfo(codes.Unimplemented, resp, optErrs...) } @@ -461,6 +467,10 @@ func WithAccept(value string) RequestOption { return WithHeader(acceptHeader, value) } +func WithBearerToken(token string) RequestOption { + return WithHeader(authorizationHeader, fmt.Sprintf("Bearer %s", token)) +} + func (c *BaseHttpClient) NewRequest(ctx context.Context, method string, url *url.URL, options ...RequestOption) (*http.Request, error) { var buffer io.ReadWriter var headers map[string]string = make(map[string]string) diff --git a/vendor/github.com/deckarep/golang-set/v2/README.md b/vendor/github.com/deckarep/golang-set/v2/README.md index 921f0cec..bb691b1c 100644 --- a/vendor/github.com/deckarep/golang-set/v2/README.md +++ b/vendor/github.com/deckarep/golang-set/v2/README.md @@ -6,6 +6,15 @@ The missing `generic` set collection for the Go language. Until Go has sets built-in...use this. +## Psst +* Hi there, 👋! Do you use or have interest in the [Zig programming language](https://ziglang.org/) created by Andrew Kelley? If so, the golang-set project has a new sibling project: [ziglang-set](https://github.com/deckarep/ziglang-set)! Come check it out! + +## Update 12/3/2024 +* Packaged version: `2.7.0` fixes a long-standing bug with *JSON Unmarshaling*. A large refactor in the interest of performance +introduced this bug and there was no way around it but to revert the code back to how it was previously. The performance +difference was likely negligible to begin with. JSON Marshaling and Unmarshaling is now properly supported again without +needing to do workarounds. + ## Update 3/5/2023 * Packaged version: `2.2.0` release includes a refactor to minimize pointer indirection, better method documentation standards and a few constructor convenience methods to increase ergonomics when appending items `Append` or creating a new set from an exist `Map`. * supports `new generic` syntax diff --git a/vendor/github.com/deckarep/golang-set/v2/threadsafe.go b/vendor/github.com/deckarep/golang-set/v2/threadsafe.go index ad7a834b..93f20c86 100644 --- a/vendor/github.com/deckarep/golang-set/v2/threadsafe.go +++ b/vendor/github.com/deckarep/golang-set/v2/threadsafe.go @@ -29,7 +29,7 @@ import "sync" type threadSafeSet[T comparable] struct { sync.RWMutex - uss threadUnsafeSet[T] + uss *threadUnsafeSet[T] } func newThreadSafeSet[T comparable]() *threadSafeSet[T] { @@ -123,7 +123,7 @@ func (t *threadSafeSet[T]) Union(other Set[T]) Set[T] { t.RLock() o.RLock() - unsafeUnion := t.uss.Union(o.uss).(threadUnsafeSet[T]) + unsafeUnion := t.uss.Union(o.uss).(*threadUnsafeSet[T]) ret := &threadSafeSet[T]{uss: unsafeUnion} t.RUnlock() o.RUnlock() @@ -136,7 +136,7 @@ func (t *threadSafeSet[T]) Intersect(other Set[T]) Set[T] { t.RLock() o.RLock() - unsafeIntersection := t.uss.Intersect(o.uss).(threadUnsafeSet[T]) + unsafeIntersection := t.uss.Intersect(o.uss).(*threadUnsafeSet[T]) ret := &threadSafeSet[T]{uss: unsafeIntersection} t.RUnlock() o.RUnlock() @@ -149,7 +149,7 @@ func (t *threadSafeSet[T]) Difference(other Set[T]) Set[T] { t.RLock() o.RLock() - unsafeDifference := t.uss.Difference(o.uss).(threadUnsafeSet[T]) + unsafeDifference := t.uss.Difference(o.uss).(*threadUnsafeSet[T]) ret := &threadSafeSet[T]{uss: unsafeDifference} t.RUnlock() o.RUnlock() @@ -162,7 +162,7 @@ func (t *threadSafeSet[T]) SymmetricDifference(other Set[T]) Set[T] { t.RLock() o.RLock() - unsafeDifference := t.uss.SymmetricDifference(o.uss).(threadUnsafeSet[T]) + unsafeDifference := t.uss.SymmetricDifference(o.uss).(*threadUnsafeSet[T]) ret := &threadSafeSet[T]{uss: unsafeDifference} t.RUnlock() o.RUnlock() @@ -177,7 +177,7 @@ func (t *threadSafeSet[T]) Clear() { func (t *threadSafeSet[T]) Remove(v T) { t.Lock() - delete(t.uss, v) + delete(*t.uss, v) t.Unlock() } @@ -190,12 +190,12 @@ func (t *threadSafeSet[T]) RemoveAll(i ...T) { func (t *threadSafeSet[T]) Cardinality() int { t.RLock() defer t.RUnlock() - return len(t.uss) + return len(*t.uss) } func (t *threadSafeSet[T]) Each(cb func(T) bool) { t.RLock() - for elem := range t.uss { + for elem := range *t.uss { if cb(elem) { break } @@ -208,7 +208,7 @@ func (t *threadSafeSet[T]) Iter() <-chan T { go func() { t.RLock() - for elem := range t.uss { + for elem := range *t.uss { ch <- elem } close(ch) @@ -224,7 +224,7 @@ func (t *threadSafeSet[T]) Iterator() *Iterator[T] { go func() { t.RLock() L: - for elem := range t.uss { + for elem := range *t.uss { select { case <-stopCh: break L @@ -253,7 +253,7 @@ func (t *threadSafeSet[T]) Equal(other Set[T]) bool { func (t *threadSafeSet[T]) Clone() Set[T] { t.RLock() - unsafeClone := t.uss.Clone().(threadUnsafeSet[T]) + unsafeClone := t.uss.Clone().(*threadUnsafeSet[T]) ret := &threadSafeSet[T]{uss: unsafeClone} t.RUnlock() return ret @@ -275,7 +275,7 @@ func (t *threadSafeSet[T]) Pop() (T, bool) { func (t *threadSafeSet[T]) ToSlice() []T { keys := make([]T, 0, t.Cardinality()) t.RLock() - for elem := range t.uss { + for elem := range *t.uss { keys = append(keys, elem) } t.RUnlock() diff --git a/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go b/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go index 8b17b017..7e3243b2 100644 --- a/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go +++ b/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go @@ -34,14 +34,16 @@ import ( type threadUnsafeSet[T comparable] map[T]struct{} // Assert concrete type:threadUnsafeSet adheres to Set interface. -var _ Set[string] = (threadUnsafeSet[string])(nil) +var _ Set[string] = (*threadUnsafeSet[string])(nil) -func newThreadUnsafeSet[T comparable]() threadUnsafeSet[T] { - return make(threadUnsafeSet[T]) +func newThreadUnsafeSet[T comparable]() *threadUnsafeSet[T] { + t := make(threadUnsafeSet[T]) + return &t } -func newThreadUnsafeSetWithSize[T comparable](cardinality int) threadUnsafeSet[T] { - return make(threadUnsafeSet[T], cardinality) +func newThreadUnsafeSetWithSize[T comparable](cardinality int) *threadUnsafeSet[T] { + t := make(threadUnsafeSet[T], cardinality) + return &t } func (s threadUnsafeSet[T]) Add(v T) bool { @@ -50,57 +52,57 @@ func (s threadUnsafeSet[T]) Add(v T) bool { return prevLen != len(s) } -func (s threadUnsafeSet[T]) Append(v ...T) int { - prevLen := len(s) +func (s *threadUnsafeSet[T]) Append(v ...T) int { + prevLen := len(*s) for _, val := range v { - (s)[val] = struct{}{} + (*s)[val] = struct{}{} } - return len(s) - prevLen + return len(*s) - prevLen } // private version of Add which doesn't return a value -func (s threadUnsafeSet[T]) add(v T) { - s[v] = struct{}{} +func (s *threadUnsafeSet[T]) add(v T) { + (*s)[v] = struct{}{} } -func (s threadUnsafeSet[T]) Cardinality() int { - return len(s) +func (s *threadUnsafeSet[T]) Cardinality() int { + return len(*s) } -func (s threadUnsafeSet[T]) Clear() { +func (s *threadUnsafeSet[T]) Clear() { // Constructions like this are optimised by compiler, and replaced by // mapclear() function, defined in // https://github.com/golang/go/blob/29bbca5c2c1ad41b2a9747890d183b6dd3a4ace4/src/runtime/map.go#L993) - for key := range s { - delete(s, key) + for key := range *s { + delete(*s, key) } } -func (s threadUnsafeSet[T]) Clone() Set[T] { +func (s *threadUnsafeSet[T]) Clone() Set[T] { clonedSet := newThreadUnsafeSetWithSize[T](s.Cardinality()) - for elem := range s { + for elem := range *s { clonedSet.add(elem) } return clonedSet } -func (s threadUnsafeSet[T]) Contains(v ...T) bool { +func (s *threadUnsafeSet[T]) Contains(v ...T) bool { for _, val := range v { - if _, ok := s[val]; !ok { + if _, ok := (*s)[val]; !ok { return false } } return true } -func (s threadUnsafeSet[T]) ContainsOne(v T) bool { - _, ok := s[v] +func (s *threadUnsafeSet[T]) ContainsOne(v T) bool { + _, ok := (*s)[v] return ok } -func (s threadUnsafeSet[T]) ContainsAny(v ...T) bool { +func (s *threadUnsafeSet[T]) ContainsAny(v ...T) bool { for _, val := range v { - if _, ok := s[val]; ok { + if _, ok := (*s)[val]; ok { return true } } @@ -108,16 +110,16 @@ func (s threadUnsafeSet[T]) ContainsAny(v ...T) bool { } // private version of Contains for a single element v -func (s threadUnsafeSet[T]) contains(v T) (ok bool) { - _, ok = s[v] +func (s *threadUnsafeSet[T]) contains(v T) (ok bool) { + _, ok = (*s)[v] return ok } -func (s threadUnsafeSet[T]) Difference(other Set[T]) Set[T] { - o := other.(threadUnsafeSet[T]) +func (s *threadUnsafeSet[T]) Difference(other Set[T]) Set[T] { + o := other.(*threadUnsafeSet[T]) diff := newThreadUnsafeSet[T]() - for elem := range s { + for elem := range *s { if !o.contains(elem) { diff.add(elem) } @@ -125,21 +127,21 @@ func (s threadUnsafeSet[T]) Difference(other Set[T]) Set[T] { return diff } -func (s threadUnsafeSet[T]) Each(cb func(T) bool) { - for elem := range s { +func (s *threadUnsafeSet[T]) Each(cb func(T) bool) { + for elem := range *s { if cb(elem) { break } } } -func (s threadUnsafeSet[T]) Equal(other Set[T]) bool { - o := other.(threadUnsafeSet[T]) +func (s *threadUnsafeSet[T]) Equal(other Set[T]) bool { + o := other.(*threadUnsafeSet[T]) if s.Cardinality() != other.Cardinality() { return false } - for elem := range s { + for elem := range *s { if !o.contains(elem) { return false } @@ -147,19 +149,19 @@ func (s threadUnsafeSet[T]) Equal(other Set[T]) bool { return true } -func (s threadUnsafeSet[T]) Intersect(other Set[T]) Set[T] { - o := other.(threadUnsafeSet[T]) +func (s *threadUnsafeSet[T]) Intersect(other Set[T]) Set[T] { + o := other.(*threadUnsafeSet[T]) intersection := newThreadUnsafeSet[T]() // loop over smaller set if s.Cardinality() < other.Cardinality() { - for elem := range s { + for elem := range *s { if o.contains(elem) { intersection.add(elem) } } } else { - for elem := range o { + for elem := range *o { if s.contains(elem) { intersection.add(elem) } @@ -168,24 +170,24 @@ func (s threadUnsafeSet[T]) Intersect(other Set[T]) Set[T] { return intersection } -func (s threadUnsafeSet[T]) IsEmpty() bool { +func (s *threadUnsafeSet[T]) IsEmpty() bool { return s.Cardinality() == 0 } -func (s threadUnsafeSet[T]) IsProperSubset(other Set[T]) bool { +func (s *threadUnsafeSet[T]) IsProperSubset(other Set[T]) bool { return s.Cardinality() < other.Cardinality() && s.IsSubset(other) } -func (s threadUnsafeSet[T]) IsProperSuperset(other Set[T]) bool { +func (s *threadUnsafeSet[T]) IsProperSuperset(other Set[T]) bool { return s.Cardinality() > other.Cardinality() && s.IsSuperset(other) } -func (s threadUnsafeSet[T]) IsSubset(other Set[T]) bool { - o := other.(threadUnsafeSet[T]) +func (s *threadUnsafeSet[T]) IsSubset(other Set[T]) bool { + o := other.(*threadUnsafeSet[T]) if s.Cardinality() > other.Cardinality() { return false } - for elem := range s { + for elem := range *s { if !o.contains(elem) { return false } @@ -193,14 +195,14 @@ func (s threadUnsafeSet[T]) IsSubset(other Set[T]) bool { return true } -func (s threadUnsafeSet[T]) IsSuperset(other Set[T]) bool { +func (s *threadUnsafeSet[T]) IsSuperset(other Set[T]) bool { return other.IsSubset(s) } -func (s threadUnsafeSet[T]) Iter() <-chan T { +func (s *threadUnsafeSet[T]) Iter() <-chan T { ch := make(chan T) go func() { - for elem := range s { + for elem := range *s { ch <- elem } close(ch) @@ -209,12 +211,12 @@ func (s threadUnsafeSet[T]) Iter() <-chan T { return ch } -func (s threadUnsafeSet[T]) Iterator() *Iterator[T] { +func (s *threadUnsafeSet[T]) Iterator() *Iterator[T] { iterator, ch, stopCh := newIterator[T]() go func() { L: - for elem := range s { + for elem := range *s { select { case <-stopCh: break L @@ -229,9 +231,9 @@ func (s threadUnsafeSet[T]) Iterator() *Iterator[T] { // Pop returns a popped item in case set is not empty, or nil-value of T // if set is already empty -func (s threadUnsafeSet[T]) Pop() (v T, ok bool) { - for item := range s { - delete(s, item) +func (s *threadUnsafeSet[T]) Pop() (v T, ok bool) { + for item := range *s { + delete(*s, item) return item, true } return v, false @@ -256,16 +258,16 @@ func (s threadUnsafeSet[T]) String() string { return fmt.Sprintf("Set{%s}", strings.Join(items, ", ")) } -func (s threadUnsafeSet[T]) SymmetricDifference(other Set[T]) Set[T] { - o := other.(threadUnsafeSet[T]) +func (s *threadUnsafeSet[T]) SymmetricDifference(other Set[T]) Set[T] { + o := other.(*threadUnsafeSet[T]) sd := newThreadUnsafeSet[T]() - for elem := range s { + for elem := range *s { if !o.contains(elem) { sd.add(elem) } } - for elem := range o { + for elem := range *o { if !s.contains(elem) { sd.add(elem) } @@ -283,7 +285,7 @@ func (s threadUnsafeSet[T]) ToSlice() []T { } func (s threadUnsafeSet[T]) Union(other Set[T]) Set[T] { - o := other.(threadUnsafeSet[T]) + o := other.(*threadUnsafeSet[T]) n := s.Cardinality() if o.Cardinality() > n { @@ -294,10 +296,10 @@ func (s threadUnsafeSet[T]) Union(other Set[T]) Set[T] { for elem := range s { unionedSet.add(elem) } - for elem := range o { + for elem := range *o { unionedSet.add(elem) } - return unionedSet + return &unionedSet } // MarshalJSON creates a JSON array from the set, it marshals all elements @@ -318,7 +320,7 @@ func (s threadUnsafeSet[T]) MarshalJSON() ([]byte, error) { // UnmarshalJSON recreates a set from a JSON array, it only decodes // primitive types. Numbers are decoded as json.Number. -func (s threadUnsafeSet[T]) UnmarshalJSON(b []byte) error { +func (s *threadUnsafeSet[T]) UnmarshalJSON(b []byte) error { var i []T err := json.Unmarshal(b, &i) if err != nil { diff --git a/vendor/github.com/dolthub/maphash/.gitignore b/vendor/github.com/dolthub/maphash/.gitignore new file mode 100644 index 00000000..977a7cad --- /dev/null +++ b/vendor/github.com/dolthub/maphash/.gitignore @@ -0,0 +1,2 @@ +*.idea +*.test \ No newline at end of file diff --git a/vendor/github.com/allegro/bigcache/v3/LICENSE b/vendor/github.com/dolthub/maphash/LICENSE similarity index 99% rename from vendor/github.com/allegro/bigcache/v3/LICENSE rename to vendor/github.com/dolthub/maphash/LICENSE index 8dada3ed..261eeb9e 100644 --- a/vendor/github.com/allegro/bigcache/v3/LICENSE +++ b/vendor/github.com/dolthub/maphash/LICENSE @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/dolthub/maphash/README.md b/vendor/github.com/dolthub/maphash/README.md new file mode 100644 index 00000000..d91530f9 --- /dev/null +++ b/vendor/github.com/dolthub/maphash/README.md @@ -0,0 +1,4 @@ +# maphash + +Hash any `comparable` type using Golang's fast runtime hash. +Uses [AES](https://en.wikipedia.org/wiki/AES_instruction_set) instructions when available. \ No newline at end of file diff --git a/vendor/github.com/dolthub/maphash/hasher.go b/vendor/github.com/dolthub/maphash/hasher.go new file mode 100644 index 00000000..ef53596a --- /dev/null +++ b/vendor/github.com/dolthub/maphash/hasher.go @@ -0,0 +1,48 @@ +// Copyright 2022 Dolthub, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package maphash + +import "unsafe" + +// Hasher hashes values of type K. +// Uses runtime AES-based hashing. +type Hasher[K comparable] struct { + hash hashfn + seed uintptr +} + +// NewHasher creates a new Hasher[K] with a random seed. +func NewHasher[K comparable]() Hasher[K] { + return Hasher[K]{ + hash: getRuntimeHasher[K](), + seed: newHashSeed(), + } +} + +// NewSeed returns a copy of |h| with a new hash seed. +func NewSeed[K comparable](h Hasher[K]) Hasher[K] { + return Hasher[K]{ + hash: h.hash, + seed: newHashSeed(), + } +} + +// Hash hashes |key|. +func (h Hasher[K]) Hash(key K) uint64 { + // promise to the compiler that pointer + // |p| does not escape the stack. + p := noescape(unsafe.Pointer(&key)) + return uint64(h.hash(p, h.seed)) +} diff --git a/vendor/github.com/dolthub/maphash/runtime.go b/vendor/github.com/dolthub/maphash/runtime.go new file mode 100644 index 00000000..29cd6a8e --- /dev/null +++ b/vendor/github.com/dolthub/maphash/runtime.go @@ -0,0 +1,111 @@ +// Copyright 2022 Dolthub, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// This file incorporates work covered by the following copyright and +// permission notice: +// +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.18 || go1.19 +// +build go1.18 go1.19 + +package maphash + +import ( + "math/rand" + "unsafe" +) + +type hashfn func(unsafe.Pointer, uintptr) uintptr + +func getRuntimeHasher[K comparable]() (h hashfn) { + a := any(make(map[K]struct{})) + i := (*mapiface)(unsafe.Pointer(&a)) + h = i.typ.hasher + return +} + +func newHashSeed() uintptr { + return uintptr(rand.Int()) +} + +// noescape hides a pointer from escape analysis. It is the identity function +// but escape analysis doesn't think the output depends on the input. +// noescape is inlined and currently compiles down to zero instructions. +// USE CAREFULLY! +// This was copied from the runtime (via pkg "strings"); see issues 23382 and 7921. +// +//go:nosplit +//go:nocheckptr +func noescape(p unsafe.Pointer) unsafe.Pointer { + x := uintptr(p) + return unsafe.Pointer(x ^ 0) +} + +type mapiface struct { + typ *maptype + val *hmap +} + +// go/src/runtime/type.go +type maptype struct { + typ _type + key *_type + elem *_type + bucket *_type + // function for hashing keys (ptr to key, seed) -> hash + hasher func(unsafe.Pointer, uintptr) uintptr + keysize uint8 + elemsize uint8 + bucketsize uint16 + flags uint32 +} + +// go/src/runtime/map.go +type hmap struct { + count int + flags uint8 + B uint8 + noverflow uint16 + // hash seed + hash0 uint32 + buckets unsafe.Pointer + oldbuckets unsafe.Pointer + nevacuate uintptr + // true type is *mapextra + // but we don't need this data + extra unsafe.Pointer +} + +// go/src/runtime/type.go +type tflag uint8 +type nameOff int32 +type typeOff int32 + +// go/src/runtime/type.go +type _type struct { + size uintptr + ptrdata uintptr + hash uint32 + tflag tflag + align uint8 + fieldAlign uint8 + kind uint8 + equal func(unsafe.Pointer, unsafe.Pointer) bool + gcdata *byte + str nameOff + ptrToThis typeOff +} diff --git a/vendor/github.com/gammazero/deque/.gitignore b/vendor/github.com/gammazero/deque/.gitignore new file mode 100644 index 00000000..b33406fb --- /dev/null +++ b/vendor/github.com/gammazero/deque/.gitignore @@ -0,0 +1,26 @@ +*~ + +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/gammazero/deque/LICENSE b/vendor/github.com/gammazero/deque/LICENSE new file mode 100644 index 00000000..0566f266 --- /dev/null +++ b/vendor/github.com/gammazero/deque/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Andrew J. Gillis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/gammazero/deque/README.md b/vendor/github.com/gammazero/deque/README.md new file mode 100644 index 00000000..ee2dbb88 --- /dev/null +++ b/vendor/github.com/gammazero/deque/README.md @@ -0,0 +1,80 @@ +# deque + +[![GoDoc](https://pkg.go.dev/badge/github.com/gammazero/deque)](https://pkg.go.dev/github.com/gammazero/deque) +[![Build Status](https://github.com/gammazero/deque/actions/workflows/go.yml/badge.svg)](https://github.com/gammazero/deque/actions/workflows/go.yml) +[![Go Report Card](https://goreportcard.com/badge/github.com/gammazero/deque)](https://goreportcard.com/report/github.com/gammazero/deque) +[![codecov](https://codecov.io/gh/gammazero/deque/branch/master/graph/badge.svg)](https://codecov.io/gh/gammazero/deque) +[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) + +Fast ring-buffer deque ([double-ended queue](https://en.wikipedia.org/wiki/Double-ended_queue)) implementation. + +For a pictorial description, see the [Deque diagram](https://github.com/gammazero/deque/wiki) + +## Installation + +``` +$ go get github.com/gammazero/deque +``` + +## Deque data structure + +Deque generalizes a queue and a stack, to efficiently add and remove items at either end with O(1) performance. [Queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) (FIFO) operations are supported using `PushBack` and `PopFront`. [Stack](https://en.wikipedia.org/wiki/Stack_(abstract_data_type)) (LIFO) operations are supported using `PushBack` and `PopBack`. + +## Ring-buffer Performance + +This deque implementation is optimized for CPU and GC performance. The circular buffer automatically re-sizes by powers of two, growing when additional capacity is needed and shrinking when only a quarter of the capacity is used, and uses bitwise arithmetic for all calculations. Since growth is by powers of two, adding elements will only cause O(log n) allocations. A base capacity can be set, with `SetBaseCap`, so that there is no resizing at or below that specified amount. The Deque can also be grown, using `Grow`, to ensure sufficient storage for n additional items, to prevent resizing when adding a number of itmes. + +The ring-buffer implementation improves memory and time performance with fewer GC pauses, compared to implementations based on slices or linked lists. By wrapping around the buffer, previously used space is reused, making allocation unnecessary until all buffer capacity is used. The ring buffer implementation performs best when resizes are infrequest, as is the case when items moving in and out of the Deque are balanced or when the base capacity is large enough to rarely require a resize. + +For maximum speed, this deque implementation leaves concurrency safety up to the application to provide, however the application chooses, if needed at all. + +## Reading Empty Deque + +Since it is OK for the deque to contain a `nil` value, it is necessary to either panic or return a second boolean value to indicate the deque is empty, when reading or removing an element. This deque panics when reading from an empty deque. This is a run-time check to help catch programming errors, which may be missed if a second return value is ignored. Simply check `Deque.Len()` before reading from the deque. + +## Generics + +Deque uses generics to create a Deque that contains items of the type specified. To create a Deque that holds a specific type, provide a type argument with the `Deque` variable declaration. For example: +```go + stringDeque := new(deque.Deque[string]) + var intDeque deque.Deque[int] +``` + +## Example + +```go +package main + +import ( + "fmt" + "github.com/gammazero/deque" +) + +func main() { + var q deque.Deque[string] + q.PushBack("foo") + q.PushBack("bar") + q.PushBack("baz") + + fmt.Println(q.Len()) // Prints: 3 + fmt.Println(q.Front()) // Prints: foo + fmt.Println(q.Back()) // Prints: baz + + q.PopFront() // remove "foo" + q.PopBack() // remove "baz" + + q.PushFront("hello") + q.PushBack("world") + + // Consume deque and print elements. + for q.Len() != 0 { + fmt.Println(q.PopFront()) + } +} +``` + +## Uses + +Deque can be used as both a: +- [Queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) using `PushBack` and `PopFront` +- [Stack](https://en.wikipedia.org/wiki/Stack_(abstract_data_type)) using `PushBack` and `PopBack` diff --git a/vendor/github.com/gammazero/deque/deque.go b/vendor/github.com/gammazero/deque/deque.go new file mode 100644 index 00000000..ff109962 --- /dev/null +++ b/vendor/github.com/gammazero/deque/deque.go @@ -0,0 +1,434 @@ +package deque + +import "fmt" + +// minCapacity is the smallest capacity that deque may have. Must be power of 2 +// for bitwise modulus: x % n == x & (n - 1). +const minCapacity = 16 + +// Deque represents a single instance of the deque data structure. A Deque +// instance contains items of the type specified by the type argument. +// +// For example, to create a Deque that contains strings do one of the +// following: +// +// var stringDeque deque.Deque[string] +// stringDeque := new(deque.Deque[string]) +// stringDeque := &deque.Deque[string]{} +// +// To create a Deque that will never resize to have space for less than 64 +// items, specify a base capacity: +// +// var d deque.Deque[int] +// d.SetBaseCap(64) +// +// To ensure the Deque can store 1000 items without needing to resize while +// items are added: +// +// d.Grow(1000) +// +// Any values supplied to SetBaseCap and Grow are rounded up to the nearest +// power of 2, since the Deque grows by powers of 2. +type Deque[T any] struct { + buf []T + head int + tail int + count int + minCap int +} + +// Cap returns the current capacity of the Deque. If q is nil, q.Cap() is zero. +func (q *Deque[T]) Cap() int { + if q == nil { + return 0 + } + return len(q.buf) +} + +// Len returns the number of elements currently stored in the queue. If q is +// nil, q.Len() returns zero. +func (q *Deque[T]) Len() int { + if q == nil { + return 0 + } + return q.count +} + +// PushBack appends an element to the back of the queue. Implements FIFO when +// elements are removed with PopFront, and LIFO when elements are removed with +// PopBack. +func (q *Deque[T]) PushBack(elem T) { + q.growIfFull() + + q.buf[q.tail] = elem + // Calculate new tail position. + q.tail = q.next(q.tail) + q.count++ +} + +// PushFront prepends an element to the front of the queue. +func (q *Deque[T]) PushFront(elem T) { + q.growIfFull() + + // Calculate new head position. + q.head = q.prev(q.head) + q.buf[q.head] = elem + q.count++ +} + +// PopFront removes and returns the element from the front of the queue. +// Implements FIFO when used with PushBack. If the queue is empty, the call +// panics. +func (q *Deque[T]) PopFront() T { + if q.count <= 0 { + panic("deque: PopFront() called on empty queue") + } + ret := q.buf[q.head] + var zero T + q.buf[q.head] = zero + // Calculate new head position. + q.head = q.next(q.head) + q.count-- + + q.shrinkIfExcess() + return ret +} + +// PopBack removes and returns the element from the back of the queue. +// Implements LIFO when used with PushBack. If the queue is empty, the call +// panics. +func (q *Deque[T]) PopBack() T { + if q.count <= 0 { + panic("deque: PopBack() called on empty queue") + } + + // Calculate new tail position + q.tail = q.prev(q.tail) + + // Remove value at tail. + ret := q.buf[q.tail] + var zero T + q.buf[q.tail] = zero + q.count-- + + q.shrinkIfExcess() + return ret +} + +// Front returns the element at the front of the queue. This is the element +// that would be returned by PopFront. This call panics if the queue is empty. +func (q *Deque[T]) Front() T { + if q.count <= 0 { + panic("deque: Front() called when empty") + } + return q.buf[q.head] +} + +// Back returns the element at the back of the queue. This is the element that +// would be returned by PopBack. This call panics if the queue is empty. +func (q *Deque[T]) Back() T { + if q.count <= 0 { + panic("deque: Back() called when empty") + } + return q.buf[q.prev(q.tail)] +} + +// At returns the element at index i in the queue without removing the element +// from the queue. This method accepts only non-negative index values. At(0) +// refers to the first element and is the same as Front(). At(Len()-1) refers +// to the last element and is the same as Back(). If the index is invalid, the +// call panics. +// +// The purpose of At is to allow Deque to serve as a more general purpose +// circular buffer, where items are only added to and removed from the ends of +// the deque, but may be read from any place within the deque. Consider the +// case of a fixed-size circular log buffer: A new entry is pushed onto one end +// and when full the oldest is popped from the other end. All the log entries +// in the buffer must be readable without altering the buffer contents. +func (q *Deque[T]) At(i int) T { + q.checkRange(i) + // bitwise modulus + return q.buf[(q.head+i)&(len(q.buf)-1)] +} + +// Set assigns the item to index i in the queue. Set indexes the deque the same +// as At but perform the opposite operation. If the index is invalid, the call +// panics. +func (q *Deque[T]) Set(i int, item T) { + q.checkRange(i) + // bitwise modulus + q.buf[(q.head+i)&(len(q.buf)-1)] = item +} + +// Clear removes all elements from the queue, but retains the current capacity. +// This is useful when repeatedly reusing the queue at high frequency to avoid +// GC during reuse. The queue will not be resized smaller as long as items are +// only added. Only when items are removed is the queue subject to getting +// resized smaller. +func (q *Deque[T]) Clear() { + var zero T + modBits := len(q.buf) - 1 + h := q.head + for i := 0; i < q.Len(); i++ { + q.buf[(h+i)&modBits] = zero + } + q.head = 0 + q.tail = 0 + q.count = 0 +} + +// Grow grows deque's capacity, if necessary, to guarantee space for another n +// items. After Grow(n), at least n items can be written to the deque without +// another allocation. If n is negative, Grow panics. +func (q *Deque[T]) Grow(n int) { + if n < 0 { + panic("deque.Grow: negative count") + } + c := q.Cap() + l := q.Len() + // If already big enough. + if n <= c-l { + return + } + + if c == 0 { + c = minCapacity + } + + newLen := l + n + for c < newLen { + c <<= 1 + } + if l == 0 { + q.buf = make([]T, c) + q.head = 0 + q.tail = 0 + } else { + q.resize(c) + } +} + +// Rotate rotates the deque n steps front-to-back. If n is negative, rotates +// back-to-front. Having Deque provide Rotate avoids resizing that could happen +// if implementing rotation using only Pop and Push methods. If q.Len() is one +// or less, or q is nil, then Rotate does nothing. +func (q *Deque[T]) Rotate(n int) { + if q.Len() <= 1 { + return + } + // Rotating a multiple of q.count is same as no rotation. + n %= q.count + if n == 0 { + return + } + + modBits := len(q.buf) - 1 + // If no empty space in buffer, only move head and tail indexes. + if q.head == q.tail { + // Calculate new head and tail using bitwise modulus. + q.head = (q.head + n) & modBits + q.tail = q.head + return + } + + var zero T + + if n < 0 { + // Rotate back to front. + for ; n < 0; n++ { + // Calculate new head and tail using bitwise modulus. + q.head = (q.head - 1) & modBits + q.tail = (q.tail - 1) & modBits + // Put tail value at head and remove value at tail. + q.buf[q.head] = q.buf[q.tail] + q.buf[q.tail] = zero + } + return + } + + // Rotate front to back. + for ; n > 0; n-- { + // Put head value at tail and remove value at head. + q.buf[q.tail] = q.buf[q.head] + q.buf[q.head] = zero + // Calculate new head and tail using bitwise modulus. + q.head = (q.head + 1) & modBits + q.tail = (q.tail + 1) & modBits + } +} + +// Index returns the index into the Deque of the first item satisfying f(item), +// or -1 if none do. If q is nil, then -1 is always returned. Search is linear +// starting with index 0. +func (q *Deque[T]) Index(f func(T) bool) int { + if q.Len() > 0 { + modBits := len(q.buf) - 1 + for i := 0; i < q.count; i++ { + if f(q.buf[(q.head+i)&modBits]) { + return i + } + } + } + return -1 +} + +// RIndex is the same as Index, but searches from Back to Front. The index +// returned is from Front to Back, where index 0 is the index of the item +// returned by Front(). +func (q *Deque[T]) RIndex(f func(T) bool) int { + if q.Len() > 0 { + modBits := len(q.buf) - 1 + for i := q.count - 1; i >= 0; i-- { + if f(q.buf[(q.head+i)&modBits]) { + return i + } + } + } + return -1 +} + +// Insert is used to insert an element into the middle of the queue, before the +// element at the specified index. Insert(0,e) is the same as PushFront(e) and +// Insert(Len(),e) is the same as PushBack(e). Out of range indexes result in +// pushing the item onto the front of back of the deque. +// +// Important: Deque is optimized for O(1) operations at the ends of the queue, +// not for operations in the the middle. Complexity of this function is +// constant plus linear in the lesser of the distances between the index and +// either of the ends of the queue. +func (q *Deque[T]) Insert(at int, item T) { + if at <= 0 { + q.PushFront(item) + return + } + if at >= q.Len() { + q.PushBack(item) + return + } + if at*2 < q.count { + q.PushFront(item) + front := q.head + for i := 0; i < at; i++ { + next := q.next(front) + q.buf[front], q.buf[next] = q.buf[next], q.buf[front] + front = next + } + return + } + swaps := q.count - at + q.PushBack(item) + back := q.prev(q.tail) + for i := 0; i < swaps; i++ { + prev := q.prev(back) + q.buf[back], q.buf[prev] = q.buf[prev], q.buf[back] + back = prev + } +} + +// Remove removes and returns an element from the middle of the queue, at the +// specified index. Remove(0) is the same as PopFront() and Remove(Len()-1) is +// the same as PopBack(). Accepts only non-negative index values, and panics if +// index is out of range. +// +// Important: Deque is optimized for O(1) operations at the ends of the queue, +// not for operations in the the middle. Complexity of this function is +// constant plus linear in the lesser of the distances between the index and +// either of the ends of the queue. +func (q *Deque[T]) Remove(at int) T { + q.checkRange(at) + rm := (q.head + at) & (len(q.buf) - 1) + if at*2 < q.count { + for i := 0; i < at; i++ { + prev := q.prev(rm) + q.buf[prev], q.buf[rm] = q.buf[rm], q.buf[prev] + rm = prev + } + return q.PopFront() + } + swaps := q.count - at - 1 + for i := 0; i < swaps; i++ { + next := q.next(rm) + q.buf[rm], q.buf[next] = q.buf[next], q.buf[rm] + rm = next + } + return q.PopBack() +} + +// SetBaseCap sets a base capacity so that at least the specified number of +// items can always be stored without resizing. +func (q *Deque[T]) SetBaseCap(baseCap int) { + minCap := minCapacity + for minCap < baseCap { + minCap <<= 1 + } + q.minCap = minCap +} + +// Swap exchanges the two values at idxA and idxB. It panics if either index is +// out of range. +func (q *Deque[T]) Swap(idxA, idxB int) { + q.checkRange(idxA) + q.checkRange(idxB) + if idxA == idxB { + return + } + + realA := (q.head + idxA) & (len(q.buf) - 1) + realB := (q.head + idxB) & (len(q.buf) - 1) + q.buf[realA], q.buf[realB] = q.buf[realB], q.buf[realA] +} + +func (q *Deque[T]) checkRange(i int) { + if i < 0 || i >= q.count { + panic(fmt.Sprintf("deque: index out of range %d with length %d", i, q.Len())) + } +} + +// prev returns the previous buffer position wrapping around buffer. +func (q *Deque[T]) prev(i int) int { + return (i - 1) & (len(q.buf) - 1) // bitwise modulus +} + +// next returns the next buffer position wrapping around buffer. +func (q *Deque[T]) next(i int) int { + return (i + 1) & (len(q.buf) - 1) // bitwise modulus +} + +// growIfFull resizes up if the buffer is full. +func (q *Deque[T]) growIfFull() { + if q.count != len(q.buf) { + return + } + if len(q.buf) == 0 { + if q.minCap == 0 { + q.minCap = minCapacity + } + q.buf = make([]T, q.minCap) + return + } + q.resize(q.count << 1) +} + +// shrinkIfExcess resize down if the buffer 1/4 full. +func (q *Deque[T]) shrinkIfExcess() { + if len(q.buf) > q.minCap && (q.count<<2) == len(q.buf) { + q.resize(q.count << 1) + } +} + +// resize resizes the deque to fit exactly twice its current contents. This is +// used to grow the queue when it is full, and also to shrink it when it is +// only a quarter full. +func (q *Deque[T]) resize(newSize int) { + newBuf := make([]T, newSize) + if q.tail > q.head { + copy(newBuf, q.buf[q.head:q.tail]) + } else { + n := copy(newBuf, q.buf[q.head:]) + copy(newBuf[n:], q.buf[:q.tail]) + } + + q.head = 0 + q.tail = q.count + q.buf = newBuf +} diff --git a/vendor/github.com/gammazero/deque/doc.go b/vendor/github.com/gammazero/deque/doc.go new file mode 100644 index 00000000..dfff00ad --- /dev/null +++ b/vendor/github.com/gammazero/deque/doc.go @@ -0,0 +1,38 @@ +/* +Package deque provides a fast ring-buffer deque (double-ended queue) +implementation. + +Deque generalizes a queue and a stack, to efficiently add and remove items at +either end with O(1) performance. Queue (FIFO) operations are supported using +PushBack and PopFront. Stack (LIFO) operations are supported using PushBack and +PopBack. + +# Ring-buffer Performance + +The ring-buffer automatically resizes by powers of two, growing when additional +capacity is needed and shrinking when only a quarter of the capacity is used, +and uses bitwise arithmetic for all calculations. + +The ring-buffer implementation significantly improves memory and time +performance with fewer GC pauses, compared to implementations based on slices +and linked lists. + +For maximum speed, this deque implementation leaves concurrency safety up to +the application to provide, however the application chooses, if needed at all. + +# Reading Empty Deque + +Since it is OK for the deque to contain the zero-value of an item, it is +necessary to either panic or return a second boolean value to indicate the +deque is empty, when reading or removing an element. This deque panics when +reading from an empty deque. This is a run-time check to help catch programming +errors, which may be missed if a second return value is ignored. Simply check +Deque.Len() before reading from the deque. + +# Generics + +Deque uses generics to create a Deque that contains items of the type +specified. To create a Deque that holds a specific type, provide a type +argument with the Deque variable declaration. +*/ +package deque diff --git a/vendor/github.com/magiconair/properties/CHANGELOG.md b/vendor/github.com/magiconair/properties/CHANGELOG.md deleted file mode 100644 index 842e8e24..00000000 --- a/vendor/github.com/magiconair/properties/CHANGELOG.md +++ /dev/null @@ -1,205 +0,0 @@ -## Changelog - -### [1.8.7](https://github.com/magiconair/properties/tree/v1.8.7) - 08 Dec 2022 - - * [PR #65](https://github.com/magiconair/properties/pull/65): Speedup Merge - - Thanks to [@AdityaVallabh](https://github.com/AdityaVallabh) for the patch. - - * [PR #66](https://github.com/magiconair/properties/pull/66): use github actions - -### [1.8.6](https://github.com/magiconair/properties/tree/v1.8.6) - 23 Feb 2022 - - * [PR #57](https://github.com/magiconair/properties/pull/57):Fix "unreachable code" lint error - - Thanks to [@ellie](https://github.com/ellie) for the patch. - - * [PR #63](https://github.com/magiconair/properties/pull/63): Make TestMustGetParsedDuration backwards compatible - - This patch ensures that the `TestMustGetParsedDuration` still works with `go1.3` to make the - author happy until it affects real users. - - Thanks to [@maage](https://github.com/maage) for the patch. - -### [1.8.5](https://github.com/magiconair/properties/tree/v1.8.5) - 24 Mar 2021 - - * [PR #55](https://github.com/magiconair/properties/pull/55): Fix: Encoding Bug in Comments - - When reading comments \ are loaded correctly, but when writing they are then - replaced by \\. This leads to wrong comments when writing and reading multiple times. - - Thanks to [@doxsch](https://github.com/doxsch) for the patch. - -### [1.8.4](https://github.com/magiconair/properties/tree/v1.8.4) - 23 Sep 2020 - - * [PR #50](https://github.com/magiconair/properties/pull/50): enhance error message for circular references - - Thanks to [@sriv](https://github.com/sriv) for the patch. - -### [1.8.3](https://github.com/magiconair/properties/tree/v1.8.3) - 14 Sep 2020 - - * [PR #49](https://github.com/magiconair/properties/pull/49): Include the key in error message causing the circular reference - - The change is include the key in the error message which is causing the circular - reference when parsing/loading the properties files. - - Thanks to [@haroon-sheikh](https://github.com/haroon-sheikh) for the patch. - -### [1.8.2](https://github.com/magiconair/properties/tree/v1.8.2) - 25 Aug 2020 - - * [PR #36](https://github.com/magiconair/properties/pull/36): Escape backslash on write - - This patch ensures that backslashes are escaped on write. Existing applications which - rely on the old behavior may need to be updated. - - Thanks to [@apesternikov](https://github.com/apesternikov) for the patch. - - * [PR #42](https://github.com/magiconair/properties/pull/42): Made Content-Type check whitespace agnostic in LoadURL() - - Thanks to [@aliras1](https://github.com/aliras1) for the patch. - - * [PR #41](https://github.com/magiconair/properties/pull/41): Make key/value separator configurable on Write() - - Thanks to [@mkjor](https://github.com/mkjor) for the patch. - - * [PR #40](https://github.com/magiconair/properties/pull/40): Add method to return a sorted list of keys - - Thanks to [@mkjor](https://github.com/mkjor) for the patch. - -### [1.8.1](https://github.com/magiconair/properties/tree/v1.8.1) - 10 May 2019 - - * [PR #35](https://github.com/magiconair/properties/pull/35): Close body always after request - - This patch ensures that in `LoadURL` the response body is always closed. - - Thanks to [@liubog2008](https://github.com/liubog2008) for the patch. - -### [1.8](https://github.com/magiconair/properties/tree/v1.8) - 15 May 2018 - - * [PR #26](https://github.com/magiconair/properties/pull/26): Disable expansion during loading - - This adds the option to disable property expansion during loading. - - Thanks to [@kmala](https://github.com/kmala) for the patch. - -### [1.7.6](https://github.com/magiconair/properties/tree/v1.7.6) - 14 Feb 2018 - - * [PR #29](https://github.com/magiconair/properties/pull/29): Reworked expansion logic to handle more complex cases. - - See PR for an example. - - Thanks to [@yobert](https://github.com/yobert) for the fix. - -### [1.7.5](https://github.com/magiconair/properties/tree/v1.7.5) - 13 Feb 2018 - - * [PR #28](https://github.com/magiconair/properties/pull/28): Support duplicate expansions in the same value - - Values which expand the same key multiple times (e.g. `key=${a} ${a}`) will no longer fail - with a `circular reference error`. - - Thanks to [@yobert](https://github.com/yobert) for the fix. - -### [1.7.4](https://github.com/magiconair/properties/tree/v1.7.4) - 31 Oct 2017 - - * [Issue #23](https://github.com/magiconair/properties/issues/23): Ignore blank lines with whitespaces - - * [PR #24](https://github.com/magiconair/properties/pull/24): Update keys when DisableExpansion is enabled - - Thanks to [@mgurov](https://github.com/mgurov) for the fix. - -### [1.7.3](https://github.com/magiconair/properties/tree/v1.7.3) - 10 Jul 2017 - - * [Issue #17](https://github.com/magiconair/properties/issues/17): Add [SetValue()](http://godoc.org/github.com/magiconair/properties#Properties.SetValue) method to set values generically - * [Issue #22](https://github.com/magiconair/properties/issues/22): Add [LoadMap()](http://godoc.org/github.com/magiconair/properties#LoadMap) function to load properties from a string map - -### [1.7.2](https://github.com/magiconair/properties/tree/v1.7.2) - 20 Mar 2017 - - * [Issue #15](https://github.com/magiconair/properties/issues/15): Drop gocheck dependency - * [PR #21](https://github.com/magiconair/properties/pull/21): Add [Map()](http://godoc.org/github.com/magiconair/properties#Properties.Map) and [FilterFunc()](http://godoc.org/github.com/magiconair/properties#Properties.FilterFunc) - -### [1.7.1](https://github.com/magiconair/properties/tree/v1.7.1) - 13 Jan 2017 - - * [Issue #14](https://github.com/magiconair/properties/issues/14): Decouple TestLoadExpandedFile from `$USER` - * [PR #12](https://github.com/magiconair/properties/pull/12): Load from files and URLs - * [PR #16](https://github.com/magiconair/properties/pull/16): Keep gofmt happy - * [PR #18](https://github.com/magiconair/properties/pull/18): Fix Delete() function - -### [1.7.0](https://github.com/magiconair/properties/tree/v1.7.0) - 20 Mar 2016 - - * [Issue #10](https://github.com/magiconair/properties/issues/10): Add [LoadURL,LoadURLs,MustLoadURL,MustLoadURLs](http://godoc.org/github.com/magiconair/properties#LoadURL) method to load properties from a URL. - * [Issue #11](https://github.com/magiconair/properties/issues/11): Add [LoadString,MustLoadString](http://godoc.org/github.com/magiconair/properties#LoadString) method to load properties from an UTF8 string. - * [PR #8](https://github.com/magiconair/properties/pull/8): Add [MustFlag](http://godoc.org/github.com/magiconair/properties#Properties.MustFlag) method to provide overrides via command line flags. (@pascaldekloe) - -### [1.6.0](https://github.com/magiconair/properties/tree/v1.6.0) - 11 Dec 2015 - - * Add [Decode](http://godoc.org/github.com/magiconair/properties#Properties.Decode) method to populate struct from properties via tags. - -### [1.5.6](https://github.com/magiconair/properties/tree/v1.5.6) - 18 Oct 2015 - - * Vendored in gopkg.in/check.v1 - -### [1.5.5](https://github.com/magiconair/properties/tree/v1.5.5) - 31 Jul 2015 - - * [PR #6](https://github.com/magiconair/properties/pull/6): Add [Delete](http://godoc.org/github.com/magiconair/properties#Properties.Delete) method to remove keys including comments. (@gerbenjacobs) - -### [1.5.4](https://github.com/magiconair/properties/tree/v1.5.4) - 23 Jun 2015 - - * [Issue #5](https://github.com/magiconair/properties/issues/5): Allow disabling of property expansion [DisableExpansion](http://godoc.org/github.com/magiconair/properties#Properties.DisableExpansion). When property expansion is disabled Properties become a simple key/value store and don't check for circular references. - -### [1.5.3](https://github.com/magiconair/properties/tree/v1.5.3) - 02 Jun 2015 - - * [Issue #4](https://github.com/magiconair/properties/issues/4): Maintain key order in [Filter()](http://godoc.org/github.com/magiconair/properties#Properties.Filter), [FilterPrefix()](http://godoc.org/github.com/magiconair/properties#Properties.FilterPrefix) and [FilterRegexp()](http://godoc.org/github.com/magiconair/properties#Properties.FilterRegexp) - -### [1.5.2](https://github.com/magiconair/properties/tree/v1.5.2) - 10 Apr 2015 - - * [Issue #3](https://github.com/magiconair/properties/issues/3): Don't print comments in [WriteComment()](http://godoc.org/github.com/magiconair/properties#Properties.WriteComment) if they are all empty - * Add clickable links to README - -### [1.5.1](https://github.com/magiconair/properties/tree/v1.5.1) - 08 Dec 2014 - - * Added [GetParsedDuration()](http://godoc.org/github.com/magiconair/properties#Properties.GetParsedDuration) and [MustGetParsedDuration()](http://godoc.org/github.com/magiconair/properties#Properties.MustGetParsedDuration) for values specified compatible with - [time.ParseDuration()](http://golang.org/pkg/time/#ParseDuration). - -### [1.5.0](https://github.com/magiconair/properties/tree/v1.5.0) - 18 Nov 2014 - - * Added support for single and multi-line comments (reading, writing and updating) - * The order of keys is now preserved - * Calling [Set()](http://godoc.org/github.com/magiconair/properties#Properties.Set) with an empty key now silently ignores the call and does not create a new entry - * Added a [MustSet()](http://godoc.org/github.com/magiconair/properties#Properties.MustSet) method - * Migrated test library from launchpad.net/gocheck to [gopkg.in/check.v1](http://gopkg.in/check.v1) - -### [1.4.2](https://github.com/magiconair/properties/tree/v1.4.2) - 15 Nov 2014 - - * [Issue #2](https://github.com/magiconair/properties/issues/2): Fixed goroutine leak in parser which created two lexers but cleaned up only one - -### [1.4.1](https://github.com/magiconair/properties/tree/v1.4.1) - 13 Nov 2014 - - * [Issue #1](https://github.com/magiconair/properties/issues/1): Fixed bug in Keys() method which returned an empty string - -### [1.4.0](https://github.com/magiconair/properties/tree/v1.4.0) - 23 Sep 2014 - - * Added [Keys()](http://godoc.org/github.com/magiconair/properties#Properties.Keys) to get the keys - * Added [Filter()](http://godoc.org/github.com/magiconair/properties#Properties.Filter), [FilterRegexp()](http://godoc.org/github.com/magiconair/properties#Properties.FilterRegexp) and [FilterPrefix()](http://godoc.org/github.com/magiconair/properties#Properties.FilterPrefix) to get a subset of the properties - -### [1.3.0](https://github.com/magiconair/properties/tree/v1.3.0) - 18 Mar 2014 - -* Added support for time.Duration -* Made MustXXX() failure beha[ior configurable (log.Fatal, panic](https://github.com/magiconair/properties/tree/vior configurable (log.Fatal, panic) - custom) -* Changed default of MustXXX() failure from panic to log.Fatal - -### [1.2.0](https://github.com/magiconair/properties/tree/v1.2.0) - 05 Mar 2014 - -* Added MustGet... functions -* Added support for int and uint with range checks on 32 bit platforms - -### [1.1.0](https://github.com/magiconair/properties/tree/v1.1.0) - 20 Jan 2014 - -* Renamed from goproperties to properties -* Added support for expansion of environment vars in - filenames and value expressions -* Fixed bug where value expressions were not at the - start of the string - -### [1.0.0](https://github.com/magiconair/properties/tree/v1.0.0) - 7 Jan 2014 - -* Initial release diff --git a/vendor/github.com/magiconair/properties/README.md b/vendor/github.com/magiconair/properties/README.md index e2edda02..4872685f 100644 --- a/vendor/github.com/magiconair/properties/README.md +++ b/vendor/github.com/magiconair/properties/README.md @@ -1,12 +1,9 @@ [![](https://img.shields.io/github/tag/magiconair/properties.svg?style=flat-square&label=release)](https://github.com/magiconair/properties/releases) -[![Travis CI Status](https://img.shields.io/travis/magiconair/properties.svg?branch=master&style=flat-square&label=travis)](https://travis-ci.org/magiconair/properties) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg?style=flat-square)](https://raw.githubusercontent.com/magiconair/properties/master/LICENSE) [![GoDoc](http://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](http://godoc.org/github.com/magiconair/properties) # Overview -#### Please run `git pull --tags` to update the tags. See [below](#updated-git-tags) why. - properties is a Go library for reading and writing properties files. It supports reading from multiple files or URLs and Spring style recursive @@ -99,30 +96,3 @@ $ go get -u github.com/magiconair/properties ## ToDo * Dump contents with passwords and secrets obscured - -## Updated Git tags - -#### 13 Feb 2018 - -I realized that all of the git tags I had pushed before v1.7.5 were lightweight tags -and I've only recently learned that this doesn't play well with `git describe` 😞 - -I have replaced all lightweight tags with signed tags using this script which should -retain the commit date, name and email address. Please run `git pull --tags` to update them. - -Worst case you have to reclone the repo. - -```shell -#!/bin/bash -tag=$1 -echo "Updating $tag" -date=$(git show ${tag}^0 --format=%aD | head -1) -email=$(git show ${tag}^0 --format=%aE | head -1) -name=$(git show ${tag}^0 --format=%aN | head -1) -GIT_COMMITTER_DATE="$date" GIT_COMMITTER_NAME="$name" GIT_COMMITTER_EMAIL="$email" git tag -s -f ${tag} ${tag}^0 -m ${tag} -``` - -I apologize for the inconvenience. - -Frank - diff --git a/vendor/github.com/magiconair/properties/decode.go b/vendor/github.com/magiconair/properties/decode.go index 8e6aa441..f5e252f8 100644 --- a/vendor/github.com/magiconair/properties/decode.go +++ b/vendor/github.com/magiconair/properties/decode.go @@ -189,12 +189,12 @@ func dec(p *Properties, key string, def *string, opts map[string]string, v refle for i := 0; i < v.NumField(); i++ { fv := v.Field(i) fk, def, opts := keydef(t.Field(i)) - if !fv.CanSet() { - return fmt.Errorf("cannot set %s", t.Field(i).Name) - } if fk == "-" { continue } + if !fv.CanSet() { + return fmt.Errorf("cannot set %s", t.Field(i).Name) + } if key != "" { fk = key + "." + fk } diff --git a/vendor/github.com/magiconair/properties/load.go b/vendor/github.com/magiconair/properties/load.go index 635368dc..6567e0c7 100644 --- a/vendor/github.com/magiconair/properties/load.go +++ b/vendor/github.com/magiconair/properties/load.go @@ -6,7 +6,7 @@ package properties import ( "fmt" - "io/ioutil" + "io" "net/http" "os" "strings" @@ -52,6 +52,15 @@ func (l *Loader) LoadBytes(buf []byte) (*Properties, error) { return l.loadBytes(buf, l.Encoding) } +// LoadReader reads an io.Reader into a Properties struct. +func (l *Loader) LoadReader(r io.Reader) (*Properties, error) { + if buf, err := io.ReadAll(r); err != nil { + return nil, err + } else { + return l.loadBytes(buf, l.Encoding) + } +} + // LoadAll reads the content of multiple URLs or files in the given order into // a Properties struct. If IgnoreMissing is true then a 404 status code or // missing file will not be reported as error. Encoding sets the encoding for @@ -91,7 +100,7 @@ func (l *Loader) LoadAll(names []string) (*Properties, error) { // If IgnoreMissing is true then a missing file will not be // reported as error. func (l *Loader) LoadFile(filename string) (*Properties, error) { - data, err := ioutil.ReadFile(filename) + data, err := os.ReadFile(filename) if err != nil { if l.IgnoreMissing && os.IsNotExist(err) { LogPrintf("properties: %s not found. skipping", filename) @@ -126,7 +135,7 @@ func (l *Loader) LoadURL(url string) (*Properties, error) { return nil, fmt.Errorf("properties: %s returned %d", url, resp.StatusCode) } - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return nil, fmt.Errorf("properties: %s error reading response. %s", url, err) } @@ -185,6 +194,12 @@ func LoadFile(filename string, enc Encoding) (*Properties, error) { return l.LoadAll([]string{filename}) } +// LoadReader reads an io.Reader into a Properties struct. +func LoadReader(r io.Reader, enc Encoding) (*Properties, error) { + l := &Loader{Encoding: enc} + return l.LoadReader(r) +} + // LoadFiles reads multiple files in the given order into // a Properties struct. If 'ignoreMissing' is true then // non-existent files will not be reported as error. @@ -224,6 +239,12 @@ func MustLoadString(s string) *Properties { return must(LoadString(s)) } +// MustLoadSReader reads an io.Reader into a Properties struct and +// panics on error. +func MustLoadReader(r io.Reader, enc Encoding) *Properties { + return must(LoadReader(r, enc)) +} + // MustLoadFile reads a file into a Properties struct and // panics on error. func MustLoadFile(filename string, enc Encoding) *Properties { diff --git a/vendor/github.com/maypok86/otter/.gitignore b/vendor/github.com/maypok86/otter/.gitignore new file mode 100644 index 00000000..e95bc5ed --- /dev/null +++ b/vendor/github.com/maypok86/otter/.gitignore @@ -0,0 +1,22 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +/.idea/ +*.tmp +*coverage.txt +*lint.txt +**/bin/ +.DS_Store diff --git a/vendor/github.com/maypok86/otter/.golangci.yml b/vendor/github.com/maypok86/otter/.golangci.yml new file mode 100644 index 00000000..a4235930 --- /dev/null +++ b/vendor/github.com/maypok86/otter/.golangci.yml @@ -0,0 +1,103 @@ +run: + concurrency: 8 + timeout: 5m + build-tags: + - integration + modules-download-mode: readonly + go: '1.22' +output: + formats: + - format: tab + path: lint.txt + print-issued-lines: false + uniq-by-line: false + sort-results: true +linters: + enable: + - asasalint + - asciicheck + - bidichk + - bodyclose + - contextcheck + - durationcheck + - errcheck + - errname + - errorlint + - gocheckcompilerdirectives + - gocritic + - godot + - gofumpt + - gci + - gomoddirectives + - gosec + - gosimple + - govet + - ineffassign + - misspell + - nakedret + - nilerr + - nilnil + - noctx + - nolintlint + - prealloc + - predeclared + - promlinter + - reassign + - revive + - rowserrcheck + - sqlclosecheck + - staticcheck + - stylecheck + - tagliatelle + - tenv + - testableexamples + - thelper + - tparallel + - unconvert + - unparam + - usestdlibvars + - wastedassign + disable: + - unused +issues: + max-issues-per-linter: 0 + max-same-issues: 0 + exclude-rules: + - path: _test\.go + linters: + - gosec +linters-settings: + gci: + sections: + - standard # Standard lib + - default # External dependencies + - prefix(github.com/maypok86/otter) # Internal packages + gocritic: + enabled-tags: + - diagnostic + - experimental + - opinionated + - performance + - style + disabled-checks: + - hugeParam + - rangeExprCopy + - rangeValCopy + errcheck: + check-type-assertions: true + check-blank: true + exclude-functions: + - io/ioutil.ReadFile + - io.Copy(*bytes.Buffer) + - io.Copy(os.Stdout) + nakedret: + max-func-lines: 1 + revive: + rules: + - name: empty-block + disabled: true + tagliatelle: + case: + rules: + json: snake + yaml: snake diff --git a/vendor/github.com/maypok86/otter/CHANGELOG.md b/vendor/github.com/maypok86/otter/CHANGELOG.md new file mode 100644 index 00000000..01e2d724 --- /dev/null +++ b/vendor/github.com/maypok86/otter/CHANGELOG.md @@ -0,0 +1,98 @@ +## 1.2.4 - 2024-11-23 + +### 🐞 Bug Fixes + +- Fixed a bug due to changing [gammazero/deque](https://github.com/gammazero/deque/pull/33) contracts without v2 release. ([#112](https://github.com/maypok86/otter/issues/112)) + +## 1.2.3 - 2024-09-30 + +### 🐞 Bug Fixes + +- Added collection of eviction statistics for expired entries. ([#108](https://github.com/maypok86/otter/issues/108)) + +## 1.2.2 - 2024-08-14 + +### ✨️Features + +- Implemented `fmt.Stringer` interface for `DeletionReason` type ([#100](https://github.com/maypok86/otter/issues/100)) + +### 🐞 Bug Fixes + +- Fixed processing of an expired entry in the `Get` method ([#98](https://github.com/maypok86/otter/issues/98)) +- Fixed inconsistent deletion listener behavior ([#98](https://github.com/maypok86/otter/issues/98)) +- Fixed the behavior of `checkedAdd` when over/underflow ([#91](https://github.com/maypok86/otter/issues/91)) + +## 1.2.1 - 2024-04-15 + +### 🐞 Bug Fixes + +- Fixed uint32 capacity overflow. + +## 1.2.0 - 2024-03-12 + +The main innovation of this release is the addition of an `Extension`, which makes it easy to add a huge number of features to otter. + +Usage example: + +```go +key := 1 +... +entry, ok := cache.Extension().GetEntry(key) +... +key := entry.Key() +value := entry.Value() +cost := entry.Cost() +expiration := entry.Expiration() +ttl := entry.TTL() +hasExpired := entry.HasExpired() +``` + +### ✨️Features + +- Added `DeletionListener` to the builder ([#63](https://github.com/maypok86/otter/issues/63)) +- Added `Extension` ([#56](https://github.com/maypok86/otter/issues/56)) + +### 🚀 Improvements + +- Added support for Go 1.22 +- Memory consumption with small cache sizes is reduced to the level of other libraries ([#66](https://github.com/maypok86/otter/issues/66)) + +## 1.1.1 - 2024-03-06 + +### 🐞 Bug Fixes + +- Fixed alignment issues on 32-bit archs + +## 1.1.0 - 2024-03-04 + +The main innovation of this release is node code generation. Thanks to it, the cache will no longer consume more memory due to features that it does not use. For example, if you do not need an expiration policy, then otter will not store the expiration time of each entry. It also allows otter to use more effective expiration policies. + +Another expected improvement is the correction of minor synchronization problems due to the state machine. Now otter, unlike other contention-free caches in Go, should not have them at all. + +### ✨️Features + +- Added `DeleteByFunc` function to cache ([#44](https://github.com/maypok86/otter/issues/44)) +- Added `InitialCapacity` function to builder ([#47](https://github.com/maypok86/otter/issues/47)) +- Added collection of additional statistics ([#57](https://github.com/maypok86/otter/issues/57)) + +### 🚀 Improvements + +- Added proactive queue-based and timer wheel-based expiration policies with O(1) time complexity ([#55](https://github.com/maypok86/otter/issues/55)) +- Added node code generation ([#55](https://github.com/maypok86/otter/issues/55)) +- Fixed the race condition when changing the order of events ([#59](https://github.com/maypok86/otter/issues/59)) +- Reduced memory consumption on small caches + +## 1.0.0 - 2024-01-26 + +### ✨️Features + +- Builder pattern support +- Cleaner API compared to other caches ([#40](https://github.com/maypok86/otter/issues/40)) +- Added `SetIfAbsent` and `Range` functions ([#27](https://github.com/maypok86/otter/issues/27)) +- Statistics collection ([#4](https://github.com/maypok86/otter/issues/4)) +- Cost based eviction +- Support for generics and any comparable types as keys +- Support ttl ([#14](https://github.com/maypok86/otter/issues/14)) +- Excellent speed ([benchmark results](https://github.com/maypok86/otter?tab=readme-ov-file#-performance-)) +- O(1) worst case time complexity for S3-FIFO instead of O(n) +- Improved hit ratio of S3-FIFO on many traces ([simulator results](https://github.com/maypok86/otter?tab=readme-ov-file#-hit-ratio-)) diff --git a/vendor/github.com/maypok86/otter/CODE_OF_CONDUCT.md b/vendor/github.com/maypok86/otter/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..2538016e --- /dev/null +++ b/vendor/github.com/maypok86/otter/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +maypok86@gmail.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/vendor/github.com/maypok86/otter/CONTRIBUTING.md b/vendor/github.com/maypok86/otter/CONTRIBUTING.md new file mode 100644 index 00000000..0b52d462 --- /dev/null +++ b/vendor/github.com/maypok86/otter/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# Contribution Guidelines + +## Reporting Issues + +Please [open an issue](https://github.com/maypok86/otter/issues) if you find a bug or have a feature request. +Note: you need to login (e. g. using your GitHub account) first. +Before submitting a bug report or feature request, check to make sure it hasn't +already been submitted + +The more detailed your report is, the faster it can be resolved. +If you report a bug, please provide steps to reproduce this bug and revision of +code in which this bug reproduces. + + +## Code + +If you would like to contribute code to fix a bug, add a new feature, or +otherwise improve our product, pull requests are most welcome. + +Our pull request template contains a [checklist](https://github.com/maypok86/otter/blob/main/.github/pull_request_template.md) of acceptance +criteria for your pull request. +Please read it before you start contributing and make sure your contributions +adhere to this checklist. diff --git a/vendor/github.com/maypok86/otter/LICENSE b/vendor/github.com/maypok86/otter/LICENSE new file mode 100644 index 00000000..f49a4e16 --- /dev/null +++ b/vendor/github.com/maypok86/otter/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/vendor/github.com/maypok86/otter/Makefile b/vendor/github.com/maypok86/otter/Makefile new file mode 100644 index 00000000..ef138b48 --- /dev/null +++ b/vendor/github.com/maypok86/otter/Makefile @@ -0,0 +1,56 @@ +.PHONY: setup +setup: deps ## Setup development environment + cp ./scripts/pre-push.sh .git/hooks/pre-push + chmod +x .git/hooks/pre-push + +.PHONY: deps +deps: ## Install all the build and lint dependencies + bash scripts/deps.sh + +.PHONY: fmt +fmt: ## Run format tools on all go files + gci write --skip-vendor --skip-generated \ + -s standard -s default -s "prefix(github.com/maypok86/otter)" . + gofumpt -l -w . + +.PHONY: lint +lint: ## Run all the linters + golangci-lint run -v ./... + +.PHONY: test +test: test.unit ## Run all the tests + +.PHONY: test.unit +test.unit: ## Run all unit tests + @echo 'mode: atomic' > coverage.txt + go test -covermode=atomic -coverprofile=coverage.txt.tmp -coverpkg=./... -v -race ./... + cat coverage.txt.tmp | grep -v -E "/generated/|/cmd/" > coverage.txt + rm coverage.txt.tmp + +.PHONY: test.32-bit +test.32-bit: ## Run tests on 32-bit arch + GOARCH=386 go test -v ./... + +.PHONY: cover +cover: test.unit ## Run all the tests and opens the coverage report + go tool cover -html=coverage.txt + +.PHONY: ci +ci: lint test ## Run all the tests and code checks + +.PHONY: generate +generate: ## Generate files for the project + go run ./cmd/generator ./internal/generated/node + +.PHONY: clean +clean: ## Remove temporary files + @go clean + @rm -rf bin/ + @rm -rf coverage.txt lint.txt + @echo "SUCCESS!" + +.PHONY: help +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +.DEFAULT_GOAL:= help diff --git a/vendor/github.com/maypok86/otter/README.md b/vendor/github.com/maypok86/otter/README.md new file mode 100644 index 00000000..27233930 --- /dev/null +++ b/vendor/github.com/maypok86/otter/README.md @@ -0,0 +1,191 @@ +

+ +

High performance in-memory cache

+

+ +

+Go Reference + + + + + +Mentioned in Awesome Go +

+ +Otter is one of the most powerful caching libraries for Go based on researches in caching and concurrent data structures. Otter also uses the experience of designing caching libraries in other languages (for example, [caffeine](https://github.com/ben-manes/caffeine)). + +## 📖 Contents + +- [Features](#features) +- [Related works](#related-works) +- [Usage](#usage) + - [Requirements](#requirements) + - [Installation](#installation) + - [Examples](#examples) +- [Performance](#performance) + - [Throughput](#throughput) + - [Hit ratio](#hit-ratio) + - [Memory consumption](#memory-consumption) +- [Contribute](#contribute) +- [License](#license) + +## ✨ Features + +- **Simple API**: Just set the parameters you want in the builder and enjoy +- **Autoconfiguration**: Otter is automatically configured based on the parallelism of your application +- **Generics**: You can safely use any comparable types as keys and any types as values +- **TTL**: Expired values will be automatically deleted from the cache +- **Cost-based eviction**: Otter supports eviction based on the cost of each entry +- **Deletion listener**: You can pass a callback function in the builder that will be called when an entry is deleted from the cache +- **Stats**: You can collect various usage statistics +- **Excellent throughput**: Otter can handle a [huge number of requests](#throughput) +- **Great hit ratio**: New S3-FIFO algorithm is used, which shows excellent [results](#hit-ratio) + +## 🗃 Related works + +Otter is based on the following papers: + +- [BP-Wrapper: A Framework Making Any Replacement Algorithms (Almost) Lock Contention Free](https://www.researchgate.net/publication/220966845_BP-Wrapper_A_System_Framework_Making_Any_Replacement_Algorithms_Almost_Lock_Contention_Free) +- [FIFO queues are all you need for cache eviction](https://dl.acm.org/doi/10.1145/3600006.3613147) +- [A large scale analysis of hundreds of in-memory cache clusters at Twitter](https://www.usenix.org/system/files/osdi20-yang.pdf) + +## 📚 Usage + +### 📋 Requirements + +- Go 1.19+ + +### 🛠️ Installation + +```shell +go get -u github.com/maypok86/otter +``` + +### ✏️ Examples + +Otter uses a builder pattern that allows you to conveniently create a cache instance with different parameters. + +**Cache with const TTL** +```go +package main + +import ( + "fmt" + "time" + + "github.com/maypok86/otter" +) + +func main() { + // create a cache with capacity equal to 10000 elements + cache, err := otter.MustBuilder[string, string](10_000). + CollectStats(). + Cost(func(key string, value string) uint32 { + return 1 + }). + WithTTL(time.Hour). + Build() + if err != nil { + panic(err) + } + + // set item with ttl (1 hour) + cache.Set("key", "value") + + // get value from cache + value, ok := cache.Get("key") + if !ok { + panic("not found key") + } + fmt.Println(value) + + // delete item from cache + cache.Delete("key") + + // delete data and stop goroutines + cache.Close() +} +``` + +**Cache with variable TTL** +```go +package main + +import ( + "fmt" + "time" + + "github.com/maypok86/otter" +) + +func main() { + // create a cache with capacity equal to 10000 elements + cache, err := otter.MustBuilder[string, string](10_000). + CollectStats(). + Cost(func(key string, value string) uint32 { + return 1 + }). + WithVariableTTL(). + Build() + if err != nil { + panic(err) + } + + // set item with ttl (1 hour) + cache.Set("key1", "value1", time.Hour) + // set item with ttl (1 minute) + cache.Set("key2", "value2", time.Minute) + + // get value from cache + value, ok := cache.Get("key1") + if !ok { + panic("not found key") + } + fmt.Println(value) + + // delete item from cache + cache.Delete("key1") + + // delete data and stop goroutines + cache.Close() +} +``` + +## 📊 Performance + +The benchmark code can be found [here](https://github.com/maypok86/benchmarks). + +### 🚀 Throughput + +Throughput benchmarks are a Go port of the caffeine [benchmarks](https://github.com/ben-manes/caffeine/blob/master/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/GetPutBenchmark.java). This microbenchmark compares the throughput of caches on a zipf distribution, which allows to show various inefficient places in implementations. + +You can find results [here](https://maypok86.github.io/otter/performance/throughput/). + +### 🎯 Hit ratio + +The hit ratio simulator tests caches on various traces: +1. Synthetic (zipf distribution) +2. Traditional (widely known and used in various projects and papers) +3. Modern (recently collected from the production of the largest companies in the world) + +You can find results [here](https://maypok86.github.io/otter/performance/hit-ratio/). + +### 💾 Memory consumption + +The memory overhead benchmark shows how much additional memory the cache will require at different capacities. + +You can find results [here](https://maypok86.github.io/otter/performance/memory-consumption/). + +## 👏 Contribute + +Contributions are welcome as always, before submitting a new PR please make sure to open a new issue so community members can discuss it. +For more information please see [contribution guidelines](./CONTRIBUTING.md). + +Additionally, you might find existing open issues which can help with improvements. + +This project follows a standard [code of conduct](./CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated. + +## 📄 License + +This project is Apache 2.0 licensed, as found in the [LICENSE](./LICENSE). diff --git a/vendor/github.com/maypok86/otter/builder.go b/vendor/github.com/maypok86/otter/builder.go new file mode 100644 index 00000000..2498c903 --- /dev/null +++ b/vendor/github.com/maypok86/otter/builder.go @@ -0,0 +1,311 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otter + +import ( + "errors" + "time" + + "github.com/maypok86/otter/internal/core" +) + +const ( + unsetCapacity = -1 +) + +var ( + // ErrIllegalCapacity means that a non-positive capacity has been passed to the NewBuilder. + ErrIllegalCapacity = errors.New("capacity should be positive") + // ErrIllegalInitialCapacity means that a non-positive capacity has been passed to the Builder.InitialCapacity. + ErrIllegalInitialCapacity = errors.New("initial capacity should be positive") + // ErrNilCostFunc means that a nil cost func has been passed to the Builder.Cost. + ErrNilCostFunc = errors.New("setCostFunc func should not be nil") + // ErrIllegalTTL means that a non-positive ttl has been passed to the Builder.WithTTL. + ErrIllegalTTL = errors.New("ttl should be positive") +) + +type baseOptions[K comparable, V any] struct { + capacity int + initialCapacity int + statsEnabled bool + withCost bool + costFunc func(key K, value V) uint32 + deletionListener func(key K, value V, cause DeletionCause) +} + +func (o *baseOptions[K, V]) collectStats() { + o.statsEnabled = true +} + +func (o *baseOptions[K, V]) setCostFunc(costFunc func(key K, value V) uint32) { + o.costFunc = costFunc + o.withCost = true +} + +func (o *baseOptions[K, V]) setInitialCapacity(initialCapacity int) { + o.initialCapacity = initialCapacity +} + +func (o *baseOptions[K, V]) setDeletionListener(deletionListener func(key K, value V, cause DeletionCause)) { + o.deletionListener = deletionListener +} + +func (o *baseOptions[K, V]) validate() error { + if o.initialCapacity <= 0 && o.initialCapacity != unsetCapacity { + return ErrIllegalInitialCapacity + } + if o.costFunc == nil { + return ErrNilCostFunc + } + return nil +} + +func (o *baseOptions[K, V]) toConfig() core.Config[K, V] { + var initialCapacity *int + if o.initialCapacity != unsetCapacity { + initialCapacity = &o.initialCapacity + } + return core.Config[K, V]{ + Capacity: o.capacity, + InitialCapacity: initialCapacity, + StatsEnabled: o.statsEnabled, + CostFunc: o.costFunc, + WithCost: o.withCost, + DeletionListener: o.deletionListener, + } +} + +type constTTLOptions[K comparable, V any] struct { + baseOptions[K, V] + ttl time.Duration +} + +func (o *constTTLOptions[K, V]) validate() error { + if o.ttl <= 0 { + return ErrIllegalTTL + } + return o.baseOptions.validate() +} + +func (o *constTTLOptions[K, V]) toConfig() core.Config[K, V] { + c := o.baseOptions.toConfig() + c.TTL = &o.ttl + return c +} + +type variableTTLOptions[K comparable, V any] struct { + baseOptions[K, V] +} + +func (o *variableTTLOptions[K, V]) toConfig() core.Config[K, V] { + c := o.baseOptions.toConfig() + c.WithVariableTTL = true + return c +} + +// Builder is a one-shot builder for creating a cache instance. +type Builder[K comparable, V any] struct { + baseOptions[K, V] +} + +// MustBuilder creates a builder and sets the future cache capacity. +// +// Panics if capacity <= 0. +func MustBuilder[K comparable, V any](capacity int) *Builder[K, V] { + b, err := NewBuilder[K, V](capacity) + if err != nil { + panic(err) + } + return b +} + +// NewBuilder creates a builder and sets the future cache capacity. +// +// Returns an error if capacity <= 0. +func NewBuilder[K comparable, V any](capacity int) (*Builder[K, V], error) { + if capacity <= 0 { + return nil, ErrIllegalCapacity + } + + return &Builder[K, V]{ + baseOptions: baseOptions[K, V]{ + capacity: capacity, + initialCapacity: unsetCapacity, + statsEnabled: false, + costFunc: func(key K, value V) uint32 { + return 1 + }, + }, + }, nil +} + +// CollectStats determines whether statistics should be calculated when the cache is running. +// +// By default, statistics calculating is disabled. +func (b *Builder[K, V]) CollectStats() *Builder[K, V] { + b.collectStats() + return b +} + +// InitialCapacity sets the minimum total size for the internal data structures. Providing a large enough estimate +// at construction time avoids the need for expensive resizing operations later, but setting this +// value unnecessarily high wastes memory. +func (b *Builder[K, V]) InitialCapacity(initialCapacity int) *Builder[K, V] { + b.setInitialCapacity(initialCapacity) + return b +} + +// Cost sets a function to dynamically calculate the cost of an item. +// +// By default, this function always returns 1. +func (b *Builder[K, V]) Cost(costFunc func(key K, value V) uint32) *Builder[K, V] { + b.setCostFunc(costFunc) + return b +} + +// DeletionListener specifies a listener instance that caches should notify each time an entry is deleted for any +// DeletionCause cause. The cache will invoke this listener in the background goroutine +// after the entry's deletion operation has completed. +func (b *Builder[K, V]) DeletionListener(deletionListener func(key K, value V, cause DeletionCause)) *Builder[K, V] { + b.setDeletionListener(deletionListener) + return b +} + +// WithTTL specifies that each item should be automatically removed from the cache once a fixed duration +// has elapsed after the item's creation. +func (b *Builder[K, V]) WithTTL(ttl time.Duration) *ConstTTLBuilder[K, V] { + return &ConstTTLBuilder[K, V]{ + constTTLOptions[K, V]{ + baseOptions: b.baseOptions, + ttl: ttl, + }, + } +} + +// WithVariableTTL specifies that each item should be automatically removed from the cache once a duration has +// elapsed after the item's creation. Items are expired based on the custom ttl specified for each item separately. +// +// You should prefer WithTTL to this option whenever possible. +func (b *Builder[K, V]) WithVariableTTL() *VariableTTLBuilder[K, V] { + return &VariableTTLBuilder[K, V]{ + variableTTLOptions[K, V]{ + baseOptions: b.baseOptions, + }, + } +} + +// Build creates a configured cache or +// returns an error if invalid parameters were passed to the builder. +func (b *Builder[K, V]) Build() (Cache[K, V], error) { + if err := b.validate(); err != nil { + return Cache[K, V]{}, err + } + + return newCache(b.toConfig()), nil +} + +// ConstTTLBuilder is a one-shot builder for creating a cache instance. +type ConstTTLBuilder[K comparable, V any] struct { + constTTLOptions[K, V] +} + +// CollectStats determines whether statistics should be calculated when the cache is running. +// +// By default, statistics calculating is disabled. +func (b *ConstTTLBuilder[K, V]) CollectStats() *ConstTTLBuilder[K, V] { + b.collectStats() + return b +} + +// InitialCapacity sets the minimum total size for the internal data structures. Providing a large enough estimate +// at construction time avoids the need for expensive resizing operations later, but setting this +// value unnecessarily high wastes memory. +func (b *ConstTTLBuilder[K, V]) InitialCapacity(initialCapacity int) *ConstTTLBuilder[K, V] { + b.setInitialCapacity(initialCapacity) + return b +} + +// Cost sets a function to dynamically calculate the cost of an item. +// +// By default, this function always returns 1. +func (b *ConstTTLBuilder[K, V]) Cost(costFunc func(key K, value V) uint32) *ConstTTLBuilder[K, V] { + b.setCostFunc(costFunc) + return b +} + +// DeletionListener specifies a listener instance that caches should notify each time an entry is deleted for any +// DeletionCause cause. The cache will invoke this listener in the background goroutine +// after the entry's deletion operation has completed. +func (b *ConstTTLBuilder[K, V]) DeletionListener(deletionListener func(key K, value V, cause DeletionCause)) *ConstTTLBuilder[K, V] { + b.setDeletionListener(deletionListener) + return b +} + +// Build creates a configured cache or +// returns an error if invalid parameters were passed to the builder. +func (b *ConstTTLBuilder[K, V]) Build() (Cache[K, V], error) { + if err := b.validate(); err != nil { + return Cache[K, V]{}, err + } + + return newCache(b.toConfig()), nil +} + +// VariableTTLBuilder is a one-shot builder for creating a cache instance. +type VariableTTLBuilder[K comparable, V any] struct { + variableTTLOptions[K, V] +} + +// CollectStats determines whether statistics should be calculated when the cache is running. +// +// By default, statistics calculating is disabled. +func (b *VariableTTLBuilder[K, V]) CollectStats() *VariableTTLBuilder[K, V] { + b.collectStats() + return b +} + +// InitialCapacity sets the minimum total size for the internal data structures. Providing a large enough estimate +// at construction time avoids the need for expensive resizing operations later, but setting this +// value unnecessarily high wastes memory. +func (b *VariableTTLBuilder[K, V]) InitialCapacity(initialCapacity int) *VariableTTLBuilder[K, V] { + b.setInitialCapacity(initialCapacity) + return b +} + +// Cost sets a function to dynamically calculate the cost of an item. +// +// By default, this function always returns 1. +func (b *VariableTTLBuilder[K, V]) Cost(costFunc func(key K, value V) uint32) *VariableTTLBuilder[K, V] { + b.setCostFunc(costFunc) + return b +} + +// DeletionListener specifies a listener instance that caches should notify each time an entry is deleted for any +// DeletionCause cause. The cache will invoke this listener in the background goroutine +// after the entry's deletion operation has completed. +func (b *VariableTTLBuilder[K, V]) DeletionListener(deletionListener func(key K, value V, cause DeletionCause)) *VariableTTLBuilder[K, V] { + b.setDeletionListener(deletionListener) + return b +} + +// Build creates a configured cache or +// returns an error if invalid parameters were passed to the builder. +func (b *VariableTTLBuilder[K, V]) Build() (CacheWithVariableTTL[K, V], error) { + if err := b.validate(); err != nil { + return CacheWithVariableTTL[K, V]{}, err + } + + return newCacheWithVariableTTL(b.toConfig()), nil +} diff --git a/vendor/github.com/maypok86/otter/cache.go b/vendor/github.com/maypok86/otter/cache.go new file mode 100644 index 00000000..bedbb0e5 --- /dev/null +++ b/vendor/github.com/maypok86/otter/cache.go @@ -0,0 +1,165 @@ +// Copyright (c) 2024 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otter + +import ( + "time" + + "github.com/maypok86/otter/internal/core" +) + +// DeletionCause the cause why a cached entry was deleted. +type DeletionCause = core.DeletionCause + +const ( + // Explicit the entry was manually deleted by the user. + Explicit = core.Explicit + // Replaced the entry itself was not actually deleted, but its value was replaced by the user. + Replaced = core.Replaced + // Size the entry was evicted due to size constraints. + Size = core.Size + // Expired the entry's expiration timestamp has passed. + Expired = core.Expired +) + +type baseCache[K comparable, V any] struct { + cache *core.Cache[K, V] +} + +func newBaseCache[K comparable, V any](c core.Config[K, V]) baseCache[K, V] { + return baseCache[K, V]{ + cache: core.NewCache(c), + } +} + +// Has checks if there is an entry with the given key in the cache. +func (bs baseCache[K, V]) Has(key K) bool { + return bs.cache.Has(key) +} + +// Get returns the value associated with the key in this cache. +func (bs baseCache[K, V]) Get(key K) (V, bool) { + return bs.cache.Get(key) +} + +// Delete removes the association for this key from the cache. +func (bs baseCache[K, V]) Delete(key K) { + bs.cache.Delete(key) +} + +// DeleteByFunc removes the association for this key from the cache when the given function returns true. +func (bs baseCache[K, V]) DeleteByFunc(f func(key K, value V) bool) { + bs.cache.DeleteByFunc(f) +} + +// Range iterates over all entries in the cache. +// +// Iteration stops early when the given function returns false. +func (bs baseCache[K, V]) Range(f func(key K, value V) bool) { + bs.cache.Range(f) +} + +// Clear clears the hash table, all policies, buffers, etc. +// +// NOTE: this operation must be performed when no requests are made to the cache otherwise the behavior is undefined. +func (bs baseCache[K, V]) Clear() { + bs.cache.Clear() +} + +// Close clears the hash table, all policies, buffers, etc and stop all goroutines. +// +// NOTE: this operation must be performed when no requests are made to the cache otherwise the behavior is undefined. +func (bs baseCache[K, V]) Close() { + bs.cache.Close() +} + +// Size returns the current number of entries in the cache. +func (bs baseCache[K, V]) Size() int { + return bs.cache.Size() +} + +// Capacity returns the cache capacity. +func (bs baseCache[K, V]) Capacity() int { + return bs.cache.Capacity() +} + +// Stats returns a current snapshot of this cache's cumulative statistics. +func (bs baseCache[K, V]) Stats() Stats { + return newStats(bs.cache.Stats()) +} + +// Extension returns access to inspect and perform low-level operations on this cache based on its runtime +// characteristics. These operations are optional and dependent on how the cache was constructed +// and what abilities the implementation exposes. +func (bs baseCache[K, V]) Extension() Extension[K, V] { + return newExtension(bs.cache) +} + +// Cache is a structure performs a best-effort bounding of a hash table using eviction algorithm +// to determine which entries to evict when the capacity is exceeded. +type Cache[K comparable, V any] struct { + baseCache[K, V] +} + +func newCache[K comparable, V any](c core.Config[K, V]) Cache[K, V] { + return Cache[K, V]{ + baseCache: newBaseCache(c), + } +} + +// Set associates the value with the key in this cache. +// +// If it returns false, then the key-value pair had too much cost and the Set was dropped. +func (c Cache[K, V]) Set(key K, value V) bool { + return c.cache.Set(key, value) +} + +// SetIfAbsent if the specified key is not already associated with a value associates it with the given value. +// +// If the specified key is not already associated with a value, then it returns false. +// +// Also, it returns false if the key-value pair had too much cost and the SetIfAbsent was dropped. +func (c Cache[K, V]) SetIfAbsent(key K, value V) bool { + return c.cache.SetIfAbsent(key, value) +} + +// CacheWithVariableTTL is a structure performs a best-effort bounding of a hash table using eviction algorithm +// to determine which entries to evict when the capacity is exceeded. +type CacheWithVariableTTL[K comparable, V any] struct { + baseCache[K, V] +} + +func newCacheWithVariableTTL[K comparable, V any](c core.Config[K, V]) CacheWithVariableTTL[K, V] { + return CacheWithVariableTTL[K, V]{ + baseCache: newBaseCache(c), + } +} + +// Set associates the value with the key in this cache and sets the custom ttl for this key-value pair. +// +// If it returns false, then the key-value pair had too much cost and the Set was dropped. +func (c CacheWithVariableTTL[K, V]) Set(key K, value V, ttl time.Duration) bool { + return c.cache.SetWithTTL(key, value, ttl) +} + +// SetIfAbsent if the specified key is not already associated with a value associates it with the given value +// and sets the custom ttl for this key-value pair. +// +// If the specified key is not already associated with a value, then it returns false. +// +// Also, it returns false if the key-value pair had too much cost and the SetIfAbsent was dropped. +func (c CacheWithVariableTTL[K, V]) SetIfAbsent(key K, value V, ttl time.Duration) bool { + return c.cache.SetIfAbsentWithTTL(key, value, ttl) +} diff --git a/vendor/github.com/maypok86/otter/entry.go b/vendor/github.com/maypok86/otter/entry.go new file mode 100644 index 00000000..5dcfaf02 --- /dev/null +++ b/vendor/github.com/maypok86/otter/entry.go @@ -0,0 +1,82 @@ +// Copyright (c) 2024 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otter + +import "time" + +// Entry is a key-value pair that may include policy metadata for the cached entry. +// +// It is an immutable snapshot of the cached data at the time of this entry's creation, and it will not +// reflect changes afterward. +type Entry[K comparable, V any] struct { + key K + value V + expiration int64 + cost uint32 +} + +// Key returns the entry's key. +func (e Entry[K, V]) Key() K { + return e.key +} + +// Value returns the entry's value. +func (e Entry[K, V]) Value() V { + return e.value +} + +// Expiration returns the entry's expiration time as a unix time, +// the number of seconds elapsed since January 1, 1970 UTC. +// +// If the cache was not configured with an expiration policy then this value is always 0. +func (e Entry[K, V]) Expiration() int64 { + return e.expiration +} + +// TTL returns the entry's ttl. +// +// If the cache was not configured with an expiration policy then this value is always -1. +// +// If the entry is expired then this value is always 0. +func (e Entry[K, V]) TTL() time.Duration { + expiration := e.Expiration() + if expiration == 0 { + return -1 + } + + now := time.Now().Unix() + if expiration <= now { + return 0 + } + + return time.Duration(expiration-now) * time.Second +} + +// HasExpired returns true if the entry has expired. +func (e Entry[K, V]) HasExpired() bool { + expiration := e.Expiration() + if expiration == 0 { + return false + } + + return expiration <= time.Now().Unix() +} + +// Cost returns the entry's cost. +// +// If the cache was not configured with a cost then this value is always 1. +func (e Entry[K, V]) Cost() uint32 { + return e.cost +} diff --git a/vendor/github.com/maypok86/otter/extension.go b/vendor/github.com/maypok86/otter/extension.go new file mode 100644 index 00000000..83a511b5 --- /dev/null +++ b/vendor/github.com/maypok86/otter/extension.go @@ -0,0 +1,89 @@ +// Copyright (c) 2024 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otter + +import ( + "github.com/maypok86/otter/internal/core" + "github.com/maypok86/otter/internal/generated/node" + "github.com/maypok86/otter/internal/unixtime" +) + +func zeroValue[V any]() V { + var zero V + return zero +} + +// Extension is an access point for inspecting and performing low-level operations based on the cache's runtime +// characteristics. These operations are optional and dependent on how the cache was constructed +// and what abilities the implementation exposes. +type Extension[K comparable, V any] struct { + cache *core.Cache[K, V] +} + +func newExtension[K comparable, V any](cache *core.Cache[K, V]) Extension[K, V] { + return Extension[K, V]{ + cache: cache, + } +} + +func (e Extension[K, V]) createEntry(n node.Node[K, V]) Entry[K, V] { + var expiration int64 + if e.cache.WithExpiration() { + expiration = unixtime.StartTime() + int64(n.Expiration()) + } + + return Entry[K, V]{ + key: n.Key(), + value: n.Value(), + expiration: expiration, + cost: n.Cost(), + } +} + +// GetQuietly returns the value associated with the key in this cache. +// +// Unlike Get in the cache, this function does not produce any side effects +// such as updating statistics or the eviction policy. +func (e Extension[K, V]) GetQuietly(key K) (V, bool) { + n, ok := e.cache.GetNodeQuietly(key) + if !ok { + return zeroValue[V](), false + } + + return n.Value(), true +} + +// GetEntry returns the cache entry associated with the key in this cache. +func (e Extension[K, V]) GetEntry(key K) (Entry[K, V], bool) { + n, ok := e.cache.GetNode(key) + if !ok { + return Entry[K, V]{}, false + } + + return e.createEntry(n), true +} + +// GetEntryQuietly returns the cache entry associated with the key in this cache. +// +// Unlike GetEntry, this function does not produce any side effects +// such as updating statistics or the eviction policy. +func (e Extension[K, V]) GetEntryQuietly(key K) (Entry[K, V], bool) { + n, ok := e.cache.GetNodeQuietly(key) + if !ok { + return Entry[K, V]{}, false + } + + return e.createEntry(n), true +} diff --git a/vendor/github.com/maypok86/otter/internal/core/cache.go b/vendor/github.com/maypok86/otter/internal/core/cache.go new file mode 100644 index 00000000..761a3abb --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/core/cache.go @@ -0,0 +1,533 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package core + +import ( + "sync" + "time" + + "github.com/maypok86/otter/internal/expiry" + "github.com/maypok86/otter/internal/generated/node" + "github.com/maypok86/otter/internal/hashtable" + "github.com/maypok86/otter/internal/lossy" + "github.com/maypok86/otter/internal/queue" + "github.com/maypok86/otter/internal/s3fifo" + "github.com/maypok86/otter/internal/stats" + "github.com/maypok86/otter/internal/unixtime" + "github.com/maypok86/otter/internal/xmath" + "github.com/maypok86/otter/internal/xruntime" +) + +// DeletionCause the cause why a cached entry was deleted. +type DeletionCause uint8 + +const ( + // Explicit the entry was manually deleted by the user. + Explicit DeletionCause = iota + // Replaced the entry itself was not actually deleted, but its value was replaced by the user. + Replaced + // Size the entry was evicted due to size constraints. + Size + // Expired the entry's expiration timestamp has passed. + Expired +) + +func (dc DeletionCause) String() string { + switch dc { + case Explicit: + return "Explicit" + case Replaced: + return "Replaced" + case Size: + return "Size" + case Expired: + return "Expired" + default: + panic("unknown deletion cause") + } +} + +const ( + minWriteBufferSize uint32 = 4 +) + +var ( + maxWriteBufferSize uint32 + maxStripedBufferSize int +) + +func init() { + parallelism := xruntime.Parallelism() + roundedParallelism := int(xmath.RoundUpPowerOf2(parallelism)) + //nolint:gosec // there will never be an overflow + maxWriteBufferSize = uint32(128 * roundedParallelism) + maxStripedBufferSize = 4 * roundedParallelism +} + +func zeroValue[V any]() V { + var zero V + return zero +} + +func getTTL(ttl time.Duration) uint32 { + //nolint:gosec // there will never be an overflow + return uint32((ttl + time.Second - 1) / time.Second) +} + +func getExpiration(ttl time.Duration) uint32 { + return unixtime.Now() + getTTL(ttl) +} + +// Config is a set of cache settings. +type Config[K comparable, V any] struct { + Capacity int + InitialCapacity *int + StatsEnabled bool + TTL *time.Duration + WithVariableTTL bool + CostFunc func(key K, value V) uint32 + WithCost bool + DeletionListener func(key K, value V, cause DeletionCause) +} + +type expiryPolicy[K comparable, V any] interface { + Add(n node.Node[K, V]) + Delete(n node.Node[K, V]) + DeleteExpired() + Clear() +} + +// Cache is a structure performs a best-effort bounding of a hash table using eviction algorithm +// to determine which entries to evict when the capacity is exceeded. +type Cache[K comparable, V any] struct { + nodeManager *node.Manager[K, V] + hashmap *hashtable.Map[K, V] + policy *s3fifo.Policy[K, V] + expiryPolicy expiryPolicy[K, V] + stats *stats.Stats + stripedBuffer []*lossy.Buffer[K, V] + writeBuffer *queue.Growable[task[K, V]] + evictionMutex sync.Mutex + closeOnce sync.Once + doneClear chan struct{} + costFunc func(key K, value V) uint32 + deletionListener func(key K, value V, cause DeletionCause) + capacity int + mask uint32 + ttl uint32 + withExpiration bool + isClosed bool +} + +// NewCache returns a new cache instance based on the settings from Config. +func NewCache[K comparable, V any](c Config[K, V]) *Cache[K, V] { + nodeManager := node.NewManager[K, V](node.Config{ + WithExpiration: c.TTL != nil || c.WithVariableTTL, + WithCost: c.WithCost, + }) + + stripedBuffer := make([]*lossy.Buffer[K, V], 0, maxStripedBufferSize) + for i := 0; i < maxStripedBufferSize; i++ { + stripedBuffer = append(stripedBuffer, lossy.New[K, V](nodeManager)) + } + + var hashmap *hashtable.Map[K, V] + if c.InitialCapacity == nil { + hashmap = hashtable.New[K, V](nodeManager) + } else { + hashmap = hashtable.NewWithSize[K, V](nodeManager, *c.InitialCapacity) + } + + cache := &Cache[K, V]{ + nodeManager: nodeManager, + hashmap: hashmap, + stripedBuffer: stripedBuffer, + writeBuffer: queue.NewGrowable[task[K, V]](minWriteBufferSize, maxWriteBufferSize), + doneClear: make(chan struct{}), + //nolint:gosec // there will never be an overflow + mask: uint32(maxStripedBufferSize - 1), + costFunc: c.CostFunc, + deletionListener: c.DeletionListener, + capacity: c.Capacity, + } + + cache.policy = s3fifo.NewPolicy(c.Capacity, cache.evictNode) + + switch { + case c.TTL != nil: + cache.expiryPolicy = expiry.NewFixed[K, V](cache.deleteExpiredNode) + case c.WithVariableTTL: + cache.expiryPolicy = expiry.NewVariable[K, V](nodeManager, cache.deleteExpiredNode) + default: + cache.expiryPolicy = expiry.NewDisabled[K, V]() + } + + if c.StatsEnabled { + cache.stats = stats.New() + } + if c.TTL != nil { + cache.ttl = getTTL(*c.TTL) + } + + cache.withExpiration = c.TTL != nil || c.WithVariableTTL + + if cache.withExpiration { + unixtime.Start() + go cache.cleanup() + } + + go cache.process() + + return cache +} + +func (c *Cache[K, V]) getReadBufferIdx() int { + return int(xruntime.Fastrand() & c.mask) +} + +// Has checks if there is an item with the given key in the cache. +func (c *Cache[K, V]) Has(key K) bool { + _, ok := c.Get(key) + return ok +} + +// Get returns the value associated with the key in this cache. +func (c *Cache[K, V]) Get(key K) (V, bool) { + n, ok := c.GetNode(key) + if !ok { + return zeroValue[V](), false + } + + return n.Value(), true +} + +// GetNode returns the node associated with the key in this cache. +func (c *Cache[K, V]) GetNode(key K) (node.Node[K, V], bool) { + n, ok := c.hashmap.Get(key) + if !ok || !n.IsAlive() { + c.stats.IncMisses() + return nil, false + } + + if n.HasExpired() { + // avoid duplicate push + deleted := c.hashmap.DeleteNode(n) + if deleted != nil { + n.Die() + c.writeBuffer.Push(newExpiredTask(n)) + } + c.stats.IncMisses() + return nil, false + } + + c.afterGet(n) + c.stats.IncHits() + + return n, true +} + +// GetNodeQuietly returns the node associated with the key in this cache. +// +// Unlike GetNode, this function does not produce any side effects +// such as updating statistics or the eviction policy. +func (c *Cache[K, V]) GetNodeQuietly(key K) (node.Node[K, V], bool) { + n, ok := c.hashmap.Get(key) + if !ok || !n.IsAlive() || n.HasExpired() { + return nil, false + } + + return n, true +} + +func (c *Cache[K, V]) afterGet(got node.Node[K, V]) { + idx := c.getReadBufferIdx() + pb := c.stripedBuffer[idx].Add(got) + if pb != nil { + c.evictionMutex.Lock() + c.policy.Read(pb.Returned) + c.evictionMutex.Unlock() + + c.stripedBuffer[idx].Free() + } +} + +// Set associates the value with the key in this cache. +// +// If it returns false, then the key-value item had too much cost and the Set was dropped. +func (c *Cache[K, V]) Set(key K, value V) bool { + return c.set(key, value, c.defaultExpiration(), false) +} + +func (c *Cache[K, V]) defaultExpiration() uint32 { + if c.ttl == 0 { + return 0 + } + + return unixtime.Now() + c.ttl +} + +// SetWithTTL associates the value with the key in this cache and sets the custom ttl for this key-value item. +// +// If it returns false, then the key-value item had too much cost and the SetWithTTL was dropped. +func (c *Cache[K, V]) SetWithTTL(key K, value V, ttl time.Duration) bool { + return c.set(key, value, getExpiration(ttl), false) +} + +// SetIfAbsent if the specified key is not already associated with a value associates it with the given value. +// +// If the specified key is not already associated with a value, then it returns false. +// +// Also, it returns false if the key-value item had too much cost and the SetIfAbsent was dropped. +func (c *Cache[K, V]) SetIfAbsent(key K, value V) bool { + return c.set(key, value, c.defaultExpiration(), true) +} + +// SetIfAbsentWithTTL if the specified key is not already associated with a value associates it with the given value +// and sets the custom ttl for this key-value item. +// +// If the specified key is not already associated with a value, then it returns false. +// +// Also, it returns false if the key-value item had too much cost and the SetIfAbsent was dropped. +func (c *Cache[K, V]) SetIfAbsentWithTTL(key K, value V, ttl time.Duration) bool { + return c.set(key, value, getExpiration(ttl), true) +} + +func (c *Cache[K, V]) set(key K, value V, expiration uint32, onlyIfAbsent bool) bool { + cost := c.costFunc(key, value) + if int(cost) > c.policy.MaxAvailableCost() { + c.stats.IncRejectedSets() + return false + } + + n := c.nodeManager.Create(key, value, expiration, cost) + if onlyIfAbsent { + res := c.hashmap.SetIfAbsent(n) + if res == nil { + // insert + c.writeBuffer.Push(newAddTask(n)) + return true + } + c.stats.IncRejectedSets() + return false + } + + evicted := c.hashmap.Set(n) + if evicted != nil { + // update + evicted.Die() + c.writeBuffer.Push(newUpdateTask(n, evicted)) + } else { + // insert + c.writeBuffer.Push(newAddTask(n)) + } + + return true +} + +// Delete deletes the association for this key from the cache. +func (c *Cache[K, V]) Delete(key K) { + c.afterDelete(c.hashmap.Delete(key)) +} + +func (c *Cache[K, V]) deleteNode(n node.Node[K, V]) { + c.afterDelete(c.hashmap.DeleteNode(n)) +} + +func (c *Cache[K, V]) afterDelete(deleted node.Node[K, V]) { + if deleted != nil { + deleted.Die() + c.writeBuffer.Push(newDeleteTask(deleted)) + } +} + +// DeleteByFunc deletes the association for this key from the cache when the given function returns true. +func (c *Cache[K, V]) DeleteByFunc(f func(key K, value V) bool) { + c.hashmap.Range(func(n node.Node[K, V]) bool { + if !n.IsAlive() || n.HasExpired() { + return true + } + + if f(n.Key(), n.Value()) { + c.deleteNode(n) + } + + return true + }) +} + +func (c *Cache[K, V]) notifyDeletion(key K, value V, cause DeletionCause) { + if c.deletionListener == nil { + return + } + + c.deletionListener(key, value, cause) +} + +func (c *Cache[K, V]) deleteExpiredNode(n node.Node[K, V]) { + c.policy.Delete(n) + deleted := c.hashmap.DeleteNode(n) + if deleted != nil { + n.Die() + c.notifyDeletion(n.Key(), n.Value(), Expired) + c.stats.IncEvictedCount() + c.stats.AddEvictedCost(n.Cost()) + } +} + +func (c *Cache[K, V]) cleanup() { + for { + time.Sleep(time.Second) + + c.evictionMutex.Lock() + if c.isClosed { + c.evictionMutex.Unlock() + return + } + + c.expiryPolicy.DeleteExpired() + + c.evictionMutex.Unlock() + } +} + +func (c *Cache[K, V]) evictNode(n node.Node[K, V]) { + c.expiryPolicy.Delete(n) + deleted := c.hashmap.DeleteNode(n) + if deleted != nil { + n.Die() + c.notifyDeletion(n.Key(), n.Value(), Size) + c.stats.IncEvictedCount() + c.stats.AddEvictedCost(n.Cost()) + } +} + +func (c *Cache[K, V]) onWrite(t task[K, V]) { + if t.isClear() || t.isClose() { + c.writeBuffer.Clear() + + c.policy.Clear() + c.expiryPolicy.Clear() + if t.isClose() { + c.isClosed = true + } + + c.doneClear <- struct{}{} + return + } + + n := t.node() + switch { + case t.isAdd(): + if n.IsAlive() { + c.expiryPolicy.Add(n) + c.policy.Add(n) + } + case t.isUpdate(): + oldNode := t.oldNode() + c.expiryPolicy.Delete(oldNode) + c.policy.Delete(oldNode) + if n.IsAlive() { + c.expiryPolicy.Add(n) + c.policy.Add(n) + } + c.notifyDeletion(oldNode.Key(), oldNode.Value(), Replaced) + case t.isDelete(): + c.expiryPolicy.Delete(n) + c.policy.Delete(n) + c.notifyDeletion(n.Key(), n.Value(), Explicit) + case t.isExpired(): + c.expiryPolicy.Delete(n) + c.policy.Delete(n) + c.notifyDeletion(n.Key(), n.Value(), Expired) + } +} + +func (c *Cache[K, V]) process() { + for { + t := c.writeBuffer.Pop() + + c.evictionMutex.Lock() + c.onWrite(t) + c.evictionMutex.Unlock() + + if t.isClose() { + break + } + } +} + +// Range iterates over all items in the cache. +// +// Iteration stops early when the given function returns false. +func (c *Cache[K, V]) Range(f func(key K, value V) bool) { + c.hashmap.Range(func(n node.Node[K, V]) bool { + if !n.IsAlive() || n.HasExpired() { + return true + } + + return f(n.Key(), n.Value()) + }) +} + +// Clear clears the hash table, all policies, buffers, etc. +// +// NOTE: this operation must be performed when no requests are made to the cache otherwise the behavior is undefined. +func (c *Cache[K, V]) Clear() { + c.clear(newClearTask[K, V]()) +} + +func (c *Cache[K, V]) clear(t task[K, V]) { + c.hashmap.Clear() + for i := 0; i < len(c.stripedBuffer); i++ { + c.stripedBuffer[i].Clear() + } + + c.writeBuffer.Push(t) + <-c.doneClear + + c.stats.Clear() +} + +// Close clears the hash table, all policies, buffers, etc and stop all goroutines. +// +// NOTE: this operation must be performed when no requests are made to the cache otherwise the behavior is undefined. +func (c *Cache[K, V]) Close() { + c.closeOnce.Do(func() { + c.clear(newCloseTask[K, V]()) + if c.withExpiration { + unixtime.Stop() + } + }) +} + +// Size returns the current number of items in the cache. +func (c *Cache[K, V]) Size() int { + return c.hashmap.Size() +} + +// Capacity returns the cache capacity. +func (c *Cache[K, V]) Capacity() int { + return c.capacity +} + +// Stats returns a current snapshot of this cache's cumulative statistics. +func (c *Cache[K, V]) Stats() *stats.Stats { + return c.stats +} + +// WithExpiration returns true if the cache was configured with the expiration policy enabled. +func (c *Cache[K, V]) WithExpiration() bool { + return c.withExpiration +} diff --git a/vendor/github.com/maypok86/otter/internal/core/task.go b/vendor/github.com/maypok86/otter/internal/core/task.go new file mode 100644 index 00000000..2455708b --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/core/task.go @@ -0,0 +1,126 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package core + +import ( + "github.com/maypok86/otter/internal/generated/node" +) + +// reason represents the reason for writing the item to the cache. +type reason uint8 + +const ( + addReason reason = iota + 1 + deleteReason + updateReason + clearReason + closeReason + expiredReason +) + +// task is a set of information to update the cache: +// node, reason for write, difference after node cost change, etc. +type task[K comparable, V any] struct { + n node.Node[K, V] + old node.Node[K, V] + writeReason reason +} + +// newAddTask creates a task to add a node to policies. +func newAddTask[K comparable, V any](n node.Node[K, V]) task[K, V] { + return task[K, V]{ + n: n, + writeReason: addReason, + } +} + +// newDeleteTask creates a task to delete a node from policies. +func newDeleteTask[K comparable, V any](n node.Node[K, V]) task[K, V] { + return task[K, V]{ + n: n, + writeReason: deleteReason, + } +} + +// newExpireTask creates a task to delete a expired node from policies. +func newExpiredTask[K comparable, V any](n node.Node[K, V]) task[K, V] { + return task[K, V]{ + n: n, + writeReason: expiredReason, + } +} + +// newUpdateTask creates a task to update the node in the policies. +func newUpdateTask[K comparable, V any](n, oldNode node.Node[K, V]) task[K, V] { + return task[K, V]{ + n: n, + old: oldNode, + writeReason: updateReason, + } +} + +// newClearTask creates a task to clear policies. +func newClearTask[K comparable, V any]() task[K, V] { + return task[K, V]{ + writeReason: clearReason, + } +} + +// newCloseTask creates a task to clear policies and stop all goroutines. +func newCloseTask[K comparable, V any]() task[K, V] { + return task[K, V]{ + writeReason: closeReason, + } +} + +// node returns the node contained in the task. If node was not specified, it returns nil. +func (t *task[K, V]) node() node.Node[K, V] { + return t.n +} + +// oldNode returns the old node contained in the task. If old node was not specified, it returns nil. +func (t *task[K, V]) oldNode() node.Node[K, V] { + return t.old +} + +// isAdd returns true if this is an add task. +func (t *task[K, V]) isAdd() bool { + return t.writeReason == addReason +} + +// isDelete returns true if this is a delete task. +func (t *task[K, V]) isDelete() bool { + return t.writeReason == deleteReason +} + +// isExpired returns true if this is an expired task. +func (t *task[K, V]) isExpired() bool { + return t.writeReason == expiredReason +} + +// isUpdate returns true if this is an update task. +func (t *task[K, V]) isUpdate() bool { + return t.writeReason == updateReason +} + +// isClear returns true if this is a clear task. +func (t *task[K, V]) isClear() bool { + return t.writeReason == clearReason +} + +// isClose returns true if this is a close task. +func (t *task[K, V]) isClose() bool { + return t.writeReason == closeReason +} diff --git a/vendor/github.com/maypok86/otter/internal/expiry/disabled.go b/vendor/github.com/maypok86/otter/internal/expiry/disabled.go new file mode 100644 index 00000000..e75494ac --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/expiry/disabled.go @@ -0,0 +1,35 @@ +// Copyright (c) 2024 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expiry + +import "github.com/maypok86/otter/internal/generated/node" + +type Disabled[K comparable, V any] struct{} + +func NewDisabled[K comparable, V any]() *Disabled[K, V] { + return &Disabled[K, V]{} +} + +func (d *Disabled[K, V]) Add(n node.Node[K, V]) { +} + +func (d *Disabled[K, V]) Delete(n node.Node[K, V]) { +} + +func (d *Disabled[K, V]) DeleteExpired() { +} + +func (d *Disabled[K, V]) Clear() { +} diff --git a/vendor/github.com/maypok86/otter/internal/expiry/fixed.go b/vendor/github.com/maypok86/otter/internal/expiry/fixed.go new file mode 100644 index 00000000..35792aa0 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/expiry/fixed.go @@ -0,0 +1,47 @@ +// Copyright (c) 2024 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expiry + +import "github.com/maypok86/otter/internal/generated/node" + +type Fixed[K comparable, V any] struct { + q *queue[K, V] + deleteNode func(node.Node[K, V]) +} + +func NewFixed[K comparable, V any](deleteNode func(node.Node[K, V])) *Fixed[K, V] { + return &Fixed[K, V]{ + q: newQueue[K, V](), + deleteNode: deleteNode, + } +} + +func (f *Fixed[K, V]) Add(n node.Node[K, V]) { + f.q.push(n) +} + +func (f *Fixed[K, V]) Delete(n node.Node[K, V]) { + f.q.delete(n) +} + +func (f *Fixed[K, V]) DeleteExpired() { + for !f.q.isEmpty() && f.q.head.HasExpired() { + f.deleteNode(f.q.pop()) + } +} + +func (f *Fixed[K, V]) Clear() { + f.q.clear() +} diff --git a/vendor/github.com/maypok86/otter/internal/expiry/queue.go b/vendor/github.com/maypok86/otter/internal/expiry/queue.go new file mode 100644 index 00000000..ce4bdf13 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/expiry/queue.go @@ -0,0 +1,89 @@ +// Copyright (c) 2024 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expiry + +import "github.com/maypok86/otter/internal/generated/node" + +type queue[K comparable, V any] struct { + head node.Node[K, V] + tail node.Node[K, V] + len int +} + +func newQueue[K comparable, V any]() *queue[K, V] { + return &queue[K, V]{} +} + +func (q *queue[K, V]) length() int { + return q.len +} + +func (q *queue[K, V]) isEmpty() bool { + return q.length() == 0 +} + +func (q *queue[K, V]) push(n node.Node[K, V]) { + if q.isEmpty() { + q.head = n + q.tail = n + } else { + n.SetPrevExp(q.tail) + q.tail.SetNextExp(n) + q.tail = n + } + + q.len++ +} + +func (q *queue[K, V]) pop() node.Node[K, V] { + if q.isEmpty() { + return nil + } + + result := q.head + q.delete(result) + return result +} + +func (q *queue[K, V]) delete(n node.Node[K, V]) { + next := n.NextExp() + prev := n.PrevExp() + + if node.Equals(prev, nil) { + if node.Equals(next, nil) && !node.Equals(q.head, n) { + return + } + + q.head = next + } else { + prev.SetNextExp(next) + n.SetPrevExp(nil) + } + + if node.Equals(next, nil) { + q.tail = prev + } else { + next.SetPrevExp(prev) + n.SetNextExp(nil) + } + + q.len-- +} + +func (q *queue[K, V]) clear() { + for !q.isEmpty() { + q.pop() + } +} diff --git a/vendor/github.com/maypok86/otter/internal/expiry/variable.go b/vendor/github.com/maypok86/otter/internal/expiry/variable.go new file mode 100644 index 00000000..cecf3f12 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/expiry/variable.go @@ -0,0 +1,181 @@ +// Copyright (c) 2024 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expiry + +import ( + "math" + "math/bits" + "time" + + "github.com/maypok86/otter/internal/generated/node" + "github.com/maypok86/otter/internal/unixtime" + "github.com/maypok86/otter/internal/xmath" +) + +var ( + buckets = []uint32{64, 64, 32, 4, 1} + spans = []uint32{ + xmath.RoundUpPowerOf2(uint32((1 * time.Second).Seconds())), // 1s + xmath.RoundUpPowerOf2(uint32((1 * time.Minute).Seconds())), // 1.07m + xmath.RoundUpPowerOf2(uint32((1 * time.Hour).Seconds())), // 1.13h + xmath.RoundUpPowerOf2(uint32((24 * time.Hour).Seconds())), // 1.52d + buckets[3] * xmath.RoundUpPowerOf2(uint32((24 * time.Hour).Seconds())), // 6.07d + buckets[3] * xmath.RoundUpPowerOf2(uint32((24 * time.Hour).Seconds())), // 6.07d + } + shift = []uint32{ + uint32(bits.TrailingZeros32(spans[0])), + uint32(bits.TrailingZeros32(spans[1])), + uint32(bits.TrailingZeros32(spans[2])), + uint32(bits.TrailingZeros32(spans[3])), + uint32(bits.TrailingZeros32(spans[4])), + } +) + +type Variable[K comparable, V any] struct { + wheel [][]node.Node[K, V] + time uint32 + deleteNode func(node.Node[K, V]) +} + +func NewVariable[K comparable, V any](nodeManager *node.Manager[K, V], deleteNode func(node.Node[K, V])) *Variable[K, V] { + wheel := make([][]node.Node[K, V], len(buckets)) + for i := 0; i < len(wheel); i++ { + wheel[i] = make([]node.Node[K, V], buckets[i]) + for j := 0; j < len(wheel[i]); j++ { + var k K + var v V + fn := nodeManager.Create(k, v, math.MaxUint32, 1) + fn.SetPrevExp(fn) + fn.SetNextExp(fn) + wheel[i][j] = fn + } + } + return &Variable[K, V]{ + wheel: wheel, + deleteNode: deleteNode, + } +} + +// findBucket determines the bucket that the timer event should be added to. +func (v *Variable[K, V]) findBucket(expiration uint32) node.Node[K, V] { + duration := expiration - v.time + length := len(v.wheel) - 1 + for i := 0; i < length; i++ { + if duration < spans[i+1] { + ticks := expiration >> shift[i] + index := ticks & (buckets[i] - 1) + return v.wheel[i][index] + } + } + return v.wheel[length][0] +} + +// Add schedules a timer event for the node. +func (v *Variable[K, V]) Add(n node.Node[K, V]) { + root := v.findBucket(n.Expiration()) + link(root, n) +} + +// Delete removes a timer event for this entry if present. +func (v *Variable[K, V]) Delete(n node.Node[K, V]) { + unlink(n) + n.SetNextExp(nil) + n.SetPrevExp(nil) +} + +func (v *Variable[K, V]) DeleteExpired() { + currentTime := unixtime.Now() + prevTime := v.time + v.time = currentTime + + for i := 0; i < len(shift); i++ { + previousTicks := prevTime >> shift[i] + currentTicks := currentTime >> shift[i] + delta := currentTicks - previousTicks + if delta == 0 { + break + } + + v.deleteExpiredFromBucket(i, previousTicks, delta) + } +} + +func (v *Variable[K, V]) deleteExpiredFromBucket(index int, prevTicks, delta uint32) { + mask := buckets[index] - 1 + steps := buckets[index] + if delta < steps { + steps = delta + } + start := prevTicks & mask + end := start + steps + timerWheel := v.wheel[index] + for i := start; i < end; i++ { + root := timerWheel[i&mask] + n := root.NextExp() + root.SetPrevExp(root) + root.SetNextExp(root) + + for !node.Equals(n, root) { + next := n.NextExp() + n.SetPrevExp(nil) + n.SetNextExp(nil) + + if n.Expiration() <= v.time { + v.deleteNode(n) + } else { + v.Add(n) + } + + n = next + } + } +} + +func (v *Variable[K, V]) Clear() { + for i := 0; i < len(v.wheel); i++ { + for j := 0; j < len(v.wheel[i]); j++ { + root := v.wheel[i][j] + n := root.NextExp() + // NOTE(maypok86): Maybe we should use the same approach as in DeleteExpired? + + for !node.Equals(n, root) { + next := n.NextExp() + v.Delete(n) + + n = next + } + } + } + v.time = unixtime.Now() +} + +// link adds the entry at the tail of the bucket's list. +func link[K comparable, V any](root, n node.Node[K, V]) { + n.SetPrevExp(root.PrevExp()) + n.SetNextExp(root) + + root.PrevExp().SetNextExp(n) + root.SetPrevExp(n) +} + +// unlink removes the entry from its bucket, if scheduled. +func unlink[K comparable, V any](n node.Node[K, V]) { + next := n.NextExp() + if !node.Equals(next, nil) { + prev := n.PrevExp() + next.SetPrevExp(prev) + prev.SetNextExp(next) + } +} diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/b.go b/vendor/github.com/maypok86/otter/internal/generated/node/b.go new file mode 100644 index 00000000..a10e484f --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/generated/node/b.go @@ -0,0 +1,144 @@ +// Code generated by NodeGenerator. DO NOT EDIT. + +// Package node is a generated generator package. +package node + +import ( + "sync/atomic" + "unsafe" +) + +// B is a cache entry that provide the following features: +// +// 1. Base +type B[K comparable, V any] struct { + key K + value V + prev *B[K, V] + next *B[K, V] + state uint32 + frequency uint8 + queueType uint8 +} + +// NewB creates a new B. +func NewB[K comparable, V any](key K, value V, expiration, cost uint32) Node[K, V] { + return &B[K, V]{ + key: key, + value: value, + state: aliveState, + } +} + +// CastPointerToB casts a pointer to B. +func CastPointerToB[K comparable, V any](ptr unsafe.Pointer) Node[K, V] { + return (*B[K, V])(ptr) +} + +func (n *B[K, V]) Key() K { + return n.key +} + +func (n *B[K, V]) Value() V { + return n.value +} + +func (n *B[K, V]) AsPointer() unsafe.Pointer { + return unsafe.Pointer(n) +} + +func (n *B[K, V]) Prev() Node[K, V] { + return n.prev +} + +func (n *B[K, V]) SetPrev(v Node[K, V]) { + if v == nil { + n.prev = nil + return + } + n.prev = (*B[K, V])(v.AsPointer()) +} + +func (n *B[K, V]) Next() Node[K, V] { + return n.next +} + +func (n *B[K, V]) SetNext(v Node[K, V]) { + if v == nil { + n.next = nil + return + } + n.next = (*B[K, V])(v.AsPointer()) +} + +func (n *B[K, V]) PrevExp() Node[K, V] { + panic("not implemented") +} + +func (n *B[K, V]) SetPrevExp(v Node[K, V]) { + panic("not implemented") +} + +func (n *B[K, V]) NextExp() Node[K, V] { + panic("not implemented") +} + +func (n *B[K, V]) SetNextExp(v Node[K, V]) { + panic("not implemented") +} + +func (n *B[K, V]) HasExpired() bool { + return false +} + +func (n *B[K, V]) Expiration() uint32 { + panic("not implemented") +} + +func (n *B[K, V]) Cost() uint32 { + return 1 +} + +func (n *B[K, V]) IsAlive() bool { + return atomic.LoadUint32(&n.state) == aliveState +} + +func (n *B[K, V]) Die() { + atomic.StoreUint32(&n.state, deadState) +} + +func (n *B[K, V]) Frequency() uint8 { + return n.frequency +} + +func (n *B[K, V]) IncrementFrequency() { + n.frequency = minUint8(n.frequency+1, maxFrequency) +} + +func (n *B[K, V]) DecrementFrequency() { + n.frequency-- +} + +func (n *B[K, V]) ResetFrequency() { + n.frequency = 0 +} + +func (n *B[K, V]) MarkSmall() { + n.queueType = smallQueueType +} + +func (n *B[K, V]) IsSmall() bool { + return n.queueType == smallQueueType +} + +func (n *B[K, V]) MarkMain() { + n.queueType = mainQueueType +} + +func (n *B[K, V]) IsMain() bool { + return n.queueType == mainQueueType +} + +func (n *B[K, V]) Unmark() { + n.queueType = unknownQueueType +} diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/bc.go b/vendor/github.com/maypok86/otter/internal/generated/node/bc.go new file mode 100644 index 00000000..962ecde0 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/generated/node/bc.go @@ -0,0 +1,148 @@ +// Code generated by NodeGenerator. DO NOT EDIT. + +// Package node is a generated generator package. +package node + +import ( + "sync/atomic" + "unsafe" +) + +// BC is a cache entry that provide the following features: +// +// 1. Base +// +// 2. Cost +type BC[K comparable, V any] struct { + key K + value V + prev *BC[K, V] + next *BC[K, V] + cost uint32 + state uint32 + frequency uint8 + queueType uint8 +} + +// NewBC creates a new BC. +func NewBC[K comparable, V any](key K, value V, expiration, cost uint32) Node[K, V] { + return &BC[K, V]{ + key: key, + value: value, + cost: cost, + state: aliveState, + } +} + +// CastPointerToBC casts a pointer to BC. +func CastPointerToBC[K comparable, V any](ptr unsafe.Pointer) Node[K, V] { + return (*BC[K, V])(ptr) +} + +func (n *BC[K, V]) Key() K { + return n.key +} + +func (n *BC[K, V]) Value() V { + return n.value +} + +func (n *BC[K, V]) AsPointer() unsafe.Pointer { + return unsafe.Pointer(n) +} + +func (n *BC[K, V]) Prev() Node[K, V] { + return n.prev +} + +func (n *BC[K, V]) SetPrev(v Node[K, V]) { + if v == nil { + n.prev = nil + return + } + n.prev = (*BC[K, V])(v.AsPointer()) +} + +func (n *BC[K, V]) Next() Node[K, V] { + return n.next +} + +func (n *BC[K, V]) SetNext(v Node[K, V]) { + if v == nil { + n.next = nil + return + } + n.next = (*BC[K, V])(v.AsPointer()) +} + +func (n *BC[K, V]) PrevExp() Node[K, V] { + panic("not implemented") +} + +func (n *BC[K, V]) SetPrevExp(v Node[K, V]) { + panic("not implemented") +} + +func (n *BC[K, V]) NextExp() Node[K, V] { + panic("not implemented") +} + +func (n *BC[K, V]) SetNextExp(v Node[K, V]) { + panic("not implemented") +} + +func (n *BC[K, V]) HasExpired() bool { + return false +} + +func (n *BC[K, V]) Expiration() uint32 { + panic("not implemented") +} + +func (n *BC[K, V]) Cost() uint32 { + return n.cost +} + +func (n *BC[K, V]) IsAlive() bool { + return atomic.LoadUint32(&n.state) == aliveState +} + +func (n *BC[K, V]) Die() { + atomic.StoreUint32(&n.state, deadState) +} + +func (n *BC[K, V]) Frequency() uint8 { + return n.frequency +} + +func (n *BC[K, V]) IncrementFrequency() { + n.frequency = minUint8(n.frequency+1, maxFrequency) +} + +func (n *BC[K, V]) DecrementFrequency() { + n.frequency-- +} + +func (n *BC[K, V]) ResetFrequency() { + n.frequency = 0 +} + +func (n *BC[K, V]) MarkSmall() { + n.queueType = smallQueueType +} + +func (n *BC[K, V]) IsSmall() bool { + return n.queueType == smallQueueType +} + +func (n *BC[K, V]) MarkMain() { + n.queueType = mainQueueType +} + +func (n *BC[K, V]) IsMain() bool { + return n.queueType == mainQueueType +} + +func (n *BC[K, V]) Unmark() { + n.queueType = unknownQueueType +} diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/be.go b/vendor/github.com/maypok86/otter/internal/generated/node/be.go new file mode 100644 index 00000000..ef66eef9 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/generated/node/be.go @@ -0,0 +1,160 @@ +// Code generated by NodeGenerator. DO NOT EDIT. + +// Package node is a generated generator package. +package node + +import ( + "sync/atomic" + "unsafe" + + "github.com/maypok86/otter/internal/unixtime" +) + +// BE is a cache entry that provide the following features: +// +// 1. Base +// +// 2. Expiration +type BE[K comparable, V any] struct { + key K + value V + prev *BE[K, V] + next *BE[K, V] + prevExp *BE[K, V] + nextExp *BE[K, V] + expiration uint32 + state uint32 + frequency uint8 + queueType uint8 +} + +// NewBE creates a new BE. +func NewBE[K comparable, V any](key K, value V, expiration, cost uint32) Node[K, V] { + return &BE[K, V]{ + key: key, + value: value, + expiration: expiration, + state: aliveState, + } +} + +// CastPointerToBE casts a pointer to BE. +func CastPointerToBE[K comparable, V any](ptr unsafe.Pointer) Node[K, V] { + return (*BE[K, V])(ptr) +} + +func (n *BE[K, V]) Key() K { + return n.key +} + +func (n *BE[K, V]) Value() V { + return n.value +} + +func (n *BE[K, V]) AsPointer() unsafe.Pointer { + return unsafe.Pointer(n) +} + +func (n *BE[K, V]) Prev() Node[K, V] { + return n.prev +} + +func (n *BE[K, V]) SetPrev(v Node[K, V]) { + if v == nil { + n.prev = nil + return + } + n.prev = (*BE[K, V])(v.AsPointer()) +} + +func (n *BE[K, V]) Next() Node[K, V] { + return n.next +} + +func (n *BE[K, V]) SetNext(v Node[K, V]) { + if v == nil { + n.next = nil + return + } + n.next = (*BE[K, V])(v.AsPointer()) +} + +func (n *BE[K, V]) PrevExp() Node[K, V] { + return n.prevExp +} + +func (n *BE[K, V]) SetPrevExp(v Node[K, V]) { + if v == nil { + n.prevExp = nil + return + } + n.prevExp = (*BE[K, V])(v.AsPointer()) +} + +func (n *BE[K, V]) NextExp() Node[K, V] { + return n.nextExp +} + +func (n *BE[K, V]) SetNextExp(v Node[K, V]) { + if v == nil { + n.nextExp = nil + return + } + n.nextExp = (*BE[K, V])(v.AsPointer()) +} + +func (n *BE[K, V]) HasExpired() bool { + return n.expiration <= unixtime.Now() +} + +func (n *BE[K, V]) Expiration() uint32 { + return n.expiration +} + +func (n *BE[K, V]) Cost() uint32 { + return 1 +} + +func (n *BE[K, V]) IsAlive() bool { + return atomic.LoadUint32(&n.state) == aliveState +} + +func (n *BE[K, V]) Die() { + atomic.StoreUint32(&n.state, deadState) +} + +func (n *BE[K, V]) Frequency() uint8 { + return n.frequency +} + +func (n *BE[K, V]) IncrementFrequency() { + n.frequency = minUint8(n.frequency+1, maxFrequency) +} + +func (n *BE[K, V]) DecrementFrequency() { + n.frequency-- +} + +func (n *BE[K, V]) ResetFrequency() { + n.frequency = 0 +} + +func (n *BE[K, V]) MarkSmall() { + n.queueType = smallQueueType +} + +func (n *BE[K, V]) IsSmall() bool { + return n.queueType == smallQueueType +} + +func (n *BE[K, V]) MarkMain() { + n.queueType = mainQueueType +} + +func (n *BE[K, V]) IsMain() bool { + return n.queueType == mainQueueType +} + +func (n *BE[K, V]) Unmark() { + n.queueType = unknownQueueType +} diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/bec.go b/vendor/github.com/maypok86/otter/internal/generated/node/bec.go new file mode 100644 index 00000000..f4813ca9 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/generated/node/bec.go @@ -0,0 +1,164 @@ +// Code generated by NodeGenerator. DO NOT EDIT. + +// Package node is a generated generator package. +package node + +import ( + "sync/atomic" + "unsafe" + + "github.com/maypok86/otter/internal/unixtime" +) + +// BEC is a cache entry that provide the following features: +// +// 1. Base +// +// 2. Expiration +// +// 3. Cost +type BEC[K comparable, V any] struct { + key K + value V + prev *BEC[K, V] + next *BEC[K, V] + prevExp *BEC[K, V] + nextExp *BEC[K, V] + expiration uint32 + cost uint32 + state uint32 + frequency uint8 + queueType uint8 +} + +// NewBEC creates a new BEC. +func NewBEC[K comparable, V any](key K, value V, expiration, cost uint32) Node[K, V] { + return &BEC[K, V]{ + key: key, + value: value, + expiration: expiration, + cost: cost, + state: aliveState, + } +} + +// CastPointerToBEC casts a pointer to BEC. +func CastPointerToBEC[K comparable, V any](ptr unsafe.Pointer) Node[K, V] { + return (*BEC[K, V])(ptr) +} + +func (n *BEC[K, V]) Key() K { + return n.key +} + +func (n *BEC[K, V]) Value() V { + return n.value +} + +func (n *BEC[K, V]) AsPointer() unsafe.Pointer { + return unsafe.Pointer(n) +} + +func (n *BEC[K, V]) Prev() Node[K, V] { + return n.prev +} + +func (n *BEC[K, V]) SetPrev(v Node[K, V]) { + if v == nil { + n.prev = nil + return + } + n.prev = (*BEC[K, V])(v.AsPointer()) +} + +func (n *BEC[K, V]) Next() Node[K, V] { + return n.next +} + +func (n *BEC[K, V]) SetNext(v Node[K, V]) { + if v == nil { + n.next = nil + return + } + n.next = (*BEC[K, V])(v.AsPointer()) +} + +func (n *BEC[K, V]) PrevExp() Node[K, V] { + return n.prevExp +} + +func (n *BEC[K, V]) SetPrevExp(v Node[K, V]) { + if v == nil { + n.prevExp = nil + return + } + n.prevExp = (*BEC[K, V])(v.AsPointer()) +} + +func (n *BEC[K, V]) NextExp() Node[K, V] { + return n.nextExp +} + +func (n *BEC[K, V]) SetNextExp(v Node[K, V]) { + if v == nil { + n.nextExp = nil + return + } + n.nextExp = (*BEC[K, V])(v.AsPointer()) +} + +func (n *BEC[K, V]) HasExpired() bool { + return n.expiration <= unixtime.Now() +} + +func (n *BEC[K, V]) Expiration() uint32 { + return n.expiration +} + +func (n *BEC[K, V]) Cost() uint32 { + return n.cost +} + +func (n *BEC[K, V]) IsAlive() bool { + return atomic.LoadUint32(&n.state) == aliveState +} + +func (n *BEC[K, V]) Die() { + atomic.StoreUint32(&n.state, deadState) +} + +func (n *BEC[K, V]) Frequency() uint8 { + return n.frequency +} + +func (n *BEC[K, V]) IncrementFrequency() { + n.frequency = minUint8(n.frequency+1, maxFrequency) +} + +func (n *BEC[K, V]) DecrementFrequency() { + n.frequency-- +} + +func (n *BEC[K, V]) ResetFrequency() { + n.frequency = 0 +} + +func (n *BEC[K, V]) MarkSmall() { + n.queueType = smallQueueType +} + +func (n *BEC[K, V]) IsSmall() bool { + return n.queueType == smallQueueType +} + +func (n *BEC[K, V]) MarkMain() { + n.queueType = mainQueueType +} + +func (n *BEC[K, V]) IsMain() bool { + return n.queueType == mainQueueType +} + +func (n *BEC[K, V]) Unmark() { + n.queueType = unknownQueueType +} diff --git a/vendor/github.com/maypok86/otter/internal/generated/node/manager.go b/vendor/github.com/maypok86/otter/internal/generated/node/manager.go new file mode 100644 index 00000000..e48b9008 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/generated/node/manager.go @@ -0,0 +1,143 @@ +// Code generated by NodeGenerator. DO NOT EDIT. + +// Package node is a generated generator package. +package node + +import ( + "strings" + "unsafe" +) + +const ( + unknownQueueType uint8 = iota + smallQueueType + mainQueueType + + maxFrequency uint8 = 3 +) + +const ( + aliveState uint32 = iota + deadState +) + +// Node is a cache entry. +type Node[K comparable, V any] interface { + // Key returns the key. + Key() K + // Value returns the value. + Value() V + // AsPointer returns the node as a pointer. + AsPointer() unsafe.Pointer + // Prev returns the previous node in the eviction policy. + Prev() Node[K, V] + // SetPrev sets the previous node in the eviction policy. + SetPrev(v Node[K, V]) + // Next returns the next node in the eviction policy. + Next() Node[K, V] + // SetNext sets the next node in the eviction policy. + SetNext(v Node[K, V]) + // PrevExp returns the previous node in the expiration policy. + PrevExp() Node[K, V] + // SetPrevExp sets the previous node in the expiration policy. + SetPrevExp(v Node[K, V]) + // NextExp returns the next node in the expiration policy. + NextExp() Node[K, V] + // SetNextExp sets the next node in the expiration policy. + SetNextExp(v Node[K, V]) + // HasExpired returns true if node has expired. + HasExpired() bool + // Expiration returns the expiration time. + Expiration() uint32 + // Cost returns the cost of the node. + Cost() uint32 + // IsAlive returns true if the entry is available in the hash-table. + IsAlive() bool + // Die sets the node to the dead state. + Die() + // Frequency returns the frequency of the node. + Frequency() uint8 + // IncrementFrequency increments the frequency of the node. + IncrementFrequency() + // DecrementFrequency decrements the frequency of the node. + DecrementFrequency() + // ResetFrequency resets the frequency. + ResetFrequency() + // MarkSmall sets the status to the small queue. + MarkSmall() + // IsSmall returns true if node is in the small queue. + IsSmall() bool + // MarkMain sets the status to the main queue. + MarkMain() + // IsMain returns true if node is in the main queue. + IsMain() bool + // Unmark sets the status to unknown. + Unmark() +} + +func Equals[K comparable, V any](a, b Node[K, V]) bool { + if a == nil { + return b == nil || b.AsPointer() == nil + } + if b == nil { + return a.AsPointer() == nil + } + return a.AsPointer() == b.AsPointer() +} + +type Config struct { + WithExpiration bool + WithCost bool +} + +type Manager[K comparable, V any] struct { + create func(key K, value V, expiration, cost uint32) Node[K, V] + fromPointer func(ptr unsafe.Pointer) Node[K, V] +} + +func NewManager[K comparable, V any](c Config) *Manager[K, V] { + var sb strings.Builder + sb.WriteString("b") + if c.WithExpiration { + sb.WriteString("e") + } + if c.WithCost { + sb.WriteString("c") + } + nodeType := sb.String() + m := &Manager[K, V]{} + + switch nodeType { + case "bec": + m.create = NewBEC[K, V] + m.fromPointer = CastPointerToBEC[K, V] + case "bc": + m.create = NewBC[K, V] + m.fromPointer = CastPointerToBC[K, V] + case "be": + m.create = NewBE[K, V] + m.fromPointer = CastPointerToBE[K, V] + case "b": + m.create = NewB[K, V] + m.fromPointer = CastPointerToB[K, V] + default: + panic("not valid nodeType") + } + return m +} + +func (m *Manager[K, V]) Create(key K, value V, expiration, cost uint32) Node[K, V] { + return m.create(key, value, expiration, cost) +} + +func (m *Manager[K, V]) FromPointer(ptr unsafe.Pointer) Node[K, V] { + return m.fromPointer(ptr) +} + +func minUint8(a, b uint8) uint8 { + if a < b { + return a + } + + return b +} diff --git a/vendor/github.com/maypok86/otter/internal/hashtable/bucket.go b/vendor/github.com/maypok86/otter/internal/hashtable/bucket.go new file mode 100644 index 00000000..2bec4656 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/hashtable/bucket.go @@ -0,0 +1,81 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// Copyright (c) 2021 Andrey Pechkurov +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright notice. This code is a fork of xsync.MapOf from this file with some changes: +// https://github.com/puzpuzpuz/xsync/blob/main/mapof.go +// +// Use of this source code is governed by a MIT license that can be found +// at https://github.com/puzpuzpuz/xsync/blob/main/LICENSE + +package hashtable + +import ( + "sync" + "unsafe" + + "github.com/maypok86/otter/internal/xruntime" +) + +// paddedBucket is a CL-sized map bucket holding up to +// bucketSize nodes. +type paddedBucket struct { + // ensure each bucket takes two cache lines on both 32 and 64-bit archs + padding [xruntime.CacheLineSize - unsafe.Sizeof(bucket{})]byte + + bucket +} + +type bucket struct { + hashes [bucketSize]uint64 + nodes [bucketSize]unsafe.Pointer + next unsafe.Pointer + mutex sync.Mutex +} + +func (root *paddedBucket) isEmpty() bool { + b := root + for { + for i := 0; i < bucketSize; i++ { + if b.nodes[i] != nil { + return false + } + } + if b.next == nil { + return true + } + b = (*paddedBucket)(b.next) + } +} + +func (root *paddedBucket) add(h uint64, nodePtr unsafe.Pointer) { + b := root + for { + for i := 0; i < bucketSize; i++ { + if b.nodes[i] == nil { + b.hashes[i] = h + b.nodes[i] = nodePtr + return + } + } + if b.next == nil { + newBucket := &paddedBucket{} + newBucket.hashes[0] = h + newBucket.nodes[0] = nodePtr + b.next = unsafe.Pointer(newBucket) + return + } + b = (*paddedBucket)(b.next) + } +} diff --git a/vendor/github.com/maypok86/otter/internal/hashtable/map.go b/vendor/github.com/maypok86/otter/internal/hashtable/map.go new file mode 100644 index 00000000..01d261cd --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/hashtable/map.go @@ -0,0 +1,551 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// Copyright (c) 2021 Andrey Pechkurov +// +// Copyright notice. This code is a fork of xsync.MapOf from this file with some changes: +// https://github.com/puzpuzpuz/xsync/blob/main/mapof.go +// +// Use of this source code is governed by a MIT license that can be found +// at https://github.com/puzpuzpuz/xsync/blob/main/LICENSE + +package hashtable + +import ( + "fmt" + "sync" + "sync/atomic" + "unsafe" + + "github.com/dolthub/maphash" + + "github.com/maypok86/otter/internal/generated/node" + "github.com/maypok86/otter/internal/xmath" + "github.com/maypok86/otter/internal/xruntime" +) + +type resizeHint int + +const ( + growHint resizeHint = 0 + shrinkHint resizeHint = 1 + clearHint resizeHint = 2 +) + +const ( + // number of entries per bucket + // 3 because we need to fit them into 1 cache line (64 bytes). + bucketSize = 3 + // percentage at which the map will be expanded. + loadFactor = 0.75 + // threshold fraction of table occupation to start a table shrinking + // when deleting the last entry in a bucket chain. + shrinkFraction = 128 + minBucketCount = 32 + minNodeCount = bucketSize * minBucketCount + minCounterLength = 8 + maxCounterLength = 32 +) + +// Map is like a Go map[K]V but is safe for concurrent +// use by multiple goroutines without additional locking or +// coordination. +// +// A Map must not be copied after first use. +// +// Map uses a modified version of Cache-Line Hash Table (CLHT) +// data structure: https://github.com/LPD-EPFL/CLHT +// +// CLHT is built around idea to organize the hash table in +// cache-line-sized buckets, so that on all modern CPUs update +// operations complete with at most one cache-line transfer. +// Also, Get operations involve no write to memory, as well as no +// mutexes or any other sort of locks. Due to this design, in all +// considered scenarios Map outperforms sync.Map. +type Map[K comparable, V any] struct { + table unsafe.Pointer + + nodeManager *node.Manager[K, V] + // only used along with resizeCond + resizeMutex sync.Mutex + // used to wake up resize waiters (concurrent modifications) + resizeCond sync.Cond + // resize in progress flag; updated atomically + resizing atomic.Int64 +} + +type table[K comparable] struct { + buckets []paddedBucket + // sharded counter for number of table entries; + // used to determine if a table shrinking is needed + // occupies min(buckets_memory/1024, 64KB) of memory + size []paddedCounter + mask uint64 + hasher maphash.Hasher[K] +} + +func (t *table[K]) addSize(bucketIdx uint64, delta int) { + //nolint:gosec // there will never be an overflow + counterIdx := uint64(len(t.size)-1) & bucketIdx + atomic.AddInt64(&t.size[counterIdx].c, int64(delta)) +} + +func (t *table[K]) addSizePlain(bucketIdx uint64, delta int) { + //nolint:gosec // there will never be an overflow + counterIdx := uint64(len(t.size)-1) & bucketIdx + t.size[counterIdx].c += int64(delta) +} + +func (t *table[K]) sumSize() int64 { + sum := int64(0) + for i := range t.size { + sum += atomic.LoadInt64(&t.size[i].c) + } + return sum +} + +func (t *table[K]) calcShiftHash(key K) uint64 { + // uint64(0) is a reserved value which stands for an empty slot. + h := t.hasher.Hash(key) + if h == uint64(0) { + return 1 + } + + return h +} + +type counter struct { + c int64 +} + +type paddedCounter struct { + // padding prevents false sharing. + padding [xruntime.CacheLineSize - unsafe.Sizeof(counter{})]byte + + counter +} + +// NewWithSize creates a new Map instance with capacity enough +// to hold size nodes. If size is zero or negative, the value +// is ignored. +func NewWithSize[K comparable, V any](nodeManager *node.Manager[K, V], size int) *Map[K, V] { + return newMap[K, V](nodeManager, size) +} + +// New creates a new Map instance. +func New[K comparable, V any](nodeManager *node.Manager[K, V]) *Map[K, V] { + return newMap[K, V](nodeManager, minNodeCount) +} + +func newMap[K comparable, V any](nodeManager *node.Manager[K, V], size int) *Map[K, V] { + m := &Map[K, V]{ + nodeManager: nodeManager, + } + m.resizeCond = *sync.NewCond(&m.resizeMutex) + var t *table[K] + if size <= minNodeCount { + t = newTable(minBucketCount, maphash.NewHasher[K]()) + } else { + //nolint:gosec // there will never be an overflow + bucketCount := xmath.RoundUpPowerOf2(uint32(size / bucketSize)) + t = newTable(int(bucketCount), maphash.NewHasher[K]()) + } + atomic.StorePointer(&m.table, unsafe.Pointer(t)) + return m +} + +func newTable[K comparable](bucketCount int, prevHasher maphash.Hasher[K]) *table[K] { + buckets := make([]paddedBucket, bucketCount) + counterLength := bucketCount >> 10 + if counterLength < minCounterLength { + counterLength = minCounterLength + } else if counterLength > maxCounterLength { + counterLength = maxCounterLength + } + counter := make([]paddedCounter, counterLength) + //nolint:gosec // there will never be an overflow + mask := uint64(len(buckets) - 1) + t := &table[K]{ + buckets: buckets, + size: counter, + mask: mask, + hasher: maphash.NewSeed[K](prevHasher), + } + return t +} + +// Get returns the node.Node stored in the map for a key, or nil if no node is present. +// +// The ok result indicates whether node was found in the map. +func (m *Map[K, V]) Get(key K) (got node.Node[K, V], ok bool) { + t := (*table[K])(atomic.LoadPointer(&m.table)) + hash := t.calcShiftHash(key) + bucketIdx := hash & t.mask + b := &t.buckets[bucketIdx] + for { + for i := 0; i < bucketSize; i++ { + // we treat the hash code only as a hint, so there is no + // need to get an atomic snapshot. + h := atomic.LoadUint64(&b.hashes[i]) + if h == uint64(0) || h != hash { + continue + } + // we found a matching hash code + nodePtr := atomic.LoadPointer(&b.nodes[i]) + if nodePtr == nil { + // concurrent write in this node + continue + } + n := m.nodeManager.FromPointer(nodePtr) + if key != n.Key() { + continue + } + + return n, true + } + bucketPtr := atomic.LoadPointer(&b.next) + if bucketPtr == nil { + return nil, false + } + b = (*paddedBucket)(bucketPtr) + } +} + +// Set sets the node.Node for the key. +// +// Returns the evicted node or nil if the node was inserted. +func (m *Map[K, V]) Set(n node.Node[K, V]) node.Node[K, V] { + return m.set(n, false) +} + +// SetIfAbsent sets the node.Node if the specified key is not already associated with a value (or is mapped to null) +// associates it with the given value and returns null, else returns the current node. +func (m *Map[K, V]) SetIfAbsent(n node.Node[K, V]) node.Node[K, V] { + return m.set(n, true) +} + +func (m *Map[K, V]) set(n node.Node[K, V], onlyIfAbsent bool) node.Node[K, V] { + for { + RETRY: + var ( + emptyBucket *paddedBucket + emptyIdx int + ) + t := (*table[K])(atomic.LoadPointer(&m.table)) + tableLen := len(t.buckets) + hash := t.calcShiftHash(n.Key()) + bucketIdx := hash & t.mask + rootBucket := &t.buckets[bucketIdx] + rootBucket.mutex.Lock() + // the following two checks must go in reverse to what's + // in the resize method. + if m.resizeInProgress() { + // resize is in progress. wait, then go for another attempt. + rootBucket.mutex.Unlock() + m.waitForResize() + goto RETRY + } + if m.newerTableExists(t) { + // someone resized the table, go for another attempt. + rootBucket.mutex.Unlock() + goto RETRY + } + b := rootBucket + for { + for i := 0; i < bucketSize; i++ { + h := b.hashes[i] + if h == uint64(0) { + if emptyBucket == nil { + emptyBucket = b + emptyIdx = i + } + continue + } + if h != hash { + continue + } + prev := m.nodeManager.FromPointer(b.nodes[i]) + if n.Key() != prev.Key() { + continue + } + if onlyIfAbsent { + // found node, drop set + rootBucket.mutex.Unlock() + return n + } + // in-place update. + // We get a copy of the value via an interface{} on each call, + // thus the live value pointers are unique. Otherwise atomic + // snapshot won't be correct in case of multiple Store calls + // using the same value. + atomic.StorePointer(&b.nodes[i], n.AsPointer()) + rootBucket.mutex.Unlock() + return prev + } + if b.next == nil { + if emptyBucket != nil { + // insertion into an existing bucket. + // first we update the hash, then the entry. + atomic.StoreUint64(&emptyBucket.hashes[emptyIdx], hash) + atomic.StorePointer(&emptyBucket.nodes[emptyIdx], n.AsPointer()) + rootBucket.mutex.Unlock() + t.addSize(bucketIdx, 1) + return nil + } + growThreshold := float64(tableLen) * bucketSize * loadFactor + if t.sumSize() > int64(growThreshold) { + // need to grow the table then go for another attempt. + rootBucket.mutex.Unlock() + m.resize(t, growHint) + goto RETRY + } + // insertion into a new bucket. + // create and append the bucket. + newBucket := &paddedBucket{} + newBucket.hashes[0] = hash + newBucket.nodes[0] = n.AsPointer() + atomic.StorePointer(&b.next, unsafe.Pointer(newBucket)) + rootBucket.mutex.Unlock() + t.addSize(bucketIdx, 1) + return nil + } + b = (*paddedBucket)(b.next) + } + } +} + +// Delete deletes the value for a key. +// +// Returns the deleted node or nil if the node wasn't deleted. +func (m *Map[K, V]) Delete(key K) node.Node[K, V] { + return m.delete(key, func(n node.Node[K, V]) bool { + return key == n.Key() + }) +} + +// DeleteNode evicts the node for a key. +// +// Returns the evicted node or nil if the node wasn't evicted. +func (m *Map[K, V]) DeleteNode(n node.Node[K, V]) node.Node[K, V] { + return m.delete(n.Key(), func(current node.Node[K, V]) bool { + return node.Equals(n, current) + }) +} + +func (m *Map[K, V]) delete(key K, cmp func(node.Node[K, V]) bool) node.Node[K, V] { + for { + RETRY: + hintNonEmpty := 0 + t := (*table[K])(atomic.LoadPointer(&m.table)) + hash := t.calcShiftHash(key) + bucketIdx := hash & t.mask + rootBucket := &t.buckets[bucketIdx] + rootBucket.mutex.Lock() + // the following two checks must go in reverse to what's + // in the resize method. + if m.resizeInProgress() { + // resize is in progress. Wait, then go for another attempt. + rootBucket.mutex.Unlock() + m.waitForResize() + goto RETRY + } + if m.newerTableExists(t) { + // someone resized the table. Go for another attempt. + rootBucket.mutex.Unlock() + goto RETRY + } + b := rootBucket + for { + for i := 0; i < bucketSize; i++ { + h := b.hashes[i] + if h == uint64(0) { + continue + } + if h != hash { + hintNonEmpty++ + continue + } + current := m.nodeManager.FromPointer(b.nodes[i]) + if !cmp(current) { + hintNonEmpty++ + continue + } + // Deletion. + // First we update the hash, then the node. + atomic.StoreUint64(&b.hashes[i], uint64(0)) + atomic.StorePointer(&b.nodes[i], nil) + leftEmpty := false + if hintNonEmpty == 0 { + leftEmpty = b.isEmpty() + } + rootBucket.mutex.Unlock() + t.addSize(bucketIdx, -1) + // Might need to shrink the table. + if leftEmpty { + m.resize(t, shrinkHint) + } + return current + } + if b.next == nil { + // not found + rootBucket.mutex.Unlock() + return nil + } + b = (*paddedBucket)(b.next) + } + } +} + +func (m *Map[K, V]) resize(known *table[K], hint resizeHint) { + knownTableLen := len(known.buckets) + // fast path for shrink attempts. + if hint == shrinkHint { + shrinkThreshold := int64((knownTableLen * bucketSize) / shrinkFraction) + if knownTableLen == minBucketCount || known.sumSize() > shrinkThreshold { + return + } + } + // slow path. + if !m.resizing.CompareAndSwap(0, 1) { + // someone else started resize. Wait for it to finish. + m.waitForResize() + return + } + var nt *table[K] + t := (*table[K])(atomic.LoadPointer(&m.table)) + tableLen := len(t.buckets) + switch hint { + case growHint: + // grow the table with factor of 2. + nt = newTable(tableLen<<1, t.hasher) + case shrinkHint: + shrinkThreshold := int64((tableLen * bucketSize) / shrinkFraction) + if tableLen > minBucketCount && t.sumSize() <= shrinkThreshold { + // shrink the table with factor of 2. + nt = newTable(tableLen>>1, t.hasher) + } else { + // no need to shrink, wake up all waiters and give up. + m.resizeMutex.Lock() + m.resizing.Store(0) + m.resizeCond.Broadcast() + m.resizeMutex.Unlock() + return + } + case clearHint: + nt = newTable(minBucketCount, t.hasher) + default: + panic(fmt.Sprintf("unexpected resize hint: %d", hint)) + } + // copy the data only if we're not clearing the hashtable. + if hint != clearHint { + for i := 0; i < tableLen; i++ { + copied := m.copyBuckets(&t.buckets[i], nt) + //nolint:gosec // there will never be an overflow + nt.addSizePlain(uint64(i), copied) + } + } + // publish the new table and wake up all waiters. + atomic.StorePointer(&m.table, unsafe.Pointer(nt)) + m.resizeMutex.Lock() + m.resizing.Store(0) + m.resizeCond.Broadcast() + m.resizeMutex.Unlock() +} + +func (m *Map[K, V]) copyBuckets(b *paddedBucket, dest *table[K]) (copied int) { + rootBucket := b + rootBucket.mutex.Lock() + for { + for i := 0; i < bucketSize; i++ { + if b.nodes[i] == nil { + continue + } + n := m.nodeManager.FromPointer(b.nodes[i]) + hash := dest.calcShiftHash(n.Key()) + bucketIdx := hash & dest.mask + dest.buckets[bucketIdx].add(hash, b.nodes[i]) + copied++ + } + if b.next == nil { + rootBucket.mutex.Unlock() + return copied + } + b = (*paddedBucket)(b.next) + } +} + +func (m *Map[K, V]) newerTableExists(table *table[K]) bool { + currentTable := atomic.LoadPointer(&m.table) + return uintptr(currentTable) != uintptr(unsafe.Pointer(table)) +} + +func (m *Map[K, V]) resizeInProgress() bool { + return m.resizing.Load() == 1 +} + +func (m *Map[K, V]) waitForResize() { + m.resizeMutex.Lock() + for m.resizeInProgress() { + m.resizeCond.Wait() + } + m.resizeMutex.Unlock() +} + +// Range calls f sequentially for each node present in the +// map. If f returns false, range stops the iteration. +// +// Range does not necessarily correspond to any consistent snapshot +// of the Map's contents: no key will be visited more than once, but +// if the value for any key is stored or deleted concurrently, Range +// may reflect any mapping for that key from any point during the +// Range call. +// +// It is safe to modify the map while iterating it. However, the +// concurrent modification rule apply, i.e. the changes may be not +// reflected in the subsequently iterated nodes. +func (m *Map[K, V]) Range(f func(node.Node[K, V]) bool) { + var zeroPtr unsafe.Pointer + // Pre-allocate array big enough to fit nodes for most hash tables. + buffer := make([]unsafe.Pointer, 0, 16*bucketSize) + tp := atomic.LoadPointer(&m.table) + t := *(*table[K])(tp) + for i := range t.buckets { + rootBucket := &t.buckets[i] + b := rootBucket + // Prevent concurrent modifications and copy all nodes into + // the intermediate slice. + rootBucket.mutex.Lock() + for { + for i := 0; i < bucketSize; i++ { + if b.nodes[i] != nil { + buffer = append(buffer, b.nodes[i]) + } + } + if b.next == nil { + rootBucket.mutex.Unlock() + break + } + b = (*paddedBucket)(b.next) + } + // Call the function for all copied nodes. + for j := range buffer { + n := m.nodeManager.FromPointer(buffer[j]) + if !f(n) { + return + } + // Remove the reference to allow the copied nodes to be GCed before this method finishes. + buffer[j] = zeroPtr + } + buffer = buffer[:0] + } +} + +// Clear deletes all keys and values currently stored in the map. +func (m *Map[K, V]) Clear() { + table := (*table[K])(atomic.LoadPointer(&m.table)) + m.resize(table, clearHint) +} + +// Size returns current size of the map. +func (m *Map[K, V]) Size() int { + table := (*table[K])(atomic.LoadPointer(&m.table)) + return int(table.sumSize()) +} diff --git a/vendor/github.com/maypok86/otter/internal/lossy/buffer.go b/vendor/github.com/maypok86/otter/internal/lossy/buffer.go new file mode 100644 index 00000000..a0a1d558 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/lossy/buffer.go @@ -0,0 +1,143 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package lossy + +import ( + "runtime" + "sync/atomic" + "unsafe" + + "github.com/maypok86/otter/internal/generated/node" + "github.com/maypok86/otter/internal/xruntime" +) + +const ( + // The maximum number of elements per buffer. + capacity = 16 + mask = uint64(capacity - 1) +) + +// PolicyBuffers is the set of buffers returned by the lossy buffer. +type PolicyBuffers[K comparable, V any] struct { + Returned []node.Node[K, V] +} + +// Buffer is a circular ring buffer stores the elements being transferred by the producers to the consumer. +// The monotonically increasing count of reads and writes allow indexing sequentially to the next +// element location based upon a power-of-two sizing. +// +// The producers race to read the counts, check if there is available capacity, and if so then try +// once to CAS to the next write count. If the increment is successful then the producer lazily +// publishes the element. The producer does not retry or block when unsuccessful due to a failed +// CAS or the buffer being full. +// +// The consumer reads the counts and takes the available elements. The clearing of the elements +// and the next read count are lazily set. +// +// This implementation is striped to further increase concurrency. +type Buffer[K comparable, V any] struct { + head atomic.Uint64 + headPadding [xruntime.CacheLineSize - unsafe.Sizeof(atomic.Uint64{})]byte + tail atomic.Uint64 + tailPadding [xruntime.CacheLineSize - unsafe.Sizeof(atomic.Uint64{})]byte + nodeManager *node.Manager[K, V] + returned unsafe.Pointer + returnedPadding [xruntime.CacheLineSize - 2*8]byte + policyBuffers unsafe.Pointer + returnedSlicePadding [xruntime.CacheLineSize - 8]byte + buffer [capacity]unsafe.Pointer +} + +// New creates a new lossy Buffer. +func New[K comparable, V any](nodeManager *node.Manager[K, V]) *Buffer[K, V] { + pb := &PolicyBuffers[K, V]{ + Returned: make([]node.Node[K, V], 0, capacity), + } + b := &Buffer[K, V]{ + nodeManager: nodeManager, + policyBuffers: unsafe.Pointer(pb), + } + b.returned = b.policyBuffers + return b +} + +// Add lazily publishes the item to the consumer. +// +// item may be lost due to contention. +func (b *Buffer[K, V]) Add(n node.Node[K, V]) *PolicyBuffers[K, V] { + head := b.head.Load() + tail := b.tail.Load() + size := tail - head + if size >= capacity { + // full buffer + return nil + } + if b.tail.CompareAndSwap(tail, tail+1) { + // success + //nolint:gosec // there will never be an overflow + index := int(tail & mask) + atomic.StorePointer(&b.buffer[index], n.AsPointer()) + if size == capacity-1 { + // try return new buffer + if !atomic.CompareAndSwapPointer(&b.returned, b.policyBuffers, nil) { + // somebody already get buffer + return nil + } + + pb := (*PolicyBuffers[K, V])(b.policyBuffers) + for i := 0; i < capacity; i++ { + //nolint:gosec // there will never be an overflow + index := int(head & mask) + v := atomic.LoadPointer(&b.buffer[index]) + if v != nil { + // published + pb.Returned = append(pb.Returned, b.nodeManager.FromPointer(v)) + // release + atomic.StorePointer(&b.buffer[index], nil) + } + head++ + } + + b.head.Store(head) + return pb + } + } + + // failed + return nil +} + +// Free returns the processed buffer back and also clears it. +func (b *Buffer[K, V]) Free() { + pb := (*PolicyBuffers[K, V])(b.policyBuffers) + for i := 0; i < len(pb.Returned); i++ { + pb.Returned[i] = nil + } + pb.Returned = pb.Returned[:0] + atomic.StorePointer(&b.returned, b.policyBuffers) +} + +// Clear clears the lossy Buffer and returns it to the default state. +func (b *Buffer[K, V]) Clear() { + for !atomic.CompareAndSwapPointer(&b.returned, b.policyBuffers, nil) { + runtime.Gosched() + } + for i := 0; i < capacity; i++ { + atomic.StorePointer(&b.buffer[i], nil) + } + b.Free() + b.tail.Store(0) + b.head.Store(0) +} diff --git a/vendor/github.com/maypok86/otter/internal/queue/growable.go b/vendor/github.com/maypok86/otter/internal/queue/growable.go new file mode 100644 index 00000000..80e80656 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/queue/growable.go @@ -0,0 +1,135 @@ +// Copyright (c) 2024 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package queue + +import ( + "sync" + + "github.com/maypok86/otter/internal/xmath" +) + +type Growable[T any] struct { + mutex sync.Mutex + notEmpty sync.Cond + notFull sync.Cond + buf []T + head int + tail int + count int + minCap int + maxCap int +} + +func NewGrowable[T any](minCap, maxCap uint32) *Growable[T] { + minCap = xmath.RoundUpPowerOf2(minCap) + maxCap = xmath.RoundUpPowerOf2(maxCap) + + g := &Growable[T]{ + buf: make([]T, minCap), + minCap: int(minCap), + maxCap: int(maxCap), + } + + g.notEmpty = *sync.NewCond(&g.mutex) + g.notFull = *sync.NewCond(&g.mutex) + + return g +} + +func (g *Growable[T]) Push(item T) { + g.mutex.Lock() + for g.count == g.maxCap { + g.notFull.Wait() + } + g.push(item) + g.mutex.Unlock() +} + +func (g *Growable[T]) push(item T) { + g.grow() + g.buf[g.tail] = item + g.tail = g.next(g.tail) + g.count++ + g.notEmpty.Signal() +} + +func (g *Growable[T]) Pop() T { + g.mutex.Lock() + for g.count == 0 { + g.notEmpty.Wait() + } + item := g.pop() + g.mutex.Unlock() + return item +} + +func (g *Growable[T]) TryPop() (T, bool) { + var zero T + g.mutex.Lock() + if g.count == 0 { + g.mutex.Unlock() + return zero, false + } + item := g.pop() + g.mutex.Unlock() + return item, true +} + +func (g *Growable[T]) pop() T { + var zero T + + item := g.buf[g.head] + g.buf[g.head] = zero + + g.head = g.next(g.head) + g.count-- + + g.notFull.Signal() + + return item +} + +func (g *Growable[T]) Clear() { + g.mutex.Lock() + for g.count > 0 { + g.pop() + } + g.mutex.Unlock() +} + +func (g *Growable[T]) grow() { + if g.count != len(g.buf) { + return + } + g.resize() +} + +func (g *Growable[T]) resize() { + newBuf := make([]T, g.count<<1) + if g.tail > g.head { + copy(newBuf, g.buf[g.head:g.tail]) + } else { + n := copy(newBuf, g.buf[g.head:]) + copy(newBuf[n:], g.buf[:g.tail]) + } + + g.head = 0 + g.tail = g.count + g.buf = newBuf +} + +func (g *Growable[T]) next(i int) int { + return (i + 1) & (len(g.buf) - 1) +} diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/ghost.go b/vendor/github.com/maypok86/otter/internal/s3fifo/ghost.go new file mode 100644 index 00000000..0b263a08 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/s3fifo/ghost.go @@ -0,0 +1,77 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package s3fifo + +import ( + "github.com/dolthub/maphash" + "github.com/gammazero/deque" + + "github.com/maypok86/otter/internal/generated/node" +) + +type ghost[K comparable, V any] struct { + q *deque.Deque[uint64] + m map[uint64]struct{} + main *main[K, V] + small *small[K, V] + hasher maphash.Hasher[K] + evictNode func(node.Node[K, V]) +} + +func newGhost[K comparable, V any](main *main[K, V], evictNode func(node.Node[K, V])) *ghost[K, V] { + return &ghost[K, V]{ + q: &deque.Deque[uint64]{}, + m: make(map[uint64]struct{}), + main: main, + hasher: maphash.NewHasher[K](), + evictNode: evictNode, + } +} + +func (g *ghost[K, V]) isGhost(n node.Node[K, V]) bool { + h := g.hasher.Hash(n.Key()) + _, ok := g.m[h] + return ok +} + +func (g *ghost[K, V]) insert(n node.Node[K, V]) { + g.evictNode(n) + + h := g.hasher.Hash(n.Key()) + + if _, ok := g.m[h]; ok { + return + } + + maxLength := g.small.length() + g.main.length() + if maxLength == 0 { + return + } + + for g.q.Len() >= maxLength { + v := g.q.PopFront() + delete(g.m, v) + } + + g.q.PushBack(h) + g.m[h] = struct{}{} +} + +func (g *ghost[K, V]) clear() { + g.q.Clear() + for k := range g.m { + delete(g.m, k) + } +} diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/main.go b/vendor/github.com/maypok86/otter/internal/s3fifo/main.go new file mode 100644 index 00000000..e57120cc --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/s3fifo/main.go @@ -0,0 +1,87 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package s3fifo + +import ( + "github.com/maypok86/otter/internal/generated/node" +) + +const maxReinsertions = 20 + +type main[K comparable, V any] struct { + q *queue[K, V] + cost int + maxCost int + evictNode func(node.Node[K, V]) +} + +func newMain[K comparable, V any](maxCost int, evictNode func(node.Node[K, V])) *main[K, V] { + return &main[K, V]{ + q: newQueue[K, V](), + maxCost: maxCost, + evictNode: evictNode, + } +} + +func (m *main[K, V]) insert(n node.Node[K, V]) { + m.q.push(n) + n.MarkMain() + m.cost += int(n.Cost()) +} + +func (m *main[K, V]) evict() { + reinsertions := 0 + for m.cost > 0 { + n := m.q.pop() + + if !n.IsAlive() || n.HasExpired() || n.Frequency() == 0 { + n.Unmark() + m.cost -= int(n.Cost()) + m.evictNode(n) + return + } + + // to avoid the worst case O(n), we remove the 20th reinserted consecutive element. + reinsertions++ + if reinsertions >= maxReinsertions { + n.Unmark() + m.cost -= int(n.Cost()) + m.evictNode(n) + return + } + + m.q.push(n) + n.DecrementFrequency() + } +} + +func (m *main[K, V]) delete(n node.Node[K, V]) { + m.cost -= int(n.Cost()) + n.Unmark() + m.q.delete(n) +} + +func (m *main[K, V]) length() int { + return m.q.length() +} + +func (m *main[K, V]) clear() { + m.q.clear() + m.cost = 0 +} + +func (m *main[K, V]) isFull() bool { + return m.cost >= m.maxCost +} diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/policy.go b/vendor/github.com/maypok86/otter/internal/s3fifo/policy.go new file mode 100644 index 00000000..dd698172 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/s3fifo/policy.go @@ -0,0 +1,106 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package s3fifo + +import ( + "github.com/maypok86/otter/internal/generated/node" +) + +// Policy is an eviction policy based on S3-FIFO eviction algorithm +// from the following paper: https://dl.acm.org/doi/10.1145/3600006.3613147. +type Policy[K comparable, V any] struct { + small *small[K, V] + main *main[K, V] + ghost *ghost[K, V] + maxCost int + maxAvailableNodeCost int +} + +// NewPolicy creates a new Policy. +func NewPolicy[K comparable, V any](maxCost int, evictNode func(node.Node[K, V])) *Policy[K, V] { + smallMaxCost := maxCost / 10 + mainMaxCost := maxCost - smallMaxCost + + main := newMain[K, V](mainMaxCost, evictNode) + ghost := newGhost(main, evictNode) + small := newSmall(smallMaxCost, main, ghost, evictNode) + ghost.small = small + + return &Policy[K, V]{ + small: small, + main: main, + ghost: ghost, + maxCost: maxCost, + maxAvailableNodeCost: smallMaxCost, + } +} + +// Read updates the eviction policy based on node accesses. +func (p *Policy[K, V]) Read(nodes []node.Node[K, V]) { + for _, n := range nodes { + n.IncrementFrequency() + } +} + +// Add adds node to the eviction policy. +func (p *Policy[K, V]) Add(n node.Node[K, V]) { + if p.ghost.isGhost(n) { + p.main.insert(n) + n.ResetFrequency() + } else { + p.small.insert(n) + } + + for p.isFull() { + p.evict() + } +} + +func (p *Policy[K, V]) evict() { + if p.small.cost >= p.maxCost/10 { + p.small.evict() + return + } + + p.main.evict() +} + +func (p *Policy[K, V]) isFull() bool { + return p.small.cost+p.main.cost > p.maxCost +} + +// Delete deletes node from the eviction policy. +func (p *Policy[K, V]) Delete(n node.Node[K, V]) { + if n.IsSmall() { + p.small.delete(n) + return + } + + if n.IsMain() { + p.main.delete(n) + } +} + +// MaxAvailableCost returns the maximum available cost of the node. +func (p *Policy[K, V]) MaxAvailableCost() int { + return p.maxAvailableNodeCost +} + +// Clear clears the eviction policy and returns it to the default state. +func (p *Policy[K, V]) Clear() { + p.ghost.clear() + p.main.clear() + p.small.clear() +} diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/queue.go b/vendor/github.com/maypok86/otter/internal/s3fifo/queue.go new file mode 100644 index 00000000..4f8e76de --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/s3fifo/queue.go @@ -0,0 +1,75 @@ +package s3fifo + +import "github.com/maypok86/otter/internal/generated/node" + +type queue[K comparable, V any] struct { + head node.Node[K, V] + tail node.Node[K, V] + len int +} + +func newQueue[K comparable, V any]() *queue[K, V] { + return &queue[K, V]{} +} + +func (q *queue[K, V]) length() int { + return q.len +} + +func (q *queue[K, V]) isEmpty() bool { + return q.length() == 0 +} + +func (q *queue[K, V]) push(n node.Node[K, V]) { + if q.isEmpty() { + q.head = n + q.tail = n + } else { + n.SetPrev(q.tail) + q.tail.SetNext(n) + q.tail = n + } + + q.len++ +} + +func (q *queue[K, V]) pop() node.Node[K, V] { + if q.isEmpty() { + return nil + } + + result := q.head + q.delete(result) + return result +} + +func (q *queue[K, V]) delete(n node.Node[K, V]) { + next := n.Next() + prev := n.Prev() + + if node.Equals(prev, nil) { + if node.Equals(next, nil) && !node.Equals(q.head, n) { + return + } + + q.head = next + } else { + prev.SetNext(next) + n.SetPrev(nil) + } + + if node.Equals(next, nil) { + q.tail = prev + } else { + next.SetPrev(prev) + n.SetNext(nil) + } + + q.len-- +} + +func (q *queue[K, V]) clear() { + for !q.isEmpty() { + q.pop() + } +} diff --git a/vendor/github.com/maypok86/otter/internal/s3fifo/small.go b/vendor/github.com/maypok86/otter/internal/s3fifo/small.go new file mode 100644 index 00000000..75e39771 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/s3fifo/small.go @@ -0,0 +1,89 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package s3fifo + +import ( + "github.com/maypok86/otter/internal/generated/node" +) + +type small[K comparable, V any] struct { + q *queue[K, V] + main *main[K, V] + ghost *ghost[K, V] + cost int + maxCost int + evictNode func(node.Node[K, V]) +} + +func newSmall[K comparable, V any]( + maxCost int, + main *main[K, V], + ghost *ghost[K, V], + evictNode func(node.Node[K, V]), +) *small[K, V] { + return &small[K, V]{ + q: newQueue[K, V](), + main: main, + ghost: ghost, + maxCost: maxCost, + evictNode: evictNode, + } +} + +func (s *small[K, V]) insert(n node.Node[K, V]) { + s.q.push(n) + n.MarkSmall() + s.cost += int(n.Cost()) +} + +func (s *small[K, V]) evict() { + if s.cost == 0 { + return + } + + n := s.q.pop() + s.cost -= int(n.Cost()) + n.Unmark() + if !n.IsAlive() || n.HasExpired() { + s.evictNode(n) + return + } + + if n.Frequency() > 1 { + s.main.insert(n) + for s.main.isFull() { + s.main.evict() + } + n.ResetFrequency() + return + } + + s.ghost.insert(n) +} + +func (s *small[K, V]) delete(n node.Node[K, V]) { + s.cost -= int(n.Cost()) + n.Unmark() + s.q.delete(n) +} + +func (s *small[K, V]) length() int { + return s.q.length() +} + +func (s *small[K, V]) clear() { + s.q.clear() + s.cost = 0 +} diff --git a/vendor/github.com/maypok86/otter/internal/stats/counter.go b/vendor/github.com/maypok86/otter/internal/stats/counter.go new file mode 100644 index 00000000..0958c6f2 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/stats/counter.go @@ -0,0 +1,108 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// Copyright (c) 2021 Andrey Pechkurov +// +// Copyright notice. This code is a fork of xsync.Counter from this file with some changes: +// https://github.com/puzpuzpuz/xsync/blob/main/counter.go +// +// Use of this source code is governed by a MIT license that can be found +// at https://github.com/puzpuzpuz/xsync/blob/main/LICENSE + +package stats + +import ( + "sync" + "sync/atomic" + + "github.com/maypok86/otter/internal/xmath" + "github.com/maypok86/otter/internal/xruntime" +) + +// pool for P tokens. +var tokenPool sync.Pool + +// a P token is used to point at the current OS thread (P) +// on which the goroutine is run; exact identity of the thread, +// as well as P migration tolerance, is not important since +// it's used to as a best effort mechanism for assigning +// concurrent operations (goroutines) to different stripes of +// the counter. +type token struct { + idx uint32 + padding [xruntime.CacheLineSize - 4]byte +} + +// A counter is a striped int64 counter. +// +// Should be preferred over a single atomically updated int64 +// counter in high contention scenarios. +// +// A counter must not be copied after first use. +type counter struct { + shards []cshard + mask uint32 +} + +type cshard struct { + c int64 + padding [xruntime.CacheLineSize - 8]byte +} + +// newCounter creates a new counter instance. +func newCounter() *counter { + nshards := xmath.RoundUpPowerOf2(xruntime.Parallelism()) + return &counter{ + shards: make([]cshard, nshards), + mask: nshards - 1, + } +} + +// increment increments the counter by 1. +func (c *counter) increment() { + c.add(1) +} + +// decrement decrements the counter by 1. +func (c *counter) decrement() { + c.add(-1) +} + +// add adds the delta to the counter. +func (c *counter) add(delta int64) { + t, ok := tokenPool.Get().(*token) + if !ok { + t = &token{} + t.idx = xruntime.Fastrand() + } + for { + shard := &c.shards[t.idx&c.mask] + cnt := atomic.LoadInt64(&shard.c) + if atomic.CompareAndSwapInt64(&shard.c, cnt, cnt+delta) { + break + } + // Give a try with another randomly selected shard. + t.idx = xruntime.Fastrand() + } + tokenPool.Put(t) +} + +// value returns the current counter value. +// The returned value may not include all of the latest operations in +// presence of concurrent modifications of the counter. +func (c *counter) value() int64 { + v := int64(0) + for i := 0; i < len(c.shards); i++ { + shard := &c.shards[i] + v += atomic.LoadInt64(&shard.c) + } + return v +} + +// reset resets the counter to zero. +// This method should only be used when it is known that there are +// no concurrent modifications of the counter. +func (c *counter) reset() { + for i := 0; i < len(c.shards); i++ { + shard := &c.shards[i] + atomic.StoreInt64(&shard.c, 0) + } +} diff --git a/vendor/github.com/maypok86/otter/internal/stats/stats.go b/vendor/github.com/maypok86/otter/internal/stats/stats.go new file mode 100644 index 00000000..e3824fa0 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/stats/stats.go @@ -0,0 +1,143 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package stats + +import ( + "sync/atomic" + "unsafe" + + "github.com/maypok86/otter/internal/xruntime" +) + +// Stats is a thread-safe statistics collector. +type Stats struct { + hits *counter + misses *counter + rejectedSets *counter + evictedCountersPadding [xruntime.CacheLineSize - 2*unsafe.Sizeof(atomic.Int64{})]byte + evictedCount atomic.Int64 + evictedCost atomic.Int64 +} + +// New creates a new Stats collector. +func New() *Stats { + return &Stats{ + hits: newCounter(), + misses: newCounter(), + rejectedSets: newCounter(), + } +} + +// IncHits increments the hits counter. +func (s *Stats) IncHits() { + if s == nil { + return + } + + s.hits.increment() +} + +// Hits returns the number of cache hits. +func (s *Stats) Hits() int64 { + if s == nil { + return 0 + } + + return s.hits.value() +} + +// IncMisses increments the misses counter. +func (s *Stats) IncMisses() { + if s == nil { + return + } + + s.misses.increment() +} + +// Misses returns the number of cache misses. +func (s *Stats) Misses() int64 { + if s == nil { + return 0 + } + + return s.misses.value() +} + +// IncRejectedSets increments the rejectedSets counter. +func (s *Stats) IncRejectedSets() { + if s == nil { + return + } + + s.rejectedSets.increment() +} + +// RejectedSets returns the number of rejected sets. +func (s *Stats) RejectedSets() int64 { + if s == nil { + return 0 + } + + return s.rejectedSets.value() +} + +// IncEvictedCount increments the evictedCount counter. +func (s *Stats) IncEvictedCount() { + if s == nil { + return + } + + s.evictedCount.Add(1) +} + +// EvictedCount returns the number of evicted entries. +func (s *Stats) EvictedCount() int64 { + if s == nil { + return 0 + } + + return s.evictedCount.Load() +} + +// AddEvictedCost adds cost to the evictedCost counter. +func (s *Stats) AddEvictedCost(cost uint32) { + if s == nil { + return + } + + s.evictedCost.Add(int64(cost)) +} + +// EvictedCost returns the sum of costs of evicted entries. +func (s *Stats) EvictedCost() int64 { + if s == nil { + return 0 + } + + return s.evictedCost.Load() +} + +func (s *Stats) Clear() { + if s == nil { + return + } + + s.hits.reset() + s.misses.reset() + s.rejectedSets.reset() + s.evictedCount.Store(0) + s.evictedCost.Store(0) +} diff --git a/vendor/github.com/maypok86/otter/internal/unixtime/unixtime.go b/vendor/github.com/maypok86/otter/internal/unixtime/unixtime.go new file mode 100644 index 00000000..38f7b19f --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/unixtime/unixtime.go @@ -0,0 +1,93 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unixtime + +import ( + "sync" + "sync/atomic" + "time" +) + +var ( + // We need this package because time.Now() is slower, allocates memory, + // and we don't need a more precise time for the expiry time (and most other operations). + now uint32 + startTime int64 + + mutex sync.Mutex + countInstance int + done chan struct{} +) + +func startTimer() { + done = make(chan struct{}) + atomic.StoreInt64(&startTime, time.Now().Unix()) + atomic.StoreUint32(&now, uint32(0)) + + go func() { + ticker := time.NewTicker(time.Second) + defer ticker.Stop() + for { + select { + case t := <-ticker.C: + //nolint:gosec // there will never be an overflow + atomic.StoreUint32(&now, uint32(t.Unix()-StartTime())) + case <-done: + return + } + } + }() +} + +// Start should be called when the cache instance is created to initialize the timer. +func Start() { + mutex.Lock() + defer mutex.Unlock() + + if countInstance == 0 { + startTimer() + } + + countInstance++ +} + +// Stop should be called when closing and stopping the cache instance to stop the timer. +func Stop() { + mutex.Lock() + defer mutex.Unlock() + + countInstance-- + if countInstance == 0 { + done <- struct{}{} + close(done) + } +} + +// Now returns time as a Unix time, the number of seconds elapsed since program start. +func Now() uint32 { + return atomic.LoadUint32(&now) +} + +// SetNow sets the current time. +// +// NOTE: use only for testing and debugging. +func SetNow(t uint32) { + atomic.StoreUint32(&now, t) +} + +// StartTime returns the start time of the program. +func StartTime() int64 { + return atomic.LoadInt64(&startTime) +} diff --git a/vendor/github.com/maypok86/otter/internal/xmath/power.go b/vendor/github.com/maypok86/otter/internal/xmath/power.go new file mode 100644 index 00000000..384d7659 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/xmath/power.go @@ -0,0 +1,30 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package xmath + +// RoundUpPowerOf2 is based on https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2. +func RoundUpPowerOf2(v uint32) uint32 { + if v == 0 { + return 1 + } + v-- + v |= v >> 1 + v |= v >> 2 + v |= v >> 4 + v |= v >> 8 + v |= v >> 16 + v++ + return v +} diff --git a/vendor/github.com/maypok86/otter/internal/xruntime/runtime.go b/vendor/github.com/maypok86/otter/internal/xruntime/runtime.go new file mode 100644 index 00000000..4813c8c9 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/xruntime/runtime.go @@ -0,0 +1,25 @@ +//go:build !go1.22 + +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package xruntime + +import ( + _ "unsafe" +) + +//go:noescape +//go:linkname Fastrand runtime.fastrand +func Fastrand() uint32 diff --git a/vendor/github.com/maypok86/otter/internal/xruntime/runtime_1.22.go b/vendor/github.com/maypok86/otter/internal/xruntime/runtime_1.22.go new file mode 100644 index 00000000..4827a343 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/xruntime/runtime_1.22.go @@ -0,0 +1,26 @@ +//go:build go1.22 + +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package xruntime + +import ( + "math/rand/v2" +) + +func Fastrand() uint32 { + //nolint:gosec // we don't need a cryptographically secure random number generator + return rand.Uint32() +} diff --git a/vendor/github.com/maypok86/otter/internal/xruntime/xruntime.go b/vendor/github.com/maypok86/otter/internal/xruntime/xruntime.go new file mode 100644 index 00000000..9c5de936 --- /dev/null +++ b/vendor/github.com/maypok86/otter/internal/xruntime/xruntime.go @@ -0,0 +1,36 @@ +// Copyright (c) 2023 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package xruntime + +import ( + "runtime" +) + +const ( + // CacheLineSize is useful for preventing false sharing. + CacheLineSize = 64 +) + +// Parallelism returns the maximum possible number of concurrently running goroutines. +func Parallelism() uint32 { + //nolint:gosec // there will never be an overflow + maxProcs := uint32(runtime.GOMAXPROCS(0)) + //nolint:gosec // there will never be an overflow + numCPU := uint32(runtime.NumCPU()) + if maxProcs < numCPU { + return maxProcs + } + return numCPU +} diff --git a/vendor/github.com/maypok86/otter/stats.go b/vendor/github.com/maypok86/otter/stats.go new file mode 100644 index 00000000..c80b849b --- /dev/null +++ b/vendor/github.com/maypok86/otter/stats.go @@ -0,0 +1,95 @@ +// Copyright (c) 2024 Alexey Mayshev. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package otter + +import ( + "math" + + "github.com/maypok86/otter/internal/stats" +) + +// Stats is a statistics snapshot. +type Stats struct { + hits int64 + misses int64 + rejectedSets int64 + evictedCount int64 + evictedCost int64 +} + +func newStats(s *stats.Stats) Stats { + return Stats{ + hits: negativeToMax(s.Hits()), + misses: negativeToMax(s.Misses()), + rejectedSets: negativeToMax(s.RejectedSets()), + evictedCount: negativeToMax(s.EvictedCount()), + evictedCost: negativeToMax(s.EvictedCost()), + } +} + +// Hits returns the number of cache hits. +func (s Stats) Hits() int64 { + return s.hits +} + +// Misses returns the number of cache misses. +func (s Stats) Misses() int64 { + return s.misses +} + +// Ratio returns the cache hit ratio. +func (s Stats) Ratio() float64 { + requests := checkedAdd(s.hits, s.misses) + if requests == 0 { + return 0.0 + } + return float64(s.hits) / float64(requests) +} + +// RejectedSets returns the number of rejected sets. +func (s Stats) RejectedSets() int64 { + return s.rejectedSets +} + +// EvictedCount returns the number of evicted entries. +func (s Stats) EvictedCount() int64 { + return s.evictedCount +} + +// EvictedCost returns the sum of costs of evicted entries. +func (s Stats) EvictedCost() int64 { + return s.evictedCost +} + +func checkedAdd(a, b int64) int64 { + naiveSum := a + b + if (a^b) < 0 || (a^naiveSum) >= 0 { + // If a and b have different signs or a has the same sign as the result then there was no overflow, return. + return naiveSum + } + // we did over/under flow, if the sign is negative we should return math.MaxInt64 otherwise math.MinInt64. + if naiveSum < 0 { + return math.MaxInt64 + } + return math.MinInt64 +} + +func negativeToMax(v int64) int64 { + if v < 0 { + return math.MaxInt64 + } + + return v +} diff --git a/vendor/github.com/spf13/cast/README.md b/vendor/github.com/spf13/cast/README.md index 0e9e1459..1be666a4 100644 --- a/vendor/github.com/spf13/cast/README.md +++ b/vendor/github.com/spf13/cast/README.md @@ -1,6 +1,6 @@ # cast -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/cast/ci.yaml?branch=master&style=flat-square)](https://github.com/spf13/cast/actions/workflows/ci.yaml) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/cast/test.yaml?branch=master&style=flat-square)](https://github.com/spf13/cast/actions/workflows/test.yaml) [![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/spf13/cast)](https://pkg.go.dev/mod/github.com/spf13/cast) ![Go Version](https://img.shields.io/badge/go%20version-%3E=1.16-61CFDD.svg?style=flat-square) [![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast?style=flat-square)](https://goreportcard.com/report/github.com/spf13/cast) diff --git a/vendor/github.com/spf13/cast/caste.go b/vendor/github.com/spf13/cast/caste.go index cd9c0488..4181a2e7 100644 --- a/vendor/github.com/spf13/cast/caste.go +++ b/vendor/github.com/spf13/cast/caste.go @@ -613,12 +613,12 @@ func ToUint64E(i interface{}) (uint64, error) { switch s := i.(type) { case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + v, err := strconv.ParseUint(trimZeroDecimal(s), 0, 0) if err == nil { if v < 0 { return 0, errNegativeNotAllowed } - return uint64(v), nil + return v, nil } return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i) case json.Number: diff --git a/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go index 822d8479..691d96c7 100644 --- a/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go +++ b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go @@ -49,12 +49,11 @@ func AsBoolSlice(v interface{}) []bool { if rv.Type().Kind() != reflect.Array { return nil } - var zero bool - correctLen := rv.Len() - correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) - cpy := reflect.New(correctType) - _ = reflect.Copy(cpy.Elem(), rv) - return cpy.Elem().Slice(0, correctLen).Interface().([]bool) + cpy := make([]bool, rv.Len()) + if len(cpy) > 0 { + _ = reflect.Copy(reflect.ValueOf(cpy), rv) + } + return cpy } // AsInt64Slice converts an int64 array into a slice into with same elements as array. @@ -63,12 +62,11 @@ func AsInt64Slice(v interface{}) []int64 { if rv.Type().Kind() != reflect.Array { return nil } - var zero int64 - correctLen := rv.Len() - correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) - cpy := reflect.New(correctType) - _ = reflect.Copy(cpy.Elem(), rv) - return cpy.Elem().Slice(0, correctLen).Interface().([]int64) + cpy := make([]int64, rv.Len()) + if len(cpy) > 0 { + _ = reflect.Copy(reflect.ValueOf(cpy), rv) + } + return cpy } // AsFloat64Slice converts a float64 array into a slice into with same elements as array. @@ -77,12 +75,11 @@ func AsFloat64Slice(v interface{}) []float64 { if rv.Type().Kind() != reflect.Array { return nil } - var zero float64 - correctLen := rv.Len() - correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) - cpy := reflect.New(correctType) - _ = reflect.Copy(cpy.Elem(), rv) - return cpy.Elem().Slice(0, correctLen).Interface().([]float64) + cpy := make([]float64, rv.Len()) + if len(cpy) > 0 { + _ = reflect.Copy(reflect.ValueOf(cpy), rv) + } + return cpy } // AsStringSlice converts a string array into a slice into with same elements as array. @@ -91,10 +88,9 @@ func AsStringSlice(v interface{}) []string { if rv.Type().Kind() != reflect.Array { return nil } - var zero string - correctLen := rv.Len() - correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) - cpy := reflect.New(correctType) - _ = reflect.Copy(cpy.Elem(), rv) - return cpy.Elem().Slice(0, correctLen).Interface().([]string) + cpy := make([]string, rv.Len()) + if len(cpy) > 0 { + _ = reflect.Copy(reflect.ValueOf(cpy), rv) + } + return cpy } diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go index db42e667..c709b728 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (!arm64 && !s390x && !ppc64le) || !gc || purego +//go:build (!arm64 && !s390x && !ppc64 && !ppc64le) || !gc || purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.go similarity index 89% rename from vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go rename to vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.go index 3a4287f9..bd183d9b 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build gc && !purego +//go:build gc && !purego && (ppc64 || ppc64le) package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.s similarity index 76% rename from vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s rename to vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.s index c672ccf6..a660b411 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s +++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.s @@ -19,7 +19,7 @@ // The differences in this and the original implementation are // due to the calling conventions and initialization of constants. -//go:build gc && !purego +//go:build gc && !purego && (ppc64 || ppc64le) #include "textflag.h" @@ -36,32 +36,68 @@ // for VPERMXOR #define MASK R18 -DATA consts<>+0x00(SB)/8, $0x3320646e61707865 -DATA consts<>+0x08(SB)/8, $0x6b20657479622d32 -DATA consts<>+0x10(SB)/8, $0x0000000000000001 -DATA consts<>+0x18(SB)/8, $0x0000000000000000 -DATA consts<>+0x20(SB)/8, $0x0000000000000004 -DATA consts<>+0x28(SB)/8, $0x0000000000000000 -DATA consts<>+0x30(SB)/8, $0x0a0b08090e0f0c0d -DATA consts<>+0x38(SB)/8, $0x0203000106070405 -DATA consts<>+0x40(SB)/8, $0x090a0b080d0e0f0c -DATA consts<>+0x48(SB)/8, $0x0102030005060704 -DATA consts<>+0x50(SB)/8, $0x6170786561707865 -DATA consts<>+0x58(SB)/8, $0x6170786561707865 -DATA consts<>+0x60(SB)/8, $0x3320646e3320646e -DATA consts<>+0x68(SB)/8, $0x3320646e3320646e -DATA consts<>+0x70(SB)/8, $0x79622d3279622d32 -DATA consts<>+0x78(SB)/8, $0x79622d3279622d32 -DATA consts<>+0x80(SB)/8, $0x6b2065746b206574 -DATA consts<>+0x88(SB)/8, $0x6b2065746b206574 -DATA consts<>+0x90(SB)/8, $0x0000000100000000 -DATA consts<>+0x98(SB)/8, $0x0000000300000002 -DATA consts<>+0xa0(SB)/8, $0x5566774411223300 -DATA consts<>+0xa8(SB)/8, $0xddeeffcc99aabb88 -DATA consts<>+0xb0(SB)/8, $0x6677445522330011 -DATA consts<>+0xb8(SB)/8, $0xeeffccddaabb8899 +DATA consts<>+0x00(SB)/4, $0x61707865 +DATA consts<>+0x04(SB)/4, $0x3320646e +DATA consts<>+0x08(SB)/4, $0x79622d32 +DATA consts<>+0x0c(SB)/4, $0x6b206574 +DATA consts<>+0x10(SB)/4, $0x00000001 +DATA consts<>+0x14(SB)/4, $0x00000000 +DATA consts<>+0x18(SB)/4, $0x00000000 +DATA consts<>+0x1c(SB)/4, $0x00000000 +DATA consts<>+0x20(SB)/4, $0x00000004 +DATA consts<>+0x24(SB)/4, $0x00000000 +DATA consts<>+0x28(SB)/4, $0x00000000 +DATA consts<>+0x2c(SB)/4, $0x00000000 +DATA consts<>+0x30(SB)/4, $0x0e0f0c0d +DATA consts<>+0x34(SB)/4, $0x0a0b0809 +DATA consts<>+0x38(SB)/4, $0x06070405 +DATA consts<>+0x3c(SB)/4, $0x02030001 +DATA consts<>+0x40(SB)/4, $0x0d0e0f0c +DATA consts<>+0x44(SB)/4, $0x090a0b08 +DATA consts<>+0x48(SB)/4, $0x05060704 +DATA consts<>+0x4c(SB)/4, $0x01020300 +DATA consts<>+0x50(SB)/4, $0x61707865 +DATA consts<>+0x54(SB)/4, $0x61707865 +DATA consts<>+0x58(SB)/4, $0x61707865 +DATA consts<>+0x5c(SB)/4, $0x61707865 +DATA consts<>+0x60(SB)/4, $0x3320646e +DATA consts<>+0x64(SB)/4, $0x3320646e +DATA consts<>+0x68(SB)/4, $0x3320646e +DATA consts<>+0x6c(SB)/4, $0x3320646e +DATA consts<>+0x70(SB)/4, $0x79622d32 +DATA consts<>+0x74(SB)/4, $0x79622d32 +DATA consts<>+0x78(SB)/4, $0x79622d32 +DATA consts<>+0x7c(SB)/4, $0x79622d32 +DATA consts<>+0x80(SB)/4, $0x6b206574 +DATA consts<>+0x84(SB)/4, $0x6b206574 +DATA consts<>+0x88(SB)/4, $0x6b206574 +DATA consts<>+0x8c(SB)/4, $0x6b206574 +DATA consts<>+0x90(SB)/4, $0x00000000 +DATA consts<>+0x94(SB)/4, $0x00000001 +DATA consts<>+0x98(SB)/4, $0x00000002 +DATA consts<>+0x9c(SB)/4, $0x00000003 +DATA consts<>+0xa0(SB)/4, $0x11223300 +DATA consts<>+0xa4(SB)/4, $0x55667744 +DATA consts<>+0xa8(SB)/4, $0x99aabb88 +DATA consts<>+0xac(SB)/4, $0xddeeffcc +DATA consts<>+0xb0(SB)/4, $0x22330011 +DATA consts<>+0xb4(SB)/4, $0x66774455 +DATA consts<>+0xb8(SB)/4, $0xaabb8899 +DATA consts<>+0xbc(SB)/4, $0xeeffccdd GLOBL consts<>(SB), RODATA, $0xc0 +#ifdef GOARCH_ppc64 +#define BE_XXBRW_INIT() \ + LVSL (R0)(R0), V24 \ + VSPLTISB $3, V25 \ + VXOR V24, V25, V24 \ + +#define BE_XXBRW(vr) VPERM vr, vr, V24, vr +#else +#define BE_XXBRW_INIT() +#define BE_XXBRW(vr) +#endif + //func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32) TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40 MOVD out+0(FP), OUT @@ -94,6 +130,8 @@ TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40 // Clear V27 VXOR V27, V27, V27 + BE_XXBRW_INIT() + // V28 LXVW4X (CONSTBASE)(R11), VS60 @@ -299,6 +337,11 @@ loop_vsx: VADDUWM V8, V18, V8 VADDUWM V12, V19, V12 + BE_XXBRW(V0) + BE_XXBRW(V4) + BE_XXBRW(V8) + BE_XXBRW(V12) + CMPU LEN, $64 BLT tail_vsx @@ -327,6 +370,11 @@ loop_vsx: VADDUWM V9, V18, V8 VADDUWM V13, V19, V12 + BE_XXBRW(V0) + BE_XXBRW(V4) + BE_XXBRW(V8) + BE_XXBRW(V12) + CMPU LEN, $64 BLT tail_vsx @@ -334,8 +382,8 @@ loop_vsx: LXVW4X (INP)(R8), VS60 LXVW4X (INP)(R9), VS61 LXVW4X (INP)(R10), VS62 - VXOR V27, V0, V27 + VXOR V27, V0, V27 VXOR V28, V4, V28 VXOR V29, V8, V29 VXOR V30, V12, V30 @@ -354,6 +402,11 @@ loop_vsx: VADDUWM V10, V18, V8 VADDUWM V14, V19, V12 + BE_XXBRW(V0) + BE_XXBRW(V4) + BE_XXBRW(V8) + BE_XXBRW(V12) + CMPU LEN, $64 BLT tail_vsx @@ -381,6 +434,11 @@ loop_vsx: VADDUWM V11, V18, V8 VADDUWM V15, V19, V12 + BE_XXBRW(V0) + BE_XXBRW(V4) + BE_XXBRW(V8) + BE_XXBRW(V12) + CMPU LEN, $64 BLT tail_vsx @@ -408,9 +466,9 @@ loop_vsx: done_vsx: // Increment counter by number of 64 byte blocks - MOVD (CNT), R14 + MOVWZ (CNT), R14 ADD BLOCKS, R14 - MOVD R14, (CNT) + MOVWZ R14, (CNT) RET tail_vsx: diff --git a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go index 333da285..bd896bdc 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (!amd64 && !ppc64le && !s390x) || !gc || purego +//go:build (!amd64 && !ppc64le && !ppc64 && !s390x) || !gc || purego package poly1305 diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.go similarity index 95% rename from vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go rename to vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.go index 4aec4874..1a1679aa 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build gc && !purego +//go:build gc && !purego && (ppc64 || ppc64le) package poly1305 diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s similarity index 89% rename from vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s rename to vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s index b3c1699b..6899a1da 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s @@ -2,15 +2,25 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build gc && !purego +//go:build gc && !purego && (ppc64 || ppc64le) #include "textflag.h" // This was ported from the amd64 implementation. +#ifdef GOARCH_ppc64le +#define LE_MOVD MOVD +#define LE_MOVWZ MOVWZ +#define LE_MOVHZ MOVHZ +#else +#define LE_MOVD MOVDBR +#define LE_MOVWZ MOVWBR +#define LE_MOVHZ MOVHBR +#endif + #define POLY1305_ADD(msg, h0, h1, h2, t0, t1, t2) \ - MOVD (msg), t0; \ - MOVD 8(msg), t1; \ + LE_MOVD (msg)( R0), t0; \ + LE_MOVD (msg)(R24), t1; \ MOVD $1, t2; \ ADDC t0, h0, h0; \ ADDE t1, h1, h1; \ @@ -50,10 +60,6 @@ ADDE t3, h1, h1; \ ADDZE h2 -DATA ·poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF -DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC -GLOBL ·poly1305Mask<>(SB), RODATA, $16 - // func update(state *[7]uint64, msg []byte) TEXT ·update(SB), $0-32 MOVD state+0(FP), R3 @@ -66,6 +72,8 @@ TEXT ·update(SB), $0-32 MOVD 24(R3), R11 // r0 MOVD 32(R3), R12 // r1 + MOVD $8, R24 + CMP R5, $16 BLT bytes_between_0_and_15 @@ -94,7 +102,7 @@ flush_buffer: // Greater than 8 -- load the rightmost remaining bytes in msg // and put into R17 (h1) - MOVD (R4)(R21), R17 + LE_MOVD (R4)(R21), R17 MOVD $16, R22 // Find the offset to those bytes @@ -118,7 +126,7 @@ just1: BLT less8 // Exactly 8 - MOVD (R4), R16 + LE_MOVD (R4), R16 CMP R17, $0 @@ -133,7 +141,7 @@ less8: MOVD $0, R22 // shift count CMP R5, $4 BLT less4 - MOVWZ (R4), R16 + LE_MOVWZ (R4), R16 ADD $4, R4 ADD $-4, R5 MOVD $32, R22 @@ -141,7 +149,7 @@ less8: less4: CMP R5, $2 BLT less2 - MOVHZ (R4), R21 + LE_MOVHZ (R4), R21 SLD R22, R21, R21 OR R16, R21, R16 ADD $16, R22 diff --git a/vendor/golang.org/x/crypto/poly1305/poly1305_compat.go b/vendor/golang.org/x/crypto/poly1305/poly1305_compat.go deleted file mode 100644 index cb9207f3..00000000 --- a/vendor/golang.org/x/crypto/poly1305/poly1305_compat.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package poly1305 implements Poly1305 one-time message authentication code as -// specified in https://cr.yp.to/mac/poly1305-20050329.pdf. -// -// Poly1305 is a fast, one-time authentication function. It is infeasible for an -// attacker to generate an authenticator for a message without the key. However, a -// key must only be used for a single message. Authenticating two different -// messages with the same key allows an attacker to forge authenticators for other -// messages with the same key. -// -// Poly1305 was originally coupled with AES in order to make Poly1305-AES. AES was -// used with a fixed key in order to generate one-time keys from an nonce. -// However, in this package AES isn't used and the one-time key is specified -// directly. -// -// Deprecated: Poly1305 as implemented by this package is a cryptographic -// building block that is not safe for general purpose use. -// For encryption, use the full ChaCha20-Poly1305 construction implemented by -// golang.org/x/crypto/chacha20poly1305. For authentication, use a general -// purpose MAC such as HMAC implemented by crypto/hmac. -package poly1305 - -import "golang.org/x/crypto/internal/poly1305" - -// TagSize is the size, in bytes, of a poly1305 authenticator. -// -// For use with golang.org/x/crypto/chacha20poly1305, chacha20poly1305.Overhead -// can be used instead. -const TagSize = 16 - -// Sum generates an authenticator for msg using a one-time key and puts the -// 16-byte result into out. Authenticating two different messages with the same -// key allows an attacker to forge messages at will. -func Sum(out *[16]byte, m []byte, key *[32]byte) { - poly1305.Sum(out, m, key) -} - -// Verify returns true if mac is a valid authenticator for m with the given key. -func Verify(mac *[16]byte, m []byte, key *[32]byte) bool { - return poly1305.Verify(mac, m, key) -} - -// New returns a new MAC computing an authentication -// tag of all data written to it with the given key. -// This allows writing the message progressively instead -// of passing it as a single slice. Common users should use -// the Sum function instead. -// -// The key must be unique for each message, as authenticating -// two different messages with the same key allows an attacker -// to forge messages at will. -func New(key *[32]byte) *MAC { - return &MAC{mac: poly1305.New(key)} -} - -// MAC is an io.Writer computing an authentication tag -// of the data written to it. -// -// MAC cannot be used like common hash.Hash implementations, -// because using a poly1305 key twice breaks its security. -// Therefore writing data to a running MAC after calling -// Sum or Verify causes it to panic. -type MAC struct { - mac *poly1305.MAC -} - -// Size returns the number of bytes Sum will return. -func (h *MAC) Size() int { return TagSize } - -// Write adds more data to the running message authentication code. -// It never returns an error. -// -// It must not be called after the first call of Sum or Verify. -func (h *MAC) Write(p []byte) (n int, err error) { - return h.mac.Write(p) -} - -// Sum computes the authenticator of all data written to the -// message authentication code. -func (h *MAC) Sum(b []byte) []byte { - return h.mac.Sum(b) -} - -// Verify returns whether the authenticator of all data written to -// the message authentication code matches the expected value. -func (h *MAC) Verify(expected []byte) bool { - return h.mac.Verify(expected) -} diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go index b9396101..b86dde15 100644 --- a/vendor/golang.org/x/crypto/ssh/client_auth.go +++ b/vendor/golang.org/x/crypto/ssh/client_auth.go @@ -555,6 +555,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe } gotMsgExtInfo := false + gotUserAuthInfoRequest := false for { packet, err := c.readPacket() if err != nil { @@ -585,6 +586,9 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe if msg.PartialSuccess { return authPartialSuccess, msg.Methods, nil } + if !gotUserAuthInfoRequest { + return authFailure, msg.Methods, unexpectedMessageError(msgUserAuthInfoRequest, packet[0]) + } return authFailure, msg.Methods, nil case msgUserAuthSuccess: return authSuccess, nil, nil @@ -596,6 +600,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe if err := Unmarshal(packet, &msg); err != nil { return authFailure, nil, err } + gotUserAuthInfoRequest = true // Manually unpack the prompt/echo pairs. rest := msg.Prompts diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index c0d1c29e..5b5ccd96 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -149,7 +149,7 @@ func (s *ServerConfig) AddHostKey(key Signer) { } // cachedPubKey contains the results of querying whether a public key is -// acceptable for a user. +// acceptable for a user. This is a FIFO cache. type cachedPubKey struct { user string pubKeyData []byte @@ -157,7 +157,13 @@ type cachedPubKey struct { perms *Permissions } -const maxCachedPubKeys = 16 +// maxCachedPubKeys is the number of cache entries we store. +// +// Due to consistent misuse of the PublicKeyCallback API, we have reduced this +// to 1, such that the only key in the cache is the most recently seen one. This +// forces the behavior that the last call to PublicKeyCallback will always be +// with the key that is used for authentication. +const maxCachedPubKeys = 1 // pubKeyCache caches tests for public keys. Since SSH clients // will query whether a public key is acceptable before attempting to @@ -179,9 +185,10 @@ func (c *pubKeyCache) get(user string, pubKeyData []byte) (cachedPubKey, bool) { // add adds the given tuple to the cache. func (c *pubKeyCache) add(candidate cachedPubKey) { - if len(c.keys) < maxCachedPubKeys { - c.keys = append(c.keys, candidate) + if len(c.keys) >= maxCachedPubKeys { + c.keys = c.keys[1:] } + c.keys = append(c.keys, candidate) } // ServerConn is an authenticated SSH connection, as seen from the diff --git a/vendor/golang.org/x/exp/constraints/constraints.go b/vendor/golang.org/x/exp/constraints/constraints.go index 2c033dff..a9392af7 100644 --- a/vendor/golang.org/x/exp/constraints/constraints.go +++ b/vendor/golang.org/x/exp/constraints/constraints.go @@ -45,6 +45,8 @@ type Complex interface { // that supports the operators < <= >= >. // If future releases of Go add new ordered types, // this constraint will be modified to include them. +// +// This type is redundant since Go 1.21 introduced [cmp.Ordered]. type Ordered interface { Integer | Float | ~string } diff --git a/vendor/golang.org/x/exp/slices/cmp.go b/vendor/golang.org/x/exp/slices/cmp.go deleted file mode 100644 index fbf1934a..00000000 --- a/vendor/golang.org/x/exp/slices/cmp.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package slices - -import "golang.org/x/exp/constraints" - -// min is a version of the predeclared function from the Go 1.21 release. -func min[T constraints.Ordered](a, b T) T { - if a < b || isNaN(a) { - return a - } - return b -} - -// max is a version of the predeclared function from the Go 1.21 release. -func max[T constraints.Ordered](a, b T) T { - if a > b || isNaN(a) { - return a - } - return b -} - -// cmpLess is a copy of cmp.Less from the Go 1.21 release. -func cmpLess[T constraints.Ordered](x, y T) bool { - return (isNaN(x) && !isNaN(y)) || x < y -} - -// cmpCompare is a copy of cmp.Compare from the Go 1.21 release. -func cmpCompare[T constraints.Ordered](x, y T) int { - xNaN := isNaN(x) - yNaN := isNaN(y) - if xNaN && yNaN { - return 0 - } - if xNaN || x < y { - return -1 - } - if yNaN || x > y { - return +1 - } - return 0 -} diff --git a/vendor/golang.org/x/exp/slices/slices.go b/vendor/golang.org/x/exp/slices/slices.go index 46ceac34..757383ea 100644 --- a/vendor/golang.org/x/exp/slices/slices.go +++ b/vendor/golang.org/x/exp/slices/slices.go @@ -6,26 +6,22 @@ package slices import ( - "unsafe" - - "golang.org/x/exp/constraints" + "cmp" + "slices" ) +// TODO(adonovan): when https://go.dev/issue/32816 is accepted, all of +// these functions should be annotated (provisionally with "//go:fix +// inline") so that tools can safely and automatically replace calls +// to exp/slices with calls to std slices by inlining them. + // Equal reports whether two slices are equal: the same length and all // elements equal. If the lengths are different, Equal returns false. // Otherwise, the elements are compared in increasing index order, and the // comparison stops at the first unequal pair. // Floating point NaNs are not considered equal. func Equal[S ~[]E, E comparable](s1, s2 S) bool { - if len(s1) != len(s2) { - return false - } - for i := range s1 { - if s1[i] != s2[i] { - return false - } - } - return true + return slices.Equal(s1, s2) } // EqualFunc reports whether two slices are equal using an equality @@ -34,16 +30,7 @@ func Equal[S ~[]E, E comparable](s1, s2 S) bool { // increasing index order, and the comparison stops at the first index // for which eq returns false. func EqualFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, eq func(E1, E2) bool) bool { - if len(s1) != len(s2) { - return false - } - for i, v1 := range s1 { - v2 := s2[i] - if !eq(v1, v2) { - return false - } - } - return true + return slices.EqualFunc(s1, s2, eq) } // Compare compares the elements of s1 and s2, using [cmp.Compare] on each pair @@ -53,20 +40,8 @@ func EqualFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, eq func(E1, E2) boo // If both slices are equal until one of them ends, the shorter slice is // considered less than the longer one. // The result is 0 if s1 == s2, -1 if s1 < s2, and +1 if s1 > s2. -func Compare[S ~[]E, E constraints.Ordered](s1, s2 S) int { - for i, v1 := range s1 { - if i >= len(s2) { - return +1 - } - v2 := s2[i] - if c := cmpCompare(v1, v2); c != 0 { - return c - } - } - if len(s1) < len(s2) { - return -1 - } - return 0 +func Compare[S ~[]E, E cmp.Ordered](s1, s2 S) int { + return slices.Compare(s1, s2) } // CompareFunc is like [Compare] but uses a custom comparison function on each @@ -75,52 +50,30 @@ func Compare[S ~[]E, E constraints.Ordered](s1, s2 S) int { // returns 0 the result is 0 if len(s1) == len(s2), -1 if len(s1) < len(s2), // and +1 if len(s1) > len(s2). func CompareFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, cmp func(E1, E2) int) int { - for i, v1 := range s1 { - if i >= len(s2) { - return +1 - } - v2 := s2[i] - if c := cmp(v1, v2); c != 0 { - return c - } - } - if len(s1) < len(s2) { - return -1 - } - return 0 + return slices.CompareFunc(s1, s2, cmp) } // Index returns the index of the first occurrence of v in s, // or -1 if not present. func Index[S ~[]E, E comparable](s S, v E) int { - for i := range s { - if v == s[i] { - return i - } - } - return -1 + return slices.Index(s, v) } // IndexFunc returns the first index i satisfying f(s[i]), // or -1 if none do. func IndexFunc[S ~[]E, E any](s S, f func(E) bool) int { - for i := range s { - if f(s[i]) { - return i - } - } - return -1 + return slices.IndexFunc(s, f) } // Contains reports whether v is present in s. func Contains[S ~[]E, E comparable](s S, v E) bool { - return Index(s, v) >= 0 + return slices.Contains(s, v) } // ContainsFunc reports whether at least one // element e of s satisfies f(e). func ContainsFunc[S ~[]E, E any](s S, f func(E) bool) bool { - return IndexFunc(s, f) >= 0 + return slices.ContainsFunc(s, f) } // Insert inserts the values v... into s at index i, @@ -131,92 +84,7 @@ func ContainsFunc[S ~[]E, E any](s S, f func(E) bool) bool { // Insert panics if i is out of range. // This function is O(len(s) + len(v)). func Insert[S ~[]E, E any](s S, i int, v ...E) S { - m := len(v) - if m == 0 { - return s - } - n := len(s) - if i == n { - return append(s, v...) - } - if n+m > cap(s) { - // Use append rather than make so that we bump the size of - // the slice up to the next storage class. - // This is what Grow does but we don't call Grow because - // that might copy the values twice. - s2 := append(s[:i], make(S, n+m-i)...) - copy(s2[i:], v) - copy(s2[i+m:], s[i:]) - return s2 - } - s = s[:n+m] - - // before: - // s: aaaaaaaabbbbccccccccdddd - // ^ ^ ^ ^ - // i i+m n n+m - // after: - // s: aaaaaaaavvvvbbbbcccccccc - // ^ ^ ^ ^ - // i i+m n n+m - // - // a are the values that don't move in s. - // v are the values copied in from v. - // b and c are the values from s that are shifted up in index. - // d are the values that get overwritten, never to be seen again. - - if !overlaps(v, s[i+m:]) { - // Easy case - v does not overlap either the c or d regions. - // (It might be in some of a or b, or elsewhere entirely.) - // The data we copy up doesn't write to v at all, so just do it. - - copy(s[i+m:], s[i:]) - - // Now we have - // s: aaaaaaaabbbbbbbbcccccccc - // ^ ^ ^ ^ - // i i+m n n+m - // Note the b values are duplicated. - - copy(s[i:], v) - - // Now we have - // s: aaaaaaaavvvvbbbbcccccccc - // ^ ^ ^ ^ - // i i+m n n+m - // That's the result we want. - return s - } - - // The hard case - v overlaps c or d. We can't just shift up - // the data because we'd move or clobber the values we're trying - // to insert. - // So instead, write v on top of d, then rotate. - copy(s[n:], v) - - // Now we have - // s: aaaaaaaabbbbccccccccvvvv - // ^ ^ ^ ^ - // i i+m n n+m - - rotateRight(s[i:], m) - - // Now we have - // s: aaaaaaaavvvvbbbbcccccccc - // ^ ^ ^ ^ - // i i+m n n+m - // That's the result we want. - return s -} - -// clearSlice sets all elements up to the length of s to the zero value of E. -// We may use the builtin clear func instead, and remove clearSlice, when upgrading -// to Go 1.21+. -func clearSlice[S ~[]E, E any](s S) { - var zero E - for i := range s { - s[i] = zero - } + return slices.Insert(s, i, v...) } // Delete removes the elements s[i:j] from s, returning the modified slice. @@ -225,135 +93,27 @@ func clearSlice[S ~[]E, E any](s S) { // make a single call deleting them all together than to delete one at a time. // Delete zeroes the elements s[len(s)-(j-i):len(s)]. func Delete[S ~[]E, E any](s S, i, j int) S { - _ = s[i:j:len(s)] // bounds check - - if i == j { - return s - } - - oldlen := len(s) - s = append(s[:i], s[j:]...) - clearSlice(s[len(s):oldlen]) // zero/nil out the obsolete elements, for GC - return s + return slices.Delete(s, i, j) } // DeleteFunc removes any elements from s for which del returns true, // returning the modified slice. // DeleteFunc zeroes the elements between the new length and the original length. func DeleteFunc[S ~[]E, E any](s S, del func(E) bool) S { - i := IndexFunc(s, del) - if i == -1 { - return s - } - // Don't start copying elements until we find one to delete. - for j := i + 1; j < len(s); j++ { - if v := s[j]; !del(v) { - s[i] = v - i++ - } - } - clearSlice(s[i:]) // zero/nil out the obsolete elements, for GC - return s[:i] + return slices.DeleteFunc(s, del) } // Replace replaces the elements s[i:j] by the given v, and returns the // modified slice. Replace panics if s[i:j] is not a valid slice of s. // When len(v) < (j-i), Replace zeroes the elements between the new length and the original length. func Replace[S ~[]E, E any](s S, i, j int, v ...E) S { - _ = s[i:j] // verify that i:j is a valid subslice - - if i == j { - return Insert(s, i, v...) - } - if j == len(s) { - return append(s[:i], v...) - } - - tot := len(s[:i]) + len(v) + len(s[j:]) - if tot > cap(s) { - // Too big to fit, allocate and copy over. - s2 := append(s[:i], make(S, tot-i)...) // See Insert - copy(s2[i:], v) - copy(s2[i+len(v):], s[j:]) - return s2 - } - - r := s[:tot] - - if i+len(v) <= j { - // Easy, as v fits in the deleted portion. - copy(r[i:], v) - if i+len(v) != j { - copy(r[i+len(v):], s[j:]) - } - clearSlice(s[tot:]) // zero/nil out the obsolete elements, for GC - return r - } - - // We are expanding (v is bigger than j-i). - // The situation is something like this: - // (example has i=4,j=8,len(s)=16,len(v)=6) - // s: aaaaxxxxbbbbbbbbyy - // ^ ^ ^ ^ - // i j len(s) tot - // a: prefix of s - // x: deleted range - // b: more of s - // y: area to expand into - - if !overlaps(r[i+len(v):], v) { - // Easy, as v is not clobbered by the first copy. - copy(r[i+len(v):], s[j:]) - copy(r[i:], v) - return r - } - - // This is a situation where we don't have a single place to which - // we can copy v. Parts of it need to go to two different places. - // We want to copy the prefix of v into y and the suffix into x, then - // rotate |y| spots to the right. - // - // v[2:] v[:2] - // | | - // s: aaaavvvvbbbbbbbbvv - // ^ ^ ^ ^ - // i j len(s) tot - // - // If either of those two destinations don't alias v, then we're good. - y := len(v) - (j - i) // length of y portion - - if !overlaps(r[i:j], v) { - copy(r[i:j], v[y:]) - copy(r[len(s):], v[:y]) - rotateRight(r[i:], y) - return r - } - if !overlaps(r[len(s):], v) { - copy(r[len(s):], v[:y]) - copy(r[i:j], v[y:]) - rotateRight(r[i:], y) - return r - } - - // Now we know that v overlaps both x and y. - // That means that the entirety of b is *inside* v. - // So we don't need to preserve b at all; instead we - // can copy v first, then copy the b part of v out of - // v to the right destination. - k := startIdx(v, s[j:]) - copy(r[i:], v) - copy(r[i+len(v):], r[i+k:]) - return r + return slices.Replace(s, i, j, v...) } // Clone returns a copy of the slice. // The elements are copied using assignment, so this is a shallow clone. func Clone[S ~[]E, E any](s S) S { - // Preserve nil in case it matters. - if s == nil { - return nil - } - return append(S([]E{}), s...) + return slices.Clone(s) } // Compact replaces consecutive runs of equal elements with a single copy. @@ -362,40 +122,14 @@ func Clone[S ~[]E, E any](s S) S { // which may have a smaller length. // Compact zeroes the elements between the new length and the original length. func Compact[S ~[]E, E comparable](s S) S { - if len(s) < 2 { - return s - } - i := 1 - for k := 1; k < len(s); k++ { - if s[k] != s[k-1] { - if i != k { - s[i] = s[k] - } - i++ - } - } - clearSlice(s[i:]) // zero/nil out the obsolete elements, for GC - return s[:i] + return slices.Compact(s) } // CompactFunc is like [Compact] but uses an equality function to compare elements. // For runs of elements that compare equal, CompactFunc keeps the first one. // CompactFunc zeroes the elements between the new length and the original length. func CompactFunc[S ~[]E, E any](s S, eq func(E, E) bool) S { - if len(s) < 2 { - return s - } - i := 1 - for k := 1; k < len(s); k++ { - if !eq(s[k], s[k-1]) { - if i != k { - s[i] = s[k] - } - i++ - } - } - clearSlice(s[i:]) // zero/nil out the obsolete elements, for GC - return s[:i] + return slices.CompactFunc(s, eq) } // Grow increases the slice's capacity, if necessary, to guarantee space for @@ -403,113 +137,15 @@ func CompactFunc[S ~[]E, E any](s S, eq func(E, E) bool) S { // to the slice without another allocation. If n is negative or too large to // allocate the memory, Grow panics. func Grow[S ~[]E, E any](s S, n int) S { - if n < 0 { - panic("cannot be negative") - } - if n -= cap(s) - len(s); n > 0 { - // TODO(https://go.dev/issue/53888): Make using []E instead of S - // to workaround a compiler bug where the runtime.growslice optimization - // does not take effect. Revert when the compiler is fixed. - s = append([]E(s)[:cap(s)], make([]E, n)...)[:len(s)] - } - return s + return slices.Grow(s, n) } // Clip removes unused capacity from the slice, returning s[:len(s):len(s)]. func Clip[S ~[]E, E any](s S) S { - return s[:len(s):len(s)] -} - -// Rotation algorithm explanation: -// -// rotate left by 2 -// start with -// 0123456789 -// split up like this -// 01 234567 89 -// swap first 2 and last 2 -// 89 234567 01 -// join first parts -// 89234567 01 -// recursively rotate first left part by 2 -// 23456789 01 -// join at the end -// 2345678901 -// -// rotate left by 8 -// start with -// 0123456789 -// split up like this -// 01 234567 89 -// swap first 2 and last 2 -// 89 234567 01 -// join last parts -// 89 23456701 -// recursively rotate second part left by 6 -// 89 01234567 -// join at the end -// 8901234567 - -// TODO: There are other rotate algorithms. -// This algorithm has the desirable property that it moves each element exactly twice. -// The triple-reverse algorithm is simpler and more cache friendly, but takes more writes. -// The follow-cycles algorithm can be 1-write but it is not very cache friendly. - -// rotateLeft rotates b left by n spaces. -// s_final[i] = s_orig[i+r], wrapping around. -func rotateLeft[E any](s []E, r int) { - for r != 0 && r != len(s) { - if r*2 <= len(s) { - swap(s[:r], s[len(s)-r:]) - s = s[:len(s)-r] - } else { - swap(s[:len(s)-r], s[r:]) - s, r = s[len(s)-r:], r*2-len(s) - } - } -} -func rotateRight[E any](s []E, r int) { - rotateLeft(s, len(s)-r) -} - -// swap swaps the contents of x and y. x and y must be equal length and disjoint. -func swap[E any](x, y []E) { - for i := 0; i < len(x); i++ { - x[i], y[i] = y[i], x[i] - } -} - -// overlaps reports whether the memory ranges a[0:len(a)] and b[0:len(b)] overlap. -func overlaps[E any](a, b []E) bool { - if len(a) == 0 || len(b) == 0 { - return false - } - elemSize := unsafe.Sizeof(a[0]) - if elemSize == 0 { - return false - } - // TODO: use a runtime/unsafe facility once one becomes available. See issue 12445. - // Also see crypto/internal/alias/alias.go:AnyOverlap - return uintptr(unsafe.Pointer(&a[0])) <= uintptr(unsafe.Pointer(&b[len(b)-1]))+(elemSize-1) && - uintptr(unsafe.Pointer(&b[0])) <= uintptr(unsafe.Pointer(&a[len(a)-1]))+(elemSize-1) -} - -// startIdx returns the index in haystack where the needle starts. -// prerequisite: the needle must be aliased entirely inside the haystack. -func startIdx[E any](haystack, needle []E) int { - p := &needle[0] - for i := range haystack { - if p == &haystack[i] { - return i - } - } - // TODO: what if the overlap is by a non-integral number of Es? - panic("needle not found") + return slices.Clip(s) } // Reverse reverses the elements of the slice in place. func Reverse[S ~[]E, E any](s S) { - for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { - s[i], s[j] = s[j], s[i] - } + slices.Reverse(s) } diff --git a/vendor/golang.org/x/exp/slices/sort.go b/vendor/golang.org/x/exp/slices/sort.go index f58bbc7b..e270a746 100644 --- a/vendor/golang.org/x/exp/slices/sort.go +++ b/vendor/golang.org/x/exp/slices/sort.go @@ -2,21 +2,20 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:generate go run $GOROOT/src/sort/gen_sort_variants.go -exp - package slices import ( - "math/bits" - - "golang.org/x/exp/constraints" + "cmp" + "slices" ) +// TODO(adonovan): add a "//go:fix inline" annotation to each function +// in this file; see https://go.dev/issue/32816. + // Sort sorts a slice of any ordered type in ascending order. // When sorting floating-point numbers, NaNs are ordered before other values. -func Sort[S ~[]E, E constraints.Ordered](x S) { - n := len(x) - pdqsortOrdered(x, 0, n, bits.Len(uint(n))) +func Sort[S ~[]E, E cmp.Ordered](x S) { + slices.Sort(x) } // SortFunc sorts the slice x in ascending order as determined by the cmp @@ -29,118 +28,60 @@ func Sort[S ~[]E, E constraints.Ordered](x S) { // See https://en.wikipedia.org/wiki/Weak_ordering#Strict_weak_orderings. // To indicate 'uncomparable', return 0 from the function. func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int) { - n := len(x) - pdqsortCmpFunc(x, 0, n, bits.Len(uint(n)), cmp) + slices.SortFunc(x, cmp) } // SortStableFunc sorts the slice x while keeping the original order of equal // elements, using cmp to compare elements in the same way as [SortFunc]. func SortStableFunc[S ~[]E, E any](x S, cmp func(a, b E) int) { - stableCmpFunc(x, len(x), cmp) + slices.SortStableFunc(x, cmp) } // IsSorted reports whether x is sorted in ascending order. -func IsSorted[S ~[]E, E constraints.Ordered](x S) bool { - for i := len(x) - 1; i > 0; i-- { - if cmpLess(x[i], x[i-1]) { - return false - } - } - return true +func IsSorted[S ~[]E, E cmp.Ordered](x S) bool { + return slices.IsSorted(x) } // IsSortedFunc reports whether x is sorted in ascending order, with cmp as the // comparison function as defined by [SortFunc]. func IsSortedFunc[S ~[]E, E any](x S, cmp func(a, b E) int) bool { - for i := len(x) - 1; i > 0; i-- { - if cmp(x[i], x[i-1]) < 0 { - return false - } - } - return true + return slices.IsSortedFunc(x, cmp) } // Min returns the minimal value in x. It panics if x is empty. // For floating-point numbers, Min propagates NaNs (any NaN value in x // forces the output to be NaN). -func Min[S ~[]E, E constraints.Ordered](x S) E { - if len(x) < 1 { - panic("slices.Min: empty list") - } - m := x[0] - for i := 1; i < len(x); i++ { - m = min(m, x[i]) - } - return m +func Min[S ~[]E, E cmp.Ordered](x S) E { + return slices.Min(x) } // MinFunc returns the minimal value in x, using cmp to compare elements. // It panics if x is empty. If there is more than one minimal element // according to the cmp function, MinFunc returns the first one. func MinFunc[S ~[]E, E any](x S, cmp func(a, b E) int) E { - if len(x) < 1 { - panic("slices.MinFunc: empty list") - } - m := x[0] - for i := 1; i < len(x); i++ { - if cmp(x[i], m) < 0 { - m = x[i] - } - } - return m + return slices.MinFunc(x, cmp) } // Max returns the maximal value in x. It panics if x is empty. // For floating-point E, Max propagates NaNs (any NaN value in x // forces the output to be NaN). -func Max[S ~[]E, E constraints.Ordered](x S) E { - if len(x) < 1 { - panic("slices.Max: empty list") - } - m := x[0] - for i := 1; i < len(x); i++ { - m = max(m, x[i]) - } - return m +func Max[S ~[]E, E cmp.Ordered](x S) E { + return slices.Max(x) } // MaxFunc returns the maximal value in x, using cmp to compare elements. // It panics if x is empty. If there is more than one maximal element // according to the cmp function, MaxFunc returns the first one. func MaxFunc[S ~[]E, E any](x S, cmp func(a, b E) int) E { - if len(x) < 1 { - panic("slices.MaxFunc: empty list") - } - m := x[0] - for i := 1; i < len(x); i++ { - if cmp(x[i], m) > 0 { - m = x[i] - } - } - return m + return slices.MaxFunc(x, cmp) } // BinarySearch searches for target in a sorted slice and returns the position // where target is found, or the position where target would appear in the // sort order; it also returns a bool saying whether the target is really found // in the slice. The slice must be sorted in increasing order. -func BinarySearch[S ~[]E, E constraints.Ordered](x S, target E) (int, bool) { - // Inlining is faster than calling BinarySearchFunc with a lambda. - n := len(x) - // Define x[-1] < target and x[n] >= target. - // Invariant: x[i-1] < target, x[j] >= target. - i, j := 0, n - for i < j { - h := int(uint(i+j) >> 1) // avoid overflow when computing h - // i ≤ h < j - if cmpLess(x[h], target) { - i = h + 1 // preserves x[i-1] < target - } else { - j = h // preserves x[j] >= target - } - } - // i == j, x[i-1] < target, and x[j] (= x[i]) >= target => answer is i. - return i, i < n && (x[i] == target || (isNaN(x[i]) && isNaN(target))) +func BinarySearch[S ~[]E, E cmp.Ordered](x S, target E) (int, bool) { + return slices.BinarySearch(x, target) } // BinarySearchFunc works like [BinarySearch], but uses a custom comparison @@ -151,47 +92,5 @@ func BinarySearch[S ~[]E, E constraints.Ordered](x S, target E) (int, bool) { // cmp must implement the same ordering as the slice, such that if // cmp(a, t) < 0 and cmp(b, t) >= 0, then a must precede b in the slice. func BinarySearchFunc[S ~[]E, E, T any](x S, target T, cmp func(E, T) int) (int, bool) { - n := len(x) - // Define cmp(x[-1], target) < 0 and cmp(x[n], target) >= 0 . - // Invariant: cmp(x[i - 1], target) < 0, cmp(x[j], target) >= 0. - i, j := 0, n - for i < j { - h := int(uint(i+j) >> 1) // avoid overflow when computing h - // i ≤ h < j - if cmp(x[h], target) < 0 { - i = h + 1 // preserves cmp(x[i - 1], target) < 0 - } else { - j = h // preserves cmp(x[j], target) >= 0 - } - } - // i == j, cmp(x[i-1], target) < 0, and cmp(x[j], target) (= cmp(x[i], target)) >= 0 => answer is i. - return i, i < n && cmp(x[i], target) == 0 -} - -type sortedHint int // hint for pdqsort when choosing the pivot - -const ( - unknownHint sortedHint = iota - increasingHint - decreasingHint -) - -// xorshift paper: https://www.jstatsoft.org/article/view/v008i14/xorshift.pdf -type xorshift uint64 - -func (r *xorshift) Next() uint64 { - *r ^= *r << 13 - *r ^= *r >> 17 - *r ^= *r << 5 - return uint64(*r) -} - -func nextPowerOfTwo(length int) uint { - return 1 << bits.Len(uint(length)) -} - -// isNaN reports whether x is a NaN without requiring the math package. -// This will always return false if T is not floating-point. -func isNaN[T constraints.Ordered](x T) bool { - return x != x + return slices.BinarySearchFunc(x, target, cmp) } diff --git a/vendor/golang.org/x/exp/slices/zsortanyfunc.go b/vendor/golang.org/x/exp/slices/zsortanyfunc.go deleted file mode 100644 index 06f2c7a2..00000000 --- a/vendor/golang.org/x/exp/slices/zsortanyfunc.go +++ /dev/null @@ -1,479 +0,0 @@ -// Code generated by gen_sort_variants.go; DO NOT EDIT. - -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package slices - -// insertionSortCmpFunc sorts data[a:b] using insertion sort. -func insertionSortCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) { - for i := a + 1; i < b; i++ { - for j := i; j > a && (cmp(data[j], data[j-1]) < 0); j-- { - data[j], data[j-1] = data[j-1], data[j] - } - } -} - -// siftDownCmpFunc implements the heap property on data[lo:hi]. -// first is an offset into the array where the root of the heap lies. -func siftDownCmpFunc[E any](data []E, lo, hi, first int, cmp func(a, b E) int) { - root := lo - for { - child := 2*root + 1 - if child >= hi { - break - } - if child+1 < hi && (cmp(data[first+child], data[first+child+1]) < 0) { - child++ - } - if !(cmp(data[first+root], data[first+child]) < 0) { - return - } - data[first+root], data[first+child] = data[first+child], data[first+root] - root = child - } -} - -func heapSortCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) { - first := a - lo := 0 - hi := b - a - - // Build heap with greatest element at top. - for i := (hi - 1) / 2; i >= 0; i-- { - siftDownCmpFunc(data, i, hi, first, cmp) - } - - // Pop elements, largest first, into end of data. - for i := hi - 1; i >= 0; i-- { - data[first], data[first+i] = data[first+i], data[first] - siftDownCmpFunc(data, lo, i, first, cmp) - } -} - -// pdqsortCmpFunc sorts data[a:b]. -// The algorithm based on pattern-defeating quicksort(pdqsort), but without the optimizations from BlockQuicksort. -// pdqsort paper: https://arxiv.org/pdf/2106.05123.pdf -// C++ implementation: https://github.com/orlp/pdqsort -// Rust implementation: https://docs.rs/pdqsort/latest/pdqsort/ -// limit is the number of allowed bad (very unbalanced) pivots before falling back to heapsort. -func pdqsortCmpFunc[E any](data []E, a, b, limit int, cmp func(a, b E) int) { - const maxInsertion = 12 - - var ( - wasBalanced = true // whether the last partitioning was reasonably balanced - wasPartitioned = true // whether the slice was already partitioned - ) - - for { - length := b - a - - if length <= maxInsertion { - insertionSortCmpFunc(data, a, b, cmp) - return - } - - // Fall back to heapsort if too many bad choices were made. - if limit == 0 { - heapSortCmpFunc(data, a, b, cmp) - return - } - - // If the last partitioning was imbalanced, we need to breaking patterns. - if !wasBalanced { - breakPatternsCmpFunc(data, a, b, cmp) - limit-- - } - - pivot, hint := choosePivotCmpFunc(data, a, b, cmp) - if hint == decreasingHint { - reverseRangeCmpFunc(data, a, b, cmp) - // The chosen pivot was pivot-a elements after the start of the array. - // After reversing it is pivot-a elements before the end of the array. - // The idea came from Rust's implementation. - pivot = (b - 1) - (pivot - a) - hint = increasingHint - } - - // The slice is likely already sorted. - if wasBalanced && wasPartitioned && hint == increasingHint { - if partialInsertionSortCmpFunc(data, a, b, cmp) { - return - } - } - - // Probably the slice contains many duplicate elements, partition the slice into - // elements equal to and elements greater than the pivot. - if a > 0 && !(cmp(data[a-1], data[pivot]) < 0) { - mid := partitionEqualCmpFunc(data, a, b, pivot, cmp) - a = mid - continue - } - - mid, alreadyPartitioned := partitionCmpFunc(data, a, b, pivot, cmp) - wasPartitioned = alreadyPartitioned - - leftLen, rightLen := mid-a, b-mid - balanceThreshold := length / 8 - if leftLen < rightLen { - wasBalanced = leftLen >= balanceThreshold - pdqsortCmpFunc(data, a, mid, limit, cmp) - a = mid + 1 - } else { - wasBalanced = rightLen >= balanceThreshold - pdqsortCmpFunc(data, mid+1, b, limit, cmp) - b = mid - } - } -} - -// partitionCmpFunc does one quicksort partition. -// Let p = data[pivot] -// Moves elements in data[a:b] around, so that data[i]

=p for inewpivot. -// On return, data[newpivot] = p -func partitionCmpFunc[E any](data []E, a, b, pivot int, cmp func(a, b E) int) (newpivot int, alreadyPartitioned bool) { - data[a], data[pivot] = data[pivot], data[a] - i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned - - for i <= j && (cmp(data[i], data[a]) < 0) { - i++ - } - for i <= j && !(cmp(data[j], data[a]) < 0) { - j-- - } - if i > j { - data[j], data[a] = data[a], data[j] - return j, true - } - data[i], data[j] = data[j], data[i] - i++ - j-- - - for { - for i <= j && (cmp(data[i], data[a]) < 0) { - i++ - } - for i <= j && !(cmp(data[j], data[a]) < 0) { - j-- - } - if i > j { - break - } - data[i], data[j] = data[j], data[i] - i++ - j-- - } - data[j], data[a] = data[a], data[j] - return j, false -} - -// partitionEqualCmpFunc partitions data[a:b] into elements equal to data[pivot] followed by elements greater than data[pivot]. -// It assumed that data[a:b] does not contain elements smaller than the data[pivot]. -func partitionEqualCmpFunc[E any](data []E, a, b, pivot int, cmp func(a, b E) int) (newpivot int) { - data[a], data[pivot] = data[pivot], data[a] - i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned - - for { - for i <= j && !(cmp(data[a], data[i]) < 0) { - i++ - } - for i <= j && (cmp(data[a], data[j]) < 0) { - j-- - } - if i > j { - break - } - data[i], data[j] = data[j], data[i] - i++ - j-- - } - return i -} - -// partialInsertionSortCmpFunc partially sorts a slice, returns true if the slice is sorted at the end. -func partialInsertionSortCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) bool { - const ( - maxSteps = 5 // maximum number of adjacent out-of-order pairs that will get shifted - shortestShifting = 50 // don't shift any elements on short arrays - ) - i := a + 1 - for j := 0; j < maxSteps; j++ { - for i < b && !(cmp(data[i], data[i-1]) < 0) { - i++ - } - - if i == b { - return true - } - - if b-a < shortestShifting { - return false - } - - data[i], data[i-1] = data[i-1], data[i] - - // Shift the smaller one to the left. - if i-a >= 2 { - for j := i - 1; j >= 1; j-- { - if !(cmp(data[j], data[j-1]) < 0) { - break - } - data[j], data[j-1] = data[j-1], data[j] - } - } - // Shift the greater one to the right. - if b-i >= 2 { - for j := i + 1; j < b; j++ { - if !(cmp(data[j], data[j-1]) < 0) { - break - } - data[j], data[j-1] = data[j-1], data[j] - } - } - } - return false -} - -// breakPatternsCmpFunc scatters some elements around in an attempt to break some patterns -// that might cause imbalanced partitions in quicksort. -func breakPatternsCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) { - length := b - a - if length >= 8 { - random := xorshift(length) - modulus := nextPowerOfTwo(length) - - for idx := a + (length/4)*2 - 1; idx <= a+(length/4)*2+1; idx++ { - other := int(uint(random.Next()) & (modulus - 1)) - if other >= length { - other -= length - } - data[idx], data[a+other] = data[a+other], data[idx] - } - } -} - -// choosePivotCmpFunc chooses a pivot in data[a:b]. -// -// [0,8): chooses a static pivot. -// [8,shortestNinther): uses the simple median-of-three method. -// [shortestNinther,∞): uses the Tukey ninther method. -func choosePivotCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) (pivot int, hint sortedHint) { - const ( - shortestNinther = 50 - maxSwaps = 4 * 3 - ) - - l := b - a - - var ( - swaps int - i = a + l/4*1 - j = a + l/4*2 - k = a + l/4*3 - ) - - if l >= 8 { - if l >= shortestNinther { - // Tukey ninther method, the idea came from Rust's implementation. - i = medianAdjacentCmpFunc(data, i, &swaps, cmp) - j = medianAdjacentCmpFunc(data, j, &swaps, cmp) - k = medianAdjacentCmpFunc(data, k, &swaps, cmp) - } - // Find the median among i, j, k and stores it into j. - j = medianCmpFunc(data, i, j, k, &swaps, cmp) - } - - switch swaps { - case 0: - return j, increasingHint - case maxSwaps: - return j, decreasingHint - default: - return j, unknownHint - } -} - -// order2CmpFunc returns x,y where data[x] <= data[y], where x,y=a,b or x,y=b,a. -func order2CmpFunc[E any](data []E, a, b int, swaps *int, cmp func(a, b E) int) (int, int) { - if cmp(data[b], data[a]) < 0 { - *swaps++ - return b, a - } - return a, b -} - -// medianCmpFunc returns x where data[x] is the median of data[a],data[b],data[c], where x is a, b, or c. -func medianCmpFunc[E any](data []E, a, b, c int, swaps *int, cmp func(a, b E) int) int { - a, b = order2CmpFunc(data, a, b, swaps, cmp) - b, c = order2CmpFunc(data, b, c, swaps, cmp) - a, b = order2CmpFunc(data, a, b, swaps, cmp) - return b -} - -// medianAdjacentCmpFunc finds the median of data[a - 1], data[a], data[a + 1] and stores the index into a. -func medianAdjacentCmpFunc[E any](data []E, a int, swaps *int, cmp func(a, b E) int) int { - return medianCmpFunc(data, a-1, a, a+1, swaps, cmp) -} - -func reverseRangeCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) { - i := a - j := b - 1 - for i < j { - data[i], data[j] = data[j], data[i] - i++ - j-- - } -} - -func swapRangeCmpFunc[E any](data []E, a, b, n int, cmp func(a, b E) int) { - for i := 0; i < n; i++ { - data[a+i], data[b+i] = data[b+i], data[a+i] - } -} - -func stableCmpFunc[E any](data []E, n int, cmp func(a, b E) int) { - blockSize := 20 // must be > 0 - a, b := 0, blockSize - for b <= n { - insertionSortCmpFunc(data, a, b, cmp) - a = b - b += blockSize - } - insertionSortCmpFunc(data, a, n, cmp) - - for blockSize < n { - a, b = 0, 2*blockSize - for b <= n { - symMergeCmpFunc(data, a, a+blockSize, b, cmp) - a = b - b += 2 * blockSize - } - if m := a + blockSize; m < n { - symMergeCmpFunc(data, a, m, n, cmp) - } - blockSize *= 2 - } -} - -// symMergeCmpFunc merges the two sorted subsequences data[a:m] and data[m:b] using -// the SymMerge algorithm from Pok-Son Kim and Arne Kutzner, "Stable Minimum -// Storage Merging by Symmetric Comparisons", in Susanne Albers and Tomasz -// Radzik, editors, Algorithms - ESA 2004, volume 3221 of Lecture Notes in -// Computer Science, pages 714-723. Springer, 2004. -// -// Let M = m-a and N = b-n. Wolog M < N. -// The recursion depth is bound by ceil(log(N+M)). -// The algorithm needs O(M*log(N/M + 1)) calls to data.Less. -// The algorithm needs O((M+N)*log(M)) calls to data.Swap. -// -// The paper gives O((M+N)*log(M)) as the number of assignments assuming a -// rotation algorithm which uses O(M+N+gcd(M+N)) assignments. The argumentation -// in the paper carries through for Swap operations, especially as the block -// swapping rotate uses only O(M+N) Swaps. -// -// symMerge assumes non-degenerate arguments: a < m && m < b. -// Having the caller check this condition eliminates many leaf recursion calls, -// which improves performance. -func symMergeCmpFunc[E any](data []E, a, m, b int, cmp func(a, b E) int) { - // Avoid unnecessary recursions of symMerge - // by direct insertion of data[a] into data[m:b] - // if data[a:m] only contains one element. - if m-a == 1 { - // Use binary search to find the lowest index i - // such that data[i] >= data[a] for m <= i < b. - // Exit the search loop with i == b in case no such index exists. - i := m - j := b - for i < j { - h := int(uint(i+j) >> 1) - if cmp(data[h], data[a]) < 0 { - i = h + 1 - } else { - j = h - } - } - // Swap values until data[a] reaches the position before i. - for k := a; k < i-1; k++ { - data[k], data[k+1] = data[k+1], data[k] - } - return - } - - // Avoid unnecessary recursions of symMerge - // by direct insertion of data[m] into data[a:m] - // if data[m:b] only contains one element. - if b-m == 1 { - // Use binary search to find the lowest index i - // such that data[i] > data[m] for a <= i < m. - // Exit the search loop with i == m in case no such index exists. - i := a - j := m - for i < j { - h := int(uint(i+j) >> 1) - if !(cmp(data[m], data[h]) < 0) { - i = h + 1 - } else { - j = h - } - } - // Swap values until data[m] reaches the position i. - for k := m; k > i; k-- { - data[k], data[k-1] = data[k-1], data[k] - } - return - } - - mid := int(uint(a+b) >> 1) - n := mid + m - var start, r int - if m > mid { - start = n - b - r = mid - } else { - start = a - r = m - } - p := n - 1 - - for start < r { - c := int(uint(start+r) >> 1) - if !(cmp(data[p-c], data[c]) < 0) { - start = c + 1 - } else { - r = c - } - } - - end := n - start - if start < m && m < end { - rotateCmpFunc(data, start, m, end, cmp) - } - if a < start && start < mid { - symMergeCmpFunc(data, a, start, mid, cmp) - } - if mid < end && end < b { - symMergeCmpFunc(data, mid, end, b, cmp) - } -} - -// rotateCmpFunc rotates two consecutive blocks u = data[a:m] and v = data[m:b] in data: -// Data of the form 'x u v y' is changed to 'x v u y'. -// rotate performs at most b-a many calls to data.Swap, -// and it assumes non-degenerate arguments: a < m && m < b. -func rotateCmpFunc[E any](data []E, a, m, b int, cmp func(a, b E) int) { - i := m - a - j := b - m - - for i != j { - if i > j { - swapRangeCmpFunc(data, m-i, m, j, cmp) - i -= j - } else { - swapRangeCmpFunc(data, m-i, m+j-i, i, cmp) - j -= i - } - } - // i == j - swapRangeCmpFunc(data, m-i, m, i, cmp) -} diff --git a/vendor/golang.org/x/exp/slices/zsortordered.go b/vendor/golang.org/x/exp/slices/zsortordered.go deleted file mode 100644 index 99b47c39..00000000 --- a/vendor/golang.org/x/exp/slices/zsortordered.go +++ /dev/null @@ -1,481 +0,0 @@ -// Code generated by gen_sort_variants.go; DO NOT EDIT. - -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package slices - -import "golang.org/x/exp/constraints" - -// insertionSortOrdered sorts data[a:b] using insertion sort. -func insertionSortOrdered[E constraints.Ordered](data []E, a, b int) { - for i := a + 1; i < b; i++ { - for j := i; j > a && cmpLess(data[j], data[j-1]); j-- { - data[j], data[j-1] = data[j-1], data[j] - } - } -} - -// siftDownOrdered implements the heap property on data[lo:hi]. -// first is an offset into the array where the root of the heap lies. -func siftDownOrdered[E constraints.Ordered](data []E, lo, hi, first int) { - root := lo - for { - child := 2*root + 1 - if child >= hi { - break - } - if child+1 < hi && cmpLess(data[first+child], data[first+child+1]) { - child++ - } - if !cmpLess(data[first+root], data[first+child]) { - return - } - data[first+root], data[first+child] = data[first+child], data[first+root] - root = child - } -} - -func heapSortOrdered[E constraints.Ordered](data []E, a, b int) { - first := a - lo := 0 - hi := b - a - - // Build heap with greatest element at top. - for i := (hi - 1) / 2; i >= 0; i-- { - siftDownOrdered(data, i, hi, first) - } - - // Pop elements, largest first, into end of data. - for i := hi - 1; i >= 0; i-- { - data[first], data[first+i] = data[first+i], data[first] - siftDownOrdered(data, lo, i, first) - } -} - -// pdqsortOrdered sorts data[a:b]. -// The algorithm based on pattern-defeating quicksort(pdqsort), but without the optimizations from BlockQuicksort. -// pdqsort paper: https://arxiv.org/pdf/2106.05123.pdf -// C++ implementation: https://github.com/orlp/pdqsort -// Rust implementation: https://docs.rs/pdqsort/latest/pdqsort/ -// limit is the number of allowed bad (very unbalanced) pivots before falling back to heapsort. -func pdqsortOrdered[E constraints.Ordered](data []E, a, b, limit int) { - const maxInsertion = 12 - - var ( - wasBalanced = true // whether the last partitioning was reasonably balanced - wasPartitioned = true // whether the slice was already partitioned - ) - - for { - length := b - a - - if length <= maxInsertion { - insertionSortOrdered(data, a, b) - return - } - - // Fall back to heapsort if too many bad choices were made. - if limit == 0 { - heapSortOrdered(data, a, b) - return - } - - // If the last partitioning was imbalanced, we need to breaking patterns. - if !wasBalanced { - breakPatternsOrdered(data, a, b) - limit-- - } - - pivot, hint := choosePivotOrdered(data, a, b) - if hint == decreasingHint { - reverseRangeOrdered(data, a, b) - // The chosen pivot was pivot-a elements after the start of the array. - // After reversing it is pivot-a elements before the end of the array. - // The idea came from Rust's implementation. - pivot = (b - 1) - (pivot - a) - hint = increasingHint - } - - // The slice is likely already sorted. - if wasBalanced && wasPartitioned && hint == increasingHint { - if partialInsertionSortOrdered(data, a, b) { - return - } - } - - // Probably the slice contains many duplicate elements, partition the slice into - // elements equal to and elements greater than the pivot. - if a > 0 && !cmpLess(data[a-1], data[pivot]) { - mid := partitionEqualOrdered(data, a, b, pivot) - a = mid - continue - } - - mid, alreadyPartitioned := partitionOrdered(data, a, b, pivot) - wasPartitioned = alreadyPartitioned - - leftLen, rightLen := mid-a, b-mid - balanceThreshold := length / 8 - if leftLen < rightLen { - wasBalanced = leftLen >= balanceThreshold - pdqsortOrdered(data, a, mid, limit) - a = mid + 1 - } else { - wasBalanced = rightLen >= balanceThreshold - pdqsortOrdered(data, mid+1, b, limit) - b = mid - } - } -} - -// partitionOrdered does one quicksort partition. -// Let p = data[pivot] -// Moves elements in data[a:b] around, so that data[i]

=p for inewpivot. -// On return, data[newpivot] = p -func partitionOrdered[E constraints.Ordered](data []E, a, b, pivot int) (newpivot int, alreadyPartitioned bool) { - data[a], data[pivot] = data[pivot], data[a] - i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned - - for i <= j && cmpLess(data[i], data[a]) { - i++ - } - for i <= j && !cmpLess(data[j], data[a]) { - j-- - } - if i > j { - data[j], data[a] = data[a], data[j] - return j, true - } - data[i], data[j] = data[j], data[i] - i++ - j-- - - for { - for i <= j && cmpLess(data[i], data[a]) { - i++ - } - for i <= j && !cmpLess(data[j], data[a]) { - j-- - } - if i > j { - break - } - data[i], data[j] = data[j], data[i] - i++ - j-- - } - data[j], data[a] = data[a], data[j] - return j, false -} - -// partitionEqualOrdered partitions data[a:b] into elements equal to data[pivot] followed by elements greater than data[pivot]. -// It assumed that data[a:b] does not contain elements smaller than the data[pivot]. -func partitionEqualOrdered[E constraints.Ordered](data []E, a, b, pivot int) (newpivot int) { - data[a], data[pivot] = data[pivot], data[a] - i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned - - for { - for i <= j && !cmpLess(data[a], data[i]) { - i++ - } - for i <= j && cmpLess(data[a], data[j]) { - j-- - } - if i > j { - break - } - data[i], data[j] = data[j], data[i] - i++ - j-- - } - return i -} - -// partialInsertionSortOrdered partially sorts a slice, returns true if the slice is sorted at the end. -func partialInsertionSortOrdered[E constraints.Ordered](data []E, a, b int) bool { - const ( - maxSteps = 5 // maximum number of adjacent out-of-order pairs that will get shifted - shortestShifting = 50 // don't shift any elements on short arrays - ) - i := a + 1 - for j := 0; j < maxSteps; j++ { - for i < b && !cmpLess(data[i], data[i-1]) { - i++ - } - - if i == b { - return true - } - - if b-a < shortestShifting { - return false - } - - data[i], data[i-1] = data[i-1], data[i] - - // Shift the smaller one to the left. - if i-a >= 2 { - for j := i - 1; j >= 1; j-- { - if !cmpLess(data[j], data[j-1]) { - break - } - data[j], data[j-1] = data[j-1], data[j] - } - } - // Shift the greater one to the right. - if b-i >= 2 { - for j := i + 1; j < b; j++ { - if !cmpLess(data[j], data[j-1]) { - break - } - data[j], data[j-1] = data[j-1], data[j] - } - } - } - return false -} - -// breakPatternsOrdered scatters some elements around in an attempt to break some patterns -// that might cause imbalanced partitions in quicksort. -func breakPatternsOrdered[E constraints.Ordered](data []E, a, b int) { - length := b - a - if length >= 8 { - random := xorshift(length) - modulus := nextPowerOfTwo(length) - - for idx := a + (length/4)*2 - 1; idx <= a+(length/4)*2+1; idx++ { - other := int(uint(random.Next()) & (modulus - 1)) - if other >= length { - other -= length - } - data[idx], data[a+other] = data[a+other], data[idx] - } - } -} - -// choosePivotOrdered chooses a pivot in data[a:b]. -// -// [0,8): chooses a static pivot. -// [8,shortestNinther): uses the simple median-of-three method. -// [shortestNinther,∞): uses the Tukey ninther method. -func choosePivotOrdered[E constraints.Ordered](data []E, a, b int) (pivot int, hint sortedHint) { - const ( - shortestNinther = 50 - maxSwaps = 4 * 3 - ) - - l := b - a - - var ( - swaps int - i = a + l/4*1 - j = a + l/4*2 - k = a + l/4*3 - ) - - if l >= 8 { - if l >= shortestNinther { - // Tukey ninther method, the idea came from Rust's implementation. - i = medianAdjacentOrdered(data, i, &swaps) - j = medianAdjacentOrdered(data, j, &swaps) - k = medianAdjacentOrdered(data, k, &swaps) - } - // Find the median among i, j, k and stores it into j. - j = medianOrdered(data, i, j, k, &swaps) - } - - switch swaps { - case 0: - return j, increasingHint - case maxSwaps: - return j, decreasingHint - default: - return j, unknownHint - } -} - -// order2Ordered returns x,y where data[x] <= data[y], where x,y=a,b or x,y=b,a. -func order2Ordered[E constraints.Ordered](data []E, a, b int, swaps *int) (int, int) { - if cmpLess(data[b], data[a]) { - *swaps++ - return b, a - } - return a, b -} - -// medianOrdered returns x where data[x] is the median of data[a],data[b],data[c], where x is a, b, or c. -func medianOrdered[E constraints.Ordered](data []E, a, b, c int, swaps *int) int { - a, b = order2Ordered(data, a, b, swaps) - b, c = order2Ordered(data, b, c, swaps) - a, b = order2Ordered(data, a, b, swaps) - return b -} - -// medianAdjacentOrdered finds the median of data[a - 1], data[a], data[a + 1] and stores the index into a. -func medianAdjacentOrdered[E constraints.Ordered](data []E, a int, swaps *int) int { - return medianOrdered(data, a-1, a, a+1, swaps) -} - -func reverseRangeOrdered[E constraints.Ordered](data []E, a, b int) { - i := a - j := b - 1 - for i < j { - data[i], data[j] = data[j], data[i] - i++ - j-- - } -} - -func swapRangeOrdered[E constraints.Ordered](data []E, a, b, n int) { - for i := 0; i < n; i++ { - data[a+i], data[b+i] = data[b+i], data[a+i] - } -} - -func stableOrdered[E constraints.Ordered](data []E, n int) { - blockSize := 20 // must be > 0 - a, b := 0, blockSize - for b <= n { - insertionSortOrdered(data, a, b) - a = b - b += blockSize - } - insertionSortOrdered(data, a, n) - - for blockSize < n { - a, b = 0, 2*blockSize - for b <= n { - symMergeOrdered(data, a, a+blockSize, b) - a = b - b += 2 * blockSize - } - if m := a + blockSize; m < n { - symMergeOrdered(data, a, m, n) - } - blockSize *= 2 - } -} - -// symMergeOrdered merges the two sorted subsequences data[a:m] and data[m:b] using -// the SymMerge algorithm from Pok-Son Kim and Arne Kutzner, "Stable Minimum -// Storage Merging by Symmetric Comparisons", in Susanne Albers and Tomasz -// Radzik, editors, Algorithms - ESA 2004, volume 3221 of Lecture Notes in -// Computer Science, pages 714-723. Springer, 2004. -// -// Let M = m-a and N = b-n. Wolog M < N. -// The recursion depth is bound by ceil(log(N+M)). -// The algorithm needs O(M*log(N/M + 1)) calls to data.Less. -// The algorithm needs O((M+N)*log(M)) calls to data.Swap. -// -// The paper gives O((M+N)*log(M)) as the number of assignments assuming a -// rotation algorithm which uses O(M+N+gcd(M+N)) assignments. The argumentation -// in the paper carries through for Swap operations, especially as the block -// swapping rotate uses only O(M+N) Swaps. -// -// symMerge assumes non-degenerate arguments: a < m && m < b. -// Having the caller check this condition eliminates many leaf recursion calls, -// which improves performance. -func symMergeOrdered[E constraints.Ordered](data []E, a, m, b int) { - // Avoid unnecessary recursions of symMerge - // by direct insertion of data[a] into data[m:b] - // if data[a:m] only contains one element. - if m-a == 1 { - // Use binary search to find the lowest index i - // such that data[i] >= data[a] for m <= i < b. - // Exit the search loop with i == b in case no such index exists. - i := m - j := b - for i < j { - h := int(uint(i+j) >> 1) - if cmpLess(data[h], data[a]) { - i = h + 1 - } else { - j = h - } - } - // Swap values until data[a] reaches the position before i. - for k := a; k < i-1; k++ { - data[k], data[k+1] = data[k+1], data[k] - } - return - } - - // Avoid unnecessary recursions of symMerge - // by direct insertion of data[m] into data[a:m] - // if data[m:b] only contains one element. - if b-m == 1 { - // Use binary search to find the lowest index i - // such that data[i] > data[m] for a <= i < m. - // Exit the search loop with i == m in case no such index exists. - i := a - j := m - for i < j { - h := int(uint(i+j) >> 1) - if !cmpLess(data[m], data[h]) { - i = h + 1 - } else { - j = h - } - } - // Swap values until data[m] reaches the position i. - for k := m; k > i; k-- { - data[k], data[k-1] = data[k-1], data[k] - } - return - } - - mid := int(uint(a+b) >> 1) - n := mid + m - var start, r int - if m > mid { - start = n - b - r = mid - } else { - start = a - r = m - } - p := n - 1 - - for start < r { - c := int(uint(start+r) >> 1) - if !cmpLess(data[p-c], data[c]) { - start = c + 1 - } else { - r = c - } - } - - end := n - start - if start < m && m < end { - rotateOrdered(data, start, m, end) - } - if a < start && start < mid { - symMergeOrdered(data, a, start, mid) - } - if mid < end && end < b { - symMergeOrdered(data, mid, end, b) - } -} - -// rotateOrdered rotates two consecutive blocks u = data[a:m] and v = data[m:b] in data: -// Data of the form 'x u v y' is changed to 'x v u y'. -// rotate performs at most b-a many calls to data.Swap, -// and it assumes non-degenerate arguments: a < m && m < b. -func rotateOrdered[E constraints.Ordered](data []E, a, m, b int) { - i := m - a - j := b - m - - for i != j { - if i > j { - swapRangeOrdered(data, m-i, m, j) - i -= j - } else { - swapRangeOrdered(data, m-i, m+j-i, i) - j -= i - } - } - // i == j - swapRangeOrdered(data, m-i, m, i) -} diff --git a/vendor/golang.org/x/net/http2/client_conn_pool.go b/vendor/golang.org/x/net/http2/client_conn_pool.go index 780968d6..e81b73e6 100644 --- a/vendor/golang.org/x/net/http2/client_conn_pool.go +++ b/vendor/golang.org/x/net/http2/client_conn_pool.go @@ -8,8 +8,8 @@ package http2 import ( "context" - "crypto/tls" "errors" + "net" "net/http" "sync" ) @@ -158,7 +158,7 @@ func (c *dialCall) dial(ctx context.Context, addr string) { // This code decides which ones live or die. // The return value used is whether c was used. // c is never closed. -func (p *clientConnPool) addConnIfNeeded(key string, t *Transport, c *tls.Conn) (used bool, err error) { +func (p *clientConnPool) addConnIfNeeded(key string, t *Transport, c net.Conn) (used bool, err error) { p.mu.Lock() for _, cc := range p.conns[key] { if cc.CanTakeNewRequest() { @@ -194,8 +194,8 @@ type addConnCall struct { err error } -func (c *addConnCall) run(t *Transport, key string, tc *tls.Conn) { - cc, err := t.NewClientConn(tc) +func (c *addConnCall) run(t *Transport, key string, nc net.Conn) { + cc, err := t.NewClientConn(nc) p := c.p p.mu.Lock() diff --git a/vendor/golang.org/x/net/http2/config.go b/vendor/golang.org/x/net/http2/config.go index de58dfb8..ca645d9a 100644 --- a/vendor/golang.org/x/net/http2/config.go +++ b/vendor/golang.org/x/net/http2/config.go @@ -60,7 +60,7 @@ func configFromServer(h1 *http.Server, h2 *Server) http2Config { return conf } -// configFromServer merges configuration settings from h2 and h2.t1.HTTP2 +// configFromTransport merges configuration settings from h2 and h2.t1.HTTP2 // (the net/http Transport). func configFromTransport(h2 *Transport) http2Config { conf := http2Config{ diff --git a/vendor/golang.org/x/net/http2/config_go124.go b/vendor/golang.org/x/net/http2/config_go124.go index e3784123..5b516c55 100644 --- a/vendor/golang.org/x/net/http2/config_go124.go +++ b/vendor/golang.org/x/net/http2/config_go124.go @@ -13,7 +13,7 @@ func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) { fillNetHTTPConfig(conf, srv.HTTP2) } -// fillNetHTTPServerConfig sets fields in conf from tr.HTTP2. +// fillNetHTTPTransportConfig sets fields in conf from tr.HTTP2. func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) { fillNetHTTPConfig(conf, tr.HTTP2) } diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go index 105c3b27..81faec7e 100644 --- a/vendor/golang.org/x/net/http2/frame.go +++ b/vendor/golang.org/x/net/http2/frame.go @@ -1490,7 +1490,7 @@ func (mh *MetaHeadersFrame) checkPseudos() error { pf := mh.PseudoFields() for i, hf := range pf { switch hf.Name { - case ":method", ":path", ":scheme", ":authority": + case ":method", ":path", ":scheme", ":authority", ":protocol": isRequest = true case ":status": isResponse = true @@ -1498,7 +1498,7 @@ func (mh *MetaHeadersFrame) checkPseudos() error { return pseudoHeaderError(hf.Name) } // Check for duplicates. - // This would be a bad algorithm, but N is 4. + // This would be a bad algorithm, but N is 5. // And this doesn't allocate. for _, hf2 := range pf[:i] { if hf.Name == hf2.Name { diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go index 7688c356..c7601c90 100644 --- a/vendor/golang.org/x/net/http2/http2.go +++ b/vendor/golang.org/x/net/http2/http2.go @@ -34,10 +34,11 @@ import ( ) var ( - VerboseLogs bool - logFrameWrites bool - logFrameReads bool - inTests bool + VerboseLogs bool + logFrameWrites bool + logFrameReads bool + inTests bool + disableExtendedConnectProtocol bool ) func init() { @@ -50,6 +51,9 @@ func init() { logFrameWrites = true logFrameReads = true } + if strings.Contains(e, "http2xconnect=0") { + disableExtendedConnectProtocol = true + } } const ( @@ -141,6 +145,10 @@ func (s Setting) Valid() error { if s.Val < 16384 || s.Val > 1<<24-1 { return ConnectionError(ErrCodeProtocol) } + case SettingEnableConnectProtocol: + if s.Val != 1 && s.Val != 0 { + return ConnectionError(ErrCodeProtocol) + } } return nil } @@ -150,21 +158,23 @@ func (s Setting) Valid() error { type SettingID uint16 const ( - SettingHeaderTableSize SettingID = 0x1 - SettingEnablePush SettingID = 0x2 - SettingMaxConcurrentStreams SettingID = 0x3 - SettingInitialWindowSize SettingID = 0x4 - SettingMaxFrameSize SettingID = 0x5 - SettingMaxHeaderListSize SettingID = 0x6 + SettingHeaderTableSize SettingID = 0x1 + SettingEnablePush SettingID = 0x2 + SettingMaxConcurrentStreams SettingID = 0x3 + SettingInitialWindowSize SettingID = 0x4 + SettingMaxFrameSize SettingID = 0x5 + SettingMaxHeaderListSize SettingID = 0x6 + SettingEnableConnectProtocol SettingID = 0x8 ) var settingName = map[SettingID]string{ - SettingHeaderTableSize: "HEADER_TABLE_SIZE", - SettingEnablePush: "ENABLE_PUSH", - SettingMaxConcurrentStreams: "MAX_CONCURRENT_STREAMS", - SettingInitialWindowSize: "INITIAL_WINDOW_SIZE", - SettingMaxFrameSize: "MAX_FRAME_SIZE", - SettingMaxHeaderListSize: "MAX_HEADER_LIST_SIZE", + SettingHeaderTableSize: "HEADER_TABLE_SIZE", + SettingEnablePush: "ENABLE_PUSH", + SettingMaxConcurrentStreams: "MAX_CONCURRENT_STREAMS", + SettingInitialWindowSize: "INITIAL_WINDOW_SIZE", + SettingMaxFrameSize: "MAX_FRAME_SIZE", + SettingMaxHeaderListSize: "MAX_HEADER_LIST_SIZE", + SettingEnableConnectProtocol: "ENABLE_CONNECT_PROTOCOL", } func (s SettingID) String() string { diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index 617b4a47..b55547ae 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -306,7 +306,7 @@ func ConfigureServer(s *http.Server, conf *Server) error { if s.TLSNextProto == nil { s.TLSNextProto = map[string]func(*http.Server, *tls.Conn, http.Handler){} } - protoHandler := func(hs *http.Server, c *tls.Conn, h http.Handler) { + protoHandler := func(hs *http.Server, c net.Conn, h http.Handler, sawClientPreface bool) { if testHookOnConn != nil { testHookOnConn() } @@ -323,12 +323,31 @@ func ConfigureServer(s *http.Server, conf *Server) error { ctx = bc.BaseContext() } conf.ServeConn(c, &ServeConnOpts{ - Context: ctx, - Handler: h, - BaseConfig: hs, + Context: ctx, + Handler: h, + BaseConfig: hs, + SawClientPreface: sawClientPreface, }) } - s.TLSNextProto[NextProtoTLS] = protoHandler + s.TLSNextProto[NextProtoTLS] = func(hs *http.Server, c *tls.Conn, h http.Handler) { + protoHandler(hs, c, h, false) + } + // The "unencrypted_http2" TLSNextProto key is used to pass off non-TLS HTTP/2 conns. + // + // A connection passed in this method has already had the HTTP/2 preface read from it. + s.TLSNextProto[nextProtoUnencryptedHTTP2] = func(hs *http.Server, c *tls.Conn, h http.Handler) { + nc, err := unencryptedNetConnFromTLSConn(c) + if err != nil { + if lg := hs.ErrorLog; lg != nil { + lg.Print(err) + } else { + log.Print(err) + } + go c.Close() + return + } + protoHandler(hs, nc, h, true) + } return nil } @@ -913,14 +932,18 @@ func (sc *serverConn) serve(conf http2Config) { sc.vlogf("http2: server connection from %v on %p", sc.conn.RemoteAddr(), sc.hs) } + settings := writeSettings{ + {SettingMaxFrameSize, conf.MaxReadFrameSize}, + {SettingMaxConcurrentStreams, sc.advMaxStreams}, + {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, + {SettingHeaderTableSize, conf.MaxDecoderHeaderTableSize}, + {SettingInitialWindowSize, uint32(sc.initialStreamRecvWindowSize)}, + } + if !disableExtendedConnectProtocol { + settings = append(settings, Setting{SettingEnableConnectProtocol, 1}) + } sc.writeFrame(FrameWriteRequest{ - write: writeSettings{ - {SettingMaxFrameSize, conf.MaxReadFrameSize}, - {SettingMaxConcurrentStreams, sc.advMaxStreams}, - {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, - {SettingHeaderTableSize, conf.MaxDecoderHeaderTableSize}, - {SettingInitialWindowSize, uint32(sc.initialStreamRecvWindowSize)}, - }, + write: settings, }) sc.unackedSettings++ @@ -1782,6 +1805,9 @@ func (sc *serverConn) processSetting(s Setting) error { sc.maxFrameSize = int32(s.Val) // the maximum valid s.Val is < 2^31 case SettingMaxHeaderListSize: sc.peerMaxHeaderListSize = s.Val + case SettingEnableConnectProtocol: + // Receipt of this parameter by a server does not + // have any impact default: // Unknown setting: "An endpoint that receives a SETTINGS // frame with any unknown or unsupported identifier MUST @@ -2212,11 +2238,17 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res scheme: f.PseudoValue("scheme"), authority: f.PseudoValue("authority"), path: f.PseudoValue("path"), + protocol: f.PseudoValue("protocol"), + } + + // extended connect is disabled, so we should not see :protocol + if disableExtendedConnectProtocol && rp.protocol != "" { + return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol)) } isConnect := rp.method == "CONNECT" if isConnect { - if rp.path != "" || rp.scheme != "" || rp.authority == "" { + if rp.protocol == "" && (rp.path != "" || rp.scheme != "" || rp.authority == "") { return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol)) } } else if rp.method == "" || rp.path == "" || (rp.scheme != "https" && rp.scheme != "http") { @@ -2240,6 +2272,9 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res if rp.authority == "" { rp.authority = rp.header.Get("Host") } + if rp.protocol != "" { + rp.header.Set(":protocol", rp.protocol) + } rw, req, err := sc.newWriterAndRequestNoBody(st, rp) if err != nil { @@ -2266,6 +2301,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res type requestParam struct { method string scheme, authority, path string + protocol string header http.Header } @@ -2307,7 +2343,7 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r var url_ *url.URL var requestURI string - if rp.method == "CONNECT" { + if rp.method == "CONNECT" && rp.protocol == "" { url_ = &url.URL{Host: rp.authority} requestURI = rp.authority // mimic HTTP/1 server behavior } else { @@ -2880,6 +2916,11 @@ func (w *responseWriter) SetWriteDeadline(deadline time.Time) error { return nil } +func (w *responseWriter) EnableFullDuplex() error { + // We always support full duplex responses, so this is a no-op. + return nil +} + func (w *responseWriter) Flush() { w.FlushError() } diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 0c5f64aa..b2e2ed33 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -202,6 +202,20 @@ func (t *Transport) markNewGoroutine() { } } +func (t *Transport) now() time.Time { + if t != nil && t.transportTestHooks != nil { + return t.transportTestHooks.group.Now() + } + return time.Now() +} + +func (t *Transport) timeSince(when time.Time) time.Duration { + if t != nil && t.transportTestHooks != nil { + return t.now().Sub(when) + } + return time.Since(when) +} + // newTimer creates a new time.Timer, or a synthetic timer in tests. func (t *Transport) newTimer(d time.Duration) timer { if t.transportTestHooks != nil { @@ -281,8 +295,8 @@ func configureTransports(t1 *http.Transport) (*Transport, error) { if !strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1") { t1.TLSClientConfig.NextProtos = append(t1.TLSClientConfig.NextProtos, "http/1.1") } - upgradeFn := func(authority string, c *tls.Conn) http.RoundTripper { - addr := authorityAddr("https", authority) + upgradeFn := func(scheme, authority string, c net.Conn) http.RoundTripper { + addr := authorityAddr(scheme, authority) if used, err := connPool.addConnIfNeeded(addr, t2, c); err != nil { go c.Close() return erringRoundTripper{err} @@ -293,18 +307,37 @@ func configureTransports(t1 *http.Transport) (*Transport, error) { // was unknown) go c.Close() } + if scheme == "http" { + return (*unencryptedTransport)(t2) + } return t2 } - if m := t1.TLSNextProto; len(m) == 0 { - t1.TLSNextProto = map[string]func(string, *tls.Conn) http.RoundTripper{ - "h2": upgradeFn, + if t1.TLSNextProto == nil { + t1.TLSNextProto = make(map[string]func(string, *tls.Conn) http.RoundTripper) + } + t1.TLSNextProto[NextProtoTLS] = func(authority string, c *tls.Conn) http.RoundTripper { + return upgradeFn("https", authority, c) + } + // The "unencrypted_http2" TLSNextProto key is used to pass off non-TLS HTTP/2 conns. + t1.TLSNextProto[nextProtoUnencryptedHTTP2] = func(authority string, c *tls.Conn) http.RoundTripper { + nc, err := unencryptedNetConnFromTLSConn(c) + if err != nil { + go c.Close() + return erringRoundTripper{err} } - } else { - m["h2"] = upgradeFn + return upgradeFn("http", authority, nc) } return t2, nil } +// unencryptedTransport is a Transport with a RoundTrip method that +// always permits http:// URLs. +type unencryptedTransport Transport + +func (t *unencryptedTransport) RoundTrip(req *http.Request) (*http.Response, error) { + return (*Transport)(t).RoundTripOpt(req, RoundTripOpt{allowHTTP: true}) +} + func (t *Transport) connPool() ClientConnPool { t.connPoolOnce.Do(t.initConnPool) return t.connPoolOrDef @@ -324,7 +357,7 @@ type ClientConn struct { t *Transport tconn net.Conn // usually *tls.Conn, except specialized impls tlsState *tls.ConnectionState // nil only for specialized impls - reused uint32 // whether conn is being reused; atomic + atomicReused uint32 // whether conn is being reused; atomic singleUse bool // whether being used for a single http.Request getConnCalled bool // used by clientConnPool @@ -335,25 +368,27 @@ type ClientConn struct { idleTimeout time.Duration // or 0 for never idleTimer timer - mu sync.Mutex // guards following - cond *sync.Cond // hold mu; broadcast on flow/closed changes - flow outflow // our conn-level flow control quota (cs.outflow is per stream) - inflow inflow // peer's conn-level flow control - doNotReuse bool // whether conn is marked to not be reused for any future requests - closing bool - closed bool - seenSettings bool // true if we've seen a settings frame, false otherwise - wantSettingsAck bool // we sent a SETTINGS frame and haven't heard back - goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received - goAwayDebug string // goAway frame's debug data, retained as a string - streams map[uint32]*clientStream // client-initiated - streamsReserved int // incr by ReserveNewRequest; decr on RoundTrip - nextStreamID uint32 - pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams - pings map[[8]byte]chan struct{} // in flight ping data to notification channel - br *bufio.Reader - lastActive time.Time - lastIdle time.Time // time last idle + mu sync.Mutex // guards following + cond *sync.Cond // hold mu; broadcast on flow/closed changes + flow outflow // our conn-level flow control quota (cs.outflow is per stream) + inflow inflow // peer's conn-level flow control + doNotReuse bool // whether conn is marked to not be reused for any future requests + closing bool + closed bool + closedOnIdle bool // true if conn was closed for idleness + seenSettings bool // true if we've seen a settings frame, false otherwise + seenSettingsChan chan struct{} // closed when seenSettings is true or frame reading fails + wantSettingsAck bool // we sent a SETTINGS frame and haven't heard back + goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received + goAwayDebug string // goAway frame's debug data, retained as a string + streams map[uint32]*clientStream // client-initiated + streamsReserved int // incr by ReserveNewRequest; decr on RoundTrip + nextStreamID uint32 + pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams + pings map[[8]byte]chan struct{} // in flight ping data to notification channel + br *bufio.Reader + lastActive time.Time + lastIdle time.Time // time last idle // Settings from peer: (also guarded by wmu) maxFrameSize uint32 maxConcurrentStreams uint32 @@ -363,6 +398,25 @@ type ClientConn struct { initialStreamRecvWindowSize int32 readIdleTimeout time.Duration pingTimeout time.Duration + extendedConnectAllowed bool + + // rstStreamPingsBlocked works around an unfortunate gRPC behavior. + // gRPC strictly limits the number of PING frames that it will receive. + // The default is two pings per two hours, but the limit resets every time + // the gRPC endpoint sends a HEADERS or DATA frame. See golang/go#70575. + // + // rstStreamPingsBlocked is set after receiving a response to a PING frame + // bundled with an RST_STREAM (see pendingResets below), and cleared after + // receiving a HEADERS or DATA frame. + rstStreamPingsBlocked bool + + // pendingResets is the number of RST_STREAM frames we have sent to the peer, + // without confirming that the peer has received them. When we send a RST_STREAM, + // we bundle it with a PING frame, unless a PING is already in flight. We count + // the reset stream against the connection's concurrency limit until we get + // a PING response. This limits the number of requests we'll try to send to a + // completely unresponsive connection. + pendingResets int // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests. // Write to reqHeaderMu to lock it, read from it to unlock. @@ -420,12 +474,12 @@ type clientStream struct { sentHeaders bool // owned by clientConnReadLoop: - firstByte bool // got the first response byte - pastHeaders bool // got first MetaHeadersFrame (actual headers) - pastTrailers bool // got optional second MetaHeadersFrame (trailers) - num1xx uint8 // number of 1xx responses seen - readClosed bool // peer sent an END_STREAM flag - readAborted bool // read loop reset the stream + firstByte bool // got the first response byte + pastHeaders bool // got first MetaHeadersFrame (actual headers) + pastTrailers bool // got optional second MetaHeadersFrame (trailers) + readClosed bool // peer sent an END_STREAM flag + readAborted bool // read loop reset the stream + totalHeaderSize int64 // total size of 1xx headers seen trailer http.Header // accumulated trailers resTrailer *http.Header // client's Response.Trailer @@ -530,6 +584,8 @@ type RoundTripOpt struct { // no cached connection is available, RoundTripOpt // will return ErrNoCachedConn. OnlyCachedConn bool + + allowHTTP bool // allow http:// URLs } func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { @@ -562,7 +618,14 @@ func authorityAddr(scheme string, authority string) (addr string) { // RoundTripOpt is like RoundTrip, but takes options. func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) { - if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) { + switch req.URL.Scheme { + case "https": + // Always okay. + case "http": + if !t.AllowHTTP && !opt.allowHTTP { + return nil, errors.New("http2: unencrypted HTTP/2 not enabled") + } + default: return nil, errors.New("http2: unsupported scheme") } @@ -573,7 +636,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res t.vlogf("http2: Transport failed to get client conn for %s: %v", addr, err) return nil, err } - reused := !atomic.CompareAndSwapUint32(&cc.reused, 0, 1) + reused := !atomic.CompareAndSwapUint32(&cc.atomicReused, 0, 1) traceGotConn(req, cc, reused) res, err := cc.RoundTrip(req) if err != nil && retry <= 6 { @@ -598,6 +661,22 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res } } } + if err == errClientConnNotEstablished { + // This ClientConn was created recently, + // this is the first request to use it, + // and the connection is closed and not usable. + // + // In this state, cc.idleTimer will remove the conn from the pool + // when it fires. Stop the timer and remove it here so future requests + // won't try to use this connection. + // + // If the timer has already fired and we're racing it, the redundant + // call to MarkDead is harmless. + if cc.idleTimer != nil { + cc.idleTimer.Stop() + } + t.connPool().MarkDead(cc) + } if err != nil { t.vlogf("RoundTrip failure: %v", err) return nil, err @@ -616,9 +695,10 @@ func (t *Transport) CloseIdleConnections() { } var ( - errClientConnClosed = errors.New("http2: client conn is closed") - errClientConnUnusable = errors.New("http2: client conn not usable") - errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY") + errClientConnClosed = errors.New("http2: client conn is closed") + errClientConnUnusable = errors.New("http2: client conn not usable") + errClientConnNotEstablished = errors.New("http2: client conn could not be established") + errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY") ) // shouldRetryRequest is called by RoundTrip when a request fails to get @@ -752,11 +832,13 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. streams: make(map[uint32]*clientStream), singleUse: singleUse, + seenSettingsChan: make(chan struct{}), wantSettingsAck: true, readIdleTimeout: conf.SendPingTimeout, pingTimeout: conf.PingTimeout, pings: make(map[[8]byte]chan struct{}), reqHeaderMu: make(chan struct{}, 1), + lastActive: t.now(), } var group synctestGroupInterface if t.transportTestHooks != nil { @@ -960,7 +1042,7 @@ func (cc *ClientConn) State() ClientConnState { return ClientConnState{ Closed: cc.closed, Closing: cc.closing || cc.singleUse || cc.doNotReuse || cc.goAway != nil, - StreamsActive: len(cc.streams), + StreamsActive: len(cc.streams) + cc.pendingResets, StreamsReserved: cc.streamsReserved, StreamsPending: cc.pendingRequests, LastIdle: cc.lastIdle, @@ -992,16 +1074,40 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) { // writing it. maxConcurrentOkay = true } else { - maxConcurrentOkay = int64(len(cc.streams)+cc.streamsReserved+1) <= int64(cc.maxConcurrentStreams) + // We can take a new request if the total of + // - active streams; + // - reservation slots for new streams; and + // - streams for which we have sent a RST_STREAM and a PING, + // but received no subsequent frame + // is less than the concurrency limit. + maxConcurrentOkay = cc.currentRequestCountLocked() < int(cc.maxConcurrentStreams) } st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && maxConcurrentOkay && !cc.doNotReuse && int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32 && !cc.tooIdleLocked() + + // If this connection has never been used for a request and is closed, + // then let it take a request (which will fail). + // If the conn was closed for idleness, we're racing the idle timer; + // don't try to use the conn. (Issue #70515.) + // + // This avoids a situation where an error early in a connection's lifetime + // goes unreported. + if cc.nextStreamID == 1 && cc.streamsReserved == 0 && cc.closed && !cc.closedOnIdle { + st.canTakeNewRequest = true + } + return } +// currentRequestCountLocked reports the number of concurrency slots currently in use, +// including active streams, reserved slots, and reset streams waiting for acknowledgement. +func (cc *ClientConn) currentRequestCountLocked() int { + return len(cc.streams) + cc.streamsReserved + cc.pendingResets +} + func (cc *ClientConn) canTakeNewRequestLocked() bool { st := cc.idleStateLocked() return st.canTakeNewRequest @@ -1014,7 +1120,7 @@ func (cc *ClientConn) tooIdleLocked() bool { // times are compared based on their wall time. We don't want // to reuse a connection that's been sitting idle during // VM/laptop suspend if monotonic time was also frozen. - return cc.idleTimeout != 0 && !cc.lastIdle.IsZero() && time.Since(cc.lastIdle.Round(0)) > cc.idleTimeout + return cc.idleTimeout != 0 && !cc.lastIdle.IsZero() && cc.t.timeSince(cc.lastIdle.Round(0)) > cc.idleTimeout } // onIdleTimeout is called from a time.AfterFunc goroutine. It will @@ -1052,6 +1158,7 @@ func (cc *ClientConn) closeIfIdle() { return } cc.closed = true + cc.closedOnIdle = true nextID := cc.nextStreamID // TODO: do clients send GOAWAY too? maybe? Just Close: cc.mu.Unlock() @@ -1376,6 +1483,8 @@ func (cs *clientStream) doRequest(req *http.Request, streamf func(*clientStream) cs.cleanupWriteRequest(err) } +var errExtendedConnectNotSupported = errors.New("net/http: extended connect not supported by peer") + // writeRequest sends a request. // // It returns nil after the request is written, the response read, @@ -1391,12 +1500,31 @@ func (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStre return err } + // wait for setting frames to be received, a server can change this value later, + // but we just wait for the first settings frame + var isExtendedConnect bool + if req.Method == "CONNECT" && req.Header.Get(":protocol") != "" { + isExtendedConnect = true + } + // Acquire the new-request lock by writing to reqHeaderMu. // This lock guards the critical section covering allocating a new stream ID // (requires mu) and creating the stream (requires wmu). if cc.reqHeaderMu == nil { panic("RoundTrip on uninitialized ClientConn") // for tests } + if isExtendedConnect { + select { + case <-cs.reqCancel: + return errRequestCanceled + case <-ctx.Done(): + return ctx.Err() + case <-cc.seenSettingsChan: + if !cc.extendedConnectAllowed { + return errExtendedConnectNotSupported + } + } + } select { case cc.reqHeaderMu <- struct{}{}: case <-cs.reqCancel: @@ -1578,6 +1706,7 @@ func (cs *clientStream) cleanupWriteRequest(err error) { cs.reqBodyClosed = make(chan struct{}) } bodyClosed := cs.reqBodyClosed + closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil cc.mu.Unlock() if mustCloseBody { cs.reqBody.Close() @@ -1602,16 +1731,44 @@ func (cs *clientStream) cleanupWriteRequest(err error) { if cs.sentHeaders { if se, ok := err.(StreamError); ok { if se.Cause != errFromPeer { - cc.writeStreamReset(cs.ID, se.Code, err) + cc.writeStreamReset(cs.ID, se.Code, false, err) } } else { - cc.writeStreamReset(cs.ID, ErrCodeCancel, err) + // We're cancelling an in-flight request. + // + // This could be due to the server becoming unresponsive. + // To avoid sending too many requests on a dead connection, + // we let the request continue to consume a concurrency slot + // until we can confirm the server is still responding. + // We do this by sending a PING frame along with the RST_STREAM + // (unless a ping is already in flight). + // + // For simplicity, we don't bother tracking the PING payload: + // We reset cc.pendingResets any time we receive a PING ACK. + // + // We skip this if the conn is going to be closed on idle, + // because it's short lived and will probably be closed before + // we get the ping response. + ping := false + if !closeOnIdle { + cc.mu.Lock() + // rstStreamPingsBlocked works around a gRPC behavior: + // see comment on the field for details. + if !cc.rstStreamPingsBlocked { + if cc.pendingResets == 0 { + ping = true + } + cc.pendingResets++ + } + cc.mu.Unlock() + } + cc.writeStreamReset(cs.ID, ErrCodeCancel, ping, err) } } cs.bufPipe.CloseWithError(err) // no-op if already closed } else { if cs.sentHeaders && !cs.sentEndStream { - cc.writeStreamReset(cs.ID, ErrCodeNo, nil) + cc.writeStreamReset(cs.ID, ErrCodeNo, false, nil) } cs.bufPipe.CloseWithError(errRequestCanceled) } @@ -1633,12 +1790,17 @@ func (cs *clientStream) cleanupWriteRequest(err error) { // Must hold cc.mu. func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error { for { - cc.lastActive = time.Now() + if cc.closed && cc.nextStreamID == 1 && cc.streamsReserved == 0 { + // This is the very first request sent to this connection. + // Return a fatal error which aborts the retry loop. + return errClientConnNotEstablished + } + cc.lastActive = cc.t.now() if cc.closed || !cc.canTakeNewRequestLocked() { return errClientConnUnusable } cc.lastIdle = time.Time{} - if int64(len(cc.streams)) < int64(cc.maxConcurrentStreams) { + if cc.currentRequestCountLocked() < int(cc.maxConcurrentStreams) { return nil } cc.pendingRequests++ @@ -1910,7 +2072,7 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) func validateHeaders(hdrs http.Header) string { for k, vv := range hdrs { - if !httpguts.ValidHeaderFieldName(k) { + if !httpguts.ValidHeaderFieldName(k) && k != ":protocol" { return fmt.Sprintf("name %q", k) } for _, v := range vv { @@ -1926,6 +2088,10 @@ func validateHeaders(hdrs http.Header) string { var errNilRequestURL = errors.New("http2: Request.URI is nil") +func isNormalConnect(req *http.Request) bool { + return req.Method == "CONNECT" && req.Header.Get(":protocol") == "" +} + // requires cc.wmu be held. func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) { cc.hbuf.Reset() @@ -1946,7 +2112,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail } var path string - if req.Method != "CONNECT" { + if !isNormalConnect(req) { path = req.URL.RequestURI() if !validPseudoPath(path) { orig := path @@ -1983,7 +2149,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail m = http.MethodGet } f(":method", m) - if req.Method != "CONNECT" { + if !isNormalConnect(req) { f(":path", path) f(":scheme", req.URL.Scheme) } @@ -2180,10 +2346,10 @@ func (cc *ClientConn) forgetStreamID(id uint32) { if len(cc.streams) != slen-1 { panic("forgetting unknown stream id") } - cc.lastActive = time.Now() + cc.lastActive = cc.t.now() if len(cc.streams) == 0 && cc.idleTimer != nil { cc.idleTimer.Reset(cc.idleTimeout) - cc.lastIdle = time.Now() + cc.lastIdle = cc.t.now() } // Wake up writeRequestBody via clientStream.awaitFlowControl and // wake up RoundTrip if there is a pending request. @@ -2243,7 +2409,6 @@ func isEOFOrNetReadError(err error) bool { func (rl *clientConnReadLoop) cleanup() { cc := rl.cc - cc.t.connPool().MarkDead(cc) defer cc.closeConn() defer close(cc.readerDone) @@ -2267,6 +2432,27 @@ func (rl *clientConnReadLoop) cleanup() { } cc.closed = true + // If the connection has never been used, and has been open for only a short time, + // leave it in the connection pool for a little while. + // + // This avoids a situation where new connections are constantly created, + // added to the pool, fail, and are removed from the pool, without any error + // being surfaced to the user. + unusedWaitTime := 5 * time.Second + if cc.idleTimeout > 0 && unusedWaitTime > cc.idleTimeout { + unusedWaitTime = cc.idleTimeout + } + idleTime := cc.t.now().Sub(cc.lastActive) + if atomic.LoadUint32(&cc.atomicReused) == 0 && idleTime < unusedWaitTime && !cc.closedOnIdle { + cc.idleTimer = cc.t.afterFunc(unusedWaitTime-idleTime, func() { + cc.t.connPool().MarkDead(cc) + }) + } else { + cc.mu.Unlock() // avoid any deadlocks in MarkDead + cc.t.connPool().MarkDead(cc) + cc.mu.Lock() + } + for _, cs := range cc.streams { select { case <-cs.peerClosed: @@ -2324,7 +2510,7 @@ func (rl *clientConnReadLoop) run() error { cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", cc, err, err) } if se, ok := err.(StreamError); ok { - if cs := rl.streamByID(se.StreamID); cs != nil { + if cs := rl.streamByID(se.StreamID, notHeaderOrDataFrame); cs != nil { if se.Cause == nil { se.Cause = cc.fr.errDetail } @@ -2370,13 +2556,16 @@ func (rl *clientConnReadLoop) run() error { if VerboseLogs { cc.vlogf("http2: Transport conn %p received error from processing frame %v: %v", cc, summarizeFrame(f), err) } + if !cc.seenSettings { + close(cc.seenSettingsChan) + } return err } } } func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { - cs := rl.streamByID(f.StreamID) + cs := rl.streamByID(f.StreamID, headerOrDataFrame) if cs == nil { // We'd get here if we canceled a request while the // server had its response still in flight. So if this @@ -2494,15 +2683,34 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra if f.StreamEnded() { return nil, errors.New("1xx informational response with END_STREAM flag") } - cs.num1xx++ - const max1xxResponses = 5 // arbitrary bound on number of informational responses, same as net/http - if cs.num1xx > max1xxResponses { - return nil, errors.New("http2: too many 1xx informational responses") - } if fn := cs.get1xxTraceFunc(); fn != nil { + // If the 1xx response is being delivered to the user, + // then they're responsible for limiting the number + // of responses. if err := fn(statusCode, textproto.MIMEHeader(header)); err != nil { return nil, err } + } else { + // If the user didn't examine the 1xx response, then we + // limit the size of all 1xx headers. + // + // This differs a bit from the HTTP/1 implementation, which + // limits the size of all 1xx headers plus the final response. + // Use the larger limit of MaxHeaderListSize and + // net/http.Transport.MaxResponseHeaderBytes. + limit := int64(cs.cc.t.maxHeaderListSize()) + if t1 := cs.cc.t.t1; t1 != nil && t1.MaxResponseHeaderBytes > limit { + limit = t1.MaxResponseHeaderBytes + } + for _, h := range f.Fields { + cs.totalHeaderSize += int64(h.Size()) + } + if cs.totalHeaderSize > limit { + if VerboseLogs { + log.Printf("http2: 1xx informational responses too large") + } + return nil, errors.New("header list too large") + } } if statusCode == 100 { traceGot100Continue(cs.trace) @@ -2686,7 +2894,7 @@ func (b transportResponseBody) Close() error { func (rl *clientConnReadLoop) processData(f *DataFrame) error { cc := rl.cc - cs := rl.streamByID(f.StreamID) + cs := rl.streamByID(f.StreamID, headerOrDataFrame) data := f.Data() if cs == nil { cc.mu.Lock() @@ -2821,9 +3029,22 @@ func (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) { cs.abortStream(err) } -func (rl *clientConnReadLoop) streamByID(id uint32) *clientStream { +// Constants passed to streamByID for documentation purposes. +const ( + headerOrDataFrame = true + notHeaderOrDataFrame = false +) + +// streamByID returns the stream with the given id, or nil if no stream has that id. +// If headerOrData is true, it clears rst.StreamPingsBlocked. +func (rl *clientConnReadLoop) streamByID(id uint32, headerOrData bool) *clientStream { rl.cc.mu.Lock() defer rl.cc.mu.Unlock() + if headerOrData { + // Work around an unfortunate gRPC behavior. + // See comment on ClientConn.rstStreamPingsBlocked for details. + rl.cc.rstStreamPingsBlocked = false + } cs := rl.cc.streams[id] if cs != nil && !cs.readAborted { return cs @@ -2917,6 +3138,21 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { case SettingHeaderTableSize: cc.henc.SetMaxDynamicTableSize(s.Val) cc.peerMaxHeaderTableSize = s.Val + case SettingEnableConnectProtocol: + if err := s.Valid(); err != nil { + return err + } + // If the peer wants to send us SETTINGS_ENABLE_CONNECT_PROTOCOL, + // we require that it do so in the first SETTINGS frame. + // + // When we attempt to use extended CONNECT, we wait for the first + // SETTINGS frame to see if the server supports it. If we let the + // server enable the feature with a later SETTINGS frame, then + // users will see inconsistent results depending on whether we've + // seen that frame or not. + if !cc.seenSettings { + cc.extendedConnectAllowed = s.Val == 1 + } default: cc.vlogf("Unhandled Setting: %v", s) } @@ -2934,6 +3170,7 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { // connection can establish to our default. cc.maxConcurrentStreams = defaultMaxConcurrentStreams } + close(cc.seenSettingsChan) cc.seenSettings = true } @@ -2942,7 +3179,7 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { cc := rl.cc - cs := rl.streamByID(f.StreamID) + cs := rl.streamByID(f.StreamID, notHeaderOrDataFrame) if f.StreamID != 0 && cs == nil { return nil } @@ -2971,7 +3208,7 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { } func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error { - cs := rl.streamByID(f.StreamID) + cs := rl.streamByID(f.StreamID, notHeaderOrDataFrame) if cs == nil { // TODO: return error if server tries to RST_STREAM an idle stream return nil @@ -3046,6 +3283,12 @@ func (rl *clientConnReadLoop) processPing(f *PingFrame) error { close(c) delete(cc.pings, f.Data) } + if cc.pendingResets > 0 { + // See clientStream.cleanupWriteRequest. + cc.pendingResets = 0 + cc.rstStreamPingsBlocked = true + cc.cond.Broadcast() + } return nil } cc := rl.cc @@ -3068,13 +3311,20 @@ func (rl *clientConnReadLoop) processPushPromise(f *PushPromiseFrame) error { return ConnectionError(ErrCodeProtocol) } -func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) { +// writeStreamReset sends a RST_STREAM frame. +// When ping is true, it also sends a PING frame with a random payload. +func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, ping bool, err error) { // TODO: map err to more interesting error codes, once the // HTTP community comes up with some. But currently for // RST_STREAM there's no equivalent to GOAWAY frame's debug // data, and the error codes are all pretty vague ("cancel"). cc.wmu.Lock() cc.fr.WriteRSTStream(streamID, code) + if ping { + var payload [8]byte + rand.Read(payload[:]) + cc.fr.WritePing(false, payload) + } cc.bw.Flush() cc.wmu.Unlock() } @@ -3228,7 +3478,7 @@ func traceGotConn(req *http.Request, cc *ClientConn, reused bool) { cc.mu.Lock() ci.WasIdle = len(cc.streams) == 0 && reused if ci.WasIdle && !cc.lastActive.IsZero() { - ci.IdleTime = time.Since(cc.lastActive) + ci.IdleTime = cc.t.timeSince(cc.lastActive) } cc.mu.Unlock() diff --git a/vendor/golang.org/x/net/http2/unencrypted.go b/vendor/golang.org/x/net/http2/unencrypted.go new file mode 100644 index 00000000..b2de2116 --- /dev/null +++ b/vendor/golang.org/x/net/http2/unencrypted.go @@ -0,0 +1,32 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "crypto/tls" + "errors" + "net" +) + +const nextProtoUnencryptedHTTP2 = "unencrypted_http2" + +// unencryptedNetConnFromTLSConn retrieves a net.Conn wrapped in a *tls.Conn. +// +// TLSNextProto functions accept a *tls.Conn. +// +// When passing an unencrypted HTTP/2 connection to a TLSNextProto function, +// we pass a *tls.Conn with an underlying net.Conn containing the unencrypted connection. +// To be extra careful about mistakes (accidentally dropping TLS encryption in a place +// where we want it), the tls.Conn contains a net.Conn with an UnencryptedNetConn method +// that returns the actual connection we want to use. +func unencryptedNetConnFromTLSConn(tc *tls.Conn) (net.Conn, error) { + conner, ok := tc.NetConn().(interface { + UnencryptedNetConn() net.Conn + }) + if !ok { + return nil, errors.New("http2: TLS conn unexpectedly found in unencrypted handoff") + } + return conner.UnencryptedNetConn(), nil +} diff --git a/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go b/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go index 2459d069..51121a3d 100644 --- a/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go +++ b/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go @@ -37,7 +37,7 @@ type Config struct { // URL. This is a constant specific to each server. TokenURL string - // Scope specifies optional requested permissions. + // Scopes specifies optional requested permissions. Scopes []string // EndpointParams specifies additional parameters for requests to the token endpoint. diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go index 09f6a49b..74f052aa 100644 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ b/vendor/golang.org/x/oauth2/oauth2.go @@ -56,7 +56,7 @@ type Config struct { // the OAuth flow, after the resource owner's URLs. RedirectURL string - // Scope specifies optional requested permissions. + // Scopes specifies optional requested permissions. Scopes []string // authStyleCache caches which auth style to use when Endpoint.AuthStyle is diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 97cb916f..be8c0020 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -246,6 +246,18 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e return sendfile(outfd, infd, offset, count) } +func Dup3(oldfd, newfd, flags int) error { + if oldfd == newfd || flags&^O_CLOEXEC != 0 { + return EINVAL + } + how := F_DUP2FD + if flags&O_CLOEXEC != 0 { + how = F_DUP2FD_CLOEXEC + } + _, err := fcntl(oldfd, how, newfd) + return err +} + /* * Exposed directly */ diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index ccba391c..6ebc48b3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -321,6 +321,9 @@ const ( AUDIT_INTEGRITY_STATUS = 0x70a AUDIT_IPC = 0x517 AUDIT_IPC_SET_PERM = 0x51f + AUDIT_IPE_ACCESS = 0x58c + AUDIT_IPE_CONFIG_CHANGE = 0x58d + AUDIT_IPE_POLICY_LOAD = 0x58e AUDIT_KERNEL = 0x7d0 AUDIT_KERNEL_OTHER = 0x524 AUDIT_KERN_MODULE = 0x532 @@ -489,6 +492,7 @@ const ( BPF_F_ID = 0x20 BPF_F_NETFILTER_IP_DEFRAG = 0x1 BPF_F_QUERY_EFFECTIVE = 0x1 + BPF_F_REDIRECT_FLAGS = 0x19 BPF_F_REPLACE = 0x4 BPF_F_SLEEPABLE = 0x10 BPF_F_STRICT_ALIGNMENT = 0x1 @@ -1166,6 +1170,7 @@ const ( EXTA = 0xe EXTB = 0xf F2FS_SUPER_MAGIC = 0xf2f52010 + FALLOC_FL_ALLOCATE_RANGE = 0x0 FALLOC_FL_COLLAPSE_RANGE = 0x8 FALLOC_FL_INSERT_RANGE = 0x20 FALLOC_FL_KEEP_SIZE = 0x1 @@ -1799,6 +1804,8 @@ const ( LANDLOCK_ACCESS_NET_BIND_TCP = 0x1 LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2 LANDLOCK_CREATE_RULESET_VERSION = 0x1 + LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET = 0x1 + LANDLOCK_SCOPE_SIGNAL = 0x2 LINUX_REBOOT_CMD_CAD_OFF = 0x0 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef LINUX_REBOOT_CMD_HALT = 0xcdef0123 @@ -1924,6 +1931,7 @@ const ( MNT_FORCE = 0x1 MNT_ID_REQ_SIZE_VER0 = 0x18 MNT_ID_REQ_SIZE_VER1 = 0x20 + MNT_NS_INFO_SIZE_VER0 = 0x10 MODULE_INIT_COMPRESSED_FILE = 0x4 MODULE_INIT_IGNORE_MODVERSIONS = 0x1 MODULE_INIT_IGNORE_VERMAGIC = 0x2 @@ -2970,6 +2978,7 @@ const ( RWF_WRITE_LIFE_NOT_SET = 0x0 SCHED_BATCH = 0x3 SCHED_DEADLINE = 0x6 + SCHED_EXT = 0x7 SCHED_FIFO = 0x1 SCHED_FLAG_ALL = 0x7f SCHED_FLAG_DL_OVERRUN = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 0c00cb3f..c0d45e32 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -109,6 +109,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -297,6 +298,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -335,6 +338,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index dfb36455..c731d24f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -109,6 +109,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -298,6 +299,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -336,6 +339,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index d46dcf78..680018a4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -303,6 +304,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -341,6 +344,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 3af3248a..a63909f3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -112,6 +112,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -205,6 +206,7 @@ const ( PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + POE_MAGIC = 0x504f4530 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 @@ -294,6 +296,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -332,6 +336,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 292bcf02..9b0a2573 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -109,6 +109,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -290,6 +291,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -328,6 +331,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 782b7110..958e6e06 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -296,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -334,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 84973fd9..50c7f25b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -296,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -334,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 6d9cbc3b..ced21d66 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -296,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -334,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 5f9fedbc..226c0441 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -296,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -334,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index bb0026ee..3122737c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -351,6 +352,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -389,6 +392,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 46120db5..eb5d3467 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -355,6 +356,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -393,6 +396,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 5c951634..e921ebc6 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -355,6 +356,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -393,6 +396,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 11a84d5a..38ba81c5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -287,6 +288,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -325,6 +328,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index f78c4617..71f04009 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -108,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -359,6 +360,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -397,6 +400,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index aeb777c3..c44a3133 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -112,6 +112,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -350,6 +351,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x58 + SCM_DEVMEM_LINEAR = 0x57 SCM_TIMESTAMPING = 0x23 SCM_TIMESTAMPING_OPT_STATS = 0x38 SCM_TIMESTAMPING_PKTINFO = 0x3c @@ -436,6 +439,9 @@ const ( SO_CNX_ADVICE = 0x37 SO_COOKIE = 0x3b SO_DETACH_REUSEPORT_BPF = 0x47 + SO_DEVMEM_DMABUF = 0x58 + SO_DEVMEM_DONTNEED = 0x59 + SO_DEVMEM_LINEAR = 0x57 SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index d003c3d4..17c53bd9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -462,11 +462,14 @@ type FdSet struct { const ( SizeofIfMsghdr = 0x70 + SizeofIfMsghdr2 = 0xa0 SizeofIfData = 0x60 + SizeofIfData64 = 0x80 SizeofIfaMsghdr = 0x14 SizeofIfmaMsghdr = 0x10 SizeofIfmaMsghdr2 = 0x14 SizeofRtMsghdr = 0x5c + SizeofRtMsghdr2 = 0x5c SizeofRtMetrics = 0x38 ) @@ -480,6 +483,20 @@ type IfMsghdr struct { Data IfData } +type IfMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Snd_len int32 + Snd_maxlen int32 + Snd_drops int32 + Timer int32 + Data IfData64 +} + type IfData struct { Type uint8 Typelen uint8 @@ -512,6 +529,34 @@ type IfData struct { Reserved2 uint32 } +type IfData64 struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 +} + type IfaMsghdr struct { Msglen uint16 Version uint8 @@ -557,6 +602,21 @@ type RtMsghdr struct { Rmx RtMetrics } +type RtMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Flags int32 + Addrs int32 + Refcnt int32 + Parentflags int32 + Reserved int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + type RtMetrics struct { Locks uint32 Mtu uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 0d45a941..2392226a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -462,11 +462,14 @@ type FdSet struct { const ( SizeofIfMsghdr = 0x70 + SizeofIfMsghdr2 = 0xa0 SizeofIfData = 0x60 + SizeofIfData64 = 0x80 SizeofIfaMsghdr = 0x14 SizeofIfmaMsghdr = 0x10 SizeofIfmaMsghdr2 = 0x14 SizeofRtMsghdr = 0x5c + SizeofRtMsghdr2 = 0x5c SizeofRtMetrics = 0x38 ) @@ -480,6 +483,20 @@ type IfMsghdr struct { Data IfData } +type IfMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Snd_len int32 + Snd_maxlen int32 + Snd_drops int32 + Timer int32 + Data IfData64 +} + type IfData struct { Type uint8 Typelen uint8 @@ -512,6 +529,34 @@ type IfData struct { Reserved2 uint32 } +type IfData64 struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 +} + type IfaMsghdr struct { Msglen uint16 Version uint8 @@ -557,6 +602,21 @@ type RtMsghdr struct { Rmx RtMetrics } +type RtMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Flags int32 + Addrs int32 + Refcnt int32 + Parentflags int32 + Reserved int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + type RtMetrics struct { Locks uint32 Mtu uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 8daaf3fa..5537148d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -2594,8 +2594,8 @@ const ( SOF_TIMESTAMPING_BIND_PHC = 0x8000 SOF_TIMESTAMPING_OPT_ID_TCP = 0x10000 - SOF_TIMESTAMPING_LAST = 0x10000 - SOF_TIMESTAMPING_MASK = 0x1ffff + SOF_TIMESTAMPING_LAST = 0x20000 + SOF_TIMESTAMPING_MASK = 0x3ffff SCM_TSTAMP_SND = 0x0 SCM_TSTAMP_SCHED = 0x1 @@ -3541,7 +3541,7 @@ type Nhmsg struct { type NexthopGrp struct { Id uint32 Weight uint8 - Resvd1 uint8 + High uint8 Resvd2 uint16 } @@ -3802,7 +3802,7 @@ const ( ETHTOOL_MSG_PSE_GET = 0x24 ETHTOOL_MSG_PSE_SET = 0x25 ETHTOOL_MSG_RSS_GET = 0x26 - ETHTOOL_MSG_USER_MAX = 0x2c + ETHTOOL_MSG_USER_MAX = 0x2d ETHTOOL_MSG_KERNEL_NONE = 0x0 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2 @@ -3842,7 +3842,7 @@ const ( ETHTOOL_MSG_MODULE_NTF = 0x24 ETHTOOL_MSG_PSE_GET_REPLY = 0x25 ETHTOOL_MSG_RSS_GET_REPLY = 0x26 - ETHTOOL_MSG_KERNEL_MAX = 0x2c + ETHTOOL_MSG_KERNEL_MAX = 0x2e ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 ETHTOOL_FLAG_OMIT_REPLY = 0x2 ETHTOOL_FLAG_STATS = 0x4 @@ -3850,7 +3850,7 @@ const ( ETHTOOL_A_HEADER_DEV_INDEX = 0x1 ETHTOOL_A_HEADER_DEV_NAME = 0x2 ETHTOOL_A_HEADER_FLAGS = 0x3 - ETHTOOL_A_HEADER_MAX = 0x3 + ETHTOOL_A_HEADER_MAX = 0x4 ETHTOOL_A_BITSET_BIT_UNSPEC = 0x0 ETHTOOL_A_BITSET_BIT_INDEX = 0x1 ETHTOOL_A_BITSET_BIT_NAME = 0x2 @@ -4031,11 +4031,11 @@ const ( ETHTOOL_A_CABLE_RESULT_UNSPEC = 0x0 ETHTOOL_A_CABLE_RESULT_PAIR = 0x1 ETHTOOL_A_CABLE_RESULT_CODE = 0x2 - ETHTOOL_A_CABLE_RESULT_MAX = 0x2 + ETHTOOL_A_CABLE_RESULT_MAX = 0x3 ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC = 0x0 ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 0x1 ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 0x2 - ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x2 + ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x3 ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED = 0x1 ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED = 0x2 @@ -4200,7 +4200,8 @@ type ( } PtpSysOffsetExtended struct { Samples uint32 - Rsv [3]uint32 + Clockid int32 + Rsv [2]uint32 Ts [25][3]PtpClockTime } PtpSysOffsetPrecise struct { @@ -4399,6 +4400,7 @@ const ( type LandlockRulesetAttr struct { Access_fs uint64 Access_net uint64 + Scoped uint64 } type LandlockPathBeneathAttr struct { diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go index 4e613cf6..3ca814f5 100644 --- a/vendor/golang.org/x/sys/windows/dll_windows.go +++ b/vendor/golang.org/x/sys/windows/dll_windows.go @@ -43,8 +43,8 @@ type DLL struct { // LoadDLL loads DLL file into memory. // // Warning: using LoadDLL without an absolute path name is subject to -// DLL preloading attacks. To safely load a system DLL, use LazyDLL -// with System set to true, or use LoadLibraryEx directly. +// DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL], +// or use [LoadLibraryEx] directly. func LoadDLL(name string) (dll *DLL, err error) { namep, err := UTF16PtrFromString(name) if err != nil { @@ -271,6 +271,9 @@ func (d *LazyDLL) NewProc(name string) *LazyProc { } // NewLazyDLL creates new LazyDLL associated with DLL file. +// +// Warning: using NewLazyDLL without an absolute path name is subject to +// DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL]. func NewLazyDLL(name string) *LazyDLL { return &LazyDLL{Name: name} } @@ -410,7 +413,3 @@ func loadLibraryEx(name string, system bool) (*DLL, error) { } return &DLL{Name: name, Handle: h}, nil } - -type errString string - -func (s errString) Error() string { return string(s) } diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 4510bfc3..4a325438 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -168,6 +168,8 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW //sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) //sys DisconnectNamedPipe(pipe Handle) (err error) +//sys GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) +//sys GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) //sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) //sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW //sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index 51311e20..9d138de5 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -176,6 +176,7 @@ const ( WAIT_FAILED = 0xFFFFFFFF // Access rights for process. + PROCESS_ALL_ACCESS = 0xFFFF PROCESS_CREATE_PROCESS = 0x0080 PROCESS_CREATE_THREAD = 0x0002 PROCESS_DUP_HANDLE = 0x0040 diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 6f525288..01c0716c 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -280,8 +280,10 @@ var ( procGetMaximumProcessorCount = modkernel32.NewProc("GetMaximumProcessorCount") procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW") procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW") + procGetNamedPipeClientProcessId = modkernel32.NewProc("GetNamedPipeClientProcessId") procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW") procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo") + procGetNamedPipeServerProcessId = modkernel32.NewProc("GetNamedPipeServerProcessId") procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult") procGetPriorityClass = modkernel32.NewProc("GetPriorityClass") procGetProcAddress = modkernel32.NewProc("GetProcAddress") @@ -1612,7 +1614,7 @@ func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si } func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) { - r0, _, _ := syscall.SyscallN(procCancelMibChangeNotify2.Addr(), uintptr(notificationHandle)) + r0, _, _ := syscall.Syscall(procCancelMibChangeNotify2.Addr(), 1, uintptr(notificationHandle), 0, 0) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1652,7 +1654,7 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) { } func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) { - r0, _, _ := syscall.SyscallN(procGetIfEntry2Ex.Addr(), uintptr(level), uintptr(unsafe.Pointer(row))) + r0, _, _ := syscall.Syscall(procGetIfEntry2Ex.Addr(), 2, uintptr(level), uintptr(unsafe.Pointer(row)), 0) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1660,7 +1662,7 @@ func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) { } func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) { - r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row))) + r0, _, _ := syscall.Syscall(procGetUnicastIpAddressEntry.Addr(), 1, uintptr(unsafe.Pointer(row)), 0, 0) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1672,7 +1674,7 @@ func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsa if initialNotification { _p0 = 1 } - r0, _, _ := syscall.SyscallN(procNotifyIpInterfaceChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle))) + r0, _, _ := syscall.Syscall6(procNotifyIpInterfaceChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1684,7 +1686,7 @@ func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext if initialNotification { _p0 = 1 } - r0, _, _ := syscall.SyscallN(procNotifyUnicastIpAddressChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle))) + r0, _, _ := syscall.Syscall6(procNotifyUnicastIpAddressChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -2446,6 +2448,14 @@ func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err er return } +func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetNamedPipeClientProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID)), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) { r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0) if r1 == 0 { @@ -2462,6 +2472,14 @@ func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint3 return } +func GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetNamedPipeServerProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID)), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) { var _p0 uint32 if wait { diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go index 8f9e592f..cffdfda9 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go @@ -192,7 +192,7 @@ func (d decoder) unmarshalMessage(m protoreflect.Message, skipTypeURL bool) erro fd = fieldDescs.ByTextName(name) } } - if flags.ProtoLegacy { + if flags.ProtoLegacyWeak { if fd != nil && fd.IsWeak() && fd.Message().IsPlaceholder() { fd = nil // reset since the weak reference is not linked in } diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go index 4b177c82..e9fe1039 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go @@ -348,7 +348,11 @@ func (d decoder) unmarshalAnyValue(unmarshal unmarshalFunc, m protoreflect.Messa switch tok.Kind() { case json.ObjectClose: if !found { - return d.newError(tok.Pos(), `missing "value" field`) + // We tolerate an omitted `value` field with the google.protobuf.Empty Well-Known-Type, + // for compatibility with other proto runtimes that have interpreted the spec differently. + if m.Descriptor().FullName() != genid.Empty_message_fullname { + return d.newError(tok.Pos(), `missing "value" field`) + } } return nil diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go index 24bc98ac..d972a3d9 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go @@ -185,7 +185,7 @@ func (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) erro } else if xtErr != nil && xtErr != protoregistry.NotFound { return d.newError(tok.Pos(), "unable to resolve [%s]: %v", tok.RawString(), xtErr) } - if flags.ProtoLegacy { + if flags.ProtoLegacyWeak { if fd != nil && fd.IsWeak() && fd.Message().IsPlaceholder() { fd = nil // reset since the weak reference is not linked in } diff --git a/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb index ff6a3836..5a57ef6f 100644 Binary files a/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb and b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb differ diff --git a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go index 08dad769..bf1aba0e 100644 --- a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go +++ b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go @@ -10,4 +10,9 @@ import "google.golang.org/protobuf/types/descriptorpb" const ( Minimum = descriptorpb.Edition_EDITION_PROTO2 Maximum = descriptorpb.Edition_EDITION_2023 + + // MaximumKnown is the maximum edition that is known to Go Protobuf, but not + // declared as supported. In other words: end users cannot use it, but + // testprotos inside Go Protobuf can. + MaximumKnown = descriptorpb.Edition_EDITION_2024 ) diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go b/vendor/google.golang.org/protobuf/internal/errors/is_go112.go deleted file mode 100644 index fbcd3492..00000000 --- a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.13 -// +build !go1.13 - -package errors - -import "reflect" - -// Is is a copy of Go 1.13's errors.Is for use with older Go versions. -func Is(err, target error) bool { - if target == nil { - return err == target - } - - isComparable := reflect.TypeOf(target).Comparable() - for { - if isComparable && err == target { - return true - } - if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { - return true - } - if err = unwrap(err); err == nil { - return false - } - } -} - -func unwrap(err error) error { - u, ok := err.(interface { - Unwrap() error - }) - if !ok { - return nil - } - return u.Unwrap() -} diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go b/vendor/google.golang.org/protobuf/internal/errors/is_go113.go deleted file mode 100644 index 5e72f1cd..00000000 --- a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.13 -// +build go1.13 - -package errors - -import "errors" - -// Is is errors.Is. -func Is(err, target error) bool { return errors.Is(err, target) } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index fa790e0f..378b826f 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -32,6 +32,7 @@ const ( EditionProto2 Edition = 998 EditionProto3 Edition = 999 Edition2023 Edition = 1000 + Edition2024 Edition = 1001 EditionUnsupported Edition = 100000 ) @@ -77,31 +78,48 @@ type ( Locations SourceLocations } + // EditionFeatures is a frequently-instantiated struct, so please take care + // to minimize padding when adding new fields to this struct (add them in + // the right place/order). EditionFeatures struct { + // StripEnumPrefix determines if the plugin generates enum value + // constants as-is, with their prefix stripped, or both variants. + StripEnumPrefix int + // IsFieldPresence is true if field_presence is EXPLICIT // https://protobuf.dev/editions/features/#field_presence IsFieldPresence bool + // IsFieldPresence is true if field_presence is LEGACY_REQUIRED // https://protobuf.dev/editions/features/#field_presence IsLegacyRequired bool + // IsOpenEnum is true if enum_type is OPEN // https://protobuf.dev/editions/features/#enum_type IsOpenEnum bool + // IsPacked is true if repeated_field_encoding is PACKED // https://protobuf.dev/editions/features/#repeated_field_encoding IsPacked bool + // IsUTF8Validated is true if utf_validation is VERIFY // https://protobuf.dev/editions/features/#utf8_validation IsUTF8Validated bool + // IsDelimitedEncoded is true if message_encoding is DELIMITED // https://protobuf.dev/editions/features/#message_encoding IsDelimitedEncoded bool + // IsJSONCompliant is true if json_format is ALLOW // https://protobuf.dev/editions/features/#json_format IsJSONCompliant bool + // GenerateLegacyUnmarshalJSON determines if the plugin generates the // UnmarshalJSON([]byte) error method for enums. GenerateLegacyUnmarshalJSON bool + // APILevel controls which API (Open, Hybrid or Opaque) should be used + // for generated code (.pb.go files). + APILevel int } ) diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go index fd4d0c83..10132c9b 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go @@ -32,6 +32,14 @@ func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures { v, m := protowire.ConsumeVarint(b) b = b[m:] parent.GenerateLegacyUnmarshalJSON = protowire.DecodeBool(v) + case genid.GoFeatures_ApiLevel_field_number: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + parent.APILevel = int(v) + case genid.GoFeatures_StripEnumPrefix_field_number: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + parent.StripEnumPrefix = int(v) default: panic(fmt.Sprintf("unkown field number %d while unmarshalling GoFeatures", num)) } diff --git a/vendor/google.golang.org/protobuf/internal/flags/flags.go b/vendor/google.golang.org/protobuf/internal/flags/flags.go index 58372dd3..5cb3ee70 100644 --- a/vendor/google.golang.org/protobuf/internal/flags/flags.go +++ b/vendor/google.golang.org/protobuf/internal/flags/flags.go @@ -22,3 +22,8 @@ const ProtoLegacy = protoLegacy // extension fields at unmarshal time, but defers creating the message // structure until the extension is first accessed. const LazyUnmarshalExtensions = ProtoLegacy + +// ProtoLegacyWeak specifies whether to enable support for weak fields. +// This flag was split out of ProtoLegacy in preparation for removing +// support for weak fields (independent of the other protolegacy features). +const ProtoLegacyWeak = ProtoLegacy diff --git a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go index 7f67cbb6..f5ee7f5c 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go @@ -21,13 +21,47 @@ const ( // Field names for pb.GoFeatures. const ( GoFeatures_LegacyUnmarshalJsonEnum_field_name protoreflect.Name = "legacy_unmarshal_json_enum" + GoFeatures_ApiLevel_field_name protoreflect.Name = "api_level" + GoFeatures_StripEnumPrefix_field_name protoreflect.Name = "strip_enum_prefix" GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "pb.GoFeatures.legacy_unmarshal_json_enum" + GoFeatures_ApiLevel_field_fullname protoreflect.FullName = "pb.GoFeatures.api_level" + GoFeatures_StripEnumPrefix_field_fullname protoreflect.FullName = "pb.GoFeatures.strip_enum_prefix" ) // Field numbers for pb.GoFeatures. const ( GoFeatures_LegacyUnmarshalJsonEnum_field_number protoreflect.FieldNumber = 1 + GoFeatures_ApiLevel_field_number protoreflect.FieldNumber = 2 + GoFeatures_StripEnumPrefix_field_number protoreflect.FieldNumber = 3 +) + +// Full and short names for pb.GoFeatures.APILevel. +const ( + GoFeatures_APILevel_enum_fullname = "pb.GoFeatures.APILevel" + GoFeatures_APILevel_enum_name = "APILevel" +) + +// Enum values for pb.GoFeatures.APILevel. +const ( + GoFeatures_API_LEVEL_UNSPECIFIED_enum_value = 0 + GoFeatures_API_OPEN_enum_value = 1 + GoFeatures_API_HYBRID_enum_value = 2 + GoFeatures_API_OPAQUE_enum_value = 3 +) + +// Full and short names for pb.GoFeatures.StripEnumPrefix. +const ( + GoFeatures_StripEnumPrefix_enum_fullname = "pb.GoFeatures.StripEnumPrefix" + GoFeatures_StripEnumPrefix_enum_name = "StripEnumPrefix" +) + +// Enum values for pb.GoFeatures.StripEnumPrefix. +const ( + GoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED_enum_value = 0 + GoFeatures_STRIP_ENUM_PREFIX_KEEP_enum_value = 1 + GoFeatures_STRIP_ENUM_PREFIX_GENERATE_BOTH_enum_value = 2 + GoFeatures_STRIP_ENUM_PREFIX_STRIP_enum_value = 3 ) // Extension numbers diff --git a/vendor/google.golang.org/protobuf/internal/genid/name.go b/vendor/google.golang.org/protobuf/internal/genid/name.go new file mode 100644 index 00000000..224f3393 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/genid/name.go @@ -0,0 +1,12 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package genid + +const ( + NoUnkeyedLiteral_goname = "noUnkeyedLiteral" + NoUnkeyedLiteralA_goname = "XXX_NoUnkeyedLiteral" + + BuilderSuffix_goname = "_builder" +) diff --git a/vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go new file mode 100644 index 00000000..6075d6f6 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go @@ -0,0 +1,128 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "strconv" + "sync/atomic" + "unsafe" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +func (Export) UnmarshalField(msg any, fieldNum int32) { + UnmarshalField(msg.(protoreflect.ProtoMessage).ProtoReflect(), protoreflect.FieldNumber(fieldNum)) +} + +// Present checks the presence set for a certain field number (zero +// based, ordered by appearance in original proto file). part is +// a pointer to the correct element in the bitmask array, num is the +// field number unaltered. Example (field number 70 -> part = +// &m.XXX_presence[1], num = 70) +func (Export) Present(part *uint32, num uint32) bool { + // This hook will read an unprotected shadow presence set if + // we're unning under the race detector + raceDetectHookPresent(part, num) + return atomic.LoadUint32(part)&(1<<(num%32)) > 0 +} + +// SetPresent adds a field to the presence set. part is a pointer to +// the relevant element in the array and num is the field number +// unaltered. size is the number of fields in the protocol +// buffer. +func (Export) SetPresent(part *uint32, num uint32, size uint32) { + // This hook will mutate an unprotected shadow presence set if + // we're running under the race detector + raceDetectHookSetPresent(part, num, presenceSize(size)) + for { + old := atomic.LoadUint32(part) + if atomic.CompareAndSwapUint32(part, old, old|(1<<(num%32))) { + return + } + } +} + +// SetPresentNonAtomic is like SetPresent, but operates non-atomically. +// It is meant for use by builder methods, where the message is known not +// to be accessible yet by other goroutines. +func (Export) SetPresentNonAtomic(part *uint32, num uint32, size uint32) { + // This hook will mutate an unprotected shadow presence set if + // we're running under the race detector + raceDetectHookSetPresent(part, num, presenceSize(size)) + *part |= 1 << (num % 32) +} + +// ClearPresence removes a field from the presence set. part is a +// pointer to the relevant element in the presence array and num is +// the field number unaltered. +func (Export) ClearPresent(part *uint32, num uint32) { + // This hook will mutate an unprotected shadow presence set if + // we're running under the race detector + raceDetectHookClearPresent(part, num) + for { + old := atomic.LoadUint32(part) + if atomic.CompareAndSwapUint32(part, old, old&^(1<<(num%32))) { + return + } + } +} + +// interfaceToPointer takes a pointer to an empty interface whose value is a +// pointer type, and converts it into a "pointer" that points to the same +// target +func interfaceToPointer(i *any) pointer { + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} +} + +func (p pointer) atomicGetPointer() pointer { + return pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))} +} + +func (p pointer) atomicSetPointer(q pointer) { + atomic.StorePointer((*unsafe.Pointer)(p.p), q.p) +} + +// AtomicCheckPointerIsNil takes an interface (which is a pointer to a +// pointer) and returns true if the pointed-to pointer is nil (using an +// atomic load). This function is inlineable and, on x86, just becomes a +// simple load and compare. +func (Export) AtomicCheckPointerIsNil(ptr any) bool { + return interfaceToPointer(&ptr).atomicGetPointer().IsNil() +} + +// AtomicSetPointer takes two interfaces (first is a pointer to a pointer, +// second is a pointer) and atomically sets the second pointer into location +// referenced by first pointer. Unfortunately, atomicSetPointer() does not inline +// (even on x86), so this does not become a simple store on x86. +func (Export) AtomicSetPointer(dstPtr, valPtr any) { + interfaceToPointer(&dstPtr).atomicSetPointer(interfaceToPointer(&valPtr)) +} + +// AtomicLoadPointer loads the pointer at the location pointed at by src, +// and stores that pointer value into the location pointed at by dst. +func (Export) AtomicLoadPointer(ptr Pointer, dst Pointer) { + *(*unsafe.Pointer)(unsafe.Pointer(dst)) = atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(ptr))) +} + +// AtomicInitializePointer makes ptr and dst point to the same value. +// +// If *ptr is a nil pointer, it sets *ptr = *dst. +// +// If *ptr is a non-nil pointer, it sets *dst = *ptr. +func (Export) AtomicInitializePointer(ptr Pointer, dst Pointer) { + if !atomic.CompareAndSwapPointer((*unsafe.Pointer)(ptr), unsafe.Pointer(nil), *(*unsafe.Pointer)(dst)) { + *(*unsafe.Pointer)(unsafe.Pointer(dst)) = atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(ptr))) + } +} + +// MessageFieldStringOf returns the field formatted as a string, +// either as the field name if resolvable otherwise as a decimal string. +func (Export) MessageFieldStringOf(md protoreflect.MessageDescriptor, n protoreflect.FieldNumber) string { + fd := md.Fields().ByNumber(n) + if fd != nil { + return string(fd.Name()) + } + return strconv.Itoa(int(n)) +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/bitmap.go b/vendor/google.golang.org/protobuf/internal/impl/bitmap.go new file mode 100644 index 00000000..ea276547 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/bitmap.go @@ -0,0 +1,34 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !race + +package impl + +// There is no additional data as we're not running under race detector. +type RaceDetectHookData struct{} + +// Empty stubs for when not using the race detector. Calls to these from index.go should be optimized away. +func (presence) raceDetectHookPresent(num uint32) {} +func (presence) raceDetectHookSetPresent(num uint32, size presenceSize) {} +func (presence) raceDetectHookClearPresent(num uint32) {} +func (presence) raceDetectHookAllocAndCopy(src presence) {} + +// raceDetectHookPresent is called by the generated file interface +// (*proto.internalFuncs) Present to optionally read an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookPresent(field *uint32, num uint32) {} + +// raceDetectHookSetPresent is called by the generated file interface +// (*proto.internalFuncs) SetPresent to optionally write an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookSetPresent(field *uint32, num uint32, size presenceSize) {} + +// raceDetectHookClearPresent is called by the generated file interface +// (*proto.internalFuncs) ClearPresent to optionally write an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookClearPresent(field *uint32, num uint32) {} diff --git a/vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go b/vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go new file mode 100644 index 00000000..e9a27583 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go @@ -0,0 +1,126 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build race + +package impl + +// When running under race detector, we add a presence map of bytes, that we can access +// in the hook functions so that we trigger the race detection whenever we have concurrent +// Read-Writes or Write-Writes. The race detector does not otherwise detect invalid concurrent +// access to lazy fields as all updates of bitmaps and pointers are done using atomic operations. +type RaceDetectHookData struct { + shadowPresence *[]byte +} + +// Hooks for presence bitmap operations that allocate, read and write the shadowPresence +// using non-atomic operations. +func (data *RaceDetectHookData) raceDetectHookAlloc(size presenceSize) { + sp := make([]byte, size) + atomicStoreShadowPresence(&data.shadowPresence, &sp) +} + +func (p presence) raceDetectHookPresent(num uint32) { + data := p.toRaceDetectData() + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp != nil { + _ = (*sp)[num] + } +} + +func (p presence) raceDetectHookSetPresent(num uint32, size presenceSize) { + data := p.toRaceDetectData() + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp == nil { + data.raceDetectHookAlloc(size) + sp = atomicLoadShadowPresence(&data.shadowPresence) + } + (*sp)[num] = 1 +} + +func (p presence) raceDetectHookClearPresent(num uint32) { + data := p.toRaceDetectData() + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp != nil { + (*sp)[num] = 0 + + } +} + +// raceDetectHookAllocAndCopy allocates a new shadowPresence slice at lazy and copies +// shadowPresence bytes from src to lazy. +func (p presence) raceDetectHookAllocAndCopy(q presence) { + sData := q.toRaceDetectData() + dData := p.toRaceDetectData() + if sData == nil { + return + } + srcSp := atomicLoadShadowPresence(&sData.shadowPresence) + if srcSp == nil { + atomicStoreShadowPresence(&dData.shadowPresence, nil) + return + } + n := len(*srcSp) + dSlice := make([]byte, n) + atomicStoreShadowPresence(&dData.shadowPresence, &dSlice) + for i := 0; i < n; i++ { + dSlice[i] = (*srcSp)[i] + } +} + +// raceDetectHookPresent is called by the generated file interface +// (*proto.internalFuncs) Present to optionally read an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookPresent(field *uint32, num uint32) { + data := findPointerToRaceDetectData(field, num) + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp != nil { + _ = (*sp)[num] + } +} + +// raceDetectHookSetPresent is called by the generated file interface +// (*proto.internalFuncs) SetPresent to optionally write an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookSetPresent(field *uint32, num uint32, size presenceSize) { + data := findPointerToRaceDetectData(field, num) + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp == nil { + data.raceDetectHookAlloc(size) + sp = atomicLoadShadowPresence(&data.shadowPresence) + } + (*sp)[num] = 1 +} + +// raceDetectHookClearPresent is called by the generated file interface +// (*proto.internalFuncs) ClearPresent to optionally write an unprotected +// shadow bitmap when race detection is enabled. In regular code it is +// a noop. +func raceDetectHookClearPresent(field *uint32, num uint32) { + data := findPointerToRaceDetectData(field, num) + if data == nil { + return + } + sp := atomicLoadShadowPresence(&data.shadowPresence) + if sp != nil { + (*sp)[num] = 0 + } +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go index f29e6a8f..fe2c719c 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +++ b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go @@ -35,6 +35,12 @@ func (mi *MessageInfo) checkInitializedPointer(p pointer) error { } return nil } + + var presence presence + if mi.presenceOffset.IsValid() { + presence = p.Apply(mi.presenceOffset).PresenceInfo() + } + if mi.extensionOffset.IsValid() { e := p.Apply(mi.extensionOffset).Extensions() if err := mi.isInitExtensions(e); err != nil { @@ -45,6 +51,33 @@ func (mi *MessageInfo) checkInitializedPointer(p pointer) error { if !f.isRequired && f.funcs.isInit == nil { continue } + + if f.presenceIndex != noPresence { + if !presence.Present(f.presenceIndex) { + if f.isRequired { + return errors.RequiredNotSet(string(mi.Desc.Fields().ByNumber(f.num).FullName())) + } + continue + } + if f.funcs.isInit != nil { + f.mi.init() + if f.mi.needsInitCheck { + if f.isLazy && p.Apply(f.offset).AtomicGetPointer().IsNil() { + lazy := *p.Apply(mi.lazyOffset).LazyInfoPtr() + if !lazy.AllowedPartial() { + // Nothing to see here, it was checked on unmarshal + continue + } + mi.lazyUnmarshal(p, f.num) + } + if err := f.funcs.isInit(p.Apply(f.offset), f); err != nil { + return err + } + } + } + continue + } + fptr := p.Apply(f.offset) if f.isPointer && fptr.Elem().IsNil() { if f.isRequired { diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go new file mode 100644 index 00000000..76818ea2 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go @@ -0,0 +1,264 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "fmt" + "reflect" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func makeOpaqueMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) { + mi := getMessageInfo(ft) + if mi == nil { + panic(fmt.Sprintf("invalid field: %v: unsupported message type %v", fd.FullName(), ft)) + } + switch fd.Kind() { + case protoreflect.MessageKind: + return mi, pointerCoderFuncs{ + size: sizeOpaqueMessage, + marshal: appendOpaqueMessage, + unmarshal: consumeOpaqueMessage, + isInit: isInitOpaqueMessage, + merge: mergeOpaqueMessage, + } + case protoreflect.GroupKind: + return mi, pointerCoderFuncs{ + size: sizeOpaqueGroup, + marshal: appendOpaqueGroup, + unmarshal: consumeOpaqueGroup, + isInit: isInitOpaqueMessage, + merge: mergeOpaqueMessage, + } + } + panic("unexpected field kind") +} + +func sizeOpaqueMessage(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { + return protowire.SizeBytes(f.mi.sizePointer(p.AtomicGetPointer(), opts)) + f.tagsize +} + +func appendOpaqueMessage(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + mp := p.AtomicGetPointer() + calculatedSize := f.mi.sizePointer(mp, opts) + b = protowire.AppendVarint(b, f.wiretag) + b = protowire.AppendVarint(b, uint64(calculatedSize)) + before := len(b) + b, err := f.mi.marshalAppendPointer(b, mp, opts) + if measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize) + } + return b, err +} + +func consumeOpaqueMessage(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if wtyp != protowire.BytesType { + return out, errUnknown + } + v, n := protowire.ConsumeBytes(b) + if n < 0 { + return out, errDecode + } + mp := p.AtomicGetPointer() + if mp.IsNil() { + mp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) + } + o, err := f.mi.unmarshalPointer(v, mp, 0, opts) + if err != nil { + return out, err + } + out.n = n + out.initialized = o.initialized + return out, nil +} + +func isInitOpaqueMessage(p pointer, f *coderFieldInfo) error { + mp := p.AtomicGetPointer() + if mp.IsNil() { + return nil + } + return f.mi.checkInitializedPointer(mp) +} + +func mergeOpaqueMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { + dstmp := dst.AtomicGetPointer() + if dstmp.IsNil() { + dstmp = dst.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) + } + f.mi.mergePointer(dstmp, src.AtomicGetPointer(), opts) +} + +func sizeOpaqueGroup(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { + return 2*f.tagsize + f.mi.sizePointer(p.AtomicGetPointer(), opts) +} + +func appendOpaqueGroup(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + b = protowire.AppendVarint(b, f.wiretag) // start group + b, err := f.mi.marshalAppendPointer(b, p.AtomicGetPointer(), opts) + b = protowire.AppendVarint(b, f.wiretag+1) // end group + return b, err +} + +func consumeOpaqueGroup(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if wtyp != protowire.StartGroupType { + return out, errUnknown + } + mp := p.AtomicGetPointer() + if mp.IsNil() { + mp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) + } + o, e := f.mi.unmarshalPointer(b, mp, f.num, opts) + return o, e +} + +func makeOpaqueRepeatedMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) { + if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice { + panic(fmt.Sprintf("invalid field: %v: unsupported type for opaque repeated message: %v", fd.FullName(), ft)) + } + mt := ft.Elem().Elem() // *[]*T -> *T + mi := getMessageInfo(mt) + if mi == nil { + panic(fmt.Sprintf("invalid field: %v: unsupported message type %v", fd.FullName(), mt)) + } + switch fd.Kind() { + case protoreflect.MessageKind: + return mi, pointerCoderFuncs{ + size: sizeOpaqueMessageSlice, + marshal: appendOpaqueMessageSlice, + unmarshal: consumeOpaqueMessageSlice, + isInit: isInitOpaqueMessageSlice, + merge: mergeOpaqueMessageSlice, + } + case protoreflect.GroupKind: + return mi, pointerCoderFuncs{ + size: sizeOpaqueGroupSlice, + marshal: appendOpaqueGroupSlice, + unmarshal: consumeOpaqueGroupSlice, + isInit: isInitOpaqueMessageSlice, + merge: mergeOpaqueMessageSlice, + } + } + panic("unexpected field kind") +} + +func sizeOpaqueMessageSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { + s := p.AtomicGetPointer().PointerSlice() + n := 0 + for _, v := range s { + n += protowire.SizeBytes(f.mi.sizePointer(v, opts)) + f.tagsize + } + return n +} + +func appendOpaqueMessageSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + s := p.AtomicGetPointer().PointerSlice() + var err error + for _, v := range s { + b = protowire.AppendVarint(b, f.wiretag) + siz := f.mi.sizePointer(v, opts) + b = protowire.AppendVarint(b, uint64(siz)) + before := len(b) + b, err = f.mi.marshalAppendPointer(b, v, opts) + if err != nil { + return b, err + } + if measuredSize := len(b) - before; siz != measuredSize { + return nil, errors.MismatchedSizeCalculation(siz, measuredSize) + } + } + return b, nil +} + +func consumeOpaqueMessageSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if wtyp != protowire.BytesType { + return out, errUnknown + } + v, n := protowire.ConsumeBytes(b) + if n < 0 { + return out, errDecode + } + mp := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())) + o, err := f.mi.unmarshalPointer(v, mp, 0, opts) + if err != nil { + return out, err + } + sp := p.AtomicGetPointer() + if sp.IsNil() { + sp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem()))) + } + sp.AppendPointerSlice(mp) + out.n = n + out.initialized = o.initialized + return out, nil +} + +func isInitOpaqueMessageSlice(p pointer, f *coderFieldInfo) error { + sp := p.AtomicGetPointer() + if sp.IsNil() { + return nil + } + s := sp.PointerSlice() + for _, v := range s { + if err := f.mi.checkInitializedPointer(v); err != nil { + return err + } + } + return nil +} + +func mergeOpaqueMessageSlice(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { + ds := dst.AtomicGetPointer() + if ds.IsNil() { + ds = dst.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem()))) + } + for _, sp := range src.AtomicGetPointer().PointerSlice() { + dm := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())) + f.mi.mergePointer(dm, sp, opts) + ds.AppendPointerSlice(dm) + } +} + +func sizeOpaqueGroupSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { + s := p.AtomicGetPointer().PointerSlice() + n := 0 + for _, v := range s { + n += 2*f.tagsize + f.mi.sizePointer(v, opts) + } + return n +} + +func appendOpaqueGroupSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + s := p.AtomicGetPointer().PointerSlice() + var err error + for _, v := range s { + b = protowire.AppendVarint(b, f.wiretag) // start group + b, err = f.mi.marshalAppendPointer(b, v, opts) + if err != nil { + return b, err + } + b = protowire.AppendVarint(b, f.wiretag+1) // end group + } + return b, nil +} + +func consumeOpaqueGroupSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if wtyp != protowire.StartGroupType { + return out, errUnknown + } + mp := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())) + out, err = f.mi.unmarshalPointer(b, mp, f.num, opts) + if err != nil { + return out, err + } + sp := p.AtomicGetPointer() + if sp.IsNil() { + sp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem()))) + } + sp.AppendPointerSlice(mp) + return out, err +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go index fb35f0ba..229c6980 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go @@ -94,7 +94,7 @@ func sizeMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalO return 0 } n := 0 - iter := mapRange(mapv) + iter := mapv.MapRange() for iter.Next() { key := mapi.conv.keyConv.PBValueOf(iter.Key()).MapKey() keySize := mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts) @@ -281,7 +281,7 @@ func appendMap(b []byte, mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, o if opts.Deterministic() { return appendMapDeterministic(b, mapv, mapi, f, opts) } - iter := mapRange(mapv) + iter := mapv.MapRange() for iter.Next() { var err error b = protowire.AppendVarint(b, f.wiretag) @@ -328,7 +328,7 @@ func isInitMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo) error { if !mi.needsInitCheck { return nil } - iter := mapRange(mapv) + iter := mapv.MapRange() for iter.Next() { val := pointerOfValue(iter.Value()) if err := mi.checkInitializedPointer(val); err != nil { @@ -336,7 +336,7 @@ func isInitMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo) error { } } } else { - iter := mapRange(mapv) + iter := mapv.MapRange() for iter.Next() { val := mapi.conv.valConv.PBValueOf(iter.Value()) if err := mapi.valFuncs.isInit(val); err != nil { @@ -356,7 +356,7 @@ func mergeMap(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { if dstm.IsNil() { dstm.Set(reflect.MakeMap(f.ft)) } - iter := mapRange(srcm) + iter := srcm.MapRange() for iter.Next() { dstm.SetMapIndex(iter.Key(), iter.Value()) } @@ -371,7 +371,7 @@ func mergeMapOfBytes(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { if dstm.IsNil() { dstm.Set(reflect.MakeMap(f.ft)) } - iter := mapRange(srcm) + iter := srcm.MapRange() for iter.Next() { dstm.SetMapIndex(iter.Key(), reflect.ValueOf(append(emptyBuf[:], iter.Value().Bytes()...))) } @@ -386,7 +386,7 @@ func mergeMapOfMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { if dstm.IsNil() { dstm.Set(reflect.MakeMap(f.ft)) } - iter := mapRange(srcm) + iter := srcm.MapRange() for iter.Next() { val := reflect.New(f.ft.Elem().Elem()) if f.mi != nil { diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go deleted file mode 100644 index 4b15493f..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.12 -// +build !go1.12 - -package impl - -import "reflect" - -type mapIter struct { - v reflect.Value - keys []reflect.Value -} - -// mapRange provides a less-efficient equivalent to -// the Go 1.12 reflect.Value.MapRange method. -func mapRange(v reflect.Value) *mapIter { - return &mapIter{v: v} -} - -func (i *mapIter) Next() bool { - if i.keys == nil { - i.keys = i.v.MapKeys() - } else { - i.keys = i.keys[1:] - } - return len(i.keys) > 0 -} - -func (i *mapIter) Key() reflect.Value { - return i.keys[0] -} - -func (i *mapIter) Value() reflect.Value { - return i.v.MapIndex(i.keys[0]) -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go deleted file mode 100644 index 0b31b66e..00000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.12 -// +build go1.12 - -package impl - -import "reflect" - -func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go index 78be9df3..111d9583 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go @@ -32,6 +32,10 @@ type coderMessageInfo struct { needsInitCheck bool isMessageSet bool numRequiredFields uint8 + + lazyOffset offset + presenceOffset offset + presenceSize presenceSize } type coderFieldInfo struct { @@ -45,12 +49,19 @@ type coderFieldInfo struct { tagsize int // size of the varint-encoded tag isPointer bool // true if IsNil may be called on the struct field isRequired bool // true if field is required + + isLazy bool + presenceIndex uint32 } +const noPresence = 0xffffffff + func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { mi.sizecacheOffset = invalidOffset mi.unknownOffset = invalidOffset mi.extensionOffset = invalidOffset + mi.lazyOffset = invalidOffset + mi.presenceOffset = si.presenceOffset if si.sizecacheOffset.IsValid() && si.sizecacheType == sizecacheType { mi.sizecacheOffset = si.sizecacheOffset @@ -107,12 +118,12 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { }, } case isOneof: - fieldOffset = offsetOf(fs, mi.Exporter) + fieldOffset = offsetOf(fs) case fd.IsWeak(): fieldOffset = si.weakOffset funcs = makeWeakMessageFieldCoder(fd) default: - fieldOffset = offsetOf(fs, mi.Exporter) + fieldOffset = offsetOf(fs) childMessage, funcs = fieldCoder(fd, ft) } cf := &preallocFields[i] @@ -127,6 +138,8 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { validation: newFieldValidationInfo(mi, si, fd, ft), isPointer: fd.Cardinality() == protoreflect.Repeated || fd.HasPresence(), isRequired: fd.Cardinality() == protoreflect.Required, + + presenceIndex: noPresence, } mi.orderedCoderFields = append(mi.orderedCoderFields, cf) mi.coderFields[cf.num] = cf diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go new file mode 100644 index 00000000..f81d7d0d --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go @@ -0,0 +1,156 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "fmt" + "reflect" + "sort" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/encoding/messageset" + "google.golang.org/protobuf/internal/order" + "google.golang.org/protobuf/reflect/protoreflect" + piface "google.golang.org/protobuf/runtime/protoiface" +) + +func (mi *MessageInfo) makeOpaqueCoderMethods(t reflect.Type, si opaqueStructInfo) { + mi.sizecacheOffset = si.sizecacheOffset + mi.unknownOffset = si.unknownOffset + mi.unknownPtrKind = si.unknownType.Kind() == reflect.Ptr + mi.extensionOffset = si.extensionOffset + mi.lazyOffset = si.lazyOffset + mi.presenceOffset = si.presenceOffset + + mi.coderFields = make(map[protowire.Number]*coderFieldInfo) + fields := mi.Desc.Fields() + for i := 0; i < fields.Len(); i++ { + fd := fields.Get(i) + + fs := si.fieldsByNumber[fd.Number()] + if fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic() { + fs = si.oneofsByName[fd.ContainingOneof().Name()] + } + ft := fs.Type + var wiretag uint64 + if !fd.IsPacked() { + wiretag = protowire.EncodeTag(fd.Number(), wireTypes[fd.Kind()]) + } else { + wiretag = protowire.EncodeTag(fd.Number(), protowire.BytesType) + } + var fieldOffset offset + var funcs pointerCoderFuncs + var childMessage *MessageInfo + switch { + case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): + fieldOffset = offsetOf(fs) + case fd.IsWeak(): + fieldOffset = si.weakOffset + funcs = makeWeakMessageFieldCoder(fd) + case fd.Message() != nil && !fd.IsMap(): + fieldOffset = offsetOf(fs) + if fd.IsList() { + childMessage, funcs = makeOpaqueRepeatedMessageFieldCoder(fd, ft) + } else { + childMessage, funcs = makeOpaqueMessageFieldCoder(fd, ft) + } + default: + fieldOffset = offsetOf(fs) + childMessage, funcs = fieldCoder(fd, ft) + } + cf := &coderFieldInfo{ + num: fd.Number(), + offset: fieldOffset, + wiretag: wiretag, + ft: ft, + tagsize: protowire.SizeVarint(wiretag), + funcs: funcs, + mi: childMessage, + validation: newFieldValidationInfo(mi, si.structInfo, fd, ft), + isPointer: (fd.Cardinality() == protoreflect.Repeated || + fd.Kind() == protoreflect.MessageKind || + fd.Kind() == protoreflect.GroupKind), + isRequired: fd.Cardinality() == protoreflect.Required, + presenceIndex: noPresence, + } + + // TODO: Use presence for all fields. + // + // In some cases, such as maps, presence means only "might be set" rather + // than "is definitely set", but every field should have a presence bit to + // permit us to skip over definitely-unset fields at marshal time. + + var hasPresence bool + hasPresence, cf.isLazy = usePresenceForField(si, fd) + + if hasPresence { + cf.presenceIndex, mi.presenceSize = presenceIndex(mi.Desc, fd) + } + + mi.orderedCoderFields = append(mi.orderedCoderFields, cf) + mi.coderFields[cf.num] = cf + } + for i, oneofs := 0, mi.Desc.Oneofs(); i < oneofs.Len(); i++ { + if od := oneofs.Get(i); !od.IsSynthetic() { + mi.initOneofFieldCoders(od, si.structInfo) + } + } + if messageset.IsMessageSet(mi.Desc) { + if !mi.extensionOffset.IsValid() { + panic(fmt.Sprintf("%v: MessageSet with no extensions field", mi.Desc.FullName())) + } + if !mi.unknownOffset.IsValid() { + panic(fmt.Sprintf("%v: MessageSet with no unknown field", mi.Desc.FullName())) + } + mi.isMessageSet = true + } + sort.Slice(mi.orderedCoderFields, func(i, j int) bool { + return mi.orderedCoderFields[i].num < mi.orderedCoderFields[j].num + }) + + var maxDense protoreflect.FieldNumber + for _, cf := range mi.orderedCoderFields { + if cf.num >= 16 && cf.num >= 2*maxDense { + break + } + maxDense = cf.num + } + mi.denseCoderFields = make([]*coderFieldInfo, maxDense+1) + for _, cf := range mi.orderedCoderFields { + if int(cf.num) > len(mi.denseCoderFields) { + break + } + mi.denseCoderFields[cf.num] = cf + } + + // To preserve compatibility with historic wire output, marshal oneofs last. + if mi.Desc.Oneofs().Len() > 0 { + sort.Slice(mi.orderedCoderFields, func(i, j int) bool { + fi := fields.ByNumber(mi.orderedCoderFields[i].num) + fj := fields.ByNumber(mi.orderedCoderFields[j].num) + return order.LegacyFieldOrder(fi, fj) + }) + } + + mi.needsInitCheck = needsInitCheck(mi.Desc) + if mi.methods.Marshal == nil && mi.methods.Size == nil { + mi.methods.Flags |= piface.SupportMarshalDeterministic + mi.methods.Marshal = mi.marshal + mi.methods.Size = mi.size + } + if mi.methods.Unmarshal == nil { + mi.methods.Flags |= piface.SupportUnmarshalDiscardUnknown + mi.methods.Unmarshal = mi.unmarshal + } + if mi.methods.CheckInitialized == nil { + mi.methods.CheckInitialized = mi.checkInitialized + } + if mi.methods.Merge == nil { + mi.methods.Merge = mi.merge + } + if mi.methods.Equal == nil { + mi.methods.Equal = equal + } +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go index 304244a6..e4580b3a 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go @@ -101,7 +101,7 @@ func (ms *mapReflect) Mutable(k protoreflect.MapKey) protoreflect.Value { return v } func (ms *mapReflect) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - iter := mapRange(ms.v) + iter := ms.v.MapRange() for iter.Next() { k := ms.keyConv.PBValueOf(iter.Key()).MapKey() v := ms.valConv.PBValueOf(iter.Value()) diff --git a/vendor/google.golang.org/protobuf/internal/impl/decode.go b/vendor/google.golang.org/protobuf/internal/impl/decode.go index cda0520c..e0dd21fa 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/decode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/decode.go @@ -34,6 +34,8 @@ func (o unmarshalOptions) Options() proto.UnmarshalOptions { AllowPartial: true, DiscardUnknown: o.DiscardUnknown(), Resolver: o.resolver, + + NoLazyDecoding: o.NoLazyDecoding(), } } @@ -41,13 +43,26 @@ func (o unmarshalOptions) DiscardUnknown() bool { return o.flags&protoiface.UnmarshalDiscardUnknown != 0 } -func (o unmarshalOptions) IsDefault() bool { - return o.flags == 0 && o.resolver == protoregistry.GlobalTypes +func (o unmarshalOptions) AliasBuffer() bool { return o.flags&protoiface.UnmarshalAliasBuffer != 0 } +func (o unmarshalOptions) Validated() bool { return o.flags&protoiface.UnmarshalValidated != 0 } +func (o unmarshalOptions) NoLazyDecoding() bool { + return o.flags&protoiface.UnmarshalNoLazyDecoding != 0 +} + +func (o unmarshalOptions) CanBeLazy() bool { + if o.resolver != protoregistry.GlobalTypes { + return false + } + // We ignore the UnmarshalInvalidateSizeCache even though it's not in the default set + return (o.flags & ^(protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated | protoiface.UnmarshalCheckRequired)) == 0 } var lazyUnmarshalOptions = unmarshalOptions{ resolver: protoregistry.GlobalTypes, - depth: protowire.DefaultRecursionLimit, + + flags: protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated, + + depth: protowire.DefaultRecursionLimit, } type unmarshalOutput struct { @@ -94,9 +109,30 @@ func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire. if flags.ProtoLegacy && mi.isMessageSet { return unmarshalMessageSet(mi, b, p, opts) } + + lazyDecoding := LazyEnabled() // default + if opts.NoLazyDecoding() { + lazyDecoding = false // explicitly disabled + } + if mi.lazyOffset.IsValid() && lazyDecoding { + return mi.unmarshalPointerLazy(b, p, groupTag, opts) + } + return mi.unmarshalPointerEager(b, p, groupTag, opts) +} + +// unmarshalPointerEager is the message unmarshalling function for all messages that are not lazy. +// The corresponding function for Lazy is in google_lazy.go. +func (mi *MessageInfo) unmarshalPointerEager(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { + initialized := true var requiredMask uint64 var exts *map[int32]ExtensionField + + var presence presence + if mi.presenceOffset.IsValid() { + presence = p.Apply(mi.presenceOffset).PresenceInfo() + } + start := len(b) for len(b) > 0 { // Parse the tag (field number and wire type). @@ -154,6 +190,11 @@ func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire. if f.funcs.isInit != nil && !o.initialized { initialized = false } + + if f.presenceIndex != noPresence { + presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + } + default: // Possible extension. if exts == nil && mi.extensionOffset.IsValid() { @@ -222,7 +263,7 @@ func (mi *MessageInfo) unmarshalExtension(b []byte, num protowire.Number, wtyp p return out, errUnknown } if flags.LazyUnmarshalExtensions { - if opts.IsDefault() && x.canLazy(xt) { + if opts.CanBeLazy() && x.canLazy(xt) { out, valid := skipExtension(b, xi, num, wtyp, opts) switch valid { case ValidationValid: @@ -270,6 +311,13 @@ func skipExtension(b []byte, xi *extensionFieldInfo, num protowire.Number, wtyp if n < 0 { return out, ValidationUnknown } + + if opts.Validated() { + out.initialized = true + out.n = n + return out, ValidationValid + } + out, st := xi.validation.mi.validate(v, 0, opts) out.n = n return out, st diff --git a/vendor/google.golang.org/protobuf/internal/impl/encode.go b/vendor/google.golang.org/protobuf/internal/impl/encode.go index 6254f5de..b2e21229 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/encode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/encode.go @@ -10,6 +10,7 @@ import ( "sync/atomic" "google.golang.org/protobuf/internal/flags" + "google.golang.org/protobuf/internal/protolazy" "google.golang.org/protobuf/proto" piface "google.golang.org/protobuf/runtime/protoiface" ) @@ -71,11 +72,39 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int e := p.Apply(mi.extensionOffset).Extensions() size += mi.sizeExtensions(e, opts) } + + var lazy **protolazy.XXX_lazyUnmarshalInfo + var presence presence + if mi.presenceOffset.IsValid() { + presence = p.Apply(mi.presenceOffset).PresenceInfo() + if mi.lazyOffset.IsValid() { + lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() + } + } + for _, f := range mi.orderedCoderFields { if f.funcs.size == nil { continue } fptr := p.Apply(f.offset) + + if f.presenceIndex != noPresence { + if !presence.Present(f.presenceIndex) { + continue + } + + if f.isLazy && fptr.AtomicGetPointer().IsNil() { + if lazyFields(opts) { + size += (*lazy).SizeField(uint32(f.num)) + continue + } else { + mi.lazyUnmarshal(p, f.num) + } + } + size += f.funcs.size(fptr, f, opts) + continue + } + if f.isPointer && fptr.Elem().IsNil() { continue } @@ -134,11 +163,52 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt return b, err } } + + var lazy **protolazy.XXX_lazyUnmarshalInfo + var presence presence + if mi.presenceOffset.IsValid() { + presence = p.Apply(mi.presenceOffset).PresenceInfo() + if mi.lazyOffset.IsValid() { + lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() + } + } + for _, f := range mi.orderedCoderFields { if f.funcs.marshal == nil { continue } fptr := p.Apply(f.offset) + + if f.presenceIndex != noPresence { + if !presence.Present(f.presenceIndex) { + continue + } + if f.isLazy { + // Be careful, this field needs to be read atomically, like for a get + if f.isPointer && fptr.AtomicGetPointer().IsNil() { + if lazyFields(opts) { + b, _ = (*lazy).AppendField(b, uint32(f.num)) + continue + } else { + mi.lazyUnmarshal(p, f.num) + } + } + + b, err = f.funcs.marshal(b, fptr, f, opts) + if err != nil { + return b, err + } + continue + } else if f.isPointer && fptr.Elem().IsNil() { + continue + } + b, err = f.funcs.marshal(b, fptr, f, opts) + if err != nil { + return b, err + } + continue + } + if f.isPointer && fptr.Elem().IsNil() { continue } @@ -163,6 +233,14 @@ func fullyLazyExtensions(opts marshalOptions) bool { return opts.flags&piface.MarshalDeterministic == 0 } +// lazyFields returns true if we should attempt to keep fields lazy over size and marshal. +func lazyFields(opts marshalOptions) bool { + // When deterministic marshaling is requested, force an unmarshal for lazy + // fields to produce a deterministic result, instead of passing through + // bytes lazily that may or may not match what Go Protobuf would produce. + return opts.flags&piface.MarshalDeterministic == 0 +} + func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { if ext == nil { return 0 diff --git a/vendor/google.golang.org/protobuf/internal/impl/lazy.go b/vendor/google.golang.org/protobuf/internal/impl/lazy.go new file mode 100644 index 00000000..e8fb6c35 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/lazy.go @@ -0,0 +1,433 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "fmt" + "math/bits" + "os" + "reflect" + "sort" + "sync/atomic" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/internal/protolazy" + "google.golang.org/protobuf/reflect/protoreflect" + preg "google.golang.org/protobuf/reflect/protoregistry" + piface "google.golang.org/protobuf/runtime/protoiface" +) + +var enableLazy int32 = func() int32 { + if os.Getenv("GOPROTODEBUG") == "nolazy" { + return 0 + } + return 1 +}() + +// EnableLazyUnmarshal enables lazy unmarshaling. +func EnableLazyUnmarshal(enable bool) { + if enable { + atomic.StoreInt32(&enableLazy, 1) + return + } + atomic.StoreInt32(&enableLazy, 0) +} + +// LazyEnabled reports whether lazy unmarshalling is currently enabled. +func LazyEnabled() bool { + return atomic.LoadInt32(&enableLazy) != 0 +} + +// UnmarshalField unmarshals a field in a message. +func UnmarshalField(m interface{}, num protowire.Number) { + switch m := m.(type) { + case *messageState: + m.messageInfo().lazyUnmarshal(m.pointer(), num) + case *messageReflectWrapper: + m.messageInfo().lazyUnmarshal(m.pointer(), num) + default: + panic(fmt.Sprintf("unsupported wrapper type %T", m)) + } +} + +func (mi *MessageInfo) lazyUnmarshal(p pointer, num protoreflect.FieldNumber) { + var f *coderFieldInfo + if int(num) < len(mi.denseCoderFields) { + f = mi.denseCoderFields[num] + } else { + f = mi.coderFields[num] + } + if f == nil { + panic(fmt.Sprintf("lazyUnmarshal: field info for %v.%v", mi.Desc.FullName(), num)) + } + lazy := *p.Apply(mi.lazyOffset).LazyInfoPtr() + start, end, found, _, multipleEntries := lazy.FindFieldInProto(uint32(num)) + if !found && multipleEntries == nil { + panic(fmt.Sprintf("lazyUnmarshal: can't find field data for %v.%v", mi.Desc.FullName(), num)) + } + // The actual pointer in the message can not be set until the whole struct is filled in, otherwise we will have races. + // Create another pointer and set it atomically, if we won the race and the pointer in the original message is still nil. + fp := pointerOfValue(reflect.New(f.ft)) + if multipleEntries != nil { + for _, entry := range multipleEntries { + mi.unmarshalField(lazy.Buffer()[entry.Start:entry.End], fp, f, lazy, lazy.UnmarshalFlags()) + } + } else { + mi.unmarshalField(lazy.Buffer()[start:end], fp, f, lazy, lazy.UnmarshalFlags()) + } + p.Apply(f.offset).AtomicSetPointerIfNil(fp.Elem()) +} + +func (mi *MessageInfo) unmarshalField(b []byte, p pointer, f *coderFieldInfo, lazyInfo *protolazy.XXX_lazyUnmarshalInfo, flags piface.UnmarshalInputFlags) error { + opts := lazyUnmarshalOptions + opts.flags |= flags + for len(b) > 0 { + // Parse the tag (field number and wire type). + var tag uint64 + if b[0] < 0x80 { + tag = uint64(b[0]) + b = b[1:] + } else if len(b) >= 2 && b[1] < 128 { + tag = uint64(b[0]&0x7f) + uint64(b[1])<<7 + b = b[2:] + } else { + var n int + tag, n = protowire.ConsumeVarint(b) + if n < 0 { + return errors.New("invalid wire data") + } + b = b[n:] + } + var num protowire.Number + if n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) { + return errors.New("invalid wire data") + } else { + num = protowire.Number(n) + } + wtyp := protowire.Type(tag & 7) + if num == f.num { + o, err := f.funcs.unmarshal(b, p, wtyp, f, opts) + if err == nil { + b = b[o.n:] + continue + } + if err != errUnknown { + return err + } + } + n := protowire.ConsumeFieldValue(num, wtyp, b) + if n < 0 { + return errors.New("invalid wire data") + } + b = b[n:] + } + return nil +} + +func (mi *MessageInfo) skipField(b []byte, f *coderFieldInfo, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, _ ValidationStatus) { + fmi := f.validation.mi + if fmi == nil { + fd := mi.Desc.Fields().ByNumber(f.num) + if fd == nil || !fd.IsWeak() { + return out, ValidationUnknown + } + messageName := fd.Message().FullName() + messageType, err := preg.GlobalTypes.FindMessageByName(messageName) + if err != nil { + return out, ValidationUnknown + } + var ok bool + fmi, ok = messageType.(*MessageInfo) + if !ok { + return out, ValidationUnknown + } + } + fmi.init() + switch f.validation.typ { + case validationTypeMessage: + if wtyp != protowire.BytesType { + return out, ValidationWrongWireType + } + v, n := protowire.ConsumeBytes(b) + if n < 0 { + return out, ValidationInvalid + } + out, st := fmi.validate(v, 0, opts) + out.n = n + return out, st + case validationTypeGroup: + if wtyp != protowire.StartGroupType { + return out, ValidationWrongWireType + } + out, st := fmi.validate(b, f.num, opts) + return out, st + default: + return out, ValidationUnknown + } +} + +// unmarshalPointerLazy is similar to unmarshalPointerEager, but it +// specifically handles lazy unmarshalling. it expects lazyOffset and +// presenceOffset to both be valid. +func (mi *MessageInfo) unmarshalPointerLazy(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { + initialized := true + var requiredMask uint64 + var lazy **protolazy.XXX_lazyUnmarshalInfo + var presence presence + var lazyIndex []protolazy.IndexEntry + var lastNum protowire.Number + outOfOrder := false + lazyDecode := false + presence = p.Apply(mi.presenceOffset).PresenceInfo() + lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() + if !presence.AnyPresent(mi.presenceSize) { + if opts.CanBeLazy() { + // If the message contains existing data, we need to merge into it. + // Lazy unmarshaling doesn't merge, so only enable it when the + // message is empty (has no presence bitmap). + lazyDecode = true + if *lazy == nil { + *lazy = &protolazy.XXX_lazyUnmarshalInfo{} + } + (*lazy).SetUnmarshalFlags(opts.flags) + if !opts.AliasBuffer() { + // Make a copy of the buffer for lazy unmarshaling. + // Set the AliasBuffer flag so recursive unmarshal + // operations reuse the copy. + b = append([]byte{}, b...) + opts.flags |= piface.UnmarshalAliasBuffer + } + (*lazy).SetBuffer(b) + } + } + // Track special handling of lazy fields. + // + // In the common case, all fields are lazyValidateOnly (and lazyFields remains nil). + // In the event that validation for a field fails, this map tracks handling of the field. + type lazyAction uint8 + const ( + lazyValidateOnly lazyAction = iota // validate the field only + lazyUnmarshalNow // eagerly unmarshal the field + lazyUnmarshalLater // unmarshal the field after the message is fully processed + ) + var lazyFields map[*coderFieldInfo]lazyAction + var exts *map[int32]ExtensionField + start := len(b) + pos := 0 + for len(b) > 0 { + // Parse the tag (field number and wire type). + var tag uint64 + if b[0] < 0x80 { + tag = uint64(b[0]) + b = b[1:] + } else if len(b) >= 2 && b[1] < 128 { + tag = uint64(b[0]&0x7f) + uint64(b[1])<<7 + b = b[2:] + } else { + var n int + tag, n = protowire.ConsumeVarint(b) + if n < 0 { + return out, errDecode + } + b = b[n:] + } + var num protowire.Number + if n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) { + return out, errors.New("invalid field number") + } else { + num = protowire.Number(n) + } + wtyp := protowire.Type(tag & 7) + + if wtyp == protowire.EndGroupType { + if num != groupTag { + return out, errors.New("mismatching end group marker") + } + groupTag = 0 + break + } + + var f *coderFieldInfo + if int(num) < len(mi.denseCoderFields) { + f = mi.denseCoderFields[num] + } else { + f = mi.coderFields[num] + } + var n int + err := errUnknown + discardUnknown := false + Field: + switch { + case f != nil: + if f.funcs.unmarshal == nil { + break + } + if f.isLazy && lazyDecode { + switch { + case lazyFields == nil || lazyFields[f] == lazyValidateOnly: + // Attempt to validate this field and leave it for later lazy unmarshaling. + o, valid := mi.skipField(b, f, wtyp, opts) + switch valid { + case ValidationValid: + // Skip over the valid field and continue. + err = nil + presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + requiredMask |= f.validation.requiredBit + if !o.initialized { + initialized = false + } + n = o.n + break Field + case ValidationInvalid: + return out, errors.New("invalid proto wire format") + case ValidationWrongWireType: + break Field + case ValidationUnknown: + if lazyFields == nil { + lazyFields = make(map[*coderFieldInfo]lazyAction) + } + if presence.Present(f.presenceIndex) { + // We were unable to determine if the field is valid or not, + // and we've already skipped over at least one instance of this + // field. Clear the presence bit (so if we stop decoding early, + // we don't leave a partially-initialized field around) and flag + // the field for unmarshaling before we return. + presence.ClearPresent(f.presenceIndex) + lazyFields[f] = lazyUnmarshalLater + discardUnknown = true + break Field + } else { + // We were unable to determine if the field is valid or not, + // but this is the first time we've seen it. Flag it as needing + // eager unmarshaling and fall through to the eager unmarshal case below. + lazyFields[f] = lazyUnmarshalNow + } + } + case lazyFields[f] == lazyUnmarshalLater: + // This field will be unmarshaled in a separate pass below. + // Skip over it here. + discardUnknown = true + break Field + default: + // Eagerly unmarshal the field. + } + } + if f.isLazy && !lazyDecode && presence.Present(f.presenceIndex) { + if p.Apply(f.offset).AtomicGetPointer().IsNil() { + mi.lazyUnmarshal(p, f.num) + } + } + var o unmarshalOutput + o, err = f.funcs.unmarshal(b, p.Apply(f.offset), wtyp, f, opts) + n = o.n + if err != nil { + break + } + requiredMask |= f.validation.requiredBit + if f.funcs.isInit != nil && !o.initialized { + initialized = false + } + if f.presenceIndex != noPresence { + presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + } + default: + // Possible extension. + if exts == nil && mi.extensionOffset.IsValid() { + exts = p.Apply(mi.extensionOffset).Extensions() + if *exts == nil { + *exts = make(map[int32]ExtensionField) + } + } + if exts == nil { + break + } + var o unmarshalOutput + o, err = mi.unmarshalExtension(b, num, wtyp, *exts, opts) + if err != nil { + break + } + n = o.n + if !o.initialized { + initialized = false + } + } + if err != nil { + if err != errUnknown { + return out, err + } + n = protowire.ConsumeFieldValue(num, wtyp, b) + if n < 0 { + return out, errDecode + } + if !discardUnknown && !opts.DiscardUnknown() && mi.unknownOffset.IsValid() { + u := mi.mutableUnknownBytes(p) + *u = protowire.AppendTag(*u, num, wtyp) + *u = append(*u, b[:n]...) + } + } + b = b[n:] + end := start - len(b) + if lazyDecode && f != nil && f.isLazy { + if num != lastNum { + lazyIndex = append(lazyIndex, protolazy.IndexEntry{ + FieldNum: uint32(num), + Start: uint32(pos), + End: uint32(end), + }) + } else { + i := len(lazyIndex) - 1 + lazyIndex[i].End = uint32(end) + lazyIndex[i].MultipleContiguous = true + } + } + if num < lastNum { + outOfOrder = true + } + pos = end + lastNum = num + } + if groupTag != 0 { + return out, errors.New("missing end group marker") + } + if lazyFields != nil { + // Some fields failed validation, and now need to be unmarshaled. + for f, action := range lazyFields { + if action != lazyUnmarshalLater { + continue + } + initialized = false + if *lazy == nil { + *lazy = &protolazy.XXX_lazyUnmarshalInfo{} + } + if err := mi.unmarshalField((*lazy).Buffer(), p.Apply(f.offset), f, *lazy, opts.flags); err != nil { + return out, err + } + presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + } + } + if lazyDecode { + if outOfOrder { + sort.Slice(lazyIndex, func(i, j int) bool { + return lazyIndex[i].FieldNum < lazyIndex[j].FieldNum || + (lazyIndex[i].FieldNum == lazyIndex[j].FieldNum && + lazyIndex[i].Start < lazyIndex[j].Start) + }) + } + if *lazy == nil { + *lazy = &protolazy.XXX_lazyUnmarshalInfo{} + } + + (*lazy).SetIndex(lazyIndex) + } + if mi.numRequiredFields > 0 && bits.OnesCount64(requiredMask) != int(mi.numRequiredFields) { + initialized = false + } + if initialized { + out.initialized = true + } + out.n = start - len(b) + return out, nil +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/merge.go b/vendor/google.golang.org/protobuf/internal/impl/merge.go index 7e65f64f..8ffdce67 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/merge.go +++ b/vendor/google.golang.org/protobuf/internal/impl/merge.go @@ -41,11 +41,38 @@ func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) { if src.IsNil() { return } + + var presenceSrc presence + var presenceDst presence + if mi.presenceOffset.IsValid() { + presenceSrc = src.Apply(mi.presenceOffset).PresenceInfo() + presenceDst = dst.Apply(mi.presenceOffset).PresenceInfo() + } + for _, f := range mi.orderedCoderFields { if f.funcs.merge == nil { continue } sfptr := src.Apply(f.offset) + + if f.presenceIndex != noPresence { + if !presenceSrc.Present(f.presenceIndex) { + continue + } + dfptr := dst.Apply(f.offset) + if f.isLazy { + if sfptr.AtomicGetPointer().IsNil() { + mi.lazyUnmarshal(src, f.num) + } + if presenceDst.Present(f.presenceIndex) && dfptr.AtomicGetPointer().IsNil() { + mi.lazyUnmarshal(dst, f.num) + } + } + f.funcs.merge(dst.Apply(f.offset), sfptr, f, opts) + presenceDst.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) + continue + } + if f.isPointer && sfptr.Elem().IsNil() { continue } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go index 741b5ed2..d1f79b42 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message.go @@ -79,6 +79,9 @@ func (mi *MessageInfo) initOnce() { if mi.initDone == 1 { return } + if opaqueInitHook(mi) { + return + } t := mi.GoReflectType if t.Kind() != reflect.Ptr && t.Elem().Kind() != reflect.Struct { @@ -133,6 +136,9 @@ type structInfo struct { extensionOffset offset extensionType reflect.Type + lazyOffset offset + presenceOffset offset + fieldsByNumber map[protoreflect.FieldNumber]reflect.StructField oneofsByName map[protoreflect.Name]reflect.StructField oneofWrappersByType map[reflect.Type]protoreflect.FieldNumber @@ -145,6 +151,8 @@ func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo { weakOffset: invalidOffset, unknownOffset: invalidOffset, extensionOffset: invalidOffset, + lazyOffset: invalidOffset, + presenceOffset: invalidOffset, fieldsByNumber: map[protoreflect.FieldNumber]reflect.StructField{}, oneofsByName: map[protoreflect.Name]reflect.StructField{}, @@ -157,24 +165,28 @@ fieldLoop: switch f := t.Field(i); f.Name { case genid.SizeCache_goname, genid.SizeCacheA_goname: if f.Type == sizecacheType { - si.sizecacheOffset = offsetOf(f, mi.Exporter) + si.sizecacheOffset = offsetOf(f) si.sizecacheType = f.Type } case genid.WeakFields_goname, genid.WeakFieldsA_goname: if f.Type == weakFieldsType { - si.weakOffset = offsetOf(f, mi.Exporter) + si.weakOffset = offsetOf(f) si.weakType = f.Type } case genid.UnknownFields_goname, genid.UnknownFieldsA_goname: if f.Type == unknownFieldsAType || f.Type == unknownFieldsBType { - si.unknownOffset = offsetOf(f, mi.Exporter) + si.unknownOffset = offsetOf(f) si.unknownType = f.Type } case genid.ExtensionFields_goname, genid.ExtensionFieldsA_goname, genid.ExtensionFieldsB_goname: if f.Type == extensionFieldsType { - si.extensionOffset = offsetOf(f, mi.Exporter) + si.extensionOffset = offsetOf(f) si.extensionType = f.Type } + case "lazyFields", "XXX_lazyUnmarshalInfo": + si.lazyOffset = offsetOf(f) + case "XXX_presence": + si.presenceOffset = offsetOf(f) default: for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") { if len(s) > 0 && strings.Trim(s, "0123456789") == "" { diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go new file mode 100644 index 00000000..d8dcd788 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go @@ -0,0 +1,632 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "fmt" + "math" + "reflect" + "strings" + "sync/atomic" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +type opaqueStructInfo struct { + structInfo +} + +// isOpaque determines whether a protobuf message type is on the Opaque API. It +// checks whether the type is a Go struct that protoc-gen-go would generate. +// +// This function only detects newly generated messages from the v2 +// implementation of protoc-gen-go. It is unable to classify generated messages +// that are too old or those that are generated by a different generator +// such as protoc-gen-gogo. +func isOpaque(t reflect.Type) bool { + // The current detection mechanism is to simply check the first field + // for a struct tag with the "protogen" key. + if t.Kind() == reflect.Struct && t.NumField() > 0 { + pgt := t.Field(0).Tag.Get("protogen") + return strings.HasPrefix(pgt, "opaque.") + } + return false +} + +func opaqueInitHook(mi *MessageInfo) bool { + mt := mi.GoReflectType.Elem() + si := opaqueStructInfo{ + structInfo: mi.makeStructInfo(mt), + } + + if !isOpaque(mt) { + return false + } + + defer atomic.StoreUint32(&mi.initDone, 1) + + mi.fields = map[protoreflect.FieldNumber]*fieldInfo{} + fds := mi.Desc.Fields() + for i := 0; i < fds.Len(); i++ { + fd := fds.Get(i) + fs := si.fieldsByNumber[fd.Number()] + var fi fieldInfo + usePresence, _ := usePresenceForField(si, fd) + + switch { + case fd.IsWeak(): + // Weak fields are no different for opaque. + fi = fieldInfoForWeakMessage(fd, si.weakOffset) + case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): + // Oneofs are no different for opaque. + fi = fieldInfoForOneof(fd, si.oneofsByName[fd.ContainingOneof().Name()], mi.Exporter, si.oneofWrappersByNumber[fd.Number()]) + case fd.IsMap(): + fi = mi.fieldInfoForMapOpaque(si, fd, fs) + case fd.IsList() && fd.Message() == nil && usePresence: + fi = mi.fieldInfoForScalarListOpaque(si, fd, fs) + case fd.IsList() && fd.Message() == nil: + // Proto3 lists without presence can use same access methods as open + fi = fieldInfoForList(fd, fs, mi.Exporter) + case fd.IsList() && usePresence: + fi = mi.fieldInfoForMessageListOpaque(si, fd, fs) + case fd.IsList(): + // Proto3 opaque messages that does not need presence bitmap. + // Different representation than open struct, but same logic + fi = mi.fieldInfoForMessageListOpaqueNoPresence(si, fd, fs) + case fd.Message() != nil && usePresence: + fi = mi.fieldInfoForMessageOpaque(si, fd, fs) + case fd.Message() != nil: + // Proto3 messages without presence can use same access methods as open + fi = fieldInfoForMessage(fd, fs, mi.Exporter) + default: + fi = mi.fieldInfoForScalarOpaque(si, fd, fs) + } + mi.fields[fd.Number()] = &fi + } + mi.oneofs = map[protoreflect.Name]*oneofInfo{} + for i := 0; i < mi.Desc.Oneofs().Len(); i++ { + od := mi.Desc.Oneofs().Get(i) + mi.oneofs[od.Name()] = makeOneofInfoOpaque(mi, od, si.structInfo, mi.Exporter) + } + + mi.denseFields = make([]*fieldInfo, fds.Len()*2) + for i := 0; i < fds.Len(); i++ { + if fd := fds.Get(i); int(fd.Number()) < len(mi.denseFields) { + mi.denseFields[fd.Number()] = mi.fields[fd.Number()] + } + } + + for i := 0; i < fds.Len(); { + fd := fds.Get(i) + if od := fd.ContainingOneof(); od != nil && !fd.ContainingOneof().IsSynthetic() { + mi.rangeInfos = append(mi.rangeInfos, mi.oneofs[od.Name()]) + i += od.Fields().Len() + } else { + mi.rangeInfos = append(mi.rangeInfos, mi.fields[fd.Number()]) + i++ + } + } + + mi.makeExtensionFieldsFunc(mt, si.structInfo) + mi.makeUnknownFieldsFunc(mt, si.structInfo) + mi.makeOpaqueCoderMethods(mt, si) + mi.makeFieldTypes(si.structInfo) + + return true +} + +func makeOneofInfoOpaque(mi *MessageInfo, od protoreflect.OneofDescriptor, si structInfo, x exporter) *oneofInfo { + oi := &oneofInfo{oneofDesc: od} + if od.IsSynthetic() { + fd := od.Fields().Get(0) + index, _ := presenceIndex(mi.Desc, fd) + oi.which = func(p pointer) protoreflect.FieldNumber { + if p.IsNil() { + return 0 + } + if !mi.present(p, index) { + return 0 + } + return od.Fields().Get(0).Number() + } + return oi + } + // Dispatch to non-opaque oneof implementation for non-synthetic oneofs. + return makeOneofInfo(od, si, x) +} + +func (mi *MessageInfo) fieldInfoForMapOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + if ft.Kind() != reflect.Map { + panic(fmt.Sprintf("invalid type: got %v, want map kind", ft)) + } + fieldOffset := offsetOf(fs) + conv := NewConverter(ft, fd) + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + // Don't bother checking presence bits, since we need to + // look at the map length even if the presence bit is set. + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + return rv.Len() > 0 + }, + clear: func(p pointer) { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(reflect.Zero(rv.Type())) + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if rv.Len() == 0 { + return conv.Zero() + } + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + pv := conv.GoValueOf(v) + if pv.IsNil() { + panic(fmt.Sprintf("invalid value: setting map field to read-only value")) + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(pv) + }, + mutable: func(p pointer) protoreflect.Value { + v := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if v.IsNil() { + v.Set(reflect.MakeMap(fs.Type)) + } + return conv.PBValueOf(v) + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForScalarListOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + if ft.Kind() != reflect.Slice { + panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft)) + } + conv := NewConverter(reflect.PtrTo(ft), fd) + fieldOffset := offsetOf(fs) + index, _ := presenceIndex(mi.Desc, fd) + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + return rv.Len() > 0 + }, + clear: func(p pointer) { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(reflect.Zero(rv.Type())) + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type) + if rv.Elem().Len() == 0 { + return conv.Zero() + } + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + pv := conv.GoValueOf(v) + if pv.IsNil() { + panic(fmt.Sprintf("invalid value: setting repeated field to read-only value")) + } + mi.setPresent(p, index) + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(pv.Elem()) + }, + mutable: func(p pointer) protoreflect.Value { + mi.setPresent(p, index) + return conv.PBValueOf(p.Apply(fieldOffset).AsValueOf(fs.Type)) + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForMessageListOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice { + panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft)) + } + conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + index, _ := presenceIndex(mi.Desc, fd) + fieldNumber := fd.Number() + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + if !mi.present(p, index) { + return false + } + sp := p.Apply(fieldOffset).AtomicGetPointer() + if sp.IsNil() { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + sp = p.Apply(fieldOffset).AtomicGetPointer() + } + rv := sp.AsValueOf(fs.Type.Elem()) + return rv.Elem().Len() > 0 + }, + clear: func(p pointer) { + fp := p.Apply(fieldOffset) + sp := fp.AtomicGetPointer() + if sp.IsNil() { + sp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem()))) + mi.setPresent(p, index) + } + rv := sp.AsValueOf(fs.Type.Elem()) + rv.Elem().Set(reflect.Zero(rv.Type().Elem())) + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + if !mi.present(p, index) { + return conv.Zero() + } + sp := p.Apply(fieldOffset).AtomicGetPointer() + if sp.IsNil() { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + sp = p.Apply(fieldOffset).AtomicGetPointer() + } + rv := sp.AsValueOf(fs.Type.Elem()) + if rv.Elem().Len() == 0 { + return conv.Zero() + } + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + fp := p.Apply(fieldOffset) + sp := fp.AtomicGetPointer() + if sp.IsNil() { + sp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem()))) + mi.setPresent(p, index) + } + rv := sp.AsValueOf(fs.Type.Elem()) + val := conv.GoValueOf(v) + if val.IsNil() { + panic(fmt.Sprintf("invalid value: setting repeated field to read-only value")) + } else { + rv.Elem().Set(val.Elem()) + } + }, + mutable: func(p pointer) protoreflect.Value { + fp := p.Apply(fieldOffset) + sp := fp.AtomicGetPointer() + if sp.IsNil() { + if mi.present(p, index) { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + sp = p.Apply(fieldOffset).AtomicGetPointer() + } else { + sp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem()))) + mi.setPresent(p, index) + } + } + rv := sp.AsValueOf(fs.Type.Elem()) + return conv.PBValueOf(rv) + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice { + panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft)) + } + conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + sp := p.Apply(fieldOffset).AtomicGetPointer() + if sp.IsNil() { + return false + } + rv := sp.AsValueOf(fs.Type.Elem()) + return rv.Elem().Len() > 0 + }, + clear: func(p pointer) { + sp := p.Apply(fieldOffset).AtomicGetPointer() + if !sp.IsNil() { + rv := sp.AsValueOf(fs.Type.Elem()) + rv.Elem().Set(reflect.Zero(rv.Type().Elem())) + } + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + sp := p.Apply(fieldOffset).AtomicGetPointer() + if sp.IsNil() { + return conv.Zero() + } + rv := sp.AsValueOf(fs.Type.Elem()) + if rv.Elem().Len() == 0 { + return conv.Zero() + } + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if rv.IsNil() { + rv.Set(reflect.New(fs.Type.Elem())) + } + val := conv.GoValueOf(v) + if val.IsNil() { + panic(fmt.Sprintf("invalid value: setting repeated field to read-only value")) + } else { + rv.Elem().Set(val.Elem()) + } + }, + mutable: func(p pointer) protoreflect.Value { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if rv.IsNil() { + rv.Set(reflect.New(fs.Type.Elem())) + } + return conv.PBValueOf(rv) + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForScalarOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + nullable := fd.HasPresence() + if oneof := fd.ContainingOneof(); oneof != nil && oneof.IsSynthetic() { + nullable = true + } + deref := false + if nullable && ft.Kind() == reflect.Ptr { + ft = ft.Elem() + deref = true + } + conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + index, _ := presenceIndex(mi.Desc, fd) + var getter func(p pointer) protoreflect.Value + if !nullable { + getter = getterForDirectScalar(fd, fs, conv, fieldOffset) + } else { + getter = getterForOpaqueNullableScalar(mi, index, fd, fs, conv, fieldOffset) + } + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + if nullable { + return mi.present(p, index) + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + switch rv.Kind() { + case reflect.Bool: + return rv.Bool() + case reflect.Int32, reflect.Int64: + return rv.Int() != 0 + case reflect.Uint32, reflect.Uint64: + return rv.Uint() != 0 + case reflect.Float32, reflect.Float64: + return rv.Float() != 0 || math.Signbit(rv.Float()) + case reflect.String, reflect.Slice: + return rv.Len() > 0 + default: + panic(fmt.Sprintf("invalid type: %v", rv.Type())) // should never happen + } + }, + clear: func(p pointer) { + if nullable { + mi.clearPresent(p, index) + } + // This is only valuable for bytes and strings, but we do it unconditionally. + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + rv.Set(reflect.Zero(rv.Type())) + }, + get: getter, + // TODO: Implement unsafe fast path for set? + set: func(p pointer, v protoreflect.Value) { + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if deref { + if rv.IsNil() { + rv.Set(reflect.New(ft)) + } + rv = rv.Elem() + } + + rv.Set(conv.GoValueOf(v)) + if nullable && rv.Kind() == reflect.Slice && rv.IsNil() { + rv.Set(emptyBytes) + } + if nullable { + mi.setPresent(p, index) + } + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +func (mi *MessageInfo) fieldInfoForMessageOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { + ft := fs.Type + conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + index, _ := presenceIndex(mi.Desc, fd) + fieldNumber := fd.Number() + elemType := fs.Type.Elem() + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + return mi.present(p, index) + }, + clear: func(p pointer) { + mi.clearPresent(p, index) + p.Apply(fieldOffset).AtomicSetNilPointer() + }, + get: func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + fp := p.Apply(fieldOffset) + mp := fp.AtomicGetPointer() + if mp.IsNil() { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + mp = fp.AtomicGetPointer() + } + rv := mp.AsValueOf(elemType) + return conv.PBValueOf(rv) + }, + set: func(p pointer, v protoreflect.Value) { + val := pointerOfValue(conv.GoValueOf(v)) + if val.IsNil() { + panic("invalid nil pointer") + } + p.Apply(fieldOffset).AtomicSetPointer(val) + mi.setPresent(p, index) + }, + mutable: func(p pointer) protoreflect.Value { + fp := p.Apply(fieldOffset) + mp := fp.AtomicGetPointer() + if mp.IsNil() { + if mi.present(p, index) { + // Lazily unmarshal this field. + mi.lazyUnmarshal(p, fieldNumber) + mp = fp.AtomicGetPointer() + } else { + mp = pointerOfValue(conv.GoValueOf(conv.New())) + fp.AtomicSetPointer(mp) + mi.setPresent(p, index) + } + } + return conv.PBValueOf(mp.AsValueOf(fs.Type.Elem())) + }, + newMessage: func() protoreflect.Message { + return conv.New().Message() + }, + newField: func() protoreflect.Value { + return conv.New() + }, + } +} + +// A presenceList wraps a List, updating presence bits as necessary when the +// list contents change. +type presenceList struct { + pvalueList + setPresence func(bool) +} +type pvalueList interface { + protoreflect.List + //Unwrapper +} + +func (list presenceList) Append(v protoreflect.Value) { + list.pvalueList.Append(v) + list.setPresence(true) +} +func (list presenceList) Truncate(i int) { + list.pvalueList.Truncate(i) + list.setPresence(i > 0) +} + +// presenceIndex returns the index to pass to presence functions. +// +// TODO: field.Desc.Index() would be simpler, and would give space to record the presence of oneof fields. +func presenceIndex(md protoreflect.MessageDescriptor, fd protoreflect.FieldDescriptor) (uint32, presenceSize) { + found := false + var index, numIndices uint32 + for i := 0; i < md.Fields().Len(); i++ { + f := md.Fields().Get(i) + if f == fd { + found = true + index = numIndices + } + if f.ContainingOneof() == nil || isLastOneofField(f) { + numIndices++ + } + } + if !found { + panic(fmt.Sprintf("BUG: %v not in %v", fd.Name(), md.FullName())) + } + return index, presenceSize(numIndices) +} + +func isLastOneofField(fd protoreflect.FieldDescriptor) bool { + fields := fd.ContainingOneof().Fields() + return fields.Get(fields.Len()-1) == fd +} + +func (mi *MessageInfo) setPresent(p pointer, index uint32) { + p.Apply(mi.presenceOffset).PresenceInfo().SetPresent(index, mi.presenceSize) +} + +func (mi *MessageInfo) clearPresent(p pointer, index uint32) { + p.Apply(mi.presenceOffset).PresenceInfo().ClearPresent(index) +} + +func (mi *MessageInfo) present(p pointer, index uint32) bool { + return p.Apply(mi.presenceOffset).PresenceInfo().Present(index) +} + +// usePresenceForField implements the somewhat intricate logic of when +// the presence bitmap is used for a field. The main logic is that a +// field that is optional or that can be lazy will use the presence +// bit, but for proto2, also maps have a presence bit. It also records +// if the field can ever be lazy, which is true if we have a +// lazyOffset and the field is a message or a slice of messages. A +// field that is lazy will always need a presence bit. Oneofs are not +// lazy and do not use presence, unless they are a synthetic oneof, +// which is a proto3 optional field. For proto3 optionals, we use the +// presence and they can also be lazy when applicable (a message). +func usePresenceForField(si opaqueStructInfo, fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) { + hasLazyField := fd.(interface{ IsLazy() bool }).IsLazy() + + // Non-oneof scalar fields with explicit field presence use the presence array. + usesPresenceArray := fd.HasPresence() && fd.Message() == nil && (fd.ContainingOneof() == nil || fd.ContainingOneof().IsSynthetic()) + switch { + case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): + return false, false + case fd.IsWeak(): + return false, false + case fd.IsMap(): + return false, false + case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind: + return hasLazyField, hasLazyField + default: + return usesPresenceArray || (hasLazyField && fd.HasPresence()), false + } +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go b/vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go new file mode 100644 index 00000000..a6982569 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go @@ -0,0 +1,132 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated by generate-types. DO NOT EDIT. + +package impl + +import ( + "reflect" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +func getterForOpaqueNullableScalar(mi *MessageInfo, index uint32, fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value { + ft := fs.Type + if ft.Kind() == reflect.Ptr { + ft = ft.Elem() + } + if fd.Kind() == protoreflect.EnumKind { + // Enums for nullable opaque types. + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + return conv.PBValueOf(rv) + } + } + switch ft.Kind() { + case reflect.Bool: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bool() + return protoreflect.ValueOfBool(*x) + } + case reflect.Int32: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int32() + return protoreflect.ValueOfInt32(*x) + } + case reflect.Uint32: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint32() + return protoreflect.ValueOfUint32(*x) + } + case reflect.Int64: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int64() + return protoreflect.ValueOfInt64(*x) + } + case reflect.Uint64: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint64() + return protoreflect.ValueOfUint64(*x) + } + case reflect.Float32: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float32() + return protoreflect.ValueOfFloat32(*x) + } + case reflect.Float64: + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float64() + return protoreflect.ValueOfFloat64(*x) + } + case reflect.String: + if fd.Kind() == protoreflect.BytesKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).StringPtr() + if *x == nil { + return conv.Zero() + } + if len(**x) == 0 { + return protoreflect.ValueOfBytes(nil) + } + return protoreflect.ValueOfBytes([]byte(**x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).StringPtr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfString(**x) + } + case reflect.Slice: + if fd.Kind() == protoreflect.StringKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + return protoreflect.ValueOfString(string(*x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() || !mi.present(p, index) { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + return protoreflect.ValueOfBytes(*x) + } + } + panic("unexpected protobuf kind: " + ft.Kind().String()) +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go index ecb4623d..31c19b54 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go @@ -205,6 +205,11 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { case fd.IsList(): if fd.Enum() != nil || fd.Message() != nil { ft = fs.Type.Elem() + + if ft.Kind() == reflect.Slice { + ft = ft.Elem() + } + } isMessage = fd.Message() != nil case fd.Enum() != nil: diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go index 986322b1..3cd1fbc2 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go @@ -76,7 +76,7 @@ func fieldInfoForOneof(fd protoreflect.FieldDescriptor, fs reflect.StructField, isMessage := fd.Message() != nil // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) return fieldInfo{ // NOTE: The logic below intentionally assumes that oneof fields are // well-formatted. That is, the oneof interface never contains a @@ -152,7 +152,7 @@ func fieldInfoForMap(fd protoreflect.FieldDescriptor, fs reflect.StructField, x conv := NewConverter(ft, fd) // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { @@ -205,7 +205,7 @@ func fieldInfoForList(fd protoreflect.FieldDescriptor, fs reflect.StructField, x conv := NewConverter(reflect.PtrTo(ft), fd) // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { @@ -256,6 +256,7 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, ft := fs.Type nullable := fd.HasPresence() isBytes := ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 + var getter func(p pointer) protoreflect.Value if nullable { if ft.Kind() != reflect.Ptr && ft.Kind() != reflect.Slice { // This never occurs for generated message types. @@ -268,19 +269,25 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, } } conv := NewConverter(ft, fd) + fieldOffset := offsetOf(fs) + + // Generate specialized getter functions to avoid going through reflect.Value + if nullable { + getter = getterForNullableScalar(fd, fs, conv, fieldOffset) + } else { + getter = getterForDirectScalar(fd, fs, conv, fieldOffset) + } - // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { if p.IsNil() { return false } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if nullable { - return !rv.IsNil() + return !p.Apply(fieldOffset).Elem().IsNil() } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() switch rv.Kind() { case reflect.Bool: return rv.Bool() @@ -300,21 +307,8 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() rv.Set(reflect.Zero(rv.Type())) }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if nullable { - if rv.IsNil() { - return conv.Zero() - } - if rv.Kind() == reflect.Ptr { - rv = rv.Elem() - } - } - return conv.PBValueOf(rv) - }, + get: getter, + // TODO: Implement unsafe fast path for set? set: func(p pointer, v protoreflect.Value) { rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if nullable && rv.Kind() == reflect.Ptr { @@ -339,7 +333,7 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, } func fieldInfoForWeakMessage(fd protoreflect.FieldDescriptor, weakOffset offset) fieldInfo { - if !flags.ProtoLegacy { + if !flags.ProtoLegacyWeak { panic("no support for proto1 weak fields") } @@ -416,7 +410,7 @@ func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField conv := NewConverter(ft, fd) // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { @@ -425,7 +419,7 @@ func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField } rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if fs.Type.Kind() != reflect.Ptr { - return !isZero(rv) + return !rv.IsZero() } return !rv.IsNil() }, @@ -472,7 +466,7 @@ func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) * oi := &oneofInfo{oneofDesc: od} if od.IsSynthetic() { fs := si.fieldsByNumber[od.Fields().Get(0).Number()] - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) oi.which = func(p pointer) protoreflect.FieldNumber { if p.IsNil() { return 0 @@ -485,7 +479,7 @@ func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) * } } else { fs := si.oneofsByName[od.Name()] - fieldOffset := offsetOf(fs, x) + fieldOffset := offsetOf(fs) oi.which = func(p pointer) protoreflect.FieldNumber { if p.IsNil() { return 0 @@ -503,41 +497,3 @@ func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) * } return oi } - -// isZero is identical to reflect.Value.IsZero. -// TODO: Remove this when Go1.13 is the minimally supported Go version. -func isZero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return math.Float64bits(v.Float()) == 0 - case reflect.Complex64, reflect.Complex128: - c := v.Complex() - return math.Float64bits(real(c)) == 0 && math.Float64bits(imag(c)) == 0 - case reflect.Array: - for i := 0; i < v.Len(); i++ { - if !isZero(v.Index(i)) { - return false - } - } - return true - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer: - return v.IsNil() - case reflect.String: - return v.Len() == 0 - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - if !isZero(v.Field(i)) { - return false - } - } - return true - default: - panic(&reflect.ValueError{Method: "reflect.Value.IsZero", Kind: v.Kind()}) - } -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go new file mode 100644 index 00000000..af5e063a --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go @@ -0,0 +1,273 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated by generate-types. DO NOT EDIT. + +package impl + +import ( + "reflect" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +func getterForNullableScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value { + ft := fs.Type + if ft.Kind() == reflect.Ptr { + ft = ft.Elem() + } + if fd.Kind() == protoreflect.EnumKind { + elemType := fs.Type.Elem() + // Enums for nullable types. + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + rv := p.Apply(fieldOffset).Elem().AsValueOf(elemType) + if rv.IsNil() { + return conv.Zero() + } + return conv.PBValueOf(rv.Elem()) + } + } + switch ft.Kind() { + case reflect.Bool: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).BoolPtr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfBool(**x) + } + case reflect.Int32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int32Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfInt32(**x) + } + case reflect.Uint32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint32Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfUint32(**x) + } + case reflect.Int64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int64Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfInt64(**x) + } + case reflect.Uint64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint64Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfUint64(**x) + } + case reflect.Float32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float32Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfFloat32(**x) + } + case reflect.Float64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float64Ptr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfFloat64(**x) + } + case reflect.String: + if fd.Kind() == protoreflect.BytesKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).StringPtr() + if *x == nil { + return conv.Zero() + } + if len(**x) == 0 { + return protoreflect.ValueOfBytes(nil) + } + return protoreflect.ValueOfBytes([]byte(**x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).StringPtr() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfString(**x) + } + case reflect.Slice: + if fd.Kind() == protoreflect.StringKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + if len(*x) == 0 { + return conv.Zero() + } + return protoreflect.ValueOfString(string(*x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + if *x == nil { + return conv.Zero() + } + return protoreflect.ValueOfBytes(*x) + } + } + panic("unexpected protobuf kind: " + ft.Kind().String()) +} + +func getterForDirectScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value { + ft := fs.Type + if fd.Kind() == protoreflect.EnumKind { + // Enums for non nullable types. + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + return conv.PBValueOf(rv) + } + } + switch ft.Kind() { + case reflect.Bool: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bool() + return protoreflect.ValueOfBool(*x) + } + case reflect.Int32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int32() + return protoreflect.ValueOfInt32(*x) + } + case reflect.Uint32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint32() + return protoreflect.ValueOfUint32(*x) + } + case reflect.Int64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Int64() + return protoreflect.ValueOfInt64(*x) + } + case reflect.Uint64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Uint64() + return protoreflect.ValueOfUint64(*x) + } + case reflect.Float32: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float32() + return protoreflect.ValueOfFloat32(*x) + } + case reflect.Float64: + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Float64() + return protoreflect.ValueOfFloat64(*x) + } + case reflect.String: + if fd.Kind() == protoreflect.BytesKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).String() + if len(*x) == 0 { + return protoreflect.ValueOfBytes(nil) + } + return protoreflect.ValueOfBytes([]byte(*x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).String() + return protoreflect.ValueOfString(*x) + } + case reflect.Slice: + if fd.Kind() == protoreflect.StringKind { + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + return protoreflect.ValueOfString(string(*x)) + } + } + return func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + x := p.Apply(fieldOffset).Bytes() + return protoreflect.ValueOfBytes(*x) + } + } + panic("unexpected protobuf kind: " + ft.Kind().String()) +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index 79e18666..6bed45e3 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -8,6 +8,8 @@ import ( "reflect" "sync/atomic" "unsafe" + + "google.golang.org/protobuf/internal/protolazy" ) const UnsafeEnabled = true @@ -20,7 +22,7 @@ type Pointer unsafe.Pointer type offset uintptr // offsetOf returns a field offset for the struct field. -func offsetOf(f reflect.StructField, x exporter) offset { +func offsetOf(f reflect.StructField) offset { return offset(f.Offset) } @@ -111,6 +113,13 @@ func (p pointer) BytesPtr() **[]byte { return (**[]byte)(p.p) func (p pointer) BytesSlice() *[][]byte { return (*[][]byte)(p.p) } func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.p) } func (p pointer) Extensions() *map[int32]ExtensionField { return (*map[int32]ExtensionField)(p.p) } +func (p pointer) LazyInfoPtr() **protolazy.XXX_lazyUnmarshalInfo { + return (**protolazy.XXX_lazyUnmarshalInfo)(p.p) +} + +func (p pointer) PresenceInfo() presence { + return presence{P: p.p} +} func (p pointer) Elem() pointer { return pointer{p: *(*unsafe.Pointer)(p.p)} diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go new file mode 100644 index 00000000..38aa7b7d --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go @@ -0,0 +1,42 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "sync/atomic" + "unsafe" +) + +func (p pointer) AtomicGetPointer() pointer { + return pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))} +} + +func (p pointer) AtomicSetPointer(v pointer) { + atomic.StorePointer((*unsafe.Pointer)(p.p), v.p) +} + +func (p pointer) AtomicSetNilPointer() { + atomic.StorePointer((*unsafe.Pointer)(p.p), unsafe.Pointer(nil)) +} + +func (p pointer) AtomicSetPointerIfNil(v pointer) pointer { + if atomic.CompareAndSwapPointer((*unsafe.Pointer)(p.p), unsafe.Pointer(nil), v.p) { + return v + } + return pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))} +} + +type atomicV1MessageInfo struct{ p Pointer } + +func (mi *atomicV1MessageInfo) Get() Pointer { + return Pointer(atomic.LoadPointer((*unsafe.Pointer)(&mi.p))) +} + +func (mi *atomicV1MessageInfo) SetIfNil(p Pointer) Pointer { + if atomic.CompareAndSwapPointer((*unsafe.Pointer)(&mi.p), nil, unsafe.Pointer(p)) { + return p + } + return mi.Get() +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/presence.go b/vendor/google.golang.org/protobuf/internal/impl/presence.go new file mode 100644 index 00000000..914cb1de --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/presence.go @@ -0,0 +1,142 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "sync/atomic" + "unsafe" +) + +// presenceSize represents the size of a presence set, which should be the largest index of the set+1 +type presenceSize uint32 + +// presence is the internal representation of the bitmap array in a generated protobuf +type presence struct { + // This is a pointer to the beginning of an array of uint32 + P unsafe.Pointer +} + +func (p presence) toElem(num uint32) (ret *uint32) { + const ( + bitsPerByte = 8 + siz = unsafe.Sizeof(*ret) + ) + // p.P points to an array of uint32, num is the bit in this array that the + // caller wants to check/manipulate. Calculate the index in the array that + // contains this specific bit. E.g.: 76 / 32 = 2 (integer division). + offset := uintptr(num) / (siz * bitsPerByte) * siz + return (*uint32)(unsafe.Pointer(uintptr(p.P) + offset)) +} + +// Present checks for the presence of a specific field number in a presence set. +func (p presence) Present(num uint32) bool { + if p.P == nil { + return false + } + return Export{}.Present(p.toElem(num), num) +} + +// SetPresent adds presence for a specific field number in a presence set. +func (p presence) SetPresent(num uint32, size presenceSize) { + Export{}.SetPresent(p.toElem(num), num, uint32(size)) +} + +// SetPresentUnatomic adds presence for a specific field number in a presence set without using +// atomic operations. Only to be called during unmarshaling. +func (p presence) SetPresentUnatomic(num uint32, size presenceSize) { + Export{}.SetPresentNonAtomic(p.toElem(num), num, uint32(size)) +} + +// ClearPresent removes presence for a specific field number in a presence set. +func (p presence) ClearPresent(num uint32) { + Export{}.ClearPresent(p.toElem(num), num) +} + +// LoadPresenceCache (together with PresentInCache) allows for a +// cached version of checking for presence without re-reading the word +// for every field. It is optimized for efficiency and assumes no +// simltaneous mutation of the presence set (or at least does not have +// a problem with simultaneous mutation giving inconsistent results). +func (p presence) LoadPresenceCache() (current uint32) { + if p.P == nil { + return 0 + } + return atomic.LoadUint32((*uint32)(p.P)) +} + +// PresentInCache reads presence from a cached word in the presence +// bitmap. It caches up a new word if the bit is outside the +// word. This is for really fast iteration through bitmaps in cases +// where we either know that the bitmap will not be altered, or we +// don't care about inconsistencies caused by simultaneous writes. +func (p presence) PresentInCache(num uint32, cachedElement *uint32, current *uint32) bool { + if num/32 != *cachedElement { + o := uintptr(num/32) * unsafe.Sizeof(uint32(0)) + q := (*uint32)(unsafe.Pointer(uintptr(p.P) + o)) + *current = atomic.LoadUint32(q) + *cachedElement = num / 32 + } + return (*current & (1 << (num % 32))) > 0 +} + +// AnyPresent checks if any field is marked as present in the bitmap. +func (p presence) AnyPresent(size presenceSize) bool { + n := uintptr((size + 31) / 32) + for j := uintptr(0); j < n; j++ { + o := j * unsafe.Sizeof(uint32(0)) + q := (*uint32)(unsafe.Pointer(uintptr(p.P) + o)) + b := atomic.LoadUint32(q) + if b > 0 { + return true + } + } + return false +} + +// toRaceDetectData finds the preceding RaceDetectHookData in a +// message by using pointer arithmetic. As the type of the presence +// set (bitmap) varies with the number of fields in the protobuf, we +// can not have a struct type containing the array and the +// RaceDetectHookData. instead the RaceDetectHookData is placed +// immediately before the bitmap array, and we find it by walking +// backwards in the struct. +// +// This method is only called from the race-detect version of the code, +// so RaceDetectHookData is never an empty struct. +func (p presence) toRaceDetectData() *RaceDetectHookData { + var template struct { + d RaceDetectHookData + a [1]uint32 + } + o := (uintptr(unsafe.Pointer(&template.a)) - uintptr(unsafe.Pointer(&template.d))) + return (*RaceDetectHookData)(unsafe.Pointer(uintptr(p.P) - o)) +} + +func atomicLoadShadowPresence(p **[]byte) *[]byte { + return (*[]byte)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreShadowPresence(p **[]byte, v *[]byte) { + atomic.CompareAndSwapPointer((*unsafe.Pointer)(unsafe.Pointer(p)), nil, unsafe.Pointer(v)) +} + +// findPointerToRaceDetectData finds the preceding RaceDetectHookData +// in a message by using pointer arithmetic. For the methods called +// directy from generated code, we don't have a pointer to the +// beginning of the presence set, but a pointer inside the array. As +// we know the index of the bit we're manipulating (num), we can +// calculate which element of the array ptr is pointing to. With that +// information we find the preceding RaceDetectHookData and can +// manipulate the shadow bitmap. +// +// This method is only called from the race-detect version of the +// code, so RaceDetectHookData is never an empty struct. +func findPointerToRaceDetectData(ptr *uint32, num uint32) *RaceDetectHookData { + var template struct { + d RaceDetectHookData + a [1]uint32 + } + o := (uintptr(unsafe.Pointer(&template.a)) - uintptr(unsafe.Pointer(&template.d))) + uintptr(num/32)*unsafe.Sizeof(uint32(0)) + return (*RaceDetectHookData)(unsafe.Pointer(uintptr(unsafe.Pointer(ptr)) - o)) +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/validate.go b/vendor/google.golang.org/protobuf/internal/impl/validate.go index a24e6bbd..b534a3d6 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/validate.go +++ b/vendor/google.golang.org/protobuf/internal/impl/validate.go @@ -37,6 +37,10 @@ const ( // ValidationValid indicates that unmarshaling the message will succeed. ValidationValid + + // ValidationWrongWireType indicates that a validated field does not have + // the expected wire type. + ValidationWrongWireType ) func (v ValidationStatus) String() string { @@ -149,11 +153,23 @@ func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validat switch fd.Kind() { case protoreflect.MessageKind: vi.typ = validationTypeMessage + + if ft.Kind() == reflect.Ptr { + // Repeated opaque message fields are *[]*T. + ft = ft.Elem() + } + if ft.Kind() == reflect.Slice { vi.mi = getMessageInfo(ft.Elem()) } case protoreflect.GroupKind: vi.typ = validationTypeGroup + + if ft.Kind() == reflect.Ptr { + // Repeated opaque message fields are *[]*T. + ft = ft.Elem() + } + if ft.Kind() == reflect.Slice { vi.mi = getMessageInfo(ft.Elem()) } diff --git a/vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go b/vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go new file mode 100644 index 00000000..82e5cab4 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go @@ -0,0 +1,364 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Helper code for parsing a protocol buffer + +package protolazy + +import ( + "errors" + "fmt" + "io" + + "google.golang.org/protobuf/encoding/protowire" +) + +// BufferReader is a structure encapsulating a protobuf and a current position +type BufferReader struct { + Buf []byte + Pos int +} + +// NewBufferReader creates a new BufferRead from a protobuf +func NewBufferReader(buf []byte) BufferReader { + return BufferReader{Buf: buf, Pos: 0} +} + +var errOutOfBounds = errors.New("protobuf decoding: out of bounds") +var errOverflow = errors.New("proto: integer overflow") + +func (b *BufferReader) DecodeVarintSlow() (x uint64, err error) { + i := b.Pos + l := len(b.Buf) + + for shift := uint(0); shift < 64; shift += 7 { + if i >= l { + err = io.ErrUnexpectedEOF + return + } + v := b.Buf[i] + i++ + x |= (uint64(v) & 0x7F) << shift + if v < 0x80 { + b.Pos = i + return + } + } + + // The number is too large to represent in a 64-bit value. + err = errOverflow + return +} + +// decodeVarint decodes a varint at the current position +func (b *BufferReader) DecodeVarint() (x uint64, err error) { + i := b.Pos + buf := b.Buf + + if i >= len(buf) { + return 0, io.ErrUnexpectedEOF + } else if buf[i] < 0x80 { + b.Pos++ + return uint64(buf[i]), nil + } else if len(buf)-i < 10 { + return b.DecodeVarintSlow() + } + + var v uint64 + // we already checked the first byte + x = uint64(buf[i]) & 127 + i++ + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 7 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 14 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 21 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 28 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 35 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 42 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 49 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 56 + if v < 128 { + goto done + } + + v = uint64(buf[i]) + i++ + x |= (v & 127) << 63 + if v < 128 { + goto done + } + + return 0, errOverflow + +done: + b.Pos = i + return +} + +// decodeVarint32 decodes a varint32 at the current position +func (b *BufferReader) DecodeVarint32() (x uint32, err error) { + i := b.Pos + buf := b.Buf + + if i >= len(buf) { + return 0, io.ErrUnexpectedEOF + } else if buf[i] < 0x80 { + b.Pos++ + return uint32(buf[i]), nil + } else if len(buf)-i < 5 { + v, err := b.DecodeVarintSlow() + return uint32(v), err + } + + var v uint32 + // we already checked the first byte + x = uint32(buf[i]) & 127 + i++ + + v = uint32(buf[i]) + i++ + x |= (v & 127) << 7 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + x |= (v & 127) << 14 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + x |= (v & 127) << 21 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + x |= (v & 127) << 28 + if v < 128 { + goto done + } + + return 0, errOverflow + +done: + b.Pos = i + return +} + +// skipValue skips a value in the protobuf, based on the specified tag +func (b *BufferReader) SkipValue(tag uint32) (err error) { + wireType := tag & 0x7 + switch protowire.Type(wireType) { + case protowire.VarintType: + err = b.SkipVarint() + case protowire.Fixed64Type: + err = b.SkipFixed64() + case protowire.BytesType: + var n uint32 + n, err = b.DecodeVarint32() + if err == nil { + err = b.Skip(int(n)) + } + case protowire.StartGroupType: + err = b.SkipGroup(tag) + case protowire.Fixed32Type: + err = b.SkipFixed32() + default: + err = fmt.Errorf("Unexpected wire type (%d)", wireType) + } + return +} + +// skipGroup skips a group with the specified tag. It executes efficiently using a tag stack +func (b *BufferReader) SkipGroup(tag uint32) (err error) { + tagStack := make([]uint32, 0, 16) + tagStack = append(tagStack, tag) + var n uint32 + for len(tagStack) > 0 { + tag, err = b.DecodeVarint32() + if err != nil { + return err + } + switch protowire.Type(tag & 0x7) { + case protowire.VarintType: + err = b.SkipVarint() + case protowire.Fixed64Type: + err = b.Skip(8) + case protowire.BytesType: + n, err = b.DecodeVarint32() + if err == nil { + err = b.Skip(int(n)) + } + case protowire.StartGroupType: + tagStack = append(tagStack, tag) + case protowire.Fixed32Type: + err = b.SkipFixed32() + case protowire.EndGroupType: + if protoFieldNumber(tagStack[len(tagStack)-1]) == protoFieldNumber(tag) { + tagStack = tagStack[:len(tagStack)-1] + } else { + err = fmt.Errorf("end group tag %d does not match begin group tag %d at pos %d", + protoFieldNumber(tag), protoFieldNumber(tagStack[len(tagStack)-1]), b.Pos) + } + } + if err != nil { + return err + } + } + return nil +} + +// skipVarint effiently skips a varint +func (b *BufferReader) SkipVarint() (err error) { + i := b.Pos + + if len(b.Buf)-i < 10 { + // Use DecodeVarintSlow() to check for buffer overflow, but ignore result + if _, err := b.DecodeVarintSlow(); err != nil { + return err + } + return nil + } + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + i++ + + if b.Buf[i] < 0x80 { + goto out + } + return errOverflow + +out: + b.Pos = i + 1 + return nil +} + +// skip skips the specified number of bytes +func (b *BufferReader) Skip(n int) (err error) { + if len(b.Buf) < b.Pos+n { + return io.ErrUnexpectedEOF + } + b.Pos += n + return +} + +// skipFixed64 skips a fixed64 +func (b *BufferReader) SkipFixed64() (err error) { + return b.Skip(8) +} + +// skipFixed32 skips a fixed32 +func (b *BufferReader) SkipFixed32() (err error) { + return b.Skip(4) +} + +// skipBytes skips a set of bytes +func (b *BufferReader) SkipBytes() (err error) { + n, err := b.DecodeVarint32() + if err != nil { + return err + } + return b.Skip(int(n)) +} + +// Done returns whether we are at the end of the protobuf +func (b *BufferReader) Done() bool { + return b.Pos == len(b.Buf) +} + +// Remaining returns how many bytes remain +func (b *BufferReader) Remaining() int { + return len(b.Buf) - b.Pos +} diff --git a/vendor/google.golang.org/protobuf/internal/protolazy/lazy.go b/vendor/google.golang.org/protobuf/internal/protolazy/lazy.go new file mode 100644 index 00000000..ff4d4834 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/protolazy/lazy.go @@ -0,0 +1,359 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package protolazy contains internal data structures for lazy message decoding. +package protolazy + +import ( + "fmt" + "sort" + + "google.golang.org/protobuf/encoding/protowire" + piface "google.golang.org/protobuf/runtime/protoiface" +) + +// IndexEntry is the structure for an index of the fields in a message of a +// proto (not descending to sub-messages) +type IndexEntry struct { + FieldNum uint32 + // first byte of this tag/field + Start uint32 + // first byte after a contiguous sequence of bytes for this tag/field, which could + // include a single encoding of the field, or multiple encodings for the field + End uint32 + // True if this protobuf segment includes multiple encodings of the field + MultipleContiguous bool +} + +// XXX_lazyUnmarshalInfo has information about a particular lazily decoded message +// +// Deprecated: Do not use. This will be deleted in the near future. +type XXX_lazyUnmarshalInfo struct { + // Index of fields and their positions in the protobuf for this + // message. Make index be a pointer to a slice so it can be updated + // atomically. The index pointer is only set once (lazily when/if + // the index is first needed), and must always be SET and LOADED + // ATOMICALLY. + index *[]IndexEntry + // The protobuf associated with this lazily decoded message. It is + // only set during proto.Unmarshal(). It doesn't need to be set and + // loaded atomically, since any simultaneous set (Unmarshal) and read + // (during a get) would already be a race in the app code. + Protobuf []byte + // The flags present when Unmarshal was originally called for this particular message + unmarshalFlags piface.UnmarshalInputFlags +} + +// The Buffer and SetBuffer methods let v2/internal/impl interact with +// XXX_lazyUnmarshalInfo via an interface, to avoid an import cycle. + +// Buffer returns the lazy unmarshal buffer. +// +// Deprecated: Do not use. This will be deleted in the near future. +func (lazy *XXX_lazyUnmarshalInfo) Buffer() []byte { + return lazy.Protobuf +} + +// SetBuffer sets the lazy unmarshal buffer. +// +// Deprecated: Do not use. This will be deleted in the near future. +func (lazy *XXX_lazyUnmarshalInfo) SetBuffer(b []byte) { + lazy.Protobuf = b +} + +// SetUnmarshalFlags is called to set a copy of the original unmarshalInputFlags. +// The flags should reflect how Unmarshal was called. +func (lazy *XXX_lazyUnmarshalInfo) SetUnmarshalFlags(f piface.UnmarshalInputFlags) { + lazy.unmarshalFlags = f +} + +// UnmarshalFlags returns the original unmarshalInputFlags. +func (lazy *XXX_lazyUnmarshalInfo) UnmarshalFlags() piface.UnmarshalInputFlags { + return lazy.unmarshalFlags +} + +// AllowedPartial returns true if the user originally unmarshalled this message with +// AllowPartial set to true +func (lazy *XXX_lazyUnmarshalInfo) AllowedPartial() bool { + return (lazy.unmarshalFlags & piface.UnmarshalCheckRequired) == 0 +} + +func protoFieldNumber(tag uint32) uint32 { + return tag >> 3 +} + +// buildIndex builds an index of the specified protobuf, return the index +// array and an error. +func buildIndex(buf []byte) ([]IndexEntry, error) { + index := make([]IndexEntry, 0, 16) + var lastProtoFieldNum uint32 + var outOfOrder bool + + var r BufferReader = NewBufferReader(buf) + + for !r.Done() { + var tag uint32 + var err error + var curPos = r.Pos + // INLINED: tag, err = r.DecodeVarint32() + { + i := r.Pos + buf := r.Buf + + if i >= len(buf) { + return nil, errOutOfBounds + } else if buf[i] < 0x80 { + r.Pos++ + tag = uint32(buf[i]) + } else if r.Remaining() < 5 { + var v uint64 + v, err = r.DecodeVarintSlow() + tag = uint32(v) + } else { + var v uint32 + // we already checked the first byte + tag = uint32(buf[i]) & 127 + i++ + + v = uint32(buf[i]) + i++ + tag |= (v & 127) << 7 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + tag |= (v & 127) << 14 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + tag |= (v & 127) << 21 + if v < 128 { + goto done + } + + v = uint32(buf[i]) + i++ + tag |= (v & 127) << 28 + if v < 128 { + goto done + } + + return nil, errOutOfBounds + + done: + r.Pos = i + } + } + // DONE: tag, err = r.DecodeVarint32() + + fieldNum := protoFieldNumber(tag) + if fieldNum < lastProtoFieldNum { + outOfOrder = true + } + + // Skip the current value -- will skip over an entire group as well. + // INLINED: err = r.SkipValue(tag) + wireType := tag & 0x7 + switch protowire.Type(wireType) { + case protowire.VarintType: + // INLINED: err = r.SkipVarint() + i := r.Pos + + if len(r.Buf)-i < 10 { + // Use DecodeVarintSlow() to skip while + // checking for buffer overflow, but ignore result + _, err = r.DecodeVarintSlow() + goto out2 + } + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + i++ + + if r.Buf[i] < 0x80 { + goto out + } + return nil, errOverflow + out: + r.Pos = i + 1 + // DONE: err = r.SkipVarint() + case protowire.Fixed64Type: + err = r.SkipFixed64() + case protowire.BytesType: + var n uint32 + n, err = r.DecodeVarint32() + if err == nil { + err = r.Skip(int(n)) + } + case protowire.StartGroupType: + err = r.SkipGroup(tag) + case protowire.Fixed32Type: + err = r.SkipFixed32() + default: + err = fmt.Errorf("Unexpected wire type (%d)", wireType) + } + // DONE: err = r.SkipValue(tag) + + out2: + if err != nil { + return nil, err + } + if fieldNum != lastProtoFieldNum { + index = append(index, IndexEntry{FieldNum: fieldNum, + Start: uint32(curPos), + End: uint32(r.Pos)}, + ) + } else { + index[len(index)-1].End = uint32(r.Pos) + index[len(index)-1].MultipleContiguous = true + } + lastProtoFieldNum = fieldNum + } + if outOfOrder { + sort.Slice(index, func(i, j int) bool { + return index[i].FieldNum < index[j].FieldNum || + (index[i].FieldNum == index[j].FieldNum && + index[i].Start < index[j].Start) + }) + } + return index, nil +} + +func (lazy *XXX_lazyUnmarshalInfo) SizeField(num uint32) (size int) { + start, end, found, _, multipleEntries := lazy.FindFieldInProto(num) + if multipleEntries != nil { + for _, entry := range multipleEntries { + size += int(entry.End - entry.Start) + } + return size + } + if !found { + return 0 + } + return int(end - start) +} + +func (lazy *XXX_lazyUnmarshalInfo) AppendField(b []byte, num uint32) ([]byte, bool) { + start, end, found, _, multipleEntries := lazy.FindFieldInProto(num) + if multipleEntries != nil { + for _, entry := range multipleEntries { + b = append(b, lazy.Protobuf[entry.Start:entry.End]...) + } + return b, true + } + if !found { + return nil, false + } + b = append(b, lazy.Protobuf[start:end]...) + return b, true +} + +func (lazy *XXX_lazyUnmarshalInfo) SetIndex(index []IndexEntry) { + atomicStoreIndex(&lazy.index, &index) +} + +// FindFieldInProto looks for field fieldNum in lazyUnmarshalInfo information +// (including protobuf), returns startOffset/endOffset/found. +func (lazy *XXX_lazyUnmarshalInfo) FindFieldInProto(fieldNum uint32) (start, end uint32, found, multipleContiguous bool, multipleEntries []IndexEntry) { + if lazy.Protobuf == nil { + // There is no backing protobuf for this message -- it was made from a builder + return 0, 0, false, false, nil + } + index := atomicLoadIndex(&lazy.index) + if index == nil { + r, err := buildIndex(lazy.Protobuf) + if err != nil { + panic(fmt.Sprintf("findFieldInfo: error building index when looking for field %d: %v", fieldNum, err)) + } + // lazy.index is a pointer to the slice returned by BuildIndex + index = &r + atomicStoreIndex(&lazy.index, index) + } + return lookupField(index, fieldNum) +} + +// lookupField returns the offset at which the indicated field starts using +// the index, offset immediately after field ends (including all instances of +// a repeated field), and bools indicating if field was found and if there +// are multiple encodings of the field in the byte range. +// +// To hande the uncommon case where there are repeated encodings for the same +// field which are not consecutive in the protobuf (so we need to returns +// multiple start/end offsets), we also return a slice multipleEntries. If +// multipleEntries is non-nil, then multiple entries were found, and the +// values in the slice should be used, rather than start/end/found. +func lookupField(indexp *[]IndexEntry, fieldNum uint32) (start, end uint32, found bool, multipleContiguous bool, multipleEntries []IndexEntry) { + // The pointer indexp to the index was already loaded atomically. + // The slice is uniquely associated with the pointer, so it doesn't + // need to be loaded atomically. + index := *indexp + for i, entry := range index { + if fieldNum == entry.FieldNum { + if i < len(index)-1 && entry.FieldNum == index[i+1].FieldNum { + // Handle the uncommon case where there are + // repeated entries for the same field which + // are not contiguous in the protobuf. + multiple := make([]IndexEntry, 1, 2) + multiple[0] = IndexEntry{fieldNum, entry.Start, entry.End, entry.MultipleContiguous} + i++ + for i < len(index) && index[i].FieldNum == fieldNum { + multiple = append(multiple, IndexEntry{fieldNum, index[i].Start, index[i].End, index[i].MultipleContiguous}) + i++ + } + return 0, 0, false, false, multiple + + } + return entry.Start, entry.End, true, entry.MultipleContiguous, nil + } + if fieldNum < entry.FieldNum { + return 0, 0, false, false, nil + } + } + return 0, 0, false, false, nil +} diff --git a/vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go new file mode 100644 index 00000000..dc2a64ca --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go @@ -0,0 +1,17 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package protolazy + +import ( + "sync/atomic" + "unsafe" +) + +func atomicLoadIndex(p **[]IndexEntry) *[]IndexEntry { + return (*[]IndexEntry)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreIndex(p **[]IndexEntry, v *[]IndexEntry) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index fb8e15e8..f5c06280 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -51,8 +51,8 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 35 - Patch = 1 + Minor = 36 + Patch = 3 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go index d75a6534..e28d7acb 100644 --- a/vendor/google.golang.org/protobuf/proto/decode.go +++ b/vendor/google.golang.org/protobuf/proto/decode.go @@ -47,6 +47,12 @@ type UnmarshalOptions struct { // RecursionLimit limits how deeply messages may be nested. // If zero, a default limit is applied. RecursionLimit int + + // + // NoLazyDecoding turns off lazy decoding, which otherwise is enabled by + // default. Lazy decoding only affects submessages (annotated with [lazy = + // true] in the .proto file) within messages that use the Opaque API. + NoLazyDecoding bool } // Unmarshal parses the wire-format message in b and places the result in m. @@ -104,6 +110,16 @@ func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out proto if o.DiscardUnknown { in.Flags |= protoiface.UnmarshalDiscardUnknown } + + if !allowPartial { + // This does not affect how current unmarshal functions work, it just allows them + // to record this for lazy the decoding case. + in.Flags |= protoiface.UnmarshalCheckRequired + } + if o.NoLazyDecoding { + in.Flags |= protoiface.UnmarshalNoLazyDecoding + } + out, err = methods.Unmarshal(in) } else { o.RecursionLimit-- @@ -156,7 +172,7 @@ func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message) var err error if fd == nil { err = errUnknown - } else if flags.ProtoLegacy { + } else if flags.ProtoLegacyWeak { if fd.IsWeak() && fd.Message().IsPlaceholder() { err = errUnknown // weak referent is not linked in } diff --git a/vendor/google.golang.org/protobuf/proto/encode.go b/vendor/google.golang.org/protobuf/proto/encode.go index 1f847bcc..f0473c58 100644 --- a/vendor/google.golang.org/protobuf/proto/encode.go +++ b/vendor/google.golang.org/protobuf/proto/encode.go @@ -63,7 +63,8 @@ type MarshalOptions struct { // options (except for UseCachedSize itself). // // 2. The message and all its submessages have not changed in any - // way since the Size call. + // way since the Size call. For lazily decoded messages, accessing + // a message results in decoding the message, which is a change. // // If either of these invariants is violated, // the results are undefined and may include panics or corrupted output. diff --git a/vendor/google.golang.org/protobuf/proto/size.go b/vendor/google.golang.org/protobuf/proto/size.go index 052fb5ae..c8675806 100644 --- a/vendor/google.golang.org/protobuf/proto/size.go +++ b/vendor/google.golang.org/protobuf/proto/size.go @@ -12,11 +12,19 @@ import ( ) // Size returns the size in bytes of the wire-format encoding of m. +// +// Note that Size might return more bytes than Marshal will write in the case of +// lazily decoded messages that arrive in non-minimal wire format: see +// https://protobuf.dev/reference/go/size/ for more details. func Size(m Message) int { return MarshalOptions{}.Size(m) } // Size returns the size in bytes of the wire-format encoding of m. +// +// Note that Size might return more bytes than Marshal will write in the case of +// lazily decoded messages that arrive in non-minimal wire format: see +// https://protobuf.dev/reference/go/size/ for more details. func (o MarshalOptions) Size(m Message) int { // Treat a nil message interface as an empty message; nothing to output. if m == nil { diff --git a/vendor/google.golang.org/protobuf/proto/wrapperopaque.go b/vendor/google.golang.org/protobuf/proto/wrapperopaque.go new file mode 100644 index 00000000..267fd0f1 --- /dev/null +++ b/vendor/google.golang.org/protobuf/proto/wrapperopaque.go @@ -0,0 +1,80 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package proto + +// ValueOrNil returns nil if has is false, or a pointer to a new variable +// containing the value returned by the specified getter. +// +// This function is similar to the wrappers (proto.Int32(), proto.String(), +// etc.), but is generic (works for any field type) and works with the hasser +// and getter of a field, as opposed to a value. +// +// This is convenient when populating builder fields. +// +// Example: +// +// hop := attr.GetDirectHop() +// injectedRoute := ripb.InjectedRoute_builder{ +// Prefixes: route.GetPrefixes(), +// NextHop: proto.ValueOrNil(hop.HasAddress(), hop.GetAddress), +// } +func ValueOrNil[T any](has bool, getter func() T) *T { + if !has { + return nil + } + v := getter() + return &v +} + +// ValueOrDefault returns the protobuf message val if val is not nil, otherwise +// it returns a pointer to an empty val message. +// +// This function allows for translating code from the old Open Struct API to the +// new Opaque API. +// +// The old Open Struct API represented oneof fields with a wrapper struct: +// +// var signedImg *accountpb.SignedImage +// profile := &accountpb.Profile{ +// // The Avatar oneof will be set, with an empty SignedImage. +// Avatar: &accountpb.Profile_SignedImage{signedImg}, +// } +// +// The new Opaque API treats oneof fields like regular fields, there are no more +// wrapper structs: +// +// var signedImg *accountpb.SignedImage +// profile := &accountpb.Profile{} +// profile.SetSignedImage(signedImg) +// +// For convenience, the Opaque API also offers Builders, which allow for a +// direct translation of struct initialization. However, because Builders use +// nilness to represent field presence (but there is no non-nil wrapper struct +// anymore), Builders cannot distinguish between an unset oneof and a set oneof +// with nil message. The above code would need to be translated with help of the +// ValueOrDefault function to retain the same behavior: +// +// var signedImg *accountpb.SignedImage +// return &accountpb.Profile_builder{ +// SignedImage: proto.ValueOrDefault(signedImg), +// }.Build() +func ValueOrDefault[T interface { + *P + Message +}, P any](val T) T { + if val == nil { + return T(new(P)) + } + return val +} + +// ValueOrDefaultBytes is like ValueOrDefault but for working with fields of +// type []byte. +func ValueOrDefaultBytes(val []byte) []byte { + if val == nil { + return []byte{} + } + return val +} diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go index 8fbecb4f..69a05050 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go @@ -13,6 +13,8 @@ package protodesc import ( + "strings" + "google.golang.org/protobuf/internal/editionssupport" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/filedesc" @@ -102,13 +104,17 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot default: return nil, errors.New("invalid syntax: %q", fd.GetSyntax()) } - if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) { - return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition()) - } f.L1.Path = fd.GetName() if f.L1.Path == "" { return nil, errors.New("file path must be populated") } + if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) { + // Allow cmd/protoc-gen-go/testdata to use any edition for easier + // testing of upcoming edition features. + if !strings.HasPrefix(fd.GetName(), "cmd/protoc-gen-go/testdata/") { + return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition()) + } + } f.L1.Package = protoreflect.FullName(fd.GetPackage()) if !f.L1.Package.IsValid() && f.L1.Package != "" { return nil, errors.New("invalid package: %q", f.L1.Package) diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go index 6de31c2e..5eaf6521 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go @@ -149,7 +149,7 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds return errors.New("message field %q under proto3 optional semantics must be within a single element oneof", f.FullName()) } } - if f.IsWeak() && !flags.ProtoLegacy { + if f.IsWeak() && !flags.ProtoLegacyWeak { return errors.New("message field %q is a weak field, which is a legacy proto1 feature that is no longer supported", f.FullName()) } if f.IsWeak() && (!f.HasPresence() || !isOptionalMessage(f) || f.ContainingOneof() != nil) { diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go index 002e0047..f55b0369 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go @@ -43,6 +43,8 @@ func toEditionProto(ed filedesc.Edition) descriptorpb.Edition { return descriptorpb.Edition_EDITION_PROTO3 case filedesc.Edition2023: return descriptorpb.Edition_EDITION_2023 + case filedesc.Edition2024: + return descriptorpb.Edition_EDITION_2024 default: panic(fmt.Sprintf("unknown value for edition: %v", ed)) } @@ -123,10 +125,27 @@ func mergeEditionFeatures(parentDesc protoreflect.Descriptor, child *descriptorp parentFS.IsJSONCompliant = *jf == descriptorpb.FeatureSet_ALLOW } - if goFeatures, ok := proto.GetExtension(child, gofeaturespb.E_Go).(*gofeaturespb.GoFeatures); ok && goFeatures != nil { - if luje := goFeatures.LegacyUnmarshalJsonEnum; luje != nil { - parentFS.GenerateLegacyUnmarshalJSON = *luje - } + // We must not use proto.GetExtension(child, gofeaturespb.E_Go) + // because that only works for messages we generated, but not for + // dynamicpb messages. See golang/protobuf#1669. + goFeatures := child.ProtoReflect().Get(gofeaturespb.E_Go.TypeDescriptor()) + if !goFeatures.IsValid() { + return parentFS + } + // gf.Interface() could be *dynamicpb.Message or *gofeaturespb.GoFeatures. + gf := goFeatures.Message() + fields := gf.Descriptor().Fields() + + if fd := fields.ByName("legacy_unmarshal_json_enum"); gf.Has(fd) { + parentFS.GenerateLegacyUnmarshalJSON = gf.Get(fd).Bool() + } + + if fd := fields.ByName("strip_enum_prefix"); gf.Has(fd) { + parentFS.StripEnumPrefix = int(gf.Get(fd).Enum()) + } + + if fd := fields.ByName("api_level"); gf.Has(fd) { + parentFS.APILevel = int(gf.Get(fd).Enum()) } return parentFS diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go index a7b0d06f..a4b78ace 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go @@ -152,7 +152,7 @@ type Message interface { // This method may return nil. // // The returned methods type is identical to - // google.golang.org/protobuf/runtime/protoiface.Methods. + // [google.golang.org/protobuf/runtime/protoiface.Methods]. // Consult the protoiface package documentation for details. ProtoMethods() *methods } diff --git a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go index 24615656..28e9e9f0 100644 --- a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +++ b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go @@ -122,6 +122,22 @@ type UnmarshalInputFlags = uint8 const ( UnmarshalDiscardUnknown UnmarshalInputFlags = 1 << iota + + // UnmarshalAliasBuffer permits unmarshal operations to alias the input buffer. + // The unmarshaller must not modify the contents of the buffer. + UnmarshalAliasBuffer + + // UnmarshalValidated indicates that validation has already been + // performed on the input buffer. + UnmarshalValidated + + // UnmarshalCheckRequired is set if this unmarshal operation ultimately will care if required fields are + // initialized. + UnmarshalCheckRequired + + // UnmarshalNoLazyDecoding is set if this unmarshal operation should not use + // lazy decoding, even when otherwise available. + UnmarshalNoLazyDecoding ) // UnmarshalOutputFlags are output from the Unmarshal method. diff --git a/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go b/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go index 4a1ab7fb..93df1b56 100644 --- a/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go +++ b/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go @@ -15,6 +15,7 @@ import ( "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/filetype" "google.golang.org/protobuf/internal/impl" + "google.golang.org/protobuf/internal/protolazy" ) // UnsafeEnabled specifies whether package unsafe can be used. @@ -39,6 +40,9 @@ type ( ExtensionFieldV1 = impl.ExtensionField Pointer = impl.Pointer + + LazyUnmarshalInfo = *protolazy.XXX_lazyUnmarshalInfo + RaceDetectHookData = impl.RaceDetectHookData ) var X impl.Export diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index 6dea75cd..a551e7ae 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -69,7 +69,7 @@ const ( Edition_EDITION_2023 Edition = 1000 Edition_EDITION_2024 Edition = 1001 // Placeholder editions for testing feature resolution. These should not be - // used or relyed on outside of tests. + // used or relied on outside of tests. Edition_EDITION_1_TEST_ONLY Edition = 1 Edition_EDITION_2_TEST_ONLY Edition = 2 Edition_EDITION_99997_TEST_ONLY Edition = 99997 @@ -577,8 +577,6 @@ func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { } // If set to RETENTION_SOURCE, the option will be omitted from the binary. -// Note: as of January 2023, support for this is in progress and does not yet -// have an effect (b/264593489). type FieldOptions_OptionRetention int32 const ( @@ -640,8 +638,7 @@ func (FieldOptions_OptionRetention) EnumDescriptor() ([]byte, []int) { // This indicates the types of entities that the field may apply to when used // as an option. If it is unset, then the field may be freely used as an -// option on any kind of entity. Note: as of January 2023, support for this is -// in progress and does not yet have an effect (b/264593489). +// option on any kind of entity. type FieldOptions_OptionTargetType int32 const ( @@ -1208,11 +1205,11 @@ func (GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) { // The protocol compiler can output a FileDescriptorSet containing the .proto // files it parses. type FileDescriptorSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileDescriptorSet) Reset() { @@ -1254,12 +1251,9 @@ func (x *FileDescriptorSet) GetFile() []*FileDescriptorProto { // Describes a complete .proto file. type FileDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // file name, relative to root of source tree - Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // file name, relative to root of source tree + Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. // Names of files imported by this file. Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` // Indexes of the public imported files in the dependency list above. @@ -1284,7 +1278,9 @@ type FileDescriptorProto struct { // If `edition` is present, this value must be "editions". Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` // The edition of the proto file. - Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileDescriptorProto) Reset() { @@ -1410,10 +1406,7 @@ func (x *FileDescriptorProto) GetEdition() Edition { // Describes a message type. type DescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` @@ -1425,7 +1418,9 @@ type DescriptorProto struct { ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` // Reserved field names, which may not be used by fields in the same message. // A given name may only be reserved once. - ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DescriptorProto) Reset() { @@ -1529,11 +1524,7 @@ func (x *DescriptorProto) GetReservedName() []string { } type ExtensionRangeOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` // For external users: DO NOT USE. We are in the process of open sourcing @@ -1545,7 +1536,10 @@ type ExtensionRangeOptions struct { // The verification state of the range. // TODO: flip the default to DECLARATION once all empty ranges // are marked as UNVERIFIED. - Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"` + Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for ExtensionRangeOptions fields. @@ -1613,10 +1607,7 @@ func (x *ExtensionRangeOptions) GetVerification() ExtensionRangeOptions_Verifica // Describes a field within a message. type FieldDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` @@ -1668,6 +1659,8 @@ type FieldDescriptorProto struct { // Proto2 optional fields do not set this flag, because they already indicate // optional with `LABEL_OPTIONAL`. Proto3Optional *bool `protobuf:"varint,17,opt,name=proto3_optional,json=proto3Optional" json:"proto3_optional,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FieldDescriptorProto) Reset() { @@ -1779,12 +1772,11 @@ func (x *FieldDescriptorProto) GetProto3Optional() bool { // Describes a oneof. type OneofDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OneofDescriptorProto) Reset() { @@ -1833,10 +1825,7 @@ func (x *OneofDescriptorProto) GetOptions() *OneofOptions { // Describes an enum type. type EnumDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` @@ -1846,7 +1835,9 @@ type EnumDescriptorProto struct { ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` // Reserved enum value names, which may not be reused. A given name may only // be reserved once. - ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EnumDescriptorProto) Reset() { @@ -1916,13 +1907,12 @@ func (x *EnumDescriptorProto) GetReservedName() []string { // Describes a value within an enum. type EnumValueDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` + Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` - Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EnumValueDescriptorProto) Reset() { @@ -1978,13 +1968,12 @@ func (x *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { // Describes a service. type ServiceDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` + Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` - Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ServiceDescriptorProto) Reset() { @@ -2040,11 +2029,8 @@ func (x *ServiceDescriptorProto) GetOptions() *ServiceOptions { // Describes a method of a service. type MethodDescriptorProto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Input and output type names. These are resolved in the same way as // FieldDescriptorProto.type_name, but must refer to a message type. InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` @@ -2054,6 +2040,8 @@ type MethodDescriptorProto struct { ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` // Identifies if server streams multiple server messages ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for MethodDescriptorProto fields. @@ -2135,11 +2123,7 @@ func (x *MethodDescriptorProto) GetServerStreaming() bool { } type FileOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Sets the Java package where classes generated from this .proto will be // placed. By default, the proto package is used, but this is often // inappropriate because proto packages do not normally start with backwards @@ -2231,6 +2215,9 @@ type FileOptions struct { // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for FileOptions fields. @@ -2424,11 +2411,7 @@ func (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption { } type MessageOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Set true to use the old proto1 MessageSet wire format for extensions. // This is provided for backwards-compatibility with the MessageSet wire // format. You should not use this for any other reason: It's less @@ -2501,6 +2484,9 @@ type MessageOptions struct { Features *FeatureSet `protobuf:"bytes,12,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for MessageOptions fields. @@ -2591,17 +2577,14 @@ func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { } type FieldOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` + // NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. // The ctype option instructs the C++ code generator to use a different // representation of the field than it normally would. See the specific // options below. This option is only implemented to support use of // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - // type "bytes" in the open source release -- sorry, we'll try to include - // other types in a future version! + // type "bytes" in the open source release. + // TODO: make ctype actually deprecated. Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` // The packed option can be enabled for repeated primitive fields to enable // a more efficient representation on the wire. Rather than repeatedly @@ -2668,6 +2651,9 @@ type FieldOptions struct { FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,22,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for FieldOptions fields. @@ -2810,15 +2796,14 @@ func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { } type OneofOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Any features defined in the specific edition. Features *FeatureSet `protobuf:"bytes,1,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *OneofOptions) Reset() { @@ -2866,11 +2851,7 @@ func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { } type EnumOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Set this option to true to allow mapping different tag names to the same // value. AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` @@ -2892,6 +2873,9 @@ type EnumOptions struct { Features *FeatureSet `protobuf:"bytes,7,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for EnumOptions fields. @@ -2966,11 +2950,7 @@ func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { } type EnumValueOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Is this enum value deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the enum value, or it will be completely ignored; in the very least, @@ -2986,6 +2966,9 @@ type EnumValueOptions struct { FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,4,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for EnumValueOptions fields. @@ -3060,11 +3043,7 @@ func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { } type ServiceOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Any features defined in the specific edition. Features *FeatureSet `protobuf:"bytes,34,opt,name=features" json:"features,omitempty"` // Is this service deprecated? @@ -3074,6 +3053,9 @@ type ServiceOptions struct { Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for ServiceOptions fields. @@ -3133,11 +3115,7 @@ func (x *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { } type MethodOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` // Is this method deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the method, or it will be completely ignored; in the very least, @@ -3148,6 +3126,9 @@ type MethodOptions struct { Features *FeatureSet `protobuf:"bytes,35,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Default values for MethodOptions fields. @@ -3221,11 +3202,8 @@ func (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions // in them. type UninterpretedOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` // The value of the uninterpreted option, in whatever type the tokenizer // identified it as during parsing. Exactly one of these should be set. IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` @@ -3234,6 +3212,8 @@ type UninterpretedOption struct { DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UninterpretedOption) Reset() { @@ -3322,17 +3302,16 @@ func (x *UninterpretedOption) GetAggregateValue() string { // be designed and implemented to handle this, hopefully before we ever hit a // conflict here. type FeatureSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - extensionFields protoimpl.ExtensionFields - + state protoimpl.MessageState `protogen:"open.v1"` FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"` EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"` RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"` Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"` MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"` JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FeatureSet) Reset() { @@ -3412,10 +3391,7 @@ func (x *FeatureSet) GetJsonFormat() FeatureSet_JsonFormat { // feature resolution. The resolution with this object becomes a simple search // for the closest matching edition, followed by proto merges. type FeatureSetDefaults struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Defaults []*FeatureSetDefaults_FeatureSetEditionDefault `protobuf:"bytes,1,rep,name=defaults" json:"defaults,omitempty"` // The minimum supported edition (inclusive) when this was constructed. // Editions before this will not have defaults. @@ -3423,6 +3399,8 @@ type FeatureSetDefaults struct { // The maximum known edition (inclusive) when this was constructed. Editions // after this will not have reliable defaults. MaximumEdition *Edition `protobuf:"varint,5,opt,name=maximum_edition,json=maximumEdition,enum=google.protobuf.Edition" json:"maximum_edition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FeatureSetDefaults) Reset() { @@ -3479,10 +3457,7 @@ func (x *FeatureSetDefaults) GetMaximumEdition() Edition { // Encapsulates information about the original source file from which a // FileDescriptorProto was generated. type SourceCodeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A Location identifies a piece of source code in a .proto file which // corresponds to a particular definition. This information is intended // to be useful to IDEs, code indexers, documentation generators, and similar @@ -3531,7 +3506,10 @@ type SourceCodeInfo struct { // - Code which tries to interpret locations should probably be designed to // ignore those that it doesn't understand, as more types of locations could // be recorded in the future. - Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SourceCodeInfo) Reset() { @@ -3575,13 +3553,12 @@ func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { // file. A GeneratedCodeInfo message is associated with only one generated // source file, but may contain references to different source .proto files. type GeneratedCodeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // An Annotation connects some span of text in generated code to an element // of its generating .proto file. - Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GeneratedCodeInfo) Reset() { @@ -3622,13 +3599,12 @@ func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { } type DescriptorProto_ExtensionRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. + Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` unknownFields protoimpl.UnknownFields - - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. - Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DescriptorProto_ExtensionRange) Reset() { @@ -3686,12 +3662,11 @@ func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { // fields or extension ranges in the same message. Reserved ranges may // not overlap. type DescriptorProto_ReservedRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. unknownFields protoimpl.UnknownFields - - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. + sizeCache protoimpl.SizeCache } func (x *DescriptorProto_ReservedRange) Reset() { @@ -3739,10 +3714,7 @@ func (x *DescriptorProto_ReservedRange) GetEnd() int32 { } type ExtensionRangeOptions_Declaration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The extension number declared within the extension range. Number *int32 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"` // The fully-qualified name of the extension field. There must be a leading @@ -3758,7 +3730,9 @@ type ExtensionRangeOptions_Declaration struct { Reserved *bool `protobuf:"varint,5,opt,name=reserved" json:"reserved,omitempty"` // If true, indicates that the extension must be defined as repeated. // Otherwise the extension must be defined as optional. - Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"` + Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExtensionRangeOptions_Declaration) Reset() { @@ -3833,12 +3807,11 @@ func (x *ExtensionRangeOptions_Declaration) GetRepeated() bool { // is inclusive such that it can appropriately represent the entire int32 // domain. type EnumDescriptorProto_EnumReservedRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Inclusive. unknownFields protoimpl.UnknownFields - - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Inclusive. + sizeCache protoimpl.SizeCache } func (x *EnumDescriptorProto_EnumReservedRange) Reset() { @@ -3886,12 +3859,11 @@ func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { } type FieldOptions_EditionDefault struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value. unknownFields protoimpl.UnknownFields - - Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value. + sizeCache protoimpl.SizeCache } func (x *FieldOptions_EditionDefault) Reset() { @@ -3940,10 +3912,7 @@ func (x *FieldOptions_EditionDefault) GetValue() string { // Information about the support window of a feature. type FieldOptions_FeatureSupport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The edition that this feature was first available in. In editions // earlier than this one, the default assigned to EDITION_LEGACY will be // used, and proto files will not be able to override it. @@ -3958,6 +3927,8 @@ type FieldOptions_FeatureSupport struct { // this one, the last default assigned will be used, and proto files will // not be able to override it. EditionRemoved *Edition `protobuf:"varint,4,opt,name=edition_removed,json=editionRemoved,enum=google.protobuf.Edition" json:"edition_removed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FieldOptions_FeatureSupport) Reset() { @@ -4024,12 +3995,11 @@ func (x *FieldOptions_FeatureSupport) GetEditionRemoved() Edition { // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents // "foo.(bar.baz).moo". type UninterpretedOption_NamePart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` + IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` unknownFields protoimpl.UnknownFields - - NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` - IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UninterpretedOption_NamePart) Reset() { @@ -4081,15 +4051,14 @@ func (x *UninterpretedOption_NamePart) GetIsExtension() bool { // the defaults at the closest matching edition ordered at or before it should // be used. This field must be in strict ascending order by edition. type FeatureSetDefaults_FeatureSetEditionDefault struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` // Defaults of features that can be overridden in this edition. OverridableFeatures *FeatureSet `protobuf:"bytes,4,opt,name=overridable_features,json=overridableFeatures" json:"overridable_features,omitempty"` // Defaults of features that can't be overridden in this edition. FixedFeatures *FeatureSet `protobuf:"bytes,5,opt,name=fixed_features,json=fixedFeatures" json:"fixed_features,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() { @@ -4144,10 +4113,7 @@ func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFixedFeatures() *Featur } type SourceCodeInfo_Location struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Identifies which part of the FileDescriptorProto was defined at this // location. // @@ -4239,6 +4205,8 @@ type SourceCodeInfo_Location struct { LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SourceCodeInfo_Location) Reset() { @@ -4307,10 +4275,7 @@ func (x *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { } type GeneratedCodeInfo_Annotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Identifies the element in the original source .proto file. This field // is formatted the same as SourceCodeInfo.Location.path. Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` @@ -4322,8 +4287,10 @@ type GeneratedCodeInfo_Annotation struct { // Identifies the ending offset in bytes in the generated code that // relates to the identified object. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). - End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` - Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GeneratedCodeInfo_Annotation) Reset() { @@ -4397,494 +4364,474 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x22, 0x4d, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x62, 0x75, 0x66, 0x22, 0x5b, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, - 0x6c, 0x65, 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, - 0x03, 0x28, 0x05, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x65, 0x70, 0x65, 0x6e, - 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, - 0x77, 0x65, 0x61, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x43, - 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, - 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, - 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, - 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, - 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x6c, 0x65, 0x2a, 0x0c, 0x08, 0x80, 0xec, 0xca, 0xff, 0x01, 0x10, 0x81, 0xec, 0xca, 0xff, 0x01, + 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, 0x77, 0x65, + 0x61, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x43, 0x0a, 0x0c, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, - 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, - 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, - 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x15, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, - 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63, - 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x6d, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x3a, 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x42, 0x03, 0x88, - 0x01, 0x02, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0x94, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, - 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, - 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, - 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, - 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, + 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, 0x0a, 0x0f, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6e, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, + 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, + 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, + 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x37, + 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x0b, 0x64, + 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x6d, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, + 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x42, 0x03, 0x88, 0x01, 0x02, + 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x94, + 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4a, + 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, + 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x55, + 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, - 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, + 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, + 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, + 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, + 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, + 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, + 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, + 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, + 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, + 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, + 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, + 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, + 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, + 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, + 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, + 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, + 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, + 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, + 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, - 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, - 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, - 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, - 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, - 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, - 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, - 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, - 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, - 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, - 0x44, 0x36, 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, - 0x4e, 0x54, 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, - 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, - 0x41, 0x4c, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, - 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, - 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, - 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, - 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, + 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, + 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, - 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, - 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, + 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, + 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, + 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, + 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, + 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, + 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, + 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, + 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, + 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, + 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, + 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, + 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, + 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, + 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, + 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, + 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x30, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, - 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, - 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, - 0x76, 0x61, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, - 0x44, 0x0a, 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x5f, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, - 0x64, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, - 0x1b, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, - 0x76, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, - 0x38, 0x12, 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, - 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, - 0x64, 0x65, 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, - 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, - 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, - 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, - 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, - 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, - 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, - 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, - 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, - 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, - 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, - 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, - 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, - 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, - 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, - 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, - 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, - 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, - 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, - 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, - 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, - 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, + 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, + 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, + 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, + 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, 0x68, 0x70, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, + 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, + 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, + 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, + 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, + 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, - 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, + 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, + 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, + 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, + 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, - 0x55, 0x0a, 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, - 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, - 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, - 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, - 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, - 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, - 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, - 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, - 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, - 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, - 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, - 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, - 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, - 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, - 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, - 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, - 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, - 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, - 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, - 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, - 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, + 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, + 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x55, 0x0a, + 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, - 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, - 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5a, + 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, 0x0e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x47, 0x0a, + 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, + 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, + 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, + 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, + 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, + 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, + 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, + 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, + 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, + 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, + 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, + 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, @@ -4893,274 +4840,296 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, - 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, - 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, + 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, + 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, + 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, 0x0a, 0x10, + 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, + 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, - 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, + 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x99, + 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6d, 0x70, + 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, + 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, - 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, + 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, + 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, 0x12, + 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x2a, + 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, + 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, + 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, + 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, + 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, + 0x49, 0x54, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, + 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, + 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, 0x65, 0x6e, + 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, - 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, - 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, - 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, - 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, - 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, - 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, - 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, - 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, - 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, - 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, - 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, - 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, - 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, - 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, - 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, - 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, - 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, - 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, - 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, - 0x09, 0x12, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, - 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, - 0x2d, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, - 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, - 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, - 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, - 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, - 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, - 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, - 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xb2, 0x01, - 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, - 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, - 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, - 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, - 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, - 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, - 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, - 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, - 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, - 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, - 0x02, 0x22, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, - 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, - 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, - 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, - 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, - 0x54, 0x46, 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, - 0x46, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, - 0x08, 0x01, 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, - 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, - 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, - 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, - 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, - 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, - 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, - 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, - 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, - 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, - 0x10, 0xe8, 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, + 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, + 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x09, 0x12, + 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x08, + 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x2d, 0x88, + 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, + 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, 0x72, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, + 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0x84, 0x07, 0xa2, + 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, + 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, - 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, - 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, - 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, + 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0x84, 0x07, 0xb2, 0x01, 0x03, 0x08, + 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, - 0x62, 0x6c, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, - 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, - 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, - 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, - 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, - 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, - 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, - 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, - 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, - 0x10, 0x02, 0x2a, 0xa7, 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, - 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, - 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, - 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, - 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, - 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, - 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, - 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, - 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, - 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, - 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, - 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, - 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, + 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, + 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x41, 0x4c, + 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, 0x6a, 0x73, + 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, + 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, + 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, + 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, + 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, + 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, + 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, + 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, + 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, + 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, + 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, 0x08, 0x01, + 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, + 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, + 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, + 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, + 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, + 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, + 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, + 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, + 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, + 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, + 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0d, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x04, 0x08, + 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x22, 0xb5, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, + 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x0c, 0x08, + 0x80, 0xec, 0xca, 0xff, 0x01, 0x10, 0x81, 0xec, 0xca, 0xff, 0x01, 0x22, 0xd0, 0x02, 0x0a, 0x11, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, + 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, + 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, + 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0xa7, + 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x47, 0x41, 0x43, + 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, 0xe7, 0x07, 0x12, 0x11, + 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, 0x33, 0x10, 0xe8, + 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, + 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x17, 0x0a, + 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, + 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, + 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, + 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, + 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, + 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, + 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, + 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, } var ( diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go index c7e860fc..e0b72eaf 100644 --- a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go +++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go @@ -18,13 +18,143 @@ import ( sync "sync" ) -type GoFeatures struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +type GoFeatures_APILevel int32 + +const ( + // API_LEVEL_UNSPECIFIED results in selecting the OPEN API, + // but needs to be a separate value to distinguish between + // an explicitly set api level or a missing api level. + GoFeatures_API_LEVEL_UNSPECIFIED GoFeatures_APILevel = 0 + GoFeatures_API_OPEN GoFeatures_APILevel = 1 + GoFeatures_API_HYBRID GoFeatures_APILevel = 2 + GoFeatures_API_OPAQUE GoFeatures_APILevel = 3 +) + +// Enum value maps for GoFeatures_APILevel. +var ( + GoFeatures_APILevel_name = map[int32]string{ + 0: "API_LEVEL_UNSPECIFIED", + 1: "API_OPEN", + 2: "API_HYBRID", + 3: "API_OPAQUE", + } + GoFeatures_APILevel_value = map[string]int32{ + "API_LEVEL_UNSPECIFIED": 0, + "API_OPEN": 1, + "API_HYBRID": 2, + "API_OPAQUE": 3, + } +) + +func (x GoFeatures_APILevel) Enum() *GoFeatures_APILevel { + p := new(GoFeatures_APILevel) + *p = x + return p +} + +func (x GoFeatures_APILevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GoFeatures_APILevel) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_go_features_proto_enumTypes[0].Descriptor() +} +func (GoFeatures_APILevel) Type() protoreflect.EnumType { + return &file_google_protobuf_go_features_proto_enumTypes[0] +} + +func (x GoFeatures_APILevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *GoFeatures_APILevel) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = GoFeatures_APILevel(num) + return nil +} + +// Deprecated: Use GoFeatures_APILevel.Descriptor instead. +func (GoFeatures_APILevel) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0, 0} +} + +type GoFeatures_StripEnumPrefix int32 + +const ( + GoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED GoFeatures_StripEnumPrefix = 0 + GoFeatures_STRIP_ENUM_PREFIX_KEEP GoFeatures_StripEnumPrefix = 1 + GoFeatures_STRIP_ENUM_PREFIX_GENERATE_BOTH GoFeatures_StripEnumPrefix = 2 + GoFeatures_STRIP_ENUM_PREFIX_STRIP GoFeatures_StripEnumPrefix = 3 +) + +// Enum value maps for GoFeatures_StripEnumPrefix. +var ( + GoFeatures_StripEnumPrefix_name = map[int32]string{ + 0: "STRIP_ENUM_PREFIX_UNSPECIFIED", + 1: "STRIP_ENUM_PREFIX_KEEP", + 2: "STRIP_ENUM_PREFIX_GENERATE_BOTH", + 3: "STRIP_ENUM_PREFIX_STRIP", + } + GoFeatures_StripEnumPrefix_value = map[string]int32{ + "STRIP_ENUM_PREFIX_UNSPECIFIED": 0, + "STRIP_ENUM_PREFIX_KEEP": 1, + "STRIP_ENUM_PREFIX_GENERATE_BOTH": 2, + "STRIP_ENUM_PREFIX_STRIP": 3, + } +) + +func (x GoFeatures_StripEnumPrefix) Enum() *GoFeatures_StripEnumPrefix { + p := new(GoFeatures_StripEnumPrefix) + *p = x + return p +} + +func (x GoFeatures_StripEnumPrefix) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GoFeatures_StripEnumPrefix) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_go_features_proto_enumTypes[1].Descriptor() +} + +func (GoFeatures_StripEnumPrefix) Type() protoreflect.EnumType { + return &file_google_protobuf_go_features_proto_enumTypes[1] +} + +func (x GoFeatures_StripEnumPrefix) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *GoFeatures_StripEnumPrefix) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = GoFeatures_StripEnumPrefix(num) + return nil +} + +// Deprecated: Use GoFeatures_StripEnumPrefix.Descriptor instead. +func (GoFeatures_StripEnumPrefix) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0, 1} +} + +type GoFeatures struct { + state protoimpl.MessageState `protogen:"open.v1"` // Whether or not to generate the deprecated UnmarshalJSON method for enums. + // Can only be true for proto using the Open Struct api. LegacyUnmarshalJsonEnum *bool `protobuf:"varint,1,opt,name=legacy_unmarshal_json_enum,json=legacyUnmarshalJsonEnum" json:"legacy_unmarshal_json_enum,omitempty"` + // One of OPEN, HYBRID or OPAQUE. + ApiLevel *GoFeatures_APILevel `protobuf:"varint,2,opt,name=api_level,json=apiLevel,enum=pb.GoFeatures_APILevel" json:"api_level,omitempty"` + StripEnumPrefix *GoFeatures_StripEnumPrefix `protobuf:"varint,3,opt,name=strip_enum_prefix,json=stripEnumPrefix,enum=pb.GoFeatures_StripEnumPrefix" json:"strip_enum_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GoFeatures) Reset() { @@ -64,6 +194,20 @@ func (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool { return false } +func (x *GoFeatures) GetApiLevel() GoFeatures_APILevel { + if x != nil && x.ApiLevel != nil { + return *x.ApiLevel + } + return GoFeatures_API_LEVEL_UNSPECIFIED +} + +func (x *GoFeatures) GetStripEnumPrefix() GoFeatures_StripEnumPrefix { + if x != nil && x.StripEnumPrefix != nil { + return *x.StripEnumPrefix + } + return GoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED +} + var file_google_protobuf_go_features_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FeatureSet)(nil), @@ -88,7 +232,7 @@ var file_google_protobuf_go_features_proto_rawDesc = []byte{ 0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x47, 0x6f, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x05, 0x0a, 0x0a, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x80, 0x01, @@ -101,14 +245,44 @@ var file_google_protobuf_go_features_proto_rawDesc = []byte{ 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, - 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, - 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x62, + 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x74, 0x0a, 0x09, 0x61, 0x70, 0x69, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, + 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x41, 0x50, 0x49, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x3e, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x01, + 0xa2, 0x01, 0x1a, 0x12, 0x15, 0x41, 0x50, 0x49, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0f, + 0x12, 0x0a, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x41, 0x51, 0x55, 0x45, 0x18, 0xe9, 0x07, 0xb2, + 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x08, 0x61, 0x70, 0x69, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x7c, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, + 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x70, + 0x45, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x30, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x06, 0x98, 0x01, 0x07, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x1b, 0x12, 0x16, 0x53, 0x54, 0x52, + 0x49, 0x50, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, 0x4b, + 0x45, 0x45, 0x50, 0x18, 0x84, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe9, 0x07, 0x52, 0x0f, 0x73, 0x74, + 0x72, 0x69, 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x53, 0x0a, + 0x08, 0x41, 0x50, 0x49, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x50, 0x49, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x45, 0x4e, + 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x5f, 0x48, 0x59, 0x42, 0x52, 0x49, 0x44, + 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x41, 0x51, 0x55, 0x45, + 0x10, 0x03, 0x22, 0x92, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x70, 0x45, 0x6e, 0x75, 0x6d, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x52, 0x49, 0x50, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x52, + 0x49, 0x50, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, 0x4b, + 0x45, 0x45, 0x50, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x54, 0x52, 0x49, 0x50, 0x5f, 0x45, + 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, + 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x54, 0x48, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, + 0x52, 0x49, 0x50, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x5f, + 0x53, 0x54, 0x52, 0x49, 0x50, 0x10, 0x03, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, 0x1b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x70, 0x62, } var ( @@ -123,19 +297,24 @@ func file_google_protobuf_go_features_proto_rawDescGZIP() []byte { return file_google_protobuf_go_features_proto_rawDescData } +var file_google_protobuf_go_features_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_google_protobuf_go_features_proto_goTypes = []any{ - (*GoFeatures)(nil), // 0: pb.GoFeatures - (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet + (GoFeatures_APILevel)(0), // 0: pb.GoFeatures.APILevel + (GoFeatures_StripEnumPrefix)(0), // 1: pb.GoFeatures.StripEnumPrefix + (*GoFeatures)(nil), // 2: pb.GoFeatures + (*descriptorpb.FeatureSet)(nil), // 3: google.protobuf.FeatureSet } var file_google_protobuf_go_features_proto_depIdxs = []int32{ - 1, // 0: pb.go:extendee -> google.protobuf.FeatureSet - 0, // 1: pb.go:type_name -> pb.GoFeatures - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: pb.GoFeatures.api_level:type_name -> pb.GoFeatures.APILevel + 1, // 1: pb.GoFeatures.strip_enum_prefix:type_name -> pb.GoFeatures.StripEnumPrefix + 3, // 2: pb.go:extendee -> google.protobuf.FeatureSet + 2, // 3: pb.go:type_name -> pb.GoFeatures + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 3, // [3:4] is the sub-list for extension type_name + 2, // [2:3] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_google_protobuf_go_features_proto_init() } @@ -148,13 +327,14 @@ func file_google_protobuf_go_features_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_protobuf_go_features_proto_rawDesc, - NumEnums: 0, + NumEnums: 2, NumMessages: 1, NumExtensions: 1, NumServices: 0, }, GoTypes: file_google_protobuf_go_features_proto_goTypes, DependencyIndexes: file_google_protobuf_go_features_proto_depIdxs, + EnumInfos: file_google_protobuf_go_features_proto_enumTypes, MessageInfos: file_google_protobuf_go_features_proto_msgTypes, ExtensionInfos: file_google_protobuf_go_features_proto_extTypes, }.Build() diff --git a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go index 87da199a..191552cc 100644 --- a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go @@ -210,10 +210,7 @@ import ( // "value": "1.212s" // } type Any struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -244,7 +241,9 @@ type Any struct { // used with implementation specific semantics. TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // Must be a valid serialized protocol buffer of the above specified type. - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // New marshals src into a new Any instance. diff --git a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go index b99d4d24..34d76e6c 100644 --- a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go @@ -141,10 +141,7 @@ import ( // be expressed in JSON format as "3.000000001s", and 3 seconds and 1 // microsecond should be expressed in JSON format as "3.000001s". type Duration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years @@ -155,7 +152,9 @@ type Duration struct { // of one second or more, a non-zero value for the `nanos` field must be // of the same sign as the `seconds` field. Must be from -999,999,999 // to +999,999,999 inclusive. - Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // New constructs a new Duration from the provided time.Duration. diff --git a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go index 8f206a66..f2c53ea3 100644 --- a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go @@ -187,12 +187,11 @@ func (NullValue) EnumDescriptor() ([]byte, []int) { // // The JSON representation for `Struct` is JSON object. type Struct struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Unordered map of dynamically typed values. - Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // NewStruct constructs a Struct from a general-purpose Go map. @@ -276,13 +275,10 @@ func (x *Struct) GetFields() map[string]*Value { // // The JSON representation for `Value` is JSON value. type Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The kind of value. // - // Types that are assignable to Kind: + // Types that are valid to be assigned to Kind: // // *Value_NullValue // *Value_NumberValue @@ -290,7 +286,9 @@ type Value struct { // *Value_BoolValue // *Value_StructValue // *Value_ListValue - Kind isValue_Kind `protobuf_oneof:"kind"` + Kind isValue_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // NewValue constructs a Value from a general-purpose Go interface. @@ -483,51 +481,63 @@ func (*Value) Descriptor() ([]byte, []int) { return file_google_protobuf_struct_proto_rawDescGZIP(), []int{1} } -func (m *Value) GetKind() isValue_Kind { - if m != nil { - return m.Kind +func (x *Value) GetKind() isValue_Kind { + if x != nil { + return x.Kind } return nil } func (x *Value) GetNullValue() NullValue { - if x, ok := x.GetKind().(*Value_NullValue); ok { - return x.NullValue + if x != nil { + if x, ok := x.Kind.(*Value_NullValue); ok { + return x.NullValue + } } return NullValue_NULL_VALUE } func (x *Value) GetNumberValue() float64 { - if x, ok := x.GetKind().(*Value_NumberValue); ok { - return x.NumberValue + if x != nil { + if x, ok := x.Kind.(*Value_NumberValue); ok { + return x.NumberValue + } } return 0 } func (x *Value) GetStringValue() string { - if x, ok := x.GetKind().(*Value_StringValue); ok { - return x.StringValue + if x != nil { + if x, ok := x.Kind.(*Value_StringValue); ok { + return x.StringValue + } } return "" } func (x *Value) GetBoolValue() bool { - if x, ok := x.GetKind().(*Value_BoolValue); ok { - return x.BoolValue + if x != nil { + if x, ok := x.Kind.(*Value_BoolValue); ok { + return x.BoolValue + } } return false } func (x *Value) GetStructValue() *Struct { - if x, ok := x.GetKind().(*Value_StructValue); ok { - return x.StructValue + if x != nil { + if x, ok := x.Kind.(*Value_StructValue); ok { + return x.StructValue + } } return nil } func (x *Value) GetListValue() *ListValue { - if x, ok := x.GetKind().(*Value_ListValue); ok { - return x.ListValue + if x != nil { + if x, ok := x.Kind.(*Value_ListValue); ok { + return x.ListValue + } } return nil } @@ -582,12 +592,11 @@ func (*Value_ListValue) isValue_Kind() {} // // The JSON representation for `ListValue` is JSON array. type ListValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Repeated field of dynamically typed values. - Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // NewList constructs a ListValue from a general-purpose Go slice. diff --git a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go index 0d20722d..9550109a 100644 --- a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go @@ -170,10 +170,7 @@ import ( // http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() // ) to obtain a formatter capable of generating timestamps in this format. type Timestamp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. @@ -182,7 +179,9 @@ type Timestamp struct { // second values with fractions must still have non-negative nanos values // that count forward in time. Must be from 0 to 999,999,999 // inclusive. - Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Now constructs a new Timestamp from the current time. diff --git a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go index 006060e5..15b424ec 100644 --- a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go @@ -54,12 +54,11 @@ import ( // // The JSON representation for `DoubleValue` is JSON number. type DoubleValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The double value. - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Double stores v in a new DoubleValue and returns a pointer to it. @@ -108,12 +107,11 @@ func (x *DoubleValue) GetValue() float64 { // // The JSON representation for `FloatValue` is JSON number. type FloatValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The float value. - Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Float stores v in a new FloatValue and returns a pointer to it. @@ -162,12 +160,11 @@ func (x *FloatValue) GetValue() float32 { // // The JSON representation for `Int64Value` is JSON string. type Int64Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The int64 value. - Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Int64 stores v in a new Int64Value and returns a pointer to it. @@ -216,12 +213,11 @@ func (x *Int64Value) GetValue() int64 { // // The JSON representation for `UInt64Value` is JSON string. type UInt64Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The uint64 value. - Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // UInt64 stores v in a new UInt64Value and returns a pointer to it. @@ -270,12 +266,11 @@ func (x *UInt64Value) GetValue() uint64 { // // The JSON representation for `Int32Value` is JSON number. type Int32Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The int32 value. - Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Int32 stores v in a new Int32Value and returns a pointer to it. @@ -324,12 +319,11 @@ func (x *Int32Value) GetValue() int32 { // // The JSON representation for `UInt32Value` is JSON number. type UInt32Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The uint32 value. - Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // UInt32 stores v in a new UInt32Value and returns a pointer to it. @@ -378,12 +372,11 @@ func (x *UInt32Value) GetValue() uint32 { // // The JSON representation for `BoolValue` is JSON `true` and `false`. type BoolValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The bool value. - Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Bool stores v in a new BoolValue and returns a pointer to it. @@ -432,12 +425,11 @@ func (x *BoolValue) GetValue() bool { // // The JSON representation for `StringValue` is JSON string. type StringValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The string value. - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // String stores v in a new StringValue and returns a pointer to it. @@ -486,12 +478,11 @@ func (x *StringValue) GetValue() string { // // The JSON representation for `BytesValue` is JSON string. type BytesValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The bytes value. - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } // Bytes stores v in a new BytesValue and returns a pointer to it. diff --git a/vendor/modernc.org/libc/atomic.go b/vendor/modernc.org/libc/atomic.go index 378a32c0..6e42a3d0 100644 --- a/vendor/modernc.org/libc/atomic.go +++ b/vendor/modernc.org/libc/atomic.go @@ -38,14 +38,9 @@ func a_store_16(addr uintptr, val uint16) { *(*uint16)(unsafe.Pointer(addr)) = val } -// static inline int a_ctz_l(unsigned long x) -func _a_ctz_l(tls *TLS, x ulong) int32 { - return int32(mbits.TrailingZeros64(uint64(x))) -} - // static inline int a_ctz_64(uint64_t x) func _a_ctz_64(tls *TLS, x uint64) int32 { - return int32(mbits.TrailingZeros64(uint64(x))) + return int32(mbits.TrailingZeros64(x)) } func AtomicAddFloat32(addr *float32, delta float32) (new float32) { diff --git a/vendor/modernc.org/libc/atomic32.go b/vendor/modernc.org/libc/atomic32.go new file mode 100644 index 00000000..c5670a55 --- /dev/null +++ b/vendor/modernc.org/libc/atomic32.go @@ -0,0 +1,16 @@ +// Copyright 2024 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux && (386 || arm) + +package libc // import "modernc.org/libc" + +import ( + mbits "math/bits" +) + +// static inline int a_ctz_l(unsigned long x) +func _a_ctz_l(tls *TLS, x ulong) int32 { + return int32(mbits.TrailingZeros32(x)) +} diff --git a/vendor/modernc.org/libc/atomic64.go b/vendor/modernc.org/libc/atomic64.go new file mode 100644 index 00000000..d2426218 --- /dev/null +++ b/vendor/modernc.org/libc/atomic64.go @@ -0,0 +1,16 @@ +// Copyright 2024 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64) + +package libc // import "modernc.org/libc" + +import ( + mbits "math/bits" +) + +// static inline int a_ctz_l(unsigned long x) +func _a_ctz_l(tls *TLS, x ulong) int32 { + return int32(mbits.TrailingZeros64(x)) +} diff --git a/vendor/modernc.org/libc/builtin.go b/vendor/modernc.org/libc/builtin.go index 07efc717..fcd77151 100644 --- a/vendor/modernc.org/libc/builtin.go +++ b/vendor/modernc.org/libc/builtin.go @@ -60,20 +60,12 @@ func X__builtin_ctz(t *TLS, n uint32) int32 { return int32(mbits.TrailingZeros32(n)) } -func X__builtin_ctzl(tls *TLS, x ulong) int32 { - return int32(mbits.TrailingZeros64(uint64(x))) -} - func X__builtin_clz(t *TLS, n uint32) int32 { return int32(mbits.LeadingZeros32(n)) } -func X__builtin_clzl(t *TLS, n ulong) int32 { - return int32(mbits.LeadingZeros64(uint64(n))) -} - func X__builtin_clzll(t *TLS, n uint64) int32 { - return int32(mbits.LeadingZeros64(uint64(n))) + return int32(mbits.LeadingZeros64(n)) } func X__builtin_constant_p_impl() { panic(todo("internal error: should never be called")) } @@ -172,11 +164,6 @@ func X__builtin_popcount(t *TLS, x uint32) int32 { return int32(mbits.OnesCount32(x)) } -// int __builtin_popcountl (unsigned long x) -func X__builtin_popcountl(t *TLS, x ulong) int32 { - return int32(mbits.OnesCount64(uint64(x))) -} - // char * __builtin___strcpy_chk (char *dest, const char *src, size_t os); func X__builtin___strcpy_chk(t *TLS, dest, src uintptr, os Tsize_t) uintptr { return Xstrcpy(t, dest, src) @@ -303,7 +290,12 @@ func X__builtin___memset_chk(t *TLS, s uintptr, c int32, n, os Tsize_t) uintptr // size_t __builtin_object_size (const void * ptr, int type) func X__builtin_object_size(t *TLS, p uintptr, typ int32) Tsize_t { - return ^Tsize_t(0) //TODO frontend magic + switch typ { + case 0, 1: + return ^Tsize_t(0) + default: + return 0 + } } // int __builtin___sprintf_chk (char *s, int flag, size_t os, const char *fmt, ...); diff --git a/vendor/modernc.org/libc/builtin32.go b/vendor/modernc.org/libc/builtin32.go new file mode 100644 index 00000000..01338e4d --- /dev/null +++ b/vendor/modernc.org/libc/builtin32.go @@ -0,0 +1,24 @@ +// Copyright 2024 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux && (386 || arm) + +package libc // import "modernc.org/libc" + +import ( + mbits "math/bits" +) + +func X__builtin_ctzl(tls *TLS, x ulong) int32 { + return int32(mbits.TrailingZeros32(x)) +} + +func X__builtin_clzl(t *TLS, n ulong) int32 { + return int32(mbits.LeadingZeros32(n)) +} + +// int __builtin_popcountl (unsigned long x) +func X__builtin_popcountl(t *TLS, x ulong) int32 { + return int32(mbits.OnesCount32(x)) +} diff --git a/vendor/modernc.org/libc/builtin64.go b/vendor/modernc.org/libc/builtin64.go new file mode 100644 index 00000000..9dce964f --- /dev/null +++ b/vendor/modernc.org/libc/builtin64.go @@ -0,0 +1,24 @@ +// Copyright 2024 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64) + +package libc // import "modernc.org/libc" + +import ( + mbits "math/bits" +) + +func X__builtin_ctzl(tls *TLS, x ulong) int32 { + return int32(mbits.TrailingZeros64(x)) +} + +func X__builtin_clzl(t *TLS, n ulong) int32 { + return int32(mbits.LeadingZeros64(n)) +} + +// int __builtin_popcountl (unsigned long x) +func X__builtin_popcountl(t *TLS, x ulong) int32 { + return int32(mbits.OnesCount64(x)) +} diff --git a/vendor/modernc.org/libc/ccgo_linux_386.go b/vendor/modernc.org/libc/ccgo_linux_386.go index 357c3038..60315bd5 100644 --- a/vendor/modernc.org/libc/ccgo_linux_386.go +++ b/vendor/modernc.org/libc/ccgo_linux_386.go @@ -1,4 +1,4 @@ -// Code generated for linux/386 by 'gcc --package-name=libc --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -isystem -mlong-double-64 -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/i386 -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -march=i486 -mtune=generic -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/setjmp/longjmp.lo.go obj/src/setjmp/setjmp.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memcpy.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/src/unistd/ualarm.lo.go obj/src/unistd/unlink.lo.go obj/src/unistd/unlinkat.lo.go obj/src/unistd/usleep.lo.go obj/src/unistd/write.lo.go obj/src/unistd/writev.lo.go obj/compat/time32/__xstat.lo.go obj/compat/time32/adjtime32.lo.go obj/compat/time32/adjtimex_time32.lo.go obj/compat/time32/clock_adjtime32.lo.go obj/compat/time32/clock_getres_time32.lo.go obj/compat/time32/clock_gettime32.lo.go obj/compat/time32/clock_nanosleep_time32.lo.go obj/compat/time32/clock_settime32.lo.go obj/compat/time32/ctime32.lo.go obj/compat/time32/ctime32_r.lo.go obj/compat/time32/difftime32.lo.go obj/compat/time32/fstat_time32.lo.go obj/compat/time32/fstatat_time32.lo.go obj/compat/time32/ftime32.lo.go obj/compat/time32/futimens_time32.lo.go obj/compat/time32/futimes_time32.lo.go obj/compat/time32/futimesat_time32.lo.go obj/compat/time32/getitimer_time32.lo.go obj/compat/time32/getrusage_time32.lo.go obj/compat/time32/gettimeofday_time32.lo.go obj/compat/time32/gmtime32.lo.go obj/compat/time32/gmtime32_r.lo.go obj/compat/time32/localtime32.lo.go obj/compat/time32/localtime32_r.lo.go obj/compat/time32/lstat_time32.lo.go obj/compat/time32/lutimes_time32.lo.go obj/compat/time32/mktime32.lo.go obj/compat/time32/nanosleep_time32.lo.go obj/compat/time32/ppoll_time32.lo.go obj/compat/time32/pselect_time32.lo.go obj/compat/time32/recvmmsg_time32.lo.go obj/compat/time32/select_time32.lo.go obj/compat/time32/semtimedop_time32.lo.go obj/compat/time32/setitimer_time32.lo.go obj/compat/time32/settimeofday_time32.lo.go obj/compat/time32/sigtimedwait_time32.lo.go obj/compat/time32/stat_time32.lo.go obj/compat/time32/stime32.lo.go obj/compat/time32/time32.lo.go obj/compat/time32/time32gm.lo.go obj/compat/time32/timer_gettime32.lo.go obj/compat/time32/timer_settime32.lo.go obj/compat/time32/timerfd_gettime32.lo.go obj/compat/time32/timerfd_settime32.lo.go obj/compat/time32/timespec_get_time32.lo.go obj/compat/time32/utime_time32.lo.go obj/compat/time32/utimensat_time32.lo.go obj/compat/time32/utimes_time32.lo.go obj/compat/time32/wait3_time32.lo.go obj/compat/time32/wait4_time32.lo.go -lgcc -lgcc_eh', DO NOT EDIT. +// Code generated for linux/386 by 'gcc --package-name=libc --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -isystem -hide pread,pwrite -mlong-double-64 -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/i386 -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -march=i486 -mtune=generic -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/setjmp/longjmp.lo.go obj/src/setjmp/setjmp.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memcpy.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/src/unistd/ualarm.lo.go obj/src/unistd/unlink.lo.go obj/src/unistd/unlinkat.lo.go obj/src/unistd/usleep.lo.go obj/src/unistd/write.lo.go obj/src/unistd/writev.lo.go obj/compat/time32/__xstat.lo.go obj/compat/time32/adjtime32.lo.go obj/compat/time32/adjtimex_time32.lo.go obj/compat/time32/clock_adjtime32.lo.go obj/compat/time32/clock_getres_time32.lo.go obj/compat/time32/clock_gettime32.lo.go obj/compat/time32/clock_nanosleep_time32.lo.go obj/compat/time32/clock_settime32.lo.go obj/compat/time32/ctime32.lo.go obj/compat/time32/ctime32_r.lo.go obj/compat/time32/difftime32.lo.go obj/compat/time32/fstat_time32.lo.go obj/compat/time32/fstatat_time32.lo.go obj/compat/time32/ftime32.lo.go obj/compat/time32/futimens_time32.lo.go obj/compat/time32/futimes_time32.lo.go obj/compat/time32/futimesat_time32.lo.go obj/compat/time32/getitimer_time32.lo.go obj/compat/time32/getrusage_time32.lo.go obj/compat/time32/gettimeofday_time32.lo.go obj/compat/time32/gmtime32.lo.go obj/compat/time32/gmtime32_r.lo.go obj/compat/time32/localtime32.lo.go obj/compat/time32/localtime32_r.lo.go obj/compat/time32/lstat_time32.lo.go obj/compat/time32/lutimes_time32.lo.go obj/compat/time32/mktime32.lo.go obj/compat/time32/nanosleep_time32.lo.go obj/compat/time32/ppoll_time32.lo.go obj/compat/time32/pselect_time32.lo.go obj/compat/time32/recvmmsg_time32.lo.go obj/compat/time32/select_time32.lo.go obj/compat/time32/semtimedop_time32.lo.go obj/compat/time32/setitimer_time32.lo.go obj/compat/time32/settimeofday_time32.lo.go obj/compat/time32/sigtimedwait_time32.lo.go obj/compat/time32/stat_time32.lo.go obj/compat/time32/stime32.lo.go obj/compat/time32/time32.lo.go obj/compat/time32/time32gm.lo.go obj/compat/time32/timer_gettime32.lo.go obj/compat/time32/timer_settime32.lo.go obj/compat/time32/timerfd_gettime32.lo.go obj/compat/time32/timerfd_settime32.lo.go obj/compat/time32/timespec_get_time32.lo.go obj/compat/time32/utime_time32.lo.go obj/compat/time32/utimensat_time32.lo.go obj/compat/time32/utimes_time32.lo.go obj/compat/time32/wait3_time32.lo.go obj/compat/time32/wait4_time32.lo.go -lgcc -lgcc_eh', DO NOT EDIT. //go:build linux && 386 @@ -9,10 +9,8 @@ import ( "unsafe" ) -var ( - _ reflect.Type - _ unsafe.Pointer -) +var _ reflect.Type +var _ unsafe.Pointer const BIG_ENDIAN = 4321 const BYTE_ORDER = 1234 @@ -558,8 +556,8 @@ func ___frexp_exp(tls *TLS, x float64, expt uintptr) (r float64) { */ exp_x = Xexp(tls, x-_kln2) hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&exp_x)) >> int32(32)) - *(*int32)(unsafe.Pointer(expt)) = int32(hx>>Int32FromInt32(20) - uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) - v1 = uint64(hx&Uint32FromInt32(0xfffff)|uint32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(20) - Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) + v1 = uint64(hx&Uint32FromInt32(0xfffff)|Uint32FromInt32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) - v1 = hx&uint32(0x7fffff) | uint32((Int32FromInt32(0x7f)+Int32FromInt32(127))<>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) + v1 = hx&uint32(0x7fffff) | Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(127))<> Int32FromInt32(63)) + zineg = Int32FromUint64(v1 >> Int32FromInt32(63)) z = Xcacos(tls, z) if zineg != 0 { v3 = [2]float64{ @@ -786,7 +784,7 @@ func Xcacoshf(tls *TLS, z complex64) (r complex64) { v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: - zineg = int32(v1 >> Int32FromInt32(31)) + zineg = Int32FromUint32(v1 >> Int32FromInt32(31)) z = Xcacosf(tls, z) if zineg != 0 { v3 = [2]float32{ @@ -1167,11 +1165,11 @@ func Xccosh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -1328,8 +1326,8 @@ func Xccoshf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -1923,11 +1921,11 @@ func Xcsinh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -2085,8 +2083,8 @@ func Xcsinhf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -2281,7 +2279,7 @@ _9: v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v12 = [2]float64{ 0: Xfabs(tls, b-b), 1: Xcopysign(tls, a, b), @@ -2401,7 +2399,7 @@ _9: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v12 = [2]float32{ 0: Xfabsf(tls, b-b), 1: Xcopysignf(tls, a, b), @@ -3163,14 +3161,14 @@ func Xconfstr(tls *TLS, name int32, buf uintptr, len1 Tsize_t) (r Tsize_t) { if !(name != 0) { s = __ccgo_ts + 1 } else { - if uint32(name) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { + if Uint32FromInt32(name) & ^Uint32FromUint32(4) != uint32(1) && Uint32FromInt32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uint32(0) } } // snprintf is overkill but avoid wasting code size to implement // this completely useless function and its truncation semantics - return uint32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) + return Uint32FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) } const ARG_MAX = 131072 @@ -3290,7 +3288,7 @@ func Xfpathconf(tls *TLS, fd int32, name int32) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - if uint32(name) >= Uint32FromInt64(42)/Uint32FromInt64(2) { + if Uint32FromInt32(name) >= Uint32FromInt64(42)/Uint32FromInt64(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -7574,7 +7572,7 @@ func Xsysconf(tls *TLS, name int32) (r int32) { var _ /* set at bp+16 */ [128]uint8 var _ /* si at bp+144 */ Tsysinfo _, _, _, _, _, _, _, _ = cnt, i, mem, val, v1, v3, v6, p5 - if uint32(name) >= Uint32FromInt64(502)/Uint32FromInt64(2) || !(_values1[name] != 0) { + if Uint32FromInt32(name) >= Uint32FromInt64(502)/Uint32FromInt64(2) || !(_values1[name] != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } else { @@ -7591,11 +7589,11 @@ func Xsysconf(tls *TLS, name int32) (r int32) { } else { v1 = (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur } - return int32(v1) + return Int32FromUint64(v1) } } } - switch int32(uint8(_values1[name])) { + switch Int32FromUint8(Uint8FromInt16(_values1[name])) { case (-Int32FromInt32(256) | Int32FromInt32(1)) & Int32FromInt32(255): return int32(200809) case (-Int32FromInt32(256) | Int32FromInt32(2)) & Int32FromInt32(255): @@ -7614,12 +7612,12 @@ func Xsysconf(tls *TLS, name int32) (r int32) { *(*[128]uint8)(unsafe.Pointer(bp + 16)) = [128]uint8{ 0: uint8(1), } - X__syscall3(tls, int32(SYS_sched_getaffinity), Int32FromInt32(0), int32(Uint32FromInt64(128)), int32(bp+16)) + X__syscall3(tls, int32(SYS_sched_getaffinity), Int32FromInt32(0), Int32FromUint32(Uint32FromInt64(128)), int32(bp+16)) v3 = Int32FromInt32(0) cnt = v3 i = v3 for { - if !(uint32(i) < uint32(128)) { + if !(Uint32FromInt32(i) < uint32(128)) { break } for { @@ -7630,7 +7628,7 @@ func Xsysconf(tls *TLS, name int32) (r int32) { _4: ; p5 = bp + 16 + uintptr(i) - *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (int32((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (Int32FromUint8((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) cnt++ } goto _2 @@ -7658,11 +7656,11 @@ func Xsysconf(tls *TLS, name int32) (r int32) { } else { v6 = mem } - return int32(v6) + return Int32FromUint64(v6) case (-Int32FromInt32(256) | Int32FromInt32(12)) & Int32FromInt32(255): fallthrough case (-Int32FromInt32(256) | Int32FromInt32(13)) & Int32FromInt32(255): - val = int32(X__getauxval(tls, uint32(AT_MINSIGSTKSZ))) + val = Int32FromUint32(X__getauxval(tls, uint32(AT_MINSIGSTKSZ))) if val < int32(MINSIGSTKSZ) { val = int32(MINSIGSTKSZ) } @@ -9292,14 +9290,14 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags * Prefix "$2x$": bug = 1, safety = 0 * Prefix "$2y$": bug = 0, safety = 0 */ - bug = uint32(int32(flags) & int32(1)) + bug = Uint32FromInt32(Int32FromUint8(flags) & int32(1)) safety = uint32(flags) & uint32(2) << int32(15) v1 = Uint32FromInt32(0) diff = v1 sign = v1 i = uint32(0) for { - if !(i < uint32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { + if !(i < Uint32FromInt32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { break } v3 = Uint32FromInt32(0) @@ -9311,9 +9309,9 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags break } *(*TBF_word)(unsafe.Pointer(bp)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(uint8(*(*int8)(unsafe.Pointer(ptr)))) /* correct */ + *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(Uint8FromInt8(*(*int8)(unsafe.Pointer(ptr)))) /* correct */ *(*TBF_word)(unsafe.Pointer(bp + 1*4)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(*(*int8)(unsafe.Pointer(ptr))) /* bug */ + *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= Uint32FromInt8(*(*int8)(unsafe.Pointer(ptr))) /* bug */ /* * Sign extension in the first char has no effect - nothing to overwrite yet, * and those extra 24 bits will be fully shifted out of the 32-bit word. For @@ -9393,7 +9391,7 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w } } _, _, _, _, _, _, _, _, _, _, _, _, _ = L, L1, R, count, done, i, ptr, tmp1, tmp2, tmp3, tmp4, v1, v6 - if int32(*(*int8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*int8)(unsafe.Pointer(setting + 1))) != int32('2') || uint32(int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*int8)(unsafe.Pointer(setting + 3))) != int32('$') || uint32(int32(*(*int8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || uint32(int32(*(*int8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*int8)(unsafe.Pointer(setting + 6))) != int32('$') { + if int32(*(*int8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*int8)(unsafe.Pointer(setting + 1))) != int32('2') || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*int8)(unsafe.Pointer(setting + 3))) != int32('$') || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*int8)(unsafe.Pointer(setting + 6))) != int32('$') { return UintptrFromInt32(0) } count = Uint32FromInt32(1) << ((int32(*(*int8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (int32(*(*int8)(unsafe.Pointer(setting + 5))) - int32('0'))) @@ -9493,8 +9491,8 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w ; i += int32(2) } - Xmemcpy(tls, output, setting, uint32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) - *(*int8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = int8(_BF_itoa64[int32(_BF_atoi64[int32(*(*int8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)]) + Xmemcpy(tls, output, setting, Uint32FromInt32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) + *(*int8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = Int8FromUint8(_BF_itoa64[Int32FromUint8(_BF_atoi64[int32(*(*int8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)]) /* This has to be bug-compatible with the original implementation, so * only encode 23 of the 24 bytes. :-) */ _BF_swap(tls, bp+4240, int32(6)) @@ -9565,7 +9563,7 @@ func X__crypt_blowfish(tls *TLS, key uintptr, setting uintptr, output uintptr) ( Xmemset(tls, bp+30, int32(0x55), uint32(63)) *(*int8)(unsafe.Pointer(bp + 30 + uintptr(Uint32FromInt64(63)-Uint32FromInt32(1)))) = 0 p = _BF_crypt(tls, test_key, bp, bp+30, uint32(1)) - ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, uint32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, uint32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) + ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, Uint32FromInt32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, Uint32FromInt32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) k = __ccgo_ts + 58 _BF_set_key(tls, k, bp+96, bp+168, uint8(2)) /* $2a$ */ _BF_set_key(tls, k, bp+240, bp+312, uint8(4)) /* $2y$ */ @@ -11375,7 +11373,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { } } retval &= int32(0x3f) - return uint32(retval) + return Uint32FromInt32(retval) } // C documentation @@ -11385,7 +11383,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { // * containing characters that would violate the passwd file format. // */ func _ascii_is_unsafe(tls *TLS, ch uint8) (r int32) { - return BoolInt32(!(ch != 0) || int32(ch) == int32('\n') || int32(ch) == int32(':')) + return BoolInt32(!(ch != 0) || Int32FromUint8(ch) == int32('\n') || Int32FromUint8(ch) == int32(':')) } func _setup_salt(tls *TLS, salt Tuint32_t) (r Tuint32_t) { @@ -11636,13 +11634,13 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin for q <= bp+128+uintptr(Uint32FromInt64(8)-Uint32FromInt32(1)) { v1 = q q++ - *(*uint8)(unsafe.Pointer(v1)) = uint8(int32(*(*uint8)(unsafe.Pointer(key))) << int32(1)) + *(*uint8)(unsafe.Pointer(v1)) = Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(key))) << int32(1)) if *(*uint8)(unsafe.Pointer(key)) != 0 { key++ } } X__des_setkey(tls, bp+128, bp) - if int32(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { /* * "new"-style: * setting - underscore, 4 chars of count, 4 chars of salt @@ -11654,8 +11652,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(5)) { break } - value = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } count |= value << ((i - uint32(1)) * uint32(6)) @@ -11673,8 +11671,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(9)) { break } - value1 = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value1]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value1 = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value1]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } salt |= value1 << ((i - uint32(5)) * uint32(6)) @@ -11698,7 +11696,7 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin p4 = v5 v6 = key key++ - *(*uint8)(unsafe.Pointer(p4)) = uint8(int32(*(*uint8)(unsafe.Pointer(p4))) ^ int32(*(*uint8)(unsafe.Pointer(v6)))< uint32(KEY_MAX) { return uintptr(0) } @@ -12216,7 +12214,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt if !(i < uint32(5)) { break } - p = _to64(tls, p, uint32(int32((*(*[16]uint8)(unsafe.Pointer(bp + 88)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm)) + uintptr(i)*3))])< uint32(KEY_MAX1) { return uintptr(0) } @@ -12640,7 +12638,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui * the host's value of ULONG_MAX. */ salt += uintptr(Uint32FromInt64(8) - Uint32FromInt32(1)) - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(salt)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(salt)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return uintptr(0) } u = Xstrtoul(tls, salt, bp+220, int32(10)) @@ -12720,7 +12718,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha256_init(tls, bp) i = uint32(0) for { - if !(i < uint32(int32(16)+int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { + if !(i < Uint32FromInt32(int32(16)+Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { break } _sha256_update(tls, bp, salt, slen) @@ -12767,13 +12765,13 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(10)) { break } - p = _to641(tls, p, uint32(int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm1)) + uintptr(i)*3))])<= 0) { break } - *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= uint32(int32(*(*int8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j + *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j goto _2 _2: ; @@ -13582,7 +13580,7 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } v6 = p p++ - *(*int8)(unsafe.Pointer(v6)) = int8((*(*[2]Tuint32_t)(unsafe.Pointer(bp + 128)))[i] >> j & uint32(1)) + *(*int8)(unsafe.Pointer(v6)) = Int8FromUint32((*(*[2]Tuint32_t)(unsafe.Pointer(bp + 128)))[i] >> j & uint32(1)) goto _5 _5: ; @@ -13596,134 +13594,134 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } var _table = [384]uint16{ - 128: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 129: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 130: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 131: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 132: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 133: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 134: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 135: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 136: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 137: uint16((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 138: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 139: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 140: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 141: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 142: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 143: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 144: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 145: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 146: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 147: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 148: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 149: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 150: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 151: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 152: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 153: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 154: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 155: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 156: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 157: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 158: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 159: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 160: uint16((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 161: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 162: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 163: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 164: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 165: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 166: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 167: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 168: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 169: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 170: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 171: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 172: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 173: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 174: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 175: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 176: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 177: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 178: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 179: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 180: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 181: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 182: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 183: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 184: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 185: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 186: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 187: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 188: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 189: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 190: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 191: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 192: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 193: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 194: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 195: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 196: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 197: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 198: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 199: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 200: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 201: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 202: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 203: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 204: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 205: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 206: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 207: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 208: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 209: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 210: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 211: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 212: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 213: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 214: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 215: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 216: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 217: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 218: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 219: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 220: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 221: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 222: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 223: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 224: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 225: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 226: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 227: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 228: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 229: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 230: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 231: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 232: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 233: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 234: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 235: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 236: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 237: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 238: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 239: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 240: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 241: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 242: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 243: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 244: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 245: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 246: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 247: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 248: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 249: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 250: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 251: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 252: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 253: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 254: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 255: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 128: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 129: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 130: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 131: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 132: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 133: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 134: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 135: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 136: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 137: Uint16FromInt32((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 138: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 139: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 140: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 141: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 142: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 143: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 144: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 145: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 146: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 147: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 148: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 149: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 150: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 151: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 152: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 153: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 154: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 155: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 156: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 157: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 158: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 159: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 160: Uint16FromInt32((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 161: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 162: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 163: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 164: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 165: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 166: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 167: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 168: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 169: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 170: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 171: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 172: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 173: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 174: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 175: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 176: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 177: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 178: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 179: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 180: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 181: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 182: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 183: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 184: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 185: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 186: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 187: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 188: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 189: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 190: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 191: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 192: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 193: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 194: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 195: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 196: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 197: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 198: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 199: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 200: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 201: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 202: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 203: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 204: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 205: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 206: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 207: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 208: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 209: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 210: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 211: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 212: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 213: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 214: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 215: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 216: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 217: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 218: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 219: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 220: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 221: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 222: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 223: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 224: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 225: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 226: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 227: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 228: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 229: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 230: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 231: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 232: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 233: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 234: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 235: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 236: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 237: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 238: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 239: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 240: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 241: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 242: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 243: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 244: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 245: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 246: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 247: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 248: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 249: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 250: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 251: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 252: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 253: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 254: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 255: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), } var _ptable = uintptr(unsafe.Pointer(&_table)) + uintptr(128)*2 @@ -14062,7 +14060,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) { } else { v1 = int32(1) } - return uint32(v1) + return Uint32FromInt32(v1) } var _table1 = [384]Tint32_t{ @@ -14350,7 +14348,7 @@ func Xisalnum(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0) + return BoolInt32(BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0) } func X__isalnum_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14374,7 +14372,7 @@ func Xisalpha(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14430,7 +14428,7 @@ func Xiscntrl(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c) < uint32(0x20) || c == int32(0x7f)) + return BoolInt32(Uint32FromInt32(c) < uint32(0x20) || c == int32(0x7f)) } func X__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14454,7 +14452,7 @@ func Xisdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('0') < uint32(10)) + return BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14478,7 +14476,7 @@ func Xisgraph(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) } func X__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14502,7 +14500,7 @@ func Xislower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14526,7 +14524,7 @@ func Xisprint(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x20) < uint32(0x5f)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14550,7 +14548,7 @@ func Xispunct(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) } func X__ispunct_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14574,7 +14572,7 @@ func Xisspace(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(c == int32(' ') || uint32(c)-uint32('\t') < uint32(5)) + return BoolInt32(c == int32(' ') || Uint32FromInt32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14598,7 +14596,7 @@ func Xisupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('A') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -17491,7 +17489,7 @@ func Xiswalpha(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table3[uint32(int32(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table3[Uint32FromInt32(Int32FromUint8(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } if wc < uint32(0x2fffe) { return int32(1) @@ -17520,7 +17518,7 @@ func Xiswblank(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return Xisblank(tls, int32(wc)) + return Xisblank(tls, Int32FromUint32(wc)) } func X__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32) { @@ -17625,7 +17623,7 @@ func Xwctype(tls *TLS, s uintptr) (r Twctype_t) { break } if int32(*(*int8)(unsafe.Pointer(s))) == int32(*(*int8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { - return uint32(i) + return Uint32FromInt32(i) } goto _1 _1: @@ -17759,10 +17757,10 @@ func Xiswprint(tls *TLS, wc Twint_t) (r int32) { if wc < uint32(0xff) { return BoolInt32((wc+uint32(1))&uint32(0x7f) >= uint32(0x21)) } - if wc < uint32(0x2028) || wc-uint32(0x202a) < uint32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < uint32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { + if wc < uint32(0x2028) || wc-uint32(0x202a) < Uint32FromInt32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < Uint32FromInt32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { return int32(1) } - if wc-uint32(0xfffc) > uint32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { + if wc-uint32(0xfffc) > Uint32FromInt32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { return 0 } return int32(1) @@ -19342,7 +19340,7 @@ func Xiswpunct(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table4[uint32(int32(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table4[Uint32FromInt32(Int32FromUint8(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } return 0 } @@ -19379,7 +19377,7 @@ func Xiswspace(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), int32(wc)) != 0) + return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), Int32FromUint32(wc)) != 0) } var _spaces = [22]Twchar_t{ @@ -19475,7 +19473,7 @@ func Xisxdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0 || Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -19510,7 +19508,7 @@ func Xtolower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('A') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) != 0 { return c | int32(32) } return c @@ -19537,7 +19535,7 @@ func Xtoupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('a') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) != 0 { return c & int32(0x5f) } return c @@ -22343,40 +22341,40 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { var b, rt, try, v, x, xb, xn, y uint32 var c0, r, rd, v1 int32 _, _, _, _, _, _, _, _, _, _, _, _ = b, c0, r, rd, rt, try, v, x, xb, xn, y, v1 - c0 = int32(c) + c0 = Int32FromUint32(c) if c >= uint32(0x20000) { - return int32(c) + return Int32FromUint32(c) } b = c >> int32(8) c &= uint32(255) x = c / uint32(3) y = c % uint32(3) /* lookup entry in two-level base-6 table */ - v = uint32(_tab1[uint32(int32(_tab1[b])*int32(86))+x]) - v = v * uint32(_mt[y]) >> int32(11) % uint32(6) + v = uint32(_tab1[Uint32FromInt32(Int32FromUint8(_tab1[b])*int32(86))+x]) + v = v * Uint32FromInt32(_mt[y]) >> int32(11) % uint32(6) /* use the bit vector out of the tables as an index into * a block-specific set of rules and decode the rule into * a type and a case-mapping delta. */ r = _rules[uint32(_rulebases[b])+v] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) /* rules 0/1 are simple lower/upper case with a delta. * apply according to desired mapping direction. */ if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* binary search. endpoints of the binary search for * this block are stored in the rule delta field. */ - xn = uint32(rd & int32(0xff)) - xb = uint32(rd) >> int32(8) + xn = Uint32FromInt32(rd & int32(0xff)) + xb = Uint32FromInt32(rd) >> int32(8) for xn != 0 { try = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2))) if try == c { r = _rules[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2 + 1))] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* Hard-coded for the four exceptional titlecase */ if dir != 0 { @@ -22408,7 +22406,7 @@ func Xtowlower(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, 0)) + return Uint32FromInt32(_casemap(tls, wc, 0)) } func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { @@ -22416,7 +22414,7 @@ func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, int32(1))) + return Uint32FromInt32(_casemap(tls, wc, int32(1))) } func X__towupper_l(tls *TLS, c Twint_t, l Tlocale_t) (r Twint_t) { @@ -24615,7 +24613,7 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } var v1, v2 int32 _, _ = v1, v2 - if uint32(wc) < uint32(0xff) { + if Uint32FromInt32(wc) < uint32(0xff) { if (wc+int32(1))&int32(0x7f) >= int32(0x21) { v1 = int32(1) } else { @@ -24628,11 +24626,11 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } return v1 } - if uint32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { - if int32(_table5[int32(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Uint32FromInt32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { + if Int32FromUint8(_table5[Int32FromUint8(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return 0 } - if int32(_wtable[int32(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Int32FromUint8(_wtable[Int32FromUint8(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return int32(2) } return int32(1) @@ -24640,10 +24638,10 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { if wc&int32(0xfffe) == int32(0xfffe) { return -int32(1) } - if uint32(wc)-uint32(0x20000) < uint32(0x20000) { + if Uint32FromInt32(wc)-uint32(0x20000) < uint32(0x20000) { return int32(2) } - if wc == int32(0xe0001) || uint32(wc)-uint32(0xe0020) < uint32(0x5f) || uint32(wc)-uint32(0xe0100) < uint32(0xef) { + if wc == int32(0xe0001) || Uint32FromInt32(wc)-uint32(0xe0020) < uint32(0x5f) || Uint32FromInt32(wc)-uint32(0xe0100) < uint32(0xef) { return 0 } return int32(1) @@ -24983,7 +24981,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { var len1 int32 _, _ = de, len1 if (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos >= (*TDIR)(unsafe.Pointer(dir)).Fbuf_end { - len1 = X__syscall3(tls, int32(SYS_getdents64), (*TDIR)(unsafe.Pointer(dir)).Ffd, int32(dir+24), int32(Uint32FromInt64(2048))) + len1 = X__syscall3(tls, int32(SYS_getdents64), (*TDIR)(unsafe.Pointer(dir)).Ffd, int32(dir+24), Int32FromUint32(Uint32FromInt64(2048))) if len1 <= 0 { if len1 < 0 && len1 != -int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = -len1 @@ -24994,7 +24992,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos = 0 } de = dir + 24 + uintptr((*TDIR)(unsafe.Pointer(dir)).Fbuf_pos) - *(*int32)(unsafe.Pointer(dir + 12)) += int32((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) + *(*int32)(unsafe.Pointer(dir + 12)) += Int32FromUint16((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) (*TDIR)(unsafe.Pointer(dir)).Ftell = (*Tdirent)(unsafe.Pointer(de)).Fd_off return de } @@ -25109,7 +25107,7 @@ func Xscandir(tls *TLS, path uintptr, res uintptr, sel uintptr, cmp uintptr) (r Xqsort(tls, names, cnt, uint32(4), cmp) } *(*uintptr)(unsafe.Pointer(res)) = names - return int32(cnt) + return Int32FromUint32(cnt) } func Xseekdir(tls *TLS, dir uintptr, off int32) { @@ -25231,7 +25229,7 @@ func Xgetenv(tls *TLS, name uintptr) (r uintptr) { var e uintptr var l Tsize_t _, _ = e, l - l = uint32(int32(X__strchrnul(tls, name, int32('='))) - int32(name)) + l = Uint32FromInt32(int32(X__strchrnul(tls, name, int32('='))) - int32(name)) if l != 0 && !(*(*int8)(unsafe.Pointer(name + uintptr(l))) != 0) && Xenviron != 0 { e = Xenviron for { @@ -25321,7 +25319,7 @@ func Xputenv(tls *TLS, s uintptr) (r int32) { } var l Tsize_t _ = l - l = uint32(int32(X__strchrnul(tls, s, int32('='))) - int32(s)) + l = Uint32FromInt32(int32(X__strchrnul(tls, s, int32('='))) - int32(s)) if !(l != 0) || !(*(*int8)(unsafe.Pointer(s + uintptr(l))) != 0) { return Xunsetenv(tls, s) } @@ -25410,7 +25408,7 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) (r int32) { var v2 bool _, _, _, _, _ = l1, l2, s, v1, v2 if v2 = !(var1 != 0); !v2 { - v1 = uint32(int32(X__strchrnul(tls, var1, int32('='))) - int32(var1)) + v1 = Uint32FromInt32(int32(X__strchrnul(tls, var1, int32('='))) - int32(var1)) l1 = v1 } if v2 || !(v1 != 0) || *(*int8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { @@ -25442,7 +25440,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { var e, eo, v2 uintptr var l Tsize_t _, _, _, _ = e, eo, l, v2 - l = uint32(int32(X__strchrnul(tls, name, int32('='))) - int32(name)) + l = Uint32FromInt32(int32(X__strchrnul(tls, name, int32('='))) - int32(name)) if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) @@ -25777,7 +25775,7 @@ func X__strerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { } var s uintptr _ = s - if uint32(e) >= Uint32FromInt64(264)/Uint32FromInt64(2) { + if Uint32FromInt32(e) >= Uint32FromInt64(264)/Uint32FromInt64(2) { e = 0 } s = uintptr(unsafe.Pointer(&_errmsgstr)) + uintptr(_errmsgidx[e]) @@ -25906,7 +25904,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { arg |= uint32(O_LARGEFILE) } if cmd == int32(F_SETLKW) { - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg)), 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg)), 0, 0, 0))) } if cmd == int32(F_GETOWN) { ret = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_GETOWN_EX), int32(bp)) @@ -25914,7 +25912,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg))) } if ret != 0 { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } if (*(*Tf_owner_ex)(unsafe.Pointer(bp))).Ftype1 == int32(F_OWNER_PGRP) { v1 = -(*(*Tf_owner_ex)(unsafe.Pointer(bp))).Fpid @@ -25924,25 +25922,25 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return v1 } if cmd == int32(F_DUPFD_CLOEXEC) { - ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD_CLOEXEC), int32(arg)) + ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD_CLOEXEC), Int32FromUint32(arg)) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall3(tls, int32(SYS_fcntl64), ret1, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } - return X__syscall_ret(tls, uint32(ret1)) + return X__syscall_ret(tls, Uint32FromInt32(ret1)) } ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD_CLOEXEC), Int32FromInt32(0)) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall1(tls, int32(SYS_close), ret1) } - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } - ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD), int32(arg)) + ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD), Int32FromUint32(arg)) if ret1 >= 0 { X__syscall3(tls, int32(SYS_fcntl64), ret1, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } - return X__syscall_ret(tls, uint32(ret1)) + return X__syscall_ret(tls, Uint32FromInt32(ret1)) } switch cmd { case int32(F_SETLK): @@ -25952,9 +25950,9 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { case int32(F_GETOWN_EX): fallthrough case int32(F_SETOWN_EX): - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg))))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg))))) default: - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, int32(arg)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, Int32FromUint32(arg)))) } return r } @@ -25974,11 +25972,11 @@ func Xopen(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) { mode = VaUint32(&ap) _ = ap } - fd = ___syscall_cp(tls, int32(SYS_open), int32(filename), flags|Int32FromInt32(O_LARGEFILE), int32(mode), 0, 0, 0) + fd = ___syscall_cp(tls, int32(SYS_open), int32(filename), flags|Int32FromInt32(O_LARGEFILE), Int32FromUint32(mode), 0, 0, 0) if fd >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } - return X__syscall_ret(tls, uint32(fd)) + return X__syscall_ret(tls, Uint32FromInt32(fd)) } func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r int32) { @@ -25995,7 +25993,7 @@ func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r i mode = VaUint32(&ap) _ = ap } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_openat), fd, int32(filename), flags|Int32FromInt32(O_LARGEFILE), int32(mode), 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_openat), fd, int32(filename), flags|Int32FromInt32(O_LARGEFILE), Int32FromUint32(mode), 0, 0))) } func Xposix_fadvise(tls *TLS, fd int32, base Toff_t, len1 Toff_t, advice int32) (r int32) { @@ -26179,7 +26177,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v3 = f + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26190,18 +26188,18 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v6 = f + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__shgetc(tls, f) } c = v4 - if uint32(c-int32('0')) >= uint32(10) && pok != 0 { + if Uint32FromInt32(c-int32('0')) >= uint32(10) && pok != 0 { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } } } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -26209,7 +26207,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } x = 0 for { - if !(uint32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { break } x = int32(10)*x + c - int32('0') @@ -26220,7 +26218,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v12 = f + 4 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__shgetc(tls, f) } @@ -26228,7 +26226,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } y = int64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { break } y = int64(10)*y + int64(c) - int64('0') @@ -26239,14 +26237,14 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v16 = f + 4 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 } for { - if !(uint32(c-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10)) { break } goto _17 @@ -26256,7 +26254,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v20 = f + 4 v19 = *(*uintptr)(unsafe.Pointer(v20)) *(*uintptr)(unsafe.Pointer(v20))++ - v18 = int32(*(*uint8)(unsafe.Pointer(v19))) + v18 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) } else { v18 = X__shgetc(tls, f) } @@ -26309,7 +26307,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } @@ -26321,7 +26319,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v8 = f + 4 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ - v6 = int32(*(*uint8)(unsafe.Pointer(v7))) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v7))) } else { v6 = X__shgetc(tls, f) } @@ -26339,7 +26337,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v11 = f + 4 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } @@ -26348,7 +26346,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0] = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || c == int32('.')) { break } if c == int32('.') { @@ -26364,9 +26362,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, lnz = int32(dc) } if j != 0 { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(c) - uint32('0') + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + Uint32FromInt32(c) - uint32('0') } else { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(c - int32('0')) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = Uint32FromInt32(c - int32('0')) } j++ v13 = j @@ -26390,7 +26388,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v16 = f + 4 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } @@ -26498,9 +26496,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % uint32(p10) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/uint32(p10) + carry - carry = uint32(int32(1000000000)/p10) * tmp + tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % Uint32FromInt32(p10) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/Uint32FromInt32(p10) + carry + carry = Uint32FromInt32(int32(1000000000)/p10) * tmp if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) rp -= int32(9) @@ -26587,9 +26585,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp2 = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] & uint32(int32(1)<>sh + carry2 - carry2 = uint32(Int32FromInt32(1000000000)>>sh) * tmp2 + carry2 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh) * tmp2 if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) i-- @@ -26722,7 +26720,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v3 = f + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26740,7 +26738,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v7 = f + 4 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__shgetc(tls, f) } @@ -26752,7 +26750,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v10 = f + 4 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26771,7 +26769,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v14 = f + 4 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26780,7 +26778,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } } for { - if !(uint32(c-int32('0')) < uint32(10) || uint32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { break } if c == int32('.') { @@ -26797,7 +26795,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 d = c - int32('0') } if dc < int64(8) { - x = x*uint32(16) + uint32(d) + x = x*uint32(16) + Uint32FromInt32(d) } else { if dc < int64(Int32FromInt32(LDBL_MANT_DIG)/Int32FromInt32(4)+Int32FromInt32(1)) { scale /= Float64FromInt32(16) @@ -26818,7 +26816,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v18 = f + 4 v17 = *(*uintptr)(unsafe.Pointer(v18)) *(*uintptr)(unsafe.Pointer(v18))++ - v16 = int32(*(*uint8)(unsafe.Pointer(v17))) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) } else { v16 = X__shgetc(tls, f) } @@ -26938,14 +26936,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -26958,7 +26956,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v10 = f + 4 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26974,7 +26972,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v14 = f + 4 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -27018,7 +27016,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v21 = f + 4 v20 = *(*uintptr)(unsafe.Pointer(v21)) *(*uintptr)(unsafe.Pointer(v21))++ - v19 = int32(*(*uint8)(unsafe.Pointer(v20))) + v19 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v20))) } else { v19 = X__shgetc(tls, f) } @@ -27035,7 +27033,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v24 = f + 4 v23 = *(*uintptr)(unsafe.Pointer(v24)) *(*uintptr)(unsafe.Pointer(v24))++ - v22 = int32(*(*uint8)(unsafe.Pointer(v23))) + v22 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) } else { v22 = X__shgetc(tls, f) } @@ -27051,12 +27049,12 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v29 = f + 4 v28 = *(*uintptr)(unsafe.Pointer(v29)) *(*uintptr)(unsafe.Pointer(v29))++ - v27 = int32(*(*uint8)(unsafe.Pointer(v28))) + v27 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) } else { v27 = X__shgetc(tls, f) } c = v27 - if uint32(c-int32('0')) < uint32(10) || uint32(c-int32('A')) < uint32(26) || uint32(c-int32('a')) < uint32(26) || c == int32('_') { + if Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c-int32('A')) < uint32(26) || Uint32FromInt32(c-int32('a')) < uint32(26) || c == int32('_') { goto _26 } if c == int32(')') { @@ -27101,7 +27099,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v36 = f + 4 v35 = *(*uintptr)(unsafe.Pointer(v36)) *(*uintptr)(unsafe.Pointer(v36))++ - v34 = int32(*(*uint8)(unsafe.Pointer(v35))) + v34 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v35))) } else { v34 = X__shgetc(tls, f) } @@ -27121,55 +27119,55 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { // // /* Lookup table for digit values. -1==255>=36 -> invalid */ var _table6 = [257]uint8{ - 0: uint8(-Int32FromInt32(1)), - 1: uint8(-Int32FromInt32(1)), - 2: uint8(-Int32FromInt32(1)), - 3: uint8(-Int32FromInt32(1)), - 4: uint8(-Int32FromInt32(1)), - 5: uint8(-Int32FromInt32(1)), - 6: uint8(-Int32FromInt32(1)), - 7: uint8(-Int32FromInt32(1)), - 8: uint8(-Int32FromInt32(1)), - 9: uint8(-Int32FromInt32(1)), - 10: uint8(-Int32FromInt32(1)), - 11: uint8(-Int32FromInt32(1)), - 12: uint8(-Int32FromInt32(1)), - 13: uint8(-Int32FromInt32(1)), - 14: uint8(-Int32FromInt32(1)), - 15: uint8(-Int32FromInt32(1)), - 16: uint8(-Int32FromInt32(1)), - 17: uint8(-Int32FromInt32(1)), - 18: uint8(-Int32FromInt32(1)), - 19: uint8(-Int32FromInt32(1)), - 20: uint8(-Int32FromInt32(1)), - 21: uint8(-Int32FromInt32(1)), - 22: uint8(-Int32FromInt32(1)), - 23: uint8(-Int32FromInt32(1)), - 24: uint8(-Int32FromInt32(1)), - 25: uint8(-Int32FromInt32(1)), - 26: uint8(-Int32FromInt32(1)), - 27: uint8(-Int32FromInt32(1)), - 28: uint8(-Int32FromInt32(1)), - 29: uint8(-Int32FromInt32(1)), - 30: uint8(-Int32FromInt32(1)), - 31: uint8(-Int32FromInt32(1)), - 32: uint8(-Int32FromInt32(1)), - 33: uint8(-Int32FromInt32(1)), - 34: uint8(-Int32FromInt32(1)), - 35: uint8(-Int32FromInt32(1)), - 36: uint8(-Int32FromInt32(1)), - 37: uint8(-Int32FromInt32(1)), - 38: uint8(-Int32FromInt32(1)), - 39: uint8(-Int32FromInt32(1)), - 40: uint8(-Int32FromInt32(1)), - 41: uint8(-Int32FromInt32(1)), - 42: uint8(-Int32FromInt32(1)), - 43: uint8(-Int32FromInt32(1)), - 44: uint8(-Int32FromInt32(1)), - 45: uint8(-Int32FromInt32(1)), - 46: uint8(-Int32FromInt32(1)), - 47: uint8(-Int32FromInt32(1)), - 48: uint8(-Int32FromInt32(1)), + 0: Uint8FromInt32(-Int32FromInt32(1)), + 1: Uint8FromInt32(-Int32FromInt32(1)), + 2: Uint8FromInt32(-Int32FromInt32(1)), + 3: Uint8FromInt32(-Int32FromInt32(1)), + 4: Uint8FromInt32(-Int32FromInt32(1)), + 5: Uint8FromInt32(-Int32FromInt32(1)), + 6: Uint8FromInt32(-Int32FromInt32(1)), + 7: Uint8FromInt32(-Int32FromInt32(1)), + 8: Uint8FromInt32(-Int32FromInt32(1)), + 9: Uint8FromInt32(-Int32FromInt32(1)), + 10: Uint8FromInt32(-Int32FromInt32(1)), + 11: Uint8FromInt32(-Int32FromInt32(1)), + 12: Uint8FromInt32(-Int32FromInt32(1)), + 13: Uint8FromInt32(-Int32FromInt32(1)), + 14: Uint8FromInt32(-Int32FromInt32(1)), + 15: Uint8FromInt32(-Int32FromInt32(1)), + 16: Uint8FromInt32(-Int32FromInt32(1)), + 17: Uint8FromInt32(-Int32FromInt32(1)), + 18: Uint8FromInt32(-Int32FromInt32(1)), + 19: Uint8FromInt32(-Int32FromInt32(1)), + 20: Uint8FromInt32(-Int32FromInt32(1)), + 21: Uint8FromInt32(-Int32FromInt32(1)), + 22: Uint8FromInt32(-Int32FromInt32(1)), + 23: Uint8FromInt32(-Int32FromInt32(1)), + 24: Uint8FromInt32(-Int32FromInt32(1)), + 25: Uint8FromInt32(-Int32FromInt32(1)), + 26: Uint8FromInt32(-Int32FromInt32(1)), + 27: Uint8FromInt32(-Int32FromInt32(1)), + 28: Uint8FromInt32(-Int32FromInt32(1)), + 29: Uint8FromInt32(-Int32FromInt32(1)), + 30: Uint8FromInt32(-Int32FromInt32(1)), + 31: Uint8FromInt32(-Int32FromInt32(1)), + 32: Uint8FromInt32(-Int32FromInt32(1)), + 33: Uint8FromInt32(-Int32FromInt32(1)), + 34: Uint8FromInt32(-Int32FromInt32(1)), + 35: Uint8FromInt32(-Int32FromInt32(1)), + 36: Uint8FromInt32(-Int32FromInt32(1)), + 37: Uint8FromInt32(-Int32FromInt32(1)), + 38: Uint8FromInt32(-Int32FromInt32(1)), + 39: Uint8FromInt32(-Int32FromInt32(1)), + 40: Uint8FromInt32(-Int32FromInt32(1)), + 41: Uint8FromInt32(-Int32FromInt32(1)), + 42: Uint8FromInt32(-Int32FromInt32(1)), + 43: Uint8FromInt32(-Int32FromInt32(1)), + 44: Uint8FromInt32(-Int32FromInt32(1)), + 45: Uint8FromInt32(-Int32FromInt32(1)), + 46: Uint8FromInt32(-Int32FromInt32(1)), + 47: Uint8FromInt32(-Int32FromInt32(1)), + 48: Uint8FromInt32(-Int32FromInt32(1)), 50: uint8(1), 51: uint8(2), 52: uint8(3), @@ -27179,13 +27177,13 @@ var _table6 = [257]uint8{ 56: uint8(7), 57: uint8(8), 58: uint8(9), - 59: uint8(-Int32FromInt32(1)), - 60: uint8(-Int32FromInt32(1)), - 61: uint8(-Int32FromInt32(1)), - 62: uint8(-Int32FromInt32(1)), - 63: uint8(-Int32FromInt32(1)), - 64: uint8(-Int32FromInt32(1)), - 65: uint8(-Int32FromInt32(1)), + 59: Uint8FromInt32(-Int32FromInt32(1)), + 60: Uint8FromInt32(-Int32FromInt32(1)), + 61: Uint8FromInt32(-Int32FromInt32(1)), + 62: Uint8FromInt32(-Int32FromInt32(1)), + 63: Uint8FromInt32(-Int32FromInt32(1)), + 64: Uint8FromInt32(-Int32FromInt32(1)), + 65: Uint8FromInt32(-Int32FromInt32(1)), 66: uint8(10), 67: uint8(11), 68: uint8(12), @@ -27212,12 +27210,12 @@ var _table6 = [257]uint8{ 89: uint8(33), 90: uint8(34), 91: uint8(35), - 92: uint8(-Int32FromInt32(1)), - 93: uint8(-Int32FromInt32(1)), - 94: uint8(-Int32FromInt32(1)), - 95: uint8(-Int32FromInt32(1)), - 96: uint8(-Int32FromInt32(1)), - 97: uint8(-Int32FromInt32(1)), + 92: Uint8FromInt32(-Int32FromInt32(1)), + 93: Uint8FromInt32(-Int32FromInt32(1)), + 94: Uint8FromInt32(-Int32FromInt32(1)), + 95: Uint8FromInt32(-Int32FromInt32(1)), + 96: Uint8FromInt32(-Int32FromInt32(1)), + 97: Uint8FromInt32(-Int32FromInt32(1)), 98: uint8(10), 99: uint8(11), 100: uint8(12), @@ -27244,139 +27242,139 @@ var _table6 = [257]uint8{ 121: uint8(33), 122: uint8(34), 123: uint8(35), - 124: uint8(-Int32FromInt32(1)), - 125: uint8(-Int32FromInt32(1)), - 126: uint8(-Int32FromInt32(1)), - 127: uint8(-Int32FromInt32(1)), - 128: uint8(-Int32FromInt32(1)), - 129: uint8(-Int32FromInt32(1)), - 130: uint8(-Int32FromInt32(1)), - 131: uint8(-Int32FromInt32(1)), - 132: uint8(-Int32FromInt32(1)), - 133: uint8(-Int32FromInt32(1)), - 134: uint8(-Int32FromInt32(1)), - 135: uint8(-Int32FromInt32(1)), - 136: uint8(-Int32FromInt32(1)), - 137: uint8(-Int32FromInt32(1)), - 138: uint8(-Int32FromInt32(1)), - 139: uint8(-Int32FromInt32(1)), - 140: uint8(-Int32FromInt32(1)), - 141: uint8(-Int32FromInt32(1)), - 142: uint8(-Int32FromInt32(1)), - 143: uint8(-Int32FromInt32(1)), - 144: uint8(-Int32FromInt32(1)), - 145: uint8(-Int32FromInt32(1)), - 146: uint8(-Int32FromInt32(1)), - 147: uint8(-Int32FromInt32(1)), - 148: uint8(-Int32FromInt32(1)), - 149: uint8(-Int32FromInt32(1)), - 150: uint8(-Int32FromInt32(1)), - 151: uint8(-Int32FromInt32(1)), - 152: uint8(-Int32FromInt32(1)), - 153: uint8(-Int32FromInt32(1)), - 154: uint8(-Int32FromInt32(1)), - 155: uint8(-Int32FromInt32(1)), - 156: uint8(-Int32FromInt32(1)), - 157: uint8(-Int32FromInt32(1)), - 158: uint8(-Int32FromInt32(1)), - 159: uint8(-Int32FromInt32(1)), - 160: uint8(-Int32FromInt32(1)), - 161: uint8(-Int32FromInt32(1)), - 162: uint8(-Int32FromInt32(1)), - 163: uint8(-Int32FromInt32(1)), - 164: uint8(-Int32FromInt32(1)), - 165: uint8(-Int32FromInt32(1)), - 166: uint8(-Int32FromInt32(1)), - 167: uint8(-Int32FromInt32(1)), - 168: uint8(-Int32FromInt32(1)), - 169: uint8(-Int32FromInt32(1)), - 170: uint8(-Int32FromInt32(1)), - 171: uint8(-Int32FromInt32(1)), - 172: uint8(-Int32FromInt32(1)), - 173: uint8(-Int32FromInt32(1)), - 174: uint8(-Int32FromInt32(1)), - 175: uint8(-Int32FromInt32(1)), - 176: uint8(-Int32FromInt32(1)), - 177: uint8(-Int32FromInt32(1)), - 178: uint8(-Int32FromInt32(1)), - 179: uint8(-Int32FromInt32(1)), - 180: uint8(-Int32FromInt32(1)), - 181: uint8(-Int32FromInt32(1)), - 182: uint8(-Int32FromInt32(1)), - 183: uint8(-Int32FromInt32(1)), - 184: uint8(-Int32FromInt32(1)), - 185: uint8(-Int32FromInt32(1)), - 186: uint8(-Int32FromInt32(1)), - 187: uint8(-Int32FromInt32(1)), - 188: uint8(-Int32FromInt32(1)), - 189: uint8(-Int32FromInt32(1)), - 190: uint8(-Int32FromInt32(1)), - 191: uint8(-Int32FromInt32(1)), - 192: uint8(-Int32FromInt32(1)), - 193: uint8(-Int32FromInt32(1)), - 194: uint8(-Int32FromInt32(1)), - 195: uint8(-Int32FromInt32(1)), - 196: uint8(-Int32FromInt32(1)), - 197: uint8(-Int32FromInt32(1)), - 198: uint8(-Int32FromInt32(1)), - 199: uint8(-Int32FromInt32(1)), - 200: uint8(-Int32FromInt32(1)), - 201: uint8(-Int32FromInt32(1)), - 202: uint8(-Int32FromInt32(1)), - 203: uint8(-Int32FromInt32(1)), - 204: uint8(-Int32FromInt32(1)), - 205: uint8(-Int32FromInt32(1)), - 206: uint8(-Int32FromInt32(1)), - 207: uint8(-Int32FromInt32(1)), - 208: uint8(-Int32FromInt32(1)), - 209: uint8(-Int32FromInt32(1)), - 210: uint8(-Int32FromInt32(1)), - 211: uint8(-Int32FromInt32(1)), - 212: uint8(-Int32FromInt32(1)), - 213: uint8(-Int32FromInt32(1)), - 214: uint8(-Int32FromInt32(1)), - 215: uint8(-Int32FromInt32(1)), - 216: uint8(-Int32FromInt32(1)), - 217: uint8(-Int32FromInt32(1)), - 218: uint8(-Int32FromInt32(1)), - 219: uint8(-Int32FromInt32(1)), - 220: uint8(-Int32FromInt32(1)), - 221: uint8(-Int32FromInt32(1)), - 222: uint8(-Int32FromInt32(1)), - 223: uint8(-Int32FromInt32(1)), - 224: uint8(-Int32FromInt32(1)), - 225: uint8(-Int32FromInt32(1)), - 226: uint8(-Int32FromInt32(1)), - 227: uint8(-Int32FromInt32(1)), - 228: uint8(-Int32FromInt32(1)), - 229: uint8(-Int32FromInt32(1)), - 230: uint8(-Int32FromInt32(1)), - 231: uint8(-Int32FromInt32(1)), - 232: uint8(-Int32FromInt32(1)), - 233: uint8(-Int32FromInt32(1)), - 234: uint8(-Int32FromInt32(1)), - 235: uint8(-Int32FromInt32(1)), - 236: uint8(-Int32FromInt32(1)), - 237: uint8(-Int32FromInt32(1)), - 238: uint8(-Int32FromInt32(1)), - 239: uint8(-Int32FromInt32(1)), - 240: uint8(-Int32FromInt32(1)), - 241: uint8(-Int32FromInt32(1)), - 242: uint8(-Int32FromInt32(1)), - 243: uint8(-Int32FromInt32(1)), - 244: uint8(-Int32FromInt32(1)), - 245: uint8(-Int32FromInt32(1)), - 246: uint8(-Int32FromInt32(1)), - 247: uint8(-Int32FromInt32(1)), - 248: uint8(-Int32FromInt32(1)), - 249: uint8(-Int32FromInt32(1)), - 250: uint8(-Int32FromInt32(1)), - 251: uint8(-Int32FromInt32(1)), - 252: uint8(-Int32FromInt32(1)), - 253: uint8(-Int32FromInt32(1)), - 254: uint8(-Int32FromInt32(1)), - 255: uint8(-Int32FromInt32(1)), - 256: uint8(-Int32FromInt32(1)), + 124: Uint8FromInt32(-Int32FromInt32(1)), + 125: Uint8FromInt32(-Int32FromInt32(1)), + 126: Uint8FromInt32(-Int32FromInt32(1)), + 127: Uint8FromInt32(-Int32FromInt32(1)), + 128: Uint8FromInt32(-Int32FromInt32(1)), + 129: Uint8FromInt32(-Int32FromInt32(1)), + 130: Uint8FromInt32(-Int32FromInt32(1)), + 131: Uint8FromInt32(-Int32FromInt32(1)), + 132: Uint8FromInt32(-Int32FromInt32(1)), + 133: Uint8FromInt32(-Int32FromInt32(1)), + 134: Uint8FromInt32(-Int32FromInt32(1)), + 135: Uint8FromInt32(-Int32FromInt32(1)), + 136: Uint8FromInt32(-Int32FromInt32(1)), + 137: Uint8FromInt32(-Int32FromInt32(1)), + 138: Uint8FromInt32(-Int32FromInt32(1)), + 139: Uint8FromInt32(-Int32FromInt32(1)), + 140: Uint8FromInt32(-Int32FromInt32(1)), + 141: Uint8FromInt32(-Int32FromInt32(1)), + 142: Uint8FromInt32(-Int32FromInt32(1)), + 143: Uint8FromInt32(-Int32FromInt32(1)), + 144: Uint8FromInt32(-Int32FromInt32(1)), + 145: Uint8FromInt32(-Int32FromInt32(1)), + 146: Uint8FromInt32(-Int32FromInt32(1)), + 147: Uint8FromInt32(-Int32FromInt32(1)), + 148: Uint8FromInt32(-Int32FromInt32(1)), + 149: Uint8FromInt32(-Int32FromInt32(1)), + 150: Uint8FromInt32(-Int32FromInt32(1)), + 151: Uint8FromInt32(-Int32FromInt32(1)), + 152: Uint8FromInt32(-Int32FromInt32(1)), + 153: Uint8FromInt32(-Int32FromInt32(1)), + 154: Uint8FromInt32(-Int32FromInt32(1)), + 155: Uint8FromInt32(-Int32FromInt32(1)), + 156: Uint8FromInt32(-Int32FromInt32(1)), + 157: Uint8FromInt32(-Int32FromInt32(1)), + 158: Uint8FromInt32(-Int32FromInt32(1)), + 159: Uint8FromInt32(-Int32FromInt32(1)), + 160: Uint8FromInt32(-Int32FromInt32(1)), + 161: Uint8FromInt32(-Int32FromInt32(1)), + 162: Uint8FromInt32(-Int32FromInt32(1)), + 163: Uint8FromInt32(-Int32FromInt32(1)), + 164: Uint8FromInt32(-Int32FromInt32(1)), + 165: Uint8FromInt32(-Int32FromInt32(1)), + 166: Uint8FromInt32(-Int32FromInt32(1)), + 167: Uint8FromInt32(-Int32FromInt32(1)), + 168: Uint8FromInt32(-Int32FromInt32(1)), + 169: Uint8FromInt32(-Int32FromInt32(1)), + 170: Uint8FromInt32(-Int32FromInt32(1)), + 171: Uint8FromInt32(-Int32FromInt32(1)), + 172: Uint8FromInt32(-Int32FromInt32(1)), + 173: Uint8FromInt32(-Int32FromInt32(1)), + 174: Uint8FromInt32(-Int32FromInt32(1)), + 175: Uint8FromInt32(-Int32FromInt32(1)), + 176: Uint8FromInt32(-Int32FromInt32(1)), + 177: Uint8FromInt32(-Int32FromInt32(1)), + 178: Uint8FromInt32(-Int32FromInt32(1)), + 179: Uint8FromInt32(-Int32FromInt32(1)), + 180: Uint8FromInt32(-Int32FromInt32(1)), + 181: Uint8FromInt32(-Int32FromInt32(1)), + 182: Uint8FromInt32(-Int32FromInt32(1)), + 183: Uint8FromInt32(-Int32FromInt32(1)), + 184: Uint8FromInt32(-Int32FromInt32(1)), + 185: Uint8FromInt32(-Int32FromInt32(1)), + 186: Uint8FromInt32(-Int32FromInt32(1)), + 187: Uint8FromInt32(-Int32FromInt32(1)), + 188: Uint8FromInt32(-Int32FromInt32(1)), + 189: Uint8FromInt32(-Int32FromInt32(1)), + 190: Uint8FromInt32(-Int32FromInt32(1)), + 191: Uint8FromInt32(-Int32FromInt32(1)), + 192: Uint8FromInt32(-Int32FromInt32(1)), + 193: Uint8FromInt32(-Int32FromInt32(1)), + 194: Uint8FromInt32(-Int32FromInt32(1)), + 195: Uint8FromInt32(-Int32FromInt32(1)), + 196: Uint8FromInt32(-Int32FromInt32(1)), + 197: Uint8FromInt32(-Int32FromInt32(1)), + 198: Uint8FromInt32(-Int32FromInt32(1)), + 199: Uint8FromInt32(-Int32FromInt32(1)), + 200: Uint8FromInt32(-Int32FromInt32(1)), + 201: Uint8FromInt32(-Int32FromInt32(1)), + 202: Uint8FromInt32(-Int32FromInt32(1)), + 203: Uint8FromInt32(-Int32FromInt32(1)), + 204: Uint8FromInt32(-Int32FromInt32(1)), + 205: Uint8FromInt32(-Int32FromInt32(1)), + 206: Uint8FromInt32(-Int32FromInt32(1)), + 207: Uint8FromInt32(-Int32FromInt32(1)), + 208: Uint8FromInt32(-Int32FromInt32(1)), + 209: Uint8FromInt32(-Int32FromInt32(1)), + 210: Uint8FromInt32(-Int32FromInt32(1)), + 211: Uint8FromInt32(-Int32FromInt32(1)), + 212: Uint8FromInt32(-Int32FromInt32(1)), + 213: Uint8FromInt32(-Int32FromInt32(1)), + 214: Uint8FromInt32(-Int32FromInt32(1)), + 215: Uint8FromInt32(-Int32FromInt32(1)), + 216: Uint8FromInt32(-Int32FromInt32(1)), + 217: Uint8FromInt32(-Int32FromInt32(1)), + 218: Uint8FromInt32(-Int32FromInt32(1)), + 219: Uint8FromInt32(-Int32FromInt32(1)), + 220: Uint8FromInt32(-Int32FromInt32(1)), + 221: Uint8FromInt32(-Int32FromInt32(1)), + 222: Uint8FromInt32(-Int32FromInt32(1)), + 223: Uint8FromInt32(-Int32FromInt32(1)), + 224: Uint8FromInt32(-Int32FromInt32(1)), + 225: Uint8FromInt32(-Int32FromInt32(1)), + 226: Uint8FromInt32(-Int32FromInt32(1)), + 227: Uint8FromInt32(-Int32FromInt32(1)), + 228: Uint8FromInt32(-Int32FromInt32(1)), + 229: Uint8FromInt32(-Int32FromInt32(1)), + 230: Uint8FromInt32(-Int32FromInt32(1)), + 231: Uint8FromInt32(-Int32FromInt32(1)), + 232: Uint8FromInt32(-Int32FromInt32(1)), + 233: Uint8FromInt32(-Int32FromInt32(1)), + 234: Uint8FromInt32(-Int32FromInt32(1)), + 235: Uint8FromInt32(-Int32FromInt32(1)), + 236: Uint8FromInt32(-Int32FromInt32(1)), + 237: Uint8FromInt32(-Int32FromInt32(1)), + 238: Uint8FromInt32(-Int32FromInt32(1)), + 239: Uint8FromInt32(-Int32FromInt32(1)), + 240: Uint8FromInt32(-Int32FromInt32(1)), + 241: Uint8FromInt32(-Int32FromInt32(1)), + 242: Uint8FromInt32(-Int32FromInt32(1)), + 243: Uint8FromInt32(-Int32FromInt32(1)), + 244: Uint8FromInt32(-Int32FromInt32(1)), + 245: Uint8FromInt32(-Int32FromInt32(1)), + 246: Uint8FromInt32(-Int32FromInt32(1)), + 247: Uint8FromInt32(-Int32FromInt32(1)), + 248: Uint8FromInt32(-Int32FromInt32(1)), + 249: Uint8FromInt32(-Int32FromInt32(1)), + 250: Uint8FromInt32(-Int32FromInt32(1)), + 251: Uint8FromInt32(-Int32FromInt32(1)), + 252: Uint8FromInt32(-Int32FromInt32(1)), + 253: Uint8FromInt32(-Int32FromInt32(1)), + 254: Uint8FromInt32(-Int32FromInt32(1)), + 255: Uint8FromInt32(-Int32FromInt32(1)), + 256: Uint8FromInt32(-Int32FromInt32(1)), } func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint64) { @@ -27400,14 +27398,14 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -27420,7 +27418,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v10 = f + 4 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -27431,7 +27429,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v13 = f + 4 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ - v11 = int32(*(*uint8)(unsafe.Pointer(v12))) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) } else { v11 = X__shgetc(tls, f) } @@ -27441,12 +27439,12 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v16 = f + 4 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 - if int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -27481,10 +27479,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint if base == uint32(10) { x = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { break } - x = x*uint32(10) + uint32(c-Int32FromUint8('0')) + x = x*uint32(10) + Uint32FromInt32(c-Int32FromUint8('0')) goto _20 _20: ; @@ -27492,7 +27490,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v23 = f + 4 v22 = *(*uintptr)(unsafe.Pointer(v23)) *(*uintptr)(unsafe.Pointer(v23))++ - v21 = int32(*(*uint8)(unsafe.Pointer(v22))) + v21 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v22))) } else { v21 = X__shgetc(tls, f) } @@ -27500,10 +27498,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } y = uint64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(c-Int32FromUint8('0'))) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-Uint64FromInt32(c-Int32FromUint8('0'))) { break } - y = y*uint64(10) + uint64(c-Int32FromUint8('0')) + y = y*uint64(10) + Uint64FromInt32(c-Int32FromUint8('0')) goto _24 _24: ; @@ -27511,13 +27509,13 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v27 = f + 4 v26 = *(*uintptr)(unsafe.Pointer(v27)) *(*uintptr)(unsafe.Pointer(v27))++ - v25 = int32(*(*uint8)(unsafe.Pointer(v26))) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v26))) } else { v25 = X__shgetc(tls, f) } c = v25 } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { goto done } } else { @@ -27536,7 +27534,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v31 = f + 4 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } @@ -27555,7 +27553,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v35 = f + 4 v34 = *(*uintptr)(unsafe.Pointer(v35)) *(*uintptr)(unsafe.Pointer(v35))++ - v33 = int32(*(*uint8)(unsafe.Pointer(v34))) + v33 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v34))) } else { v33 = X__shgetc(tls, f) } @@ -27575,7 +27573,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v39 = f + 4 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ - v37 = int32(*(*uint8)(unsafe.Pointer(v38))) + v37 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v38))) } else { v37 = X__shgetc(tls, f) } @@ -27594,7 +27592,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v43 = f + 4 v42 = *(*uintptr)(unsafe.Pointer(v43)) *(*uintptr)(unsafe.Pointer(v43))++ - v41 = int32(*(*uint8)(unsafe.Pointer(v42))) + v41 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v42))) } else { v41 = X__shgetc(tls, f) } @@ -27614,7 +27612,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v47 = f + 4 v46 = *(*uintptr)(unsafe.Pointer(v47)) *(*uintptr)(unsafe.Pointer(v47))++ - v45 = int32(*(*uint8)(unsafe.Pointer(v46))) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v46))) } else { v45 = X__shgetc(tls, f) } @@ -27643,7 +27641,7 @@ done: } } } - return y ^ uint64(neg) - uint64(neg) + return y ^ Uint64FromInt32(neg) - Uint64FromInt32(neg) } func X__procfdname(tls *TLS, buf uintptr, fd uint32) { @@ -27688,7 +27686,7 @@ func X__procfdname(tls *TLS, buf uintptr, fd uint32) { } i-- v5 = i - *(*int8)(unsafe.Pointer(buf + uintptr(v5))) = int8(uint32('0') + fd%uint32(10)) + *(*int8)(unsafe.Pointer(buf + uintptr(v5))) = Int8FromUint32(uint32('0') + fd%uint32(10)) goto _4 _4: ; @@ -27743,7 +27741,7 @@ func X__shgetc(tls *TLS, f uintptr) (r int32) { } (*TFILE)(unsafe.Pointer(f)).Fshcnt = int64(int32((*TFILE)(unsafe.Pointer(f)).Fbuf)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)) + cnt if (*TFILE)(unsafe.Pointer(f)).Frpos <= (*TFILE)(unsafe.Pointer(f)).Fbuf { - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = Uint8FromInt32(c) } return c } @@ -27754,10 +27752,10 @@ func X__syscall_ret(tls *TLS, r uint32) (r1 int32) { defer func() { trc("-> %v", r1) }() } if r > -Uint32FromUint32(4096) { - *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(-r) + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = Int32FromUint32(-r) return -int32(1) } - return int32(r) + return Int32FromUint32(r) } type TElf_Symndx = uint32 @@ -27829,7 +27827,7 @@ func Xftok(tls *TLS, path uintptr, id int32) (r Tkey_t) { if Xstat(tls, path, bp) < 0 { return -int32(1) } - return int32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ino&Uint64FromInt32(0xffff) | (*(*Tstat)(unsafe.Pointer(bp))).Fst_dev&Uint64FromInt32(0xff)<= 0 && cmd&(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) != 0 { buf = orig *(*Tmsqid_ds)(unsafe.Pointer(buf)) = *(*Tmsqid_ds)(unsafe.Pointer(bp)) - (*Tmsqid_ds)(unsafe.Pointer(buf)).Fmsg_stime = int64((*Tmsqid_ds)(unsafe.Pointer(buf)).F__msg_stime_lo) | (0+int64((*Tmsqid_ds)(unsafe.Pointer(buf)).F__msg_stime_hi))< %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_msgget), k, flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_msgget), k, flag))) } func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int32, flag int32) (r Tssize_t) { @@ -27933,7 +27931,7 @@ func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int32, flag int32 0: int32(m), 1: type1, } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_msgrcv), q, int32(len1), flag, int32(bp), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_msgrcv), q, Int32FromUint32(len1), flag, int32(bp), 0))) } func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { @@ -27941,7 +27939,7 @@ func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { trc("tls=%v q=%v m=%v len1=%v flag=%v, (%v:)", tls, q, m, len1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_msgsnd), q, int32(len1), flag, int32(m), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_msgsnd), q, Int32FromUint32(len1), flag, int32(m), 0))) } const GETALL = 13 @@ -28042,10 +28040,10 @@ func Xsemctl(tls *TLS, id int32, num int32, cmd int32, va uintptr) (r1 int32) { if r >= 0 && cmd&(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) != 0 { *(*uintptr)(unsafe.Pointer(bp)) = orig *(*Tsemid_ds)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) = *(*Tsemid_ds)(unsafe.Pointer(bp + 4)) - (*Tsemid_ds)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fsem_otime = int64((*Tsemid_ds)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).F__sem_otime_lo) | (0+int64((*Tsemid_ds)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).F__sem_otime_hi))< int32(USHRT_MAX) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_semget), key, n, fl))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_semget), key, n, fl))) } func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { @@ -28068,7 +28066,7 @@ func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { trc("tls=%v id=%v buf=%v n=%v, (%v:)", tls, id, buf, n, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_semop), id, int32(n), Int32FromInt32(0), int32(buf)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_semop), id, Int32FromUint32(n), Int32FromInt32(0), int32(buf)))) } const NO_TIME32 = 0 @@ -28127,7 +28125,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r1 int } ns = v2 r = -int32(ENOSYS) - if Bool(NO_TIME32 != 0) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(NO_TIME32 != 0) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if ts != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -28137,19 +28135,19 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r1 int } else { v3 = uintptr(0) } - r = X__syscall4(tls, int32(SYS_semtimedop_time64), id, int32(buf), int32(n), int32(v3)) + r = X__syscall4(tls, int32(SYS_semtimedop_time64), id, int32(buf), Int32FromUint32(n), int32(v3)) } if Bool(NO_TIME32 != 0) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } if ts != 0 { - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v5 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v5 = Uint64FromInt64(s) } else { - v5 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v5 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ - 0: int32(v5), + 0: Int32FromUint64(v5), 1: ns, } v4 = bp + 16 @@ -28157,7 +28155,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r1 int v4 = uintptr(0) } ts = v4 - return X__syscall_ret(tls, uint32(X__syscall6(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_semtimedop), id, int32(n), Int32FromInt32(0), int32(buf), int32(ts)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_semtimedop), id, Int32FromUint32(n), Int32FromInt32(0), int32(buf), int32(ts)))) } const SHMLBA = 4096 @@ -28242,7 +28240,7 @@ func Xshmat(tls *TLS, id int32, _addr uintptr, flag int32) (r uintptr) { var ret uint32 var v1 uintptr _, _ = ret, v1 - ret = uint32(X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_shmat), id, flag, int32(bp), int32(*(*uintptr)(unsafe.Pointer(bp))))))) + ret = Uint32FromInt32(X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_shmat), id, flag, int32(bp), int32(*(*uintptr)(unsafe.Pointer(bp))))))) if ret > -Uint32FromInt32(SHMLBA) { v1 = uintptr(ret) } else { @@ -28271,11 +28269,11 @@ func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { if r >= 0 && cmd&(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) != 0 { buf = orig *(*Tshmid_ds)(unsafe.Pointer(buf)) = *(*Tshmid_ds)(unsafe.Pointer(bp)) - (*Tshmid_ds)(unsafe.Pointer(buf)).Fshm_atime = int64((*Tshmid_ds)(unsafe.Pointer(buf)).F__shm_atime_lo) | (0+int64((*Tshmid_ds)(unsafe.Pointer(buf)).F__shm_atime_hi))< %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_shmdt), Int32FromInt32(0), Int32FromInt32(0), Int32FromInt32(0), int32(addr)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_shmdt), Int32FromInt32(0), Int32FromInt32(0), Int32FromInt32(0), int32(addr)))) } func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { @@ -28291,10 +28289,10 @@ func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { trc("tls=%v key=%v size=%v flag=%v, (%v:)", tls, key, size, flag, origin(2)) defer func() { trc("-> %v", r) }() } - if size > uint32(Int32FromInt32(INT32_MAX)) { + if size > Uint32FromInt32(Int32FromInt32(INT32_MAX)) { size = Uint32FromUint32(0xffffffff) } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_shmget), key, int32(size), flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_ipc), Int32FromInt32(IPCOP_shmget), key, Int32FromUint32(size), flag))) } type Tpasswd = struct { @@ -28559,7 +28557,7 @@ func Xgetdtablesize(tls *TLS) (r int32) { } else { v1 = uint64(INT_MAX) } - return int32(v1) + return Int32FromUint64(v1) } func Xgetloadavg(tls *TLS, a uintptr, n int32) (r int32) { @@ -28790,16 +28788,16 @@ func Xgetpass(tls *TLS, prompt uintptr) (r uintptr) { } Xtcgetattr(tls, fd, bp+60) *(*Ttermios)(unsafe.Pointer(bp)) = *(*Ttermios)(unsafe.Pointer(bp + 60)) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag |= uint32(ICANON) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= uint32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= Uint32FromInt32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag |= uint32(ICRNL) Xtcsetattr(tls, fd, int32(TCSAFLUSH), bp+60) Xtcdrain(tls, fd) Xdprintf(tls, fd, __ccgo_ts+15, VaList(bp+128, prompt)) l = Xread(tls, fd, uintptr(unsafe.Pointer(&_password)), uint32(128)) if l >= 0 { - if l > 0 && int32(_password[l-int32(1)]) == int32('\n') || uint32(l) == uint32(128) { + if l > 0 && int32(_password[l-int32(1)]) == int32('\n') || Uint32FromInt32(l) == uint32(128) { l-- } _password[l] = 0 @@ -29039,12 +29037,12 @@ func Xulimit(tls *TLS, cmd int32, va uintptr) (r int32) { ap = va val = VaInt32(&ap) _ = ap - (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * uint64(val) + (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * Uint64FromInt32(val) if Xsetrlimit(tls, int32(RLIMIT_FSIZE), bp) != 0 { return -int32(1) } } - return int32((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) + return Int32FromUint64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) } const BOOT_TIME = 2 @@ -29313,7 +29311,7 @@ func Xarch_prctl(tls *TLS, code int32, addr uint32) (r int32) { trc("tls=%v code=%v addr=%v, (%v:)", tls, code, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_arch_prctl), code, int32(addr)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_arch_prctl), code, Int32FromUint32(addr)))) } func Xbrk(tls *TLS, end uintptr) (r int32) { @@ -29321,7 +29319,7 @@ func Xbrk(tls *TLS, end uintptr) (r int32) { trc("tls=%v end=%v, (%v:)", tls, end, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(-Int32FromInt32(ENOMEM))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(ENOMEM))) } func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29329,7 +29327,7 @@ func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_capset), int32(a), int32(b)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_capset), int32(a), int32(b)))) } func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29337,7 +29335,7 @@ func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_capget), int32(a), int32(b)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_capget), int32(a), int32(b)))) } func Xchroot(tls *TLS, path uintptr) (r int32) { @@ -29345,7 +29343,7 @@ func Xchroot(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_chroot), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_chroot), int32(path)))) } type Tktimex64 = struct { @@ -29461,10 +29459,10 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex64)(unsafe.Pointer(bp))).Ftai } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if (*Ttimex)(unsafe.Pointer(utx)).Fmodes&uint32(ADJ_SETOFFSET) != 0 && !!((uint64((*Ttimex)(unsafe.Pointer(utx)).Ftime.Ftv_sec)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if (*Ttimex)(unsafe.Pointer(utx)).Fmodes&uint32(ADJ_SETOFFSET) != 0 && !!((Uint64FromInt64((*Ttimex)(unsafe.Pointer(utx)).Ftime.Ftv_sec)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } if uint32(8) > uint32(4) { *(*Tktimex)(unsafe.Pointer(bp + 208)) = Tktimex{ @@ -29518,12 +29516,12 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Fstbcnt = (*(*Tktimex)(unsafe.Pointer(bp + 208))).Fstbcnt (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex)(unsafe.Pointer(bp + 208))).Ftai } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } if clock_id == CLOCK_REALTIME { - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_adjtimex), int32(utx)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_adjtimex), int32(utx)))) } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_clock_adjtime), clock_id, int32(utx)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_clock_adjtime), clock_id, int32(utx)))) } func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -29531,7 +29529,7 @@ func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_o trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall6(tls, int32(SYS_copy_file_range), fd_in, int32(off_in), fd_out, int32(off_out), int32(len1), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, int32(SYS_copy_file_range), fd_in, int32(off_in), fd_out, int32(off_out), Int32FromUint32(len1), Int32FromUint32(flags)))) } const EPOLLERR = 8 @@ -29585,7 +29583,7 @@ func Xepoll_create(tls *TLS, size int32) (r int32) { defer func() { trc("-> %v", r) }() } if size <= 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } return Xepoll_create1(tls, 0) } @@ -29601,7 +29599,7 @@ func Xepoll_create1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = X__syscall1(tls, int32(SYS_epoll_create), Int32FromInt32(1)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { @@ -29609,7 +29607,7 @@ func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { trc("tls=%v fd=%v op=%v fd2=%v ev=%v, (%v:)", tls, fd, op, fd2, ev, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_epoll_ctl), fd, op, fd2, int32(ev)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_epoll_ctl), fd, op, fd2, int32(ev)))) } func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uintptr) (r1 int32) { @@ -29623,7 +29621,7 @@ func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uint if r == -int32(ENOSYS) && !(sigs != 0) { r = ___syscall_cp(tls, int32(SYS_epoll_wait), fd, int32(ev), cnt, to, 0, 0) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xepoll_wait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32) (r int32) { @@ -29647,11 +29645,11 @@ func Xeventfd(tls *TLS, count uint32, flags int32) (r1 int32) { } var r int32 _ = r - r = X__syscall2(tls, int32(SYS_eventfd2), int32(count), flags) + r = X__syscall2(tls, int32(SYS_eventfd2), Int32FromUint32(count), flags) if r == -int32(ENOSYS) && !(flags != 0) { - r = X__syscall1(tls, int32(SYS_eventfd), int32(count)) + r = X__syscall1(tls, int32(SYS_eventfd), Int32FromUint32(count)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { @@ -29661,7 +29659,7 @@ func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { } var v1 int32 _ = v1 - if uint32(8) == uint32(Xread(tls, fd, value, uint32(8))) { + if uint32(8) == Uint32FromInt32(Xread(tls, fd, value, uint32(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29679,7 +29677,7 @@ func Xeventfd_write(tls *TLS, fd int32, _value Teventfd_t) (r int32) { *(*Teventfd_t)(unsafe.Pointer(bp)) = _value var v1 int32 _ = v1 - if uint32(8) == uint32(Xwrite(tls, fd, bp, uint32(8))) { + if uint32(8) == Uint32FromInt32(Xwrite(tls, fd, bp, uint32(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29692,7 +29690,7 @@ func Xfallocate(tls *TLS, fd int32, mode int32, base Toff_t, len1 Toff_t) (r int trc("tls=%v fd=%v mode=%v base=%v len1=%v, (%v:)", tls, fd, mode, base, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_fallocate), fd, mode, int32(base), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_fallocate), fd, mode, int32(base), int32(len1)))) } const FANOTIFY_METADATA_VERSION = 3 @@ -29838,7 +29836,7 @@ func Xfanotify_init(tls *TLS, flags uint32, event_f_flags uint32) (r int32) { trc("tls=%v flags=%v event_f_flags=%v, (%v:)", tls, flags, event_f_flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_fanotify_init), int32(flags), int32(event_f_flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_fanotify_init), Int32FromUint32(flags), Int32FromUint32(event_f_flags)))) } func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd int32, pathname uintptr) (r int32) { @@ -29846,7 +29844,7 @@ func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd trc("tls=%v fanotify_fd=%v flags=%v mask=%v dfd=%v pathname=%v, (%v:)", tls, fanotify_fd, flags, mask, dfd, pathname, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_fanotify_mark), fanotify_fd, int32(flags), int32(mask), dfd, int32(pathname)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_fanotify_mark), fanotify_fd, Int32FromUint32(flags), Int32FromUint64(mask), dfd, int32(pathname)))) } const LOCK_EX = 2 @@ -29859,7 +29857,7 @@ func Xflock(tls *TLS, fd int32, op int32) (r int32) { trc("tls=%v fd=%v op=%v, (%v:)", tls, fd, op, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_flock), fd, op))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_flock), fd, op))) } func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { @@ -29870,7 +29868,7 @@ func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if len1 > uint32(INT_MAX) { len1 = uint32(INT_MAX) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_getdents64), fd, int32(buf), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_getdents64), fd, int32(buf), Int32FromUint32(len1)))) } const GRND_INSECURE = 4 @@ -29882,7 +29880,7 @@ func Xgetrandom(tls *TLS, buf uintptr, buflen Tsize_t, flags uint32) (r Tssize_t trc("tls=%v buf=%v buflen=%v flags=%v, (%v:)", tls, buf, buflen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_getrandom), int32(buf), int32(buflen), int32(flags), 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_getrandom), int32(buf), Int32FromUint32(buflen), Int32FromUint32(flags), 0, 0, 0))) } const IN_ACCESS = 1 @@ -29939,7 +29937,7 @@ func Xinotify_init1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = X__syscall0(tls, int32(SYS_inotify_init)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r int32) { @@ -29947,7 +29945,7 @@ func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r trc("tls=%v fd=%v pathname=%v mask=%v, (%v:)", tls, fd, pathname, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_inotify_add_watch), fd, int32(pathname), int32(mask)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_inotify_add_watch), fd, int32(pathname), Int32FromUint32(mask)))) } func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { @@ -29955,7 +29953,7 @@ func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { trc("tls=%v fd=%v wd=%v, (%v:)", tls, fd, wd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_inotify_rm_watch), fd, wd))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_inotify_rm_watch), fd, wd))) } func Xioperm(tls *TLS, from uint32, num uint32, turn_on int32) (r int32) { @@ -29963,7 +29961,7 @@ func Xioperm(tls *TLS, from uint32, num uint32, turn_on int32) (r int32) { trc("tls=%v from=%v num=%v turn_on=%v, (%v:)", tls, from, num, turn_on, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_ioperm), int32(from), int32(num), turn_on))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_ioperm), Int32FromUint32(from), Int32FromUint32(num), turn_on))) } func Xiopl(tls *TLS, level int32) (r int32) { @@ -29971,7 +29969,7 @@ func Xiopl(tls *TLS, level int32) (r int32) { trc("tls=%v level=%v, (%v:)", tls, level, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_iopl), level))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_iopl), level))) } func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { @@ -29979,7 +29977,7 @@ func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { trc("tls=%v type1=%v buf=%v len1=%v, (%v:)", tls, type1, buf, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_syslog), type1, int32(buf), len1))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_syslog), type1, int32(buf), len1))) } const MADV_COLD = 20 @@ -30017,7 +30015,7 @@ func Xmemfd_create(tls *TLS, name uintptr, flags uint32) (r int32) { trc("tls=%v name=%v flags=%v, (%v:)", tls, name, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_memfd_create), int32(name), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_memfd_create), int32(name), Int32FromUint32(flags)))) } func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { @@ -30028,7 +30026,7 @@ func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { if flags == uint32(0) { return Xmlock(tls, addr, len1) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mlock2), int32(addr), int32(len1), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mlock2), int32(addr), Int32FromUint32(len1), Int32FromUint32(flags)))) } func Xinit_module(tls *TLS, a uintptr, b uint32, c uintptr) (r int32) { @@ -30036,7 +30034,7 @@ func Xinit_module(tls *TLS, a uintptr, b uint32, c uintptr) (r int32) { trc("tls=%v a=%v b=%v c=%v, (%v:)", tls, a, b, c, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_init_module), int32(a), int32(b), int32(c)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_init_module), int32(a), Int32FromUint32(b), int32(c)))) } func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { @@ -30044,7 +30042,7 @@ func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_delete_module), int32(a), int32(b)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_delete_module), int32(a), Int32FromUint32(b)))) } const BLKBSZGET = 2147488368 @@ -30293,7 +30291,7 @@ func Xmount(tls *TLS, special uintptr, dir uintptr, fstype uintptr, flags uint32 trc("tls=%v special=%v dir=%v fstype=%v flags=%v data=%v, (%v:)", tls, special, dir, fstype, flags, data, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_mount), int32(special), int32(dir), int32(fstype), int32(flags), int32(data)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_mount), int32(special), int32(dir), int32(fstype), Int32FromUint32(flags), int32(data)))) } func Xumount(tls *TLS, special uintptr) (r int32) { @@ -30301,7 +30299,7 @@ func Xumount(tls *TLS, special uintptr) (r int32) { trc("tls=%v special=%v, (%v:)", tls, special, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_umount2), int32(special), Int32FromInt32(0)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_umount2), int32(special), Int32FromInt32(0)))) } func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { @@ -30309,7 +30307,7 @@ func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { trc("tls=%v special=%v flags=%v, (%v:)", tls, special, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_umount2), int32(special), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_umount2), int32(special), flags))) } func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, mount_id uintptr, flags int32) (r int32) { @@ -30317,7 +30315,7 @@ func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, trc("tls=%v dirfd=%v pathname=%v handle=%v mount_id=%v flags=%v, (%v:)", tls, dirfd, pathname, handle, mount_id, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_name_to_handle_at), dirfd, int32(pathname), int32(handle), int32(mount_id), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_name_to_handle_at), dirfd, int32(pathname), int32(handle), int32(mount_id), flags))) } func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) (r int32) { @@ -30325,7 +30323,7 @@ func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) ( trc("tls=%v mount_fd=%v handle=%v flags=%v, (%v:)", tls, mount_fd, handle, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_open_by_handle_at), mount_fd, int32(handle), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_open_by_handle_at), mount_fd, int32(handle), flags))) } const ADDR_COMPAT_LAYOUT = 2097152 @@ -30368,7 +30366,7 @@ func Xpersonality(tls *TLS, persona uint32) (r int32) { trc("tls=%v persona=%v, (%v:)", tls, persona, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_personality), int32(persona)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_personality), Int32FromUint32(persona)))) } func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { @@ -30376,7 +30374,7 @@ func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { trc("tls=%v new1=%v old=%v, (%v:)", tls, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_pivot_root), int32(new1), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_pivot_root), int32(new1), int32(old)))) } const PR_CAPBSET_DROP = 24 @@ -30553,7 +30551,7 @@ func Xprctl(tls *TLS, op int32, va uintptr) (r int32) { i++ } _ = ap - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_prctl), op, int32(x[0]), int32(x[int32(1)]), int32(x[int32(2)]), int32(x[int32(3)])))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_prctl), op, Int32FromUint32(x[0]), Int32FromUint32(x[int32(1)]), Int32FromUint32(x[int32(2)]), Int32FromUint32(x[int32(3)])))) } const RWF_APPEND = 16 @@ -30572,9 +30570,9 @@ func Xpreadv2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags in if ofs == int64(-int32(1)) { return Xreadv(tls, fd, iov, count) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_preadv), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_preadv), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_preadv2), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), flags))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_preadv2), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), flags))) } func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit uintptr) (r1 int32) { @@ -30597,7 +30595,7 @@ func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit } new_limit = bp } - r = X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_prlimit64), pid, resource, int32(new_limit), int32(old_limit)))) + r = X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_prlimit64), pid, resource, int32(new_limit), int32(old_limit)))) if !(r != 0) && old_limit != 0 && Bool(^Uint64FromUint64(0) != ^Uint64FromUint64(0)) { if (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur = ^Uint64FromUint64(0) @@ -30614,7 +30612,7 @@ func Xprocess_vm_writev(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint32, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall6(tls, int32(SYS_process_vm_writev), pid, int32(lvec), int32(liovcnt), int32(rvec), int32(riovcnt), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, int32(SYS_process_vm_writev), pid, int32(lvec), Int32FromUint32(liovcnt), int32(rvec), Int32FromUint32(riovcnt), Int32FromUint32(flags)))) } func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint32, rvec uintptr, riovcnt uint32, flags uint32) (r Tssize_t) { @@ -30622,7 +30620,7 @@ func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint32, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall6(tls, int32(SYS_process_vm_readv), pid, int32(lvec), int32(liovcnt), int32(rvec), int32(riovcnt), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, int32(SYS_process_vm_readv), pid, int32(lvec), Int32FromUint32(liovcnt), int32(rvec), Int32FromUint32(riovcnt), Int32FromUint32(flags)))) } const PTRACE_ATTACH = 16 @@ -30781,11 +30779,11 @@ func Xptrace(tls *TLS, req int32, va uintptr) (r int32) { data = VaUintptr(&ap) /* PTRACE_{READ,WRITE}{DATA,TEXT} (16...19) are specific to SPARC. */ _ = ap - if uint32(req)-uint32(1) < uint32(3) { + if Uint32FromInt32(req)-uint32(1) < uint32(3) { data = bp } - ret = X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_ptrace), req, pid, int32(addr), int32(data), int32(addr2)))) - if ret < 0 || uint32(req)-uint32(1) >= uint32(3) { + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_ptrace), req, pid, int32(addr), int32(data), int32(addr2)))) + if ret < 0 || Uint32FromInt32(req)-uint32(1) >= uint32(3) { return ret } return *(*int32)(unsafe.Pointer(bp)) @@ -30800,9 +30798,9 @@ func Xpwritev2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags i if ofs == int64(-int32(1)) { return Xwritev(tls, fd, iov, count) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pwritev), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pwritev), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pwritev2), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), flags))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pwritev2), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), flags))) } const GRPQUOTA = 1 @@ -30868,7 +30866,7 @@ func Xquotactl(tls *TLS, cmd int32, special uintptr, id int32, addr uintptr) (r trc("tls=%v cmd=%v special=%v id=%v addr=%v, (%v:)", tls, cmd, special, id, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_quotactl), cmd, int32(special), id, int32(addr)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_quotactl), cmd, int32(special), id, int32(addr)))) } func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { @@ -30876,7 +30874,7 @@ func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v pos=%v len1=%v, (%v:)", tls, fd, pos, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_readahead), fd, int32(pos), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_readahead), fd, int32(pos), Int32FromUint32(len1)))) } const RB_AUTOBOOT = 19088743 @@ -30892,7 +30890,7 @@ func Xreboot(tls *TLS, type1 int32) (r int32) { trc("tls=%v type1=%v, (%v:)", tls, type1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_reboot), int32(Uint32FromUint32(0xfee1dead)), Int32FromInt32(672274793), type1))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_reboot), Int32FromUint32(Uint32FromUint32(0xfee1dead)), Int32FromInt32(672274793), type1))) } func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff Tsize_t, flags int32) (r int32) { @@ -30900,7 +30898,7 @@ func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff T trc("tls=%v addr=%v size=%v prot=%v pgoff=%v flags=%v, (%v:)", tls, addr, size, prot, pgoff, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_remap_file_pages), int32(addr), int32(size), prot, int32(pgoff), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_remap_file_pages), int32(addr), Int32FromUint32(size), prot, Int32FromUint32(pgoff), flags))) } func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { @@ -30909,7 +30907,7 @@ func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { defer func() { trc("-> %v", r) }() } if inc != 0 { - return uintptr(X__syscall_ret(tls, uint32(-Int32FromInt32(ENOMEM)))) + return uintptr(X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(ENOMEM)))) } return uintptr(X__syscall1(tls, int32(SYS_brk), Int32FromInt32(0))) } @@ -30919,7 +30917,7 @@ func Xsendfile(tls *TLS, out_fd int32, in_fd int32, ofs uintptr, count Tsize_t) trc("tls=%v out_fd=%v in_fd=%v ofs=%v count=%v, (%v:)", tls, out_fd, in_fd, ofs, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_sendfile64), out_fd, in_fd, int32(ofs), int32(count)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_sendfile64), out_fd, in_fd, int32(ofs), Int32FromUint32(count)))) } func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { @@ -30927,7 +30925,7 @@ func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_setfsgid32), int32(gid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_setfsgid32), Int32FromUint32(gid)))) } func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { @@ -30935,7 +30933,7 @@ func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_setfsuid32), int32(uid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_setfsuid32), Int32FromUint32(uid)))) } func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -30943,7 +30941,7 @@ func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_sethostname), int32(name), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_sethostname), int32(name), Int32FromUint32(len1)))) } const CLONE_CHILD_CLEARTID = 2097152 @@ -30983,7 +30981,7 @@ func Xsetns(tls *TLS, fd int32, nstype int32) (r int32) { trc("tls=%v fd=%v nstype=%v, (%v:)", tls, fd, nstype, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_setns), fd, nstype))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_setns), fd, nstype))) } const __tm_gmtoff = 0 @@ -31013,8 +31011,8 @@ func Xsettimeofday(tls *TLS, tv uintptr, tz uintptr) (r int32) { if !(tv != 0) { return 0 } - if uint64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + if Uint64FromInt64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ Ftv_sec: (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec, @@ -31060,7 +31058,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { _ = ret ret = X__syscall4(tls, int32(SYS_signalfd4), fd, int32(sigs), Int32FromInt32(_NSIG)/Int32FromInt32(8), flags) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } ret = X__syscall3(tls, int32(SYS_signalfd), fd, int32(sigs), Int32FromInt32(_NSIG)/Int32FromInt32(8)) if ret >= 0 { @@ -31071,7 +31069,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { X__syscall3(tls, int32(SYS_fcntl64), ret, Int32FromInt32(F_SETFL), Int32FromInt32(O_NONBLOCK)) } } - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -31079,7 +31077,7 @@ func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintpt trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall6(tls, int32(SYS_splice), fd_in, int32(off_in), fd_out, int32(off_out), int32(len1), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, int32(SYS_splice), fd_in, int32(off_in), fd_out, int32(off_out), Int32FromUint32(len1), Int32FromUint32(flags)))) } func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx uintptr) (r int32) { @@ -31092,9 +31090,9 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u var ret int32 var _ /* st at bp+0 */ Tstat _ = ret - ret = X__syscall5(tls, int32(SYS_statx), dirfd, int32(path), flags, int32(mask), int32(stx)) + ret = X__syscall5(tls, int32(SYS_statx), dirfd, int32(path), flags, Int32FromUint32(mask), int32(stx)) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } ret = Xfstatat(tls, dirfd, path, bp, flags) if ret != 0 { @@ -31107,15 +31105,15 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u (*Tstatx)(unsafe.Pointer(stx)).Fstx_nlink = (*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink (*Tstatx)(unsafe.Pointer(stx)).Fstx_uid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_uid (*Tstatx)(unsafe.Pointer(stx)).Fstx_gid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_gid - (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_btime = Tstatx_timestamp{} (*Tstatx)(unsafe.Pointer(stx)).Fstx_mask = uint32(0x7ff) return 0 @@ -31145,7 +31143,7 @@ func Xswapon(tls *TLS, path uintptr, flags int32) (r int32) { trc("tls=%v path=%v flags=%v, (%v:)", tls, path, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_swapon), int32(path), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_swapon), int32(path), flags))) } func Xswapoff(tls *TLS, path uintptr) (r int32) { @@ -31153,7 +31151,7 @@ func Xswapoff(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_swapoff), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_swapoff), int32(path)))) } func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) (r int32) { @@ -31161,7 +31159,7 @@ func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) trc("tls=%v fd=%v pos=%v len1=%v flags=%v, (%v:)", tls, fd, pos, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_sync_file_range), fd, int32(pos), int32(len1), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_sync_file_range), fd, int32(pos), int32(len1), Int32FromUint32(flags)))) } func Xsyncfs(tls *TLS, fd int32) (r int32) { @@ -31169,7 +31167,7 @@ func Xsyncfs(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_syncfs), fd))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_syncfs), fd))) } func X__lsysinfo(tls *TLS, info uintptr) (r int32) { @@ -31177,7 +31175,7 @@ func X__lsysinfo(tls *TLS, info uintptr) (r int32) { trc("tls=%v info=%v, (%v:)", tls, info, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_sysinfo), int32(info)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_sysinfo), int32(info)))) } func Xsysinfo(tls *TLS, info uintptr) (r int32) { @@ -31193,7 +31191,7 @@ func Xtee(tls *TLS, src int32, dest int32, len1 Tsize_t, flags uint32) (r Tssize trc("tls=%v src=%v dest=%v len1=%v flags=%v, (%v:)", tls, src, dest, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_tee), src, dest, int32(len1), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_tee), src, dest, Int32FromUint32(len1), Int32FromUint32(flags)))) } const TFD_CLOEXEC = 524288 @@ -31206,7 +31204,7 @@ func Xtimerfd_create(tls *TLS, clockid int32, flags int32) (r int32) { trc("tls=%v clockid=%v flags=%v, (%v:)", tls, clockid, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_timerfd_create), clockid, flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_timerfd_create), clockid, flags))) } func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr) (r1 int32) { @@ -31225,7 +31223,7 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr ins = (*Titimerspec)(unsafe.Pointer(new1)).Fit_interval.Ftv_nsec vns = (*Titimerspec)(unsafe.Pointer(new1)).Fit_value.Ftv_nsec r = -int32(ENOSYS) - if Bool(false) || !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || Bool(uint32(8) > uint32(4)) && old != 0 { + if Bool(false) || !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || Bool(uint32(8) > uint32(4)) && old != 0 { *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, 1: int64(ins), @@ -31235,10 +31233,10 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr r = X__syscall4(tls, int32(SYS_timerfd_settime64), fd, flags, int32(bp), int32(old)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } *(*[4]int32)(unsafe.Pointer(bp + 32)) = [4]int32{ 0: int32(is), @@ -31253,8 +31251,8 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr (*Titimerspec)(unsafe.Pointer(old)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(2)]) (*Titimerspec)(unsafe.Pointer(old)).Fit_value.Ftv_nsec = (*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(3)] } - return X__syscall_ret(tls, uint32(r)) - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_timerfd_settime32), fd, flags, int32(new1), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(r)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_timerfd_settime32), fd, flags, int32(new1), int32(old)))) } func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r1 int32) { @@ -31272,7 +31270,7 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r1 int32) { r = X__syscall2(tls, int32(SYS_timerfd_gettime64), fd, int32(cur)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } r = X__syscall2(tls, int32(SYS_timerfd_gettime32), fd, int32(bp)) if !(r != 0) { @@ -31281,8 +31279,8 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r1 int32) { (*Titimerspec)(unsafe.Pointer(cur)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(2)]) (*Titimerspec)(unsafe.Pointer(cur)).Fit_value.Ftv_nsec = (*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)] } - return X__syscall_ret(tls, uint32(r)) - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_timerfd_gettime32), fd, int32(cur)))) + return X__syscall_ret(tls, Uint32FromInt32(r)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_timerfd_gettime32), fd, int32(cur)))) } func Xunshare(tls *TLS, flags int32) (r int32) { @@ -31290,7 +31288,7 @@ func Xunshare(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_unshare), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_unshare), flags))) } func Xutimes(tls *TLS, path uintptr, times uintptr) (r int32) { @@ -31306,7 +31304,7 @@ func Xvhangup(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall0(tls, int32(SYS_vhangup)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall0(tls, int32(SYS_vhangup)))) } func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Tssize_t) { @@ -31314,7 +31312,7 @@ func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Ts trc("tls=%v fd=%v iov=%v cnt=%v flags=%v, (%v:)", tls, fd, iov, cnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_vmsplice), fd, int32(iov), int32(cnt), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_vmsplice), fd, int32(iov), Int32FromUint32(cnt), Int32FromUint32(flags)))) } const NSIG = 65 @@ -31455,7 +31453,7 @@ func Xwait4(tls *TLS, pid Tpid_t, status uintptr, options int32, ru uintptr) (r1 Ftv_usec: int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)]), } } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } const XATTR_CREATE = 1 @@ -31467,7 +31465,7 @@ func Xgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_getxattr), int32(path), int32(name), int32(value), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_getxattr), int32(path), int32(name), int32(value), Int32FromUint32(size)))) } func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31475,7 +31473,7 @@ func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_lgetxattr), int32(path), int32(name), int32(value), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_lgetxattr), int32(path), int32(name), int32(value), Int32FromUint32(size)))) } func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31483,7 +31481,7 @@ func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v, (%v:)", tls, filedes, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_fgetxattr), filedes, int32(name), int32(value), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_fgetxattr), filedes, int32(name), int32(value), Int32FromUint32(size)))) } func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31491,7 +31489,7 @@ func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_listxattr), int32(path), int32(list), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_listxattr), int32(path), int32(list), Int32FromUint32(size)))) } func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31499,7 +31497,7 @@ func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_llistxattr), int32(path), int32(list), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_llistxattr), int32(path), int32(list), Int32FromUint32(size)))) } func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31507,7 +31505,7 @@ func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_ trc("tls=%v filedes=%v list=%v size=%v, (%v:)", tls, filedes, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_flistxattr), filedes, int32(list), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_flistxattr), filedes, int32(list), Int32FromUint32(size)))) } func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31515,7 +31513,7 @@ func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_setxattr), int32(path), int32(name), int32(value), int32(size), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_setxattr), int32(path), int32(name), int32(value), Int32FromUint32(size), flags))) } func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31523,7 +31521,7 @@ func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_lsetxattr), int32(path), int32(name), int32(value), int32(size), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_lsetxattr), int32(path), int32(name), int32(value), Int32FromUint32(size), flags))) } func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31531,7 +31529,7 @@ func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, filedes, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_fsetxattr), filedes, int32(name), int32(value), int32(size), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_fsetxattr), filedes, int32(name), int32(value), Int32FromUint32(size), flags))) } func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31539,7 +31537,7 @@ func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_removexattr), int32(path), int32(name)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_removexattr), int32(path), int32(name)))) } func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31547,7 +31545,7 @@ func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_lremovexattr), int32(path), int32(name)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_lremovexattr), int32(path), int32(name)))) } func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { @@ -31555,7 +31553,7 @@ func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_fremovexattr), fd, int32(name)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_fremovexattr), fd, int32(name)))) } type Tucontext_t2 = struct { @@ -31608,7 +31606,7 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { var sign, sw int32 _, _, _, _, _, _, _, _, _, _, _ = b, mo, n, o, ol, os, sign, sw, t, tl, ts mo = p - sw = int32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) + sw = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) b = uint32(0) n = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 2*4)), sw) o = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 3*4)), sw) @@ -31665,9 +31663,9 @@ func Xbind_textdomain_codeset(tls *TLS, domainname uintptr, codeset uintptr) (r var _empty_mo = [5]Tuint32_t{ 0: uint32(0x950412de), - 2: uint32(-Int32FromInt32(1)), - 3: uint32(-Int32FromInt32(1)), - 4: uint32(-Int32FromInt32(1)), + 2: Uint32FromInt32(-Int32FromInt32(1)), + 3: Uint32FromInt32(-Int32FromInt32(1)), + 4: Uint32FromInt32(-Int32FromInt32(1)), } const NL_CAT_LOCALE = 1 @@ -31750,12 +31748,12 @@ _6: goto _9 _9: strings = map1 + uintptr(20) + uintptr(v8) - v10 = uint32(set_id) + v10 = Uint32FromInt32(set_id) v11 = v10>>int32(24) | v10>>int32(8)&uint32(0xff00) | v10<>int32(24) | v13>>int32(8)&uint32(0xff00) | v13< uint32(NAME_MAX) || dirlen >= uint32(PATH_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) @@ -32074,7 +32072,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r uintptr) return uintptr(0) } (*Tbinding)(unsafe.Pointer(p1)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) - (*Tbinding)(unsafe.Pointer(p1)).Fdirlen = int32(dirlen) + (*Tbinding)(unsafe.Pointer(p1)).Fdirlen = Int32FromUint32(dirlen) (*Tbinding)(unsafe.Pointer(p1)).Fdomainname = p1 + 20 (*Tbinding)(unsafe.Pointer(p1)).Fdirname = p1 + 20 + uintptr(domlen) + uintptr(1) Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p1)).Fdomainname, domainname, domlen+uint32(1)) @@ -32156,13 +32154,13 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n if !(msgid1 != 0) { goto notrans } - if uint32(category) >= uint32(LC_ALL) { + if Uint32FromInt32(category) >= uint32(LC_ALL) { goto notrans } if !(domainname != 0) { domainname = X__gettextdomain(tls) } - domlen = Xstrnlen(tls, domainname, uint32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + domlen = Xstrnlen(tls, domainname, Uint32FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if domlen > uint32(NAME_MAX) { goto notrans } @@ -32215,27 +32213,27 @@ _2: dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 8 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 - dirlen = uint32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) + dirlen = Uint32FromInt32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) loclen = Xstrlen(tls, locname) - catlen = uint32(_catlens[category]) + catlen = Uint32FromInt8(_catlens[category]) /* Logically split @mod suffix from locale name. */ modname = Xmemchr(tls, locname, int32('@'), loclen) if !(modname != 0) { modname = locname + uintptr(loclen) } - v5 = loclen - uint32(int32(modname)-int32(locname)) + v5 = loclen - Uint32FromInt32(int32(modname)-int32(locname)) modlen = v5 alt_modlen = v5 - loclen = uint32(int32(modname) - int32(locname)) + loclen = Uint32FromInt32(int32(modname) - int32(locname)) /* Drop .charset identifier; it is not used. */ csp = Xmemchr(tls, locname, int32('.'), loclen) if csp != 0 { - loclen = uint32(int32(csp) - int32(locname)) + loclen = Uint32FromInt32(int32(csp) - int32(locname)) } v6 = dirlen + uint32(1) + loclen + modlen + uint32(1) + catlen + uint32(1) + domlen + uint32(3) + uint32(1) name = Xrealloc(tls, name, v6) for { - Xsnprintf(tls, name, v6, __ccgo_ts+359, VaList(bp+16, dirname, int32(loclen), locname, int32(alt_modlen), modname, catname, domainname)) + Xsnprintf(tls, name, v6, __ccgo_ts+359, VaList(bp+16, dirname, Int32FromUint32(loclen), locname, Int32FromUint32(alt_modlen), modname, catname, domainname)) v8 = X__map_file(tls, name, bp) map1 = v8 if v8 != 0 { @@ -32248,7 +32246,7 @@ _2: v9 = Xmemchr(tls, locname, int32('_'), loclen) locp = v9 if v9 != 0 { - loclen = uint32(int32(locp) - int32(locname)) + loclen = Uint32FromInt32(int32(locp) - int32(locname)) alt_modlen = modlen } else { break @@ -32286,7 +32284,7 @@ _2: r += uintptr(13) for { v11 = int32(*(*int8)(unsafe.Pointer(r))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: if !(v12 != 0) { @@ -32305,7 +32303,7 @@ _2: r++ for { v14 = int32(*(*int8)(unsafe.Pointer(r))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: if !(v15 != 0) { @@ -32318,7 +32316,7 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals = Int32FromUint32(np) (*Tmsgcat)(unsafe.Pointer(p1)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) @@ -32343,7 +32341,7 @@ _2: * msgid2 to request that dcngettext suppress plural processing. */ if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals != 0 { plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p1)).Fplural_rule, n) - if plural > uint32((*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals) { + if plural > Uint32FromInt32((*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals) { goto notrans } for { @@ -32352,7 +32350,7 @@ _2: if !(v20 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size - uint32(int32(trans)-int32((*Tmsgcat)(unsafe.Pointer(p1)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size - Uint32FromInt32(int32(trans)-int32((*Tmsgcat)(unsafe.Pointer(p1)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint32(1) >= rem { goto notrans @@ -98581,7 +98579,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(a)) != 0 && *(*uint8)(unsafe.Pointer(b)) != 0) { break } - for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && uint32(int32(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { + for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { a++ } if uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32) != uint32(*(*uint8)(unsafe.Pointer(b))) { @@ -98593,7 +98591,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { a++ b++ } - return BoolInt32(int32(*(*uint8)(unsafe.Pointer(a))) != int32(*(*uint8)(unsafe.Pointer(b)))) + return BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(b)))) } func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { @@ -98617,11 +98615,11 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { ; s += uintptr(Xstrlen(tls, s) + uint32(1)) } - return uint32(int32(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) + return Uint32FromInt32(int32(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) } s += uintptr(Xstrlen(tls, s) + uint32(1)) if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - if int32(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { s += uintptr(2) } else { s += uintptr(uint32(2) + (uint32(64)-uint32(*(*uint8)(unsafe.Pointer(s + 1))))*uint32(5)) @@ -98630,7 +98628,7 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { goto _1 _1: } - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } type Tstateful_cd = struct { @@ -98662,16 +98660,16 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { _, _, _, _, _, _, _ = cd, f, scd, t, v1, v2, v3 v1 = _find_charmap(tls, to) t = v1 - if v3 = v1 == uint32(-Int32FromInt32(1)); !v3 { + if v3 = v1 == Uint32FromInt32(-Int32FromInt32(1)); !v3 { v2 = _find_charmap(tls, from) f = v2 } - if v3 || v2 == uint32(-Int32FromInt32(1)) || int32(_charmaps[t]) >= int32(0330) { + if v3 || v2 == Uint32FromInt32(-Int32FromInt32(1)) || Int32FromUint8(_charmaps[t]) >= int32(0330) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } cd = _combine_to_from(tls, t, f) - switch int32(_charmaps[f]) { + switch Int32FromUint8(_charmaps[f]) { case int32(UTF_16): fallthrough case int32(UTF_32): @@ -98692,7 +98690,7 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { func _get_16(tls *TLS, s uintptr, e int32) (r uint32) { e &= int32(1) - return uint32(int32(*(*uint8)(unsafe.Pointer(s + uintptr(e))))<>(uint32(2)*x%uint32(8)) | int32(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) + x = c - Uint32FromInt32(int32(4)*Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1)))))) + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)))))>>(uint32(2)*x%uint32(8)) | Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) if x < uint32(256) { v1 = x } else { @@ -98808,7 +98806,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } c = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) l = uint32(1) - switch int32(type1) { + switch Int32FromUint8(type1) { case int32(UTF_8): goto _2 case int32(US_ASCII): @@ -98859,13 +98857,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } l = Xmbrtowc(tls, bp+24, *(*uintptr)(unsafe.Pointer(in)), *(*Tsize_t)(unsafe.Pointer(inb)), bp+16) - if l == uint32(-Int32FromInt32(1)) { + if l == Uint32FromInt32(-Int32FromInt32(1)) { goto ilseq } - if l == uint32(-Int32FromInt32(2)) { + if l == Uint32FromInt32(-Int32FromInt32(2)) { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(bp + 24))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 24))) goto _23 _3: ; @@ -98879,7 +98877,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < l { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) if !(0 != 0) { goto _24 } @@ -98891,7 +98889,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint32(4) { goto starved } - c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) _24: ; if c-uint32(0xd800) < uint32(0x800) || c >= uint32(0x110000) { @@ -98910,19 +98908,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint32(2) { goto starved } - c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) if c-Uint32FromInt32(0xdc00) < uint32(0x400) { goto ilseq } if c-Uint32FromInt32(0xd800) < uint32(0x400) { - if uint32(int32(type1)-int32(UCS2BE)) < uint32(2) { + if Uint32FromInt32(Int32FromUint8(type1)-int32(UCS2BE)) < uint32(2) { goto ilseq } l = uint32(4) if *(*Tsize_t)(unsafe.Pointer(inb)) < uint32(4) { goto starved } - d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), int32(type1)) + d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), Int32FromUint8(type1)) if d-Uint32FromInt32(0xdc00) >= uint32(0x400) { goto ilseq } @@ -98939,7 +98937,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), 0) - if int32(type1) == int32(UCS2) { + if Int32FromUint8(type1) == int32(UCS2) { if c == uint32(0xfffe) { v26 = int32(UCS2LE) } else { @@ -98954,7 +98952,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } v25 = v27 } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v25) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v25) if c == uint32(0xfffe) || c == uint32(0xfeff) { l = uint32(2) } @@ -98974,7 +98972,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v28 = int32(UTF_32BE) } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v28) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v28) if c == uint32(0xfffe0000) || c == uint32(0xfeff) { l = uint32(4) } @@ -98986,8 +98984,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto _23 } - if c-uint32(0xa1) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + if c-uint32(0xa1) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } l = uint32(2) @@ -98995,17 +98993,17 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if c-uint32(129) <= uint32(Int32FromInt32(159)-Int32FromInt32(129)) { + if c-uint32(129) <= Uint32FromInt32(Int32FromInt32(159)-Int32FromInt32(129)) { c -= uint32(129) } else { - if c-uint32(224) <= uint32(Int32FromInt32(239)-Int32FromInt32(224)) { + if c-uint32(224) <= Uint32FromInt32(Int32FromInt32(239)-Int32FromInt32(224)) { c -= uint32(193) } else { goto ilseq } } c *= uint32(2) - if d-uint32(64) <= uint32(Int32FromInt32(158)-Int32FromInt32(64)) { + if d-uint32(64) <= Uint32FromInt32(Int32FromInt32(158)-Int32FromInt32(64)) { if d == uint32(127) { goto ilseq } @@ -99014,7 +99012,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } d -= uint32(64) } else { - if d-uint32(159) <= uint32(Int32FromInt32(252)-Int32FromInt32(159)) { + if d-uint32(159) <= Uint32FromInt32(Int32FromInt32(252)-Int32FromInt32(159)) { c++ d -= uint32(159) } @@ -99039,10 +99037,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) if c == uint32(0x8e) { c = d - if c-uint32(0xa1) > uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + if c-uint32(0xa1) > Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { goto ilseq } - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } c -= uint32(0xa1) @@ -99070,7 +99068,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c != uint32('(') && c != uint32('$') { goto ilseq } - switch uint32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { + switch Uint32FromInt32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { case uint32('B'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(0) goto _1 @@ -99080,10 +99078,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui case uint32('I'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(4) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('@')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('@')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(2) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('B')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('B')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(3) goto _1 } @@ -99119,7 +99117,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto ilseq } if c-uint32(0x21) < uint32(0x5e) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) } break } @@ -99152,11 +99150,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d < uint32(0xa1) && int32(type1) == int32(GB2312) { + if d < uint32(0xa1) && Int32FromUint8(type1) == int32(GB2312) { goto ilseq } if d-uint32(0x40) >= uint32(191) || d == uint32(127) { - if d-uint32('0') > uint32(9) || int32(type1) != int32(GB18030) { + if d-uint32('0') > uint32(9) || Int32FromUint8(type1) != int32(GB18030) { goto ilseq } l = uint32(4) @@ -99227,23 +99225,23 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d-uint32(0x40) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < uint32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { + if d-uint32(0x40) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < Uint32FromInt32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { goto ilseq } d -= uint32(0x40) if d > uint32(0x3e) { d -= uint32(0x22) } - if c-uint32(0xa1) >= uint32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { - if c-uint32(0x87) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { + if c-uint32(0xa1) >= Uint32FromInt32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { + if c-uint32(0x87) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { goto ilseq } if c < uint32(0xa1) { c -= uint32(0x87) } else { - c -= uint32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) + c -= Uint32FromInt32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) } - c = uint32(int32(_hkscs[uint32(4867)+(c*uint32(157)+d)/uint32(16)])>>((c*uint32(157)+d)%uint32(16))%int32(2)<>((c*uint32(157)+d)%uint32(16))%int32(2)< *(*Tsize_t)(unsafe.Pointer(outb)) { goto toobig } @@ -99272,7 +99270,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } c -= uint32(0xa1) - c = uint32(int32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(&_big5)) + uintptr(c)*314 + uintptr(d)*2))) | BoolInt32(c == uint32(0x27) && (d == uint32(0x3a) || d == uint32(0x3c) || d == uint32(0x42)))<= uint32(93) || d >= uint32(94) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) d += uint32(0xa1) - if c >= uint32(93) || c >= uint32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { + if c >= uint32(93) || c >= Uint32FromInt32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { goto ilseq } if d-uint32('A') < uint32(26) { @@ -99301,7 +99299,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if d-uint32('a') < uint32(26) { d = d - uint32('a') + uint32(26) } else { - if d-uint32(0x81) < uint32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { + if d-uint32(0x81) < Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { d = d - uint32(0x81) + uint32(52) } else { goto ilseq @@ -99311,7 +99309,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(0x20) { c = uint32(178)*c + d } else { - c = uint32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d + c = Uint32FromInt32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d } c += uint32(0xac00) d = uint32(0xac00) @@ -99366,7 +99364,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } _23: ; - switch int32(totype) { + switch Int32FromUint8(totype) { case int32(WCHAR_T): goto _35 case int32(UTF_8): @@ -99406,20 +99404,20 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint32(4) { goto toobig } - *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = int32(c) + *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = Int32FromUint32(c) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(4) goto _51 _36: ; if *(*Tsize_t)(unsafe.Pointer(outb)) < uint32(4) { - k = uint32(Xwctomb(tls, bp+44, int32(c))) + k = Uint32FromInt32(Xwctomb(tls, bp+44, Int32FromUint32(c))) if *(*Tsize_t)(unsafe.Pointer(outb)) < k { goto toobig } Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(out)), bp+44, k) } else { - k = uint32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), int32(c))) + k = Uint32FromInt32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), Int32FromUint32(c))) } *(*uintptr)(unsafe.Pointer(out)) += uintptr(k) *(*Tsize_t)(unsafe.Pointer(outb)) -= k @@ -99453,13 +99451,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v55 = out v54 = *(*uintptr)(unsafe.Pointer(v55)) *(*uintptr)(unsafe.Pointer(v55))++ - *(*int8)(unsafe.Pointer(v54)) = int8(c) + *(*int8)(unsafe.Pointer(v54)) = Int8FromUint32(c) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(1) goto _51 _53: ; d = c - c = uint32(int32(4) * int32(totype)) + c = Uint32FromInt32(int32(4) * Int32FromUint8(totype)) for { if !(c < uint32(256)) { break @@ -99488,8 +99486,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui c = uint32('~') goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) goto revout } c = _uni_to_jis(tls, c) @@ -99509,7 +99507,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v59 = int32(176) } - *(*int8)(unsafe.Pointer(v57)) = int8((c+uint32(1))/uint32(2) + uint32(v59)) + *(*int8)(unsafe.Pointer(v57)) = Int8FromUint32((c+uint32(1))/uint32(2) + Uint32FromInt32(v59)) v61 = out v60 = *(*uintptr)(unsafe.Pointer(v61)) *(*uintptr)(unsafe.Pointer(v61))++ @@ -99518,7 +99516,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v62 = d + uint32(126) } - *(*int8)(unsafe.Pointer(v60)) = int8(v62) + *(*int8)(unsafe.Pointer(v60)) = Int8FromUint32(v62) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(2) goto _51 _40: @@ -99526,8 +99524,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) } else { c = _uni_to_jis(tls, c) } @@ -99540,11 +99538,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v64 = out v63 = *(*uintptr)(unsafe.Pointer(v64)) *(*uintptr)(unsafe.Pointer(v64))++ - *(*int8)(unsafe.Pointer(v63)) = int8(c/uint32(256) + uint32(0x80)) + *(*int8)(unsafe.Pointer(v63)) = Int8FromUint32(c/uint32(256) + uint32(0x80)) v66 = out v65 = *(*uintptr)(unsafe.Pointer(v66)) *(*uintptr)(unsafe.Pointer(v66))++ - *(*int8)(unsafe.Pointer(v65)) = int8(c%uint32(256) + uint32(0x80)) + *(*int8)(unsafe.Pointer(v65)) = Int8FromUint32(c%uint32(256) + uint32(0x80)) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(2) goto _51 _41: @@ -99552,7 +99550,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { if *(*Tsize_t)(unsafe.Pointer(outb)) < uint32(7) { goto toobig } @@ -99591,7 +99589,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v82 = out v81 = *(*uintptr)(unsafe.Pointer(v82)) *(*uintptr)(unsafe.Pointer(v82))++ - *(*int8)(unsafe.Pointer(v81)) = int8(c - uint32(0xff61) + uint32(0x21)) + *(*int8)(unsafe.Pointer(v81)) = Int8FromUint32(c - uint32(0xff61) + uint32(0x21)) } } v84 = out @@ -99631,11 +99629,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v96 = out v95 = *(*uintptr)(unsafe.Pointer(v96)) *(*uintptr)(unsafe.Pointer(v96))++ - *(*int8)(unsafe.Pointer(v95)) = int8(c / uint32(256)) + *(*int8)(unsafe.Pointer(v95)) = Int8FromUint32(c / uint32(256)) v98 = out v97 = *(*uintptr)(unsafe.Pointer(v98)) *(*uintptr)(unsafe.Pointer(v98))++ - *(*int8)(unsafe.Pointer(v97)) = int8(c % uint32(256)) + *(*int8)(unsafe.Pointer(v97)) = Int8FromUint32(c % uint32(256)) v100 = out v99 = *(*uintptr)(unsafe.Pointer(v100)) *(*uintptr)(unsafe.Pointer(v100))++ @@ -99663,14 +99661,14 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ; _43: ; - if c < uint32(0x10000) || uint32(int32(totype)-int32(UCS2BE)) < uint32(2) { + if c < uint32(0x10000) || Uint32FromInt32(Int32FromUint8(totype)-int32(UCS2BE)) < uint32(2) { if c >= uint32(0x10000) { c = uint32(0xFFFD) } if *(*Tsize_t)(unsafe.Pointer(outb)) < uint32(2) { goto toobig } - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(2) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(2) goto _51 @@ -99679,8 +99677,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto toobig } c -= uint32(0x10000) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), int32(totype)) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), Int32FromUint8(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(4) goto _51 @@ -99694,7 +99692,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint32(4) { goto toobig } - _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(4) goto _51 @@ -99712,19 +99710,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ilseq: ; err = int32(EILSEQ) - x = uint32(-Int32FromInt32(1)) + x = Uint32FromInt32(-Int32FromInt32(1)) goto end goto toobig toobig: ; err = int32(E2BIG) - x = uint32(-Int32FromInt32(1)) + x = Uint32FromInt32(-Int32FromInt32(1)) goto end goto starved starved: ; err = int32(EINVAL) - x = uint32(-Int32FromInt32(1)) + x = Uint32FromInt32(-Int32FromInt32(1)) goto end end: ; @@ -99954,7 +99952,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { break } z = X__strchrnul(tls, path, int32(':')) - l = uint32(int32(z) - int32(path)) + l = Uint32FromInt32(int32(z) - int32(path)) if l >= uint32(256)-n-uint32(2) { goto _10 } @@ -100194,7 +100192,7 @@ func _skipspace(tls *TLS, s uintptr) (r uintptr) { _, _ = v1, v2 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -100217,9 +100215,9 @@ func _evalprim(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { return __ccgo_ts } s = _skipspace(tls, s) - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { (*Tst)(unsafe.Pointer(st)).Fr = Xstrtoul(tls, s, bp, int32(10)) - if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == uint32(-Int32FromInt32(1)) { + if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == Uint32FromInt32(-Int32FromInt32(1)) { return __ccgo_ts } return _skipspace(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -100419,7 +100417,7 @@ func X__pleval(tls *TLS, s uintptr, n uint32) (r uint32) { if int32(*(*int8)(unsafe.Pointer(s))) == int32(';') { v1 = (*(*Tst)(unsafe.Pointer(bp))).Fr } else { - v1 = uint32(-Int32FromInt32(1)) + v1 = Uint32FromInt32(-Int32FromInt32(1)) } return v1 } @@ -100439,7 +100437,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { var _ /* part at bp+24 */ [24]int8 var _ /* tmp_locale at bp+0 */ t__locale_struct _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, l, lm, lm1, p, part1, ret, s, same, z, v3, v4, v5, v6 - if uint32(cat) > uint32(LC_ALL) { + if Uint32FromInt32(cat) > uint32(LC_ALL) { return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&X__locale_lock))) @@ -100459,7 +100457,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { } z = X__strchrnul(tls, p, int32(';')) if int32(z)-int32(p) <= int32(LOCALE_NAME_MAX) { - Xmemcpy(tls, bp+24, p, uint32(int32(z)-int32(p))) + Xmemcpy(tls, bp+24, p, Uint32FromInt32(int32(z)-int32(p))) (*(*[24]int8)(unsafe.Pointer(bp + 24)))[int32(z)-int32(p)] = 0 if *(*int8)(unsafe.Pointer(z)) != 0 { p = z + uintptr(1) @@ -100627,7 +100625,7 @@ _4: } fw = 0 for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } fw = int32(10)*fw + (int32(*(*int8)(unsafe.Pointer(fmt))) - int32('0')) @@ -100642,7 +100640,7 @@ _4: lp = 0 fmt++ for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } lp = int32(10)*lp + (int32(*(*int8)(unsafe.Pointer(fmt))) - int32('0')) @@ -100656,7 +100654,7 @@ _4: rp = 0 fmt++ for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } rp = int32(10)*rp + (int32(*(*int8)(unsafe.Pointer(fmt))) - int32('0')) @@ -100674,7 +100672,7 @@ _4: w = fw } x = VaFloat64(&ap) - l = uint32(Xsnprintf(tls, s, n, __ccgo_ts+485, VaList(bp+8, w, rp, x))) + l = Uint32FromInt32(Xsnprintf(tls, s, n, __ccgo_ts+485, VaList(bp+8, w, rp, x))) if l >= n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(E2BIG) return -int32(1) @@ -100845,7 +100843,7 @@ func Xtextdomain(tls *TLS, domainname uintptr) (r uintptr) { return uintptr(0) } if !(_current_domain != 0) { - _current_domain = Xmalloc(tls, uint32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + _current_domain = Xmalloc(tls, Uint32FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if !(_current_domain != 0) { return uintptr(0) } @@ -100981,7 +100979,7 @@ func Xreallocarray(tls *TLS, ptr uintptr, m Tsize_t, n Tsize_t) (r uintptr) { trc("tls=%v ptr=%v m=%v n=%v, (%v:)", tls, ptr, m, n, origin(2)) defer func() { trc("-> %v", r) }() } - if n != 0 && m > uint32(-Int32FromInt32(1))/n { + if n != 0 && m > Uint32FromInt32(-Int32FromInt32(1))/n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -101055,7 +101053,7 @@ func X__expo2(tls *TLS, x float64, sign float64) (r float64) { var v1 Tuint64_t _, _ = scale, v1 /* note that k is odd and scale*scale overflows */ - v1 = uint64(uint32(Int32FromInt32(0x3ff)+_k2/Int32FromInt32(2))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(e != 0) { if *(*Tuint64_t)(unsafe.Pointer(bp))<> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(e != 0) { if *(*Tuint32_t)(unsafe.Pointer(bp))<> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix <= uint32(0x400f6a7a) { /* |x| ~<= 5pi/4 */ if ix&uint32(0xfffff) == uint32(0x921fb) { /* |x| ~= pi/2 or 2pi/2 */ @@ -101458,8 +101456,8 @@ medium: } *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - ex = int32(ix >> int32(20)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ex = Int32FromUint32(ix >> int32(20)) if ex-ey > int32(16) { /* 2nd round, good to 118 bits */ t = r w = fn * _pio2_2 @@ -101467,7 +101465,7 @@ medium: w = fn*_pio2_2t - (t - r - w) *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if ex-ey > int32(49) { /* 3rd round, good to 151 bits, covers all cases */ t = r w = fn * _pio2_3 @@ -101491,8 +101489,8 @@ _1: } /* set z = scalbn(|x|,-ilogb(x)+23) */ *(*float64)(unsafe.Pointer(bp)) = x - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) >> Int32FromInt32(12) - *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) >> Int32FromInt32(12) + *(*Tuint64_t)(unsafe.Pointer(bp)) |= Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) z = *(*float64)(unsafe.Pointer(bp)) i = 0 for { @@ -101511,7 +101509,7 @@ _1: for (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] == float64(0) { i-- } - n = X__rem_pio2_large(tls, bp+8, bp+32, int32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) + n = X__rem_pio2_large(tls, bp+8, bp+32, Int32FromUint32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) if sign != 0 { *(*float64)(unsafe.Pointer(y)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[0] *(*float64)(unsafe.Pointer(y + 1*8)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[int32(1)] @@ -102083,9 +102081,9 @@ func X__rem_pio2f(tls *TLS, x float32, y uintptr) (r int32) { return 0 } /* scale x into [2^23, 2^24-1] */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) - e0 = int32(ix>>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ - *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - uint32(e0<> int32(31)) + e0 = Int32FromUint32(ix>>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - Uint32FromInt32(e0<> int32(63)) + return Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) } // C documentation @@ -102145,7 +102143,7 @@ func X__signbitf(tls *TLS, x float32) (r int32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - return int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + return Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) } func X__signbitl(tls *TLS, x float64) (r int32) { @@ -102238,7 +102236,7 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) big = BoolInt32(hx&uint32(0x7fffffff) >= uint32(0x3FE59428)) /* |x| >= 0.6744 */ if big != 0 { - sign = int32(hx >> int32(31)) + sign = Int32FromUint32(hx >> int32(31)) if sign != 0 { x = -x y = -y @@ -102273,13 +102271,13 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { } /* -1.0/(x+r) has up to 2ulp error, so compute it accurately */ w0 = w - v2 = *(*Tuint64_t)(unsafe.Pointer(&w0))>>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) /* x < 1 domain error is handled in the called functions */ - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| < 2, up to 2ulp error in [1,1.125] */ return Xlog1p(tls, x-Float64FromInt32(1)+Xsqrt(tls, (x-Float64FromInt32(1))*(x-Float64FromInt32(1))+Float64FromInt32(2)*(x-Float64FromInt32(1)))) } - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| < 0x1p26 */ return Xlog(tls, Float64FromInt32(2)*x-Float64FromInt32(1)/(x+Xsqrt(tls, x*x-Float64FromInt32(1)))) } @@ -102524,12 +102522,12 @@ func Xacoshf(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x a = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - if a < uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { - if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { @@ -102769,15 +102767,15 @@ func Xasinhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i x3 = *(*float32)(unsafe.Pointer(bp)) - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { - if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { @@ -103033,7 +103031,7 @@ _2: } } /* |y/x| > 0x1p64 */ - if ix+uint32(Int32FromInt32(64)< 0x1p26 */ - if ix+uint32(Int32FromInt32(26)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) y3 = *(*float64)(unsafe.Pointer(bp)) - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { /* handle underflow */ if e == uint32(0) { if uint32(4) == uint32(4) { @@ -103392,10 +103390,10 @@ func Xatanhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) y3 = float64(*(*float32)(unsafe.Pointer(bp))) - if *(*Tuint32_t)(unsafe.Pointer(bp)) < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(1)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -103695,12 +103693,12 @@ func Xceilf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -103863,7 +103861,7 @@ func Xcos(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) @@ -103957,7 +103955,7 @@ func Xcosf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -104003,12 +104001,12 @@ func Xcosh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(2) */ if w < uint32(0x3fe62e42) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -104256,7 +104254,7 @@ func Xerfc(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104401,7 +104399,7 @@ func Xerff(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -104441,7 +104439,7 @@ func Xerfcf(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104609,7 +104607,7 @@ _3: kd -= X__exp_data.Fshift r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<>int32(52)&uint64(0x7ff) < uint64(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { + if *(*Tuint64_t)(unsafe.Pointer(bp + 8))>>int32(52)&uint64(0x7ff) < Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { if !(y != 0) { return _p10[int32(*(*float64)(unsafe.Pointer(bp)))+int32(15)] } @@ -104736,7 +104734,7 @@ func Xexp10f(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp + 4)) = *(*float32)(unsafe.Pointer(bp)) /* fabsf(n) < 8 without raising invalid on nan */ - if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < uint32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { + if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { if !(y != 0) { return _p101[int32(*(*float32)(unsafe.Pointer(bp)))+int32(7)] } @@ -104903,7 +104901,7 @@ _5: kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4043687A) { /* if |x|>=56*ln2 */ *(*float64)(unsafe.Pointer(bp)) = x3 @@ -105238,7 +105236,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return Float64FromFloat64(1) + Float64FromFloat64(2)*(x3-e) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ twopk = *(*float64)(unsafe.Pointer(bp + 8)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + Float64FromFloat64(1) @@ -105249,7 +105247,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return y3 - Float64FromFloat64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { @@ -105295,7 +105293,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4195b844) { /* if |x|>=27*ln2 */ if hx > uint32(0x7f800000) { /* NaN */ @@ -105373,7 +105371,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return float32(Float64FromFloat32(1) + Float64FromFloat32(2)*(float64(x3)-e)) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) + k) << int32(23)) /* 2^k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) + k) << int32(23)) /* 2^k */ twopk = float64(*(*float32)(unsafe.Pointer(bp))) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = float64(x3) - e + Float64FromFloat32(1) @@ -105384,7 +105382,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return float32(y3 - Float64FromFloat32(1)) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { y3 = (float64(x3) - e + float64(Float32FromInt32(1)-*(*float32)(unsafe.Pointer(bp)))) * twopk } else { @@ -105603,7 +105601,7 @@ func Xfloor(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -105663,12 +105661,12 @@ func Xfloorf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -105730,13 +105728,13 @@ func _normalize(tls *TLS, x float64) (r Tnum) { var v1 float64 _, _, _, _, _ = e, ix, sign, v1, v2 ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - e = int32(ix >> int32(52)) + e = Int32FromUint64(ix >> int32(52)) sign = e & int32(0x800) e &= int32(0x7ff) if !(e != 0) { v1 = x * float64(9.223372036854776e+18) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) - e = int32(ix >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(ix >> int32(52) & uint64(0x7ff)) if e != 0 { v2 = e - int32(63) } else { @@ -105894,7 +105892,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { } e -= d /* convert to double */ - i = int64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ + i = Int64FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ if sign != 0 { i = -i } @@ -105916,7 +105914,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { /* one bit is lost when scaled, add another top bit to only round once at conversion if it is inexact */ if *(*Tuint64_t)(unsafe.Pointer(bp))<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) + i = Int64FromUint64((*(*Tuint64_t)(unsafe.Pointer(bp))>>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) if sign != 0 { i = -i } @@ -105988,12 +105986,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = y } else { v9 = x @@ -106045,12 +106043,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = y } else { v9 = x @@ -106110,12 +106108,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = x } else { v9 = y @@ -106167,12 +106165,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = x } else { v9 = y @@ -106235,9 +106233,9 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* in the followings uxi should be ux.i, but then gcc wrongly adds */ /* float load/store to inner loops ruining performance and code size */ uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) @@ -106269,7 +106267,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ex-- i <<= uint64(1) } - uxi <<= uint64(-ex + int32(1)) + uxi <<= Uint64FromInt32(-ex + int32(1)) } else { uxi &= -Uint64FromUint64(1) >> Int32FromInt32(12) uxi |= Uint64FromUint64(1) << Int32FromInt32(52) @@ -106286,7 +106284,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ey-- i <<= uint64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= uint64(-ey + int32(1)) + *(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= Uint64FromInt32(-ey + int32(1)) } else { *(*Tuint64_t)(unsafe.Pointer(bp + 16)) &= -Uint64FromUint64(1) >> Int32FromInt32(12) *(*Tuint64_t)(unsafe.Pointer(bp + 16)) |= Uint64FromUint64(1) << Int32FromInt32(52) @@ -106329,11 +106327,11 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { /* scale result */ if ex > 0 { uxi -= Uint64FromUint64(1) << Int32FromInt32(52) - uxi |= uint64(ex) << int32(52) + uxi |= Uint64FromInt32(ex) << int32(52) } else { - uxi >>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } - uxi |= uint64(sx) << int32(63) + uxi |= Uint64FromInt32(sx) << int32(63) *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi return *(*float64)(unsafe.Pointer(bp + 8)) } @@ -106378,8 +106376,8 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) sx = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) & uint32(0x80000000) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106427,7 +106425,7 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106470,9 +106468,9 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { /* scale result up */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } uxi |= sx *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi @@ -106508,7 +106506,7 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { Fd float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ee = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(ee != 0) { if x != 0 { x = Xfrexp(tls, x*float64(1.8446744073709552e+19), e) @@ -106550,7 +106548,7 @@ func Xfrexpf(tls *TLS, x float32, e uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + ee = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(ee != 0) { if x != 0 { x = Xfrexpf(tls, float32(float64(x)*float64(1.8446744073709552e+19)), e) @@ -106655,8 +106653,8 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) { })(unsafe.Pointer(bp + 8)) = ut } /* special cases */ - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) x = *(*float64)(unsafe.Pointer(bp)) y = *(*float64)(unsafe.Pointer(bp + 8)) /* note: hypot(inf,nan) == inf */ @@ -106748,19 +106746,19 @@ func Xhypotf(tls *TLS, x float32, y float32) (r float32) { } x = *(*float32)(unsafe.Pointer(bp)) y = *(*float32)(unsafe.Pointer(bp + 4)) - if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(25)<= Uint32FromInt32(Int32FromInt32(0xff)<= Uint32FromInt32(Int32FromInt32(25)<= uint32((Int32FromInt32(0x7f)+Int32FromInt32(60))<= Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(60))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { i <<= uint64(12) if i == uint64(0) { @@ -106876,7 +106874,7 @@ func Xilogbf(tls *TLS, x3 float32) (r int32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) - e = int32(i >> int32(23) & uint32(0xff)) + e = Int32FromUint32(i >> int32(23) & uint32(0xff)) if !(e != 0) { i <<= uint32(9) if i == uint32(0) { @@ -107684,7 +107682,7 @@ func Xj1(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { return Float64FromInt32(1) / (x * x) @@ -108020,7 +108018,7 @@ func Xj1f(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return Float32FromInt32(1) / (x * x) @@ -108309,7 +108307,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108511,7 +108509,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108605,7 +108603,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { var ix Tuint32_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = a, b, h, i, ix, k, nf, nm1, q0, q1, sign, t, temp, tmp, w, z, v6 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108770,7 +108768,7 @@ func Xynf(tls *TLS, n int32, x float32) (r float32) { var ib, ix Tuint32_t _, _, _, _, _, _, _, _, _, _ = a, b, i, ib, ix, nm1, sign, temp, v1, v3 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108972,12 +108970,12 @@ func X__lgamma_r(tls *TLS, x float64, signgamp uintptr) (r1 float64) { *(*float64)(unsafe.Pointer(bp)) = x /* purge off +-inf, NaN, +-0, tiny and negative arguments */ *(*int32)(unsafe.Pointer(signgamp)) = int32(1) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix >= uint32(0x7ff00000) { return x * x } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(70))<> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) ix = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return x * x @@ -109496,7 +109494,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109517,8 +109515,8 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<>Int32FromInt32(20)) - int32(0x3ff) + hx += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k += Int32FromUint32(hx>>Int32FromInt32(20)) - int32(0x3ff) hx = hx&uint32(0x000fffff) + uint32(0x3fe6a09e) *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(hx)<>Int32FromInt32(23)) - int32(0x7f) + ix += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k += Int32FromUint32(ix>>Int32FromInt32(23)) - int32(0x7f) ix = ix&uint32(0x007fffff) + uint32(0x3f3504f3) *(*Tuint32_t)(unsafe.Pointer(bp)) = ix x = *(*float32)(unsafe.Pointer(bp)) @@ -109785,7 +109783,7 @@ func Xlog1p(tls *TLS, x3 float64) (r float64) { } /* log1p(-1) = -inf */ return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } - if hx<> int32(32)) - hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) - k = int32(hu>>Int32FromInt32(20)) - int32(0x3ff) + hu += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k = Int32FromUint32(hu>>Int32FromInt32(20)) - int32(0x3ff) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(54) { if k >= int32(2) { @@ -109885,7 +109883,7 @@ func Xlog1pf(tls *TLS, x3 float32) (r float32) { } /* log1p(-1)=+inf */ return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } - if ix<>Int32FromInt32(23)) - int32(0x7f) + iu += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k = Int32FromUint32(iu>>Int32FromInt32(23)) - int32(0x7f) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(25) { if k >= int32(2) { @@ -110010,7 +110008,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { _9: return v8 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -110031,8 +110029,8 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -110134,16 +110132,16 @@ func Xlog2f(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + k = Int32FromUint32(tmp) >> int32(23) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -110314,7 +110312,7 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) } - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -110328,14 +110326,14 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % uint32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + i = Int32FromUint32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ iz = ix - tmp&uint32(0xff800000) invc = (*(*struct { Finvc float64 @@ -110507,7 +110505,7 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) /* no fractional part */ if e >= int32(52) { *(*float64)(unsafe.Pointer(iptr)) = x @@ -110556,7 +110554,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) /* no fractional part */ if e >= int32(23) { *(*float32)(unsafe.Pointer(iptr)) = x @@ -110572,7 +110570,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { *(*float32)(unsafe.Pointer(iptr)) = *(*float32)(unsafe.Pointer(bp)) return x } - mask = uint32(int32(0x007fffff) >> e) + mask = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&mask == uint32(0) { *(*float32)(unsafe.Pointer(iptr)) = x *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x80000000) @@ -110695,7 +110693,7 @@ _2: *(*Tuint64_t)(unsafe.Pointer(bp + 8))++ } } - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) /* raise overflow if ux.f is infinite and x is finite */ if e == int32(0x7ff) { if uint32(8) == uint32(4) { @@ -110896,7 +110894,7 @@ _2: v6 = *(*uint64)(unsafe.Pointer(bp + 8)) goto _7 _7: - if int32(v6>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v6>>Int32FromInt32(63)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16)) |= uint32(0x80000000) } } else { @@ -110905,7 +110903,7 @@ _2: v8 = *(*uint32)(unsafe.Pointer(bp)) goto _9 _9: - if int32(v8>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v8>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ @@ -110915,7 +110913,7 @@ _2: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- @@ -110990,8 +110988,8 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF2) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(iy >> int32(52) & uint64(0x7ff)) if e < int32(0x3ff) { return 0 } @@ -111237,7 +111235,7 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) topx = _top124(tls, x1) topy = _top124(tls, y1) - if topx-uint32(0x001) >= uint32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topx-uint32(0x001) >= Uint32FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1. */ /* Special cases: (x < 0x1p-126 or inf or nan) or @@ -111293,12 +111291,12 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { return X__math_invalid(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) + sign_bias = Uint32FromInt32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) } ix &= uint64(0x7fffffffffffffff) topx &= uint32(0x7ff) } - if topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: sign_bias == 0 here because y is not odd. */ v10 = float64(1) if ix == *(*Tuint64_t)(unsafe.Pointer(&v10)) { @@ -111390,10 +111388,10 @@ func _log2_inline(tls *TLS, ix Tuint32_t) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF3) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ + k = Int32FromUint32(top) >> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -111439,7 +111437,7 @@ _2: kd -= X__exp2f_data.Fshift_scaled /* k/N */ r = xd - kd /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */ - t = *(*Tuint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + uintptr(ki%uint64(Int32FromInt32(1)<> int32(23) & uint32(0xff)) + e = Int32FromUint32(iy >> int32(23) & uint32(0xff)) if e < int32(0x7f) { return 0 } if e > Int32FromInt32(0x7f)+Int32FromInt32(23) { return int32(2) } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { return 0 } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { return int32(1) } return int32(2) @@ -111497,7 +111495,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { sign_bias = uint32(0) ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) iy = *(*Tuint32_t)(unsafe.Pointer(&y1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ if _zeroinfnan1(tls, iy) != 0 { if uint32(2)*iy == uint32(0) { @@ -111509,10 +111507,10 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { return x1 + y1 } - if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { + if uint32(2)*ix == Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) } - if BoolInt32(uint32(2)*ix < uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { + if BoolInt32(uint32(2)*ix < Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { return Float32FromFloat32(0) } /* |x|<1 && y==inf or |x|>1 && y==-inf. */ return y1 * y1 @@ -111543,7 +111541,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { return X__math_invalidf(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) + sign_bias = Uint32FromInt32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) } ix &= uint32(0x7fffffff) } @@ -111552,7 +111550,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } } logx = _log2_inline(tls, ix) @@ -111675,10 +111673,10 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) - sy = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sy = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint64_t)(unsafe.Pointer(bp + 16))<> Int32FromInt32(12) uxi |= Uint64FromUint64(1) << Int32FromInt32(52) @@ -111723,7 +111721,7 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { ey-- i <<= uint64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= uint64(-ey + int32(1)) + *(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= Uint64FromInt32(-ey + int32(1)) } else { *(*Tuint64_t)(unsafe.Pointer(bp + 16)) &= -Uint64FromUint64(1) >> Int32FromInt32(12) *(*Tuint64_t)(unsafe.Pointer(bp + 16)) |= Uint64FromUint64(1) << Int32FromInt32(52) @@ -111777,9 +111775,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint64FromUint64(1) << Int32FromInt32(52) - uxi |= uint64(ex) << int32(52) + uxi |= Uint64FromInt32(ex) << int32(52) } else { - uxi >>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi x = *(*float64)(unsafe.Pointer(bp + 8)) @@ -111792,9 +111790,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -111846,10 +111844,10 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) - sx = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) - sy = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + sx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) + sy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111894,7 +111892,7 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111948,9 +111946,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi x = *(*float32)(unsafe.Pointer(bp + 4)) @@ -111963,9 +111961,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -112011,8 +112009,8 @@ func Xrint(tls *TLS, x float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - s = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + s = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x } @@ -112060,8 +112058,8 @@ func Xrintf(tls *TLS, x float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) - s = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + s = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x } @@ -112119,7 +112117,7 @@ func Xround(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x3 } @@ -112184,7 +112182,7 @@ func Xroundf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x3 } @@ -112408,7 +112406,7 @@ func Xscalbn(tls *TLS, x float64, n int32) (r float64) { } } } - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(Int32FromInt32(0x3ff)+n) << int32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) = Uint64FromInt32(Int32FromInt32(0x3ff)+n) << int32(52) x = y * *(*float64)(unsafe.Pointer(bp)) return x } @@ -112450,7 +112448,7 @@ func Xscalbnf(tls *TLS, x float32, n int32) (r float32) { } } } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32(Int32FromInt32(0x7f)+n) << int32(23) + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32(Int32FromInt32(0x7f)+n) << int32(23) x = float32(y * float64(*(*float32)(unsafe.Pointer(bp)))) return x } @@ -112532,7 +112530,7 @@ func Xsin(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) @@ -112605,7 +112603,7 @@ func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) s = X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) c = X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) switch n & Uint32FromInt32(3) { @@ -112752,7 +112750,7 @@ func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) s = float64(X__sindf(tls, *(*float64)(unsafe.Pointer(bp)))) c = float64(X__cosdf(tls, *(*float64)(unsafe.Pointer(bp)))) switch n & Uint32FromInt32(3) { @@ -112814,7 +112812,7 @@ func Xsinf(tls *TLS, x3 float32) (r float32) { var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ @@ -112931,14 +112929,14 @@ func Xsinh(tls *TLS, x float64) (r float64) { h = -h } /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) absx = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(DBL_MAX) */ if w < uint32(0x40862e42) { t = Xexpm1(tls, absx) if w < uint32(0x3ff00000) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<> int32(52) - if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { + if top-uint64(0x001) >= Uint64FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return x1 @@ -113072,7 +113070,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { x = 4^e m; with integer e, and m in [1, 4) m: fixed point representation [2.62] 2^e is the exponent part of the result. */ - even = int32(top & uint64(1)) + even = Int32FromUint64(top & uint64(1)) m = ix<>= uint64(1) @@ -113116,7 +113114,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { /* handle rounding modes and inexact exception: only (s+1)^2 == 2^42 m case is exact otherwise add a tiny value to cause the fenv effects. */ - tiny = uint64(v2) + tiny = Uint64FromInt64(v2) tiny |= (d1 ^ d2) & uint64(0x8000000000000000) t = *(*float64)(unsafe.Pointer(&tiny)) y = y1 + t @@ -113201,7 +113199,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { var v3 int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, t, tiny, u, y, y1, v1, v2, v3, v4 ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return x1 @@ -113215,7 +113213,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 4^e m; with int e and m in [1, 4). */ even = ix & uint32(0x00800000) @@ -113229,7 +113227,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { m = v2 /* 2^e is the exponent part of the return value. */ ey = ix >> int32(1) - ey += uint32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) + ey += Uint32FromInt32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) ey &= uint32(0x7f800000) i = ix >> Int32FromInt32(17) % uint32(128) r = uint32(X__rsqrt_tab[i]) << int32(16) @@ -113261,7 +113259,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { v3 = int32(0x01000000) } /* handle rounding and inexact exception. */ - tiny = uint32(v3) + tiny = Uint32FromInt32(v3) tiny |= (d1 ^ d2) & uint32(0x80000000) t = *(*float32)(unsafe.Pointer(&tiny)) y = y1 + t @@ -113336,8 +113334,8 @@ func Xtan(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) - return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) + return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], Int32FromUint32(n&uint32(1))) } const M_PI_29 = 1.5707963267948966 @@ -113437,8 +113435,8 @@ func Xtanf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x3, bp)) - return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) + return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), Int32FromUint32(n&uint32(1))) } const M_PI_210 = 0 @@ -113475,8 +113473,8 @@ func Xtanh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { @@ -113548,7 +113546,7 @@ func Xtanhf(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) @@ -113773,13 +113771,13 @@ func Xtgamma(tls *TLS, x3 float64) (r1 float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ return x3 + float64(X__builtin_inff(tls)) } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { return x3 } @@ -113932,7 +113930,7 @@ func Xtruncf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { return x3 } @@ -113985,14 +113983,14 @@ func Xa64l(tls *TLS, s uintptr) (r int32) { if !(d != 0) { break } - x |= uint32(int32(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e + x |= Uint32FromInt32(int32(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e goto _1 _1: ; e += int32(6) s++ } - return int32(x) + return Int32FromUint32(x) } func Xl64a(tls *TLS, x0 int32) (r uintptr) { @@ -114003,7 +114001,7 @@ func Xl64a(tls *TLS, x0 int32) (r uintptr) { var p uintptr var x Tuint32_t _, _ = p, x - x = uint32(x0) + x = Uint32FromInt32(x0) p = uintptr(unsafe.Pointer(&_s)) for { if !(x != 0) { @@ -114123,7 +114121,7 @@ func Xffs(tls *TLS, i int32) (r int32) { var v2 uint32 _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint32(i) + v2 = Uint32FromInt32(i) v3 = _a_ctz_32(tls, v2) goto _4 _4: @@ -114143,7 +114141,7 @@ func Xffsl(tls *TLS, i int32) (r int32) { var v2 uint32 _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint32(i) + v2 = Uint32FromInt32(i) v3 = _a_ctz_32(tls, v2) goto _4 _4: @@ -114162,7 +114160,7 @@ func Xffsll(tls *TLS, i int64) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_64(tls, uint64(i)) + int32(1) + v1 = _a_ctz_64(tls, Uint64FromInt64(i)) + int32(1) } else { v1 = 0 } @@ -114409,7 +114407,7 @@ func X__getauxval(tls *TLS, item uint32) (r uint32) { _ = auxv auxv = X__libc.Fauxv if item == uint32(AT_SECURE) { - return uint32(X__libc.Fsecure) + return Uint32FromInt8(X__libc.Fsecure) } for { if !(*(*Tsize_t)(unsafe.Pointer(auxv)) != 0) { @@ -114489,7 +114487,7 @@ func Xgetentropy(tls *TLS, buffer uintptr, len1 Tsize_t) (r int32) { } } pos += uintptr(ret) - len1 -= uint32(ret) + len1 -= Uint32FromInt32(ret) ret = 0 } _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) @@ -114605,7 +114603,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if *(*Twchar_t)(unsafe.Pointer(bp + 4)) != *(*Twchar_t)(unsafe.Pointer(bp)) || *(*Twchar_t)(unsafe.Pointer(bp)) == int32(':') { Xoptopt = *(*Twchar_t)(unsafe.Pointer(bp)) if int32(*(*int8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+611, optchar, uint32(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+611, optchar, Uint32FromInt32(k)) } return int32('?') } @@ -114626,7 +114624,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { return int32(':') } if Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+635, optchar, uint32(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+635, optchar, Uint32FromInt32(k)) } return int32('?') } @@ -114868,7 +114866,7 @@ func Xgetpriority(tls *TLS, which int32, who Tid_t) (r int32) { } var ret int32 _ = ret - ret = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_getpriority), which, int32(who)))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_getpriority), which, Int32FromUint32(who)))) if ret < 0 { return ret } @@ -114880,7 +114878,7 @@ func Xgetresgid(tls *TLS, rgid uintptr, egid uintptr, sgid uintptr) (r int32) { trc("tls=%v rgid=%v egid=%v sgid=%v, (%v:)", tls, rgid, egid, sgid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_getresgid32), int32(rgid), int32(egid), int32(sgid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_getresgid32), int32(rgid), int32(egid), int32(sgid)))) } func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { @@ -114888,7 +114886,7 @@ func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { trc("tls=%v ruid=%v euid=%v suid=%v, (%v:)", tls, ruid, euid, suid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_getresuid32), int32(ruid), int32(euid), int32(suid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_getresuid32), int32(ruid), int32(euid), int32(suid)))) } func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { @@ -114902,7 +114900,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { var v1, v2 uint64 var _ /* k_rlim at bp+0 */ [2]uint32 _, _, _ = ret, v1, v2 - ret = X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_prlimit64), Int32FromInt32(0), resource, Int32FromInt32(0), int32(rlim)))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_prlimit64), Int32FromInt32(0), resource, Int32FromInt32(0), int32(rlim)))) if !(ret != 0) { if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur = ^Uint64FromUint64(0) @@ -114914,7 +114912,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { if !(ret != 0) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) { return ret } - if X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_ugetrlimit), resource, int32(bp)))) < 0 { + if X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_ugetrlimit), resource, int32(bp)))) < 0 { return -int32(1) } if (*(*[2]uint32)(unsafe.Pointer(bp)))[0] == -Uint32FromUint32(1) { @@ -114962,7 +114960,7 @@ func Xgetrusage(tls *TLS, who int32, ru uintptr) (r1 int32) { Ftv_usec: int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)]), } } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { @@ -115038,7 +115036,7 @@ type Tv4l2_event = struct { var _compat_map = [20]Tioctl_compat_map{ 0: { - Fnew_req: int32(Uint32FromUint32(2)<= len1 { + if Uint32FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+824, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { return int32(ERANGE) } return 0 @@ -116001,7 +115999,7 @@ func _slash_len(tls *TLS, s uintptr) (r Tsize_t) { for int32(*(*int8)(unsafe.Pointer(s))) == int32('/') { s++ } - return uint32(int32(s) - int32(s0)) + return Uint32FromInt32(int32(s) - int32(s0)) } func Xrealpath(tls *TLS, filename uintptr, resolved uintptr) (r uintptr) { @@ -116064,7 +116062,7 @@ _3: goto _2 } z = X__strchrnul(tls, bp+uintptr(p), int32('/')) - v6 = uint32(int32(z) - int32(bp+uintptr(p))) + v6 = Uint32FromInt32(int32(z) - int32(bp+uintptr(p))) l = v6 l0 = v6 if !(l != 0) && !(check_dir != 0) { @@ -116112,7 +116110,7 @@ _3: } } k = Xreadlink(tls, bp+4097, bp, p) - if uint32(k) == p { + if Uint32FromInt32(k) == p { goto toolong } if !(k != 0) { @@ -116158,8 +116156,8 @@ _8: p++ } } - p -= uint32(k) - Xmemmove(tls, bp+uintptr(p), bp, uint32(k)) + p -= Uint32FromInt32(k) + Xmemmove(tls, bp+uintptr(p), bp, Uint32FromInt32(k)) /* Skip the stack advancement in case we have a new * absolute base path. */ goto restart @@ -116225,7 +116223,7 @@ func Xsetdomainname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_setdomainname), int32(name), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_setdomainname), int32(name), Int32FromUint32(len1)))) } func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { @@ -116233,7 +116231,7 @@ func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { trc("tls=%v which=%v who=%v prio=%v, (%v:)", tls, which, who, prio, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_setpriority), which, int32(who), prio))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_setpriority), which, Int32FromUint32(who), prio))) } type Tctx = struct { @@ -116276,7 +116274,7 @@ func Xsetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { } ret = X__syscall4(tls, int32(SYS_prlimit64), Int32FromInt32(0), resource, int32(rlim), Int32FromInt32(0)) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur < uint64(-Uint32FromUint32(1)) { v1 = (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur @@ -116322,7 +116320,7 @@ func Xsyscall(tls *TLS, n int32, va uintptr) (r int32) { e = VaInt32(&ap) f = VaInt32(&ap) _ = ap - return X__syscall_ret(tls, uint32(X__syscall6(tls, n, a, b, c, d, e, f))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, n, a, b, c, d, e, f))) } const AF_ALG = 38 @@ -116747,10 +116745,10 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { pid = v1 l = Xsnprintf(tls, bp+68, uint32(1024), __ccgo_ts+845, VaList(bp+1104, priority, bp, bp+1092, uintptr(unsafe.Pointer(&_log_ident)), __ccgo_ts+867+BoolUintptr(!(pid != 0)), pid, __ccgo_ts+869+BoolUintptr(!(pid != 0)))) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = errno_save - l2 = Xvsnprintf(tls, bp+68+uintptr(l), uint32(1024)-uint32(l), message, ap) + l2 = Xvsnprintf(tls, bp+68+uintptr(l), uint32(1024)-Uint32FromInt32(l), message, ap) if l2 >= 0 { - if uint32(l2) >= uint32(1024)-uint32(l) { - l = int32(Uint32FromInt64(1024) - Uint32FromInt32(1)) + if Uint32FromInt32(l2) >= uint32(1024)-Uint32FromInt32(l) { + l = Int32FromUint32(Uint32FromInt64(1024) - Uint32FromInt32(1)) } else { l += l2 } @@ -116759,7 +116757,7 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { l++ (*(*[1024]int8)(unsafe.Pointer(bp + 68)))[v2] = int8('\n') } - if Xsend(tls, _log_fd, bp+68, uint32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+68, uint32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { + if Xsend(tls, _log_fd, bp+68, Uint32FromInt32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+68, Uint32FromInt32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { fd = Xopen(tls, __ccgo_ts+564, Int32FromInt32(O_WRONLY)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC), 0) if fd >= 0 { Xdprintf(tls, fd, __ccgo_ts+871, VaList(bp+1104, l-*(*int32)(unsafe.Pointer(bp + 1092)), bp+68+uintptr(*(*int32)(unsafe.Pointer(bp + 1092))))) @@ -116811,7 +116809,7 @@ func Xuname(tls *TLS, uts uintptr) (r int32) { trc("tls=%v uts=%v, (%v:)", tls, uts, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_uname), int32(uts)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_uname), int32(uts)))) } func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116819,7 +116817,7 @@ func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { trc("tls=%v addr=%v len1=%v advice=%v, (%v:)", tls, addr, len1, advice, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_madvise), int32(addr), int32(len1), advice))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_madvise), int32(addr), Int32FromUint32(len1), advice))) } func Xmadvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116835,7 +116833,7 @@ func Xmincore(tls *TLS, addr uintptr, len1 Tsize_t, vec uintptr) (r int32) { trc("tls=%v addr=%v len1=%v vec=%v, (%v:)", tls, addr, len1, vec, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mincore), int32(addr), int32(len1), int32(vec)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mincore), int32(addr), Int32FromUint32(len1), int32(vec)))) } func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116843,7 +116841,7 @@ func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_mlock), int32(addr), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_mlock), int32(addr), Int32FromUint32(len1)))) } func Xmlockall(tls *TLS, flags int32) (r int32) { @@ -116851,7 +116849,7 @@ func Xmlockall(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_mlockall), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_mlockall), flags))) } const OFF_MASK = 4095 @@ -116867,23 +116865,23 @@ func X__mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd } var ret int32 _ = ret - if uint64(off)&(-Uint64FromUint64(0x2000)<<(Uint32FromInt32(8)*Uint32FromInt64(4)-Uint32FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { + if Uint64FromInt64(off)&(-Uint64FromUint64(0x2000)<<(Uint32FromInt32(8)*Uint32FromInt64(4)-Uint32FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } - if len1 >= uint32(Int32FromInt32(INT32_MAX)) { + if len1 >= Uint32FromInt32(Int32FromInt32(INT32_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } if flags&int32(MAP_FIXED) != 0 { _dummy5(tls) } - ret = X__syscall6(tls, int32(SYS_mmap2), int32(start), int32(len1), prot, flags, fd, int32(uint64(off)/Uint64FromUint64(4096))) + ret = X__syscall6(tls, int32(SYS_mmap2), int32(start), Int32FromUint32(len1), prot, flags, fd, Int32FromUint64(Uint64FromInt64(off)/Uint64FromUint64(4096))) /* Fixup incorrect EPERM from kernel. */ if ret == -int32(EPERM) && !(start != 0) && flags&int32(MAP_ANON) != 0 && !(flags&Int32FromInt32(MAP_FIXED) != 0) { ret = -int32(ENOMEM) } - return uintptr(X__syscall_ret(tls, uint32(ret))) + return uintptr(X__syscall_ret(tls, Uint32FromInt32(ret))) } func Xmmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { @@ -116901,9 +116899,9 @@ func X__mprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { } var end, start Tsize_t _, _ = end, start - start = uint32(addr) & uint32(-Int32FromInt32(PAGESIZE)) - end = uint32(addr+uintptr(len1)+UintptrFromInt32(PAGESIZE)-UintptrFromInt32(1)) & uint32(-Int32FromInt32(PAGESIZE)) - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mprotect), int32(start), int32(end-start), prot))) + start = uint32(addr) & Uint32FromInt32(-Int32FromInt32(PAGESIZE)) + end = uint32(addr+uintptr(len1)+UintptrFromInt32(PAGESIZE)-UintptrFromInt32(1)) & Uint32FromInt32(-Int32FromInt32(PAGESIZE)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mprotect), Int32FromUint32(start), Int32FromUint32(end-start), prot))) } func Xmprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { @@ -116926,7 +116924,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla var new_addr uintptr _, _ = ap, new_addr new_addr = uintptr(0) - if new_len >= uint32(Int32FromInt32(INT32_MAX)) { + if new_len >= Uint32FromInt32(Int32FromInt32(INT32_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } @@ -116936,7 +116934,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla new_addr = VaUintptr(&ap) _ = ap } - return uintptr(X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_mremap), int32(old_addr), int32(old_len), int32(new_len), flags, int32(new_addr))))) + return uintptr(X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_mremap), int32(old_addr), Int32FromUint32(old_len), Int32FromUint32(new_len), flags, int32(new_addr))))) } func Xmremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, flags int32, va uintptr) (r uintptr) { @@ -116952,7 +116950,7 @@ func Xmsync(tls *TLS, start uintptr, len1 Tsize_t, flags int32) (r int32) { trc("tls=%v start=%v len1=%v flags=%v, (%v:)", tls, start, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_msync), int32(start), int32(len1), flags, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_msync), int32(start), Int32FromUint32(len1), flags, 0, 0, 0))) } func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116960,7 +116958,7 @@ func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_munlock), int32(addr), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_munlock), int32(addr), Int32FromUint32(len1)))) } func Xmunlockall(tls *TLS) (r int32) { @@ -116968,7 +116966,7 @@ func Xmunlockall(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall0(tls, int32(SYS_munlockall)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall0(tls, int32(SYS_munlockall)))) } func _dummy7(tls *TLS) { @@ -116980,7 +116978,7 @@ func X__munmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { defer func() { trc("-> %v", r) }() } _dummy7(tls) - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_munmap), int32(start), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_munmap), int32(start), Int32FromUint32(len1)))) } func Xmunmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { @@ -116999,7 +116997,7 @@ func Xposix_madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32 if advice == int32(MADV_DONTNEED) { return 0 } - return -X__syscall3(tls, int32(SYS_madvise), int32(addr), int32(len1), advice) + return -X__syscall3(tls, int32(SYS_madvise), int32(addr), Int32FromUint32(len1), advice) } func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { @@ -117023,7 +117021,7 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { return uintptr(0) } Xmemcpy(tls, buf, __ccgo_ts+876, uint32(9)) - Xmemcpy(tls, buf+uintptr(9), name, uint32(int32(p)-int32(name)+int32(1))) + Xmemcpy(tls, buf+uintptr(9), name, Uint32FromInt32(int32(p)-int32(name)+int32(1))) return buf } @@ -117089,9 +117087,9 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { var b, v3 int32 var v1, v2 uint32 _, _, _, _ = b, v1, v2, v3 - b = int32(uint8(c)) - if uint32(b) < uint32(128) { - v1 = uint32(b) + b = Int32FromUint8(Uint8FromInt32(c)) + if Uint32FromInt32(b) < uint32(128) { + v1 = Uint32FromInt32(b) } else { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v3 = int32(4) @@ -117099,7 +117097,7 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { v3 = int32(1) } if v3 == int32(1) && c != -int32(1) { - v2 = uint32(Int32FromInt32(0xdfff) & int32(int8(c))) + v2 = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(int8(c))) } else { v2 = uint32(0xffffffff) } @@ -117131,18 +117129,18 @@ func Xc16rtomb(tls *TLS, s uintptr, c16 Tchar16_t, ps uintptr) (r Tsize_t) { return uint32(1) } if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(c16)-uint32(0xd800) < uint32(0x400) { - *(*uint32)(unsafe.Pointer(x)) = uint32((int32(c16) - int32(0xd7c0)) << int32(10)) + *(*uint32)(unsafe.Pointer(x)) = Uint32FromInt32((Int32FromUint16(c16) - int32(0xd7c0)) << int32(10)) return uint32(0) } if *(*uint32)(unsafe.Pointer(x)) != 0 { if uint32(c16)-uint32(0xdc00) >= uint32(0x400) { goto ilseq } else { - wc = int32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) + wc = Int32FromUint32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) } *(*uint32)(unsafe.Pointer(x)) = uint32(0) } else { - wc = int32(c16) + wc = Int32FromUint16(c16) } return Xwcrtomb(tls, s, wc, uintptr(0)) goto ilseq @@ -117150,7 +117148,7 @@ ilseq: ; *(*uint32)(unsafe.Pointer(x)) = uint32(0) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } var _internal_state uint32 @@ -117160,7 +117158,7 @@ func Xc32rtomb(tls *TLS, s uintptr, c32 Tchar32_t, ps uintptr) (r Tsize_t) { trc("tls=%v s=%v c32=%v ps=%v, (%v:)", tls, s, c32, ps, origin(2)) defer func() { trc("-> %v", r) }() } - return Xwcrtomb(tls, s, int32(c32), ps) + return Xwcrtomb(tls, s, Int32FromUint32(c32), ps) } func Xmblen(tls *TLS, s uintptr, n Tsize_t) (r int32) { @@ -117208,21 +117206,21 @@ func Xmbrtoc16(tls *TLS, pc16 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } /* mbrtowc states for partial UTF-8 characters have the high bit set; * we use nonzero states without high bit for pending surrogates. */ - if int32(*(*uint32)(unsafe.Pointer(pending))) > 0 { + if Int32FromUint32(*(*uint32)(unsafe.Pointer(pending))) > 0 { if pc16 != 0 { *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*uint32)(unsafe.Pointer(pending))) } *(*uint32)(unsafe.Pointer(pending)) = uint32(0) - return uint32(-Int32FromInt32(3)) + return Uint32FromInt32(-Int32FromInt32(3)) } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint32(4) { if *(*Twchar_t)(unsafe.Pointer(bp)) >= int32(0x10000) { - *(*uint32)(unsafe.Pointer(pending)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) + *(*uint32)(unsafe.Pointer(pending)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) *(*Twchar_t)(unsafe.Pointer(bp)) = int32(0xd7c0) + *(*Twchar_t)(unsafe.Pointer(bp))>>Int32FromInt32(10) } if pc16 != 0 { - *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar16_t)(unsafe.Pointer(pc16)) = Uint16FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } return ret @@ -117248,7 +117246,7 @@ func Xmbrtoc32(tls *TLS, pc32 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint32(4) && pc32 != 0 { - *(*Tchar32_t)(unsafe.Pointer(pc32)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar32_t)(unsafe.Pointer(pc32)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } return ret } @@ -117286,11 +117284,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize } } if !(n != 0) { - return uint32(-Int32FromInt32(2)) + return Uint32FromInt32(-Int32FromInt32(2)) } if !(c != 0) { - if int32(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolUint32(!!(v1 != 0)) } @@ -117300,7 +117298,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize v2 = int32(1) } if v2 == int32(1) { - *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(int8(*(*uint8)(unsafe.Pointer(s)))) + *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(Int8FromUint8(*(*uint8)(unsafe.Pointer(s)))) return Uint32FromInt32(1) } if uint32(*(*uint8)(unsafe.Pointer(s)))-uint32(0xc2) > Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117312,7 +117310,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize n-- } if n != 0 { - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } goto loop @@ -117320,11 +117318,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize ; v4 = s s++ - c = c<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _9 } @@ -117564,22 +117562,22 @@ _15: ws += 4 v17 = s s++ - *(*Twchar_t)(unsafe.Pointer(v16)) = int32(*(*uint8)(unsafe.Pointer(v17))) + *(*Twchar_t)(unsafe.Pointer(v16)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) v18 = ws ws += 4 v19 = s s++ - *(*Twchar_t)(unsafe.Pointer(v18)) = int32(*(*uint8)(unsafe.Pointer(v19))) + *(*Twchar_t)(unsafe.Pointer(v18)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) v20 = ws ws += 4 v21 = s s++ - *(*Twchar_t)(unsafe.Pointer(v20)) = int32(*(*uint8)(unsafe.Pointer(v21))) + *(*Twchar_t)(unsafe.Pointer(v20)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v21))) v22 = ws ws += 4 v23 = s s++ - *(*Twchar_t)(unsafe.Pointer(v22)) = int32(*(*uint8)(unsafe.Pointer(v23))) + *(*Twchar_t)(unsafe.Pointer(v22)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) wn -= uint32(4) } } @@ -117588,7 +117586,7 @@ _15: ws += 4 v25 = s s++ - *(*Twchar_t)(unsafe.Pointer(v24)) = int32(*(*uint8)(unsafe.Pointer(v25))) + *(*Twchar_t)(unsafe.Pointer(v24)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v25))) wn-- goto _14 } @@ -117601,13 +117599,13 @@ _15: goto resume resume: ; - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _13 } v27 = s s++ - c = c<= uint32(0x40) { s -= uintptr(2) @@ -117615,7 +117613,7 @@ resume: } v28 = s s++ - c = c<= uint32(0x40) { s -= uintptr(3) @@ -117623,12 +117621,12 @@ resume: } v29 = s s++ - c = c< Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117714,14 +117712,14 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { if n < uint32(4) && c<<(uint32(6)*n-uint32(6))&(Uint32FromUint32(1)<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } v4 = s s++ - c = c<= uint32(0x40) { @@ -117729,9 +117727,9 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v5 = s s++ - c = c<= uint32(0x40) { @@ -117739,7 +117737,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v6 = s s++ - *(*Twchar_t)(unsafe.Pointer(wc)) = int32(c<>Int32FromInt32(6)) *(*int8)(unsafe.Pointer(s)) = int8(int32(0x80) | wc&int32(0x3f)) return uint32(2) } else { - if uint32(wc) < uint32(0xd800) || uint32(wc)-uint32(0xe000) < uint32(0x2000) { + if Uint32FromInt32(wc) < uint32(0xd800) || Uint32FromInt32(wc)-uint32(0xe000) < uint32(0x2000) { v3 = s s++ *(*int8)(unsafe.Pointer(v3)) = int8(int32(0xe0) | wc>>Int32FromInt32(12)) @@ -117793,7 +117791,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { *(*int8)(unsafe.Pointer(s)) = int8(int32(0x80) | wc&int32(0x3f)) return uint32(3) } else { - if uint32(wc)-uint32(0x10000) < uint32(0x100000) { + if Uint32FromInt32(wc)-uint32(0x10000) < uint32(0x100000) { v5 = s s++ *(*int8)(unsafe.Pointer(v5)) = int8(int32(0xf0) | wc>>Int32FromInt32(18)) @@ -117811,7 +117809,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { } } *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st uintptr) (r Tsize_t) { @@ -117837,8 +117835,8 @@ func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st u v1 = dst } l = Xwcrtomb(tls, v1, *(*Twchar_t)(unsafe.Pointer(ws)), uintptr(0)) - if l == uint32(-Int32FromInt32(1)) { - cnt = uint32(-Int32FromInt32(1)) + if l == Uint32FromInt32(-Int32FromInt32(1)) { + cnt = Uint32FromInt32(-Int32FromInt32(1)) break } if dst != 0 { @@ -117884,10 +117882,10 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize if !(*(*Twchar_t)(unsafe.Pointer(ws2)) != 0) { break } - if uint32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(ws2)), uintptr(0)) if !(l+Uint32FromInt32(1) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } n += l } else { @@ -117901,7 +117899,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize return n } for n >= uint32(4) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*int8)(unsafe.Pointer(s)) = 0 *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117909,7 +117907,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, s, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint32FromInt32(1) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } s += uintptr(l) n -= l @@ -117922,7 +117920,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize *(*uintptr)(unsafe.Pointer(ws)) += 4 } for n != 0 { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*int8)(unsafe.Pointer(s)) = 0 *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117930,7 +117928,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint32FromInt32(1) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } if l > n { return N - n @@ -117968,7 +117966,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { var v1 int32 _ = v1 if c < uint32(128) { - return int32(c) + return Int32FromUint32(c) } if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) @@ -117976,7 +117974,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { v1 = int32(1) } if v1 == int32(1) && c-uint32(0xdf80) < uint32(0x80) { - return int32(uint8(c)) + return Int32FromUint8(uint8(c)) } return -int32(1) } @@ -117989,7 +117987,7 @@ func Xwctomb(tls *TLS, s uintptr, wc Twchar_t) (r int32) { if !(s != 0) { return 0 } - return int32(Xwcrtomb(tls, s, wc, uintptr(0))) + return Int32FromUint32(Xwcrtomb(tls, s, wc, uintptr(0))) } func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { @@ -118044,7 +118042,7 @@ func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } type Tucred = struct { @@ -118113,7 +118111,7 @@ func Xaccept4(tls *TLS, fd int32, addr uintptr, len1 uintptr, flg int32) (r1 int v10 = r goto _11 _11: - ret = X__syscall_ret(tls, uint32(v10)) + ret = X__syscall_ret(tls, Uint32FromInt32(v10)) if ret >= 0 || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) && *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(EINVAL) { return ret } @@ -118149,7 +118147,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v3 = 0 v4 = fd v5 = int32(addr) - v6 = int32(len1) + v6 = Int32FromUint32(len1) v7 = Int32FromInt32(0) v8 = Int32FromInt32(0) v9 = Int32FromInt32(0) @@ -118186,7 +118184,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { @@ -118204,7 +118202,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v3 = int32(1) v4 = fd v5 = int32(addr) - v6 = int32(len1) + v6 = Int32FromUint32(len1) v7 = Int32FromInt32(0) v8 = Int32FromInt32(0) v9 = Int32FromInt32(0) @@ -118241,7 +118239,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } const ADD = 0 @@ -119150,11 +119148,11 @@ func _getoffs(tls *TLS, offs uintptr, base uintptr, s uintptr) (r int32) { _, _ = i, v2 i = 0 for { - for int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { - if int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { return 0 } - s = base + uintptr(int32(*(*uint8)(unsafe.Pointer(s)))&Int32FromInt32(0x3f)< uint32(62) { + if Uint32FromInt32(j-k)-uint32(1) > uint32(62) { return 0 } v3 = i i++ - *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = uint8(j - k) + *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = Uint8FromInt32(j - k) if j == l { return i } @@ -119226,12 +119224,12 @@ func _match(tls *TLS, offset uintptr, base uintptr, dn uintptr, end uintptr, len for { nlen-- v2 = nlen - l = int32(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) + l = Int32FromUint8(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) noff-- v3 = noff o = int32((*(*[128]int16)(unsafe.Pointer(bp)))[v3]) end -= uintptr(l) - if l != int32(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, uint32(l)) != 0 { + if l != Int32FromUint8(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, Uint32FromInt32(l)) != 0 { return m } *(*int32)(unsafe.Pointer(offset)) = o @@ -119276,7 +119274,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l return int32(1) } end = src + uintptr(l) - n = _getlens(tls, bp+4, src, int32(l)) + n = _getlens(tls, bp+4, src, Int32FromUint32(l)) if !(n != 0) { return -int32(1) } @@ -119291,7 +119289,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l if m > bestlen { bestlen = m bestoff = *(*int32)(unsafe.Pointer(bp)) - if uint32(m) == l { + if Uint32FromInt32(m) == l { break } } @@ -119302,15 +119300,15 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l } } /* encode unmatched part */ - if uint32(space) < l-uint32(bestlen)+uint32(2)+BoolUint32(uint32(bestlen-Int32FromInt32(1)) < l-Uint32FromInt32(1)) { + if Uint32FromInt32(space) < l-Uint32FromInt32(bestlen)+uint32(2)+BoolUint32(Uint32FromInt32(bestlen-Int32FromInt32(1)) < l-Uint32FromInt32(1)) { return -int32(1) } - Xmemcpy(tls, dst+uintptr(1), src, l-uint32(bestlen)) + Xmemcpy(tls, dst+uintptr(1), src, l-Uint32FromInt32(bestlen)) v3 = Int32FromInt32(0) j = v3 i = v3 for { - if !(uint32(i) < l-uint32(bestlen)) { + if !(Uint32FromInt32(i) < l-Uint32FromInt32(bestlen)) { break } *(*uint8)(unsafe.Pointer(dst + uintptr(i))) = (*(*[127]uint8)(unsafe.Pointer(bp + 4)))[j] @@ -119319,16 +119317,16 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l ; v4 = j j++ - i += int32((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) + i += Int32FromUint8((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) } /* add tail */ if bestlen != 0 { v5 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = uint8(int32(0xc0) | bestoff>>int32(8)) + *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = Uint8FromInt32(int32(0xc0) | bestoff>>int32(8)) v6 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(bestoff) + *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = Uint8FromInt32(bestoff) } else { v7 = i i++ @@ -119376,11 +119374,11 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr break } /* loop invariants: p= int32(end)-int32(p) || j >= int32(dend)-int32(dest) { return -int32(1) } @@ -119411,7 +119409,7 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr dest++ v7 = p p++ - *(*int8)(unsafe.Pointer(v6)) = int8(*(*uint8)(unsafe.Pointer(v7))) + *(*int8)(unsafe.Pointer(v6)) = Int8FromUint8(*(*uint8)(unsafe.Pointer(v7))) } } else { *(*int8)(unsafe.Pointer(dest)) = 0 @@ -119449,17 +119447,17 @@ func Xdn_skipname(tls *TLS, s uintptr, end uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { return int32(p) - int32(s) + int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { if p+uintptr(1) < end { return int32(p) - int32(s) + int32(2) } else { break } } else { - if int32(end)-int32(p) < int32(*(*uint8)(unsafe.Pointer(p)))+int32(1) { + if int32(end)-int32(p) < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))+int32(1) { break } else { - p += uintptr(int32(*(*uint8)(unsafe.Pointer(p))) + int32(1)) + p += uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + int32(1)) } } } @@ -119573,12 +119571,12 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if rlen < int32(12) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { return 0 } p = r + uintptr(12) - qdcount = int32(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 5))) - ancount = int32(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 7))) + qdcount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 5))) + ancount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 7))) for { v1 = qdcount qdcount-- @@ -119606,11 +119604,11 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr return -int32(1) } p += uintptr(int32(1) + BoolInt32(!!(*(*uint8)(unsafe.Pointer(p)) != 0))) - len1 = int32(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(p + 9))) + len1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 9))) if len1+int32(10) > int32(r+uintptr(rlen))-int32(p) { return -int32(1) } - if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, int32(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { + if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { return -int32(1) } p += uintptr(int32(10) + len1) @@ -120007,7 +120005,7 @@ func Xether_ntoa_r(tls *TLS, p_a uintptr, x uintptr) (r uintptr) { } else { v2 = __ccgo_ts + 891 } - x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, int32(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) + x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) goto _1 _1: ; @@ -120229,14 +120227,14 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt return -int32(5) } nais = nservs * naddrs - canon_len = int32(Xstrlen(tls, bp+1352)) - out = Xcalloc(tls, uint32(1), uint32(nais)*uint32(68)+uint32(canon_len)+uint32(1)) + canon_len = Int32FromUint32(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint32(1), Uint32FromInt32(nais)*uint32(68)+Uint32FromInt32(canon_len)+uint32(1)) if !(out != 0) { return -int32(10) } if canon_len != 0 { outcanon = out + uintptr(nais)*68 - Xmemcpy(tls, outcanon, bp+1352, uint32(canon_len+int32(1))) + Xmemcpy(tls, outcanon, bp+1352, Uint32FromInt32(canon_len+int32(1))) } else { outcanon = uintptr(0) } @@ -120260,8 +120258,8 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*68))).Fai = Taddrinfo{ Fai_family: (*(*[48]Taddress)(unsafe.Pointer(bp + 8)))[i].Ffamily, - Fai_socktype: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), - Fai_protocol: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), + Fai_socktype: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), + Fai_protocol: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), Fai_addrlen: v5, Fai_addr: out + uintptr(k)*68 + 32, Fai_canonname: outcanon, @@ -120459,7 +120457,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu Fsin Tsockaddr_in F__ccgo_pad2 [12]byte }{} - *(*uint16)(unsafe.Pointer(bp)) = uint16(af) + *(*uint16)(unsafe.Pointer(bp)) = Uint16FromInt32(af) if af == int32(PF_INET6) { v1 = uint32(28) } else { @@ -120479,15 +120477,15 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu } } /* Align buffer and check for space for pointers and ip address */ - i = int32(uint32(buf) & (Uint32FromInt64(4) - Uint32FromInt32(1))) + i = Int32FromUint32(uint32(buf) & (Uint32FromInt64(4) - Uint32FromInt32(1))) if !(i != 0) { i = int32(4) } - if buflen <= Uint32FromInt32(5)*Uint32FromInt64(4)-uint32(i)+l { + if buflen <= Uint32FromInt32(5)*Uint32FromInt64(4)-Uint32FromInt32(i)+l { return int32(ERANGE) } - buf += uintptr(uint32(4) - uint32(i)) - buflen -= Uint32FromInt32(5)*Uint32FromInt64(4) - uint32(i) + l + buf += uintptr(uint32(4) - Uint32FromInt32(i)) + buflen -= Uint32FromInt32(5)*Uint32FromInt64(4) - Uint32FromInt32(i) + l (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(Uint32FromInt32(2) * Uint32FromInt64(4)) (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf @@ -120516,7 +120514,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu break } (*Thostent)(unsafe.Pointer(h)).Fh_addrtype = af - (*Thostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*Thostent)(unsafe.Pointer(h)).Fh_length = Int32FromUint32(l) (*Thostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 @@ -120603,7 +120601,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, /* Align buffer */ align = -uint32(buf) & (Uint32FromInt64(4) - Uint32FromInt32(1)) need = Uint32FromInt32(4) * Uint32FromInt64(4) - need += uint32(cnt+Int32FromInt32(1)) * (uint32(4) + uint32((*Thostent)(unsafe.Pointer(h)).Fh_length)) + need += Uint32FromInt32(cnt+Int32FromInt32(1)) * (uint32(4) + Uint32FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) need += Xstrlen(tls, name) + uint32(1) need += Xstrlen(tls, bp+1344) + uint32(1) need += align @@ -120614,7 +120612,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(Uint32FromInt32(3) * Uint32FromInt64(4)) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf - buf += uintptr(uint32(cnt+Int32FromInt32(1)) * uint32(4)) + buf += uintptr(Uint32FromInt32(cnt+Int32FromInt32(1)) * uint32(4)) i = 0 for { if !(i < cnt) { @@ -120622,7 +120620,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = buf buf += uintptr((*Thostent)(unsafe.Pointer(h)).Fh_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, uint32((*Thostent)(unsafe.Pointer(h)).Fh_length)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, Uint32FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) goto _2 _2: ; @@ -120870,17 +120868,17 @@ func _copy_addr(tls *TLS, r uintptr, af int32, sa uintptr, addr uintptr, addrlen case int32(PF_INET6): dst = sa + 8 len1 = int32(16) - if int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { - (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = uint32(ifindex) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { + (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = Uint32FromInt32(ifindex) } default: return } - if addrlen < uint32(len1) { + if addrlen < Uint32FromInt32(len1) { return } - (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(af) - Xmemcpy(tls, dst, addr, uint32(len1)) + (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = Uint16FromInt32(af) + Xmemcpy(tls, dst, addr, Uint32FromInt32(len1)) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -120891,15 +120889,15 @@ func _gen_netmask(tls *TLS, r uintptr, af int32, sa uintptr, prefixlen int32) { var _ /* addr at bp+0 */ [16]Tuint8_t _, _ = i, v1 *(*[16]Tuint8_t)(unsafe.Pointer(bp)) = [16]Tuint8_t{} - if uint32(prefixlen) > Uint32FromInt32(8)*Uint32FromInt64(16) { - prefixlen = int32(Uint32FromInt32(8) * Uint32FromInt64(16)) + if Uint32FromInt32(prefixlen) > Uint32FromInt32(8)*Uint32FromInt64(16) { + prefixlen = Int32FromUint32(Uint32FromInt32(8) * Uint32FromInt64(16)) } i = prefixlen / int32(8) - Xmemset(tls, bp, int32(0xff), uint32(i)) - if uint32(i) < uint32(16) { + Xmemset(tls, bp, int32(0xff), Uint32FromInt32(i)) + if Uint32FromInt32(i) < uint32(16) { v1 = i i++ - (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = uint8(int32(0xff) << (int32(8) - prefixlen%int32(8))) + (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = Uint8FromInt32(int32(0xff) << (int32(8) - prefixlen%int32(8))) } _copy_addr(tls, r, af, sa, bp, uint32(16), 0) } @@ -120925,21 +120923,21 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { ifi = h + UintptrFromInt64(16) ifa = h + UintptrFromInt64(16) stats_len = 0 - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) for { - if !(uint32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { + if !(Uint32FromInt32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { goto _1 } - stats_len = int32(uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint32FromInt64(4)) + stats_len = Int32FromUint32(uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint32FromInt64(4)) break goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } } else { ifs0 = *(*uintptr)(unsafe.Pointer(ctx + 8 + uintptr((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index%uint32(IFADDRS_HASH_SIZE))*4)) @@ -120959,19 +120957,19 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { return 0 } } - ifs = Xcalloc(tls, uint32(1), uint32(164)+uint32(stats_len)) + ifs = Xcalloc(tls, uint32(1), uint32(164)+Uint32FromInt32(stats_len)) if ifs == uintptr(0) { return -int32(1) } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = uint32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = Uint32FromInt32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) for { - if !(uint32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { + if !(Uint32FromInt32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFLA_IFNAME): if uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint32(4) < uint32(17) { Xmemcpy(tls, ifs+144, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4)) @@ -120989,7 +120987,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _3 _3: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { bucket = (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex % uint32(IFADDRS_HASH_SIZE) @@ -120999,22 +120997,22 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { } else { (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_name (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(8)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(8)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) for { - if !(uint32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { + if !(Uint32FromInt32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFA_ADDRESS): /* If ifa_addr is already set we, received an IFA_LOCAL before * so treat this as destination address */ if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _copy_addr(tls, ifs+20, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+104, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+20, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+104, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } else { - _copy_addr(tls, ifs+12, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+32, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+12, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+32, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } case int32(IFA_BROADCAST): - _copy_addr(tls, ifs+20, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+104, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+20, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+104, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LOCAL): /* If ifa_addr is set and we get IFA_LOCAL, assume we have * a point-to-point network. Move address to correct field. */ @@ -121023,7 +121021,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { *(*uintptr)(unsafe.Pointer(ifs + 20)) = ifs + 104 Xmemset(tls, ifs+32, 0, uint32(36)) } - _copy_addr(tls, ifs+12, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+32, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+12, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+32, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LABEL): if uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint32(4) < uint32(17) { Xmemcpy(tls, ifs+144, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4)) @@ -121034,10 +121032,10 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _4 _4: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _gen_netmask(tls, ifs+16, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+68, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) + _gen_netmask(tls, ifs+16, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+68, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) } } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { @@ -121088,7 +121086,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { for cond := true; cond; cond = x != 0 { p-- v2 = p - *(*int8)(unsafe.Pointer(v2)) = int8(uint32('0') + x%uint32(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint32(uint32('0') + x%uint32(10)) x /= uint32(10) } return p @@ -121097,7 +121095,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { func _mkptr4(tls *TLS, s uintptr, ip uintptr) { bp := tls.Alloc(48) defer tls.Free(48) - Xsprintf(tls, s, __ccgo_ts+897, VaList(bp+8, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) + Xsprintf(tls, s, __ccgo_ts+897, VaList(bp+8, Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 3))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip))))) } func _mkptr6(tls *TLS, s uintptr, ip uintptr) { @@ -121111,13 +121109,13 @@ func _mkptr6(tls *TLS, s uintptr, ip uintptr) { } v2 = s s++ - *(*int8)(unsafe.Pointer(v2)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] + *(*int8)(unsafe.Pointer(v2)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] v3 = s s++ *(*int8)(unsafe.Pointer(v3)) = int8('.') v4 = s s++ - *(*int8)(unsafe.Pointer(v4)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] + *(*int8)(unsafe.Pointer(v4)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] v5 = s s++ *(*int8)(unsafe.Pointer(v5)) = int8('.') @@ -121165,7 +121163,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int for { if v7 = *(*int8)(unsafe.Pointer(p)) != 0; v7 { v4 = int32(*(*int8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -121197,7 +121195,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int for { if v13 = *(*int8)(unsafe.Pointer(p)) != 0; v13 { v10 = int32(*(*int8)(unsafe.Pointer(p))) - v11 = BoolInt32(v10 == int32(' ') || uint32(v10)-uint32('\t') < uint32(5)) + v11 = BoolInt32(v10 == int32(' ') || Uint32FromInt32(v10)-uint32('\t') < uint32(5)) goto _12 _12: } @@ -121213,7 +121211,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int for { if v18 = *(*int8)(unsafe.Pointer(z)) != 0; v18 { v15 = int32(*(*int8)(unsafe.Pointer(z))) - v16 = BoolInt32(v15 == int32(' ') || uint32(v15)-uint32('\t') < uint32(5)) + v16 = BoolInt32(v15 == int32(' ') || Uint32FromInt32(v15)-uint32('\t') < uint32(5)) goto _17 _17: } @@ -121227,7 +121225,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } *(*int8)(unsafe.Pointer(z)) = 0 if int32(z)-int32(p) < int32(256) { - Xmemcpy(tls, buf, p, uint32(int32(z)-int32(p)+int32(1))) + Xmemcpy(tls, buf, p, Uint32FromInt32(int32(z)-int32(p)+int32(1))) break } } @@ -121263,7 +121261,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { for { if v7 = *(*int8)(unsafe.Pointer(p)) != 0; v7 { v4 = int32(*(*int8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -121282,7 +121280,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p++ *(*int8)(unsafe.Pointer(v8)) = 0 svport = Xstrtoul(tls, p, bp+128, int32(10)) - if svport != uint32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { + if svport != Uint32FromInt32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { continue } if dgram != 0 && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+969, uint32(4)) != 0 { @@ -121294,7 +121292,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { if int32(p)-t__predefined_ptrdiff_t(bp) > int32(32) { continue } - Xmemcpy(tls, buf, bp, uint32(int32(p)-t__predefined_ptrdiff_t(bp))) + Xmemcpy(tls, buf, bp, Uint32FromInt32(int32(p)-t__predefined_ptrdiff_t(bp))) break } X__fclose_ca(tls, f) @@ -121327,7 +121325,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso var _ /* reply at bp+443 */ [512]uint8 var _ /* tmp at bp+955 */ [17]int8 _, _, _, _, _, _, _, _, _ = a, af, p, p1, port, qlen, rlen, scopeid, v1 - af = int32((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) + af = Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) switch af { case int32(PF_INET): a = sa + 4 @@ -121361,7 +121359,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso rlen = X__res_send(tls, bp+347, qlen, bp+443, int32(512)) (*(*[256]int8)(unsafe.Pointer(bp + 78)))[0] = 0 if rlen > 0 { - if uint32(rlen) > uint32(512) { + if Uint32FromInt32(rlen) > uint32(512) { rlen = int32(512) } X__dns_parse(tls, bp+443, rlen, __ccgo_fp(_dns_parse_callback), bp+78) @@ -121374,7 +121372,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso Xinet_ntop(tls, af, a, bp+78, uint32(256)) if scopeid != 0 { p = uintptr(0) - if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { + if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { p = Xif_indextoname(tls, scopeid, bp+955+uintptr(1)) } if !(p != 0) { @@ -121393,13 +121391,13 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso } if serv != 0 && servlen != 0 { p1 = bp + 78 - port = int32(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) + port = Int32FromUint16(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) (*(*[256]int8)(unsafe.Pointer(bp + 78)))[0] = 0 if !(flags&Int32FromInt32(NI_NUMERICSERV) != 0) { _reverse_services(tls, bp+78, port, flags&int32(NI_DGRAM)) } if !(*(*int8)(unsafe.Pointer(p1)) != 0) { - p1 = _itoa(tls, bp+334, uint32(port)) + p1 = _itoa(tls, bp+334, Uint32FromInt32(port)) } if Xstrlen(tls, p1) >= servlen { return -int32(12) @@ -121461,7 +121459,7 @@ func Xgetpeername(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } func Xgetservbyname(tls *TLS, name uintptr, prots uintptr) (r uintptr) { @@ -121504,8 +121502,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin return int32(ENOENT) } /* Align buffer */ - align = int32(-uint32(buf) & (Uint32FromInt64(8) - Uint32FromInt64(4) - Uint32FromInt32(1))) - if buflen < Uint32FromInt32(2)*Uint32FromInt64(4)+uint32(align) { + align = Int32FromUint32(-uint32(buf) & (Uint32FromInt64(8) - Uint32FromInt64(4) - Uint32FromInt32(1))) + if buflen < Uint32FromInt32(2)*Uint32FromInt64(4)+Uint32FromInt32(align) { return int32(ERANGE) } buf += uintptr(align) @@ -121537,8 +121535,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin (*Tservent)(unsafe.Pointer(se)).Fs_aliases = buf *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases)) = (*Tservent)(unsafe.Pointer(se)).Fs_name *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases + 1*4)) = uintptr(0) - (*Tservent)(unsafe.Pointer(se)).Fs_port = int32(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) - if int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { + (*Tservent)(unsafe.Pointer(se)).Fs_port = Int32FromUint16(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) + if Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { v1 = __ccgo_ts + 979 } else { v1 = __ccgo_ts + 983 @@ -121600,7 +121598,7 @@ func Xgetsockname(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } func Xgetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, optlen uintptr) (r2 int32) { @@ -121669,7 +121667,7 @@ _11: break } if *(*Tsocklen_t)(unsafe.Pointer(optlen)) < uint32(16) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -121789,7 +121787,7 @@ _11: } } } - return X__syscall_ret(tls, uint32(r1)) + return X__syscall_ret(tls, Uint32FromInt32(r1)) } func X__h_errno_location(tls *TLS) (r uintptr) { @@ -121919,14 +121917,14 @@ func Xhtons(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*int8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } func Xif_freenameindex(tls *TLS, idx uintptr) { @@ -121951,7 +121949,7 @@ func Xif_indextoname(tls *TLS, index uint32, name uintptr) (r1 uintptr) { if v1 < 0 { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 16)) = int32(index) + *(*int32)(unsafe.Pointer(bp + 16)) = Int32FromUint32(index) r = Xioctl(tls, fd, int32(SIOCGIFNAME), VaList(bp+40, bp)) X__syscall1(tls, int32(SYS_close), fd) if r < 0 { @@ -121985,25 +121983,25 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { var i, v2 uint32 _, _, _, _, _, _, _, _, _, _, _, _ = a, bucket, ctx, i, ifa, ifi, index, map1, namelen, rta, type1, v2 ctx = pctx - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { ifi = h + UintptrFromInt64(16) index = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index type1 = int32(IFLA_IFNAME) - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } else { ifa = h + UintptrFromInt64(16) - index = int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) + index = Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) type1 = int32(IFA_LABEL) - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(8)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(8)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } for { - if !(uint32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { + if !(Uint32FromInt32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { goto _1 } - namelen = int32(uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint32(4) - uint32(1)) + namelen = Int32FromUint32(uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint32(4) - uint32(1)) if namelen > int32(IF_NAMESIZE) { return 0 } @@ -122012,7 +122010,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { i = *(*uint32)(unsafe.Pointer(ctx + 16 + uintptr(bucket)*4)) for i != 0 { map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr(i-uint32(1))*28 - if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == uint32(index) && int32((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), uint32(namelen)) == 0 { + if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == Uint32FromInt32(index) && Int32FromUint8((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), Uint32FromInt32(namelen)) == 0 { return 0 } i = (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next @@ -122035,10 +122033,10 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fallocated = a } map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*28 - (*Tifnamemap)(unsafe.Pointer(map1)).Findex = uint32(index) - (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = uint8(namelen) - Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), uint32(namelen)) - *(*uint32)(unsafe.Pointer(ctx + 8)) += uint32(namelen + int32(1)) + (*Tifnamemap)(unsafe.Pointer(map1)).Findex = Uint32FromInt32(index) + (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = Uint8FromInt32(namelen) + Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), Uint32FromInt32(namelen)) + *(*uint32)(unsafe.Pointer(ctx + 8)) += Uint32FromInt32(namelen + int32(1)) (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum++ (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next = *(*uint32)(unsafe.Pointer(ctx + 16 + uintptr(bucket)*4)) *(*uint32)(unsafe.Pointer(ctx + 16 + uintptr(bucket)*4)) = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum @@ -122046,7 +122044,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } return 0 } @@ -122075,7 +122073,7 @@ func Xif_nameindex(tls *TLS) (r uintptr) { goto err } p = ifs + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*8 + UintptrFromInt32(1)*8 - i = int32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) + i = Int32FromUint32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) d = ifs s = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist for { @@ -122130,7 +122128,7 @@ func Xif_nametoindex(tls *TLS, name uintptr) (r1 uint32) { } else { v2 = *(*int32)(unsafe.Pointer(bp + 16)) } - return uint32(v2) + return Uint32FromInt32(v2) } func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { @@ -122142,7 +122140,7 @@ func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { defer tls.Free(16) var _ /* a at bp+0 */ Tin_addr if !(X__inet_aton(tls, p, bp) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } return (*(*Tin_addr)(unsafe.Pointer(bp))).Fs_addr } @@ -122168,7 +122166,7 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) (r int32) { break } (*(*[4]uint32)(unsafe.Pointer(bp)))[i] = Xstrtoul(tls, s, bp+16, 0) - if *(*uintptr)(unsafe.Pointer(bp + 16)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != int32('.') || !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if *(*uintptr)(unsafe.Pointer(bp + 16)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != int32('.') || !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return 0 } if !(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) != 0) { @@ -122293,7 +122291,7 @@ func Xinet_ntoa(tls *TLS, _in Tin_addr) (r uintptr) { var a uintptr _ = a a = bp - Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint32(16), __ccgo_ts+995, VaList(bp+16, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3))))) + Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint32(16), __ccgo_ts+995, VaList(bp+16, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))))) return uintptr(unsafe.Pointer(&_buf4)) } @@ -122314,14 +122312,14 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint a = a0 switch af { case int32(PF_INET): - if uint32(Xsnprintf(tls, s, l, __ccgo_ts+995, VaList(bp+112, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + if Uint32FromInt32(Xsnprintf(tls, s, l, __ccgo_ts+995, VaList(bp+112, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { return s } case int32(PF_INET6): if Xmemcmp(tls, a, __ccgo_ts+942, uint32(12)) != 0 { - Xsnprintf(tls, bp, uint32(100), __ccgo_ts+1007, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint32(100), __ccgo_ts+1007, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } else { - Xsnprintf(tls, bp, uint32(100), __ccgo_ts+1031, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint32(100), __ccgo_ts+1031, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } /* Replace longest /(^0|:)[:0]{2,}/ with "::" */ v2 = Int32FromInt32(0) @@ -122335,7 +122333,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint if i != 0 && int32((*(*[100]int8)(unsafe.Pointer(bp)))[i]) != int32(':') { goto _1 } - j = int32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1061)) + j = Int32FromUint32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1061)) if j > max { best = i max = j @@ -122349,7 +122347,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint v3 = Int8FromUint8(':') (*(*[100]int8)(unsafe.Pointer(bp)))[best+int32(1)] = v3 (*(*[100]int8)(unsafe.Pointer(bp)))[best] = v3 - Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), uint32(i-best-max+int32(1))) + Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), Uint32FromInt32(i-best-max+int32(1))) } if Xstrlen(tls, bp) < l { Xstrcpy(tls, s, bp) @@ -122365,11 +122363,11 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint func _hexval(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -122399,7 +122397,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { j = v3 v = v3 for { - if !(j < int32(3) && BoolInt32(uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { + if !(j < int32(3) && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { break } v = int32(10)*v + int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') @@ -122411,7 +122409,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 || j > int32(1) && int32(*(*int8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { return 0 } - *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = Uint8FromInt32(v) if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { return int32(1) } @@ -122458,7 +122456,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { v = v9 for { if v11 = j < int32(4); v11 { - v10 = _hexval(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))) + v10 = _hexval(tls, Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(j))))) d = v10 } if !(v11 && v10 >= 0) { @@ -122473,7 +122471,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 { return 0 } - (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(v) + (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = Uint16FromInt32(v) if !(*(*int8)(unsafe.Pointer(s + uintptr(j))) != 0) && (brk >= 0 || i == int32(7)) { break } @@ -122496,7 +122494,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { i++ } if brk >= 0 { - Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint32(int32(2)*(i+int32(1)-brk))) + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, Uint32FromInt32(int32(2)*(i+int32(1)-brk))) j = 0 for { if !(j < int32(7)-i) { @@ -122516,7 +122514,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { } v14 = a a++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint16((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) v15 = a a++ *(*uint8)(unsafe.Pointer(v15)) = uint8((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) @@ -122583,7 +122581,7 @@ func Xlisten(tls *TLS, fd int32, backlog int32) (r1 int32) { v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r int32) { @@ -122612,7 +122610,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i p = Xstrchr(tls, name, int32('%')) scopeid = uint64(0) if p != 0 && int32(p)-int32(name) < int32(64) { - Xmemcpy(tls, bp+20, name, uint32(int32(p)-int32(name))) + Xmemcpy(tls, bp+20, name, Uint32FromInt32(int32(p)-int32(name))) (*(*[64]int8)(unsafe.Pointer(bp + 20)))[int32(p)-int32(name)] = 0 name = bp + 20 } @@ -122627,13 +122625,13 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i if p != 0 { p++ v1 = p - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(v1)))-uint32('0') < uint32(10)) != 0 { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(v1)))-uint32('0') < uint32(10)) != 0 { scopeid = Xstrtoull(tls, p, bp+84, int32(10)) } else { *(*uintptr)(unsafe.Pointer(bp + 84)) = p - uintptr(1) } if *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 84)))) != 0 { - if !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { + if !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { return -int32(2) } scopeid = uint64(Xif_nametoindex(tls, p)) @@ -122664,12 +122662,12 @@ const RR_CNAME = 5 func _is_valid_hostname(tls *TLS, host uintptr) (r int32) { var s uintptr _ = s - if Xstrnlen(tls, host, uint32(255))-uint32(1) >= uint32(254) || Xmbstowcs(tls, uintptr(0), host, uint32(0)) == uint32(-Int32FromInt32(1)) { + if Xstrnlen(tls, host, uint32(255))-uint32(1) >= uint32(254) || Xmbstowcs(tls, uintptr(0), host, uint32(0)) == Uint32FromInt32(-Int32FromInt32(1)) { return 0 } s = host for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || int32(*(*uint8)(unsafe.Pointer(s))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) != 0) { break } goto _1 @@ -122775,13 +122773,13 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family p = v4 if v12 = v4 != 0; v12 { v5 = int32(*(*int8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: ; if v11 = !(v6 != 0); !v11 { v8 = int32(*(*int8)(unsafe.Pointer(p + uintptr(l)))) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -122802,7 +122800,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family for { if v17 = *(*int8)(unsafe.Pointer(p)) != 0; v17 { v14 = int32(*(*int8)(unsafe.Pointer(p))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: } @@ -122833,7 +122831,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family for { if v23 = *(*int8)(unsafe.Pointer(p)) != 0; v23 { v20 = int32(*(*int8)(unsafe.Pointer(p))) - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: } @@ -122849,7 +122847,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family for { if v28 = *(*int8)(unsafe.Pointer(z)) != 0; v28 { v25 = int32(*(*int8)(unsafe.Pointer(z))) - v26 = BoolInt32(v25 == int32(' ') || uint32(v25)-uint32('\t') < uint32(5)) + v26 = BoolInt32(v25 == int32(' ') || Uint32FromInt32(v25)-uint32('\t') < uint32(5)) goto _27 _27: } @@ -122864,7 +122862,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family *(*int8)(unsafe.Pointer(z)) = 0 if _is_valid_hostname(tls, p) != 0 { have_canon = int32(1) - Xmemcpy(tls, canon, p, uint32(int32(z)-int32(p)+int32(1))) + Xmemcpy(tls, canon, p, Uint32FromInt32(int32(z)-int32(p)+int32(1))) } } X__fclose_ca(tls, f) @@ -122921,7 +122919,7 @@ func _dns_parse_callback1(tls *TLS, c uintptr, rr int32, data uintptr, len1 int3 v2 = ctx + 8 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ - Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, uint32(len1)) + Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, Uint32FromInt32(len1)) return 0 } @@ -122964,7 +122962,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i qtypes[nq] = _afrr[i].Frr *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280 + 3)) = uint8(0) /* don't need AD flag */ /* Ensure query IDs are distinct. */ - if nq != 0 && int32(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == int32(*(*uint8)(unsafe.Pointer(bp))) { + if nq != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) { *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))++ } nq++ @@ -122982,13 +122980,13 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i if !(i < nq) { break } - if (*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i] < int32(4) || int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { + if (*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i] < int32(4) || Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { return -int32(4) } goto _2 @@ -123002,7 +123000,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i break } (*(*Tdpc_ctx)(unsafe.Pointer(bp + 10192))).Frrtype = qtypes[i] - if uint32((*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i]) > uint32(4800) { + if Uint32FromInt32((*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i]) > uint32(4800) { (*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i] = int32(4800) } X__dns_parse(tls, bp+560+uintptr(i)*4800, (*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i], __ccgo_fp(_dns_parse_callback1), bp+10192) @@ -123088,7 +123086,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f } for { v5 = int32(*(*int8)(unsafe.Pointer(p))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -123103,7 +123101,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f for { if v12 = *(*int8)(unsafe.Pointer(z)) != 0; v12 { v9 = int32(*(*int8)(unsafe.Pointer(z))) - v10 = BoolInt32(v9 == int32(' ') || uint32(v9)-uint32('\t') < uint32(5)) + v10 = BoolInt32(v9 == int32(' ') || Uint32FromInt32(v9)-uint32('\t') < uint32(5)) goto _11 _11: } @@ -123118,9 +123116,9 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if z == p { break } - if uint32(int32(z)-int32(p)) < uint32(256)-l-uint32(1) { - Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, uint32(int32(z)-int32(p))) - *(*int8)(unsafe.Pointer(canon + uintptr(uint32(int32(z)-int32(p)+int32(1))+l))) = 0 + if Uint32FromInt32(int32(z)-int32(p)) < uint32(256)-l-uint32(1) { + Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, Uint32FromInt32(int32(z)-int32(p))) + *(*int8)(unsafe.Pointer(canon + uintptr(Uint32FromInt32(int32(z)-int32(p)+int32(1))+l))) = 0 cnt = _name_from_dns(tls, buf, canon, canon, family, bp+256) if cnt != 0 { return cnt @@ -123192,7 +123190,7 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&_defpolicy))+uintptr(i)*20, uint32(_defpolicy[i].Flen1)) != 0 { goto _1 } - if int32(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&int32(_defpolicy[i].Fmask) != int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&Int32FromUint8(_defpolicy[i].Fmask) != Int32FromUint8(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { goto _1 } return uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 @@ -123205,20 +123203,20 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { } func _labelof(tls *TLS, a uintptr) (r int32) { - return int32((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) + return Int32FromUint8((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) } func _scopeof(tls *TLS, a uintptr) (r int32) { - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { - return int32(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { + return Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { return int32(2) } - if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { + if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { return int32(2) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { return int32(5) } return int32(14) @@ -123229,7 +123227,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(128) && !((int32(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^int32(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { + if !(i < uint32(128) && !((Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { break } goto _1 @@ -123237,7 +123235,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { ; i++ } - return int32(i) + return Int32FromUint32(i) } func _addrcmp(tls *TLS, _a uintptr, _b uintptr) (r int32) { @@ -123422,8 +123420,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } dpolicy = _policyof(tls, bp+32+8) dscope = _scopeof(tls, bp+32+8) - dlabel = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) - dprec = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) + dlabel = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) + dprec = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) prefixlen = 0 fd = Xsocket(tls, family1, Int32FromInt32(SOCK_DGRAM)|Int32FromInt32(SOCK_CLOEXEC), int32(IPPROTO_UDP)) if fd >= 0 { @@ -123454,7 +123452,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i ; i++ } - Xqsort(tls, buf, uint32(cnt), uint32(28), __ccgo_fp(_addrcmp)) + Xqsort(tls, buf, Uint32FromInt32(cnt), uint32(28), __ccgo_fp(_addrcmp)) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) return cnt } @@ -123505,8 +123503,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -int32(8) } (*(*Tservice)(unsafe.Pointer(buf))).Fport = uint16(0) - (*(*Tservice)(unsafe.Pointer(buf))).Fproto = uint8(proto) - (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(socktype) + (*(*Tservice)(unsafe.Pointer(buf))).Fproto = Uint8FromInt32(proto) + (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = Uint8FromInt32(socktype) return int32(1) } if name != 0 { @@ -123571,7 +123569,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } if v10 = p > bp; v10 { v7 = int32(*(*int8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v8 = BoolInt32(v7 == int32(' ') || uint32(v7)-uint32('\t') < uint32(5)) + v8 = BoolInt32(v7 == int32(' ') || Uint32FromInt32(v7)-uint32('\t') < uint32(5)) goto _9 _9: } @@ -123580,7 +123578,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } if v14 = *(*int8)(unsafe.Pointer(p + uintptr(l))) != 0; v14 { v11 = int32(*(*int8)(unsafe.Pointer(p + uintptr(l)))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: } @@ -123601,7 +123599,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i for { if v19 = *(*int8)(unsafe.Pointer(p)) != 0; v19 { v16 = int32(*(*int8)(unsafe.Pointer(p))) - v17 = BoolInt32(v16 == int32(' ') || uint32(v16)-uint32('\t') < uint32(5)) + v17 = BoolInt32(v16 == int32(' ') || Uint32FromInt32(v16)-uint32('\t') < uint32(5)) goto _18 _18: } @@ -123683,7 +123681,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = uint16(type1) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = Uint16FromInt32(type1) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123694,7 +123692,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = uint16(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = Uint16FromInt32(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123716,7 +123714,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fg.Frtgen_family = uint8(af) + })(unsafe.Pointer(bp))))).Fg.Frtgen_family = Uint8FromInt32(af) r = Xsend(tls, fd, bp, uint32(20), 0) if r < 0 { return r @@ -123728,13 +123726,13 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } h = bp for { - if !(uint32(int32(bp+uintptr(r))-int32(h)) >= uint32(16)) { + if !(Uint32FromInt32(int32(bp+uintptr(r))-int32(h)) >= uint32(16)) { break } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { return 0 } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { return -int32(1) } ret = (*(*func(*TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{cb})))(tls, ctx, h) @@ -123744,7 +123742,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, goto _1 _1: ; - h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } } return r1 @@ -123790,7 +123788,7 @@ func Xns_get16(tls *TLS, cp uintptr) (r uint32) { trc("tls=%v cp=%v, (%v:)", tls, cp, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(int32(*(*uint8)(unsafe.Pointer(cp)))< %v", r) }() } - return uint32(*(*uint8)(unsafe.Pointer(cp)))< int32(eom)-int32(p) { goto bad } @@ -123960,7 +123958,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin if rrnum == -int32(1) { rrnum = (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum } - if rrnum < 0 || rrnum >= int32(*(*Tuint16_t)(unsafe.Pointer(handle + 12 + uintptr(section)*2))) { + if rrnum < 0 || rrnum >= Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 12 + uintptr(section)*2))) { goto bad } if rrnum < (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum { @@ -123999,7 +123997,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin p4 = handle + 44 *(*uintptr)(unsafe.Pointer(p4)) += uintptr(2) (*Tns_rr)(unsafe.Pointer(rr)).Frdlength = uint16(Xns_get16(tls, *(*uintptr)(unsafe.Pointer(p4))-uintptr(2))) - if int32((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int32((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int32((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { + if Int32FromUint16((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int32((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int32((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { goto size } (*Tns_rr)(unsafe.Pointer(rr)).Frdata = (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr @@ -124010,7 +124008,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin (*Tns_rr)(unsafe.Pointer(rr)).Frdata = UintptrFromInt32(0) } (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum++ - if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > int32(*(*Tuint16_t)(unsafe.Pointer(handle + 12 + uintptr(section)*2))) { + if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 12 + uintptr(section)*2))) { (*Tns_msg)(unsafe.Pointer(handle)).F_sect = section + int32(1) if (*Tns_msg)(unsafe.Pointer(handle)).F_sect == int32(_ns_s_max) { (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum = -int32(1) @@ -124039,7 +124037,7 @@ func Xns_name_uncompress(tls *TLS, msg uintptr, eom uintptr, src uintptr, dst ui } var r int32 _ = r - r = Xdn_expand(tls, msg, eom, src, dst, int32(dstsiz)) + r = Xdn_expand(tls, msg, eom, src, dst, Int32FromUint32(dstsiz)) if r < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) } @@ -124092,14 +124090,14 @@ func Xntohs(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*int8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } /* do we really need all these?? */ @@ -124126,10 +124124,10 @@ func Xgetprotoent(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if uint32(_idx) >= uint32(239) { + if Uint32FromInt32(_idx) >= uint32(239) { return UintptrFromInt32(0) } - _p.Fp_proto = int32(_protos[_idx]) + _p.Fp_proto = Int32FromUint8(_protos[_idx]) _p.Fp_name = uintptr(unsafe.Pointer(&_protos)) + uintptr(_idx+int32(1)) _p.Fp_aliases = uintptr(unsafe.Pointer(&_aliases)) _idx = int32(uint32(_idx) + (Xstrlen(tls, _p.Fp_name) + Uint32FromInt32(2))) @@ -124191,7 +124189,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v3 = int32(1) v4 = fd v5 = int32(buf) - v6 = int32(len1) + v6 = Int32FromUint32(len1) v7 = flags v8 = int32(addr) v9 = int32(alen) @@ -124228,7 +124226,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, timeout uintptr) (r1 int32) { @@ -124267,9 +124265,9 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti } else { v3 = uintptr(0) } - r = ___syscall_cp(tls, int32(SYS_recvmmsg_time64), fd, int32(msgvec), int32(vlen), int32(flags), int32(v3), 0) + r = ___syscall_cp(tls, int32(SYS_recvmmsg_time64), fd, int32(msgvec), Int32FromUint32(vlen), Int32FromUint32(flags), int32(v3), 0) if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } if vlen > uint32(IOV_MAX) { vlen = uint32(IOV_MAX) @@ -124278,7 +124276,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti csize = Xrealloc(tls, csize, v4) i = 0 for { - if !(uint32(i) < vlen) { + if !(Uint32FromInt32(i) < vlen) { break } *(*Tsocklen_t)(unsafe.Add(unsafe.Pointer(csize), i*4)) = (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*32))).Fmsg_hdr.Fmsg_controllen @@ -124288,20 +124286,20 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti i++ } if timeout != 0 { - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v7 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v7 = Uint64FromInt64(s) } else { - v7 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v7 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ - 0: int32(v7), + 0: Int32FromUint64(v7), 1: ns, } v6 = bp + 16 } else { v6 = uintptr(0) } - r = ___syscall_cp(tls, int32(SYS_recvmmsg), fd, int32(msgvec), int32(vlen), int32(flags), int32(v6), 0) + r = ___syscall_cp(tls, int32(SYS_recvmmsg), fd, int32(msgvec), Int32FromUint32(vlen), Int32FromUint32(flags), int32(v6), 0) i1 = 0 for { if !(i1 < r) { @@ -124313,7 +124311,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti ; i1++ } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { @@ -124377,10 +124375,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { goto _1 _1: ; - if (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len < uint32(12) || ((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&uint32(^int32(Uint32FromInt64(4)-Uint32FromInt32(1)))+uint32(12) >= uint32(int32((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int32(cmsg)) { + if (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len < uint32(12) || ((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&Uint32FromInt32(^Int32FromUint32(Uint32FromInt64(4)-Uint32FromInt32(1)))+uint32(12) >= Uint32FromInt32(int32((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int32(cmsg)) { v6 = uintptr(0) } else { - v6 = cmsg + uintptr(((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&uint32(^int32(Uint32FromInt64(4)-Uint32FromInt32(1)))) + v6 = cmsg + uintptr(((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&Uint32FromInt32(^Int32FromUint32(Uint32FromInt64(4)-Uint32FromInt32(1)))) } cmsg = v6 } @@ -124392,10 +124390,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { return } *(*Tsocklen_t)(unsafe.Pointer(msg + 20)) += (Uint32FromInt64(16)+Uint32FromInt64(4)-Uint32FromInt32(1)) & ^(Uint32FromInt64(4)-Uint32FromInt32(1)) + (Uint32FromInt64(12)+Uint32FromInt64(4)-Uint32FromInt32(1)) & ^(Uint32FromInt64(4)-Uint32FromInt32(1)) - if (*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len < uint32(12) || ((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&uint32(^int32(Uint32FromInt64(4)-Uint32FromInt32(1)))+uint32(12) >= uint32(int32((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int32(last)) { + if (*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len < uint32(12) || ((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&Uint32FromInt32(^Int32FromUint32(Uint32FromInt64(4)-Uint32FromInt32(1)))+uint32(12) >= Uint32FromInt32(int32((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int32(last)) { v7 = uintptr(0) } else { - v7 = last + uintptr(((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&uint32(^int32(Uint32FromInt64(4)-Uint32FromInt32(1)))) + v7 = last + uintptr(((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&Uint32FromInt32(^Int32FromUint32(Uint32FromInt64(4)-Uint32FromInt32(1)))) } cmsg = v7 (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_level = int32(SOL_SOCKET) @@ -124459,7 +124457,7 @@ func Xrecvmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r2 Tssize_t) { v10 = r goto _11 _11: - r1 = X__syscall_ret(tls, uint32(v10)) + r1 = X__syscall_ret(tls, Uint32FromInt32(v10)) if r1 >= 0 { X__convert_scm_timestamps(tls, msg, orig_controllen) } @@ -124493,13 +124491,13 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, if l != 0 && int32(*(*int8)(unsafe.Pointer(dname + uintptr(l-uint32(1))))) == int32('.') { return -int32(1) } - n = int32(uint32(17) + l + BoolUint32(!!(l != 0))) - if l > uint32(253) || buflen < n || uint32(op) > uint32(15) || uint32(class) > uint32(255) || uint32(type1) > uint32(255) { + n = Int32FromUint32(uint32(17) + l + BoolUint32(!!(l != 0))) + if l > uint32(253) || buflen < n || Uint32FromInt32(op) > uint32(15) || Uint32FromInt32(class) > uint32(255) || Uint32FromInt32(type1) > uint32(255) { return -int32(1) } /* Construct query template - ID will be filled later */ - Xmemset(tls, bp, 0, uint32(n)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(op*int32(8) + int32(1)) + Xmemset(tls, bp, 0, Uint32FromInt32(n)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = Uint8FromInt32(op*int32(8) + int32(1)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(32) /* AD */ (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(5)] = uint8(1) Xmemcpy(tls, bp+uintptr(13), dname, l) @@ -124510,7 +124508,7 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, } j = i for { - if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && int32((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { + if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && Int32FromUint8((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { break } goto _2 @@ -124518,23 +124516,23 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, ; j++ } - if uint32(j-i)-uint32(1) > uint32(62) { + if Uint32FromInt32(j-i)-uint32(1) > uint32(62) { return -int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = uint8(j - i) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = Uint8FromInt32(j - i) goto _1 _1: ; i = j + int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(type1) - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(class) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = Uint8FromInt32(type1) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = Uint8FromInt32(class) /* Make a reasonably unpredictable id */ Xclock_gettime(tls, CLOCK_REALTIME, bp+280) - id = int32((uint32((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + uint32((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint32(65536)) & uint32(0xffff)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = uint8(id / int32(256)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(id) - Xmemcpy(tls, buf, bp, uint32(n)) + id = Int32FromUint32((Uint32FromInt32((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + Uint32FromInt32((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint32(65536)) & uint32(0xffff)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = Uint8FromInt32(id / int32(256)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = Uint8FromInt32(id) + Xmemcpy(tls, buf, bp, Uint32FromInt32(n)) return n } @@ -124670,7 +124668,7 @@ func _mtime(tls *TLS) (r uint32) { if Xclock_gettime(tls, int32(CLOCK_MONOTONIC), bp) < 0 && *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOSYS) { Xclock_gettime(tls, CLOCK_REALTIME, bp) } - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint32(1000) + uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int32(1000000)) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint32(1000) + Uint32FromInt32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int32(1000000)) } func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, q uintptr, ql int32) (r1 int32) { @@ -124680,8 +124678,8 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, var _ /* mh at bp+24 */ Tmsghdr _, _ = fd, r *(*[2]Tuint8_t)(unsafe.Pointer(bp + 16)) = [2]Tuint8_t{ - 0: uint8(ql >> int32(8)), - 1: uint8(ql), + 0: Uint8FromInt32(ql >> int32(8)), + 1: Uint8FromInt32(ql), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -124690,7 +124688,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, }, 1: { Fiov_base: q, - Fiov_len: uint32(ql), + Fiov_len: Uint32FromInt32(ql), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 24)) = Tmsghdr{ @@ -124799,20 +124797,20 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a sl = uint32(16) nns = 0 family = int32(PF_INET) - v1 = uint32(nqueries+int32(2)) * 8 + v1 = Uint32FromInt32(nqueries+int32(2)) * 8 pfd = Xrealloc(tls, pfd, v1) - v2 = uint32(nqueries) * 4 + v2 = Uint32FromInt32(nqueries) * 4 qpos = Xrealloc(tls, qpos, v2) - v3 = uint32(nqueries) * 4 + v3 = Uint32FromInt32(nqueries) * 4 apos = Xrealloc(tls, apos, v3) - v4 = uint32(nqueries) * 2 + v4 = Uint32FromInt32(nqueries) * 2 alen_buf = Xrealloc(tls, alen_buf, v4) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), bp+160) - timeout = int32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) - attempts = int32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) + timeout = Int32FromUint32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) + attempts = Int32FromUint32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) nns = 0 for { - if !(uint32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { + if !(Uint32FromInt32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { break } iplit = conf + uintptr(nns)*28 @@ -124835,7 +124833,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 76 + uintptr(nns)*28))).Fsin6_scope_id = (*Taddress)(unsafe.Pointer(iplit)).Fscopeid v6 = Int32FromInt32(PF_INET6) family = v6 - (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 76 + uintptr(nns)*28))).Fsin6_family = uint16(v6) + (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 76 + uintptr(nns)*28))).Fsin6_family = Uint16FromInt32(v6) } goto _5 _5: @@ -124873,7 +124871,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(i < nns) { break } - if int32((*(*[3]struct { + if Int32FromUint16((*(*[3]struct { Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte @@ -124895,7 +124893,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte - })(unsafe.Pointer(bp + 48))).Fsin.Fsin_family = uint16(family) + })(unsafe.Pointer(bp + 48))).Fsin.Fsin_family = Uint16FromInt32(family) if fd < 0 || Xbind(tls, fd, bp+48, sl) < 0 { if fd >= 0 { Xclose(tls, fd) @@ -124922,15 +124920,15 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), (nqueries+int32(1))*8))).Ffd = -int32(2) __pthread_cleanup_push(tls, bp+164, __ccgo_fp(_cleanup), pfd) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp + 160)), uintptr(0)) - Xmemset(tls, alens, 0, uint32(4)*uint32(nqueries)) + Xmemset(tls, alens, 0, uint32(4)*Uint32FromInt32(nqueries)) retry_interval = timeout / attempts next = 0 v10 = _mtime(tls) t2 = v10 t0 = v10 - t1 = t2 - uint32(retry_interval) + t1 = t2 - Uint32FromInt32(retry_interval) for { - if !(t2-t0 < uint32(timeout)) { + if !(t2-t0 < Uint32FromInt32(timeout)) { break } /* This is the loop exit condition: that all queries @@ -124948,7 +124946,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if i == nqueries { break } - if t2-t1 >= uint32(retry_interval) { + if t2-t1 >= Uint32FromInt32(retry_interval) { /* Query all configured namservers in parallel */ i = 0 for { @@ -124961,7 +124959,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(j < nns) { break } - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), uint32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+76+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), Uint32FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+76+uintptr(j)*28, sl) goto _14 _14: ; @@ -124977,14 +124975,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry = int32(2) * nqueries } /* Wait for a response, or until time to retry */ - if Xpoll(tls, pfd, uint32(nqueries+int32(1)), int32(t1+uint32(retry_interval)-t2)) <= 0 { + if Xpoll(tls, pfd, Uint32FromInt32(nqueries+int32(1)), Int32FromUint32(t1+Uint32FromInt32(retry_interval)-t2)) <= 0 { goto _11 } for next < nqueries { *(*[1]Tiovec)(unsafe.Pointer(bp + 8)) = [1]Tiovec{ 0: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)), - Fiov_len: uint32(asize), + Fiov_len: Uint32FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 176)) = Tmsghdr{ @@ -125018,7 +125016,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Find which query this answer goes with, if any */ i = next for { - if !(i < nqueries && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4))))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4))))) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)) + 1))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)) + 1))))) { + if !(i < nqueries && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4))))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4))))) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)) + 1))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)) + 1))))) { break } goto _16 @@ -125035,7 +125033,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Only accept positive or negative responses; * retry immediately on server failure, and ignore * all other codes such as refusal. */ - switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)) + 3))) & Int32FromInt32(15) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)) + 3))) & Int32FromInt32(15) { case 0: fallthrough case int32(3): @@ -125045,7 +125043,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry-- } if v18 && v17 != 0 { - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), uint32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+76+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), Uint32FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+76+uintptr(j)*28, sl) } fallthrough default: @@ -125065,14 +125063,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a next++ } } else { - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)), uint32(rlen)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)), Uint32FromInt32(rlen)) } /* Ignore further UDP if all slots full or TCP-mode */ if next == nqueries { (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), nqueries*8))).Fevents = 0 } /* If answer is truncated (TC bit), fallback to TCP */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 176))).Fmsg_flags&int32(MSG_TRUNC) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 176))).Fmsg_flags&int32(MSG_TRUNC) != 0 { *(*int32)(unsafe.Pointer(alens + uintptr(i)*4)) = -int32(1) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), uintptr(0)) r = _start_tcp(tls, pfd+uintptr(i)*8, family, bp+76+uintptr(j)*28, sl, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), *(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))) @@ -125091,8 +125089,8 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a } if int32((*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Frevents)&int32(POLLOUT) != 0 { *(*[2]Tuint8_t)(unsafe.Pointer(bp + 28)) = [2]Tuint8_t{ - 0: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), - 1: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + 0: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), + 1: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), } *(*[2]Tiovec)(unsafe.Pointer(bp + 12)) = [2]Tiovec{ 0: { @@ -125101,14 +125099,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), - Fiov_len: uint32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + Fiov_len: Uint32FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 204)) = Tmsghdr{ Fmsg_iov: bp + 12, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+204, uint32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) + _step_mh(tls, bp+204, Uint32FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) r = Xsendmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+204, int32(MSG_NOSIGNAL)) if r < 0 { goto out @@ -125136,14 +125134,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)), - Fiov_len: uint32(asize), + Fiov_len: Uint32FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 232)) = Tmsghdr{ Fmsg_iov: bp + 32, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+232, uint32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) + _step_mh(tls, bp+232, Uint32FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) r = Xrecvmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+232, 0) if r <= 0 { goto out @@ -125152,14 +125150,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < int32(2) { goto _21 } - alen = int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) + alen = Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) if alen < int32(13) { goto out } if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < alen+int32(2) && *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < asize+int32(2) { goto _21 } - rcode = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)) + 3))) & int32(15) + rcode = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)) + 3))) & int32(15) if rcode != 0 && rcode != int32(3) { goto out } @@ -125237,7 +125235,7 @@ func X__res_send(tls *TLS, _msg uintptr, _msglen int32, _answer uintptr, _anslen } else { v1 = *(*int32)(unsafe.Pointer(bp + 12)) } - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp+16, uint32(v1)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp+16, Uint32FromInt32(v1)) } return r } @@ -125316,13 +125314,13 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } if v4 = !(Xstrncmp(tls, bp, __ccgo_ts+1081, uint32(7)) != 0); v4 { v1 = int32((*(*[256]int8)(unsafe.Pointer(bp)))[int32(7)]) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: } if v4 && v2 != 0 { p = Xstrstr(tls, bp, __ccgo_ts+1089) - if p != 0 && BoolInt32(uint32(*(*int8)(unsafe.Pointer(p + 6)))-uint32('0') < uint32(10)) != 0 { + if p != 0 && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(p + 6)))-uint32('0') < uint32(10)) != 0 { p += uintptr(6) x = Xstrtoul(tls, p, bp+648, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 648)) != p { @@ -125335,7 +125333,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1096) - if p != 0 && BoolInt32(uint32(*(*int8)(unsafe.Pointer(p + 9)))-uint32('0') < uint32(10)) != 0 { + if p != 0 && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(p + 9)))-uint32('0') < uint32(10)) != 0 { p += uintptr(9) x1 = Xstrtoul(tls, p, bp+648, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 648)) != p { @@ -125348,7 +125346,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1106) - if p != 0 && (BoolInt32(uint32(*(*int8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*int8)(unsafe.Pointer(p + 8))) == int32('.')) { + if p != 0 && (BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*int8)(unsafe.Pointer(p + 8))) == int32('.')) { p += uintptr(8) x2 = Xstrtoul(tls, p, bp+648, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 648)) != p { @@ -125364,7 +125362,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } if v11 = !(Xstrncmp(tls, bp, __ccgo_ts+1115, uint32(10)) != 0); v11 { v8 = int32((*(*[256]int8)(unsafe.Pointer(bp)))[int32(10)]) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -125375,7 +125373,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ p = bp + uintptr(11) for { v13 = int32(*(*int8)(unsafe.Pointer(p))) - v14 = BoolInt32(v13 == int32(' ') || uint32(v13)-uint32('\t') < uint32(5)) + v14 = BoolInt32(v13 == int32(' ') || Uint32FromInt32(v13)-uint32('\t') < uint32(5)) goto _15 _15: if !(v14 != 0) { @@ -125390,7 +125388,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ for { if v20 = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 648)))) != 0; v20 { v17 = int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 648))))) - v18 = BoolInt32(v17 == int32(' ') || uint32(v17)-uint32('\t') < uint32(5)) + v18 = BoolInt32(v17 == int32(' ') || Uint32FromInt32(v17)-uint32('\t') < uint32(5)) goto _19 _19: } @@ -125413,7 +125411,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } if v24 = Xstrncmp(tls, bp, __ccgo_ts+1126, uint32(6)) != 0 && Xstrncmp(tls, bp, __ccgo_ts+1133, uint32(6)) != 0; !v24 { v21 = int32((*(*[256]int8)(unsafe.Pointer(bp)))[int32(6)]) - v22 = BoolInt32(v21 == int32(' ') || uint32(v21)-uint32('\t') < uint32(5)) + v22 = BoolInt32(v21 == int32(' ') || Uint32FromInt32(v21)-uint32('\t') < uint32(5)) goto _23 _23: } @@ -125423,7 +125421,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ p = bp + uintptr(7) for { v26 = int32(*(*int8)(unsafe.Pointer(p))) - v27 = BoolInt32(v26 == int32(' ') || uint32(v26)-uint32('\t') < uint32(5)) + v27 = BoolInt32(v26 == int32(' ') || Uint32FromInt32(v26)-uint32('\t') < uint32(5)) goto _28 _28: if !(v27 != 0) { @@ -125449,7 +125447,7 @@ no_resolv_conf: X__lookup_ipliteral(tls, conf, __ccgo_ts+1140, PF_UNSPEC) nns = int32(1) } - (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(nns) + (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = Uint32FromInt32(nns) return 0 } @@ -125466,7 +125464,7 @@ func Xsendmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32) (r trc("tls=%v fd=%v msgvec=%v vlen=%v flags=%v, (%v:)", tls, fd, msgvec, vlen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_sendmmsg), fd, int32(msgvec), int32(vlen), int32(flags), 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_sendmmsg), fd, int32(msgvec), Int32FromUint32(vlen), Int32FromUint32(flags), 0, 0))) } func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { @@ -125521,7 +125519,7 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr uintptr, alen Tsocklen_t) (r1 Tssize_t) { @@ -125539,10 +125537,10 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v3 = int32(1) v4 = fd v5 = int32(buf) - v6 = int32(len1) + v6 = Int32FromUint32(len1) v7 = flags v8 = int32(addr) - v9 = int32(alen) + v9 = Int32FromUint32(alen) if v3 != 0 { r = ___syscall_cp(tls, v1, v4, v5, v6, v7, v8, v9) } else { @@ -125576,7 +125574,7 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } func Xendservent(tls *TLS) { @@ -125620,7 +125618,7 @@ func Xsetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, v5 = level v6 = optname v7 = int32(optval) - v8 = int32(optlen) + v8 = Int32FromUint32(optlen) v9 = Int32FromInt32(0) if v3 != 0 { r = ___syscall_cp(tls, v1, v4, v5, v6, v7, v8, v9) @@ -125667,13 +125665,13 @@ _11: break } if optlen < uint32(16) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } tv = optval s = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec us = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -125681,14 +125679,14 @@ _11: if optname == int32(SO_SNDTIMEO) { optname = int32(SO_SNDTIMEO_OLD) } - if !((uint64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v12 = uint64(us) + if !((Uint64FromInt64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v12 = Uint64FromInt64(us) } else { - v12 = uint64(0x7fffffff) + (0+uint64(us))>>int32(63) + v12 = uint64(0x7fffffff) + (0+Uint64FromInt64(us))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp + 48)) = [2]int32{ 0: int32(s), - 1: int32(v12), + 1: Int32FromUint64(v12), } v13 = int32(SYS_setsockopt) v14 = int32(__SC_setsockopt) @@ -125697,7 +125695,7 @@ _11: v17 = level v18 = optname v19 = int32(bp + 48) - v20 = int32(Uint32FromInt32(2) * Uint32FromInt64(4)) + v20 = Int32FromUint32(Uint32FromInt32(2) * Uint32FromInt64(4)) v21 = Int32FromInt32(0) if v15 != 0 { r = ___syscall_cp(tls, v13, v16, v17, v18, v19, v20, v21) @@ -125752,7 +125750,7 @@ _11: v28 = level v29 = optname v30 = int32(optval) - v31 = int32(optlen) + v31 = Int32FromUint32(optlen) v32 = Int32FromInt32(0) if v26 != 0 { r = ___syscall_cp(tls, v24, v27, v28, v29, v30, v31, v32) @@ -125792,7 +125790,7 @@ _11: } } } - return X__syscall_ret(tls, uint32(r1)) + return X__syscall_ret(tls, Uint32FromInt32(r1)) } func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { @@ -125847,7 +125845,7 @@ func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { v10 = r goto _11 _11: - return X__syscall_ret(tls, uint32(v10)) + return X__syscall_ret(tls, Uint32FromInt32(v10)) } func Xsockatmark(tls *TLS, s int32) (r int32) { @@ -125962,7 +125960,7 @@ _11: _22: s = v21 if s < 0 { - return X__syscall_ret(tls, uint32(s)) + return X__syscall_ret(tls, Uint32FromInt32(s)) } if type1&int32(SOCK_CLOEXEC) != 0 { X__syscall3(tls, int32(SYS_fcntl64), s, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) @@ -125971,7 +125969,7 @@ _11: X__syscall3(tls, int32(SYS_fcntl64), s, Int32FromInt32(F_SETFL), Int32FromInt32(O_NONBLOCK)) } } - return X__syscall_ret(tls, uint32(s)) + return X__syscall_ret(tls, Uint32FromInt32(s)) } func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr) (r2 int32) { @@ -126026,7 +126024,7 @@ func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr v10 = r goto _11 _11: - r1 = X__syscall_ret(tls, uint32(v10)) + r1 = X__syscall_ret(tls, Uint32FromInt32(v10)) if r1 < 0 && (*(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EINVAL) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EPROTONOSUPPORT)) && type1&(Int32FromInt32(SOCK_CLOEXEC)|Int32FromInt32(SOCK_NONBLOCK)) != 0 { v12 = int32(SYS_socketpair) v13 = int32(__SC_socketpair) @@ -126070,7 +126068,7 @@ _11: v21 = r goto _22 _22: - r1 = X__syscall_ret(tls, uint32(v21)) + r1 = X__syscall_ret(tls, Uint32FromInt32(v21)) if r1 < 0 { return r1 } @@ -126190,7 +126188,7 @@ func _itoa1(tls *TLS, p uintptr, x Tuint32_t) (r uintptr) { for cond := true; cond; cond = x != 0 { p-- v2 = p - *(*int8)(unsafe.Pointer(v2)) = int8(uint32('0') + x%uint32(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint32(uint32('0') + x%uint32(10)) x /= uint32(10) } return p @@ -126267,11 +126265,11 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint32(0xffffffff)-uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { + if Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint32(0xffffffff)-Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) + len1 = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) i = 0 for { if !(i < (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]) { @@ -126322,18 +126320,18 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = v8 goto cleanup_f } - if uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { - if uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint32FromUint32(0xffffffff)/Uint32FromInt64(4) { + if Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { + if Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint32FromUint32(0xffffffff)/Uint32FromInt64(4) { rv = int32(ENOMEM) goto cleanup_f } - tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint32(4)) + tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint32(4)) if !(tmp1 != 0) { rv = *(*int32)(unsafe.Pointer(X__errno_location(tls))) goto cleanup_f } *(*uintptr)(unsafe.Pointer(mem)) = tmp1 - *(*Tsize_t)(unsafe.Pointer(nmem)) = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) + *(*Tsize_t)(unsafe.Pointer(nmem)) = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) } if (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] != 0 { *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(mem)))) = *(*uintptr)(unsafe.Pointer(buf)) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) @@ -126363,7 +126361,7 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz } (*Tgroup)(unsafe.Pointer(gr)).Fgr_name = *(*uintptr)(unsafe.Pointer(buf)) (*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd = (*Tgroup)(unsafe.Pointer(gr)).Fgr_name + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) - (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) + (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) (*Tgroup)(unsafe.Pointer(gr)).Fgr_mem = *(*uintptr)(unsafe.Pointer(mem)) if *(*int8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr(-Int32FromInt32(1)))) != 0 || *(*int8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]-int32(1)))) != 0 { rv = int32(EIO) @@ -126538,10 +126536,10 @@ func _atou(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126715,11 +126713,11 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u goto cleanup } if (*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRFOUND)] != 0 { - nscdbuf = Xcalloc(tls, uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRNGRPS)]), uint32(4)) + nscdbuf = Xcalloc(tls, Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRNGRPS)]), uint32(4)) if !(nscdbuf != 0) { goto cleanup } - nbytes = uint32(4) * uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRNGRPS)]) + nbytes = uint32(4) * Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRNGRPS)]) if nbytes != 0 && !(Xfread(tls, nscdbuf, nbytes, uint32(1), f) != 0) { if !(Xferror(tls, f) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EIO) @@ -126848,7 +126846,7 @@ func _itoa2(tls *TLS, p uintptr, x Tuint32_t) (r uintptr) { for cond := true; cond; cond = x != 0 { p-- v2 = p - *(*int8)(unsafe.Pointer(v2)) = int8(uint32('0') + x%uint32(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint32(uint32('0') + x%uint32(10)) x /= uint32(10) } return p @@ -126930,11 +126928,11 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint32FromUint32(0xffffffff)/Uint32FromInt32(8) { + if Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint32FromUint32(0xffffffff)/Uint32FromInt32(8) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) + len1 = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) if len1 > *(*Tsize_t)(unsafe.Pointer(size)) || !(*(*uintptr)(unsafe.Pointer(buf)) != 0) { tmp = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(buf)), len1) if !(tmp != 0) { @@ -126958,8 +126956,8 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_passwd + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_shell = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) /* Don't assume that nscd made sure to null terminate strings. * It's supposed to, but malicious nscd should be ignored * rather than causing a crash. @@ -127107,10 +127105,10 @@ func _atou1(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -127278,7 +127276,7 @@ func X__nscd_query(tls *TLS, req Tint32_t, key uintptr, buf uintptr, len1 Tsize_ *(*[3]Tint32_t)(unsafe.Pointer(bp + 16)) = [3]Tint32_t{ 0: int32(NSCDVERSION), 1: req, - 2: int32(Xstrnlen(tls, key, uint32(LOGIN_NAME_MAX)) + uint32(1)), + 2: Int32FromUint32(Xstrnlen(tls, key, uint32(LOGIN_NAME_MAX)) + uint32(1)), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -127351,11 +127349,11 @@ retry: if !(i < Uint32FromInt64(12)/Uint32FromInt64(4)) { break } - v3 = uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 16)))[i]) + v3 = Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 16)))[i]) v4 = v3>>int32(24) | v3>>int32(8)&uint32(0xff00) | v3<>int32(24) | v7>>int32(8)&uint32(0xff00) | v7< %v", r) }() } - return int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) + return Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) } func Xlrand48(tls *TLS) (r int32) { @@ -127643,7 +127641,7 @@ func Xjrand48(tls *TLS, s uintptr) (r int32) { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16)) + return Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16)) } func Xmrand48(tls *TLS) (r int32) { @@ -127669,7 +127667,7 @@ func Xrand(tls *TLS) (r int32) { defer func() { trc("-> %v", r) }() } _seed = uint64(6364136223846793005)*_seed + uint64(1) - return int32(_seed >> int32(33)) + return Int32FromUint64(_seed >> int32(33)) } func _temper(tls *TLS, x uint32) (r uint32) { @@ -127689,7 +127687,7 @@ func Xrand_r(tls *TLS, seed uintptr) (r int32) { _ = v1 v1 = *(*uint32)(unsafe.Pointer(seed))*Uint32FromInt32(1103515245) + Uint32FromInt32(12345) *(*uint32)(unsafe.Pointer(seed)) = v1 - return int32(_temper(tls, v1) / uint32(2)) + return Int32FromUint32(_temper(tls, v1) / uint32(2)) } /* @@ -127747,15 +127745,15 @@ func _lcg64(tls *TLS, x Tuint64_t) (r Tuint64_t) { } func _savestate(tls *TLS) (r uintptr) { - *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) = uint32(_n<> int32(16)) - _i = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) - _j = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) + _n = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> int32(16)) + _i = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) + _j = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) } func ___srandom(tls *TLS, seed uint32) { @@ -127861,11 +127859,11 @@ func Xrandom(tls *TLS) (r int32) { if _n == 0 { v1 = _lcg31(tls, *(*Tuint32_t)(unsafe.Pointer(_x1))) *(*Tuint32_t)(unsafe.Pointer(_x1)) = v1 - k = int32(v1) + k = Int32FromUint32(v1) goto end } *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) += *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_j)*4)) - k = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) + k = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) _i++ v2 = _i if v2 == _n { @@ -127903,8 +127901,8 @@ func Xsrand48(tls *TLS, seed int32) { defer tls.Free(16) *(*[3]uint16)(unsafe.Pointer(bp)) = [3]uint16{ 0: uint16(0x330e), - 1: uint16(seed), - 2: uint16(seed >> int32(16)), + 1: Uint16FromInt32(seed), + 2: Uint16FromInt32(seed >> int32(16)), } Xseed48(tls, bp) } @@ -127932,7 +127930,7 @@ func Xexecl(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint32(argc+int32(1)) * 4 + v2 = Uint32FromInt32(argc+int32(1)) * 4 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*4)) = argv0 @@ -127976,7 +127974,7 @@ func Xexecle(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint32(argc+int32(1)) * 4 + v2 = Uint32FromInt32(argc+int32(1)) * 4 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*4)) = argv0 @@ -128020,7 +128018,7 @@ func Xexeclp(tls *TLS, file uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint32(argc+int32(1)) * 4 + v2 = Uint32FromInt32(argc+int32(1)) * 4 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*4)) = argv0 @@ -128055,7 +128053,7 @@ func Xexecve(tls *TLS, path uintptr, argv uintptr, envp uintptr) (r int32) { defer func() { trc("-> %v", r) }() } /* do we need to use environ if envp is null? */ - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_execve), int32(path), int32(argv), int32(envp)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_execve), int32(path), int32(argv), int32(envp)))) } func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { @@ -128081,18 +128079,18 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { if !(path != 0) { path = __ccgo_ts + 1281 } - k = Xstrnlen(tls, file, uint32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + k = Xstrnlen(tls, file, Uint32FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if k > uint32(NAME_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENAMETOOLONG) return -int32(1) } - l = Xstrnlen(tls, path, uint32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint32(1) + l = Xstrnlen(tls, path, Uint32FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint32(1) p = path for { v2 = l + k + uint32(1) b = Xrealloc(tls, b, v2) z = X__strchrnul(tls, p, int32(':')) - if uint32(int32(z)-int32(p)) >= l { + if Uint32FromInt32(int32(z)-int32(p)) >= l { v3 = z z++ if !(*(*int8)(unsafe.Pointer(v3)) != 0) { @@ -128100,7 +128098,7 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { } goto _1 } - Xmemcpy(tls, b, p, uint32(int32(z)-int32(p))) + Xmemcpy(tls, b, p, Uint32FromInt32(int32(z)-int32(p))) *(*int8)(unsafe.Add(unsafe.Pointer(b), int32(z)-int32(p))) = int8('/') Xmemcpy(tls, b+uintptr(int32(z)-int32(p))+BoolUintptr(z > p), file, k+uint32(1)) Xexecve(tls, b, argv, envp) @@ -128158,9 +128156,9 @@ func Xfexecve(tls *TLS, fd int32, argv uintptr, envp uintptr) (r1 int32) { _ = r r = X__syscall5(tls, int32(SYS_execveat), fd, int32(__ccgo_ts), int32(argv), int32(envp), Int32FromInt32(AT_EMPTY_PATH)) if r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - X__procfdname(tls, bp, uint32(fd)) + X__procfdname(tls, bp, Uint32FromInt32(fd)) Xexecve(tls, bp, argv, envp) if *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EBADF) @@ -128479,8 +128477,8 @@ func Xposix_spawnattr_setflags(tls *TLS, attr uintptr, flags int16) (r int32) { } var all_flags uint32 _ = all_flags - all_flags = uint32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) - if uint32(flags) & ^all_flags != 0 { + all_flags = Uint32FromInt32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) + if Uint32FromInt16(flags) & ^all_flags != 0 { return int32(EINVAL) } (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(flags) @@ -128520,7 +128518,7 @@ func Xvfork(tls *TLS) (r Tpid_t) { defer func() { trc("-> %v", r) }() } /* vfork syscall cannot be made from C code */ - return X__syscall_ret(tls, uint32(X__syscall0(tls, int32(SYS_fork)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall0(tls, int32(SYS_fork)))) } func Xwait(tls *TLS, status uintptr) (r Tpid_t) { @@ -128536,7 +128534,7 @@ func Xwaitid(tls *TLS, type1 Tidtype_t, id Tid_t, info uintptr, options int32) ( trc("tls=%v type1=%v id=%v info=%v options=%v, (%v:)", tls, type1, id, info, options, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_waitid), type1, int32(id), int32(info), options, Int32FromInt32(0), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_waitid), type1, Int32FromUint32(id), int32(info), options, Int32FromInt32(0), 0))) } func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { @@ -128544,7 +128542,7 @@ func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { trc("tls=%v pid=%v status=%v options=%v, (%v:)", tls, pid, status, options, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_wait4), pid, int32(status), options, Int32FromInt32(0), 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_wait4), pid, int32(status), options, Int32FromInt32(0), 0, 0))) } const BRACKET = -3 @@ -128571,13 +128569,13 @@ func _str_next(tls *TLS, str uintptr, n Tsize_t, step uintptr) (r int32) { *(*Tsize_t)(unsafe.Pointer(step)) = uint32(0) return 0 } - if uint32(*(*int8)(unsafe.Pointer(str))) >= uint32(128) { + if Uint32FromInt8(*(*int8)(unsafe.Pointer(str))) >= uint32(128) { k = Xmbtowc(tls, bp, str, n) if k < 0 { *(*Tsize_t)(unsafe.Pointer(step)) = uint32(1) return -int32(1) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint32(k) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint32FromInt32(k) return *(*Twchar_t)(unsafe.Pointer(bp)) } *(*Tsize_t)(unsafe.Pointer(step)) = uint32(1) @@ -128653,13 +128651,13 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i goto escaped escaped: ; - if uint32(*(*int8)(unsafe.Pointer(pat))) >= uint32(128) { + if Uint32FromInt8(*(*int8)(unsafe.Pointer(pat))) >= uint32(128) { k1 = Xmbtowc(tls, bp, pat, m) if k1 < 0 { *(*Tsize_t)(unsafe.Pointer(step)) = uint32(0) return -int32(2) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint32(k1 + esc) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint32FromInt32(k1 + esc) return *(*Twchar_t)(unsafe.Pointer(bp)) } return int32(*(*int8)(unsafe.Pointer(pat))) @@ -128669,13 +128667,13 @@ func _casefold(tls *TLS, k int32) (r int32) { var c int32 var v1 uint32 _, _ = c, v1 - c = int32(Xtowupper(tls, uint32(k))) + c = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(k))) if c == k { - v1 = Xtowlower(tls, uint32(k)) + v1 = Xtowlower(tls, Uint32FromInt32(k)) } else { - v1 = uint32(c) + v1 = Uint32FromInt32(c) } - return int32(v1) + return Int32FromUint32(v1) } func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { @@ -128717,7 +128715,7 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { return 0 } if *(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4)) { - if uint32(k)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || uint32(kfold)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { + if Uint32FromInt32(k)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || Uint32FromInt32(kfold)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { return BoolInt32(!(inv != 0)) } } @@ -128732,16 +128730,16 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { p++ } if z == int32(':') && int32(p-uintptr(1))-int32(p0) < int32(16) { - Xmemcpy(tls, bp+8, p0, uint32(int32(p-uintptr(1))-int32(p0))) + Xmemcpy(tls, bp+8, p0, Uint32FromInt32(int32(p-uintptr(1))-int32(p0))) (*(*[16]int8)(unsafe.Pointer(bp + 8)))[int32(p-uintptr(1))-int32(p0)] = 0 - if Xiswctype(tls, uint32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, uint32(kfold), Xwctype(tls, bp+8)) != 0 { + if Xiswctype(tls, Uint32FromInt32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, Uint32FromInt32(kfold), Xwctype(tls, bp+8)) != 0 { return BoolInt32(!(inv != 0)) } } goto _1 } - if uint32(*(*int8)(unsafe.Pointer(p))) < uint32(128) { - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(uint8(*(*int8)(unsafe.Pointer(p)))) + if Uint32FromInt8(*(*int8)(unsafe.Pointer(p))) < uint32(128) { + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint8(Uint8FromInt8(*(*int8)(unsafe.Pointer(p)))) } else { l1 = Xmbtowc(tls, bp, p, uint32(4)) if l1 < 0 { @@ -128831,7 +128829,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(p < endpat) { break } - switch _pat_next(tls, p, uint32(int32(endpat)-int32(p)), bp, flags) { + switch _pat_next(tls, p, Uint32FromInt32(int32(endpat)-int32(p)), bp, flags) { case -int32(2): return int32(FNM_NOMATCH) case -int32(5): @@ -128862,7 +128860,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(s > str && tailcnt != 0) { break } - if v9 = uint32(*(*int8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) < uint32(128); !v9 { + if v9 = Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) < uint32(128); !v9 { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v8 = int32(4) } else { @@ -128875,7 +128873,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, for { s-- v10 = s - if !(uint32(uint8(*(*int8)(unsafe.Pointer(v10))))-uint32(0x80) < uint32(0x40) && s > str) { + if !(uint32(Uint8FromInt8(*(*int8)(unsafe.Pointer(v10))))-uint32(0x80) < uint32(0x40) && s > str) { break } } @@ -128892,9 +128890,9 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, /* Check that the pat and str tails match */ p = ptail for { - c = _pat_next(tls, p, uint32(int32(endpat)-int32(p)), bp, flags) + c = _pat_next(tls, p, Uint32FromInt32(int32(endpat)-int32(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) - v12 = _str_next(tls, s, uint32(int32(endstr)-int32(s)), bp+4) + v12 = _str_next(tls, s, Uint32FromInt32(int32(endstr)-int32(s)), bp+4) k = v12 if v12 <= 0 { if c != END { @@ -128929,7 +128927,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, p = pat s = str for { - c = _pat_next(tls, p, uint32(int32(endpat)-int32(p)), bp, flags) + c = _pat_next(tls, p, Uint32FromInt32(int32(endpat)-int32(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) /* Encountering * completes/commits a component */ if c == -int32(5) { @@ -128937,7 +128935,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, str = s break } - k = _str_next(tls, s, uint32(int32(endstr)-int32(s)), bp+4) + k = _str_next(tls, s, Uint32FromInt32(int32(endstr)-int32(s)), bp+4) if !(k != 0) { return int32(FNM_NOMATCH) } @@ -128965,13 +128963,13 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, } /* If we failed, advance str, by 1 char if it's a valid * char, or past all invalid bytes otherwise. */ - k = _str_next(tls, str, uint32(int32(endstr)-int32(str)), bp+4) + k = _str_next(tls, str, Uint32FromInt32(int32(endstr)-int32(str)), bp+4) if k > 0 { str += uintptr(*(*Tsize_t)(unsafe.Pointer(bp + 4))) } else { str++ for { - if !(_str_next(tls, str, uint32(int32(endstr)-int32(str)), bp+4) < 0) { + if !(_str_next(tls, str, Uint32FromInt32(int32(endstr)-int32(str)), bp+4) < 0) { break } goto _16 @@ -129009,7 +129007,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } p = pat for { - v4 = _pat_next(tls, p, uint32(-Int32FromInt32(1)), bp, flags) + v4 = _pat_next(tls, p, Uint32FromInt32(-Int32FromInt32(1)), bp, flags) c = v4 if !(v4 != END && c != int32('/')) { break @@ -129022,7 +129020,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if c != int32(*(*int8)(unsafe.Pointer(s))) && (!(*(*int8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { return int32(FNM_NOMATCH) } - if _fnmatch_internal(tls, pat, uint32(int32(p)-int32(pat)), str, uint32(int32(s)-int32(str)), flags) != 0 { + if _fnmatch_internal(tls, pat, Uint32FromInt32(int32(p)-int32(pat)), str, Uint32FromInt32(int32(s)-int32(str)), flags) != 0 { return int32(FNM_NOMATCH) } if !(c != 0) { @@ -129043,7 +129041,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if int32(*(*int8)(unsafe.Pointer(s))) != int32('/') { goto _5 } - if !(_fnmatch_internal(tls, pat, uint32(-Int32FromInt32(1)), str, uint32(int32(s)-int32(str)), flags) != 0) { + if !(_fnmatch_internal(tls, pat, Uint32FromInt32(-Int32FromInt32(1)), str, Uint32FromInt32(int32(s)-int32(str)), flags) != 0) { return 0 } goto _5 @@ -129053,7 +129051,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } } } - return _fnmatch_internal(tls, pat, uint32(-Int32FromInt32(1)), str, uint32(-Int32FromInt32(1)), flags) + return _fnmatch_internal(tls, pat, Uint32FromInt32(-Int32FromInt32(1)), str, Uint32FromInt32(-Int32FromInt32(1)), flags) } const GLOB_ABORTED = 2 @@ -129142,7 +129140,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag return 0 } pat += uintptr(i) - pos += uint32(j) + pos += Uint32FromInt32(j) v4 = Int32FromInt32(0) j = v4 i = v4 @@ -129173,7 +129171,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag in_bracket = 0 pat += uintptr(i + int32(1)) i = -int32(1) - pos += uint32(j + int32(1)) + pos += Uint32FromInt32(j + int32(1)) j = -int32(1) } /* Only store a character if it fits in the buffer, but if @@ -129181,10 +129179,10 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag * must be remembered and handled later only if the bracket * is unterminated (and thereby a literal), so as not to * disallow long bracket expressions with short matches. */ - if pos+uint32(j+Int32FromInt32(1)) < uint32(PATH_MAX) { + if pos+Uint32FromInt32(j+Int32FromInt32(1)) < uint32(PATH_MAX) { v5 = j j++ - *(*int8)(unsafe.Pointer(buf + uintptr(pos+uint32(v5)))) = *(*int8)(unsafe.Pointer(pat + uintptr(i))) + *(*int8)(unsafe.Pointer(buf + uintptr(pos+Uint32FromInt32(v5)))) = *(*int8)(unsafe.Pointer(pat + uintptr(i))) } else { if in_bracket != 0 { overflow = int32(1) @@ -129261,7 +129259,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag break } /* Quickly skip non-directories when there's pattern left. */ - if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { + if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { continue } l = Xstrlen(tls, de+19) @@ -129299,7 +129297,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } else { v11 = __ccgo_ts } - r = _do_glob(tls, buf, pos+l, int32((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) + r = _do_glob(tls, buf, pos+l, Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) if r != 0 { Xclosedir(tls, dir) return r @@ -129401,7 +129399,7 @@ func _expand_tilde(tls *TLS, pat uintptr, buf uintptr, pos uintptr) (r int32) { ; home = (*(*Tpasswd)(unsafe.Pointer(bp))).Fpw_dir } - for i < uint32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*int8)(unsafe.Pointer(home)) != 0 { + for i < Uint32FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*int8)(unsafe.Pointer(home)) != 0 { v10 = i i++ v11 = home @@ -129864,7 +129862,7 @@ func _tre_ast_new_iter(tls *TLS, mem Ttre_mem_t, arg uintptr, min int32, max int (*Ttre_iteration_t)(unsafe.Pointer(iter)).Farg = arg (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmin = min (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmax = max - SetBitFieldPtr8Uint32(iter+12, uint32(minimal), 0, 0x1) + SetBitFieldPtr8Uint32(iter+12, Uint32FromInt32(minimal), 0, 0x1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnum_submatches = (*Ttre_ast_node_t)(unsafe.Pointer(arg)).Fnum_submatches return node } @@ -129933,7 +129931,7 @@ func _tre_stack_new(tls *TLS, size int32, max_size int32, increment int32) (r ui _ = s s = Xmalloc(tls, uint32(20)) if s != UintptrFromInt32(0) { - (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint32(4)*uint32(size)) + (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint32(4)*Uint32FromInt32(size)) if (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack == UintptrFromInt32(0) { Xfree(tls, s) return UintptrFromInt32(0) @@ -129970,7 +129968,7 @@ func _tre_stack_push(tls *TLS, s uintptr, value Ttre_stack_item) (r Treg_errcode if new_size > (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size { new_size = (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size } - new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint32(4)*uint32(new_size)) + new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint32(4)*Uint32FromInt32(new_size)) if new_buffer == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -130141,7 +130139,7 @@ func _tre_new_lit(tls *TLS, p uintptr) (r uintptr) { return uintptr(0) } *(*int32)(unsafe.Pointer(p + 12)) *= int32(2) - a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, uint32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint32(4)) + a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, Uint32FromInt32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint32(4)) if !(a != 0) { return uintptr(0) } @@ -130167,8 +130165,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { /* assumes islower(c) and isupper(c) are exclusive and toupper(c)!=c if islower(c). multiple opposite case characters are not supported */ - if Xiswlower(tls, uint32(c)) != 0 { - v2 = int32(Xtowupper(tls, uint32(c))) + if Xiswlower(tls, Uint32FromInt32(c)) != 0 { + v2 = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(c))) e = v2 b = v2 c++ @@ -130177,7 +130175,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowupper(tls, uint32(c)) != uint32(e) { + if Xtowupper(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _3 @@ -130187,8 +130185,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { e++ } } else { - if Xiswupper(tls, uint32(c)) != 0 { - v4 = int32(Xtowlower(tls, uint32(c))) + if Xiswupper(tls, Uint32FromInt32(c)) != 0 { + v4 = Int32FromUint32(Xtowlower(tls, Uint32FromInt32(c))) e = v4 b = v4 c++ @@ -130197,7 +130195,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowlower(tls, uint32(c)) != uint32(e) { + if Xtowlower(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _5 @@ -130264,7 +130262,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint start = s for { class = uint32(0) - len1 = Xmbtowc(tls, bp, s, uint32(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint32FromInt32(-Int32FromInt32(1))) if len1 <= 0 { if *(*int8)(unsafe.Pointer(s)) != 0 { v2 = int32(REG_BADPAT) @@ -130292,7 +130290,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint break } if int32(*(*int8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { - Xmemcpy(tls, bp+4, s, uint32(len1)) + Xmemcpy(tls, bp+4, s, Uint32FromInt32(len1)) (*(*[15]int8)(unsafe.Pointer(bp + 4)))[len1] = 0 class = Xwctype(tls, bp+4) break @@ -130315,7 +130313,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint s += uintptr(len1) if int32(*(*int8)(unsafe.Pointer(s))) == int32('-') && int32(*(*int8)(unsafe.Pointer(s + 1))) != int32(']') { s++ - len1 = Xmbtowc(tls, bp, s, uint32(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint32FromInt32(-Int32FromInt32(1))) max = *(*Twchar_t)(unsafe.Pointer(bp)) /* XXX - Should use collation order instead of encoding values in character ranges. */ @@ -130375,7 +130373,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*(*Tliterals)(unsafe.Pointer(bp))).Fmem = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem (*(*Tliterals)(unsafe.Pointer(bp))).Flen1 = 0 (*(*Tliterals)(unsafe.Pointer(bp))).Fcap1 = int32(32) - (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, uint32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint32(4)) + (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, Uint32FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint32(4)) if !((*(*Tliterals)(unsafe.Pointer(bp))).Fa != 0) { return int32(REG_ESPACE) } @@ -130404,7 +130402,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) } /* Sort the array if we need to negate it. */ - Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, uint32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint32(4), __ccgo_fp(_tre_compare_lit)) + Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, Uint32FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint32(4), __ccgo_fp(_tre_compare_lit)) /* extra lit for the last negated range */ lit = _tre_new_lit(tls, bp) if !(lit != 0) { @@ -130416,12 +130414,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) /* negated classes */ if (*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1 != 0 { - nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, uint32((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1+Int32FromInt32(1))*uint32(4)) + nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, Uint32FromInt32((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1+Int32FromInt32(1))*uint32(4)) if !(nc != 0) { err = int32(REG_ESPACE) goto parse_bracket_done } - Xmemcpy(tls, nc, bp+16+8, uint32((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1)*uint32(4)) + Xmemcpy(tls, nc, bp+16+8, Uint32FromInt32((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1)*uint32(4)) *(*Ttre_ctype_t)(unsafe.Pointer(nc + uintptr((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1)*4)) = uint32(0) } } @@ -130477,14 +130475,14 @@ parse_bracket_done: func _parse_dup_count(tls *TLS, s uintptr, n uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(n)) = -int32(1) - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return s } *(*int32)(unsafe.Pointer(n)) = 0 for { *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (int32(*(*int8)(unsafe.Pointer(s))) - int32('0')) s++ - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { break } goto _1 @@ -130527,11 +130525,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u func _hexval1(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -130650,7 +130648,7 @@ _2: if !(i < len1 && v < int32(0x110000)) { break } - c = _hexval1(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(i))))) + c = _hexval1(tls, Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(i))))) if c < 0 { break } @@ -130693,7 +130691,7 @@ _2: /* fallthrough */ fallthrough default: - if !(ere != 0) && uint32(*(*int8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { + if !(ere != 0) && Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { /* back reference */ val = int32(*(*int8)(unsafe.Pointer(s))) - int32('0') v19 = ctx + 24 @@ -130782,14 +130780,14 @@ _12: goto parse_literal parse_literal: ; - len1 = Xmbtowc(tls, bp, s, uint32(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint32FromInt32(-Int32FromInt32(1))) if len1 < 0 { return int32(REG_BADPAT) } - if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { + if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { /* multiple opposite case characters are not supported */ - tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) - tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) if tmp11 != 0 && tmp21 != 0 { node = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, tmp11, tmp21) } else { @@ -131251,7 +131249,7 @@ func _tre_add_tags(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr, tnfa u } (*(*Ttre_submatch_data_t)(unsafe.Pointer((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fsubmatch_data + uintptr(id1)*12))).Fparents = UintptrFromInt32(0) if i2 > 0 { - p = Xmalloc(tls, uint32(4)*uint32(i2+Int32FromInt32(1))) + p = Xmalloc(tls, uint32(4)*Uint32FromInt32(i2+Int32FromInt32(1))) if p == UintptrFromInt32(0) { status = int32(REG_ESPACE) goto _10 @@ -132155,7 +132153,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; s2++ } - new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint32(32)*uint32(s1+s2+Int32FromInt32(1))) + new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint32(32)*Uint32FromInt32(s1+s2+Int32FromInt32(1))) if !(new_set != 0) { return UintptrFromInt32(0) } @@ -132184,7 +132182,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint32FromInt64(4)*uint32(i+num_tags+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint32FromInt64(4)*Uint32FromInt32(i+num_tags+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -132244,7 +132242,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*uint32(i+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*Uint32FromInt32(i+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -132562,7 +132560,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint32(4)*uint32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint32(4)*Uint32FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -132593,7 +132591,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint32(4)*uint32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint32(4)*Uint32FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -132651,8 +132649,8 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun } /* Use the character ranges, assertions, etc. from `p1' for the transition from `p1' to `p2'. */ - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition)*4)))*32 (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate_id = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition if (*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fclass != 0 { @@ -132683,7 +132681,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun ; i++ } - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint32(4)*uint32(i+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint32(4)*Uint32FromInt32(i+Int32FromInt32(1))) if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -132722,7 +132720,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = UintptrFromInt32(0) /* If there were any tags, allocate an array and fill it. */ if i+j > 0 { - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint32(4)*uint32(i+j+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint32(4)*Uint32FromInt32(i+j+Int32FromInt32(1))) if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags != 0) { return int32(REG_ESPACE) } @@ -132876,10 +132874,10 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) + (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) tree = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fn /* Referring to nonexistent subexpressions is illegal. */ - if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > int32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { + if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > Int32FromUint32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { errcode = int32(REG_ESUBREG) if int32(1) != 0 { goto error_exit @@ -132895,7 +132893,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs = BoolInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref >= 0) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_approx = 0 - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) /* Set up tags for submatch addressing. If REG_NOSUB is set and the regexp does not have back references, this can be skipped. */ if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs != 0 || !(cflags&Int32FromInt32(REG_NOSUB) != 0) { @@ -132908,7 +132906,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 { - tag_directions = Xmalloc(tls, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + tag_directions = Xmalloc(tls, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) if tag_directions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132916,16 +132914,16 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftag_directions = tag_directions - Xmemset(tls, tag_directions, -int32(1), uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + Xmemset(tls, tag_directions, -int32(1), uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) } - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1), uint32(4)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1), uint32(4)) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - submatch_data = Xcalloc(tls, uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id), uint32(12)) + submatch_data = Xcalloc(tls, Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id), uint32(12)) if submatch_data == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132978,14 +132976,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - counts = Xmalloc(tls, uint32(4)*uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + counts = Xmalloc(tls, uint32(4)*Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if counts == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - offs = Xmalloc(tls, uint32(4)*uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + offs = Xmalloc(tls, uint32(4)*Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if offs == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -133018,7 +133016,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; i++ } - transitions = Xcalloc(tls, uint32(add)+uint32(1), uint32(32)) + transitions = Xcalloc(tls, Uint32FromInt32(add)+uint32(1), uint32(32)) if transitions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -133026,7 +133024,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftransitions = transitions - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) errcode = _tre_ast_to_tnfa(tls, tree, transitions, counts, offs) if errcode != REG_OK { errcode = errcode @@ -133041,7 +133039,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { i++ p += 32 } - initial = Xcalloc(tls, uint32(i)+uint32(1), uint32(32)) + initial = Xcalloc(tls, Uint32FromInt32(i)+uint32(1), uint32(32)) if initial == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -133071,14 +133069,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; j++ } - (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags = Xmalloc(tls, uint32(4)*uint32(j+Int32FromInt32(1))) + (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags = Xmalloc(tls, uint32(4)*Uint32FromInt32(j+Int32FromInt32(1))) if !((*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags != 0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint32(4)*uint32(j+Int32FromInt32(1))) + Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint32(4)*Uint32FromInt32(j+Int32FromInt32(1))) } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Fassertions = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Fassertions i++ @@ -133088,7 +133086,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { p += 32 } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Fstate = UintptrFromInt32(0) - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ffinal = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*(*Ttre_pos_and_tags_t)(unsafe.Pointer((*Ttre_ast_node_t)(unsafe.Pointer(tree)).Flastpos))).Fposition)*4)))*32 (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags = cflags @@ -133225,7 +133223,7 @@ func Xregerror(tls *TLS, e int32, preg uintptr, buf uintptr, size Tsize_t) (r Ts s++ } s = X__lctrans_cur(tls, s) - return uint32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) + return Uint32FromInt32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) } const tre_bt_mem_alloc = 0 @@ -133346,23 +133344,23 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags everything in a single large block with calloc(). */ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ - if uint32(num_tags) > uint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { + if Uint32FromInt32(num_tags) > uint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { return int32(REG_ESPACE) } /* Likewise check rbytes. */ - if uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint32FromUint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(8)) { + if Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint32FromUint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(8)) { return int32(REG_ESPACE) } /* Likewise check pbytes. */ - if uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint32FromUint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(8)) { + if Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint32FromUint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(8)) { return int32(REG_ESPACE) } /* Compute the length of the block we need. */ - tbytes = uint32(4) * uint32(num_tags) - rbytes = uint32(8) * uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) - pbytes = uint32(8) * uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) - xbytes = uint32(4) * uint32(num_tags) - total_bytes = (Uint32FromInt64(4)-Uint32FromInt32(1))*Uint32FromInt32(4) + (rbytes+xbytes*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint32(2) + tbytes + pbytes + tbytes = uint32(4) * Uint32FromInt32(num_tags) + rbytes = uint32(8) * Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) + pbytes = uint32(8) * Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) + xbytes = uint32(4) * Uint32FromInt32(num_tags) + total_bytes = (Uint32FromInt64(4)-Uint32FromInt32(1))*Uint32FromInt32(4) + (rbytes+xbytes*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint32(2) + tbytes + pbytes /* Allocate the memory. */ buf = Xcalloc(tls, total_bytes, uint32(1)) if buf == UintptrFromInt32(0) { @@ -133371,32 +133369,32 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = buf tmp_buf = buf + uintptr(tbytes) - if uint32(int32(tmp_buf))%uint32(4) != 0 { - v1 = uint32(4) - uint32(int32(tmp_buf))%uint32(4) + if Uint32FromInt32(int32(tmp_buf))%uint32(4) != 0 { + v1 = uint32(4) - Uint32FromInt32(int32(tmp_buf))%uint32(4) } else { v1 = uint32(0) } tmp_buf += uintptr(v1) reach_next = tmp_buf tmp_buf += uintptr(rbytes) - if uint32(int32(tmp_buf))%uint32(4) != 0 { - v2 = uint32(4) - uint32(int32(tmp_buf))%uint32(4) + if Uint32FromInt32(int32(tmp_buf))%uint32(4) != 0 { + v2 = uint32(4) - Uint32FromInt32(int32(tmp_buf))%uint32(4) } else { v2 = uint32(0) } tmp_buf += uintptr(v2) reach = tmp_buf tmp_buf += uintptr(rbytes) - if uint32(int32(tmp_buf))%uint32(4) != 0 { - v3 = uint32(4) - uint32(int32(tmp_buf))%uint32(4) + if Uint32FromInt32(int32(tmp_buf))%uint32(4) != 0 { + v3 = uint32(4) - Uint32FromInt32(int32(tmp_buf))%uint32(4) } else { v3 = uint32(0) } tmp_buf += uintptr(v3) reach_pos = tmp_buf tmp_buf += uintptr(pbytes) - if uint32(int32(tmp_buf))%uint32(4) != 0 { - v4 = uint32(4) - uint32(int32(tmp_buf))%uint32(4) + if Uint32FromInt32(int32(tmp_buf))%uint32(4) != 0 { + v4 = uint32(4) - Uint32FromInt32(int32(tmp_buf))%uint32(4) } else { v4 = uint32(0) } @@ -133447,7 +133445,7 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags trans_i = (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Finitial for (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != UintptrFromInt32(0) { if (*(*Ttre_reach_pos_t)(unsafe.Pointer(reach_pos + uintptr((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id)*8))).Fpos < pos { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { trans_i += 32 continue } @@ -133586,8 +133584,8 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags break } /* Does this transition match the input symbol? */ - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _14 } /* Compute the tags after this transition. */ @@ -133771,7 +133769,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fprev = UintptrFromInt32(0) (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fnext = UintptrFromInt32(0) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags != 0 { - tags = Xmalloc(tls, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !(tags != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -133785,7 +133783,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states != 0 { - states_seen = Xmalloc(tls, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) + states_seen = Xmalloc(tls, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) if !(states_seen != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -133844,7 +133842,7 @@ retry: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { goto _4 } if state == UintptrFromInt32(0) { @@ -133870,7 +133868,7 @@ retry: } (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133968,11 +133966,11 @@ _9: bt = *(*int32)(unsafe.Pointer(trans_i + 24)) /* Get the substring we need to match against. Remember to turn off REG_NOSUB temporarily. */ - _tre_fill_pmatch(tls, uint32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) + _tre_fill_pmatch(tls, Uint32FromInt32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) so = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*8))).Frm_so eo = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*8))).Frm_eo bt_len = eo - so - result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), uint32(bt_len)) + result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), Uint32FromInt32(bt_len)) if result == 0 { /* Back reference matched. Check for infinite loop. */ if bt_len == 0 { @@ -134028,8 +134026,8 @@ _9: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 24))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _13 } if next_state == UintptrFromInt32(0) { @@ -134058,7 +134056,7 @@ _9: } (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -134285,7 +134283,7 @@ func Xregexec(tls *TLS, preg uintptr, string1 uintptr, nmatch Tsize_t, pmatch ui nmatch = uint32(0) } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 && nmatch > uint32(0) { - tags = Xmalloc(tls, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if tags == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -134382,7 +134380,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint32(TRE_MEM_BLOCK_SIZE) } else { if size*uint32(8) > uint32(TRE_MEM_BLOCK_SIZE) { - block_size = int32(size * uint32(8)) + block_size = Int32FromUint32(size * uint32(8)) } else { block_size = int32(TRE_MEM_BLOCK_SIZE) } @@ -134391,7 +134389,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) return UintptrFromInt32(0) } - (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, uint32(block_size)) + (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, Uint32FromInt32(block_size)) if (*Ttre_list_t)(unsafe.Pointer(l)).Fdata == UintptrFromInt32(0) { Xfree(tls, l) (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) @@ -134406,12 +134404,12 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl } (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fcurrent = l (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr = (*Ttre_list_t)(unsafe.Pointer(l)).Fdata - (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint32(block_size) + (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = Uint32FromInt32(block_size) } } /* Make sure the next pointer will be aligned. */ - if (uint32(int32((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint32(4) != 0 { - v1 = uint32(4) - (uint32(int32((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint32(4) + if (Uint32FromInt32(int32((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint32(4) != 0 { + v1 = uint32(4) - (Uint32FromInt32(int32((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint32(4) } else { v1 = uint32(0) } @@ -134498,8 +134496,8 @@ func _resize(tls *TLS, nel Tsize_t, htab uintptr) (r int32) { _, _, _, _, _, _, _, _ = e, i, j, newe, newsize, oldsize, oldtab, v4 oldsize = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fmask + uint32(1) oldtab = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fentries - if nel > uint32(-Int32FromInt32(1))/Uint32FromInt32(2)+Uint32FromInt32(1) { - nel = uint32(-Int32FromInt32(1))/Uint32FromInt32(2) + Uint32FromInt32(1) + if nel > Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(2)+Uint32FromInt32(1) { + nel = Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(2) + Uint32FromInt32(1) } newsize = uint32(MINSIZE) for { @@ -134942,7 +134940,7 @@ func X__tsearch_balance(tls *TLS, p uintptr) (r int32) { n = *(*uintptr)(unsafe.Pointer(p)) h0 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 4))) h1 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 4 + 1*4))) - if uint32(h0-h1)+uint32(1) < uint32(3) { + if Uint32FromInt32(h0-h1)+uint32(1) < uint32(3) { old = (*Tnode1)(unsafe.Pointer(n)).Fh if h0 < h1 { v1 = h1 + int32(1) @@ -135040,7 +135038,7 @@ func Xpoll(tls *TLS, fds uintptr, n Tnfds_t, timeout int32) (r int32) { trc("tls=%v fds=%v n=%v timeout=%v, (%v:)", tls, fds, n, timeout, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_poll), int32(fds), int32(n), timeout, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_poll), int32(fds), Int32FromUint32(n), timeout, 0, 0, 0))) } type t__ucontext3 = Tucontext_t5 @@ -135071,7 +135069,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r1 int3 } ns = v2 r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if to != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -135081,17 +135079,17 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r1 int3 } else { v3 = uintptr(0) } - r = ___syscall_cp(tls, int32(SYS_ppoll_time64), int32(fds), int32(n), int32(v3), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0) + r = ___syscall_cp(tls, int32(SYS_ppoll_time64), int32(fds), Int32FromUint32(n), int32(v3), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v4 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v4 = Uint64FromInt64(s) } else { - v4 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v4 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } - s = int64(int32(v4)) + s = int64(Int32FromUint64(v4)) if to != 0 { *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ 0: int32(s), @@ -135101,7 +135099,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r1 int3 } else { v5 = uintptr(0) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_ppoll), int32(fds), int32(n), int32(v5), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_ppoll), int32(fds), Int32FromUint32(n), int32(v5), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0))) } type t__ucontext4 = Tucontext_t4 @@ -135121,7 +135119,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui var _ /* data at bp+24 */ [2]Tsyscall_arg_t _, _, _, _, _, _, _, _ = ns, r, s, v1, v2, v3, v4, v5 *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 24)) = [2]Tsyscall_arg_t{ - 0: int32(uint32(mask)), + 0: Int32FromUint32(uint32(mask)), 1: Int32FromInt32(_NSIG) / Int32FromInt32(8), } if ts != 0 { @@ -135137,7 +135135,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } ns = v2 r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if ts != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -135150,14 +135148,14 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui r = ___syscall_cp(tls, int32(SYS_pselect6_time64), n, int32(rfds), int32(wfds), int32(efds), int32(v3), int32(bp+24)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v4 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v4 = Uint64FromInt64(s) } else { - v4 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v4 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } - s = int64(int32(v4)) + s = int64(Int32FromUint64(v4)) if ts != 0 { *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ 0: int32(s), @@ -135167,7 +135165,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } else { v5 = uintptr(0) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pselect6), n, int32(rfds), int32(wfds), int32(efds), int32(v5), int32(bp+24)))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pselect6), n, int32(rfds), int32(wfds), int32(efds), int32(v5), int32(bp+24)))) } type Tucontext_t6 = struct { @@ -135205,9 +135203,9 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin v2 = 0 } us = v2 - max_time = int64(Uint64FromUint64(1)<<(Uint32FromInt32(8)*Uint32FromInt64(8)-Uint32FromInt32(1)) - Uint64FromInt32(1)) + max_time = Int64FromUint64(Uint64FromUint64(1)<<(Uint32FromInt32(8)*Uint32FromInt64(8)-Uint32FromInt32(1)) - Uint64FromInt32(1)) if s < 0 || us < 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } if us/int64(1000000) > max_time-s { s = max_time @@ -135219,7 +135217,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin ns = int32(us * int64(1000)) } r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if tv != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -135235,14 +135233,14 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin r = ___syscall_cp(tls, int32(SYS_pselect6_time64), n, int32(rfds), int32(wfds), int32(efds), int32(v3), int32(bp+16)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v4 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v4 = Uint64FromInt64(s) } else { - v4 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v4 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } - s = int64(int32(v4)) + s = int64(Int32FromUint64(v4)) if tv != 0 { *(*[2]int32)(unsafe.Pointer(bp + 24)) = [2]int32{ 0: int32(s), @@ -135252,7 +135250,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin } else { v5 = uintptr(0) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS__newselect), n, int32(rfds), int32(wfds), int32(efds), int32(v5), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS__newselect), n, int32(rfds), int32(wfds), int32(efds), int32(v5), 0))) } var _all_mask = [2]uint32{ @@ -135304,9 +135302,9 @@ func Xgetitimer(tls *TLS, which int32, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(2)]) (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)]) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_getitimer), which, int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_getitimer), which, int32(old)))) } func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { @@ -135314,7 +135312,7 @@ func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { trc("tls=%v pid=%v sig=%v, (%v:)", tls, pid, sig, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_kill), pid, sig))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_kill), pid, sig))) } func Xkillpg(tls *TLS, pgid Tpid_t, sig int32) (r int32) { @@ -135391,7 +135389,7 @@ func Xraise(tls *TLS, sig int32) (r int32) { var _ /* set at bp+0 */ Tsigset_t _ = ret X__block_app_sigs(tls, bp) - ret = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_tkill), (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid, sig))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_tkill), (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid, sig))) X__restore_sigs(tls, bp) return ret } @@ -135426,8 +135424,8 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { vs = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_sec ius = int32((*Titimerval)(unsafe.Pointer(new1)).Fit_interval.Ftv_usec) vus = int32((*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_usec) - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } *(*[4]int32)(unsafe.Pointer(bp)) = [4]int32{ 0: int32(is), @@ -135442,9 +135440,9 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp + 16)))[int32(2)]) (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = int64((*(*[4]int32)(unsafe.Pointer(bp + 16)))[int32(3)]) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_setitimer), which, int32(new1), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_setitimer), which, int32(new1), int32(old)))) } type Tk_sigaction = struct { @@ -135482,8 +135480,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) _, _, _, _, _, _, _ = r, v1, v2, v3, v4, v5, v6 if sa != 0 { if uint32(*(*uintptr)(unsafe.Pointer(sa))) > uint32(1) { - v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(uint32(sig-Int32FromInt32(1))/(Uint32FromInt32(8)*Uint32FromInt64(4)))*4 - v2 = int32(uint32(1) << (uint32(sig-Int32FromInt32(1)) % (Uint32FromInt32(8) * Uint32FromInt64(4)))) + v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(Uint32FromInt32(sig-Int32FromInt32(1))/(Uint32FromInt32(8)*Uint32FromInt64(4)))*4 + v2 = Int32FromUint32(uint32(1) << (Uint32FromInt32(sig-Int32FromInt32(1)) % (Uint32FromInt32(8) * Uint32FromInt64(4)))) if Uint32FromInt64(4) == Uint32FromInt64(4) { _a_or(tls, v1, v2) } else { @@ -135495,12 +135493,12 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) Fr [0][2]Tuint32_t Fv Tuint64_t }{} - *(*uint64)(unsafe.Pointer(bp + 8)) = uint64(v2) + *(*uint64)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(v2) if *(*Tuint32_t)(unsafe.Pointer(bp + 8)) != 0 { - _a_or(tls, v3, int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)))) + _a_or(tls, v3, Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)))) } if *(*Tuint32_t)(unsafe.Pointer(bp + 8 + 1*4)) != 0 { - _a_or(tls, v3+uintptr(1)*4, int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8 + 1*4)))) + _a_or(tls, v3+uintptr(1)*4, Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8 + 1*4)))) } } /* If pthread_create has not yet been called, @@ -135523,7 +135521,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) } } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fhandler = *(*uintptr)(unsafe.Pointer(sa)) - (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = uint32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) + (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = Uint32FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags |= uint32(SA_RESTORER) if (*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags&int32(SA_SIGINFO) != 0 { v4 = __ccgo_fp(X__restore_rt) @@ -135531,7 +135529,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) v4 = __ccgo_fp(X__restore) } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Frestorer = v4 - Xmemcpy(tls, bp+16+12, sa+4, uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + Xmemcpy(tls, bp+16+12, sa+4, Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } if sa != 0 { v5 = bp + 16 @@ -135546,10 +135544,10 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) r = X__syscall4(tls, int32(SYS_rt_sigaction), sig, int32(v5), int32(v6), Int32FromInt32(_NSIG)/Int32FromInt32(8)) if old != 0 && !(r != 0) { *(*uintptr)(unsafe.Pointer(old)) = (*(*Tk_sigaction)(unsafe.Pointer(bp + 36))).Fhandler - (*Tsigaction)(unsafe.Pointer(old)).Fsa_flags = int32((*(*Tk_sigaction)(unsafe.Pointer(bp + 36))).Fflags) - Xmemcpy(tls, old+4, bp+36+12, uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*Tsigaction)(unsafe.Pointer(old)).Fsa_flags = Int32FromUint32((*(*Tk_sigaction)(unsafe.Pointer(bp + 36))).Fflags) + Xmemcpy(tls, old+4, bp+36+12, Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { @@ -135562,7 +135560,7 @@ func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { var r int32 var _ /* set at bp+0 */ [2]uint32 _ = r - if uint32(sig)-uint32(32) < uint32(3) || uint32(sig)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(sig)-uint32(32) < uint32(3) || Uint32FromInt32(sig)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135596,8 +135594,8 @@ func Xsigaddset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135620,7 +135618,7 @@ func Xsigaltstack(tls *TLS, ss uintptr, old uintptr) (r int32) { return -int32(1) } } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_sigaltstack), int32(ss), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_sigaltstack), int32(ss), int32(old)))) } const SST_SIZE = 8 @@ -135647,7 +135645,7 @@ func Xsigandset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) l = left r = right for { - if !(i < uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { + if !(i < Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { break } *(*uint32)(unsafe.Pointer(d + uintptr(i)*4)) = *(*uint32)(unsafe.Pointer(l + uintptr(i)*4)) & *(*uint32)(unsafe.Pointer(r + uintptr(i)*4)) @@ -135666,8 +135664,8 @@ func Xsigdelset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135723,7 +135721,7 @@ func Xsigisemptyset(tls *TLS, set uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { + if !(i < Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { break } if *(*uint32)(unsafe.Pointer(set + uintptr(i)*4)) != 0 { @@ -135744,8 +135742,8 @@ func Xsigismember(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { return 0 } return BoolInt32(!!(*(*uint32)(unsafe.Pointer(set + uintptr(s/uint32(8)/uint32(4))*4))&(Uint32FromUint32(1)<<(s&(Uint32FromInt32(8)*Uint32FromInt64(4)-Uint32FromInt32(1)))) != 0)) @@ -135764,7 +135762,7 @@ func Xsigorset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) { l = left r = right for { - if !(i < uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { + if !(i < Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { break } *(*uint32)(unsafe.Pointer(d + uintptr(i)*4)) = *(*uint32)(unsafe.Pointer(l + uintptr(i)*4)) | *(*uint32)(unsafe.Pointer(r + uintptr(i)*4)) @@ -135781,7 +135779,7 @@ func Xsigpending(tls *TLS, set uintptr) (r int32) { trc("tls=%v set=%v, (%v:)", tls, set, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_rt_sigpending), int32(set), Int32FromInt32(_NSIG)/Int32FromInt32(8)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_rt_sigpending), int32(set), Int32FromInt32(_NSIG)/Int32FromInt32(8)))) } func Xsigprocmask(tls *TLS, how int32, set uintptr, old uintptr) (r1 int32) { @@ -135817,7 +135815,7 @@ func Xsigqueue(tls *TLS, pid Tpid_t, sig int32, value Tsigval) (r1 int32) { *(*Tuid_t)(unsafe.Pointer(bp + 12 + 4)) = Xgetuid(tls) X__block_app_sigs(tls, bp+128) *(*Tpid_t)(unsafe.Pointer(bp + 12)) = Xgetpid(tls) - r = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_rt_sigqueueinfo), pid, sig, int32(bp)))) + r = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_rt_sigqueueinfo), pid, sig, int32(bp)))) X__restore_sigs(tls, bp+128) return r } @@ -135877,7 +135875,7 @@ func Xsigsuspend(tls *TLS, mask uintptr) (r int32) { trc("tls=%v mask=%v, (%v:)", tls, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_rt_sigsuspend), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_rt_sigsuspend), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0, 0, 0, 0))) } func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r1 int32) { @@ -135902,7 +135900,7 @@ func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r1 int32) } ns = v2 r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if ts != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -135918,13 +135916,13 @@ func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r1 int32) return r } if ts != 0 { - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v5 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v5 = Uint64FromInt64(s) } else { - v5 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v5 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ - 0: int32(v5), + 0: Int32FromUint64(v5), 1: ns, } v4 = bp + 16 @@ -135945,7 +135943,7 @@ func Xsigtimedwait(tls *TLS, mask uintptr, si uintptr, timeout uintptr) (r int32 for cond := true; cond; cond = ret == -int32(EINTR) { ret = _do_sigtimedwait(tls, mask, si, timeout) } - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } func Xsigwait(tls *TLS, mask uintptr, sig uintptr) (r int32) { @@ -135992,7 +135990,7 @@ func Xchmod(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_chmod), int32(path), int32(mode)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_chmod), int32(path), Int32FromUint32(mode)))) } func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { @@ -136005,12 +136003,12 @@ func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]int8 _ = ret - ret = X__syscall2(tls, int32(SYS_fchmod), fd, int32(mode)) + ret = X__syscall2(tls, int32(SYS_fchmod), fd, Int32FromUint32(mode)) if ret != -int32(EBADF) || X__syscall2(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_GETFD)) < 0 { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } - X__procfdname(tls, bp, uint32(fd)) - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_chmod), int32(bp), int32(mode)))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_chmod), int32(bp), Int32FromUint32(mode)))) } func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r int32) { @@ -136025,36 +136023,36 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in var _ /* st at bp+0 */ Tstat _, _, _ = fd2, ret, v1 if !(flag != 0) { - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fchmodat), fd, int32(path), int32(mode)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fchmodat), fd, int32(path), Int32FromUint32(mode)))) } - ret = X__syscall4(tls, int32(SYS_fchmodat2), fd, int32(path), int32(mode), flag) + ret = X__syscall4(tls, int32(SYS_fchmodat2), fd, int32(path), Int32FromUint32(mode), flag) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } if flag != int32(AT_SYMLINK_NOFOLLOW) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } if Xfstatat(tls, fd, path, bp, flag) != 0 { return -int32(1) } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } v1 = X__syscall3(tls, int32(SYS_openat), fd, int32(path), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_PATH)|Int32FromInt32(O_NOFOLLOW)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC)) fd2 = v1 if v1 < 0 { if fd2 == -int32(ELOOP) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } - return X__syscall_ret(tls, uint32(fd2)) + return X__syscall_ret(tls, Uint32FromInt32(fd2)) } - X__procfdname(tls, bp+144, uint32(fd2)) + X__procfdname(tls, bp+144, Uint32FromInt32(fd2)) ret = Xstat(tls, bp+144, bp) if !(ret != 0) { if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - ret = X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + ret = X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } else { - ret = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fchmodat), -Int32FromInt32(100), int32(bp+144), int32(mode)))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fchmodat), -Int32FromInt32(100), int32(bp+144), Int32FromUint32(mode)))) } } X__syscall1(tls, int32(SYS_close), fd2) @@ -136067,7 +136065,7 @@ func X__fstat(tls *TLS, fd int32, st uintptr) (r int32) { defer func() { trc("-> %v", r) }() } if fd < 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EBADF))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EBADF))) } return X__fstatat(tls, fd, __ccgo_ts, st, int32(AT_EMPTY_PATH)) } @@ -136138,42 +136136,42 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r Fst_uid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_uid, Fst_gid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_gid, Fst_rdev: uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<= 0 { ret = X__syscall4(tls, int32(SYS_fstatat64), fd, int32(path), int32(bp), flag) if ret == -int32(EINVAL) { - X__procfdname(tls, bp+96, uint32(fd)) + X__procfdname(tls, bp+96, Uint32FromInt32(fd)) ret = X__syscall2(tls, int32(SYS_stat64), int32(bp+96), int32(bp)) } } @@ -136289,11 +136287,11 @@ func X__fstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int if uint32(4) < uint32(8) { ret = _fstatat_statx(tls, fd, path, st, flag) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } } ret = _fstatat_kstat(tls, fd, path, st, flag) - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } func Xfstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int32) { @@ -136329,8 +136327,8 @@ func X__futimesat(tls *TLS, dirfd int32, pathname uintptr, times uintptr) (r int if !(i < int32(2)) { break } - if uint64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + if Uint64FromInt64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_sec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_nsec = int32((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec * int64(1000)) @@ -136377,7 +136375,7 @@ func Xmkdir(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_mkdir), int32(path), int32(mode)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_mkdir), int32(path), Int32FromUint32(mode)))) } func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { @@ -136385,7 +136383,7 @@ func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v fd=%v path=%v mode=%v, (%v:)", tls, fd, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mkdirat), fd, int32(path), int32(mode)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mkdirat), fd, int32(path), Int32FromUint32(mode)))) } func Xmkfifo(tls *TLS, path uintptr, mode Tmode_t) (r int32) { @@ -136409,7 +136407,7 @@ func Xmknod(tls *TLS, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { trc("tls=%v path=%v mode=%v dev=%v, (%v:)", tls, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mknod), int32(path), int32(mode), int32(dev)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mknod), int32(path), Int32FromUint32(mode), Int32FromUint64(dev)))) } func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { @@ -136417,7 +136415,7 @@ func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int trc("tls=%v fd=%v path=%v mode=%v dev=%v, (%v:)", tls, fd, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_mknodat), fd, int32(path), int32(mode), int32(dev)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_mknodat), fd, int32(path), Int32FromUint32(mode), Int32FromUint64(dev)))) } func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { @@ -136430,7 +136428,7 @@ func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { func ___statfs(tls *TLS, path uintptr, buf uintptr) (r int32) { *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_statfs64), int32(path), int32(Uint32FromInt64(84)), int32(buf)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_statfs64), int32(path), Int32FromUint32(Uint32FromInt64(84)), int32(buf)))) } func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { @@ -136439,7 +136437,7 @@ func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { defer func() { trc("-> %v", r) }() } *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fstatfs64), fd, int32(Uint32FromInt64(84)), int32(buf)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fstatfs64), fd, Int32FromUint32(Uint32FromInt64(84)), int32(buf)))) } func _fixup(tls *TLS, out uintptr, in uintptr) { @@ -136459,7 +136457,7 @@ func _fixup(tls *TLS, out uintptr, in uintptr) { (*Tstatvfs)(unsafe.Pointer(out)).Ff_files = (*Tstatfs)(unsafe.Pointer(in)).Ff_files (*Tstatvfs)(unsafe.Pointer(out)).Ff_ffree = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree (*Tstatvfs)(unsafe.Pointer(out)).Ff_favail = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree - (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = uint32(*(*int32)(unsafe.Pointer(in + 48))) + (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = Uint32FromInt32(*(*int32)(unsafe.Pointer(in + 48))) (*Tstatvfs)(unsafe.Pointer(out)).Ff_flag = (*Tstatfs)(unsafe.Pointer(in)).Ff_flags (*Tstatvfs)(unsafe.Pointer(out)).Ff_namemax = (*Tstatfs)(unsafe.Pointer(in)).Ff_namelen (*Tstatvfs)(unsafe.Pointer(out)).Ff_type = (*Tstatfs)(unsafe.Pointer(in)).Ff_type @@ -136500,7 +136498,7 @@ func Xumask(tls *TLS, mode Tmode_t) (r Tmode_t) { trc("tls=%v mode=%v, (%v:)", tls, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_umask), int32(mode))))) + return Uint32FromInt32(X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_umask), Int32FromUint32(mode))))) } func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r1 int32) { @@ -136533,7 +136531,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r s1 = (*(*Ttimespec)(unsafe.Pointer(times + 1*16))).Ftv_sec } } - if Bool(false) || !!((uint64(s0)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(s1)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s0)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(s1)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if times != 0 { *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: s0, @@ -136548,10 +136546,10 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r r = X__syscall4(tls, int32(SYS_utimensat_time64), fd, int32(path), int32(v1), flags) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !!((uint64(s0)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(s1)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(s0)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(s1)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } if times != 0 { *(*[4]int32)(unsafe.Pointer(bp + 32)) = [4]int32{ @@ -136566,7 +136564,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = X__syscall4(tls, int32(SYS_utimensat), fd, int32(path), int32(v2), flags) if r != -int32(ENOSYS) || flags != 0 { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } tv = uintptr(0) if times != 0 { @@ -136576,11 +136574,11 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r if !(i < int32(2)) { break } - if uint64((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { + if Uint64FromInt32((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { if (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int32(UTIME_NOW) || (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int32(UTIME_OMIT) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(ENOSYS))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(ENOSYS))) } - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } (*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(2)*i+0] = int32((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec) (*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(2)*i+int32(1)] = (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec / int32(1000) @@ -136592,10 +136590,10 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = X__syscall3(tls, int32(SYS_futimesat), fd, int32(path), int32(tv)) if r != -int32(ENOSYS) || fd != -int32(100) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } r = X__syscall2(tls, int32(SYS_utimes), int32(path), int32(tv)) - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func X__fclose_ca(tls *TLS, f uintptr) (r int32) { @@ -136637,7 +136635,7 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { } else { v2 = int32(F_NORD) } - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(v2) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(v2) } /* Apply close-on-exec flag */ if Xstrchr(tls, mode, int32('e')) != 0 { @@ -136719,12 +136717,12 @@ func X__fopen_rb_ca(tls *TLS, filename uintptr, f uintptr, buf uintptr, len1 Tsi defer func() { trc("-> %v", r) }() } Xmemset(tls, f, 0, uint32(136)) - (*TFILE)(unsafe.Pointer(f)).Ffd = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_open), int32(filename), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))) + (*TFILE)(unsafe.Pointer(f)).Ffd = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_open), int32(filename), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))) if (*TFILE)(unsafe.Pointer(f)).Ffd < 0 { return uintptr(0) } X__syscall3(tls, int32(SYS_fcntl64), (*TFILE)(unsafe.Pointer(f)).Ffd, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) (*TFILE)(unsafe.Pointer(f)).Fbuf = buf + uintptr(UNGET) (*TFILE)(unsafe.Pointer(f)).Fbuf_size = len1 - uint32(UNGET) (*TFILE)(unsafe.Pointer(f)).Fread = __ccgo_fp(X__stdio_read) @@ -136745,22 +136743,22 @@ func X__overflow(tls *TLS, f uintptr, _c int32) (r int32) { var v2, v3 uintptr var _ /* c at bp+0 */ uint8 _, _, _ = v1, v2, v3 - *(*uint8)(unsafe.Pointer(bp)) = uint8(_c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(_c) if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return -int32(1) } - if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && int32(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { + if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { v1 = *(*uint8)(unsafe.Pointer(bp)) v3 = f + 20 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ *(*uint8)(unsafe.Pointer(v2)) = v1 - return int32(v1) + return Int32FromUint8(v1) } if (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, bp, uint32(1)) != uint32(1) { return -int32(1) } - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } func _dummy9(tls *TLS, fd int32) (r int32) { @@ -136772,7 +136770,7 @@ func X__stdio_close(tls *TLS, f uintptr) (r int32) { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_close), _dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_close), _dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))) } var _dummy_file = uintptr(0) @@ -136844,9 +136842,9 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { }, } if (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len != 0 { - v1 = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_readv), (*TFILE)(unsafe.Pointer(f)).Ffd, int32(bp), Int32FromInt32(2)))) + v1 = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_readv), (*TFILE)(unsafe.Pointer(f)).Ffd, int32(bp), Int32FromInt32(2)))) } else { - v1 = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_read), (*TFILE)(unsafe.Pointer(f)).Ffd, int32((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), int32((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) + v1 = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_read), (*TFILE)(unsafe.Pointer(f)).Ffd, int32((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), Int32FromUint32((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) } cnt = v1 if cnt <= 0 { @@ -136855,11 +136853,11 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32(F_EOF) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v2) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v2) return uint32(0) } - if uint32(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { - return uint32(cnt) + if Uint32FromInt32(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { + return Uint32FromInt32(cnt) } cnt = Tssize_t(uint32(cnt) - (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len) (*TFILE)(unsafe.Pointer(f)).Frpos = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -136898,7 +136896,7 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { Fiov_base: (*TFILE)(unsafe.Pointer(f)).Fwbase, - Fiov_len: uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)), + Fiov_len: Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)), }, 1: { Fiov_base: buf, @@ -136909,8 +136907,8 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) rem = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len + (*(*Tiovec)(unsafe.Pointer(iov + 1*8))).Fiov_len iovcnt = int32(2) for { - cnt = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_writev), (*TFILE)(unsafe.Pointer(f)).Ffd, int32(iov), iovcnt))) - if uint32(cnt) == rem { + cnt = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_writev), (*TFILE)(unsafe.Pointer(f)).Ffd, int32(iov), iovcnt))) + if Uint32FromInt32(cnt) == rem { (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v2 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fwbase = v2 @@ -136931,14 +136929,14 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) } return v5 } - rem -= uint32(cnt) - if uint32(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { + rem -= Uint32FromInt32(cnt) + if Uint32FromInt32(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { cnt = Tssize_t(uint32(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len) iov += 8 iovcnt-- } (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base + uintptr(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= uint32(cnt) + (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= Uint32FromInt32(cnt) goto _1 _1: } @@ -137042,7 +137040,7 @@ func X__uflow(tls *TLS, f uintptr) (r int32) { defer tls.Free(16) var _ /* c at bp+0 */ uint8 if !(X__toread(tls, f) != 0) && (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fread})))(tls, f, bp, uint32(1)) == uint32(1) { - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } return -int32(1) } @@ -137073,7 +137071,7 @@ func Xclearerr(tls *TLS, f uintptr) { v1 = 0 } __need_unlock = v1 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -137179,7 +137177,7 @@ func X__fpending(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint32(v1) + return Uint32FromInt32(v1) } func X__fpurge(tls *TLS, f uintptr) (r int32) { @@ -137223,7 +137221,7 @@ func X__freadahead(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint32(v1) + return Uint32FromInt32(v1) } func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { @@ -137234,7 +137232,7 @@ func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { if (*TFILE)(unsafe.Pointer(f)).Frpos == (*TFILE)(unsafe.Pointer(f)).Frend { return uintptr(0) } - *(*Tsize_t)(unsafe.Pointer(sizep)) = uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos)) + *(*Tsize_t)(unsafe.Pointer(sizep)) = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos)) return (*TFILE)(unsafe.Pointer(f)).Frpos } @@ -137473,7 +137471,7 @@ func _locking_getc(tls *TLS, f uintptr) (r int32) { v3 = f + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -137508,7 +137506,7 @@ func Xfgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -137544,27 +137542,27 @@ func Xfgetln(tls *TLS, f uintptr, plen uintptr) (r uintptr) { v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } Xungetc(tls, v2, f) if v6 = (*TFILE)(unsafe.Pointer(f)).Frend != 0; v6 { - v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) + v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) z = v5 } if v6 && v5 != 0 { ret = (*TFILE)(unsafe.Pointer(f)).Frpos z++ v7 = z - *(*Tsize_t)(unsafe.Pointer(plen)) = uint32(int32(v7) - int32(ret)) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint32FromInt32(int32(v7) - int32(ret)) (*TFILE)(unsafe.Pointer(f)).Frpos = z } else { *(*[1]Tsize_t)(unsafe.Pointer(bp)) = [1]Tsize_t{} v8 = Xgetline(tls, f+96, bp, f) l = v8 if v8 > 0 { - *(*Tsize_t)(unsafe.Pointer(plen)) = uint32(l) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint32FromInt32(l) ret = (*TFILE)(unsafe.Pointer(f)).Fgetln_buf } } @@ -137621,17 +137619,17 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { n-- for n != 0 { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v2 = int32(z) - int32((*TFILE)(unsafe.Pointer(f)).Frpos) + int32(1) } else { v2 = int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint32(v2) - if k < uint32(n) { + k = Uint32FromInt32(v2) + if k < Uint32FromInt32(n) { v3 = k } else { - v3 = uint32(n) + v3 = Uint32FromInt32(n) } k = v3 Xmemcpy(tls, p, (*TFILE)(unsafe.Pointer(f)).Frpos, k) @@ -137646,7 +137644,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { v7 = f + 4 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -137696,27 +137694,27 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { _, _, _, _, _, _, _ = c, first, l, v1, v2, v3, v4 /* Convert character from buffer if possible */ if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - l = uint32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)))) + l = Uint32FromInt32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)))) if l+uint32(1) >= uint32(1) { *(*uintptr)(unsafe.Pointer(f + 4)) += uintptr(l + BoolUint32(!(l != 0))) /* l==0 means 1 byte, null */ - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } /* Convert character byte-by-byte */ *(*Tmbstate_t)(unsafe.Pointer(bp + 8)) = Tmbstate_t{} first = int32(1) - for cond := true; cond; cond = l == uint32(-Int32FromInt32(2)) { + for cond := true; cond; cond = l == Uint32FromInt32(-Int32FromInt32(2)) { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } v1 = v2 c = v1 - *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(v1) + *(*uint8)(unsafe.Pointer(bp + 16)) = Uint8FromInt32(v1) if c < 0 { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) @@ -137725,16 +137723,16 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { return uint32(0xffffffff) } l = Xmbrtowc(tls, bp, bp+16, uint32(1), bp+8) - if l == uint32(-Int32FromInt32(1)) { + if l == Uint32FromInt32(-Int32FromInt32(1)) { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - Xungetc(tls, int32(*(*uint8)(unsafe.Pointer(bp + 16))), f) + Xungetc(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 16))), f) } return uint32(0xffffffff) } first = 0 } - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { @@ -137752,9 +137750,9 @@ func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - wc = int32(___fgetwc_unlocked_internal(tls, f)) + wc = Int32FromUint32(___fgetwc_unlocked_internal(tls, f)) *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(wc) + return Uint32FromInt32(wc) } func Xfgetwc(tls *TLS, f uintptr) (r Twint_t) { @@ -137825,7 +137823,7 @@ func Xfgetws(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { } v4 = p p += 4 - *(*Twchar_t)(unsafe.Pointer(v4)) = int32(c) + *(*Twchar_t)(unsafe.Pointer(v4)) = Int32FromUint32(c) if c == uint32('\n') { break } @@ -137922,7 +137920,7 @@ func _mseek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -137936,13 +137934,13 @@ _1: 1: (*Tcookie)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie)(unsafe.Pointer(c)).Flen1, } - base = int32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) - if off < int64(-base) || off > int64(int32((*Tcookie)(unsafe.Pointer(c)).Fsize)-base) { + base = Int32FromUint32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) + if off < int64(-base) || off > int64(Int32FromUint32((*Tcookie)(unsafe.Pointer(c)).Fsize)-base) { goto fail } - v2 = uint32(int64(base) + off) + v2 = Uint32FromInt64(int64(base) + off) (*Tcookie)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint32(v2) } func _mread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -137976,7 +137974,7 @@ func _mwrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2, rem Tsize_t _, _, _ = c, len2, rem c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _mwrite(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwpos, len2) < len2 { @@ -138024,7 +138022,7 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } - if !(buf != 0) && size > uint32(Int32FromInt32(INT32_MAX)) { + if !(buf != 0) && size > Uint32FromInt32(Int32FromInt32(INT32_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -138056,7 +138054,7 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { } else { v2 = int32(F_NORD) } - (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } if int32(*(*int8)(unsafe.Pointer(mode))) == int32('r') { (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = size @@ -138096,7 +138094,7 @@ func Xfopen(tls *TLS, filename uintptr, mode uintptr) (r uintptr) { } /* Compute the flags to pass to open() */ flags = X__fmodeflags(tls, mode) - fd = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_open), int32(filename), flags|Int32FromInt32(O_LARGEFILE), Int32FromInt32(0666)))) + fd = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_open), int32(filename), flags|Int32FromInt32(O_LARGEFILE), Int32FromInt32(0666)))) if fd < 0 { return uintptr(0) } @@ -138141,8 +138139,8 @@ func _cookieread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { if ret <= 0 { goto bail } - readlen += uint32(ret) - remain -= uint32(ret) + readlen += Uint32FromInt32(ret) + remain -= Uint32FromInt32(ret) } if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) || remain > BoolUint32(!!((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0)) { return readlen @@ -138168,7 +138166,7 @@ bail: } else { v4 = int32(F_ERR) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v4) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v4) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Frend = v5 (*TFILE)(unsafe.Pointer(f)).Frpos = v5 @@ -138181,7 +138179,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var ret Tssize_t _, _, _, _, _ = fc, len2, ret, v1, v2 fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) if !((*Tfcookie)(unsafe.Pointer(fc)).Fiofuncs.Fwrite != 0) { return len1 } @@ -138201,7 +138199,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) return uint32(0) } - return uint32(ret) + return Uint32FromInt32(ret) } func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { @@ -138212,7 +138210,7 @@ func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { var res int32 _, _ = fc, res fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - if uint32(whence) > uint32(2) { + if Uint32FromInt32(whence) > uint32(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -138265,7 +138263,7 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun } else { v2 = int32(F_NORD) } - (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } /* Set up our fcookie */ (*Tcookie_FILE)(unsafe.Pointer(f)).Ffc.Fcookie = cookie @@ -138306,15 +138304,15 @@ func _locking_putc(tls *TLS, c int32, f uintptr) (r int32) { if _a_cas(tls, f+76, 0, Int32FromInt32(MAYBE_WAITERS)-Int32FromInt32(1)) != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 20 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v1 if _a_swap(tls, f+76, 0)&int32(MAYBE_WAITERS) != 0 { @@ -138345,15 +138343,15 @@ func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 76) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 20 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -138402,16 +138400,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - if BoolInt32(uint32(c) < uint32(128)) != 0 { - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if BoolInt32(Uint32FromInt32(c) < uint32(128)) != 0 { + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 20 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v1 } else { @@ -138424,16 +138422,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } } else { l = Xwctomb(tls, bp, c) - if l < 0 || X__fwritex(tls, bp, uint32(l), f) < uint32(l) { + if l < 0 || X__fwritex(tls, bp, Uint32FromInt32(l), f) < Uint32FromInt32(l) { c = Int32FromUint32(0xffffffff) } } } - if uint32(c) == uint32(0xffffffff) { + if Uint32FromInt32(c) == uint32(0xffffffff) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -138449,11 +138447,11 @@ func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { v1 = 0 } __need_unlock = v1 - c = int32(X__fputwc_unlocked(tls, c, f)) + c = Int32FromUint32(X__fputwc_unlocked(tls, c, f)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -138518,7 +138516,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { ___unlockfile(tls, f) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return int32(l) /* 0 or -1 */ + return Int32FromUint32(l) /* 0 or -1 */ } func Xfputws_unlocked(tls *TLS, _ws uintptr, f uintptr) (r int32) { @@ -138554,8 +138552,8 @@ func Xfread(tls *TLS, destv uintptr, size Tsize_t, nmemb Tsize_t, f uintptr) (r *(*int32)(unsafe.Pointer(f + 72)) |= (*TFILE)(unsafe.Pointer(f)).Fmode - int32(1) if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { /* First exhaust the buffer. */ - if uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { - v2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos)) + if Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { + v2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos)) } else { v2 = l } @@ -138631,7 +138629,7 @@ func Xfreopen(tls *TLS, filename uintptr, mode uintptr, f uintptr) (r uintptr) { X__syscall3(tls, int32(SYS_fcntl64), (*TFILE)(unsafe.Pointer(f)).Ffd, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } fl &= ^(Int32FromInt32(O_CREAT) | Int32FromInt32(O_EXCL) | Int32FromInt32(O_CLOEXEC)) - if X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fcntl64), (*TFILE)(unsafe.Pointer(f)).Ffd, Int32FromInt32(F_SETFL), fl))) < 0 { + if X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fcntl64), (*TFILE)(unsafe.Pointer(f)).Ffd, Int32FromInt32(F_SETFL), fl))) < 0 { goto fail } } else { @@ -138729,7 +138727,7 @@ func X__fseeko_unlocked(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32) v3 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v3 (*TFILE)(unsafe.Pointer(f)).Frpos = v3 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) return 0 } @@ -139018,14 +139016,14 @@ func X__fwritex(tls *TLS, s uintptr, l Tsize_t, f uintptr) (r Tsize_t) { if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return uint32(0) } - if l > uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwend)-int32((*TFILE)(unsafe.Pointer(f)).Fwpos)) { + if l > Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwend)-int32((*TFILE)(unsafe.Pointer(f)).Fwpos)) { return (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, s, l) } if (*TFILE)(unsafe.Pointer(f)).Flbf >= 0 { /* Match /^(.*\n|)/ */ i = l for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint32(1))))) != int32('\n')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint32(1))))) != int32('\n')) { break } goto _1 @@ -139119,7 +139117,7 @@ func _locking_getc1(tls *TLS, f uintptr) (r int32) { v3 = f + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -139154,7 +139152,7 @@ func Xgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -139187,7 +139185,7 @@ func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { v3 = f + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -139221,7 +139219,7 @@ func _locking_getc2(tls *TLS, f uintptr) (r int32) { v3 = f + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -139256,7 +139254,7 @@ func Xgetchar(tls *TLS) (r int32) { v6 = v1 + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -139281,7 +139279,7 @@ func Xgetchar_unlocked(tls *TLS) (r int32) { v3 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -139319,13 +139317,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize } for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v3 = int32(z) - int32((*TFILE)(unsafe.Pointer(f)).Frpos) + int32(1) } else { v3 = int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint32(v3) + k = Uint32FromInt32(v3) } else { z = uintptr(0) k = uint32(0) @@ -139369,7 +139367,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v7 = f + 4 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -139390,7 +139388,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v9 = f + 4 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) - *(*uint8)(unsafe.Pointer(v8)) = uint8(c) + *(*uint8)(unsafe.Pointer(v8)) = Uint8FromInt32(c) } else { v10 = int8(c) v11 = i @@ -139407,7 +139405,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(i) + return Int32FromUint32(i) } func X__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t) { @@ -139447,7 +139445,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { v5 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 4 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -139571,7 +139569,7 @@ func _ms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -139585,13 +139583,13 @@ _1: 1: (*Tcookie1)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie1)(unsafe.Pointer(c)).Flen1, } - base = int32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) + base = Int32FromUint32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) if off < int64(-base) || off > int64(int32(0x7fffffff)-base) { goto fail } - v2 = uint32(int64(base) + off) + v2 = Uint32FromInt64(int64(base) + off) (*Tcookie1)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint32(v2) } func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -139599,7 +139597,7 @@ func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _ms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -139705,7 +139703,7 @@ func _wms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -139719,14 +139717,14 @@ _1: 1: (*Tcookie2)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie2)(unsafe.Pointer(c)).Flen1, } - base = int32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) + base = Int32FromUint32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) if off < int64(-base) || off > int64(Int32FromInt32(0x7fffffff)/Int32FromInt32(4)-base) { goto fail } Xmemset(tls, c+24, 0, uint32(8)) - v2 = uint32(int64(base) + off) + v2 = Uint32FromInt64(int64(base) + off) (*Tcookie2)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint32(v2) } func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -139737,7 +139735,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _wms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -139746,7 +139744,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { } if len1+(*Tcookie2)(unsafe.Pointer(c)).Fpos >= (*Tcookie2)(unsafe.Pointer(c)).Fspace { len2 = uint32(2)*(*Tcookie2)(unsafe.Pointer(c)).Fspace + uint32(1) | ((*Tcookie2)(unsafe.Pointer(c)).Fpos + len1 + uint32(1)) - if len2 > uint32(Int32FromInt32(0x7fffffff)/Int32FromInt32(4)) { + if len2 > Uint32FromInt32(Int32FromInt32(0x7fffffff)/Int32FromInt32(4)) { return uint32(0) } newbuf = Xrealloc(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf, len2*uint32(4)) @@ -139760,7 +139758,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { (*Tcookie2)(unsafe.Pointer(c)).Fspace = len2 } len2 = Xmbsnrtowcs(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf+uintptr((*Tcookie2)(unsafe.Pointer(c)).Fpos)*4, bp, len1, (*Tcookie2)(unsafe.Pointer(c)).Fspace-(*Tcookie2)(unsafe.Pointer(c)).Fpos, c+24) - if len2 == uint32(-Int32FromInt32(1)) { + if len2 == Uint32FromInt32(-Int32FromInt32(1)) { return uint32(0) } *(*Tsize_t)(unsafe.Pointer(c + 8)) += len2 @@ -139846,7 +139844,7 @@ func Xpclose(tls *TLS, f uintptr) (r1 int32) { } } if r < 0 { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } return *(*int32)(unsafe.Pointer(bp)) } @@ -139906,15 +139904,15 @@ func _locking_putc1(tls *TLS, c int32, f uintptr) (r int32) { if _a_cas(tls, f+76, 0, Int32FromInt32(MAYBE_WAITERS)-Int32FromInt32(1)) != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 20 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v1 if _a_swap(tls, f+76, 0)&int32(MAYBE_WAITERS) != 0 { @@ -139945,15 +139943,15 @@ func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 76) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 20 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139981,15 +139979,15 @@ func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 20 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -140018,15 +140016,15 @@ func _locking_putc2(tls *TLS, c int32, f uintptr) (r int32) { if _a_cas(tls, f+76, 0, Int32FromInt32(MAYBE_WAITERS)-Int32FromInt32(1)) != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 20 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v1 if _a_swap(tls, f+76, 0)&int32(MAYBE_WAITERS) != 0 { @@ -140057,15 +140055,15 @@ func Xputchar(tls *TLS, c1 int32) (r int32) { v2 = uintptr(unsafe.Pointer(&X__stdout_FILE)) l = AtomicLoadPInt32(v2 + 76) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 20 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -140085,15 +140083,15 @@ func Xputchar_unlocked(tls *TLS, c int32) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v2 = Uint8FromInt32(c) v4 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 20 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(c))) + v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -140115,15 +140113,15 @@ func Xputs(tls *TLS, s uintptr) (r1 int32) { } __need_unlock = v1 if v6 = Xfputs(tls, s, uintptr(unsafe.Pointer(&X__stdout_FILE))) < 0; !v6 { - if int32(uint8(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v3 = uint8(Int32FromUint8('\n')) + if Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v3 = Uint8FromInt32(Int32FromUint8('\n')) v5 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 20 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ *(*uint8)(unsafe.Pointer(v4)) = v3 - v2 = int32(v3) + v2 = Int32FromUint8(v3) } else { - v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(Int32FromUint8('\n')))) + v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n')))) } } r = -BoolInt32(v6 || v2 < 0) @@ -140141,7 +140139,7 @@ func Xputw(tls *TLS, _x int32, f uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) *(*int32)(unsafe.Pointer(bp)) = _x - return int32(Xfwrite(tls, bp, uint32(4), uint32(1), f)) - int32(1) + return Int32FromUint32(Xfwrite(tls, bp, uint32(4), uint32(1), f)) - int32(1) } func Xputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -140179,7 +140177,7 @@ func Xremove(tls *TLS, path uintptr) (r1 int32) { if r == -int32(EISDIR) { r = X__syscall1(tls, int32(SYS_rmdir), int32(path)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { @@ -140187,7 +140185,7 @@ func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { trc("tls=%v old=%v new1=%v, (%v:)", tls, old, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_rename), int32(old), int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_rename), int32(old), int32(new1)))) } func Xrewind(tls *TLS, f uintptr) { @@ -140203,7 +140201,7 @@ func Xrewind(tls *TLS, f uintptr) { } __need_unlock = v1 X__fseeko_unlocked(tls, f, 0, 0) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -140478,7 +140476,7 @@ func Xtmpfile(tls *TLS) (r uintptr) { break } ___randname(tls, bp+uintptr(13)) - fd = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_open), int32(bp), Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE), Int32FromInt32(0600)))) + fd = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_open), int32(bp), Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE), Int32FromInt32(0600)))) if fd >= 0 { X__syscall1(tls, int32(SYS_unlink), int32(bp)) f = X__fdopen(tls, fd, __ccgo_ts+1416) @@ -140562,12 +140560,12 @@ func Xungetc(tls *TLS, c int32, f uintptr) (r int32) { v3 = f + 4 *(*uintptr)(unsafe.Pointer(v3))-- v2 = *(*uintptr)(unsafe.Pointer(v3)) - *(*uint8)(unsafe.Pointer(v2)) = uint8(c) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(c) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(uint8(c)) + return Int32FromUint8(Uint8FromInt32(c)) } func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { @@ -140599,7 +140597,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { X__toread(tls, f) } if v3 = !((*TFILE)(unsafe.Pointer(f)).Frpos != 0) || c == uint32(0xffffffff); !v3 { - v2 = int32(Xwcrtomb(tls, bp, int32(c), uintptr(0))) + v2 = Int32FromUint32(Xwcrtomb(tls, bp, Int32FromUint32(c), uintptr(0))) l = v2 } if v3 || v2 < 0 || (*TFILE)(unsafe.Pointer(f)).Frpos < (*TFILE)(unsafe.Pointer(f)).Fbuf-uintptr(UNGET)+uintptr(l) { @@ -140617,9 +140615,9 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { } else { p6 = f + 4 *(*uintptr)(unsafe.Pointer(p6)) -= uintptr(l) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint32(l)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, Uint32FromInt32(l)) } - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -140641,13 +140639,13 @@ func Xvasprintf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32) { l = Xvsnprintf(tls, uintptr(0), uint32(0), fmt, ap2) _ = ap2 if v2 = l < 0; !v2 { - v1 = Xmalloc(tls, uint32(l)+uint32(1)) + v1 = Xmalloc(tls, Uint32FromInt32(l)+uint32(1)) *(*uintptr)(unsafe.Pointer(s)) = v1 } if v2 || !(v1 != 0) { return -int32(1) } - return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint32(l)+uint32(1), fmt, ap) + return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), Uint32FromInt32(l)+uint32(1), fmt, ap) } func Xvdprintf(tls *TLS, fd int32, fmt uintptr, ap Tva_list) (r int32) { @@ -140827,33 +140825,33 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint32(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_DBL): @@ -140875,18 +140873,18 @@ func _pad3(tls *TLS, f uintptr, c int8, w int32, l int32, fl int32) { var v1 uint32 var _ /* pad at bp+0 */ [256]int8 _ = v1 - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { return } l = w - l - if uint32(l) > uint32(256) { + if Uint32FromInt32(l) > uint32(256) { v1 = uint32(256) } else { - v1 = uint32(l) + v1 = Uint32FromInt32(l) } Xmemset(tls, bp, int32(c), v1) for { - if !(uint32(l) >= uint32(256)) { + if !(Uint32FromInt32(l) >= uint32(256)) { break } _out(tls, f, bp, uint32(256)) @@ -140895,7 +140893,7 @@ func _pad3(tls *TLS, f uintptr, c int8, w int32, l int32, fl int32) { ; l = int32(uint32(l) - Uint32FromInt64(256)) } - _out(tls, f, bp, uint32(l)) + _out(tls, f, bp, Uint32FromInt32(l)) } var _xdigits1 = [16]int8{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} @@ -140927,7 +140925,7 @@ func _fmt_o(tls *TLS, x Tuintmax_t, s uintptr) (r uintptr) { } s-- v2 = s - *(*int8)(unsafe.Pointer(v2)) = int8(uint64('0') + x&uint64(7)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint64(uint64('0') + x&uint64(7)) goto _1 _1: ; @@ -140946,7 +140944,7 @@ func _fmt_u(tls *TLS, x Tuintmax_t, s uintptr) (r uintptr) { } s-- v2 = s - *(*int8)(unsafe.Pointer(v2)) = int8(uint64('0') + x%uint64(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint64(uint64('0') + x%uint64(10)) goto _1 _1: ; @@ -140959,7 +140957,7 @@ func _fmt_u(tls *TLS, x Tuintmax_t, s uintptr) (r uintptr) { } s-- v4 = s - *(*int8)(unsafe.Pointer(v4)) = int8(uint32('0') + y%uint32(10)) + *(*int8)(unsafe.Pointer(v4)) = Int8FromUint32(uint32('0') + y%uint32(10)) goto _3 _3: ; @@ -141001,13 +140999,13 @@ func _fmt_fp(tls *TLS, f uintptr, y float64, w int32, p int32, fl int32, t int32 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: - if int32(v1>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v1>>Int32FromInt32(63)) != 0 { y = -y } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { prefix += uintptr(3) } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { prefix += uintptr(6) } else { prefix++ @@ -141034,10 +141032,10 @@ _4: } s1 = v6 } - _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) - _out(tls, f, prefix, uint32(pl)) + _pad3(tls, f, int8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) + _out(tls, f, prefix, Uint32FromInt32(pl)) _out(tls, f, s1, uint32(3)) - _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > int32(3)+pl { v7 = w } else { @@ -141085,7 +141083,7 @@ _4: } else { v9 = *(*int32)(unsafe.Pointer(bp + 512)) } - estr = _fmt_u(tls, uint64(v9), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v9), ebuf) if estr == ebuf { estr-- v10 = estr @@ -141109,7 +141107,7 @@ _4: s++ *(*int8)(unsafe.Pointer(v14)) = int8(int32(_xdigits1[x]) | t&int32(32)) y = Float64FromInt32(16) * (y - float64(x)) - if int32(s)-t__predefined_ptrdiff_t(bp+516) == int32(1) && (y != 0 || p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if int32(s)-t__predefined_ptrdiff_t(bp+516) == int32(1) && (y != 0 || p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { v15 = s s++ *(*int8)(unsafe.Pointer(v15)) = int8('.') @@ -141124,12 +141122,12 @@ _4: l = int32(s) - t__predefined_ptrdiff_t(bp+516) + (int32(ebuf) - int32(estr)) } _pad3(tls, f, int8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint32(pl)) - _pad3(tls, f, int8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) - _out(tls, f, bp+516, uint32(int32(s)-t__predefined_ptrdiff_t(bp+516))) + _out(tls, f, prefix, Uint32FromInt32(pl)) + _pad3(tls, f, int8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, bp+516, Uint32FromInt32(int32(s)-t__predefined_ptrdiff_t(bp+516))) _pad3(tls, f, int8('0'), l-(int32(ebuf)-int32(estr))-(int32(s)-t__predefined_ptrdiff_t(bp+516)), 0, 0) - _out(tls, f, estr, uint32(int32(ebuf)-int32(estr))) - _pad3(tls, f, int8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, estr, Uint32FromInt32(int32(ebuf)-int32(estr))) + _pad3(tls, f, int8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v16 = w } else { @@ -141202,15 +141200,15 @@ _4: v25 = -*(*int32)(unsafe.Pointer(bp + 512)) } sh1 = v25 - need = int32(uint32(1) + (uint32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) + need = Int32FromUint32(uint32(1) + (Uint32FromInt32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) d = a for { if !(d < z) { break } - rm = *(*Tuint32_t)(unsafe.Pointer(d)) & uint32(int32(1)<>sh1 + carry1 - carry1 = uint32(Int32FromInt32(1000000000)>>sh1) * rm + carry1 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh1) * rm goto _26 _26: ; @@ -141240,7 +141238,7 @@ _4: i = int32(10) e = Int32FromInt32(9) * ((int32(r) - int32(a)) / 4) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _29 @@ -141271,17 +141269,17 @@ _4: i *= int32(10) j++ } - x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(i) + x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % Uint32FromInt32(i) /* Are there any significant digits past j? */ if x2 != 0 || d+uintptr(1)*4 != z { round1 = Float64FromInt32(2) / Float64FromFloat64(2.22044604925031308085e-16) - if *(*Tuint32_t)(unsafe.Pointer(d))/uint32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { + if *(*Tuint32_t)(unsafe.Pointer(d))/Uint32FromInt32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { round1 += Float64FromInt32(2) } - if x2 < uint32(i/int32(2)) { + if x2 < Uint32FromInt32(i/int32(2)) { small = Float64FromFloat64(0.5) } else { - if x2 == uint32(i/int32(2)) && d+uintptr(1)*4 == z { + if x2 == Uint32FromInt32(i/int32(2)) && d+uintptr(1)*4 == z { small = Float64FromFloat64(1) } else { small = Float64FromFloat64(1.5) @@ -141294,7 +141292,7 @@ _4: *(*Tuint32_t)(unsafe.Pointer(d)) -= x2 /* Decide whether to round by probing round+small */ if round1+small != round1 { - *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + uint32(i) + *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + Uint32FromInt32(i) for *(*Tuint32_t)(unsafe.Pointer(d)) > uint32(999999999) { v31 = d d -= 4 @@ -141309,7 +141307,7 @@ _4: i = int32(10) e = Int32FromInt32(9) * ((int32(r) - int32(a)) / 4) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _33 @@ -141344,13 +141342,13 @@ _4: t -= int32(2) p-- } - if !(uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if !(Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { /* Count trailing zeros in last place */ if z > a && *(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4)) != 0 { i = int32(10) j = Int32FromInt32(0) for { - if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%uint32(i) == uint32(0)) { + if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%Uint32FromInt32(i) == uint32(0)) { break } goto _35 @@ -141399,10 +141397,10 @@ _4: } } } - if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { return -int32(1) } - l = int32(1) + p + BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) + l = int32(1) + p + BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) if t|int32(32) == int32('f') { if e > int32(INT_MAX)-l { return -int32(1) @@ -141416,7 +141414,7 @@ _4: } else { v42 = e } - estr = _fmt_u(tls, uint64(v42), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v42), ebuf) for int32(ebuf)-int32(estr) < int32(2) { estr-- v43 = estr @@ -141442,8 +141440,8 @@ _4: return -int32(1) } _pad3(tls, f, int8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint32(pl)) - _pad3(tls, f, int8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, prefix, Uint32FromInt32(pl)) + _pad3(tls, f, int8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) if t|int32(32) == int32('f') { if a > r { a = r @@ -141467,13 +141465,13 @@ _4: *(*int8)(unsafe.Pointer(v49)) = int8('0') } } - _out(tls, f, s2, uint32(int32(bp+516+uintptr(9))-int32(s2))) + _out(tls, f, s2, Uint32FromInt32(int32(bp+516+uintptr(9))-int32(s2))) goto _47 _47: ; d += 4 } - if p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+483, uint32(1)) } for { @@ -141491,7 +141489,7 @@ _4: } else { v52 = p } - _out(tls, f, s3, uint32(v52)) + _out(tls, f, s3, Uint32FromInt32(v52)) goto _50 _50: ; @@ -141524,7 +141522,7 @@ _4: v56 = s4 s4++ _out(tls, f, v56, uint32(1)) - if p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+483, uint32(1)) } } @@ -141533,7 +141531,7 @@ _4: } else { v57 = p } - _out(tls, f, s4, uint32(v57)) + _out(tls, f, s4, Uint32FromInt32(v57)) p -= int32(bp+516+uintptr(9)) - int32(s4) goto _53 _53: @@ -141541,9 +141539,9 @@ _4: d += 4 } _pad3(tls, f, int8('0'), p+int32(18), int32(18), 0) - _out(tls, f, estr, uint32(int32(ebuf)-int32(estr))) + _out(tls, f, estr, Uint32FromInt32(int32(ebuf)-int32(estr))) } - _pad3(tls, f, int8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v58 = w } else { @@ -141557,10 +141555,10 @@ func _getint(tls *TLS, s uintptr) (r int32) { _ = i i = 0 for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { i = int32(10)*i + (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) @@ -141630,12 +141628,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32(z) - int32(a) if f != 0 { - _out(tls, f, a, uint32(l)) + _out(tls, f, a, Uint32FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) argpos = int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) @@ -141646,7 +141644,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { + if !(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { break } fl |= uint32(1) << (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) @@ -141657,13 +141655,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read field width */ if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) if !(f != 0) { *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) w = Int32FromInt32(0) } else { - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { @@ -141692,12 +141690,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read precision */ if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { if !(f != 0) { *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) p = Int32FromInt32(0) } else { - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(4) } else { @@ -141727,7 +141725,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -141746,13 +141744,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { if argpos >= 0 { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) } else { *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } } else { if f != 0 { - _pop_arg(tls, bp+8, int32(st), ap) + _pop_arg(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -141832,24 +141830,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint32(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint32FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint64FromInt32(cnt) break } goto _1 _10: ; - if uint32(p) > Uint32FromInt32(2)*Uint32FromInt64(4) { - v31 = uint32(p) + if Uint32FromInt32(p) > Uint32FromInt32(2)*Uint32FromInt64(4) { + v31 = Uint32FromInt32(p) } else { v31 = Uint32FromInt32(2) * Uint32FromInt64(4) } - p = int32(v31) + p = Int32FromUint32(v31) t = int32('x') fl |= Uint32FromUint32(1) << (Int32FromUint8('#') - Int32FromUint8(' ')) _12: @@ -141880,7 +141878,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, _14: ; pl = int32(1) - if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > uint64(Int64FromInt64(INT64_MAX)) { + if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) = -*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { if fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { @@ -141924,7 +141922,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, p = v36 v35 = z - uintptr(v36) a = v35 - *(*int8)(unsafe.Pointer(v35)) = int8(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) + *(*int8)(unsafe.Pointer(v35)) = Int8FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) fl &= ^(Uint32FromUint32(1) << (Int32FromUint8('0') - Int32FromUint8(' '))) goto _30 _19: @@ -141951,7 +141949,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v40 = p } - z = a + uintptr(Xstrnlen(tls, a, uint32(v40))) + z = a + uintptr(Xstrnlen(tls, a, Uint32FromInt32(v40))) if p < 0 && *(*int8)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -141963,7 +141961,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if !(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0) { goto narrow_c } - (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) + (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[int32(1)] = 0 *(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))) = bp + 40 p = -int32(1) @@ -141972,21 +141970,21 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, ws = *(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))) v42 = Int32FromInt32(0) l = v42 - i = uint32(v42) + i = Uint32FromInt32(v42) for { - if v45 = i < uint32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { + if v45 = i < Uint32FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { v44 = ws ws += 4 v43 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v44))) l = v43 } - if !(v45 && v43 >= 0 && uint32(l) <= uint32(p)-i) { + if !(v45 && v43 >= 0 && Uint32FromInt32(l) <= Uint32FromInt32(p)-i) { break } goto _41 _41: ; - i += uint32(l) + i += Uint32FromInt32(l) } if l < 0 { return -int32(1) @@ -141994,27 +141992,27 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if i > uint32(INT_MAX) { goto overflow } - p = int32(i) - _pad3(tls, f, int8(' '), w, p, int32(fl)) + p = Int32FromUint32(i) + _pad3(tls, f, int8(' '), w, p, Int32FromUint32(fl)) ws = *(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))) i = uint32(0) for { - if v49 = i < 0+uint32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { + if v49 = i < 0+Uint32FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { v48 = ws ws += 4 v47 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v48))) l = v47 } - if !(v49 && i+uint32(v47) <= uint32(p)) { + if !(v49 && i+Uint32FromInt32(v47) <= Uint32FromInt32(p)) { break } - _out(tls, f, bp+48, uint32(l)) + _out(tls, f, bp+48, Uint32FromInt32(l)) goto _46 _46: ; - i += uint32(l) + i += Uint32FromInt32(l) } - _pad3(tls, f, int8(' '), w, p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > p { v50 = w } else { @@ -142041,7 +142039,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if xp != 0 && p < 0 { goto overflow } - l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, int32(fl), t) + l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, Int32FromUint32(fl), t) if l < 0 { goto overflow } @@ -142060,12 +142058,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w > int32(INT_MAX)-cnt { goto overflow } - _pad3(tls, f, int8(' '), w, pl+p, int32(fl)) - _out(tls, f, prefix, uint32(pl)) - _pad3(tls, f, int8('0'), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, pl+p, Int32FromUint32(fl)) + _out(tls, f, prefix, Uint32FromInt32(pl)) + _pad3(tls, f, int8('0'), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) _pad3(tls, f, int8('0'), p, int32(z)-int32(a), 0) - _out(tls, f, a, uint32(int32(z)-int32(a))) - _pad3(tls, f, int8(' '), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, a, Uint32FromInt32(int32(z)-int32(a))) + _pad3(tls, f, int8(' '), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 _1: @@ -142140,8 +142138,8 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v1 = 0 } __need_unlock = v1 - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) { saved_buf = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fbuf = bp + 124 @@ -142173,7 +142171,7 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -142194,15 +142192,15 @@ func _store_int(tls *TLS, dest uintptr, size int32, i uint64) { } switch size { case -int32(2): - *(*int8)(unsafe.Pointer(dest)) = int8(i) + *(*int8)(unsafe.Pointer(dest)) = Int8FromUint64(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -142269,14 +142267,14 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - v3 = int32(*(*uint8)(unsafe.Pointer(p))) - v4 = BoolInt32(v3 == int32(' ') || uint32(v3)-uint32('\t') < uint32(5)) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v4 = BoolInt32(v3 == int32(' ') || Uint32FromInt32(v3)-uint32('\t') < uint32(5)) goto _5 _5: if v4 != 0 { for { - v6 = int32(*(*uint8)(unsafe.Pointer(p + 1))) - v7 = BoolInt32(v6 == int32(' ') || uint32(v6)-uint32('\t') < uint32(5)) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) + v7 = BoolInt32(v6 == int32(' ') || Uint32FromInt32(v6)-uint32('\t') < uint32(5)) goto _8 _8: if !(v7 != 0) { @@ -142290,12 +142288,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v11 = f + 4 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } v12 = v9 - v13 = BoolInt32(v12 == int32(' ') || uint32(v12)-uint32('\t') < uint32(5)) + v13 = BoolInt32(v12 == int32(' ') || Uint32FromInt32(v12)-uint32('\t') < uint32(5)) goto _14 _14: if !(v13 != 0) { @@ -142308,23 +142306,23 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { pos += (*TFILE)(unsafe.Pointer(f)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(f)).Frpos)-int32((*TFILE)(unsafe.Pointer(f)).Fbuf)) goto _2 } - if int32(*(*uint8)(unsafe.Pointer(p))) != int32('%') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32('%') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { X__shlim(tls, f, int64(Int32FromInt32(0))) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('%') { p++ for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Fshend { v19 = f + 4 v18 = *(*uintptr)(unsafe.Pointer(v19)) *(*uintptr)(unsafe.Pointer(v19))++ - v17 = int32(*(*uint8)(unsafe.Pointer(v18))) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v18))) } else { v17 = X__shgetc(tls, f) } v16 = v17 c = v16 v20 = v16 - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: if !(v21 != 0) { @@ -142336,13 +142334,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v25 = f + 4 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ - v23 = int32(*(*uint8)(unsafe.Pointer(v24))) + v23 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v24))) } else { v23 = X__shgetc(tls, f) } c = v23 } - if c != int32(*(*uint8)(unsafe.Pointer(p))) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -142355,12 +142353,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto _2 } p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('*') { dest = uintptr(0) p++ } else { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { - dest = _arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { + dest = _arg_n(tls, ap, Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) p += uintptr(2) } else { dest = VaUintptr(&ap) @@ -142371,13 +142369,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } - width = int32(10)*width + int32(*(*uint8)(unsafe.Pointer(p))) - int32('0') + width = int32(10)*width + Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) - int32('0') goto _27 _27: ; p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('m') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('m') { wcs = uintptr(0) s = uintptr(0) alloc = BoolInt32(!!(dest != 0)) @@ -142388,16 +142386,16 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { size = SIZE_def v28 = p p++ - switch int32(*(*uint8)(unsafe.Pointer(v28))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) { case int32('h'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('h') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('h') { p++ size = -Int32FromInt32(2) } else { size = -int32(1) } case int32('l'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('l') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('l') { p++ size = Int32FromInt32(SIZE_ll) } else { @@ -142456,7 +142454,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*uint8)(unsafe.Pointer(p))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) /* C or S */ if t&int32(0x2f) == int32(3) { t |= int32(32) @@ -142470,7 +142468,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { fallthrough case int32('['): case int32('n'): - _store_int(tls, dest, size, uint64(pos)) + _store_int(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 default: @@ -142480,12 +142478,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v31 = f + 4 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } v32 = v29 - v33 = BoolInt32(v32 == int32(' ') || uint32(v32)-uint32('\t') < uint32(5)) + v33 = BoolInt32(v32 == int32(' ') || Uint32FromInt32(v32)-uint32('\t') < uint32(5)) goto _34 _34: if !(v33 != 0) { @@ -142502,7 +142500,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v38 = f + 4 v37 = *(*uintptr)(unsafe.Pointer(v38)) *(*uintptr)(unsafe.Pointer(v38))++ - v36 = int32(*(*uint8)(unsafe.Pointer(v37))) + v36 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v37))) } else { v36 = X__shgetc(tls, f) } @@ -142571,7 +142569,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { p++ v59 = p - if int32(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { p++ invert = Int32FromInt32(1) } else { @@ -142579,38 +142577,38 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } Xmemset(tls, bp+16, invert, uint32(257)) (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = Uint8FromInt32(Int32FromInt32(1) - invert) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = Uint8FromInt32(Int32FromInt32(1) - invert) } } for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } if !(*(*uint8)(unsafe.Pointer(p)) != 0) { goto fmt_fail } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { v62 = p p++ - c = int32(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) for { - if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + if !(c < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))) { break } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = Uint8FromInt32(int32(1) - invert) goto _61 _61: ; c++ } } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+int32(*(*uint8)(unsafe.Pointer(p)))] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))] = Uint8FromInt32(int32(1) - invert) goto _60 _60: ; @@ -142621,7 +142619,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { s = uintptr(0) i = uint32(0) if t == int32('c') { - v63 = uint32(width) + uint32(1) + v63 = Uint32FromInt32(width) + uint32(1) } else { v63 = uint32(31) } @@ -142641,7 +142639,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v67 = f + 4 v66 = *(*uintptr)(unsafe.Pointer(v67)) *(*uintptr)(unsafe.Pointer(v67))++ - v65 = int32(*(*uint8)(unsafe.Pointer(v66))) + v65 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v66))) } else { v65 = X__shgetc(tls, f) } @@ -142652,9 +142650,9 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } *(*int8)(unsafe.Pointer(bp)) = int8(c) switch Xmbrtowc(tls, bp+276, bp, uint32(1), bp+8) { - case uint32(-Int32FromInt32(1)): + case Uint32FromInt32(-Int32FromInt32(1)): goto input_fail - case uint32(-Int32FromInt32(2)): + case Uint32FromInt32(-Int32FromInt32(2)): continue } if wcs != 0 { @@ -142685,7 +142683,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v72 = f + 4 v71 = *(*uintptr)(unsafe.Pointer(v72)) *(*uintptr)(unsafe.Pointer(v72))++ - v70 = int32(*(*uint8)(unsafe.Pointer(v71))) + v70 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v71))) } else { v70 = X__shgetc(tls, f) } @@ -142715,7 +142713,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v78 = f + 4 v77 = *(*uintptr)(unsafe.Pointer(v78)) *(*uintptr)(unsafe.Pointer(v78))++ - v76 = int32(*(*uint8)(unsafe.Pointer(v77))) + v76 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v77))) } else { v76 = X__shgetc(tls, f) } @@ -142734,7 +142732,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v83 = f + 4 v82 = *(*uintptr)(unsafe.Pointer(v83)) *(*uintptr)(unsafe.Pointer(v83))++ - v81 = int32(*(*uint8)(unsafe.Pointer(v82))) + v81 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v82))) } else { v81 = X__shgetc(tls, f) } @@ -142796,7 +142794,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto int_common int_common: ; - x = X__intscan(tls, f, uint32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) + x = X__intscan(tls, f, Uint32FromInt32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) if !((*TFILE)(unsafe.Pointer(f)).Fshcnt+int64(int32((*TFILE)(unsafe.Pointer(f)).Frpos)-int32((*TFILE)(unsafe.Pointer(f)).Fbuf)) != 0) { goto match_fail } @@ -143001,33 +142999,33 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint32(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_DBL): @@ -143056,7 +143054,7 @@ func _out1(tls *TLS, f uintptr, s uintptr, l Tsize_t) { func _pad4(tls *TLS, f uintptr, n int32, fl int32) { bp := tls.Alloc(32) defer tls.Free(32) - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return } Xfprintf(tls, f, __ccgo_ts+1467, VaList(bp+8, n, __ccgo_ts)) @@ -143067,10 +143065,10 @@ func _getint1(tls *TLS, s uintptr) (r int32) { _ = i i = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { i = int32(10)*i + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - int32('0')) @@ -143152,12 +143150,12 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = (int32(z) - int32(a)) / 4 if f != 0 { - _out1(tls, f, a, uint32(l)) + _out1(tls, f, a, Uint32FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4)) == int32('$') { l10n = uint32(1) argpos = *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4)) - int32('0') *(*uintptr)(unsafe.Pointer(bp + 4)) += uintptr(3) * 4 @@ -143168,7 +143166,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4))))-int32(' '))) != 0) { + if !(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4))))-int32(' '))) != 0) { break } fl |= uint32(1) << (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)))) - int32(' ')) @@ -143179,10 +143177,10 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read field width */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)))) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4)) == int32('$') { l10n = uint32(1) *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4))-int32('0'))*4)) = int32(_INT) - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 4)) += uintptr(3) * 4 } else { if !(l10n != 0) { @@ -143210,9 +143208,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read precision */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)))) == int32('.') && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4)) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 3*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 3*4)) == int32('$') { *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4))-int32('0'))*4)) = int32(_INT) - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 4)) += uintptr(4) * 4 } else { if !(l10n != 0) { @@ -143241,7 +143239,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -143259,11 +143257,11 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } else { if argpos >= 0 { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } else { if f != 0 { - _pop_arg1(tls, bp+8, int32(st), ap) + _pop_arg1(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -143290,13 +143288,13 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint32(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint32FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint64FromInt32(cnt) break } goto _1 @@ -143306,15 +143304,15 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < int32(1) { w = int32(1) } - _pad4(tls, f, w-int32(1), int32(fl)) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl)) if t == int32('C') { v9 = *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { - v9 = uint64(Xbtowc(tls, int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))))) + v9 = uint64(Xbtowc(tls, Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))))) } - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(v9) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint64(v9) _out1(tls, f, bp, uint32(1)) - _pad4(tls, f, w-int32(1), int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('S'): @@ -143324,7 +143322,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v10 = p } - z = a + uintptr(Xwcsnlen(tls, a, uint32(v10)))*4 + z = a + uintptr(Xwcsnlen(tls, a, Uint32FromInt32(v10)))*4 if p < 0 && *(*Twchar_t)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -143332,9 +143330,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) - _out1(tls, f, a, uint32(p)) - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl)) + _out1(tls, f, a, Uint32FromInt32(p)) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('m'): @@ -143377,7 +143375,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) + _pad4(tls, f, w-p, Int32FromUint32(fl)) bs = *(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))) for { v16 = l @@ -143389,7 +143387,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, bs += uintptr(i) _out1(tls, f, bp+32, uint32(1)) } - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 } @@ -143491,13 +143489,13 @@ func Xvfwprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } __need_unlock = v1 Xfwide(tls, f, int32(1)) - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) ret = _wprintf_core(tls, f, fmt, bp, bp+44, bp+4) if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -143511,15 +143509,15 @@ func _store_int1(tls *TLS, dest uintptr, size int32, i uint64) { } switch size { case -int32(2): - *(*int8)(unsafe.Pointer(dest)) = int8(i) + *(*int8)(unsafe.Pointer(dest)) = Int8FromUint64(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -143627,12 +143625,12 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - if Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { + if Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { p += 4 } for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v6 = f + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ @@ -143640,20 +143638,20 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v4 = Xgetwc(tls, f) } - v3 = int32(v4) + v3 = Int32FromUint32(v4) c = v3 - if !(Xiswspace(tls, uint32(v3)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v3)) != 0) { break } pos++ } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v9 = f + 4 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) _ = *(*uint8)(unsafe.Pointer(v8)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } goto _2 } @@ -143661,7 +143659,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == int32('%') { p += 4 for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v13 = f + 4 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ @@ -143669,15 +143667,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v11 = Xgetwc(tls, f) } - v10 = int32(v11) + v10 = Int32FromUint32(v11) c = v10 - if !(Xiswspace(tls, uint32(v10)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v10)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v16 = f + 4 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ @@ -143685,16 +143683,16 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v14 = Xgetwc(tls, f) } - c = int32(v14) + c = Int32FromUint32(v14) } if c != *(*Twchar_t)(unsafe.Pointer(p)) { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v19 = f + 4 *(*uintptr)(unsafe.Pointer(v19))-- v18 = *(*uintptr)(unsafe.Pointer(v19)) _ = *(*uint8)(unsafe.Pointer(v18)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if c < 0 { goto input_fail @@ -143709,8 +143707,8 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { dest = uintptr(0) p += 4 } else { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { - dest = _arg_n1(tls, ap, uint32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { + dest = _arg_n1(tls, ap, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) p += uintptr(2) * 4 } else { dest = VaUintptr(&ap) @@ -143718,7 +143716,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } width = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } width = int32(10)*width + *(*Twchar_t)(unsafe.Pointer(p)) - int32('0') @@ -143815,7 +143813,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if t != int32('n') { if t != int32('[') && t|int32(32) != int32('c') { for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v25 = f + 4 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ @@ -143823,15 +143821,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v23 = Xgetwc(tls, f) } - v22 = int32(v23) + v22 = Int32FromUint32(v23) c = v22 - if !(Xiswspace(tls, uint32(v22)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v22)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v28 = f + 4 v27 = *(*uintptr)(unsafe.Pointer(v28)) *(*uintptr)(unsafe.Pointer(v28))++ @@ -143839,23 +143837,23 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v26 = Xgetwc(tls, f) } - c = int32(v26) + c = Int32FromUint32(v26) } if c < 0 { goto input_fail } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v31 = f + 4 *(*uintptr)(unsafe.Pointer(v31))-- v30 = *(*uintptr)(unsafe.Pointer(v31)) _ = *(*uint8)(unsafe.Pointer(v30)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } } switch t { case int32('n'): - _store_int1(tls, dest, size, uint64(pos)) + _store_int1(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 case int32('s'): @@ -143913,7 +143911,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { i = uint32(0) if alloc != 0 { if t == int32('c') { - v35 = uint32(width) + uint32(1) + v35 = Uint32FromInt32(width) + uint32(1) } else { v35 = uint32(31) } @@ -143931,7 +143929,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } } for width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v39 = f + 4 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ @@ -143939,7 +143937,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v37 = Xgetwc(tls, f) } - v36 = int32(v37) + v36 = Int32FromUint32(v37) c = v36 if v36 < 0 { break @@ -143970,7 +143968,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if l < 0 { goto input_fail } - i += uint32(l) + i += Uint32FromInt32(l) if alloc != 0 && i > k-uint32(4) { k += k + uint32(1) tmp2 = Xrealloc(tls, s, k) @@ -143986,13 +143984,13 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { gotmatch = int32(1) } if width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v44 = f + 4 *(*uintptr)(unsafe.Pointer(v44))-- v43 = *(*uintptr)(unsafe.Pointer(v44)) _ = *(*uint8)(unsafe.Pointer(v43)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if t == int32('c') || !(gotmatch != 0) { goto match_fail @@ -144177,10 +144175,10 @@ func _sn_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { var v1, v2 uint32 _, _, _, _, _ = c, k, v1, v2, v3 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if (*Tcookie3)(unsafe.Pointer(c)).Fn < uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos)-int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) { + if (*Tcookie3)(unsafe.Pointer(c)).Fn < Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos)-int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) { v1 = (*Tcookie3)(unsafe.Pointer(c)).Fn } else { - v1 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + v1 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) } k = v1 if k != 0 { @@ -144271,7 +144269,7 @@ func _string_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { k = len1 + uint32(256) end = Xmemchr(tls, src, 0, k) if end != 0 { - k = uint32(int32(end) - int32(src)) + k = Uint32FromInt32(int32(end) - int32(src)) } if k < len1 { len1 = k @@ -144322,8 +144320,8 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { l0 = l i = 0 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos)-int32((*TFILE)(unsafe.Pointer(f)).Fwbase))) == uint32(-Int32FromInt32(1)) { - return uint32(-Int32FromInt32(1)) + if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos)-int32((*TFILE)(unsafe.Pointer(f)).Fwbase))) == Uint32FromInt32(-Int32FromInt32(1)) { + return Uint32FromInt32(-Int32FromInt32(1)) } for { if v2 = (*Tcookie4)(unsafe.Pointer(c)).Fl != 0 && l != 0; v2 { @@ -144337,7 +144335,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { i = int32(1) } s += uintptr(i) - l -= uint32(i) + l -= Uint32FromInt32(i) (*Tcookie4)(unsafe.Pointer(c)).Fl-- (*Tcookie4)(unsafe.Pointer(c)).Fws += 4 } @@ -144349,7 +144347,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { (*TFILE)(unsafe.Pointer(f)).Fwbase = v3 (*TFILE)(unsafe.Pointer(f)).Fwpos = v3 *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - return uint32(i) + return Uint32FromInt32(i) } (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -144387,7 +144385,7 @@ func Xvswprintf(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, ap Tva_list) (r1 in } r = Xvfwprintf(tls, bp+264, fmt, ap) _sw_write(tls, bp+264, uintptr(0), uint32(0)) - if uint32(r) >= n { + if Uint32FromInt32(r) >= n { v1 = -int32(1) } else { v1 = r @@ -144407,7 +144405,7 @@ func _wstring_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { return uint32(0) } k = Xwcsrtombs(tls, (*TFILE)(unsafe.Pointer(f)).Fbuf, bp, (*TFILE)(unsafe.Pointer(f)).Fbuf_size, uintptr(0)) - if k == uint32(-Int32FromInt32(1)) { + if k == Uint32FromInt32(-Int32FromInt32(1)) { v1 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v1 (*TFILE)(unsafe.Pointer(f)).Frpos = v1 @@ -144548,7 +144546,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { neg = 0 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144564,7 +144562,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { s++ } /* Compute n as a negative number to avoid overflow on INT_MIN */ - for BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + for BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ n = int32(10)*n - (int32(*(*int8)(unsafe.Pointer(v4))) - int32('0')) @@ -144589,7 +144587,7 @@ func Xatol(tls *TLS, s uintptr) (r int32) { neg = 0 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144605,7 +144603,7 @@ func Xatol(tls *TLS, s uintptr) (r int32) { s++ } /* Compute n as a negative number to avoid overflow on LONG_MIN */ - for BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + for BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ n = int32(10)*n - (int32(*(*int8)(unsafe.Pointer(v4))) - Int32FromUint8('0')) @@ -144631,7 +144629,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { neg = 0 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144647,7 +144645,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { s++ } /* Compute n as a negative number to avoid overflow on LLONG_MIN */ - for BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + for BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ n = int64(10)*n - int64(int32(*(*int8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) @@ -144706,7 +144704,7 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, j, v1, v3 int32 var _ /* tmp at bp+0 */ [32]int8 _, _, _, _ = i, j, v1, v3 - if uint32(n)-uint32(1) > uint32(15) { + if Uint32FromInt32(n)-uint32(1) > uint32(15) { n = int32(15) } Xsprintf(tls, bp, __ccgo_ts+1524, VaList(bp+40, n-int32(1), x)) @@ -144743,20 +144741,20 @@ func Xfcvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, lz int32 var _ /* tmp at bp+0 */ [1500]int8 _, _ = i, lz - if uint32(n) > uint32(1400) { + if Uint32FromInt32(n) > uint32(1400) { n = int32(1400) } Xsprintf(tls, bp, __ccgo_ts+1529, VaList(bp+1512, n, x)) i = BoolInt32(int32((*(*[1500]int8)(unsafe.Pointer(bp)))[0]) == int32('-')) if int32((*(*[1500]int8)(unsafe.Pointer(bp)))[i]) == int32('0') { - lz = int32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1497)) + lz = Int32FromUint32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1497)) } else { - lz = -int32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+483)) + lz = -Int32FromUint32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+483)) } if n <= lz { *(*int32)(unsafe.Pointer(sign)) = i *(*int32)(unsafe.Pointer(dp)) = int32(1) - if uint32(n) > uint32(14) { + if Uint32FromInt32(n) > uint32(14) { n = int32(14) } return __ccgo_ts + 1534 + UintptrFromInt32(14) - uintptr(n) @@ -144870,10 +144868,10 @@ _3: v6 = _a_ctz_32(tls, v5) goto _7 _7: - v4 = int32(Uint32FromInt32(8)*Uint32FromInt64(4) + uint32(v6)) + v4 = Int32FromUint32(Uint32FromInt32(8)*Uint32FromInt64(4) + Uint32FromInt32(v6)) r = v4 } - if v8 || uint32(v4) != Uint32FromInt32(8)*Uint32FromInt64(4) { + if v8 || Uint32FromInt32(v4) != Uint32FromInt32(8)*Uint32FromInt64(4) { return r } return 0 @@ -144919,25 +144917,25 @@ func _cycle(tls *TLS, width Tsize_t, ar uintptr, n int32) { // // /* shl() and shr() need n > 0 */ func _shl(tls *TLS, p uintptr, n int32) { - if uint32(n) >= Uint32FromInt32(8)*Uint32FromInt64(4) { + if Uint32FromInt32(n) >= Uint32FromInt32(8)*Uint32FromInt64(4) { n = int32(uint32(n) - Uint32FromInt32(8)*Uint32FromInt64(4)) *(*Tsize_t)(unsafe.Pointer(p + 1*4)) = *(*Tsize_t)(unsafe.Pointer(p)) *(*Tsize_t)(unsafe.Pointer(p)) = uint32(0) } - *(*Tsize_t)(unsafe.Pointer(p + 1*4)) <<= uint32(n) - *(*Tsize_t)(unsafe.Pointer(p + 1*4)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint32FromInt64(4)*Uint32FromInt32(8) - uint32(n)) - *(*Tsize_t)(unsafe.Pointer(p)) <<= uint32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*4)) <<= Uint32FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*4)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint32FromInt64(4)*Uint32FromInt32(8) - Uint32FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p)) <<= Uint32FromInt32(n) } func _shr(tls *TLS, p uintptr, n int32) { - if uint32(n) >= Uint32FromInt32(8)*Uint32FromInt64(4) { + if Uint32FromInt32(n) >= Uint32FromInt32(8)*Uint32FromInt64(4) { n = int32(uint32(n) - Uint32FromInt32(8)*Uint32FromInt64(4)) *(*Tsize_t)(unsafe.Pointer(p)) = *(*Tsize_t)(unsafe.Pointer(p + 1*4)) *(*Tsize_t)(unsafe.Pointer(p + 1*4)) = uint32(0) } - *(*Tsize_t)(unsafe.Pointer(p)) >>= uint32(n) - *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*4)) << (Uint32FromInt64(4)*Uint32FromInt32(8) - uint32(n)) - *(*Tsize_t)(unsafe.Pointer(p + 1*4)) >>= uint32(n) + *(*Tsize_t)(unsafe.Pointer(p)) >>= Uint32FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*4)) << (Uint32FromInt64(4)*Uint32FromInt32(8) - Uint32FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p + 1*4)) >>= Uint32FromInt32(n) } func _sift(tls *TLS, head uintptr, width Tsize_t, cmp Tcmpfun, arg uintptr, pshift int32, lp uintptr) { @@ -145055,7 +145053,7 @@ func X__qsort_r(tls *TLS, base uintptr, nel Tsize_t, width Tsize_t, cmp Tcmpfun, _shr(tls, bp+192, int32(2)) pshift += int32(2) } else { - if (*(*[48]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= uint32(int32(high)-int32(head)) { + if (*(*[48]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= Uint32FromInt32(int32(high)-int32(head)) { _trinkle(tls, head, width, cmp, arg, bp+192, pshift, 0, bp) } else { _sift(tls, head, width, cmp, arg, pshift, bp) @@ -145172,9 +145170,9 @@ func _strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*TFILE)(unsafe.Pointer(bp)).Fbuf = v1 (*TFILE)(unsafe.Pointer(bp)).Frend = uintptr(-Int32FromInt32(1)) X__shlim(tls, bp, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp, uint32(base), int32(1), lim) + y = X__intscan(tls, bp, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint32((*TFILE)(unsafe.Pointer(bp)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp)).Fbuf))) + cnt = Uint32FromInt64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp)).Fbuf))) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -145193,7 +145191,7 @@ func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint32) { @@ -145209,7 +145207,7 @@ func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int32) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(_strtox1(tls, s, p, base, uint64(Uint32FromUint32(0)+uint32(-Int32FromInt32(0x7fffffff)-Int32FromInt32(1))))) + return Int32FromUint64(_strtox1(tls, s, p, base, uint64(Uint32FromUint32(0)+Uint32FromInt32(-Int32FromInt32(0x7fffffff)-Int32FromInt32(1))))) } func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -145299,7 +145297,7 @@ func _do_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -145338,14 +145336,14 @@ func _wcstox(tls *TLS, s uintptr, p uintptr, prec int32) (r float64) { (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint32FromInt64(64) - Uint32FromInt32(4) AtomicStorePInt32(bp+64+76, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) y = X__floatscan(tls, bp+64, prec, int32(1)) if p != 0 { - cnt = uint32((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp+64)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint32FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp+64)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -145403,7 +145401,7 @@ func _do_read1(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -145442,14 +145440,14 @@ func _wcstox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint32FromInt64(64) - Uint32FromInt32(4) AtomicStorePInt32(bp+64+76, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read1) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp+64, uint32(base), int32(1), lim) + y = X__intscan(tls, bp+64, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint32((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp+64)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint32FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp+64)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -145473,7 +145471,7 @@ func Xwcstoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint32) { @@ -145489,7 +145487,7 @@ func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int32) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(_wcstox1(tls, s, p, base, uint64(Uint32FromUint32(0)+uint32(-Int32FromInt32(0x7fffffff)-Int32FromInt32(1))))) + return Int32FromUint64(_wcstox1(tls, s, p, base, uint64(Uint32FromUint32(0)+Uint32FromInt32(-Int32FromInt32(0x7fffffff)-Int32FromInt32(1))))) } func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -145570,14 +145568,14 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt _, _, _, _, _, _, _, _, _ = d, k, s, wd, ws, v2, v3, v6, v7 d = dest s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) == uint32(d)&(Uint32FromInt64(4)-Uint32FromInt32(1)) { for { if v3 = uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v2 } - if !(v3 && int32(v2) != c) { + if !(v3 && Int32FromUint8(v2) != c) { break } goto _1 @@ -145590,11 +145588,11 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt if uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) != 0 { goto tail } - k = uint32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * uint32(c) + k = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * Uint32FromInt32(c) wd = d ws = s for { - if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))^k-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(ws))^k) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))^k-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(ws))^k) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint32)(unsafe.Pointer(wd)) = *(*uint32)(unsafe.Pointer(ws)) @@ -145613,7 +145611,7 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt v6 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v6 } - if !(v7 && int32(v6) != c) { + if !(v7 && Int32FromUint8(v6) != c) { break } goto _5 @@ -145652,9 +145650,9 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { var s, w, v4 uintptr _, _, _, _ = k, s, w, v4 s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { - if !(uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _1 @@ -145663,11 +145661,11 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s++ n-- } - if n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c { - k = uint32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * uint32(c) + if n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c { + k = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * Uint32FromInt32(c) w = s for { - if !(n >= Uint32FromInt64(4) && !((*(*uint32)(unsafe.Pointer(w))^k-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= Uint32FromInt64(4) && !((*(*uint32)(unsafe.Pointer(w))^k-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -145679,7 +145677,7 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s = w } for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -145707,7 +145705,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { l = vl r = vr for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _1 @@ -145718,7 +145716,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { r++ } if n != 0 { - v2 = int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } else { v2 = 0 } @@ -146080,15 +146078,15 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint32(1) p = jp - ip @@ -146223,13 +146221,13 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin ms = ip p0 = p /* And with the opposite comparison */ - ip = uint32(-Int32FromInt32(1)) + ip = Uint32FromInt32(-Int32FromInt32(1)) jp = uint32(0) v5 = Uint32FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint32(1) @@ -146237,7 +146235,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint32(1) p = jp - ip @@ -146272,7 +146270,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Search loop */ for { /* If remainder of haystack is shorter than needle, done */ - if uint32(int32(z)-int32(h)) < l { + if Uint32FromInt32(int32(z)-int32(h)) < l { return uintptr(0) } /* Check last byte first; advance by shift on mismatch */ @@ -146299,7 +146297,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin } k = v11 for { - if !(k < l && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(k < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -146315,7 +146313,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Compare left half */ k = ms + uint32(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint32(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint32(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint32(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint32(1)))))) { break } goto _12 @@ -146352,11 +146350,11 @@ func Xmemmem(tls *TLS, h0 uintptr, k Tsize_t, n0 uintptr, l Tsize_t) (r uintptr) return uintptr(0) } /* Use faster algorithms for short needles */ - h = Xmemchr(tls, h0, int32(*(*uint8)(unsafe.Pointer(n))), k) + h = Xmemchr(tls, h0, Int32FromUint8(*(*uint8)(unsafe.Pointer(n))), k) if !(h != 0) || l == uint32(1) { return h } - k -= uint32(int32(h) - int32(h0)) + k -= Uint32FromInt32(int32(h) - int32(h0)) if k < l { return uintptr(0) } @@ -146389,7 +146387,7 @@ func Xmemmove(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { if d == s { return d } - if uint32(s)-uint32(d)-n <= uint32(-Int32FromInt32(2))*n { + if uint32(s)-uint32(d)-n <= Uint32FromInt32(-Int32FromInt32(2))*n { return Xmemcpy(tls, d, s, n) } if d < s { @@ -146473,14 +146471,14 @@ func X__memrchr(tls *TLS, m uintptr, c int32, n Tsize_t) (r uintptr) { var v1 Tsize_t _, _ = s, v1 s = m - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { v1 = n n-- if !(v1 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { return s + uintptr(n) } } @@ -146512,20 +146510,20 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { if !(n != 0) { return dest } - *(*uint8)(unsafe.Pointer(s)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(1)))) = Uint8FromInt32(c) if n <= uint32(2) { return dest } - *(*uint8)(unsafe.Pointer(s + 1)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + 2)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(2)))) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(3)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 1)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + 2)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(2)))) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(3)))) = Uint8FromInt32(c) if n <= uint32(6) { return dest } - *(*uint8)(unsafe.Pointer(s + 3)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(4)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 3)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(4)))) = Uint8FromInt32(c) if n <= uint32(8) { return dest } @@ -146536,8 +146534,8 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { k = -uint32(s) & uint32(3) s += uintptr(k) n -= k - n &= uint32(-Int32FromInt32(4)) - c32 = uint32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(uint8(c)) + n &= Uint32FromInt32(-Int32FromInt32(4)) + c32 = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(Uint8FromInt32(c)) /* In preparation to copy 32 bytes at a time, aligned on * an 8-byte bounary, fill head/tail up to 28 bytes each. * As in the initial byte-based head/tail fill, each @@ -146636,7 +146634,7 @@ func X__stpcpy(tls *TLS, d uintptr, s uintptr) (r uintptr) { wd = d ws = s for { - if !!((*(*uint32)(unsafe.Pointer(ws))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint32)(unsafe.Pointer(ws))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _3 @@ -146725,7 +146723,7 @@ func X__stpncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { wd = d ws = s for { - if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint32)(unsafe.Pointer(wd)) = *(*uint32)(unsafe.Pointer(ws)) @@ -146788,7 +146786,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l = _l r = _r for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _1 @@ -146797,7 +146795,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l++ r++ } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strcasecmp_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) { @@ -146856,7 +146854,7 @@ func Xstrchr(tls *TLS, s uintptr, c int32) (r1 uintptr) { var r, v1 uintptr _, _ = r, v1 r = X__strchrnul(tls, s, c) - if int32(*(*uint8)(unsafe.Pointer(r))) == int32(uint8(c)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) == Int32FromUint8(Uint8FromInt32(c)) { v1 = r } else { v1 = uintptr(0) @@ -146883,7 +146881,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { var k Tsize_t var w uintptr _, _ = k, w - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } @@ -146891,7 +146889,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { if !(uint32(s)%Uint32FromInt64(4) != 0) { break } - if !(*(*int8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { + if !(*(*int8)(unsafe.Pointer(s)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == c { return s } goto _1 @@ -146899,10 +146897,10 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { ; s++ } - k = uint32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * uint32(c) + k = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * Uint32FromInt32(c) w = s for { - if !(!((*(*uint32)(unsafe.Pointer(w))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(w)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint32)(unsafe.Pointer(w))^k-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(!((*(*uint32)(unsafe.Pointer(w))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(w)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint32)(unsafe.Pointer(w))^k-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -146912,7 +146910,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { } s = w for { - if !(*(*int8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(*(*int8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -146955,7 +146953,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { l++ r++ } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrcpy(tls *TLS, dest uintptr, src uintptr) (r uintptr) { @@ -146980,7 +146978,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { _, _, _ = a, v3, p2 a = s if !(*(*int8)(unsafe.Pointer(c)) != 0) || !(*(*int8)(unsafe.Pointer(c + 1)) != 0) { - return uint32(int32(X__strchrnul(tls, s, int32(*(*int8)(unsafe.Pointer(c))))) - int32(a)) + return Uint32FromInt32(int32(X__strchrnul(tls, s, int32(*(*int8)(unsafe.Pointer(c))))) - int32(a)) } Xmemset(tls, bp, 0, uint32(32)) for { @@ -147005,7 +147003,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } func Xstrdup(tls *TLS, s uintptr) (r uintptr) { @@ -147114,7 +147112,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { wd = d ws = s for { - if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*Tsize_t)(unsafe.Pointer(wd)) = *(*uint32)(unsafe.Pointer(ws)) @@ -147148,7 +147146,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { goto finish finish: ; - return uint32(int32(d)-int32(d0)) + Xstrlen(tls, s) + return Uint32FromInt32(int32(d)-int32(d0)) + Xstrlen(tls, s) return r } @@ -147176,7 +147174,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { break } if !(*(*int8)(unsafe.Pointer(s)) != 0) { - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } goto _1 _1: @@ -147185,7 +147183,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { } w = s for { - if !!((*(*uint32)(unsafe.Pointer(w))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(w)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint32)(unsafe.Pointer(w))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(w)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _2 @@ -147203,7 +147201,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { ; s++ } - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { @@ -147222,7 +147220,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _2 @@ -147232,7 +147230,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, loc Tlocale_t) (r1 int32) { @@ -147290,7 +147288,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _2 @@ -147300,7 +147298,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { @@ -147340,7 +147338,7 @@ func Xstrnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _, _ = p, v1 p = Xmemchr(tls, s, 0, n) if p != 0 { - v1 = uint32(int32(p) - int32(s)) + v1 = Uint32FromInt32(int32(p) - int32(s)) } else { v1 = n } @@ -147406,7 +147404,7 @@ func Xstrsignal(tls *TLS, signum int32) (r uintptr) { _, _ = s, v2 s = uintptr(unsafe.Pointer(&_strings)) signum = signum - if uint32(signum)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(signum)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { signum = 0 } for { @@ -147458,7 +147456,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } for { if v4 = *(*int8)(unsafe.Pointer(c)) != 0; v4 { @@ -147482,18 +147480,18 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint32(1) p = jp - ip @@ -147621,13 +147619,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint32(-Int32FromInt32(1)) + ip = Uint32FromInt32(-Int32FromInt32(1)) jp = uint32(0) v5 = Uint32FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint32(1) @@ -147635,7 +147633,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint32(1) p = jp - ip @@ -147672,13 +147670,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint32(int32(z)-int32(h)) < l { + if Uint32FromInt32(int32(z)-int32(h)) < l { /* Fast estimate for MAX(l,63) */ grow = l | uint32(63) z2 = Xmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint32(int32(z)-int32(h)) < l { + if Uint32FromInt32(int32(z)-int32(h)) < l { return uintptr(0) } } else { @@ -147709,7 +147707,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { } k = v11 for { - if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -147725,7 +147723,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Compare left half */ k = ms + uint32(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint32(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint32(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint32(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint32(1)))))) { break } goto _12 @@ -147864,14 +147862,14 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { i = v2 dp = v2 for { - if !(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { break } - c = int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) if !(c != 0) { return 0 } - if !(BoolInt32(uint32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { dp = i + uint32(1) z = Int32FromInt32(1) } else { @@ -147884,7 +147882,7 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { ; i++ } - if uint32(int32(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && uint32(int32(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { + if Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { /* If we're looking at non-degenerate digit sequences starting * with nonzero digits, longest digit string is greater. */ j = i @@ -147907,10 +147905,10 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { if z != 0 && dp < i && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-uint32('0') < uint32(10)) != 0 || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-uint32('0') < uint32(10)) != 0) { /* Otherwise, if common prefix of digit sequence is * all zeros, digits order less than non-digits. */ - return int32(uint8(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - int32(uint8(int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) + return Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) } } - return int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - int32(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) } func Xswab(tls *TLS, _src uintptr, _dest uintptr, n Tssize_t) { @@ -147957,7 +147955,7 @@ func Xwcscasecmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2)) defer func() { trc("-> %v", r1) }() } - return Xwcsncasecmp(tls, l, r, uint32(-Int32FromInt32(1))) + return Xwcsncasecmp(tls, l, r, Uint32FromInt32(-Int32FromInt32(1))) } func Xwcscasecmp_l(tls *TLS, l uintptr, r uintptr, locale Tlocale_t) (r1 int32) { @@ -148069,7 +148067,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { v2 = Xwcschr(tls, v3, *(*Twchar_t)(unsafe.Pointer(c))) s = v2 if v2 != 0 { - v1 = uint32((int32(s) - int32(a)) / 4) + v1 = Uint32FromInt32((int32(s) - int32(a)) / 4) } else { v1 = Xwcslen(tls, a) } @@ -148085,7 +148083,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint32((int32(s) - int32(a)) / 4) + return Uint32FromInt32((int32(s) - int32(a)) / 4) } func Xwcsdup(tls *TLS, s uintptr) (r uintptr) { @@ -148121,7 +148119,7 @@ func Xwcslen(tls *TLS, s uintptr) (r Tsize_t) { ; s += 4 } - return uint32((int32(s) - int32(a)) / 4) + return Uint32FromInt32((int32(s) - int32(a)) / 4) } func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { @@ -148137,7 +148135,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r)))))) { + if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r)))))) { break } goto _2 @@ -148147,7 +148145,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { r += 4 n-- } - return int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r))))) + return Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r))))) } func Xwcsncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, locale Tlocale_t) (r1 int32) { @@ -148241,7 +148239,7 @@ func Xwcsnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _ = z z = Xwmemchr(tls, s, 0, n) if z != 0 { - n = uint32((int32(z) - int32(s)) / 4) + n = Uint32FromInt32((int32(z) - int32(s)) / 4) } return n } @@ -148304,7 +148302,7 @@ func Xwcsspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint32((int32(s) - int32(a)) / 4) + return Uint32FromInt32((int32(s) - int32(a)) / 4) } func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { @@ -148327,7 +148325,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return uintptr(0) } /* hit the end of h */ /* Compute maximal suffix */ - ip = uint32(-Int32FromInt32(1)) + ip = Uint32FromInt32(-Int32FromInt32(1)) jp = uint32(0) v2 = Uint32FromInt32(1) p = v2 @@ -148358,7 +148356,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint32(-Int32FromInt32(1)) + ip = Uint32FromInt32(-Int32FromInt32(1)) jp = uint32(0) v5 = Uint32FromInt32(1) p = v5 @@ -148409,13 +148407,13 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint32((int32(z)-int32(h))/4) < l { + if Uint32FromInt32((int32(z)-int32(h))/4) < l { /* Fast estimate for MIN(l,63) */ grow = l | uint32(63) z2 = Xwmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint32((int32(z)-int32(h))/4) < l { + if Uint32FromInt32((int32(z)-int32(h))/4) < l { return uintptr(0) } } else { @@ -148720,7 +148718,7 @@ func X__mkostemps(tls *TLS, template uintptr, len1 int32, flags int32) (r int32) var l Tsize_t _, _, _, _, _ = fd, l, retries, v1, v3 l = Xstrlen(tls, template) - if l < uint32(6) || uint32(len1) > l-uint32(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1563, uint32(6)) != 0 { + if l < uint32(6) || Uint32FromInt32(len1) > l-uint32(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1563, uint32(6)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -148830,10 +148828,10 @@ func Xcfmakeraw(tls *TLS, t uintptr) { if __ccgo_strace { trc("tls=%v t=%v, (%v:)", tls, t, origin(2)) } - *(*Ttcflag_t)(unsafe.Pointer(t)) &= uint32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) - *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= uint32(^Int32FromInt32(OPOST)) - *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) - *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= uint32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) + *(*Ttcflag_t)(unsafe.Pointer(t)) &= Uint32FromInt32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) + *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= Uint32FromInt32(^Int32FromInt32(OPOST)) + *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) + *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= Uint32FromInt32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) *(*Ttcflag_t)(unsafe.Pointer(t + 8)) |= uint32(CS8) *(*Tcc_t)(unsafe.Pointer(t + 17 + 6)) = uint8(1) *(*Tcc_t)(unsafe.Pointer(t + 17 + 5)) = uint8(0) @@ -148844,11 +148842,11 @@ func Xcfsetospeed(tls *TLS, tio uintptr, speed Tspeed_t) (r int32) { trc("tls=%v tio=%v speed=%v, (%v:)", tls, tio, speed, origin(2)) defer func() { trc("-> %v", r) }() } - if speed&uint32(^Int32FromInt32(CBAUD)) != 0 { + if speed&Uint32FromInt32(^Int32FromInt32(CBAUD)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= uint32(^Int32FromInt32(CBAUD)) + *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= Uint32FromInt32(^Int32FromInt32(CBAUD)) *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) |= speed return 0 } @@ -148881,7 +148879,7 @@ func Xtcdrain(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_ioctl), fd, Int32FromInt32(TCSBRK), Int32FromInt32(1), 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_ioctl), fd, Int32FromInt32(TCSBRK), Int32FromInt32(1), 0, 0, 0))) } func Xtcflow(tls *TLS, fd int32, action int32) (r int32) { @@ -148936,7 +148934,7 @@ func Xtcgetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCGWINSZ), int32(wsz)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCGWINSZ), int32(wsz)))) } func Xtcsendbreak(tls *TLS, fd int32, dur int32) (r int32) { @@ -148969,7 +148967,7 @@ func Xtcsetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCSWINSZ), int32(wsz)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCSWINSZ), int32(wsz)))) } func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { @@ -148984,13 +148982,13 @@ func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { var _ /* st at bp+0 */ Tstat _, _, _ = fd, map1, v1 map1 = uintptr(-Int32FromInt32(1)) - fd = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_open), int32(pathname), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))) + fd = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_open), int32(pathname), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))) if fd < 0 { return uintptr(0) } if !(X__fstat(tls, fd, bp) != 0) { - map1 = X__mmap(tls, uintptr(0), uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) - *(*Tsize_t)(unsafe.Pointer(size)) = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + map1 = X__mmap(tls, uintptr(0), Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) + *(*Tsize_t)(unsafe.Pointer(size)) = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) } X__syscall1(tls, int32(SYS_close), fd) if map1 == uintptr(-Int32FromInt32(1)) { @@ -149196,16 +149194,16 @@ func _getint2(tls *TLS, p uintptr) (r int32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { break } - x = uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x + x = Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x goto _1 _1: ; *(*uintptr)(unsafe.Pointer(p))++ } - return int32(x) + return Int32FromUint32(x) } func _getoff(tls *TLS, p uintptr) (r int32) { @@ -149290,7 +149288,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } else { i = 0 for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { break } if i < int32(TZNAME_MAX) { @@ -149312,7 +149310,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } func _zi_read32(tls *TLS, z uintptr) (r Tuint32_t) { - return uint32(*(*uint8)(unsafe.Pointer(z)))< uint32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { + if i > Uint32FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { *(*uintptr)(unsafe.Pointer(bp + 288)) = uintptr(unsafe.Pointer(&X__utc)) i = Uint32FromInt32(3) } @@ -149388,8 +149386,8 @@ func _do_tzset(tls *TLS) { if i >= _old_tz_size { _old_tz_size = i + uint32(1) } - if _old_tz_size > uint32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { - _old_tz_size = uint32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) + if _old_tz_size > Uint32FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { + _old_tz_size = Uint32FromInt32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) } _old_tz = Xmalloc(tls, _old_tz_size) } @@ -149400,7 +149398,7 @@ func _do_tzset(tls *TLS) { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { *(*uintptr)(unsafe.Pointer(bp + 292)) = *(*uintptr)(unsafe.Pointer(bp + 288)) _getname(tls, bp+301, bp+292) - if *(*uintptr)(unsafe.Pointer(bp + 292)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292))))) == int32('-') || BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+301, __ccgo_ts+1588) != 0) || !(Xstrcmp(tls, bp+301, __ccgo_ts+1592) != 0)) { + if *(*uintptr)(unsafe.Pointer(bp + 292)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292))))) == int32('-') || BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+301, __ccgo_ts+1588) != 0) || !(Xstrcmp(tls, bp+301, __ccgo_ts+1592) != 0)) { posix_form = int32(1) } } @@ -149447,7 +149445,7 @@ func _do_tzset(tls *TLS) { _zi = map1 if map1 != 0 { scale = int32(2) - if int32(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { *(*[6]uint8)(unsafe.Pointer(bp)) = [6]uint8{ 0: uint8(1), 1: uint8(1), @@ -149466,7 +149464,7 @@ func _do_tzset(tls *TLS) { _types = _index + uintptr(_zi_read32(tls, _trans-uintptr(12))) _abbrevs = _types + uintptr(uint32(6)*_zi_read32(tls, _trans-uintptr(8))) _abbrevs_end = _abbrevs + uintptr(_zi_read32(tls, _trans-uintptr(4))) - if int32(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint32(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint32(1))))) == int32('\n') { *(*uintptr)(unsafe.Pointer(bp + 288)) = _zi + uintptr(_map_size) - uintptr(2) for { if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { @@ -149494,11 +149492,11 @@ func _do_tzset(tls *TLS) { } if !(*(*uint8)(unsafe.Pointer(p1 + 4)) != 0) && !(Xtzname[0] != 0) { Xtzname[0] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - Xtimezone = int32(-_zi_read32(tls, p1)) + Xtimezone = Int32FromUint32(-_zi_read32(tls, p1)) } if *(*uint8)(unsafe.Pointer(p1 + 4)) != 0 && !(Xtzname[int32(1)] != 0) { Xtzname[int32(1)] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - _dst_off = int32(-_zi_read32(tls, p1)) + _dst_off = Int32FromUint32(-_zi_read32(tls, p1)) Xdaylight = int32(1) } goto _8 @@ -149529,7 +149527,7 @@ func _do_tzset(tls *TLS) { Xtzname[int32(1)] = uintptr(unsafe.Pointer(&_dst_name)) if _dst_name[0] != 0 { Xdaylight = int32(1) - if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { + if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { _dst_off = _getoff(tls, bp+288) } else { _dst_off = Xtimezone - int32(3600) @@ -149561,7 +149559,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { scale = int32(3) - BoolInt32(_trans == _zi+uintptr(44)) off = 0 a = uint32(0) - n = uint32((int32(_index) - int32(_trans)) >> scale) + n = Uint32FromInt32((int32(_index) - int32(_trans)) >> scale) if !(n != 0) { if alt != 0 { *(*Tsize_t)(unsafe.Pointer(alt)) = uint32(0) @@ -149575,12 +149573,12 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<> scale) + n = Uint32FromInt32((int32(_index) - int32(_trans)) >> scale) if a == n-uint32(1) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } if a == uint32(0) { x = uint64(_zi_read32(tls, _trans)) if scale == int32(3) { x = x<= uint32(int32(_abbrevs_end)-int32(_abbrevs))) { + if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint32(p)-uint32(_abbrevs) >= Uint32FromInt32(int32(_abbrevs_end)-int32(_abbrevs))) { p = __ccgo_ts } ___unlock(tls, uintptr(unsafe.Pointer(&_lock4))) @@ -149803,7 +149801,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { var centuries, cycles, leaps, leaps1, rem, y int32 var _ /* dummy at bp+0 */ int32 _, _, _, _, _, _ = centuries, cycles, leaps, leaps1, rem, y - if uint64(year)-uint64(2) <= uint64(136) { + if Uint64FromInt64(year)-uint64(2) <= uint64(136) { y = int32(year) leaps = (y - int32(68)) >> int32(2) if !((y-Int32FromInt32(68))&Int32FromInt32(3) != 0) { @@ -149852,7 +149850,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { *(*int32)(unsafe.Pointer(is_leap)) = 0 leaps1 = 0 } else { - leaps1 = int32(uint32(rem) / uint32(4)) + leaps1 = Int32FromUint32(Uint32FromInt32(rem) / uint32(4)) rem = int32(uint32(rem) % Uint32FromUint32(4)) *(*int32)(unsafe.Pointer(is_leap)) = BoolInt32(!(rem != 0)) } @@ -149936,7 +149934,7 @@ func Xclock_getcpuclockid(tls *TLS, pid Tpid_t, clk uintptr) (r int32) { var ret int32 var _ /* ts at bp+0 */ Ttimespec _, _ = id, ret - id = int32(uint32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) + id = Int32FromUint32(Uint32FromInt32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) ret = X__syscall2(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(7), id, int32(bp)) if ret == -int32(EINVAL) { ret = -int32(ESRCH) @@ -149965,11 +149963,11 @@ func Xclock_getres(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { (*Ttimespec)(unsafe.Pointer(ts)).Ftv_sec = int64((*(*[2]int32)(unsafe.Pointer(bp)))[0]) (*Ttimespec)(unsafe.Pointer(ts)).Ftv_nsec = (*(*[2]int32)(unsafe.Pointer(bp)))[int32(1)] } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } /* If reaching this point, it's a 64-bit arch or time64-only * 32-bit arch and we can get result directly into timespec. */ - return X__syscall_ret(tls, uint32(X__syscall2(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(7), clk, int32(ts)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(7), clk, int32(ts)))) } func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { @@ -149987,7 +149985,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { r = X__syscall2(tls, int32(SYS_clock_gettime64), clk, int32(ts)) } if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(6) == int32(SYS_clock_gettime64)) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } r = X__syscall2(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(6), clk, int32(bp)) if r == -int32(ENOSYS) && clk == CLOCK_REALTIME { @@ -149999,7 +149997,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { (*Ttimespec)(unsafe.Pointer(ts)).Ftv_nsec = (*(*[2]int32)(unsafe.Pointer(bp)))[int32(1)] return r } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xclock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { @@ -150029,7 +150027,7 @@ func X__clock_nanosleep(tls *TLS, clk Tclockid_t, flags int32, req uintptr, rem s = (*Ttimespec)(unsafe.Pointer(req)).Ftv_sec ns = (*Ttimespec)(unsafe.Pointer(req)).Ftv_nsec r = -int32(ENOSYS) - if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(8) == int32(SYS_clock_nanosleep_time64)) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(8) == int32(SYS_clock_nanosleep_time64)) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, 1: int64(ns), @@ -150039,19 +150037,19 @@ func X__clock_nanosleep(tls *TLS, clk Tclockid_t, flags int32, req uintptr, rem if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(8) == int32(SYS_clock_nanosleep_time64)) || r != -int32(ENOSYS) { return -r } - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v1 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v1 = Uint64FromInt64(s) } else { - v1 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v1 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } - extra = s - int64(int32(v1)) - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v2 = uint64(s) + extra = s - int64(Int32FromUint64(v1)) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v2 = Uint64FromInt64(s) } else { - v2 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v2 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ - 0: int32(v2), + 0: Int32FromUint64(v2), 1: ns, } if clk == CLOCK_REALTIME && !(flags != 0) { @@ -150087,7 +150085,7 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { s = (*Ttimespec)(unsafe.Pointer(ts)).Ftv_sec ns = (*Ttimespec)(unsafe.Pointer(ts)).Ftv_nsec r = -int32(ENOSYS) - if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(5) == int32(SYS_clock_settime64)) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(5) == int32(SYS_clock_settime64)) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, 1: int64(ns), @@ -150095,16 +150093,16 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { r = X__syscall2(tls, int32(SYS_clock_settime64), clk, int32(bp)) } if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(5) == int32(SYS_clock_settime64)) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ 0: int32(s), 1: ns, } - return X__syscall_ret(tls, uint32(X__syscall2(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(5), clk, int32(bp+16)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(5), clk, int32(bp+16)))) } func Xctime(tls *TLS, t uintptr) (r uintptr) { @@ -150167,7 +150165,7 @@ func Xftime(tls *TLS, tp uintptr) (r int32) { _ = v1 Xclock_gettime(tls, CLOCK_REALTIME, bp) (*Ttimeb)(unsafe.Pointer(tp)).Ftime = (*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec - (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = uint16((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int32(1000000)) + (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = Uint16FromInt32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int32(1000000)) v1 = Int16FromInt32(0) (*Ttimeb)(unsafe.Pointer(tp)).Fdstflag = v1 (*Ttimeb)(unsafe.Pointer(tp)).Ftimezone = v1 @@ -150369,7 +150367,7 @@ func Xnanosleep(tls *TLS, req uintptr, rem uintptr) (r int32) { trc("tls=%v req=%v rem=%v, (%v:)", tls, req, rem, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem))) + return X__syscall_ret(tls, Uint32FromInt32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem))) } func _is_leap(tls *TLS, y int32) (r int32) { @@ -150384,10 +150382,10 @@ func _is_leap(tls *TLS, y int32) (r int32) { func _week_num(tls *TLS, tm uintptr) (r int32) { var dec31, jan1, val int32 _, _, _ = dec31, jan1, val - val = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) /* If 1 Jan is just 1-3 days past Monday, * the previous week is also in this year. */ - if (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { + if (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { val++ } if !(val != 0) { @@ -150395,7 +150393,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 31 December of prev year a Thursday, * or Friday of a leap year, then the * prev year has 53 weeks. */ - dec31 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) + dec31 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) if dec31 == int32(4) || dec31 == int32(5) && _is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year%int32(400)-int32(1)) != 0 { val++ } @@ -150404,7 +150402,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 1 January is not a Thursday, and not * a Wednesday of a leap year, then this * year has only 52 weeks. */ - jan1 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) + jan1 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) if jan1 != int32(4) && (jan1 != int32(3) || !(_is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year) != 0)) { val = int32(1) } @@ -150430,13 +150428,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc def_pad = int32('0') switch f { case int32('a'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(ABDAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday goto nl_strcat case int32('A'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(DAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday @@ -150444,13 +150442,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('h'): fallthrough case int32('b'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(ABMON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon goto nl_strcat case int32('B'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(MON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon @@ -150585,10 +150583,10 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc width = int32(1) goto number case int32('U'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) goto number case int32('W'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) goto number case int32('V'): val = int64(_week_num(tls, tm)) @@ -150612,7 +150610,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('Y'): val = int64((*Ttm)(unsafe.Pointer(tm)).Ftm_year) + int64(1900) if val >= int64(10000) { - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1674, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1674, VaList(bp+8, val))) return s } width = int32(4) @@ -150622,7 +150620,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc *(*Tsize_t)(unsafe.Pointer(l)) = uint32(0) return __ccgo_ts } - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1680, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int32(3600)*int32(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int32(3600)/int32(60)))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1680, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int32(3600)*int32(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int32(3600)/int32(60)))) return s case int32('Z'): if (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst < 0 { @@ -150647,13 +150645,13 @@ number: } switch v7 { case int32('-'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1687, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1687, VaList(bp+8, val))) case int32('_'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1692, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1692, VaList(bp+8, width, val))) case int32('0'): fallthrough default: - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1698, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1698, VaList(bp+8, width, val))) break } return s @@ -150723,7 +150721,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl if v4 != 0 { f++ } - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { width = Xstrtoul(tls, f, bp+104, int32(10)) } else { width = uint32(0) @@ -150753,7 +150751,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl *(*Tsize_t)(unsafe.Pointer(bp))-- } for { - if !(int32(*(*int8)(unsafe.Pointer(t))) == int32('0') && uint32(int32(*(*int8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { + if !(int32(*(*int8)(unsafe.Pointer(t))) == int32('0') && Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { break } goto _5 @@ -150767,7 +150765,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } d = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { break } goto _6 @@ -150788,7 +150786,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl v8 = int32(5) } } - if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= uint32(v8) { + if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= Uint32FromInt32(v8) { v10 = l l++ *(*int8)(unsafe.Pointer(s + uintptr(v10))) = int8('+') @@ -150865,14 +150863,14 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { for *(*int8)(unsafe.Pointer(f)) != 0 { if int32(*(*int8)(unsafe.Pointer(f))) != int32('%') { v1 = int32(*(*int8)(unsafe.Pointer(f))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if v2 != 0 { for { if v8 = *(*int8)(unsafe.Pointer(s)) != 0; v8 { v5 = int32(*(*int8)(unsafe.Pointer(s))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: } @@ -150898,8 +150896,8 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { if int32(*(*int8)(unsafe.Pointer(f))) == int32('+') { f++ } - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { - w = int32(Xstrtoul(tls, f, bp+12, int32(10))) + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { + w = Int32FromUint32(Xstrtoul(tls, f, bp+12, int32(10))) f = *(*uintptr)(unsafe.Pointer(bp + 12)) } else { w = -int32(1) @@ -151060,7 +151058,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; if v48 = *(*int8)(unsafe.Pointer(s)) != 0; v48 { v45 = int32(*(*int8)(unsafe.Pointer(s))) - v46 = BoolInt32(v45 == int32(' ') || uint32(v45)-uint32('\t') < uint32(5)) + v46 = BoolInt32(v45 == int32(' ') || Uint32FromInt32(v45)-uint32('\t') < uint32(5)) goto _47 _47: } @@ -151179,13 +151177,13 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { goto numeric_range numeric_range: ; - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) = 0 i = int32(1) for { - if !(i <= min+range1 && BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { + if !(i <= min+range1 && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { break } v51 = s @@ -151196,12 +151194,12 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; i *= int32(10) } - if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(range1) { + if Uint32FromInt32(*(*int32)(unsafe.Pointer(dest))-min) >= Uint32FromInt32(range1) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) -= adj switch int32(dest) - int32(tm) { - case int32(uint32(UintptrFromInt32(0) + 28)): + case Int32FromUint32(uint32(UintptrFromInt32(0) + 28)): } goto update goto numeric_digits @@ -151216,14 +151214,14 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { s++ } } - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return uintptr(0) } v53 = Int32FromInt32(0) i = v53 *(*int32)(unsafe.Pointer(dest)) = v53 for { - if !(i < w && BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { + if !(i < w && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { break } v54 = s @@ -151345,9 +151343,9 @@ func Xtimer_getoverrun(tls *TLS, t Ttimer_t) (r int32) { _ = td if int32(t) < 0 { td = uintptr(uint32(t) << Int32FromInt32(1)) - t = uintptr(uint32(AtomicLoadPInt32(td+92) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint32FromInt32(AtomicLoadPInt32(td+92) & Int32FromInt32(INT_MAX))) } - return X__syscall_ret(tls, uint32(X__syscall1(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(3), int32(t)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(3), int32(t)))) } func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r1 int32) { @@ -151363,14 +151361,14 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r1 int32) { _, _ = r, td if int32(t) < 0 { td = uintptr(uint32(t) << Int32FromInt32(1)) - t = uintptr(uint32(AtomicLoadPInt32(td+92) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint32FromInt32(AtomicLoadPInt32(td+92) & Int32FromInt32(INT_MAX))) } r = -int32(ENOSYS) if uint32(8) > uint32(4) { r = X__syscall2(tls, int32(SYS_timer_gettime64), int32(t), int32(val)) } if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(2) == int32(SYS_timer_gettime64)) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } r = X__syscall2(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(2), int32(t), int32(bp)) if !(r != 0) { @@ -151379,8 +151377,8 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r1 int32) { (*Titimerspec)(unsafe.Pointer(val)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(2)]) (*Titimerspec)(unsafe.Pointer(val)).Fit_value.Ftv_nsec = (*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)] } - return X__syscall_ret(tls, uint32(r)) - return X__syscall_ret(tls, uint32(X__syscall2(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(2), int32(t), int32(val)))) + return X__syscall_ret(tls, Uint32FromInt32(r)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(2), int32(t), int32(val)))) } func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (r1 int32) { @@ -151397,14 +151395,14 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) _, _, _, _, _, _ = ins, is, r, td, vns, vs if int32(t) < 0 { td = uintptr(uint32(t) << Int32FromInt32(1)) - t = uintptr(uint32(AtomicLoadPInt32(td+92) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint32FromInt32(AtomicLoadPInt32(td+92) & Int32FromInt32(INT_MAX))) } is = (*Titimerspec)(unsafe.Pointer(val)).Fit_interval.Ftv_sec vs = (*Titimerspec)(unsafe.Pointer(val)).Fit_value.Ftv_sec ins = (*Titimerspec)(unsafe.Pointer(val)).Fit_interval.Ftv_nsec vns = (*Titimerspec)(unsafe.Pointer(val)).Fit_value.Ftv_nsec r = -int32(ENOSYS) - if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(1) == int32(SYS_timer_settime64)) || !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || Bool(uint32(8) > uint32(4)) && old != 0 { + if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(1) == int32(SYS_timer_settime64)) || !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || Bool(uint32(8) > uint32(4)) && old != 0 { *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, 1: int64(ins), @@ -151414,10 +151412,10 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) r = X__syscall4(tls, int32(SYS_timer_settime64), int32(t), flags, int32(bp), int32(old)) } if Bool(Int32FromInt32(__NR_timer_create)+Int32FromInt32(1) == int32(SYS_timer_settime64)) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } *(*[4]int32)(unsafe.Pointer(bp + 32)) = [4]int32{ 0: int32(is), @@ -151432,8 +151430,8 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (*Titimerspec)(unsafe.Pointer(old)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(2)]) (*Titimerspec)(unsafe.Pointer(old)).Fit_value.Ftv_nsec = (*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(3)] } - return X__syscall_ret(tls, uint32(r)) - return X__syscall_ret(tls, uint32(X__syscall4(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(1), int32(t), flags, int32(val), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(r)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, Int32FromInt32(__NR_timer_create)+Int32FromInt32(1), int32(t), flags, int32(val), int32(old)))) } type Ttms = struct { @@ -151564,7 +151562,7 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl break } *(*Tsize_t)(unsafe.Pointer(bp)) = Xmbstowcs(tls, bp+104, t_mb, Uint32FromInt64(400)/Uint32FromInt64(4)) - if *(*Tsize_t)(unsafe.Pointer(bp)) == uint32(-Int32FromInt32(1)) { + if *(*Tsize_t)(unsafe.Pointer(bp)) == Uint32FromInt32(-Int32FromInt32(1)) { return uint32(0) } t = bp + 104 @@ -151653,7 +151651,7 @@ func Xaccess(tls *TLS, filename uintptr, amode int32) (r int32) { trc("tls=%v filename=%v amode=%v, (%v:)", tls, filename, amode, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_access), int32(filename), amode))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_access), int32(filename), amode))) } func Xacct(tls *TLS, filename uintptr) (r int32) { @@ -151661,7 +151659,7 @@ func Xacct(tls *TLS, filename uintptr) (r int32) { trc("tls=%v filename=%v, (%v:)", tls, filename, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_acct), int32(filename)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_acct), int32(filename)))) } func Xalarm(tls *TLS, seconds uint32) (r uint32) { @@ -151675,12 +151673,12 @@ func Xalarm(tls *TLS, seconds uint32) (r uint32) { var _ /* old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_value: Ttimeval{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), }, } *(*Titimerval)(unsafe.Pointer(bp + 32)) = Titimerval{} Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) } func Xchdir(tls *TLS, path uintptr) (r int32) { @@ -151688,7 +151686,7 @@ func Xchdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_chdir), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_chdir), int32(path)))) } func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { @@ -151696,7 +151694,7 @@ func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_chown32), int32(path), int32(uid), int32(gid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_chown32), int32(path), Int32FromUint32(uid), Int32FromUint32(gid)))) } func _dummy12(tls *TLS, fd int32) (r int32) { @@ -151715,7 +151713,7 @@ func Xclose(tls *TLS, fd int32) (r1 int32) { if r == -int32(EINTR) { r = 0 } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xctermid(tls *TLS, s uintptr) (r uintptr) { @@ -151738,7 +151736,7 @@ func Xdup(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_dup), fd))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_dup), fd))) } func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { @@ -151755,7 +151753,7 @@ func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { break } } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { @@ -151766,7 +151764,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { var r, v1, v2 int32 _, _, _ = r, v1, v2 if old == new1 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } if flags != 0 { for { @@ -151777,10 +151775,10 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { } } if r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } if flags & ^Int32FromInt32(O_CLOEXEC) != 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } } for { @@ -151793,7 +151791,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { if r >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int32(SYS_fcntl64), new1, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xdup3(tls *TLS, old int32, new1 int32, flags int32) (r int32) { @@ -151822,7 +151820,7 @@ func _checker(tls *TLS, p uintptr) (r int32) { X__syscall1(tls, int32(SYS_exit), Int32FromInt32(1)) } *(*int32)(unsafe.Pointer(bp)) = X__syscall4(tls, int32(SYS_faccessat), (*Tctx1)(unsafe.Pointer(c)).Ffd, int32((*Tctx1)(unsafe.Pointer(c)).Ffilename), (*Tctx1)(unsafe.Pointer(c)).Famode, Int32FromInt32(0)) - X__syscall3(tls, int32(SYS_write), (*Tctx1)(unsafe.Pointer(c)).Fp, int32(bp), int32(Uint32FromInt64(4))) + X__syscall3(tls, int32(SYS_write), (*Tctx1)(unsafe.Pointer(c)).Fp, int32(bp), Int32FromUint32(Uint32FromInt64(4))) return 0 } @@ -151836,13 +151834,13 @@ func Xfaccessat(tls *TLS, fd int32, filename uintptr, amode int32, flag int32) ( if flag != 0 { ret = X__syscall4(tls, int32(SYS_faccessat2), fd, int32(filename), amode, flag) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } } if flag & ^Int32FromInt32(AT_EACCESS) != 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_faccessat), fd, int32(filename), amode))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_faccessat), fd, int32(filename), amode))) } func Xfchdir(tls *TLS, fd int32) (r int32) { @@ -151857,10 +151855,10 @@ func Xfchdir(tls *TLS, fd int32) (r int32) { _ = ret ret = X__syscall1(tls, int32(SYS_fchdir), fd) if ret != -int32(EBADF) || X__syscall2(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_GETFD)) < 0 { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } - X__procfdname(tls, bp, uint32(fd)) - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_chdir), int32(bp)))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_chdir), int32(bp)))) } func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { @@ -151873,12 +151871,12 @@ func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]int8 _ = ret - ret = X__syscall3(tls, int32(SYS_fchown32), fd, int32(uid), int32(gid)) + ret = X__syscall3(tls, int32(SYS_fchown32), fd, Int32FromUint32(uid), Int32FromUint32(gid)) if ret != -int32(EBADF) || X__syscall2(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_GETFD)) < 0 { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } - X__procfdname(tls, bp, uint32(fd)) - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_chown32), int32(bp), int32(uid), int32(gid)))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_chown32), int32(bp), Int32FromUint32(uid), Int32FromUint32(gid)))) } func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag int32) (r int32) { @@ -151886,7 +151884,7 @@ func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag in trc("tls=%v fd=%v path=%v uid=%v gid=%v flag=%v, (%v:)", tls, fd, path, uid, gid, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_fchownat), fd, int32(path), int32(uid), int32(gid), flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_fchownat), fd, int32(path), Int32FromUint32(uid), Int32FromUint32(gid), flag))) } func Xfdatasync(tls *TLS, fd int32) (r int32) { @@ -151894,7 +151892,7 @@ func Xfdatasync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_fdatasync), fd, 0, 0, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_fdatasync), fd, 0, 0, 0, 0, 0))) } func Xfsync(tls *TLS, fd int32) (r int32) { @@ -151902,7 +151900,7 @@ func Xfsync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_fsync), fd, 0, 0, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_fsync), fd, 0, 0, 0, 0, 0))) } func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { @@ -151910,7 +151908,7 @@ func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { trc("tls=%v fd=%v length=%v, (%v:)", tls, fd, length, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_ftruncate64), fd, int32(length)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_ftruncate64), fd, int32(length)))) } func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { @@ -151928,7 +151926,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { } else { v2 = int32(PATH_MAX) } - v1 = uint32(v2) + v1 = Uint32FromInt32(v2) tmp = Xrealloc(tls, tmp, v1) if !(buf != 0) { buf = tmp @@ -151939,7 +151937,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { return uintptr(0) } } - ret = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_getcwd), int32(buf), int32(size)))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_getcwd), int32(buf), Int32FromUint32(size)))) if ret < 0 { return uintptr(0) } @@ -151960,7 +151958,7 @@ func Xgetegid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int32(SYS_getegid32))) + return Uint32FromInt32(X__syscall0(tls, int32(SYS_getegid32))) } func Xgeteuid(tls *TLS) (r Tuid_t) { @@ -151968,7 +151966,7 @@ func Xgeteuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int32(SYS_geteuid32))) + return Uint32FromInt32(X__syscall0(tls, int32(SYS_geteuid32))) } func Xgetgid(tls *TLS) (r Tgid_t) { @@ -151976,7 +151974,7 @@ func Xgetgid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int32(SYS_getgid32))) + return Uint32FromInt32(X__syscall0(tls, int32(SYS_getgid32))) } func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { @@ -151984,7 +151982,7 @@ func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { trc("tls=%v count=%v list=%v, (%v:)", tls, count, list, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_getgroups32), count, int32(list)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_getgroups32), count, int32(list)))) } func Xgethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -152056,7 +152054,7 @@ func Xgetpgid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_getpgid), pid))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_getpgid), pid))) } func Xgetpgrp(tls *TLS) (r Tpid_t) { @@ -152088,7 +152086,7 @@ func Xgetsid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_getsid), pid))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_getsid), pid))) } func Xgetuid(tls *TLS) (r Tuid_t) { @@ -152096,7 +152094,7 @@ func Xgetuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int32(SYS_getuid32))) + return Uint32FromInt32(X__syscall0(tls, int32(SYS_getuid32))) } func Xisatty(tls *TLS, fd int32) (r1 int32) { @@ -152109,7 +152107,7 @@ func Xisatty(tls *TLS, fd int32) (r1 int32) { var r uint32 var _ /* wsz at bp+0 */ Twinsize _ = r - r = uint32(X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCGWINSZ), int32(bp))))) + r = Uint32FromInt32(X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCGWINSZ), int32(bp))))) if r == uint32(0) { return int32(1) } @@ -152124,7 +152122,7 @@ func Xlchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_lchown32), int32(path), int32(uid), int32(gid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_lchown32), int32(path), Int32FromUint32(uid), Int32FromUint32(gid)))) } func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { @@ -152132,7 +152130,7 @@ func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_link), int32(existing), int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_link), int32(existing), int32(new1)))) } func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, flag int32) (r int32) { @@ -152140,7 +152138,7 @@ func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, fla trc("tls=%v fd1=%v existing=%v fd2=%v new1=%v flag=%v, (%v:)", tls, fd1, existing, fd2, new1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_linkat), fd1, int32(existing), fd2, int32(new1), flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_linkat), fd1, int32(existing), fd2, int32(new1), flag))) } func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -152153,7 +152151,7 @@ func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { var v1 int64 var _ /* result at bp+0 */ Toff_t _ = v1 - if X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS__llseek), fd, int32(offset>>Int32FromInt32(32)), int32(offset), int32(bp), whence))) != 0 { + if X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS__llseek), fd, int32(offset>>Int32FromInt32(32)), int32(offset), int32(bp), whence))) != 0 { v1 = int64(-int32(1)) } else { v1 = *(*Toff_t)(unsafe.Pointer(bp)) @@ -152204,7 +152202,7 @@ func Xpause(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pause), 0, 0, 0, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pause), 0, 0, 0, 0, 0, 0))) } func Xpipe(tls *TLS, fd uintptr) (r int32) { @@ -152212,7 +152210,7 @@ func Xpipe(tls *TLS, fd uintptr) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_pipe), int32(fd)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_pipe), int32(fd)))) } func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { @@ -152227,10 +152225,10 @@ func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { } ret = X__syscall2(tls, int32(SYS_pipe2), int32(fd), flag) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } if flag & ^(Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)) != 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } ret = Xpipe(tls, fd) if ret != 0 { @@ -152255,28 +152253,12 @@ func Xposix_close(tls *TLS, fd int32, flags int32) (r int32) { return Xclose(tls, fd) } -func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { - if __ccgo_strace { - trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) - defer func() { trc("-> %v", r) }() - } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pread64), fd, int32(buf), int32(size), int32(ofs), 0, 0))) -} - func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { if __ccgo_strace { trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_preadv), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) -} - -func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { - if __ccgo_strace { - trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) - defer func() { trc("-> %v", r) }() - } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pwrite64), fd, int32(buf), int32(size), int32(ofs), 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_preadv), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) } func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -152284,7 +152266,7 @@ func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pwritev), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pwritev), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) } func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { @@ -152292,7 +152274,7 @@ func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_read), fd, int32(buf), int32(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_read), fd, int32(buf), Int32FromUint32(count), 0, 0, 0))) } func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -152309,11 +152291,11 @@ func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_ buf = bp bufsize = uint32(1) } - r = X__syscall3(tls, int32(SYS_readlink), int32(path), int32(buf), int32(bufsize)) + r = X__syscall3(tls, int32(SYS_readlink), int32(path), int32(buf), Int32FromUint32(bufsize)) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -152330,11 +152312,11 @@ func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) buf = bp bufsize = uint32(1) } - r = X__syscall4(tls, int32(SYS_readlinkat), fd, int32(path), int32(buf), int32(bufsize)) + r = X__syscall4(tls, int32(SYS_readlinkat), fd, int32(path), int32(buf), Int32FromUint32(bufsize)) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -152342,7 +152324,7 @@ func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_readv), fd, int32(iov), count, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_readv), fd, int32(iov), count, 0, 0, 0))) } func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r int32) { @@ -152350,7 +152332,7 @@ func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r trc("tls=%v oldfd=%v old=%v newfd=%v new1=%v, (%v:)", tls, oldfd, old, newfd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_renameat), oldfd, int32(old), newfd, int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_renameat), oldfd, int32(old), newfd, int32(new1)))) } func Xrmdir(tls *TLS, path uintptr) (r int32) { @@ -152358,7 +152340,7 @@ func Xrmdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_rmdir), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_rmdir), int32(path)))) } func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { @@ -152366,7 +152348,7 @@ func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setgid32), int32(gid), 0, 0) + return X__setxid(tls, int32(SYS_setgid32), Int32FromUint32(gid), 0, 0) } func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { @@ -152374,7 +152356,7 @@ func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { trc("tls=%v pid=%v pgid=%v, (%v:)", tls, pid, pgid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_setpgid), pid, pgid))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_setpgid), pid, pgid))) } func Xsetpgrp(tls *TLS) (r Tpid_t) { @@ -152390,7 +152372,7 @@ func Xsetsid(tls *TLS) (r Tpid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall0(tls, int32(SYS_setsid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall0(tls, int32(SYS_setsid)))) } func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { @@ -152398,7 +152380,7 @@ func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setuid32), int32(uid), 0, 0) + return X__setxid(tls, int32(SYS_setuid32), Int32FromUint32(uid), 0, 0) } type Tctx2 = struct { @@ -152454,7 +152436,7 @@ func X__setxid(tls *TLS, nr int32, id int32, eid int32, sid int32) (r int32) { } else { v1 = (*(*Tctx2)(unsafe.Pointer(bp))).Fret } - return X__syscall_ret(tls, uint32(v1)) + return X__syscall_ret(tls, Uint32FromInt32(v1)) } func Xsleep(tls *TLS, seconds uint32) (r uint32) { @@ -152466,10 +152448,10 @@ func Xsleep(tls *TLS, seconds uint32) (r uint32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), } if Xnanosleep(tls, bp, bp) != 0 { - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) } return uint32(0) } @@ -152479,7 +152461,7 @@ func Xsymlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_symlink), int32(existing), int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_symlink), int32(existing), int32(new1)))) } func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { @@ -152487,7 +152469,7 @@ func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { trc("tls=%v existing=%v fd=%v new1=%v, (%v:)", tls, existing, fd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_symlinkat), int32(existing), fd, int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_symlinkat), int32(existing), fd, int32(new1)))) } func Xsync(tls *TLS) { @@ -152528,7 +152510,7 @@ func Xtruncate(tls *TLS, path uintptr, length Toff_t) (r int32) { trc("tls=%v path=%v length=%v, (%v:)", tls, path, length, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_truncate64), int32(path), int32(length)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_truncate64), int32(path), int32(length)))) } /* Support signed or unsigned plain-char */ @@ -152573,12 +152555,12 @@ func Xttyname_r(tls *TLS, fd int32, name uintptr, size Tsize_t) (r int32) { if !(Xisatty(tls, fd) != 0) { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } - X__procfdname(tls, bp+288, uint32(fd)) + X__procfdname(tls, bp+288, Uint32FromInt32(fd)) l = Xreadlink(tls, bp+288, name, size) if l < 0 { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } else { - if uint32(l) == size { + if Uint32FromInt32(l) == size { return int32(ERANGE) } } @@ -152603,14 +152585,14 @@ func Xualarm(tls *TLS, value uint32, interval uint32) (r uint32) { var _ /* it_old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_interval: Ttimeval{ - Ftv_usec: int64(interval), + Ftv_usec: Int64FromUint32(interval), }, Fit_value: Ttimeval{ - Ftv_usec: int64(value), + Ftv_usec: Int64FromUint32(value), }, } Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) } func Xunlink(tls *TLS, path uintptr) (r int32) { @@ -152618,7 +152600,7 @@ func Xunlink(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_unlink), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_unlink), int32(path)))) } func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { @@ -152626,7 +152608,7 @@ func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { trc("tls=%v fd=%v path=%v flag=%v, (%v:)", tls, fd, path, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_unlinkat), fd, int32(path), flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_unlinkat), fd, int32(path), flag))) } func Xusleep(tls *TLS, useconds uint32) (r int32) { @@ -152638,8 +152620,8 @@ func Xusleep(tls *TLS, useconds uint32) (r int32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(useconds / uint32(1000000)), - Ftv_nsec: int32(useconds % uint32(1000000) * uint32(1000)), + Ftv_sec: Int64FromUint32(useconds / uint32(1000000)), + Ftv_nsec: Int32FromUint32(useconds % uint32(1000000) * uint32(1000)), } return Xnanosleep(tls, bp, bp) } @@ -152649,7 +152631,7 @@ func Xwrite(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_write), fd, int32(buf), int32(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_write), fd, int32(buf), Int32FromUint32(count), 0, 0, 0))) } func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -152657,7 +152639,7 @@ func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_writev), fd, int32(iov), count, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_writev), fd, int32(iov), count, 0, 0, 0))) } type Ttime32_t = int32 @@ -154240,22 +154222,22 @@ var X__fsmu8 = [51]Tuint32_t{ 11: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x0), 31: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x1), 32: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x2), @@ -156940,7 +156922,7 @@ var Xsigngam int32 var X__stack_chk_guard Tuintptr_t var X__stderr_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf5)) + uintptr(UNGET), Ffd: int32(2), Flock: -int32(1), @@ -156950,7 +156932,7 @@ var X__stderr_FILE = TFILE{ var X__stderr_used = uintptr(unsafe.Pointer(&X__stderr_FILE)) var X__stdin_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), Fbuf: uintptr(unsafe.Pointer(&_buf6)) + uintptr(UNGET), Fbuf_size: Uint32FromInt64(1032) - Uint32FromInt32(UNGET), Flock: -int32(1), @@ -156961,7 +156943,7 @@ var X__stdin_used = uintptr(unsafe.Pointer(&X__stdin_FILE)) var X__stdio_ofl_lockptr = uintptr(unsafe.Pointer(&_ofl_lock)) var X__stdout_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf7)) + uintptr(UNGET), Fbuf_size: Uint32FromInt64(1032) - Uint32FromInt32(UNGET), Ffd: int32(1), diff --git a/vendor/modernc.org/libc/ccgo_linux_amd64.go b/vendor/modernc.org/libc/ccgo_linux_amd64.go index e709f63a..2faf0988 100644 --- a/vendor/modernc.org/libc/ccgo_linux_amd64.go +++ b/vendor/modernc.org/libc/ccgo_linux_amd64.go @@ -9,10 +9,8 @@ import ( "unsafe" ) -var ( - _ reflect.Type - _ unsafe.Pointer -) +var _ reflect.Type +var _ unsafe.Pointer const BIG_ENDIAN = 4321 const BYTE_ORDER = 1234 @@ -576,8 +574,8 @@ func ___frexp_exp(tls *TLS, x float64, expt uintptr) (r float64) { */ exp_x = Xexp(tls, x-_kln2) hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&exp_x)) >> int32(32)) - *(*int32)(unsafe.Pointer(expt)) = int32(hx>>Int32FromInt32(20) - uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) - v1 = uint64(hx&Uint32FromInt32(0xfffff)|uint32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(20) - Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) + v1 = uint64(hx&Uint32FromInt32(0xfffff)|Uint32FromInt32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) - v1 = hx&uint32(0x7fffff) | uint32((Int32FromInt32(0x7f)+Int32FromInt32(127))<>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) + v1 = hx&uint32(0x7fffff) | Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(127))<> Int32FromInt32(63)) + zineg = Int32FromUint64(v1 >> Int32FromInt32(63)) z = Xcacos(tls, z) if zineg != 0 { v3 = [2]float64{ @@ -804,7 +802,7 @@ func Xcacoshf(tls *TLS, z complex64) (r complex64) { v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: - zineg = int32(v1 >> Int32FromInt32(31)) + zineg = Int32FromUint32(v1 >> Int32FromInt32(31)) z = Xcacosf(tls, z) if zineg != 0 { v3 = [2]float32{ @@ -1185,11 +1183,11 @@ func Xccosh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -1346,8 +1344,8 @@ func Xccoshf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -1941,11 +1939,11 @@ func Xcsinh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -2103,8 +2101,8 @@ func Xcsinhf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -2299,7 +2297,7 @@ _9: v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v12 = [2]float64{ 0: Xfabs(tls, b-b), 1: Xcopysign(tls, a, b), @@ -2419,7 +2417,7 @@ _9: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v12 = [2]float32{ 0: Xfabsf(tls, b-b), 1: Xcopysignf(tls, a, b), @@ -3181,14 +3179,14 @@ func Xconfstr(tls *TLS, name int32, buf uintptr, len1 Tsize_t) (r Tsize_t) { if !(name != 0) { s = __ccgo_ts + 1 } else { - if uint32(name) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { + if Uint32FromInt32(name) & ^Uint32FromUint32(4) != uint32(1) && Uint32FromInt32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uint64(0) } } // snprintf is overkill but avoid wasting code size to implement // this completely useless function and its truncation semantics - return uint64(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) + return Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) } const ARG_MAX = 131072 @@ -3308,7 +3306,7 @@ func Xfpathconf(tls *TLS, fd int32, name int32) (r int64) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { + if Uint64FromInt32(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -7457,7 +7455,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { var _ /* set at bp+16 */ [128]uint8 var _ /* si at bp+144 */ Tsysinfo _, _, _, _, _, _, _, _ = cnt, i, mem, val, v1, v3, v6, p5 - if uint64(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { + if Uint64FromInt32(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } else { @@ -7474,11 +7472,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v1 = (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur } - return int64(v1) + return Int64FromUint64(v1) } } } - switch int32(uint8(_values1[name])) { + switch Int32FromUint8(Uint8FromInt16(_values1[name])) { case (-Int32FromInt32(256) | Int32FromInt32(1)) & Int32FromInt32(255): return int64(200809) case (-Int32FromInt32(256) | Int32FromInt32(2)) & Int32FromInt32(255): @@ -7497,12 +7495,12 @@ func Xsysconf(tls *TLS, name int32) (r int64) { *(*[128]uint8)(unsafe.Pointer(bp + 16)) = [128]uint8{ 0: uint8(1), } - X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), int64(Uint64FromInt64(128)), int64(bp+16)) + X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), Int64FromUint64(Uint64FromInt64(128)), int64(bp+16)) v3 = Int32FromInt32(0) cnt = v3 i = v3 for { - if !(uint64(i) < uint64(128)) { + if !(Uint64FromInt32(i) < uint64(128)) { break } for { @@ -7513,7 +7511,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { _4: ; p5 = bp + 16 + uintptr(i) - *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (int32((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (Int32FromUint8((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) cnt++ } goto _2 @@ -7541,11 +7539,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v6 = mem } - return int64(v6) + return Int64FromUint64(v6) case (-Int32FromInt32(256) | Int32FromInt32(12)) & Int32FromInt32(255): fallthrough case (-Int32FromInt32(256) | Int32FromInt32(13)) & Int32FromInt32(255): - val = int64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) + val = Int64FromUint64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) if val < int64(MINSIGSTKSZ) { val = int64(MINSIGSTKSZ) } @@ -9175,14 +9173,14 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags * Prefix "$2x$": bug = 1, safety = 0 * Prefix "$2y$": bug = 0, safety = 0 */ - bug = uint32(int32(flags) & int32(1)) + bug = Uint32FromInt32(Int32FromUint8(flags) & int32(1)) safety = uint32(flags) & uint32(2) << int32(15) v1 = Uint32FromInt32(0) diff = v1 sign = v1 i = uint32(0) for { - if !(i < uint32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { + if !(i < Uint32FromInt32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { break } v3 = Uint32FromInt32(0) @@ -9194,9 +9192,9 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags break } *(*TBF_word)(unsafe.Pointer(bp)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(uint8(*(*int8)(unsafe.Pointer(ptr)))) /* correct */ + *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(Uint8FromInt8(*(*int8)(unsafe.Pointer(ptr)))) /* correct */ *(*TBF_word)(unsafe.Pointer(bp + 1*4)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(*(*int8)(unsafe.Pointer(ptr))) /* bug */ + *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= Uint32FromInt8(*(*int8)(unsafe.Pointer(ptr))) /* bug */ /* * Sign extension in the first char has no effect - nothing to overwrite yet, * and those extra 24 bits will be fully shifted out of the 32-bit word. For @@ -9276,7 +9274,7 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w } } _, _, _, _, _, _, _, _, _, _, _, _, _ = L, L1, R, count, done, i, ptr, tmp1, tmp2, tmp3, tmp4, v1, v6 - if int32(*(*int8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*int8)(unsafe.Pointer(setting + 1))) != int32('2') || uint32(int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*int8)(unsafe.Pointer(setting + 3))) != int32('$') || uint32(int32(*(*int8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || uint32(int32(*(*int8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*int8)(unsafe.Pointer(setting + 6))) != int32('$') { + if int32(*(*int8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*int8)(unsafe.Pointer(setting + 1))) != int32('2') || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*int8)(unsafe.Pointer(setting + 3))) != int32('$') || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*int8)(unsafe.Pointer(setting + 6))) != int32('$') { return UintptrFromInt32(0) } count = Uint32FromInt32(1) << ((int32(*(*int8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (int32(*(*int8)(unsafe.Pointer(setting + 5))) - int32('0'))) @@ -9376,8 +9374,8 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w ; i += int32(2) } - Xmemcpy(tls, output, setting, uint64(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) - *(*int8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = int8(_BF_itoa64[int32(_BF_atoi64[int32(*(*int8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)]) + Xmemcpy(tls, output, setting, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) + *(*int8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = Int8FromUint8(_BF_itoa64[Int32FromUint8(_BF_atoi64[int32(*(*int8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)]) /* This has to be bug-compatible with the original implementation, so * only encode 23 of the 24 bytes. :-) */ _BF_swap(tls, bp+4240, int32(6)) @@ -9448,7 +9446,7 @@ func X__crypt_blowfish(tls *TLS, key uintptr, setting uintptr, output uintptr) ( Xmemset(tls, bp+30, int32(0x55), uint64(63)) *(*int8)(unsafe.Pointer(bp + 30 + uintptr(Uint64FromInt64(63)-Uint64FromInt32(1)))) = 0 p = _BF_crypt(tls, test_key, bp, bp+30, uint32(1)) - ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, uint64(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, uint64(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) + ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, Uint64FromInt32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) k = __ccgo_ts + 58 _BF_set_key(tls, k, bp+96, bp+168, uint8(2)) /* $2a$ */ _BF_set_key(tls, k, bp+240, bp+312, uint8(4)) /* $2y$ */ @@ -11258,7 +11256,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { } } retval &= int32(0x3f) - return uint32(retval) + return Uint32FromInt32(retval) } // C documentation @@ -11268,7 +11266,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { // * containing characters that would violate the passwd file format. // */ func _ascii_is_unsafe(tls *TLS, ch uint8) (r int32) { - return BoolInt32(!(ch != 0) || int32(ch) == int32('\n') || int32(ch) == int32(':')) + return BoolInt32(!(ch != 0) || Int32FromUint8(ch) == int32('\n') || Int32FromUint8(ch) == int32(':')) } func _setup_salt(tls *TLS, salt Tuint32_t) (r Tuint32_t) { @@ -11519,13 +11517,13 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin for q <= bp+128+uintptr(Uint64FromInt64(8)-Uint64FromInt32(1)) { v1 = q q++ - *(*uint8)(unsafe.Pointer(v1)) = uint8(int32(*(*uint8)(unsafe.Pointer(key))) << int32(1)) + *(*uint8)(unsafe.Pointer(v1)) = Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(key))) << int32(1)) if *(*uint8)(unsafe.Pointer(key)) != 0 { key++ } } X__des_setkey(tls, bp+128, bp) - if int32(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { /* * "new"-style: * setting - underscore, 4 chars of count, 4 chars of salt @@ -11537,8 +11535,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(5)) { break } - value = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } count |= value << ((i - uint32(1)) * uint32(6)) @@ -11556,8 +11554,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(9)) { break } - value1 = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value1]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value1 = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value1]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } salt |= value1 << ((i - uint32(5)) * uint32(6)) @@ -11581,7 +11579,7 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin p4 = v5 v6 = key key++ - *(*uint8)(unsafe.Pointer(p4)) = uint8(int32(*(*uint8)(unsafe.Pointer(p4))) ^ int32(*(*uint8)(unsafe.Pointer(v6)))< uint32(KEY_MAX) { return uintptr(0) } @@ -12099,7 +12097,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt if !(i < uint32(5)) { break } - p = _to64(tls, p, uint32(int32((*(*[16]uint8)(unsafe.Pointer(bp + 88)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm)) + uintptr(i)*3))])< uint32(KEY_MAX1) { return uintptr(0) } @@ -12524,7 +12522,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui * the host's value of ULONG_MAX. */ salt += uintptr(Uint64FromInt64(8) - Uint64FromInt32(1)) - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(salt)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(salt)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return uintptr(0) } u = Xstrtoul(tls, salt, bp+224, int32(10)) @@ -12604,7 +12602,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha256_init(tls, bp) i = uint32(0) for { - if !(i < uint32(int32(16)+int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { + if !(i < Uint32FromInt32(int32(16)+Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { break } _sha256_update(tls, bp, salt, uint64(slen)) @@ -12651,13 +12649,13 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(10)) { break } - p = _to641(tls, p, uint32(int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm1)) + uintptr(i)*3))])<= 0) { break } - *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= uint32(int32(*(*int8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j + *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j goto _2 _2: ; @@ -13467,7 +13465,7 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } v6 = p p++ - *(*int8)(unsafe.Pointer(v6)) = int8((*(*[2]Tuint32_t)(unsafe.Pointer(bp + 128)))[i] >> j & uint32(1)) + *(*int8)(unsafe.Pointer(v6)) = Int8FromUint32((*(*[2]Tuint32_t)(unsafe.Pointer(bp + 128)))[i] >> j & uint32(1)) goto _5 _5: ; @@ -13481,134 +13479,134 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } var _table = [384]uint16{ - 128: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 129: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 130: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 131: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 132: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 133: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 134: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 135: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 136: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 137: uint16((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 138: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 139: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 140: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 141: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 142: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 143: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 144: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 145: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 146: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 147: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 148: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 149: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 150: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 151: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 152: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 153: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 154: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 155: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 156: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 157: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 158: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 159: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 160: uint16((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 161: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 162: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 163: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 164: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 165: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 166: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 167: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 168: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 169: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 170: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 171: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 172: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 173: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 174: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 175: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 176: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 177: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 178: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 179: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 180: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 181: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 182: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 183: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 184: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 185: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 186: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 187: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 188: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 189: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 190: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 191: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 192: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 193: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 194: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 195: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 196: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 197: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 198: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 199: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 200: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 201: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 202: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 203: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 204: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 205: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 206: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 207: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 208: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 209: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 210: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 211: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 212: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 213: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 214: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 215: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 216: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 217: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 218: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 219: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 220: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 221: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 222: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 223: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 224: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 225: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 226: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 227: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 228: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 229: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 230: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 231: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 232: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 233: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 234: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 235: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 236: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 237: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 238: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 239: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 240: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 241: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 242: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 243: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 244: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 245: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 246: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 247: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 248: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 249: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 250: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 251: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 252: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 253: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 254: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 255: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 128: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 129: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 130: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 131: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 132: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 133: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 134: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 135: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 136: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 137: Uint16FromInt32((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 138: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 139: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 140: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 141: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 142: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 143: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 144: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 145: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 146: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 147: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 148: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 149: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 150: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 151: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 152: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 153: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 154: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 155: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 156: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 157: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 158: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 159: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 160: Uint16FromInt32((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 161: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 162: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 163: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 164: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 165: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 166: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 167: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 168: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 169: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 170: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 171: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 172: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 173: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 174: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 175: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 176: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 177: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 178: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 179: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 180: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 181: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 182: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 183: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 184: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 185: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 186: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 187: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 188: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 189: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 190: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 191: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 192: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 193: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 194: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 195: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 196: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 197: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 198: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 199: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 200: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 201: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 202: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 203: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 204: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 205: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 206: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 207: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 208: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 209: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 210: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 211: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 212: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 213: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 214: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 215: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 216: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 217: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 218: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 219: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 220: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 221: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 222: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 223: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 224: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 225: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 226: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 227: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 228: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 229: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 230: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 231: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 232: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 233: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 234: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 235: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 236: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 237: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 238: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 239: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 240: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 241: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 242: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 243: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 244: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 245: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 246: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 247: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 248: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 249: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 250: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 251: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 252: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 253: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 254: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 255: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), } var _ptable = uintptr(unsafe.Pointer(&_table)) + uintptr(128)*2 @@ -13947,7 +13945,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) { } else { v1 = int32(1) } - return uint64(v1) + return Uint64FromInt32(v1) } var _table1 = [384]Tint32_t{ @@ -14235,7 +14233,7 @@ func Xisalnum(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0) + return BoolInt32(BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0) } func X__isalnum_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14259,7 +14257,7 @@ func Xisalpha(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14315,7 +14313,7 @@ func Xiscntrl(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c) < uint32(0x20) || c == int32(0x7f)) + return BoolInt32(Uint32FromInt32(c) < uint32(0x20) || c == int32(0x7f)) } func X__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14339,7 +14337,7 @@ func Xisdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('0') < uint32(10)) + return BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14363,7 +14361,7 @@ func Xisgraph(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) } func X__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14387,7 +14385,7 @@ func Xislower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14411,7 +14409,7 @@ func Xisprint(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x20) < uint32(0x5f)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14435,7 +14433,7 @@ func Xispunct(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) } func X__ispunct_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14459,7 +14457,7 @@ func Xisspace(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(c == int32(' ') || uint32(c)-uint32('\t') < uint32(5)) + return BoolInt32(c == int32(' ') || Uint32FromInt32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14483,7 +14481,7 @@ func Xisupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('A') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -17376,7 +17374,7 @@ func Xiswalpha(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table3[uint32(int32(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table3[Uint32FromInt32(Int32FromUint8(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } if wc < uint32(0x2fffe) { return int32(1) @@ -17405,7 +17403,7 @@ func Xiswblank(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return Xisblank(tls, int32(wc)) + return Xisblank(tls, Int32FromUint32(wc)) } func X__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32) { @@ -17510,7 +17508,7 @@ func Xwctype(tls *TLS, s uintptr) (r Twctype_t) { break } if int32(*(*int8)(unsafe.Pointer(s))) == int32(*(*int8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { - return uint64(i) + return Uint64FromInt32(i) } goto _1 _1: @@ -17644,10 +17642,10 @@ func Xiswprint(tls *TLS, wc Twint_t) (r int32) { if wc < uint32(0xff) { return BoolInt32((wc+uint32(1))&uint32(0x7f) >= uint32(0x21)) } - if wc < uint32(0x2028) || wc-uint32(0x202a) < uint32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < uint32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { + if wc < uint32(0x2028) || wc-uint32(0x202a) < Uint32FromInt32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < Uint32FromInt32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { return int32(1) } - if wc-uint32(0xfffc) > uint32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { + if wc-uint32(0xfffc) > Uint32FromInt32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { return 0 } return int32(1) @@ -19227,7 +19225,7 @@ func Xiswpunct(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table4[uint32(int32(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table4[Uint32FromInt32(Int32FromUint8(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } return 0 } @@ -19264,7 +19262,7 @@ func Xiswspace(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), int32(wc)) != 0) + return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), Int32FromUint32(wc)) != 0) } var _spaces = [22]Twchar_t{ @@ -19360,7 +19358,7 @@ func Xisxdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0 || Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -19395,7 +19393,7 @@ func Xtolower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('A') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) != 0 { return c | int32(32) } return c @@ -19422,7 +19420,7 @@ func Xtoupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('a') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) != 0 { return c & int32(0x5f) } return c @@ -22228,40 +22226,40 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { var b, rt, try, v, x, xb, xn, y uint32 var c0, r, rd, v1 int32 _, _, _, _, _, _, _, _, _, _, _, _ = b, c0, r, rd, rt, try, v, x, xb, xn, y, v1 - c0 = int32(c) + c0 = Int32FromUint32(c) if c >= uint32(0x20000) { - return int32(c) + return Int32FromUint32(c) } b = c >> int32(8) c &= uint32(255) x = c / uint32(3) y = c % uint32(3) /* lookup entry in two-level base-6 table */ - v = uint32(_tab1[uint32(int32(_tab1[b])*int32(86))+x]) - v = v * uint32(_mt[y]) >> int32(11) % uint32(6) + v = uint32(_tab1[Uint32FromInt32(Int32FromUint8(_tab1[b])*int32(86))+x]) + v = v * Uint32FromInt32(_mt[y]) >> int32(11) % uint32(6) /* use the bit vector out of the tables as an index into * a block-specific set of rules and decode the rule into * a type and a case-mapping delta. */ r = _rules[uint32(_rulebases[b])+v] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) /* rules 0/1 are simple lower/upper case with a delta. * apply according to desired mapping direction. */ if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* binary search. endpoints of the binary search for * this block are stored in the rule delta field. */ - xn = uint32(rd & int32(0xff)) - xb = uint32(rd) >> int32(8) + xn = Uint32FromInt32(rd & int32(0xff)) + xb = Uint32FromInt32(rd) >> int32(8) for xn != 0 { try = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2))) if try == c { r = _rules[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2 + 1))] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* Hard-coded for the four exceptional titlecase */ if dir != 0 { @@ -22293,7 +22291,7 @@ func Xtowlower(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, 0)) + return Uint32FromInt32(_casemap(tls, wc, 0)) } func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { @@ -22301,7 +22299,7 @@ func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, int32(1))) + return Uint32FromInt32(_casemap(tls, wc, int32(1))) } func X__towupper_l(tls *TLS, c Twint_t, l Tlocale_t) (r Twint_t) { @@ -24500,7 +24498,7 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } var v1, v2 int32 _, _ = v1, v2 - if uint32(wc) < uint32(0xff) { + if Uint32FromInt32(wc) < uint32(0xff) { if (wc+int32(1))&int32(0x7f) >= int32(0x21) { v1 = int32(1) } else { @@ -24513,11 +24511,11 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } return v1 } - if uint32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { - if int32(_table5[int32(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Uint32FromInt32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { + if Int32FromUint8(_table5[Int32FromUint8(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return 0 } - if int32(_wtable[int32(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Int32FromUint8(_wtable[Int32FromUint8(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return int32(2) } return int32(1) @@ -24525,10 +24523,10 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { if wc&int32(0xfffe) == int32(0xfffe) { return -int32(1) } - if uint32(wc)-uint32(0x20000) < uint32(0x20000) { + if Uint32FromInt32(wc)-uint32(0x20000) < uint32(0x20000) { return int32(2) } - if wc == int32(0xe0001) || uint32(wc)-uint32(0xe0020) < uint32(0x5f) || uint32(wc)-uint32(0xe0100) < uint32(0xef) { + if wc == int32(0xe0001) || Uint32FromInt32(wc)-uint32(0xe0020) < uint32(0x5f) || Uint32FromInt32(wc)-uint32(0xe0100) < uint32(0xef) { return 0 } return int32(1) @@ -24855,7 +24853,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { var len1 int32 _, _ = de, len1 if (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos >= (*TDIR)(unsafe.Pointer(dir)).Fbuf_end { - len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), int64(Uint64FromInt64(2048)))) + len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), Int64FromUint64(Uint64FromInt64(2048)))) if len1 <= 0 { if len1 < 0 && len1 != -int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = -len1 @@ -24866,7 +24864,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos = 0 } de = dir + 24 + uintptr((*TDIR)(unsafe.Pointer(dir)).Fbuf_pos) - *(*int32)(unsafe.Pointer(dir + 12)) += int32((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) + *(*int32)(unsafe.Pointer(dir + 12)) += Int32FromUint16((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) (*TDIR)(unsafe.Pointer(dir)).Ftell = (*Tdirent)(unsafe.Pointer(de)).Fd_off return de } @@ -24981,7 +24979,7 @@ func Xscandir(tls *TLS, path uintptr, res uintptr, sel uintptr, cmp uintptr) (r Xqsort(tls, names, cnt, uint64(8), cmp) } *(*uintptr)(unsafe.Pointer(res)) = names - return int32(cnt) + return Int32FromUint64(cnt) } func Xseekdir(tls *TLS, dir uintptr, off int64) { @@ -25110,7 +25108,7 @@ func Xgetenv(tls *TLS, name uintptr) (r uintptr) { var e uintptr var l Tsize_t _, _ = e, l - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if l != 0 && !(*(*int8)(unsafe.Pointer(name + uintptr(l))) != 0) && Xenviron != 0 { e = Xenviron for { @@ -25200,7 +25198,7 @@ func Xputenv(tls *TLS, s uintptr) (r int32) { } var l Tsize_t _ = l - l = uint64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) + l = Uint64FromInt64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) if !(l != 0) || !(*(*int8)(unsafe.Pointer(s + uintptr(l))) != 0) { return Xunsetenv(tls, s) } @@ -25289,7 +25287,7 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) (r int32) { var v2 bool _, _, _, _, _ = l1, l2, s, v1, v2 if v2 = !(var1 != 0); !v2 { - v1 = uint64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) + v1 = Uint64FromInt64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) l1 = v1 } if v2 || !(v1 != 0) || *(*int8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { @@ -25321,7 +25319,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { var e, eo, v2 uintptr var l Tsize_t _, _, _, _ = e, eo, l, v2 - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) @@ -25656,7 +25654,7 @@ func X__strerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { } var s uintptr _ = s - if uint64(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { + if Uint64FromInt32(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { e = 0 } s = uintptr(unsafe.Pointer(&_errmsgstr)) + uintptr(_errmsgidx[e]) @@ -25785,7 +25783,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { arg |= uint64(O_LARGEFILE) } if cmd == int32(F_SETLKW) { - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) } if cmd == int32(F_GETOWN) { ret = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETOWN_EX)), int64(bp))) @@ -25793,7 +25791,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))) } if ret != 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*(*Tf_owner_ex)(unsafe.Pointer(bp))).Ftype1 == int32(F_OWNER_PGRP) { v1 = -(*(*Tf_owner_ex)(unsafe.Pointer(bp))).Fpid @@ -25803,25 +25801,25 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return v1 } if cmd == int32(F_DUPFD_CLOEXEC) { - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), Int64FromUint64(arg))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(Int32FromInt32(0)))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall1(tls, int64(SYS_close), int64(ret1)) } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), Int64FromUint64(arg))) if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } switch cmd { case int32(F_SETLK): @@ -25831,9 +25829,9 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { case int32(F_GETOWN_EX): fallthrough case int32(F_SETOWN_EX): - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) default: - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(arg))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), Int64FromUint64(arg))))) } return r } @@ -25853,11 +25851,11 @@ func Xopen(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) { mode = VaUint32(&ap) _ = ap } - fd = int32(___syscall_cp(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0, 0)) + fd = int32(___syscall_cp(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0, 0)) if fd >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(fd))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd))) } func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r int32) { @@ -25874,7 +25872,7 @@ func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r i mode = VaUint32(&ap) _ = ap } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0)))) } func Xposix_fadvise(tls *TLS, fd int32, base Toff_t, len1 Toff_t, advice int32) (r int32) { @@ -26059,7 +26057,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26070,18 +26068,18 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__shgetc(tls, f) } c = v4 - if uint32(c-int32('0')) >= uint32(10) && pok != 0 { + if Uint32FromInt32(c-int32('0')) >= uint32(10) && pok != 0 { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } } } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -26089,7 +26087,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } x = 0 for { - if !(uint32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { break } x = int32(10)*x + c - int32('0') @@ -26100,7 +26098,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v12 = f + 8 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__shgetc(tls, f) } @@ -26108,7 +26106,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } y = int64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { break } y = int64(10)*y + int64(c) - int64('0') @@ -26119,14 +26117,14 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 } for { - if !(uint32(c-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10)) { break } goto _17 @@ -26136,7 +26134,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v20 = f + 8 v19 = *(*uintptr)(unsafe.Pointer(v20)) *(*uintptr)(unsafe.Pointer(v20))++ - v18 = int32(*(*uint8)(unsafe.Pointer(v19))) + v18 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) } else { v18 = X__shgetc(tls, f) } @@ -26189,7 +26187,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } @@ -26201,7 +26199,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v8 = f + 8 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ - v6 = int32(*(*uint8)(unsafe.Pointer(v7))) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v7))) } else { v6 = X__shgetc(tls, f) } @@ -26219,7 +26217,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } @@ -26228,7 +26226,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0] = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || c == int32('.')) { break } if c == int32('.') { @@ -26244,9 +26242,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, lnz = int32(dc) } if j != 0 { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(c) - uint32('0') + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + Uint32FromInt32(c) - uint32('0') } else { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(c - int32('0')) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = Uint32FromInt32(c - int32('0')) } j++ v13 = j @@ -26270,7 +26268,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } @@ -26378,9 +26376,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % uint32(p10) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/uint32(p10) + carry - carry = uint32(int32(1000000000)/p10) * tmp + tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % Uint32FromInt32(p10) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/Uint32FromInt32(p10) + carry + carry = Uint32FromInt32(int32(1000000000)/p10) * tmp if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) rp -= int32(9) @@ -26467,9 +26465,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp2 = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] & uint32(int32(1)<>sh + carry2 - carry2 = uint32(Int32FromInt32(1000000000)>>sh) * tmp2 + carry2 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh) * tmp2 if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) i-- @@ -26602,7 +26600,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26620,7 +26618,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__shgetc(tls, f) } @@ -26632,7 +26630,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26651,7 +26649,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26660,7 +26658,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } } for { - if !(uint32(c-int32('0')) < uint32(10) || uint32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { break } if c == int32('.') { @@ -26677,7 +26675,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 d = c - int32('0') } if dc < int64(8) { - x = x*uint32(16) + uint32(d) + x = x*uint32(16) + Uint32FromInt32(d) } else { if dc < int64(Int32FromInt32(LDBL_MANT_DIG)/Int32FromInt32(4)+Int32FromInt32(1)) { scale /= Float64FromInt32(16) @@ -26698,7 +26696,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v18 = f + 8 v17 = *(*uintptr)(unsafe.Pointer(v18)) *(*uintptr)(unsafe.Pointer(v18))++ - v16 = int32(*(*uint8)(unsafe.Pointer(v17))) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) } else { v16 = X__shgetc(tls, f) } @@ -26818,14 +26816,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -26838,7 +26836,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26854,7 +26852,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26898,7 +26896,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v21 = f + 8 v20 = *(*uintptr)(unsafe.Pointer(v21)) *(*uintptr)(unsafe.Pointer(v21))++ - v19 = int32(*(*uint8)(unsafe.Pointer(v20))) + v19 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v20))) } else { v19 = X__shgetc(tls, f) } @@ -26915,7 +26913,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v24 = f + 8 v23 = *(*uintptr)(unsafe.Pointer(v24)) *(*uintptr)(unsafe.Pointer(v24))++ - v22 = int32(*(*uint8)(unsafe.Pointer(v23))) + v22 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) } else { v22 = X__shgetc(tls, f) } @@ -26931,12 +26929,12 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v29 = f + 8 v28 = *(*uintptr)(unsafe.Pointer(v29)) *(*uintptr)(unsafe.Pointer(v29))++ - v27 = int32(*(*uint8)(unsafe.Pointer(v28))) + v27 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) } else { v27 = X__shgetc(tls, f) } c = v27 - if uint32(c-int32('0')) < uint32(10) || uint32(c-int32('A')) < uint32(26) || uint32(c-int32('a')) < uint32(26) || c == int32('_') { + if Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c-int32('A')) < uint32(26) || Uint32FromInt32(c-int32('a')) < uint32(26) || c == int32('_') { goto _26 } if c == int32(')') { @@ -26981,7 +26979,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v36 = f + 8 v35 = *(*uintptr)(unsafe.Pointer(v36)) *(*uintptr)(unsafe.Pointer(v36))++ - v34 = int32(*(*uint8)(unsafe.Pointer(v35))) + v34 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v35))) } else { v34 = X__shgetc(tls, f) } @@ -27001,55 +26999,55 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { // // /* Lookup table for digit values. -1==255>=36 -> invalid */ var _table6 = [257]uint8{ - 0: uint8(-Int32FromInt32(1)), - 1: uint8(-Int32FromInt32(1)), - 2: uint8(-Int32FromInt32(1)), - 3: uint8(-Int32FromInt32(1)), - 4: uint8(-Int32FromInt32(1)), - 5: uint8(-Int32FromInt32(1)), - 6: uint8(-Int32FromInt32(1)), - 7: uint8(-Int32FromInt32(1)), - 8: uint8(-Int32FromInt32(1)), - 9: uint8(-Int32FromInt32(1)), - 10: uint8(-Int32FromInt32(1)), - 11: uint8(-Int32FromInt32(1)), - 12: uint8(-Int32FromInt32(1)), - 13: uint8(-Int32FromInt32(1)), - 14: uint8(-Int32FromInt32(1)), - 15: uint8(-Int32FromInt32(1)), - 16: uint8(-Int32FromInt32(1)), - 17: uint8(-Int32FromInt32(1)), - 18: uint8(-Int32FromInt32(1)), - 19: uint8(-Int32FromInt32(1)), - 20: uint8(-Int32FromInt32(1)), - 21: uint8(-Int32FromInt32(1)), - 22: uint8(-Int32FromInt32(1)), - 23: uint8(-Int32FromInt32(1)), - 24: uint8(-Int32FromInt32(1)), - 25: uint8(-Int32FromInt32(1)), - 26: uint8(-Int32FromInt32(1)), - 27: uint8(-Int32FromInt32(1)), - 28: uint8(-Int32FromInt32(1)), - 29: uint8(-Int32FromInt32(1)), - 30: uint8(-Int32FromInt32(1)), - 31: uint8(-Int32FromInt32(1)), - 32: uint8(-Int32FromInt32(1)), - 33: uint8(-Int32FromInt32(1)), - 34: uint8(-Int32FromInt32(1)), - 35: uint8(-Int32FromInt32(1)), - 36: uint8(-Int32FromInt32(1)), - 37: uint8(-Int32FromInt32(1)), - 38: uint8(-Int32FromInt32(1)), - 39: uint8(-Int32FromInt32(1)), - 40: uint8(-Int32FromInt32(1)), - 41: uint8(-Int32FromInt32(1)), - 42: uint8(-Int32FromInt32(1)), - 43: uint8(-Int32FromInt32(1)), - 44: uint8(-Int32FromInt32(1)), - 45: uint8(-Int32FromInt32(1)), - 46: uint8(-Int32FromInt32(1)), - 47: uint8(-Int32FromInt32(1)), - 48: uint8(-Int32FromInt32(1)), + 0: Uint8FromInt32(-Int32FromInt32(1)), + 1: Uint8FromInt32(-Int32FromInt32(1)), + 2: Uint8FromInt32(-Int32FromInt32(1)), + 3: Uint8FromInt32(-Int32FromInt32(1)), + 4: Uint8FromInt32(-Int32FromInt32(1)), + 5: Uint8FromInt32(-Int32FromInt32(1)), + 6: Uint8FromInt32(-Int32FromInt32(1)), + 7: Uint8FromInt32(-Int32FromInt32(1)), + 8: Uint8FromInt32(-Int32FromInt32(1)), + 9: Uint8FromInt32(-Int32FromInt32(1)), + 10: Uint8FromInt32(-Int32FromInt32(1)), + 11: Uint8FromInt32(-Int32FromInt32(1)), + 12: Uint8FromInt32(-Int32FromInt32(1)), + 13: Uint8FromInt32(-Int32FromInt32(1)), + 14: Uint8FromInt32(-Int32FromInt32(1)), + 15: Uint8FromInt32(-Int32FromInt32(1)), + 16: Uint8FromInt32(-Int32FromInt32(1)), + 17: Uint8FromInt32(-Int32FromInt32(1)), + 18: Uint8FromInt32(-Int32FromInt32(1)), + 19: Uint8FromInt32(-Int32FromInt32(1)), + 20: Uint8FromInt32(-Int32FromInt32(1)), + 21: Uint8FromInt32(-Int32FromInt32(1)), + 22: Uint8FromInt32(-Int32FromInt32(1)), + 23: Uint8FromInt32(-Int32FromInt32(1)), + 24: Uint8FromInt32(-Int32FromInt32(1)), + 25: Uint8FromInt32(-Int32FromInt32(1)), + 26: Uint8FromInt32(-Int32FromInt32(1)), + 27: Uint8FromInt32(-Int32FromInt32(1)), + 28: Uint8FromInt32(-Int32FromInt32(1)), + 29: Uint8FromInt32(-Int32FromInt32(1)), + 30: Uint8FromInt32(-Int32FromInt32(1)), + 31: Uint8FromInt32(-Int32FromInt32(1)), + 32: Uint8FromInt32(-Int32FromInt32(1)), + 33: Uint8FromInt32(-Int32FromInt32(1)), + 34: Uint8FromInt32(-Int32FromInt32(1)), + 35: Uint8FromInt32(-Int32FromInt32(1)), + 36: Uint8FromInt32(-Int32FromInt32(1)), + 37: Uint8FromInt32(-Int32FromInt32(1)), + 38: Uint8FromInt32(-Int32FromInt32(1)), + 39: Uint8FromInt32(-Int32FromInt32(1)), + 40: Uint8FromInt32(-Int32FromInt32(1)), + 41: Uint8FromInt32(-Int32FromInt32(1)), + 42: Uint8FromInt32(-Int32FromInt32(1)), + 43: Uint8FromInt32(-Int32FromInt32(1)), + 44: Uint8FromInt32(-Int32FromInt32(1)), + 45: Uint8FromInt32(-Int32FromInt32(1)), + 46: Uint8FromInt32(-Int32FromInt32(1)), + 47: Uint8FromInt32(-Int32FromInt32(1)), + 48: Uint8FromInt32(-Int32FromInt32(1)), 50: uint8(1), 51: uint8(2), 52: uint8(3), @@ -27059,13 +27057,13 @@ var _table6 = [257]uint8{ 56: uint8(7), 57: uint8(8), 58: uint8(9), - 59: uint8(-Int32FromInt32(1)), - 60: uint8(-Int32FromInt32(1)), - 61: uint8(-Int32FromInt32(1)), - 62: uint8(-Int32FromInt32(1)), - 63: uint8(-Int32FromInt32(1)), - 64: uint8(-Int32FromInt32(1)), - 65: uint8(-Int32FromInt32(1)), + 59: Uint8FromInt32(-Int32FromInt32(1)), + 60: Uint8FromInt32(-Int32FromInt32(1)), + 61: Uint8FromInt32(-Int32FromInt32(1)), + 62: Uint8FromInt32(-Int32FromInt32(1)), + 63: Uint8FromInt32(-Int32FromInt32(1)), + 64: Uint8FromInt32(-Int32FromInt32(1)), + 65: Uint8FromInt32(-Int32FromInt32(1)), 66: uint8(10), 67: uint8(11), 68: uint8(12), @@ -27092,12 +27090,12 @@ var _table6 = [257]uint8{ 89: uint8(33), 90: uint8(34), 91: uint8(35), - 92: uint8(-Int32FromInt32(1)), - 93: uint8(-Int32FromInt32(1)), - 94: uint8(-Int32FromInt32(1)), - 95: uint8(-Int32FromInt32(1)), - 96: uint8(-Int32FromInt32(1)), - 97: uint8(-Int32FromInt32(1)), + 92: Uint8FromInt32(-Int32FromInt32(1)), + 93: Uint8FromInt32(-Int32FromInt32(1)), + 94: Uint8FromInt32(-Int32FromInt32(1)), + 95: Uint8FromInt32(-Int32FromInt32(1)), + 96: Uint8FromInt32(-Int32FromInt32(1)), + 97: Uint8FromInt32(-Int32FromInt32(1)), 98: uint8(10), 99: uint8(11), 100: uint8(12), @@ -27124,139 +27122,139 @@ var _table6 = [257]uint8{ 121: uint8(33), 122: uint8(34), 123: uint8(35), - 124: uint8(-Int32FromInt32(1)), - 125: uint8(-Int32FromInt32(1)), - 126: uint8(-Int32FromInt32(1)), - 127: uint8(-Int32FromInt32(1)), - 128: uint8(-Int32FromInt32(1)), - 129: uint8(-Int32FromInt32(1)), - 130: uint8(-Int32FromInt32(1)), - 131: uint8(-Int32FromInt32(1)), - 132: uint8(-Int32FromInt32(1)), - 133: uint8(-Int32FromInt32(1)), - 134: uint8(-Int32FromInt32(1)), - 135: uint8(-Int32FromInt32(1)), - 136: uint8(-Int32FromInt32(1)), - 137: uint8(-Int32FromInt32(1)), - 138: uint8(-Int32FromInt32(1)), - 139: uint8(-Int32FromInt32(1)), - 140: uint8(-Int32FromInt32(1)), - 141: uint8(-Int32FromInt32(1)), - 142: uint8(-Int32FromInt32(1)), - 143: uint8(-Int32FromInt32(1)), - 144: uint8(-Int32FromInt32(1)), - 145: uint8(-Int32FromInt32(1)), - 146: uint8(-Int32FromInt32(1)), - 147: uint8(-Int32FromInt32(1)), - 148: uint8(-Int32FromInt32(1)), - 149: uint8(-Int32FromInt32(1)), - 150: uint8(-Int32FromInt32(1)), - 151: uint8(-Int32FromInt32(1)), - 152: uint8(-Int32FromInt32(1)), - 153: uint8(-Int32FromInt32(1)), - 154: uint8(-Int32FromInt32(1)), - 155: uint8(-Int32FromInt32(1)), - 156: uint8(-Int32FromInt32(1)), - 157: uint8(-Int32FromInt32(1)), - 158: uint8(-Int32FromInt32(1)), - 159: uint8(-Int32FromInt32(1)), - 160: uint8(-Int32FromInt32(1)), - 161: uint8(-Int32FromInt32(1)), - 162: uint8(-Int32FromInt32(1)), - 163: uint8(-Int32FromInt32(1)), - 164: uint8(-Int32FromInt32(1)), - 165: uint8(-Int32FromInt32(1)), - 166: uint8(-Int32FromInt32(1)), - 167: uint8(-Int32FromInt32(1)), - 168: uint8(-Int32FromInt32(1)), - 169: uint8(-Int32FromInt32(1)), - 170: uint8(-Int32FromInt32(1)), - 171: uint8(-Int32FromInt32(1)), - 172: uint8(-Int32FromInt32(1)), - 173: uint8(-Int32FromInt32(1)), - 174: uint8(-Int32FromInt32(1)), - 175: uint8(-Int32FromInt32(1)), - 176: uint8(-Int32FromInt32(1)), - 177: uint8(-Int32FromInt32(1)), - 178: uint8(-Int32FromInt32(1)), - 179: uint8(-Int32FromInt32(1)), - 180: uint8(-Int32FromInt32(1)), - 181: uint8(-Int32FromInt32(1)), - 182: uint8(-Int32FromInt32(1)), - 183: uint8(-Int32FromInt32(1)), - 184: uint8(-Int32FromInt32(1)), - 185: uint8(-Int32FromInt32(1)), - 186: uint8(-Int32FromInt32(1)), - 187: uint8(-Int32FromInt32(1)), - 188: uint8(-Int32FromInt32(1)), - 189: uint8(-Int32FromInt32(1)), - 190: uint8(-Int32FromInt32(1)), - 191: uint8(-Int32FromInt32(1)), - 192: uint8(-Int32FromInt32(1)), - 193: uint8(-Int32FromInt32(1)), - 194: uint8(-Int32FromInt32(1)), - 195: uint8(-Int32FromInt32(1)), - 196: uint8(-Int32FromInt32(1)), - 197: uint8(-Int32FromInt32(1)), - 198: uint8(-Int32FromInt32(1)), - 199: uint8(-Int32FromInt32(1)), - 200: uint8(-Int32FromInt32(1)), - 201: uint8(-Int32FromInt32(1)), - 202: uint8(-Int32FromInt32(1)), - 203: uint8(-Int32FromInt32(1)), - 204: uint8(-Int32FromInt32(1)), - 205: uint8(-Int32FromInt32(1)), - 206: uint8(-Int32FromInt32(1)), - 207: uint8(-Int32FromInt32(1)), - 208: uint8(-Int32FromInt32(1)), - 209: uint8(-Int32FromInt32(1)), - 210: uint8(-Int32FromInt32(1)), - 211: uint8(-Int32FromInt32(1)), - 212: uint8(-Int32FromInt32(1)), - 213: uint8(-Int32FromInt32(1)), - 214: uint8(-Int32FromInt32(1)), - 215: uint8(-Int32FromInt32(1)), - 216: uint8(-Int32FromInt32(1)), - 217: uint8(-Int32FromInt32(1)), - 218: uint8(-Int32FromInt32(1)), - 219: uint8(-Int32FromInt32(1)), - 220: uint8(-Int32FromInt32(1)), - 221: uint8(-Int32FromInt32(1)), - 222: uint8(-Int32FromInt32(1)), - 223: uint8(-Int32FromInt32(1)), - 224: uint8(-Int32FromInt32(1)), - 225: uint8(-Int32FromInt32(1)), - 226: uint8(-Int32FromInt32(1)), - 227: uint8(-Int32FromInt32(1)), - 228: uint8(-Int32FromInt32(1)), - 229: uint8(-Int32FromInt32(1)), - 230: uint8(-Int32FromInt32(1)), - 231: uint8(-Int32FromInt32(1)), - 232: uint8(-Int32FromInt32(1)), - 233: uint8(-Int32FromInt32(1)), - 234: uint8(-Int32FromInt32(1)), - 235: uint8(-Int32FromInt32(1)), - 236: uint8(-Int32FromInt32(1)), - 237: uint8(-Int32FromInt32(1)), - 238: uint8(-Int32FromInt32(1)), - 239: uint8(-Int32FromInt32(1)), - 240: uint8(-Int32FromInt32(1)), - 241: uint8(-Int32FromInt32(1)), - 242: uint8(-Int32FromInt32(1)), - 243: uint8(-Int32FromInt32(1)), - 244: uint8(-Int32FromInt32(1)), - 245: uint8(-Int32FromInt32(1)), - 246: uint8(-Int32FromInt32(1)), - 247: uint8(-Int32FromInt32(1)), - 248: uint8(-Int32FromInt32(1)), - 249: uint8(-Int32FromInt32(1)), - 250: uint8(-Int32FromInt32(1)), - 251: uint8(-Int32FromInt32(1)), - 252: uint8(-Int32FromInt32(1)), - 253: uint8(-Int32FromInt32(1)), - 254: uint8(-Int32FromInt32(1)), - 255: uint8(-Int32FromInt32(1)), - 256: uint8(-Int32FromInt32(1)), + 124: Uint8FromInt32(-Int32FromInt32(1)), + 125: Uint8FromInt32(-Int32FromInt32(1)), + 126: Uint8FromInt32(-Int32FromInt32(1)), + 127: Uint8FromInt32(-Int32FromInt32(1)), + 128: Uint8FromInt32(-Int32FromInt32(1)), + 129: Uint8FromInt32(-Int32FromInt32(1)), + 130: Uint8FromInt32(-Int32FromInt32(1)), + 131: Uint8FromInt32(-Int32FromInt32(1)), + 132: Uint8FromInt32(-Int32FromInt32(1)), + 133: Uint8FromInt32(-Int32FromInt32(1)), + 134: Uint8FromInt32(-Int32FromInt32(1)), + 135: Uint8FromInt32(-Int32FromInt32(1)), + 136: Uint8FromInt32(-Int32FromInt32(1)), + 137: Uint8FromInt32(-Int32FromInt32(1)), + 138: Uint8FromInt32(-Int32FromInt32(1)), + 139: Uint8FromInt32(-Int32FromInt32(1)), + 140: Uint8FromInt32(-Int32FromInt32(1)), + 141: Uint8FromInt32(-Int32FromInt32(1)), + 142: Uint8FromInt32(-Int32FromInt32(1)), + 143: Uint8FromInt32(-Int32FromInt32(1)), + 144: Uint8FromInt32(-Int32FromInt32(1)), + 145: Uint8FromInt32(-Int32FromInt32(1)), + 146: Uint8FromInt32(-Int32FromInt32(1)), + 147: Uint8FromInt32(-Int32FromInt32(1)), + 148: Uint8FromInt32(-Int32FromInt32(1)), + 149: Uint8FromInt32(-Int32FromInt32(1)), + 150: Uint8FromInt32(-Int32FromInt32(1)), + 151: Uint8FromInt32(-Int32FromInt32(1)), + 152: Uint8FromInt32(-Int32FromInt32(1)), + 153: Uint8FromInt32(-Int32FromInt32(1)), + 154: Uint8FromInt32(-Int32FromInt32(1)), + 155: Uint8FromInt32(-Int32FromInt32(1)), + 156: Uint8FromInt32(-Int32FromInt32(1)), + 157: Uint8FromInt32(-Int32FromInt32(1)), + 158: Uint8FromInt32(-Int32FromInt32(1)), + 159: Uint8FromInt32(-Int32FromInt32(1)), + 160: Uint8FromInt32(-Int32FromInt32(1)), + 161: Uint8FromInt32(-Int32FromInt32(1)), + 162: Uint8FromInt32(-Int32FromInt32(1)), + 163: Uint8FromInt32(-Int32FromInt32(1)), + 164: Uint8FromInt32(-Int32FromInt32(1)), + 165: Uint8FromInt32(-Int32FromInt32(1)), + 166: Uint8FromInt32(-Int32FromInt32(1)), + 167: Uint8FromInt32(-Int32FromInt32(1)), + 168: Uint8FromInt32(-Int32FromInt32(1)), + 169: Uint8FromInt32(-Int32FromInt32(1)), + 170: Uint8FromInt32(-Int32FromInt32(1)), + 171: Uint8FromInt32(-Int32FromInt32(1)), + 172: Uint8FromInt32(-Int32FromInt32(1)), + 173: Uint8FromInt32(-Int32FromInt32(1)), + 174: Uint8FromInt32(-Int32FromInt32(1)), + 175: Uint8FromInt32(-Int32FromInt32(1)), + 176: Uint8FromInt32(-Int32FromInt32(1)), + 177: Uint8FromInt32(-Int32FromInt32(1)), + 178: Uint8FromInt32(-Int32FromInt32(1)), + 179: Uint8FromInt32(-Int32FromInt32(1)), + 180: Uint8FromInt32(-Int32FromInt32(1)), + 181: Uint8FromInt32(-Int32FromInt32(1)), + 182: Uint8FromInt32(-Int32FromInt32(1)), + 183: Uint8FromInt32(-Int32FromInt32(1)), + 184: Uint8FromInt32(-Int32FromInt32(1)), + 185: Uint8FromInt32(-Int32FromInt32(1)), + 186: Uint8FromInt32(-Int32FromInt32(1)), + 187: Uint8FromInt32(-Int32FromInt32(1)), + 188: Uint8FromInt32(-Int32FromInt32(1)), + 189: Uint8FromInt32(-Int32FromInt32(1)), + 190: Uint8FromInt32(-Int32FromInt32(1)), + 191: Uint8FromInt32(-Int32FromInt32(1)), + 192: Uint8FromInt32(-Int32FromInt32(1)), + 193: Uint8FromInt32(-Int32FromInt32(1)), + 194: Uint8FromInt32(-Int32FromInt32(1)), + 195: Uint8FromInt32(-Int32FromInt32(1)), + 196: Uint8FromInt32(-Int32FromInt32(1)), + 197: Uint8FromInt32(-Int32FromInt32(1)), + 198: Uint8FromInt32(-Int32FromInt32(1)), + 199: Uint8FromInt32(-Int32FromInt32(1)), + 200: Uint8FromInt32(-Int32FromInt32(1)), + 201: Uint8FromInt32(-Int32FromInt32(1)), + 202: Uint8FromInt32(-Int32FromInt32(1)), + 203: Uint8FromInt32(-Int32FromInt32(1)), + 204: Uint8FromInt32(-Int32FromInt32(1)), + 205: Uint8FromInt32(-Int32FromInt32(1)), + 206: Uint8FromInt32(-Int32FromInt32(1)), + 207: Uint8FromInt32(-Int32FromInt32(1)), + 208: Uint8FromInt32(-Int32FromInt32(1)), + 209: Uint8FromInt32(-Int32FromInt32(1)), + 210: Uint8FromInt32(-Int32FromInt32(1)), + 211: Uint8FromInt32(-Int32FromInt32(1)), + 212: Uint8FromInt32(-Int32FromInt32(1)), + 213: Uint8FromInt32(-Int32FromInt32(1)), + 214: Uint8FromInt32(-Int32FromInt32(1)), + 215: Uint8FromInt32(-Int32FromInt32(1)), + 216: Uint8FromInt32(-Int32FromInt32(1)), + 217: Uint8FromInt32(-Int32FromInt32(1)), + 218: Uint8FromInt32(-Int32FromInt32(1)), + 219: Uint8FromInt32(-Int32FromInt32(1)), + 220: Uint8FromInt32(-Int32FromInt32(1)), + 221: Uint8FromInt32(-Int32FromInt32(1)), + 222: Uint8FromInt32(-Int32FromInt32(1)), + 223: Uint8FromInt32(-Int32FromInt32(1)), + 224: Uint8FromInt32(-Int32FromInt32(1)), + 225: Uint8FromInt32(-Int32FromInt32(1)), + 226: Uint8FromInt32(-Int32FromInt32(1)), + 227: Uint8FromInt32(-Int32FromInt32(1)), + 228: Uint8FromInt32(-Int32FromInt32(1)), + 229: Uint8FromInt32(-Int32FromInt32(1)), + 230: Uint8FromInt32(-Int32FromInt32(1)), + 231: Uint8FromInt32(-Int32FromInt32(1)), + 232: Uint8FromInt32(-Int32FromInt32(1)), + 233: Uint8FromInt32(-Int32FromInt32(1)), + 234: Uint8FromInt32(-Int32FromInt32(1)), + 235: Uint8FromInt32(-Int32FromInt32(1)), + 236: Uint8FromInt32(-Int32FromInt32(1)), + 237: Uint8FromInt32(-Int32FromInt32(1)), + 238: Uint8FromInt32(-Int32FromInt32(1)), + 239: Uint8FromInt32(-Int32FromInt32(1)), + 240: Uint8FromInt32(-Int32FromInt32(1)), + 241: Uint8FromInt32(-Int32FromInt32(1)), + 242: Uint8FromInt32(-Int32FromInt32(1)), + 243: Uint8FromInt32(-Int32FromInt32(1)), + 244: Uint8FromInt32(-Int32FromInt32(1)), + 245: Uint8FromInt32(-Int32FromInt32(1)), + 246: Uint8FromInt32(-Int32FromInt32(1)), + 247: Uint8FromInt32(-Int32FromInt32(1)), + 248: Uint8FromInt32(-Int32FromInt32(1)), + 249: Uint8FromInt32(-Int32FromInt32(1)), + 250: Uint8FromInt32(-Int32FromInt32(1)), + 251: Uint8FromInt32(-Int32FromInt32(1)), + 252: Uint8FromInt32(-Int32FromInt32(1)), + 253: Uint8FromInt32(-Int32FromInt32(1)), + 254: Uint8FromInt32(-Int32FromInt32(1)), + 255: Uint8FromInt32(-Int32FromInt32(1)), + 256: Uint8FromInt32(-Int32FromInt32(1)), } func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint64) { @@ -27280,14 +27278,14 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -27300,7 +27298,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -27311,7 +27309,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ - v11 = int32(*(*uint8)(unsafe.Pointer(v12))) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) } else { v11 = X__shgetc(tls, f) } @@ -27321,12 +27319,12 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 - if int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -27361,10 +27359,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint if base == uint32(10) { x = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { break } - x = x*uint32(10) + uint32(c-Int32FromUint8('0')) + x = x*uint32(10) + Uint32FromInt32(c-Int32FromUint8('0')) goto _20 _20: ; @@ -27372,7 +27370,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v23 = f + 8 v22 = *(*uintptr)(unsafe.Pointer(v23)) *(*uintptr)(unsafe.Pointer(v23))++ - v21 = int32(*(*uint8)(unsafe.Pointer(v22))) + v21 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v22))) } else { v21 = X__shgetc(tls, f) } @@ -27380,10 +27378,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } y = uint64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(c-Int32FromUint8('0'))) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-Uint64FromInt32(c-Int32FromUint8('0'))) { break } - y = y*uint64(10) + uint64(c-Int32FromUint8('0')) + y = y*uint64(10) + Uint64FromInt32(c-Int32FromUint8('0')) goto _24 _24: ; @@ -27391,13 +27389,13 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v27 = f + 8 v26 = *(*uintptr)(unsafe.Pointer(v27)) *(*uintptr)(unsafe.Pointer(v27))++ - v25 = int32(*(*uint8)(unsafe.Pointer(v26))) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v26))) } else { v25 = X__shgetc(tls, f) } c = v25 } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { goto done } } else { @@ -27416,7 +27414,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } @@ -27435,7 +27433,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v35 = f + 8 v34 = *(*uintptr)(unsafe.Pointer(v35)) *(*uintptr)(unsafe.Pointer(v35))++ - v33 = int32(*(*uint8)(unsafe.Pointer(v34))) + v33 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v34))) } else { v33 = X__shgetc(tls, f) } @@ -27455,7 +27453,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ - v37 = int32(*(*uint8)(unsafe.Pointer(v38))) + v37 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v38))) } else { v37 = X__shgetc(tls, f) } @@ -27474,7 +27472,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v43 = f + 8 v42 = *(*uintptr)(unsafe.Pointer(v43)) *(*uintptr)(unsafe.Pointer(v43))++ - v41 = int32(*(*uint8)(unsafe.Pointer(v42))) + v41 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v42))) } else { v41 = X__shgetc(tls, f) } @@ -27494,7 +27492,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v47 = f + 8 v46 = *(*uintptr)(unsafe.Pointer(v47)) *(*uintptr)(unsafe.Pointer(v47))++ - v45 = int32(*(*uint8)(unsafe.Pointer(v46))) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v46))) } else { v45 = X__shgetc(tls, f) } @@ -27523,7 +27521,7 @@ done: } } } - return y ^ uint64(neg) - uint64(neg) + return y ^ Uint64FromInt32(neg) - Uint64FromInt32(neg) } func X__procfdname(tls *TLS, buf uintptr, fd uint32) { @@ -27568,7 +27566,7 @@ func X__procfdname(tls *TLS, buf uintptr, fd uint32) { } i-- v5 = i - *(*int8)(unsafe.Pointer(buf + uintptr(v5))) = int8(uint32('0') + fd%uint32(10)) + *(*int8)(unsafe.Pointer(buf + uintptr(v5))) = Int8FromUint32(uint32('0') + fd%uint32(10)) goto _4 _4: ; @@ -27623,7 +27621,7 @@ func X__shgetc(tls *TLS, f uintptr) (r int32) { } (*TFILE)(unsafe.Pointer(f)).Fshcnt = int64((*TFILE)(unsafe.Pointer(f)).Fbuf) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + cnt if (*TFILE)(unsafe.Pointer(f)).Frpos <= (*TFILE)(unsafe.Pointer(f)).Fbuf { - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = Uint8FromInt32(c) } return c } @@ -27634,10 +27632,10 @@ func X__syscall_ret(tls *TLS, r uint64) (r1 int64) { defer func() { trc("-> %v", r1) }() } if r > -Uint64FromUint64(4096) { - *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(-r) + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = Int32FromUint64(-r) return int64(-int32(1)) } - return int64(r) + return Int64FromUint64(r) } type TElf_Symndx = uint32 @@ -27709,7 +27707,7 @@ func Xftok(tls *TLS, path uintptr, id int32) (r Tkey_t) { if Xstat(tls, path, bp) < 0 { return -int32(1) } - return int32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ino&Uint64FromInt32(0xffff) | (*(*Tstat)(unsafe.Pointer(bp))).Fst_dev&Uint64FromInt32(0xff)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_msgget), int64(k), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_msgget), int64(k), int64(flag))))) } func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32) (r Tssize_t) { @@ -27784,7 +27782,7 @@ func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32 trc("tls=%v q=%v m=%v len1=%v type1=%v flag=%v, (%v:)", tls, q, m, len1, type1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msgrcv), int64(q), int64(m), int64(len1), type1, int64(flag), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msgrcv), int64(q), int64(m), Int64FromUint64(len1), type1, int64(flag), 0))) } func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { @@ -27792,7 +27790,7 @@ func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { trc("tls=%v q=%v m=%v len1=%v flag=%v, (%v:)", tls, q, m, len1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msgsnd), int64(q), int64(m), int64(len1), int64(flag), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msgsnd), int64(q), int64(m), Int64FromUint64(len1), int64(flag), 0, 0)))) } const GETALL = 13 @@ -27882,7 +27880,7 @@ func Xsemctl(tls *TLS, id int32, num int32, cmd int32, va uintptr) (r1 int32) { _ = ap } r = int32(X__syscall4(tls, int64(SYS_semctl), int64(id), int64(num), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(*(*uintptr)(unsafe.Pointer(bp))))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { @@ -27895,9 +27893,9 @@ func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { * n fits in the correct (per POSIX) userspace type, so * we have to check here. */ if n > int32(USHRT_MAX) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_semget), int64(key), int64(n), int64(fl))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_semget), int64(key), int64(n), int64(fl))))) } func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { @@ -27905,7 +27903,7 @@ func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { trc("tls=%v id=%v buf=%v n=%v, (%v:)", tls, id, buf, n, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_semop), int64(id), int64(buf), int64(n))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_semop), int64(id), int64(buf), Int64FromUint64(n))))) } const NO_TIME32 = 0 @@ -27941,7 +27939,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r int3 trc("tls=%v id=%v buf=%v n=%v ts=%v, (%v:)", tls, id, buf, n, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_semtimedop), int64(id), int64(buf), int64(n), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_semtimedop), int64(id), int64(buf), Int64FromUint64(n), int64(ts))))) } const SHMLBA = 4096 @@ -28013,7 +28011,7 @@ func Xshmat(tls *TLS, id int32, addr uintptr, flag int32) (r uintptr) { trc("tls=%v id=%v addr=%v flag=%v, (%v:)", tls, id, addr, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return uintptr(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_shmat), int64(id), int64(addr), int64(flag))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_shmat), int64(id), int64(addr), int64(flag))))) } func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { @@ -28024,7 +28022,7 @@ func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { var r int32 _ = r r = int32(X__syscall3(tls, int64(SYS_shmctl), int64(id), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(buf))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xshmdt(tls *TLS, addr uintptr) (r int32) { @@ -28032,7 +28030,7 @@ func Xshmdt(tls *TLS, addr uintptr) (r int32) { trc("tls=%v addr=%v, (%v:)", tls, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_shmdt), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_shmdt), int64(addr))))) } func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { @@ -28040,10 +28038,10 @@ func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { trc("tls=%v key=%v size=%v flag=%v, (%v:)", tls, key, size, flag, origin(2)) defer func() { trc("-> %v", r) }() } - if size > uint64(Int64FromInt64(INT64_MAX)) { + if size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { size = Uint64FromUint64(0xffffffffffffffff) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_shmget), int64(key), int64(size), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_shmget), int64(key), Int64FromUint64(size), int64(flag))))) } type Tpasswd = struct { @@ -28308,7 +28306,7 @@ func Xgetdtablesize(tls *TLS) (r int32) { } else { v1 = uint64(INT_MAX) } - return int32(v1) + return Int32FromUint64(v1) } func Xgetloadavg(tls *TLS, a uintptr, n int32) (r int32) { @@ -28539,16 +28537,16 @@ func Xgetpass(tls *TLS, prompt uintptr) (r uintptr) { } Xtcgetattr(tls, fd, bp+60) *(*Ttermios)(unsafe.Pointer(bp)) = *(*Ttermios)(unsafe.Pointer(bp + 60)) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag |= uint32(ICANON) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= uint32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= Uint32FromInt32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag |= uint32(ICRNL) Xtcsetattr(tls, fd, int32(TCSAFLUSH), bp+60) Xtcdrain(tls, fd) Xdprintf(tls, fd, __ccgo_ts+15, VaList(bp+128, prompt)) l = Xread(tls, fd, uintptr(unsafe.Pointer(&_password)), uint64(128)) if l >= 0 { - if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || uint64(l) == uint64(128) { + if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || Uint64FromInt64(l) == uint64(128) { l-- } _password[l] = 0 @@ -28788,12 +28786,12 @@ func Xulimit(tls *TLS, cmd int32, va uintptr) (r int64) { ap = va val = VaInt64(&ap) _ = ap - (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * uint64(val) + (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * Uint64FromInt64(val) if Xsetrlimit(tls, int32(RLIMIT_FSIZE), bp) != 0 { return int64(-int32(1)) } } - return int64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) + return Int64FromUint64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) } const BOOT_TIME = 2 @@ -29062,7 +29060,7 @@ func Xarch_prctl(tls *TLS, code int32, addr uint64) (r int32) { trc("tls=%v code=%v addr=%v, (%v:)", tls, code, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_arch_prctl), int64(code), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_arch_prctl), int64(code), Int64FromUint64(addr))))) } func Xbrk(tls *TLS, end uintptr) (r int32) { @@ -29070,7 +29068,7 @@ func Xbrk(tls *TLS, end uintptr) (r int32) { trc("tls=%v end=%v, (%v:)", tls, end, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29078,7 +29076,7 @@ func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) } func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29086,7 +29084,7 @@ func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) } func Xchroot(tls *TLS, path uintptr) (r int32) { @@ -29094,7 +29092,7 @@ func Xchroot(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) } type Tktimex64 = struct { @@ -29213,12 +29211,12 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Fstbcnt = (*(*Tktimex)(unsafe.Pointer(bp))).Fstbcnt (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex)(unsafe.Pointer(bp))).Ftai } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } if clock_id == CLOCK_REALTIME { - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) } func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -29226,7 +29224,7 @@ func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_o trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } const EPOLLERR = 8 @@ -29279,7 +29277,7 @@ func Xepoll_create(tls *TLS, size int32) (r int32) { defer func() { trc("-> %v", r) }() } if size <= 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } return Xepoll_create1(tls, 0) } @@ -29295,7 +29293,7 @@ func Xepoll_create1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = int32(X__syscall1(tls, int64(SYS_epoll_create), int64(Int32FromInt32(1)))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { @@ -29303,7 +29301,7 @@ func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { trc("tls=%v fd=%v op=%v fd2=%v ev=%v, (%v:)", tls, fd, op, fd2, ev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) } func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uintptr) (r1 int32) { @@ -29317,7 +29315,7 @@ func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uint if r == -int32(ENOSYS) && !(sigs != 0) { r = int32(___syscall_cp(tls, int64(SYS_epoll_wait), int64(fd), int64(ev), int64(cnt), int64(to), 0, 0)) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_wait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32) (r int32) { @@ -29341,11 +29339,11 @@ func Xeventfd(tls *TLS, count uint32, flags int32) (r1 int32) { } var r int32 _ = r - r = int32(X__syscall2(tls, int64(SYS_eventfd2), int64(count), int64(flags))) + r = int32(X__syscall2(tls, int64(SYS_eventfd2), Int64FromUint32(count), int64(flags))) if r == -int32(ENOSYS) && !(flags != 0) { - r = int32(X__syscall1(tls, int64(SYS_eventfd), int64(count))) + r = int32(X__syscall1(tls, int64(SYS_eventfd), Int64FromUint32(count))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { @@ -29355,7 +29353,7 @@ func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { } var v1 int32 _ = v1 - if uint64(8) == uint64(Xread(tls, fd, value, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xread(tls, fd, value, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29373,7 +29371,7 @@ func Xeventfd_write(tls *TLS, fd int32, _value Teventfd_t) (r int32) { *(*Teventfd_t)(unsafe.Pointer(bp)) = _value var v1 int32 _ = v1 - if uint64(8) == uint64(Xwrite(tls, fd, bp, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xwrite(tls, fd, bp, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29386,7 +29384,7 @@ func Xfallocate(tls *TLS, fd int32, mode int32, base Toff_t, len1 Toff_t) (r int trc("tls=%v fd=%v mode=%v base=%v len1=%v, (%v:)", tls, fd, mode, base, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) } const FANOTIFY_METADATA_VERSION = 3 @@ -29531,7 +29529,7 @@ func Xfanotify_init(tls *TLS, flags uint32, event_f_flags uint32) (r int32) { trc("tls=%v flags=%v event_f_flags=%v, (%v:)", tls, flags, event_f_flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fanotify_init), int64(flags), int64(event_f_flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fanotify_init), Int64FromUint32(flags), Int64FromUint32(event_f_flags))))) } func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd int32, pathname uintptr) (r int32) { @@ -29539,7 +29537,7 @@ func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd trc("tls=%v fanotify_fd=%v flags=%v mask=%v dfd=%v pathname=%v, (%v:)", tls, fanotify_fd, flags, mask, dfd, pathname, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), int64(flags), int64(mask), int64(dfd), int64(pathname))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), Int64FromUint32(flags), Int64FromUint64(mask), int64(dfd), int64(pathname))))) } const LOCK_EX = 2 @@ -29552,7 +29550,7 @@ func Xflock(tls *TLS, fd int32, op int32) (r int32) { trc("tls=%v fd=%v op=%v, (%v:)", tls, fd, op, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) } func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { @@ -29563,7 +29561,7 @@ func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if len1 > uint64(INT_MAX) { len1 = uint64(INT_MAX) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), Int64FromUint64(len1))))) } const GRND_INSECURE = 4 @@ -29575,7 +29573,7 @@ func Xgetrandom(tls *TLS, buf uintptr, buflen Tsize_t, flags uint32) (r Tssize_t trc("tls=%v buf=%v buflen=%v flags=%v, (%v:)", tls, buf, buflen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), int64(buflen), int64(flags), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), Int64FromUint64(buflen), Int64FromUint32(flags), 0, 0, 0))) } const IN_ACCESS = 1 @@ -29632,7 +29630,7 @@ func Xinotify_init1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = int32(X__syscall0(tls, int64(SYS_inotify_init))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r int32) { @@ -29640,7 +29638,7 @@ func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r trc("tls=%v fd=%v pathname=%v mask=%v, (%v:)", tls, fd, pathname, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), int64(mask))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), Int64FromUint32(mask))))) } func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { @@ -29648,7 +29646,7 @@ func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { trc("tls=%v fd=%v wd=%v, (%v:)", tls, fd, wd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) } func Xioperm(tls *TLS, from uint64, num uint64, turn_on int32) (r int32) { @@ -29656,7 +29654,7 @@ func Xioperm(tls *TLS, from uint64, num uint64, turn_on int32) (r int32) { trc("tls=%v from=%v num=%v turn_on=%v, (%v:)", tls, from, num, turn_on, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioperm), int64(from), int64(num), int64(turn_on))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioperm), Int64FromUint64(from), Int64FromUint64(num), int64(turn_on))))) } func Xiopl(tls *TLS, level int32) (r int32) { @@ -29664,7 +29662,7 @@ func Xiopl(tls *TLS, level int32) (r int32) { trc("tls=%v level=%v, (%v:)", tls, level, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_iopl), int64(level))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_iopl), int64(level))))) } func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { @@ -29672,7 +29670,7 @@ func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { trc("tls=%v type1=%v buf=%v len1=%v, (%v:)", tls, type1, buf, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) } const MADV_COLD = 20 @@ -29710,7 +29708,7 @@ func Xmemfd_create(tls *TLS, name uintptr, flags uint32) (r int32) { trc("tls=%v name=%v flags=%v, (%v:)", tls, name, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), Int64FromUint32(flags))))) } func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { @@ -29721,7 +29719,7 @@ func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { if flags == uint32(0) { return Xmlock(tls, addr, len1) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), int64(len1), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), Int64FromUint64(len1), Int64FromUint32(flags))))) } func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { @@ -29729,7 +29727,7 @@ func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { trc("tls=%v a=%v b=%v c=%v, (%v:)", tls, a, b, c, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_init_module), int64(a), int64(b), int64(c))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_init_module), int64(a), Int64FromUint64(b), int64(c))))) } func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { @@ -29737,7 +29735,7 @@ func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_delete_module), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_delete_module), int64(a), Int64FromUint32(b))))) } const BLKBSZGET = 2147488368 @@ -29986,7 +29984,7 @@ func Xmount(tls *TLS, special uintptr, dir uintptr, fstype uintptr, flags uint64 trc("tls=%v special=%v dir=%v fstype=%v flags=%v data=%v, (%v:)", tls, special, dir, fstype, flags, data, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), int64(flags), int64(data))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), Int64FromUint64(flags), int64(data))))) } func Xumount(tls *TLS, special uintptr) (r int32) { @@ -29994,7 +29992,7 @@ func Xumount(tls *TLS, special uintptr) (r int32) { trc("tls=%v special=%v, (%v:)", tls, special, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) } func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { @@ -30002,7 +30000,7 @@ func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { trc("tls=%v special=%v flags=%v, (%v:)", tls, special, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) } func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, mount_id uintptr, flags int32) (r int32) { @@ -30010,7 +30008,7 @@ func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, trc("tls=%v dirfd=%v pathname=%v handle=%v mount_id=%v flags=%v, (%v:)", tls, dirfd, pathname, handle, mount_id, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) } func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) (r int32) { @@ -30018,7 +30016,7 @@ func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) ( trc("tls=%v mount_fd=%v handle=%v flags=%v, (%v:)", tls, mount_fd, handle, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) } const ADDR_COMPAT_LAYOUT = 2097152 @@ -30061,7 +30059,7 @@ func Xpersonality(tls *TLS, persona uint64) (r int32) { trc("tls=%v persona=%v, (%v:)", tls, persona, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_personality), int64(persona))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_personality), Int64FromUint64(persona))))) } func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { @@ -30069,7 +30067,7 @@ func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { trc("tls=%v new1=%v old=%v, (%v:)", tls, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) } const PR_CAPBSET_DROP = 24 @@ -30246,7 +30244,7 @@ func Xprctl(tls *TLS, op int32, va uintptr) (r int32) { i++ } _ = ap - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_prctl), int64(op), int64(x[0]), int64(x[int32(1)]), int64(x[int32(2)]), int64(x[int32(3)]))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_prctl), int64(op), Int64FromUint64(x[0]), Int64FromUint64(x[int32(1)]), Int64FromUint64(x[int32(2)]), Int64FromUint64(x[int32(3)]))))) } const RWF_APPEND = 16 @@ -30265,9 +30263,9 @@ func Xpreadv2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags in if ofs == int64(-int32(1)) { return Xreadv(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit uintptr) (r1 int32) { @@ -30290,7 +30288,7 @@ func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit } new_limit = bp } - r = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) if !(r != 0) && old_limit != 0 && Bool(^Uint64FromUint64(0) != ^Uint64FromUint64(0)) { if (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur = ^Uint64FromUint64(0) @@ -30307,7 +30305,7 @@ func Xprocess_vm_writev(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec uintptr, riovcnt uint64, flags uint64) (r Tssize_t) { @@ -30315,7 +30313,7 @@ func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } const PTRACE_ARCH_PRCTL = 30 @@ -30476,11 +30474,11 @@ func Xptrace(tls *TLS, req int32, va uintptr) (r int64) { data = VaUintptr(&ap) /* PTRACE_{READ,WRITE}{DATA,TEXT} (16...19) are specific to SPARC. */ _ = ap - if uint32(req)-uint32(1) < uint32(3) { + if Uint32FromInt32(req)-uint32(1) < uint32(3) { data = bp } - ret = X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) - if ret < 0 || uint32(req)-uint32(1) >= uint32(3) { + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) + if ret < 0 || Uint32FromInt32(req)-uint32(1) >= uint32(3) { return ret } return *(*int64)(unsafe.Pointer(bp)) @@ -30495,9 +30493,9 @@ func Xpwritev2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags i if ofs == int64(-int32(1)) { return Xwritev(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } const GRPQUOTA = 1 @@ -30563,7 +30561,7 @@ func Xquotactl(tls *TLS, cmd int32, special uintptr, id int32, addr uintptr) (r trc("tls=%v cmd=%v special=%v id=%v addr=%v, (%v:)", tls, cmd, special, id, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) } func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { @@ -30571,7 +30569,7 @@ func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v pos=%v len1=%v, (%v:)", tls, fd, pos, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, int64(len1)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, Int64FromUint64(len1)))) } const RB_AUTOBOOT = 19088743 @@ -30587,7 +30585,7 @@ func Xreboot(tls *TLS, type1 int32) (r int32) { trc("tls=%v type1=%v, (%v:)", tls, type1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_reboot), int64(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_reboot), Int64FromUint32(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) } func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff Tsize_t, flags int32) (r int32) { @@ -30595,7 +30593,7 @@ func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff T trc("tls=%v addr=%v size=%v prot=%v pgoff=%v flags=%v, (%v:)", tls, addr, size, prot, pgoff, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), int64(size), int64(prot), int64(pgoff), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), Int64FromUint64(size), int64(prot), Int64FromUint64(pgoff), int64(flags))))) } func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { @@ -30604,7 +30602,7 @@ func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { defer func() { trc("-> %v", r) }() } if inc != 0 { - return uintptr(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return uintptr(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } return uintptr(X__syscall1(tls, int64(SYS_brk), int64(Int32FromInt32(0)))) } @@ -30614,7 +30612,7 @@ func Xsendfile(tls *TLS, out_fd int32, in_fd int32, ofs uintptr, count Tsize_t) trc("tls=%v out_fd=%v in_fd=%v ofs=%v count=%v, (%v:)", tls, out_fd, in_fd, ofs, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), int64(count)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), Int64FromUint64(count)))) } func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { @@ -30622,7 +30620,7 @@ func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsgid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsgid), Int64FromUint32(gid))))) } func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { @@ -30630,7 +30628,7 @@ func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsuid), int64(uid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsuid), Int64FromUint32(uid))))) } func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -30638,7 +30636,7 @@ func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sethostname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sethostname), int64(name), Int64FromUint64(len1))))) } const CLONE_CHILD_CLEARTID = 2097152 @@ -30678,7 +30676,7 @@ func Xsetns(tls *TLS, fd int32, nstype int32) (r int32) { trc("tls=%v fd=%v nstype=%v, (%v:)", tls, fd, nstype, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) } const __tm_gmtoff = 0 @@ -30708,8 +30706,8 @@ func Xsettimeofday(tls *TLS, tv uintptr, tz uintptr) (r int32) { if !(tv != 0) { return 0 } - if uint64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ Ftv_sec: (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec, @@ -30755,7 +30753,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { _ = ret ret = int32(X__syscall4(tls, int64(SYS_signalfd4), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), int64(flags))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } ret = int32(X__syscall3(tls, int64(SYS_signalfd), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if ret >= 0 { @@ -30766,7 +30764,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { X__syscall3(tls, int64(SYS_fcntl), int64(ret), int64(Int32FromInt32(F_SETFL)), int64(Int32FromInt32(O_NONBLOCK))) } } - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -30774,7 +30772,7 @@ func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintpt trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx uintptr) (r int32) { @@ -30787,9 +30785,9 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u var ret int32 var _ /* st at bp+0 */ Tstat _ = ret - ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), int64(mask), int64(stx))) + ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), Int64FromUint32(mask), int64(stx))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } ret = Xfstatat(tls, dirfd, path, bp, flags) if ret != 0 { @@ -30802,15 +30800,15 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u (*Tstatx)(unsafe.Pointer(stx)).Fstx_nlink = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink) (*Tstatx)(unsafe.Pointer(stx)).Fstx_uid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_uid (*Tstatx)(unsafe.Pointer(stx)).Fstx_gid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_gid - (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_btime = Tstatx_timestamp{} (*Tstatx)(unsafe.Pointer(stx)).Fstx_mask = uint32(0x7ff) return 0 @@ -30840,7 +30838,7 @@ func Xswapon(tls *TLS, path uintptr, flags int32) (r int32) { trc("tls=%v path=%v flags=%v, (%v:)", tls, path, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) } func Xswapoff(tls *TLS, path uintptr) (r int32) { @@ -30848,7 +30846,7 @@ func Xswapoff(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) } func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) (r int32) { @@ -30856,7 +30854,7 @@ func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) trc("tls=%v fd=%v pos=%v len1=%v flags=%v, (%v:)", tls, fd, pos, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, Int64FromUint32(flags))))) } func Xsyncfs(tls *TLS, fd int32) (r int32) { @@ -30864,7 +30862,7 @@ func Xsyncfs(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) } func X__lsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30872,7 +30870,7 @@ func X__lsysinfo(tls *TLS, info uintptr) (r int32) { trc("tls=%v info=%v, (%v:)", tls, info, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) } func Xsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30888,7 +30886,7 @@ func Xtee(tls *TLS, src int32, dest int32, len1 Tsize_t, flags uint32) (r Tssize trc("tls=%v src=%v dest=%v len1=%v flags=%v, (%v:)", tls, src, dest, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), Int64FromUint64(len1), Int64FromUint32(flags)))) } const TFD_CLOEXEC = 524288 @@ -30901,7 +30899,7 @@ func Xtimerfd_create(tls *TLS, clockid int32, flags int32) (r int32) { trc("tls=%v clockid=%v flags=%v, (%v:)", tls, clockid, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) } func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr) (r int32) { @@ -30909,7 +30907,7 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr trc("tls=%v fd=%v flags=%v new1=%v old=%v, (%v:)", tls, fd, flags, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) } func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { @@ -30917,7 +30915,7 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { trc("tls=%v fd=%v cur=%v, (%v:)", tls, fd, cur, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) } func Xunshare(tls *TLS, flags int32) (r int32) { @@ -30925,7 +30923,7 @@ func Xunshare(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) } func Xutimes(tls *TLS, path uintptr, times uintptr) (r int32) { @@ -30941,7 +30939,7 @@ func Xvhangup(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_vhangup))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_vhangup))))) } func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Tssize_t) { @@ -30949,7 +30947,7 @@ func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Ts trc("tls=%v fd=%v iov=%v cnt=%v flags=%v, (%v:)", tls, fd, iov, cnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), int64(cnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), Int64FromUint64(cnt), Int64FromUint32(flags)))) } const NSIG = 65 @@ -31098,7 +31096,7 @@ func Xwait4(tls *TLS, pid Tpid_t, status uintptr, options int32, ru uintptr) (r1 Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } const XATTR_CREATE = 1 @@ -31110,7 +31108,7 @@ func Xgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31118,7 +31116,7 @@ func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31126,7 +31124,7 @@ func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v, (%v:)", tls, filedes, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size)))) } func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31134,7 +31132,7 @@ func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31142,7 +31140,7 @@ func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31150,7 +31148,7 @@ func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_ trc("tls=%v filedes=%v list=%v size=%v, (%v:)", tls, filedes, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), Int64FromUint64(size)))) } func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31158,7 +31156,7 @@ func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31166,7 +31164,7 @@ func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31174,7 +31172,7 @@ func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, filedes, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31182,7 +31180,7 @@ func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) } func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31190,7 +31188,7 @@ func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) } func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { @@ -31198,7 +31196,7 @@ func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) } type Tucontext_t2 = struct { @@ -31251,7 +31249,7 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { var sign, sw int32 _, _, _, _, _, _, _, _, _, _, _ = b, mo, n, o, ol, os, sign, sw, t, tl, ts mo = p - sw = int32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) + sw = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) b = uint32(0) n = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 2*4)), sw) o = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 3*4)), sw) @@ -31308,9 +31306,9 @@ func Xbind_textdomain_codeset(tls *TLS, domainname uintptr, codeset uintptr) (r var _empty_mo = [5]Tuint32_t{ 0: uint32(0x950412de), - 2: uint32(-Int32FromInt32(1)), - 3: uint32(-Int32FromInt32(1)), - 4: uint32(-Int32FromInt32(1)), + 2: Uint32FromInt32(-Int32FromInt32(1)), + 3: Uint32FromInt32(-Int32FromInt32(1)), + 4: Uint32FromInt32(-Int32FromInt32(1)), } const NL_CAT_LOCALE = 1 @@ -31393,12 +31391,12 @@ _6: goto _9 _9: strings = map1 + uintptr(20) + uintptr(v8) - v10 = uint32(set_id) + v10 = Uint32FromInt32(set_id) v11 = v10>>int32(24) | v10>>int32(8)&uint32(0xff00) | v10<>int32(24) | v13>>int32(8)&uint32(0xff00) | v13< uint64(NAME_MAX) || dirlen >= uint64(PATH_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) @@ -31717,7 +31715,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r uintptr) return uintptr(0) } (*Tbinding)(unsafe.Pointer(p2)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) - (*Tbinding)(unsafe.Pointer(p2)).Fdirlen = int32(dirlen) + (*Tbinding)(unsafe.Pointer(p2)).Fdirlen = Int32FromUint64(dirlen) (*Tbinding)(unsafe.Pointer(p2)).Fdomainname = p2 + 32 (*Tbinding)(unsafe.Pointer(p2)).Fdirname = p2 + 32 + uintptr(domlen) + uintptr(1) Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p2)).Fdomainname, domainname, domlen+uint64(1)) @@ -31813,13 +31811,13 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n if !(msgid1 != 0) { goto notrans } - if uint32(category) >= uint32(LC_ALL) { + if Uint32FromInt32(category) >= uint32(LC_ALL) { goto notrans } if !(domainname != 0) { domainname = X__gettextdomain(tls) } - domlen = Xstrnlen(tls, domainname, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + domlen = Xstrnlen(tls, domainname, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if domlen > uint64(NAME_MAX) { goto notrans } @@ -31872,27 +31870,27 @@ _2: dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 16 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 - dirlen = uint64((*Tbinding)(unsafe.Pointer(q)).Fdirlen) + dirlen = Uint64FromInt32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) loclen = Xstrlen(tls, locname) - catlen = uint64(_catlens[category]) + catlen = Uint64FromInt8(_catlens[category]) /* Logically split @mod suffix from locale name. */ modname = Xmemchr(tls, locname, int32('@'), loclen) if !(modname != 0) { modname = locname + uintptr(loclen) } - v5 = loclen - uint64(int64(modname)-int64(locname)) + v5 = loclen - Uint64FromInt64(int64(modname)-int64(locname)) modlen = v5 alt_modlen = v5 - loclen = uint64(int64(modname) - int64(locname)) + loclen = Uint64FromInt64(int64(modname) - int64(locname)) /* Drop .charset identifier; it is not used. */ csp = Xmemchr(tls, locname, int32('.'), loclen) if csp != 0 { - loclen = uint64(int64(csp) - int64(locname)) + loclen = Uint64FromInt64(int64(csp) - int64(locname)) } v6 = dirlen + uint64(1) + loclen + modlen + uint64(1) + catlen + uint64(1) + domlen + uint64(3) + uint64(1) name = Xrealloc(tls, name, v6) for { - Xsnprintf(tls, name, v6, __ccgo_ts+440, VaList(bp+24, dirname, int32(loclen), locname, int32(alt_modlen), modname, catname, domainname)) + Xsnprintf(tls, name, v6, __ccgo_ts+440, VaList(bp+24, dirname, Int32FromUint64(loclen), locname, Int32FromUint64(alt_modlen), modname, catname, domainname)) v8 = X__map_file(tls, name, bp) map1 = v8 if v8 != 0 { @@ -31905,7 +31903,7 @@ _2: v9 = Xmemchr(tls, locname, int32('_'), loclen) locp = v9 if v9 != 0 { - loclen = uint64(int64(locp) - int64(locname)) + loclen = Uint64FromInt64(int64(locp) - int64(locname)) alt_modlen = modlen } else { break @@ -31943,7 +31941,7 @@ _2: r += uintptr(13) for { v11 = int32(*(*int8)(unsafe.Pointer(r))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: if !(v12 != 0) { @@ -31962,7 +31960,7 @@ _2: r++ for { v14 = int32(*(*int8)(unsafe.Pointer(r))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: if !(v15 != 0) { @@ -31975,7 +31973,7 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals = Int32FromUint64(np) (*Tmsgcat)(unsafe.Pointer(p1)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) @@ -32006,7 +32004,7 @@ _2: * msgid2 to request that dcngettext suppress plural processing. */ if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals != 0 { plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p1)).Fplural_rule, n) - if plural > uint64((*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals) { + if plural > Uint64FromInt32((*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals) { goto notrans } for { @@ -32015,7 +32013,7 @@ _2: if !(v21 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size - uint64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p1)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size - Uint64FromInt64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p1)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint64(1) >= rem { goto notrans @@ -98244,7 +98242,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(a)) != 0 && *(*uint8)(unsafe.Pointer(b)) != 0) { break } - for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && uint32(int32(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { + for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { a++ } if uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32) != uint32(*(*uint8)(unsafe.Pointer(b))) { @@ -98256,7 +98254,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { a++ b++ } - return BoolInt32(int32(*(*uint8)(unsafe.Pointer(a))) != int32(*(*uint8)(unsafe.Pointer(b)))) + return BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(b)))) } func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { @@ -98280,11 +98278,11 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { ; s += uintptr(Xstrlen(tls, s) + uint64(1)) } - return uint64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) + return Uint64FromInt64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) } s += uintptr(Xstrlen(tls, s) + uint64(1)) if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - if int32(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { s += uintptr(2) } else { s += uintptr(uint32(2) + (uint32(64)-uint32(*(*uint8)(unsafe.Pointer(s + 1))))*uint32(5)) @@ -98293,7 +98291,7 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { goto _1 _1: } - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } type Tstateful_cd = struct { @@ -98325,16 +98323,16 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { _, _, _, _, _, _, _ = cd, f, scd, t, v1, v2, v3 v1 = _find_charmap(tls, to) t = v1 - if v3 = v1 == uint64(-Int32FromInt32(1)); !v3 { + if v3 = v1 == Uint64FromInt32(-Int32FromInt32(1)); !v3 { v2 = _find_charmap(tls, from) f = v2 } - if v3 || v2 == uint64(-Int32FromInt32(1)) || int32(_charmaps[t]) >= int32(0330) { + if v3 || v2 == Uint64FromInt32(-Int32FromInt32(1)) || Int32FromUint8(_charmaps[t]) >= int32(0330) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } cd = _combine_to_from(tls, t, f) - switch int32(_charmaps[f]) { + switch Int32FromUint8(_charmaps[f]) { case int32(UTF_16): fallthrough case int32(UTF_32): @@ -98355,7 +98353,7 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { func _get_16(tls *TLS, s uintptr, e int32) (r uint32) { e &= int32(1) - return uint32(int32(*(*uint8)(unsafe.Pointer(s + uintptr(e))))<>(uint32(2)*x%uint32(8)) | int32(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) + x = c - Uint32FromInt32(int32(4)*Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1)))))) + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)))))>>(uint32(2)*x%uint32(8)) | Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) if x < uint32(256) { v1 = x } else { @@ -98471,7 +98469,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } c = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) l = uint64(1) - switch int32(type1) { + switch Int32FromUint8(type1) { case int32(UTF_8): goto _2 case int32(US_ASCII): @@ -98522,13 +98520,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } l = Xmbrtowc(tls, bp+32, *(*uintptr)(unsafe.Pointer(in)), *(*Tsize_t)(unsafe.Pointer(inb)), bp+24) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { goto ilseq } - if l == uint64(-Int32FromInt32(2)) { + if l == Uint64FromInt32(-Int32FromInt32(2)) { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) goto _23 _3: ; @@ -98542,7 +98540,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < l { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) if !(0 != 0) { goto _24 } @@ -98554,7 +98552,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) _24: ; if c-uint32(0xd800) < uint32(0x800) || c >= uint32(0x110000) { @@ -98573,19 +98571,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(2) { goto starved } - c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) if c-Uint32FromInt32(0xdc00) < uint32(0x400) { goto ilseq } if c-Uint32FromInt32(0xd800) < uint32(0x400) { - if uint32(int32(type1)-int32(UCS2BE)) < uint32(2) { + if Uint32FromInt32(Int32FromUint8(type1)-int32(UCS2BE)) < uint32(2) { goto ilseq } l = uint64(4) if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), int32(type1)) + d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), Int32FromUint8(type1)) if d-Uint32FromInt32(0xdc00) >= uint32(0x400) { goto ilseq } @@ -98602,7 +98600,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), 0) - if int32(type1) == int32(UCS2) { + if Int32FromUint8(type1) == int32(UCS2) { if c == uint32(0xfffe) { v26 = int32(UCS2LE) } else { @@ -98617,7 +98615,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } v25 = v27 } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v25) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v25) if c == uint32(0xfffe) || c == uint32(0xfeff) { l = uint64(2) } @@ -98637,7 +98635,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v28 = int32(UTF_32BE) } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v28) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v28) if c == uint32(0xfffe0000) || c == uint32(0xfeff) { l = uint64(4) } @@ -98649,8 +98647,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto _23 } - if c-uint32(0xa1) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + if c-uint32(0xa1) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } l = uint64(2) @@ -98658,17 +98656,17 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if c-uint32(129) <= uint32(Int32FromInt32(159)-Int32FromInt32(129)) { + if c-uint32(129) <= Uint32FromInt32(Int32FromInt32(159)-Int32FromInt32(129)) { c -= uint32(129) } else { - if c-uint32(224) <= uint32(Int32FromInt32(239)-Int32FromInt32(224)) { + if c-uint32(224) <= Uint32FromInt32(Int32FromInt32(239)-Int32FromInt32(224)) { c -= uint32(193) } else { goto ilseq } } c *= uint32(2) - if d-uint32(64) <= uint32(Int32FromInt32(158)-Int32FromInt32(64)) { + if d-uint32(64) <= Uint32FromInt32(Int32FromInt32(158)-Int32FromInt32(64)) { if d == uint32(127) { goto ilseq } @@ -98677,7 +98675,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } d -= uint32(64) } else { - if d-uint32(159) <= uint32(Int32FromInt32(252)-Int32FromInt32(159)) { + if d-uint32(159) <= Uint32FromInt32(Int32FromInt32(252)-Int32FromInt32(159)) { c++ d -= uint32(159) } @@ -98702,10 +98700,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) if c == uint32(0x8e) { c = d - if c-uint32(0xa1) > uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + if c-uint32(0xa1) > Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { goto ilseq } - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } c -= uint32(0xa1) @@ -98733,7 +98731,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c != uint32('(') && c != uint32('$') { goto ilseq } - switch uint32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { + switch Uint32FromInt32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { case uint32('B'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(0) goto _1 @@ -98743,10 +98741,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui case uint32('I'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(4) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('@')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('@')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(2) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('B')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('B')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(3) goto _1 } @@ -98782,7 +98780,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto ilseq } if c-uint32(0x21) < uint32(0x5e) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) } break } @@ -98815,11 +98813,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d < uint32(0xa1) && int32(type1) == int32(GB2312) { + if d < uint32(0xa1) && Int32FromUint8(type1) == int32(GB2312) { goto ilseq } if d-uint32(0x40) >= uint32(191) || d == uint32(127) { - if d-uint32('0') > uint32(9) || int32(type1) != int32(GB18030) { + if d-uint32('0') > uint32(9) || Int32FromUint8(type1) != int32(GB18030) { goto ilseq } l = uint64(4) @@ -98890,23 +98888,23 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d-uint32(0x40) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < uint32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { + if d-uint32(0x40) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < Uint32FromInt32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { goto ilseq } d -= uint32(0x40) if d > uint32(0x3e) { d -= uint32(0x22) } - if c-uint32(0xa1) >= uint32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { - if c-uint32(0x87) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { + if c-uint32(0xa1) >= Uint32FromInt32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { + if c-uint32(0x87) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { goto ilseq } if c < uint32(0xa1) { c -= uint32(0x87) } else { - c -= uint32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) + c -= Uint32FromInt32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) } - c = uint32(int32(_hkscs[uint32(4867)+(c*uint32(157)+d)/uint32(16)])>>((c*uint32(157)+d)%uint32(16))%int32(2)<>((c*uint32(157)+d)%uint32(16))%int32(2)< *(*Tsize_t)(unsafe.Pointer(outb)) { goto toobig } @@ -98935,7 +98933,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } c -= uint32(0xa1) - c = uint32(int32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(&_big5)) + uintptr(c)*314 + uintptr(d)*2))) | BoolInt32(c == uint32(0x27) && (d == uint32(0x3a) || d == uint32(0x3c) || d == uint32(0x42)))<= uint32(93) || d >= uint32(94) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) d += uint32(0xa1) - if c >= uint32(93) || c >= uint32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { + if c >= uint32(93) || c >= Uint32FromInt32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { goto ilseq } if d-uint32('A') < uint32(26) { @@ -98964,7 +98962,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if d-uint32('a') < uint32(26) { d = d - uint32('a') + uint32(26) } else { - if d-uint32(0x81) < uint32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { + if d-uint32(0x81) < Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { d = d - uint32(0x81) + uint32(52) } else { goto ilseq @@ -98974,7 +98972,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(0x20) { c = uint32(178)*c + d } else { - c = uint32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d + c = Uint32FromInt32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d } c += uint32(0xac00) d = uint32(0xac00) @@ -99029,7 +99027,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } _23: ; - switch int32(totype) { + switch Int32FromUint8(totype) { case int32(WCHAR_T): goto _35 case int32(UTF_8): @@ -99069,20 +99067,20 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = int32(c) + *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = Int32FromUint32(c) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 _36: ; if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { - k = uint64(Xwctomb(tls, bp+56, int32(c))) + k = Uint64FromInt32(Xwctomb(tls, bp+56, Int32FromUint32(c))) if *(*Tsize_t)(unsafe.Pointer(outb)) < k { goto toobig } Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(out)), bp+56, k) } else { - k = uint64(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), int32(c))) + k = Uint64FromInt32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), Int32FromUint32(c))) } *(*uintptr)(unsafe.Pointer(out)) += uintptr(k) *(*Tsize_t)(unsafe.Pointer(outb)) -= k @@ -99116,13 +99114,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v55 = out v54 = *(*uintptr)(unsafe.Pointer(v55)) *(*uintptr)(unsafe.Pointer(v55))++ - *(*int8)(unsafe.Pointer(v54)) = int8(c) + *(*int8)(unsafe.Pointer(v54)) = Int8FromUint32(c) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(1) goto _51 _53: ; d = c - c = uint32(int32(4) * int32(totype)) + c = Uint32FromInt32(int32(4) * Int32FromUint8(totype)) for { if !(c < uint32(256)) { break @@ -99151,8 +99149,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui c = uint32('~') goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) goto revout } c = _uni_to_jis(tls, c) @@ -99172,7 +99170,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v59 = int32(176) } - *(*int8)(unsafe.Pointer(v57)) = int8((c+uint32(1))/uint32(2) + uint32(v59)) + *(*int8)(unsafe.Pointer(v57)) = Int8FromUint32((c+uint32(1))/uint32(2) + Uint32FromInt32(v59)) v61 = out v60 = *(*uintptr)(unsafe.Pointer(v61)) *(*uintptr)(unsafe.Pointer(v61))++ @@ -99181,7 +99179,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v62 = d + uint32(126) } - *(*int8)(unsafe.Pointer(v60)) = int8(v62) + *(*int8)(unsafe.Pointer(v60)) = Int8FromUint32(v62) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 _40: @@ -99189,8 +99187,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) } else { c = _uni_to_jis(tls, c) } @@ -99203,11 +99201,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v64 = out v63 = *(*uintptr)(unsafe.Pointer(v64)) *(*uintptr)(unsafe.Pointer(v64))++ - *(*int8)(unsafe.Pointer(v63)) = int8(c/uint32(256) + uint32(0x80)) + *(*int8)(unsafe.Pointer(v63)) = Int8FromUint32(c/uint32(256) + uint32(0x80)) v66 = out v65 = *(*uintptr)(unsafe.Pointer(v66)) *(*uintptr)(unsafe.Pointer(v66))++ - *(*int8)(unsafe.Pointer(v65)) = int8(c%uint32(256) + uint32(0x80)) + *(*int8)(unsafe.Pointer(v65)) = Int8FromUint32(c%uint32(256) + uint32(0x80)) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 _41: @@ -99215,7 +99213,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(7) { goto toobig } @@ -99254,7 +99252,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v82 = out v81 = *(*uintptr)(unsafe.Pointer(v82)) *(*uintptr)(unsafe.Pointer(v82))++ - *(*int8)(unsafe.Pointer(v81)) = int8(c - uint32(0xff61) + uint32(0x21)) + *(*int8)(unsafe.Pointer(v81)) = Int8FromUint32(c - uint32(0xff61) + uint32(0x21)) } } v84 = out @@ -99294,11 +99292,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v96 = out v95 = *(*uintptr)(unsafe.Pointer(v96)) *(*uintptr)(unsafe.Pointer(v96))++ - *(*int8)(unsafe.Pointer(v95)) = int8(c / uint32(256)) + *(*int8)(unsafe.Pointer(v95)) = Int8FromUint32(c / uint32(256)) v98 = out v97 = *(*uintptr)(unsafe.Pointer(v98)) *(*uintptr)(unsafe.Pointer(v98))++ - *(*int8)(unsafe.Pointer(v97)) = int8(c % uint32(256)) + *(*int8)(unsafe.Pointer(v97)) = Int8FromUint32(c % uint32(256)) v100 = out v99 = *(*uintptr)(unsafe.Pointer(v100)) *(*uintptr)(unsafe.Pointer(v100))++ @@ -99326,14 +99324,14 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ; _43: ; - if c < uint32(0x10000) || uint32(int32(totype)-int32(UCS2BE)) < uint32(2) { + if c < uint32(0x10000) || Uint32FromInt32(Int32FromUint8(totype)-int32(UCS2BE)) < uint32(2) { if c >= uint32(0x10000) { c = uint32(0xFFFD) } if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(2) { goto toobig } - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(2) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 @@ -99342,8 +99340,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto toobig } c -= uint32(0x10000) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), int32(totype)) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), Int32FromUint8(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99357,7 +99355,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99375,19 +99373,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ilseq: ; err = int32(EILSEQ) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto toobig toobig: ; err = int32(E2BIG) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto starved starved: ; err = int32(EINVAL) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end end: ; @@ -99617,7 +99615,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { break } z = X__strchrnul(tls, path, int32(':')) - l = uint64(int64(z) - int64(path)) + l = Uint64FromInt64(int64(z) - int64(path)) if l >= uint64(256)-n-uint64(2) { goto _10 } @@ -99857,7 +99855,7 @@ func _skipspace(tls *TLS, s uintptr) (r uintptr) { _, _ = v1, v2 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -99880,9 +99878,9 @@ func _evalprim(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { return __ccgo_ts } s = _skipspace(tls, s) - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { (*Tst)(unsafe.Pointer(st)).Fr = Xstrtoul(tls, s, bp, int32(10)) - if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == uint64(-Int32FromInt32(1)) { + if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == Uint64FromInt32(-Int32FromInt32(1)) { return __ccgo_ts } return _skipspace(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -100082,7 +100080,7 @@ func X__pleval(tls *TLS, s uintptr, n uint64) (r uint64) { if int32(*(*int8)(unsafe.Pointer(s))) == int32(';') { v1 = (*(*Tst)(unsafe.Pointer(bp))).Fr } else { - v1 = uint64(-Int32FromInt32(1)) + v1 = Uint64FromInt32(-Int32FromInt32(1)) } return v1 } @@ -100102,7 +100100,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { var _ /* part at bp+48 */ [24]int8 var _ /* tmp_locale at bp+0 */ t__locale_struct _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, l, lm, lm1, p, part1, ret, s, same, z, v3, v4, v5, v6 - if uint32(cat) > uint32(LC_ALL) { + if Uint32FromInt32(cat) > uint32(LC_ALL) { return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&X__locale_lock))) @@ -100122,7 +100120,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { } z = X__strchrnul(tls, p, int32(';')) if int64(z)-int64(p) <= int64(LOCALE_NAME_MAX) { - Xmemcpy(tls, bp+48, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, bp+48, p, Uint64FromInt64(int64(z)-int64(p))) (*(*[24]int8)(unsafe.Pointer(bp + 48)))[int64(z)-int64(p)] = 0 if *(*int8)(unsafe.Pointer(z)) != 0 { p = z + uintptr(1) @@ -100290,7 +100288,7 @@ _4: } fw = 0 for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } fw = int32(10)*fw + (int32(*(*int8)(unsafe.Pointer(fmt))) - int32('0')) @@ -100305,7 +100303,7 @@ _4: lp = 0 fmt++ for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } lp = int32(10)*lp + (int32(*(*int8)(unsafe.Pointer(fmt))) - int32('0')) @@ -100319,7 +100317,7 @@ _4: rp = 0 fmt++ for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } rp = int32(10)*rp + (int32(*(*int8)(unsafe.Pointer(fmt))) - int32('0')) @@ -100337,7 +100335,7 @@ _4: w = fw } x = VaFloat64(&ap) - l = uint64(Xsnprintf(tls, s, n, __ccgo_ts+577, VaList(bp+8, w, rp, x))) + l = Uint64FromInt32(Xsnprintf(tls, s, n, __ccgo_ts+577, VaList(bp+8, w, rp, x))) if l >= n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(E2BIG) return int64(-int32(1)) @@ -100508,7 +100506,7 @@ func Xtextdomain(tls *TLS, domainname uintptr) (r uintptr) { return uintptr(0) } if !(_current_domain != 0) { - _current_domain = Xmalloc(tls, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + _current_domain = Xmalloc(tls, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if !(_current_domain != 0) { return uintptr(0) } @@ -100644,7 +100642,7 @@ func Xreallocarray(tls *TLS, ptr uintptr, m Tsize_t, n Tsize_t) (r uintptr) { trc("tls=%v ptr=%v m=%v n=%v, (%v:)", tls, ptr, m, n, origin(2)) defer func() { trc("-> %v", r) }() } - if n != 0 && m > uint64(-Int32FromInt32(1))/n { + if n != 0 && m > Uint64FromInt32(-Int32FromInt32(1))/n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -100718,7 +100716,7 @@ func X__expo2(tls *TLS, x float64, sign float64) (r float64) { var v1 Tuint64_t _, _ = scale, v1 /* note that k is odd and scale*scale overflows */ - v1 = uint64(uint32(Int32FromInt32(0x3ff)+_k2/Int32FromInt32(2))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(e != 0) { if *(*Tuint64_t)(unsafe.Pointer(bp))<> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(e != 0) { if *(*Tuint32_t)(unsafe.Pointer(bp))<> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix <= uint32(0x400f6a7a) { /* |x| ~<= 5pi/4 */ if ix&uint32(0xfffff) == uint32(0x921fb) { /* |x| ~= pi/2 or 2pi/2 */ @@ -101121,8 +101119,8 @@ medium: } *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - ex = int32(ix >> int32(20)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ex = Int32FromUint32(ix >> int32(20)) if ex-ey > int32(16) { /* 2nd round, good to 118 bits */ t = r w = fn * _pio2_2 @@ -101130,7 +101128,7 @@ medium: w = fn*_pio2_2t - (t - r - w) *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if ex-ey > int32(49) { /* 3rd round, good to 151 bits, covers all cases */ t = r w = fn * _pio2_3 @@ -101154,8 +101152,8 @@ _1: } /* set z = scalbn(|x|,-ilogb(x)+23) */ *(*float64)(unsafe.Pointer(bp)) = x - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) >> Int32FromInt32(12) - *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) >> Int32FromInt32(12) + *(*Tuint64_t)(unsafe.Pointer(bp)) |= Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) z = *(*float64)(unsafe.Pointer(bp)) i = 0 for { @@ -101174,7 +101172,7 @@ _1: for (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] == float64(0) { i-- } - n = X__rem_pio2_large(tls, bp+8, bp+32, int32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) + n = X__rem_pio2_large(tls, bp+8, bp+32, Int32FromUint32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) if sign != 0 { *(*float64)(unsafe.Pointer(y)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[0] *(*float64)(unsafe.Pointer(y + 1*8)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[int32(1)] @@ -101746,9 +101744,9 @@ func X__rem_pio2f(tls *TLS, x float32, y uintptr) (r int32) { return 0 } /* scale x into [2^23, 2^24-1] */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) - e0 = int32(ix>>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ - *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - uint32(e0<> int32(31)) + e0 = Int32FromUint32(ix>>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - Uint32FromInt32(e0<> int32(63)) + return Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) } // C documentation @@ -101808,7 +101806,7 @@ func X__signbitf(tls *TLS, x float32) (r int32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - return int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + return Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) } func X__signbitl(tls *TLS, x float64) (r int32) { @@ -101901,7 +101899,7 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) big = BoolInt32(hx&uint32(0x7fffffff) >= uint32(0x3FE59428)) /* |x| >= 0.6744 */ if big != 0 { - sign = int32(hx >> int32(31)) + sign = Int32FromUint32(hx >> int32(31)) if sign != 0 { x = -x y = -y @@ -101936,13 +101934,13 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { } /* -1.0/(x+r) has up to 2ulp error, so compute it accurately */ w0 = w - v2 = *(*Tuint64_t)(unsafe.Pointer(&w0))>>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) /* x < 1 domain error is handled in the called functions */ - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| < 2, up to 2ulp error in [1,1.125] */ return Xlog1p(tls, x-Float64FromInt32(1)+Xsqrt(tls, (x-Float64FromInt32(1))*(x-Float64FromInt32(1))+Float64FromInt32(2)*(x-Float64FromInt32(1)))) } - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| < 0x1p26 */ return Xlog(tls, Float64FromInt32(2)*x-Float64FromInt32(1)/(x+Xsqrt(tls, x*x-Float64FromInt32(1)))) } @@ -102188,12 +102186,12 @@ func Xacoshf(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x a = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - if a < uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { - if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { @@ -102433,15 +102431,15 @@ func Xasinhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i x3 = *(*float32)(unsafe.Pointer(bp)) - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { - if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { @@ -102697,7 +102695,7 @@ _2: } } /* |y/x| > 0x1p64 */ - if ix+uint32(Int32FromInt32(64)< 0x1p26 */ - if ix+uint32(Int32FromInt32(26)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) y3 = *(*float64)(unsafe.Pointer(bp)) - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { /* handle underflow */ if e == uint32(0) { if uint64(4) == uint64(4) { @@ -103056,10 +103054,10 @@ func Xatanhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) y3 = *(*float32)(unsafe.Pointer(bp)) - if *(*Tuint32_t)(unsafe.Pointer(bp)) < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(1)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -103361,12 +103359,12 @@ func Xceilf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -103533,7 +103531,7 @@ func Xcos(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) @@ -103627,7 +103625,7 @@ func Xcosf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -103673,12 +103671,12 @@ func Xcosh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(2) */ if w < uint32(0x3fe62e42) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -103926,7 +103924,7 @@ func Xerfc(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104071,7 +104069,7 @@ func Xerff(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -104111,7 +104109,7 @@ func Xerfcf(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104279,7 +104277,7 @@ _3: kd -= X__exp_data.Fshift r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<>int32(52)&uint64(0x7ff) < uint64(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { + if *(*Tuint64_t)(unsafe.Pointer(bp + 8))>>int32(52)&uint64(0x7ff) < Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { if !(y != 0) { return _p10[int32(*(*float64)(unsafe.Pointer(bp)))+int32(15)] } @@ -104406,7 +104404,7 @@ func Xexp10f(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp + 4)) = *(*float32)(unsafe.Pointer(bp)) /* fabsf(n) < 8 without raising invalid on nan */ - if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < uint32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { + if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { if !(y != 0) { return _p101[int32(*(*float32)(unsafe.Pointer(bp)))+int32(7)] } @@ -104573,7 +104571,7 @@ _5: kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4043687A) { /* if |x|>=56*ln2 */ *(*float64)(unsafe.Pointer(bp)) = x3 @@ -104908,7 +104906,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return float64(1) + float64(2)*(x3-e) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ twopk = *(*float64)(unsafe.Pointer(bp + 8)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + float64(1) @@ -104919,7 +104917,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return y3 - float64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { @@ -104965,7 +104963,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4195b844) { /* if |x|>=27*ln2 */ if hx > uint32(0x7f800000) { /* NaN */ @@ -105043,7 +105041,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return Float32FromFloat32(1) + Float32FromFloat32(2)*(x3-e) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) + k) << int32(23)) /* 2^k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) + k) << int32(23)) /* 2^k */ twopk = *(*float32)(unsafe.Pointer(bp)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + Float32FromFloat32(1) @@ -105054,7 +105052,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return y3 - Float32FromFloat32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { y3 = (x3 - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk } else { @@ -105276,7 +105274,7 @@ func Xfloor(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -105336,12 +105334,12 @@ func Xfloorf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -105403,13 +105401,13 @@ func _normalize(tls *TLS, x float64) (r Tnum) { var v1 float64 _, _, _, _, _ = e, ix, sign, v1, v2 ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - e = int32(ix >> int32(52)) + e = Int32FromUint64(ix >> int32(52)) sign = e & int32(0x800) e &= int32(0x7ff) if !(e != 0) { v1 = x * float64(9.223372036854776e+18) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) - e = int32(ix >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(ix >> int32(52) & uint64(0x7ff)) if e != 0 { v2 = e - int32(63) } else { @@ -105536,7 +105534,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { v1 = *(*Tuint64_t)(unsafe.Pointer(bp)) // __asm__( "bsr %1,%0 ; xor $63,%0" : "=r"(x) : "r"(x) ); X__assert_fail(tls, __ccgo_ts+212, __ccgo_ts+247, 121, __ccgo_ts+583) - v2 = int32(v1) + v2 = Int32FromUint64(v1) goto _3 _3: d = v2 - int32(1) @@ -105547,7 +105545,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { v4 = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) // __asm__( "bsr %1,%0 ; xor $63,%0" : "=r"(x) : "r"(x) ); X__assert_fail(tls, __ccgo_ts+212, __ccgo_ts+247, 121, __ccgo_ts+583) - v5 = int32(v4) + v5 = Int32FromUint64(v4) goto _6 _6: d = v5 - int32(1) @@ -105563,7 +105561,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { } e -= d /* convert to double */ - i = int64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ + i = Int64FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ if sign != 0 { i = -i } @@ -105585,7 +105583,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { /* one bit is lost when scaled, add another top bit to only round once at conversion if it is inexact */ if *(*Tuint64_t)(unsafe.Pointer(bp))<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) + i = Int64FromUint64((*(*Tuint64_t)(unsafe.Pointer(bp))>>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) if sign != 0 { i = -i } @@ -105657,12 +105655,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = y } else { v9 = x @@ -105714,12 +105712,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = y } else { v9 = x @@ -105779,12 +105777,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = x } else { v9 = y @@ -105836,12 +105834,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = x } else { v9 = y @@ -105905,9 +105903,9 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* in the followings uxi should be ux.i, but then gcc wrongly adds */ /* float load/store to inner loops ruining performance and code size */ uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) @@ -105939,7 +105937,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ex-- i <<= uint64(1) } - uxi <<= uint64(-ex + int32(1)) + uxi <<= Uint64FromInt32(-ex + int32(1)) } else { uxi = Tuint64_t(uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12))) uxi = Tuint64_t(uxi | Uint64FromUint64(1)<> Int32FromInt32(12))) @@ -106001,11 +105999,11 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { /* scale result */ if ex > 0 { uxi = Tuint64_t(uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } - uxi |= uint64(sx) << int32(63) + uxi |= Uint64FromInt32(sx) << int32(63) *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi return *(*float64)(unsafe.Pointer(bp + 8)) } @@ -106050,8 +106048,8 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) sx = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) & uint32(0x80000000) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106099,7 +106097,7 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106142,9 +106140,9 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { /* scale result up */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } uxi |= sx *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi @@ -106181,7 +106179,7 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { Fd float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ee = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(ee != 0) { if x != 0 { x = Xfrexp(tls, x*float64(1.8446744073709552e+19), e) @@ -106225,7 +106223,7 @@ func Xfrexpf(tls *TLS, x float32, e uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + ee = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(ee != 0) { if x != 0 { x = Xfrexpf(tls, float32(float64(x)*float64(1.8446744073709552e+19)), e) @@ -106333,8 +106331,8 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) { })(unsafe.Pointer(bp + 8)) = ut } /* special cases */ - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) x = *(*float64)(unsafe.Pointer(bp)) y = *(*float64)(unsafe.Pointer(bp + 8)) /* note: hypot(inf,nan) == inf */ @@ -106426,19 +106424,19 @@ func Xhypotf(tls *TLS, x float32, y float32) (r float32) { } x = *(*float32)(unsafe.Pointer(bp)) y = *(*float32)(unsafe.Pointer(bp + 4)) - if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(25)<= Uint32FromInt32(Int32FromInt32(0xff)<= Uint32FromInt32(Int32FromInt32(25)<= uint32((Int32FromInt32(0x7f)+Int32FromInt32(60))<= Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(60))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { i <<= uint64(12) if i == uint64(0) { @@ -106554,7 +106552,7 @@ func Xilogbf(tls *TLS, x3 float32) (r int32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) - e = int32(i >> int32(23) & uint32(0xff)) + e = Int32FromUint32(i >> int32(23) & uint32(0xff)) if !(e != 0) { i <<= uint32(9) if i == uint32(0) { @@ -107362,7 +107360,7 @@ func Xj1(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { return Float64FromInt32(1) / (x * x) @@ -107698,7 +107696,7 @@ func Xj1f(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return Float32FromInt32(1) / (x * x) @@ -107987,7 +107985,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108189,7 +108187,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108283,7 +108281,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { var ix Tuint32_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = a, b, h, i, ix, k, nf, nm1, q0, q1, sign, t, temp, tmp, w, z, v6 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108448,7 +108446,7 @@ func Xynf(tls *TLS, n int32, x float32) (r float32) { var ib, ix Tuint32_t _, _, _, _, _, _, _, _, _, _ = a, b, i, ib, ix, nm1, sign, temp, v1, v3 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108650,12 +108648,12 @@ func X__lgamma_r(tls *TLS, x float64, signgamp uintptr) (r1 float64) { *(*float64)(unsafe.Pointer(bp)) = x /* purge off +-inf, NaN, +-0, tiny and negative arguments */ *(*int32)(unsafe.Pointer(signgamp)) = int32(1) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix >= uint32(0x7ff00000) { return x * x } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(70))<> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) ix = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return x * x @@ -109174,7 +109172,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109195,8 +109193,8 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = uint64(ix - tmp&(Uint64FromUint64(0xfff)<>Int32FromInt32(20)) - int32(0x3ff) + hx += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k += Int32FromUint32(hx>>Int32FromInt32(20)) - int32(0x3ff) hx = hx&uint32(0x000fffff) + uint32(0x3fe6a09e) *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(hx)<>Int32FromInt32(23)) - int32(0x7f) + ix += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k += Int32FromUint32(ix>>Int32FromInt32(23)) - int32(0x7f) ix = ix&uint32(0x007fffff) + uint32(0x3f3504f3) *(*Tuint32_t)(unsafe.Pointer(bp)) = ix x = *(*float32)(unsafe.Pointer(bp)) @@ -109463,7 +109461,7 @@ func Xlog1p(tls *TLS, x3 float64) (r float64) { } /* log1p(-1) = -inf */ return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } - if hx<> int32(32)) - hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) - k = int32(hu>>Int32FromInt32(20)) - int32(0x3ff) + hu += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k = Int32FromUint32(hu>>Int32FromInt32(20)) - int32(0x3ff) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(54) { if k >= int32(2) { @@ -109563,7 +109561,7 @@ func Xlog1pf(tls *TLS, x3 float32) (r float32) { } /* log1p(-1)=+inf */ return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } - if ix<>Int32FromInt32(23)) - int32(0x7f) + iu += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k = Int32FromUint32(iu>>Int32FromInt32(23)) - int32(0x7f) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(25) { if k >= int32(2) { @@ -109688,7 +109686,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { _9: return v8 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109709,8 +109707,8 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = uint64(ix - tmp&(Uint64FromUint64(0xfff)<= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109812,16 +109810,16 @@ func Xlog2f(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + k = Int32FromUint32(tmp) >> int32(23) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -109992,7 +109990,7 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) } - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -110006,14 +110004,14 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % uint32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + i = Int32FromUint32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ iz = ix - tmp&uint32(0xff800000) invc = (*(*struct { Finvc float64 @@ -110152,7 +110150,7 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) /* no fractional part */ if e >= int32(52) { *(*float64)(unsafe.Pointer(iptr)) = x @@ -110204,7 +110202,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) /* no fractional part */ if e >= int32(23) { *(*float32)(unsafe.Pointer(iptr)) = x @@ -110220,7 +110218,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { *(*float32)(unsafe.Pointer(iptr)) = *(*float32)(unsafe.Pointer(bp)) return x } - mask = uint32(int32(0x007fffff) >> e) + mask = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&mask == uint32(0) { *(*float32)(unsafe.Pointer(iptr)) = x *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x80000000) @@ -110343,7 +110341,7 @@ _2: *(*Tuint64_t)(unsafe.Pointer(bp + 8))++ } } - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) /* raise overflow if ux.f is infinite and x is finite */ if e == int32(0x7ff) { if uint64(8) == uint64(4) { @@ -110544,7 +110542,7 @@ _2: v6 = *(*uint64)(unsafe.Pointer(bp + 8)) goto _7 _7: - if int32(v6>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v6>>Int32FromInt32(63)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16)) |= uint32(0x80000000) } } else { @@ -110553,7 +110551,7 @@ _2: v8 = *(*uint32)(unsafe.Pointer(bp)) goto _9 _9: - if int32(v8>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v8>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ @@ -110563,7 +110561,7 @@ _2: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- @@ -110638,8 +110636,8 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF2) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = uint64(ix - tmp&(Uint64FromUint64(0xfff)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(iy >> int32(52) & uint64(0x7ff)) if e < int32(0x3ff) { return 0 } @@ -110885,7 +110883,7 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) topx = _top124(tls, x1) topy = _top124(tls, y1) - if topx-uint32(0x001) >= uint32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topx-uint32(0x001) >= Uint32FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1. */ /* Special cases: (x < 0x1p-126 or inf or nan) or @@ -110941,12 +110939,12 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { return X__math_invalid(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) + sign_bias = Uint32FromInt32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) } ix &= uint64(0x7fffffffffffffff) topx &= uint32(0x7ff) } - if topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: sign_bias == 0 here because y is not odd. */ v10 = float64(1) if ix == *(*Tuint64_t)(unsafe.Pointer(&v10)) { @@ -111038,10 +111036,10 @@ func _log2_inline(tls *TLS, ix Tuint32_t) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF3) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ + k = Int32FromUint32(top) >> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -111087,7 +111085,7 @@ _2: kd -= X__exp2f_data.Fshift_scaled /* k/N */ r = xd - kd /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */ - t = *(*Tuint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + uintptr(ki%uint64(Int32FromInt32(1)<> int32(23) & uint32(0xff)) + e = Int32FromUint32(iy >> int32(23) & uint32(0xff)) if e < int32(0x7f) { return 0 } if e > Int32FromInt32(0x7f)+Int32FromInt32(23) { return int32(2) } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { return 0 } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { return int32(1) } return int32(2) @@ -111145,7 +111143,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { sign_bias = uint32(0) ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) iy = *(*Tuint32_t)(unsafe.Pointer(&y1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ if _zeroinfnan1(tls, iy) != 0 { if uint32(2)*iy == uint32(0) { @@ -111157,10 +111155,10 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { return x1 + y1 } - if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { + if uint32(2)*ix == Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) } - if BoolInt32(uint32(2)*ix < uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { + if BoolInt32(uint32(2)*ix < Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { return Float32FromFloat32(0) } /* |x|<1 && y==inf or |x|>1 && y==-inf. */ return y1 * y1 @@ -111191,7 +111189,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { return X__math_invalidf(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) + sign_bias = Uint32FromInt32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) } ix &= uint32(0x7fffffff) } @@ -111200,7 +111198,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } } logx = _log2_inline(tls, ix) @@ -111324,10 +111322,10 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) - sy = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sy = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint64_t)(unsafe.Pointer(bp + 16))<> Int32FromInt32(12))) uxi = Tuint64_t(uxi | Uint64FromUint64(1)<> Int32FromInt32(12))) @@ -111428,9 +111426,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi = Tuint64_t(uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi x = *(*float64)(unsafe.Pointer(bp + 8)) @@ -111443,9 +111441,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v10 = -int32(q) + v10 = -Int32FromUint32(q) } else { - v10 = int32(q) + v10 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v10 if sx != 0 { @@ -111497,10 +111495,10 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) - sx = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) - sy = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + sx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) + sy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111545,7 +111543,7 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111599,9 +111597,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi x = *(*float32)(unsafe.Pointer(bp + 4)) @@ -111614,9 +111612,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -111662,8 +111660,8 @@ func Xrint(tls *TLS, x float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - s = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + s = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x } @@ -111711,8 +111709,8 @@ func Xrintf(tls *TLS, x float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) - s = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + s = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x } @@ -111770,7 +111768,7 @@ func Xround(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x3 } @@ -111835,7 +111833,7 @@ func Xroundf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x3 } @@ -112059,7 +112057,7 @@ func Xscalbn(tls *TLS, x float64, n int32) (r float64) { } } } - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(Int32FromInt32(0x3ff)+n) << int32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) = Uint64FromInt32(Int32FromInt32(0x3ff)+n) << int32(52) x = y * *(*float64)(unsafe.Pointer(bp)) return x } @@ -112101,7 +112099,7 @@ func Xscalbnf(tls *TLS, x float32, n int32) (r float32) { } } } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32(Int32FromInt32(0x7f)+n) << int32(23) + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32(Int32FromInt32(0x7f)+n) << int32(23) x = y * *(*float32)(unsafe.Pointer(bp)) return x } @@ -112183,7 +112181,7 @@ func Xsin(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) @@ -112256,7 +112254,7 @@ func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) s = X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) c = X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) switch n & Uint32FromInt32(3) { @@ -112403,7 +112401,7 @@ func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) s = X__sindf(tls, *(*float64)(unsafe.Pointer(bp))) c = X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) switch n & Uint32FromInt32(3) { @@ -112465,7 +112463,7 @@ func Xsinf(tls *TLS, x3 float32) (r float32) { var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ @@ -112582,14 +112580,14 @@ func Xsinh(tls *TLS, x float64) (r float64) { h = -h } /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) absx = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(DBL_MAX) */ if w < uint32(0x40862e42) { t = Xexpm1(tls, absx) if w < uint32(0x3ff00000) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<> int32(52) - if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { + if top-uint64(0x001) >= Uint64FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return x1 @@ -112723,7 +112721,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { x = 4^e m; with integer e, and m in [1, 4) m: fixed point representation [2.62] 2^e is the exponent part of the result. */ - even = int32(top & uint64(1)) + even = Int32FromUint64(top & uint64(1)) m = ix<>= uint64(1) @@ -112767,7 +112765,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { /* handle rounding modes and inexact exception: only (s+1)^2 == 2^42 m case is exact otherwise add a tiny value to cause the fenv effects. */ - tiny = uint64(v2) + tiny = Uint64FromInt64(v2) tiny |= (d1 ^ d2) & uint64(0x8000000000000000) t = *(*float64)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112852,7 +112850,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { var v3 int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, t, tiny, u, y, y1, v1, v2, v3, v4 ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return x1 @@ -112866,7 +112864,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 4^e m; with int e and m in [1, 4). */ even = ix & uint32(0x00800000) @@ -112880,7 +112878,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { m = v2 /* 2^e is the exponent part of the return value. */ ey = ix >> int32(1) - ey += uint32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) + ey += Uint32FromInt32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) ey &= uint32(0x7f800000) i = ix >> Int32FromInt32(17) % uint32(128) r = uint32(X__rsqrt_tab[i]) << int32(16) @@ -112912,7 +112910,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { v3 = int32(0x01000000) } /* handle rounding and inexact exception. */ - tiny = uint32(v3) + tiny = Uint32FromInt32(v3) tiny |= (d1 ^ d2) & uint32(0x80000000) t = *(*float32)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112987,8 +112985,8 @@ func Xtan(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) - return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) + return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], Int32FromUint32(n&uint32(1))) } const M_PI_29 = 1.5707963267948966 @@ -113088,8 +113086,8 @@ func Xtanf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x3, bp)) - return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) + return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), Int32FromUint32(n&uint32(1))) } const M_PI_210 = 0 @@ -113126,8 +113124,8 @@ func Xtanh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { @@ -113199,7 +113197,7 @@ func Xtanhf(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) @@ -113424,13 +113422,13 @@ func Xtgamma(tls *TLS, x3 float64) (r1 float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ return x3 + float64(X__builtin_inff(tls)) } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { return x3 } @@ -113583,7 +113581,7 @@ func Xtruncf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { return x3 } @@ -113636,14 +113634,14 @@ func Xa64l(tls *TLS, s uintptr) (r int64) { if !(d != 0) { break } - x |= uint32(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e + x |= Uint32FromInt64(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e goto _1 _1: ; e += int32(6) s++ } - return int64(int32(x)) + return int64(Int32FromUint32(x)) } func Xl64a(tls *TLS, x0 int64) (r uintptr) { @@ -113654,7 +113652,7 @@ func Xl64a(tls *TLS, x0 int64) (r uintptr) { var p uintptr var x Tuint32_t _, _ = p, x - x = uint32(x0) + x = Uint32FromInt64(x0) p = uintptr(unsafe.Pointer(&_s)) for { if !(x != 0) { @@ -113773,7 +113771,7 @@ func Xffs(tls *TLS, i int32) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_l(tls, uint64(i)) + int32(1) + v1 = _a_ctz_l(tls, Uint64FromInt32(i)) + int32(1) } else { v1 = 0 } @@ -113788,7 +113786,7 @@ func Xffsl(tls *TLS, i int64) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_l(tls, uint64(i)) + int32(1) + v1 = _a_ctz_l(tls, Uint64FromInt64(i)) + int32(1) } else { v1 = 0 } @@ -113804,10 +113802,10 @@ func Xffsll(tls *TLS, i int64) (r int32) { var v2 Tuint64_t _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint64(i) + v2 = Uint64FromInt64(i) // __asm__( "bsf %1,%0" : "=r"(x) : "r"(x) ); X__assert_fail(tls, __ccgo_ts+212, __ccgo_ts+247, 114, __ccgo_ts+589) - v3 = int32(v2) + v3 = Int32FromUint64(v2) goto _4 _4: v1 = v3 + int32(1) @@ -114057,7 +114055,7 @@ func X__getauxval(tls *TLS, item uint64) (r uint64) { _ = auxv auxv = X__libc.Fauxv if item == uint64(AT_SECURE) { - return uint64(X__libc.Fsecure) + return Uint64FromInt8(X__libc.Fsecure) } for { if !(*(*Tsize_t)(unsafe.Pointer(auxv)) != 0) { @@ -114137,7 +114135,7 @@ func Xgetentropy(tls *TLS, buffer uintptr, len1 Tsize_t) (r int32) { } } pos += uintptr(ret) - len1 -= uint64(ret) + len1 -= Uint64FromInt32(ret) ret = 0 } _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) @@ -114253,7 +114251,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if *(*Twchar_t)(unsafe.Pointer(bp + 4)) != *(*Twchar_t)(unsafe.Pointer(bp)) || *(*Twchar_t)(unsafe.Pointer(bp)) == int32(':') { Xoptopt = *(*Twchar_t)(unsafe.Pointer(bp)) if int32(*(*int8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+713, optchar, uint64(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+713, optchar, Uint64FromInt32(k)) } return int32('?') } @@ -114274,7 +114272,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { return int32(':') } if Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+737, optchar, uint64(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+737, optchar, Uint64FromInt32(k)) } return int32('?') } @@ -114516,7 +114514,7 @@ func Xgetpriority(tls *TLS, which int32, who Tid_t) (r int32) { } var ret int32 _ = ret - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getpriority), int64(which), int64(who))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getpriority), int64(which), Int64FromUint32(who))))) if ret < 0 { return ret } @@ -114528,7 +114526,7 @@ func Xgetresgid(tls *TLS, rgid uintptr, egid uintptr, sgid uintptr) (r int32) { trc("tls=%v rgid=%v egid=%v sgid=%v, (%v:)", tls, rgid, egid, sgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) } func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { @@ -114536,7 +114534,7 @@ func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { trc("tls=%v ruid=%v euid=%v suid=%v, (%v:)", tls, ruid, euid, suid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) } func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { @@ -114550,7 +114548,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { var v1, v2 uint64 var _ /* k_rlim at bp+0 */ [2]uint64 _, _, _ = ret, v1, v2 - ret = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) if !(ret != 0) { if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur = ^Uint64FromUint64(0) @@ -114562,7 +114560,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { if !(ret != 0) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) { return ret } - if X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getrlimit), int64(resource), int64(bp)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getrlimit), int64(resource), int64(bp)))) < 0 { return -int32(1) } if (*(*[2]uint64)(unsafe.Pointer(bp)))[0] == -Uint64FromUint64(1) { @@ -114610,7 +114608,7 @@ func Xgetrusage(tls *TLS, who int32, ru uintptr) (r1 int32) { Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { @@ -114706,8 +114704,8 @@ var _compat_map = [20]Tioctl_compat_map{ }, }, 2: { - Fnew_req: int32(uint64(Uint32FromUint32(2)<= len1 { + if Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+926, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { return int32(ERANGE) } return 0 @@ -115649,7 +115647,7 @@ func _slash_len(tls *TLS, s uintptr) (r Tsize_t) { for int32(*(*int8)(unsafe.Pointer(s))) == int32('/') { s++ } - return uint64(int64(s) - int64(s0)) + return Uint64FromInt64(int64(s) - int64(s0)) } func Xrealpath(tls *TLS, filename uintptr, resolved uintptr) (r uintptr) { @@ -115712,7 +115710,7 @@ _3: goto _2 } z = X__strchrnul(tls, bp+uintptr(p), int32('/')) - v6 = uint64(int64(z) - int64(bp+uintptr(p))) + v6 = Uint64FromInt64(int64(z) - int64(bp+uintptr(p))) l = v6 l0 = v6 if !(l != 0) && !(check_dir != 0) { @@ -115760,7 +115758,7 @@ _3: } } k = Xreadlink(tls, bp+4097, bp, p) - if uint64(k) == p { + if Uint64FromInt64(k) == p { goto toolong } if !(k != 0) { @@ -115806,8 +115804,8 @@ _8: p++ } } - p -= uint64(k) - Xmemmove(tls, bp+uintptr(p), bp, uint64(k)) + p -= Uint64FromInt64(k) + Xmemmove(tls, bp+uintptr(p), bp, Uint64FromInt64(k)) /* Skip the stack advancement in case we have a new * absolute base path. */ goto restart @@ -115873,7 +115871,7 @@ func Xsetdomainname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), Int64FromUint64(len1))))) } func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { @@ -115881,7 +115879,7 @@ func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { trc("tls=%v which=%v who=%v prio=%v, (%v:)", tls, which, who, prio, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setpriority), int64(which), int64(who), int64(prio))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setpriority), int64(which), Int64FromUint32(who), int64(prio))))) } type Tctx = struct { @@ -115924,7 +115922,7 @@ func Xsetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { } ret = int32(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(rlim), int64(Int32FromInt32(0)))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur < ^Uint64FromUint64(0) { v1 = (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur @@ -115970,7 +115968,7 @@ func Xsyscall(tls *TLS, n int64, va uintptr) (r int64) { e = VaInt64(&ap) f = VaInt64(&ap) _ = ap - return X__syscall_ret(tls, uint64(X__syscall6(tls, n, a, b, c, d, e, f))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, n, a, b, c, d, e, f))) } const AF_ALG = 38 @@ -116398,10 +116396,10 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { pid = v1 l = Xsnprintf(tls, bp+80, uint64(1024), __ccgo_ts+947, VaList(bp+1120, priority, bp, bp+1104, uintptr(unsafe.Pointer(&_log_ident)), __ccgo_ts+969+BoolUintptr(!(pid != 0)), pid, __ccgo_ts+971+BoolUintptr(!(pid != 0)))) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = errno_save - l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-uint64(l), message, ap) + l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-Uint64FromInt32(l), message, ap) if l2 >= 0 { - if uint64(l2) >= uint64(1024)-uint64(l) { - l = int32(Uint64FromInt64(1024) - Uint64FromInt32(1)) + if Uint64FromInt32(l2) >= uint64(1024)-Uint64FromInt32(l) { + l = Int32FromUint64(Uint64FromInt64(1024) - Uint64FromInt32(1)) } else { l += l2 } @@ -116410,7 +116408,7 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { l++ (*(*[1024]int8)(unsafe.Pointer(bp + 80)))[v2] = int8('\n') } - if Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { + if Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { fd = Xopen(tls, __ccgo_ts+666, Int32FromInt32(O_WRONLY)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC), 0) if fd >= 0 { Xdprintf(tls, fd, __ccgo_ts+973, VaList(bp+1120, l-*(*int32)(unsafe.Pointer(bp + 1104)), bp+80+uintptr(*(*int32)(unsafe.Pointer(bp + 1104))))) @@ -116462,7 +116460,7 @@ func Xuname(tls *TLS, uts uintptr) (r int32) { trc("tls=%v uts=%v, (%v:)", tls, uts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) } func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116470,7 +116468,7 @@ func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { trc("tls=%v addr=%v len1=%v advice=%v, (%v:)", tls, addr, len1, advice, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))))) } func Xmadvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116486,7 +116484,7 @@ func Xmincore(tls *TLS, addr uintptr, len1 Tsize_t, vec uintptr) (r int32) { trc("tls=%v addr=%v len1=%v vec=%v, (%v:)", tls, addr, len1, vec, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mincore), int64(addr), int64(len1), int64(vec))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mincore), int64(addr), Int64FromUint64(len1), int64(vec))))) } func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116494,7 +116492,7 @@ func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_mlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_mlock), int64(addr), Int64FromUint64(len1))))) } func Xmlockall(tls *TLS, flags int32) (r int32) { @@ -116502,7 +116500,7 @@ func Xmlockall(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) } const OFF_MASK = 4095 @@ -116518,23 +116516,23 @@ func X__mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd } var ret int64 _ = ret - if uint64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { + if Uint64FromInt64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } - if len1 >= uint64(Int64FromInt64(INT64_MAX)) { + if len1 >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } if flags&int32(MAP_FIXED) != 0 { _dummy5(tls) } - ret = X__syscall6(tls, int64(SYS_mmap), int64(start), int64(len1), int64(prot), int64(flags), int64(fd), off) + ret = X__syscall6(tls, int64(SYS_mmap), int64(start), Int64FromUint64(len1), int64(prot), int64(flags), int64(fd), off) /* Fixup incorrect EPERM from kernel. */ if ret == int64(-int32(EPERM)) && !(start != 0) && flags&int32(MAP_ANON) != 0 && !(flags&Int32FromInt32(MAP_FIXED) != 0) { ret = int64(-int32(ENOMEM)) } - return uintptr(X__syscall_ret(tls, uint64(ret))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(ret))) } func Xmmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { @@ -116552,9 +116550,9 @@ func X__mprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { } var end, start Tsize_t _, _ = end, start - start = uint64(addr) & uint64(-Int32FromInt32(PAGESIZE)) - end = uint64(addr+uintptr(len1)+UintptrFromInt32(PAGESIZE)-UintptrFromInt32(1)) & uint64(-Int32FromInt32(PAGESIZE)) - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mprotect), int64(start), int64(end-start), int64(prot))))) + start = uint64(addr) & Uint64FromInt32(-Int32FromInt32(PAGESIZE)) + end = uint64(addr+uintptr(len1)+UintptrFromInt32(PAGESIZE)-UintptrFromInt32(1)) & Uint64FromInt32(-Int32FromInt32(PAGESIZE)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mprotect), Int64FromUint64(start), Int64FromUint64(end-start), int64(prot))))) } func Xmprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { @@ -116577,7 +116575,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla var new_addr uintptr _, _ = ap, new_addr new_addr = uintptr(0) - if new_len >= uint64(Int64FromInt64(INT64_MAX)) { + if new_len >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } @@ -116587,7 +116585,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla new_addr = VaUintptr(&ap) _ = ap } - return uintptr(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), int64(old_len), int64(new_len), int64(flags), int64(new_addr))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), Int64FromUint64(old_len), Int64FromUint64(new_len), int64(flags), int64(new_addr))))) } func Xmremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, flags int32, va uintptr) (r uintptr) { @@ -116603,7 +116601,7 @@ func Xmsync(tls *TLS, start uintptr, len1 Tsize_t, flags int32) (r int32) { trc("tls=%v start=%v len1=%v flags=%v, (%v:)", tls, start, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msync), int64(start), int64(len1), int64(flags), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msync), int64(start), Int64FromUint64(len1), int64(flags), 0, 0, 0)))) } func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116611,7 +116609,7 @@ func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munlock), int64(addr), Int64FromUint64(len1))))) } func Xmunlockall(tls *TLS) (r int32) { @@ -116619,7 +116617,7 @@ func Xmunlockall(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_munlockall))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_munlockall))))) } func _dummy7(tls *TLS) { @@ -116631,7 +116629,7 @@ func X__munmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { defer func() { trc("-> %v", r) }() } _dummy7(tls) - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munmap), int64(start), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munmap), int64(start), Int64FromUint64(len1))))) } func Xmunmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { @@ -116650,7 +116648,7 @@ func Xposix_madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32 if advice == int32(MADV_DONTNEED) { return 0 } - return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))) + return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))) } func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { @@ -116674,7 +116672,7 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { return uintptr(0) } Xmemcpy(tls, buf, __ccgo_ts+978, uint64(9)) - Xmemcpy(tls, buf+uintptr(9), name, uint64(int64(p)-int64(name)+int64(1))) + Xmemcpy(tls, buf+uintptr(9), name, Uint64FromInt64(int64(p)-int64(name)+int64(1))) return buf } @@ -116740,9 +116738,9 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { var b, v3 int32 var v1, v2 uint32 _, _, _, _ = b, v1, v2, v3 - b = int32(uint8(c)) - if uint32(b) < uint32(128) { - v1 = uint32(b) + b = Int32FromUint8(Uint8FromInt32(c)) + if Uint32FromInt32(b) < uint32(128) { + v1 = Uint32FromInt32(b) } else { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { v3 = int32(4) @@ -116750,7 +116748,7 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { v3 = int32(1) } if v3 == int32(1) && c != -int32(1) { - v2 = uint32(Int32FromInt32(0xdfff) & int32(int8(c))) + v2 = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(int8(c))) } else { v2 = uint32(0xffffffff) } @@ -116782,18 +116780,18 @@ func Xc16rtomb(tls *TLS, s uintptr, c16 Tchar16_t, ps uintptr) (r Tsize_t) { return uint64(1) } if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(c16)-uint32(0xd800) < uint32(0x400) { - *(*uint32)(unsafe.Pointer(x)) = uint32((int32(c16) - int32(0xd7c0)) << int32(10)) + *(*uint32)(unsafe.Pointer(x)) = Uint32FromInt32((Int32FromUint16(c16) - int32(0xd7c0)) << int32(10)) return uint64(0) } if *(*uint32)(unsafe.Pointer(x)) != 0 { if uint32(c16)-uint32(0xdc00) >= uint32(0x400) { goto ilseq } else { - wc = int32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) + wc = Int32FromUint32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) } *(*uint32)(unsafe.Pointer(x)) = uint32(0) } else { - wc = int32(c16) + wc = Int32FromUint16(c16) } return Xwcrtomb(tls, s, wc, uintptr(0)) goto ilseq @@ -116801,7 +116799,7 @@ ilseq: ; *(*uint32)(unsafe.Pointer(x)) = uint32(0) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } var _internal_state uint32 @@ -116811,7 +116809,7 @@ func Xc32rtomb(tls *TLS, s uintptr, c32 Tchar32_t, ps uintptr) (r Tsize_t) { trc("tls=%v s=%v c32=%v ps=%v, (%v:)", tls, s, c32, ps, origin(2)) defer func() { trc("-> %v", r) }() } - return Xwcrtomb(tls, s, int32(c32), ps) + return Xwcrtomb(tls, s, Int32FromUint32(c32), ps) } func Xmblen(tls *TLS, s uintptr, n Tsize_t) (r int32) { @@ -116859,21 +116857,21 @@ func Xmbrtoc16(tls *TLS, pc16 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } /* mbrtowc states for partial UTF-8 characters have the high bit set; * we use nonzero states without high bit for pending surrogates. */ - if int32(*(*uint32)(unsafe.Pointer(pending))) > 0 { + if Int32FromUint32(*(*uint32)(unsafe.Pointer(pending))) > 0 { if pc16 != 0 { *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*uint32)(unsafe.Pointer(pending))) } *(*uint32)(unsafe.Pointer(pending)) = uint32(0) - return uint64(-Int32FromInt32(3)) + return Uint64FromInt32(-Int32FromInt32(3)) } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) { if *(*Twchar_t)(unsafe.Pointer(bp)) >= int32(0x10000) { - *(*uint32)(unsafe.Pointer(pending)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) + *(*uint32)(unsafe.Pointer(pending)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) *(*Twchar_t)(unsafe.Pointer(bp)) = int32(0xd7c0) + *(*Twchar_t)(unsafe.Pointer(bp))>>Int32FromInt32(10) } if pc16 != 0 { - *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar16_t)(unsafe.Pointer(pc16)) = Uint16FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } return ret @@ -116899,7 +116897,7 @@ func Xmbrtoc32(tls *TLS, pc32 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) && pc32 != 0 { - *(*Tchar32_t)(unsafe.Pointer(pc32)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar32_t)(unsafe.Pointer(pc32)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } return ret } @@ -116937,11 +116935,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize } } if !(n != 0) { - return uint64(-Int32FromInt32(2)) + return Uint64FromInt32(-Int32FromInt32(2)) } if !(c != 0) { - if int32(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolUint64(!!(v1 != 0)) } @@ -116951,7 +116949,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize v2 = int32(1) } if v2 == int32(1) { - *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(int8(*(*uint8)(unsafe.Pointer(s)))) + *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(Int8FromUint8(*(*uint8)(unsafe.Pointer(s)))) return Uint64FromInt32(1) } if uint32(*(*uint8)(unsafe.Pointer(s)))-uint32(0xc2) > Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -116963,7 +116961,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize n-- } if n != 0 { - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } goto loop @@ -116971,11 +116969,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize ; v4 = s s++ - c = c<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _9 } @@ -117215,22 +117213,22 @@ _15: ws += 4 v17 = s s++ - *(*Twchar_t)(unsafe.Pointer(v16)) = int32(*(*uint8)(unsafe.Pointer(v17))) + *(*Twchar_t)(unsafe.Pointer(v16)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) v18 = ws ws += 4 v19 = s s++ - *(*Twchar_t)(unsafe.Pointer(v18)) = int32(*(*uint8)(unsafe.Pointer(v19))) + *(*Twchar_t)(unsafe.Pointer(v18)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) v20 = ws ws += 4 v21 = s s++ - *(*Twchar_t)(unsafe.Pointer(v20)) = int32(*(*uint8)(unsafe.Pointer(v21))) + *(*Twchar_t)(unsafe.Pointer(v20)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v21))) v22 = ws ws += 4 v23 = s s++ - *(*Twchar_t)(unsafe.Pointer(v22)) = int32(*(*uint8)(unsafe.Pointer(v23))) + *(*Twchar_t)(unsafe.Pointer(v22)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) wn -= uint64(4) } } @@ -117239,7 +117237,7 @@ _15: ws += 4 v25 = s s++ - *(*Twchar_t)(unsafe.Pointer(v24)) = int32(*(*uint8)(unsafe.Pointer(v25))) + *(*Twchar_t)(unsafe.Pointer(v24)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v25))) wn-- goto _14 } @@ -117252,13 +117250,13 @@ _15: goto resume resume: ; - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _13 } v27 = s s++ - c = c<= uint32(0x40) { s -= uintptr(2) @@ -117266,7 +117264,7 @@ resume: } v28 = s s++ - c = c<= uint32(0x40) { s -= uintptr(3) @@ -117274,12 +117272,12 @@ resume: } v29 = s s++ - c = c< Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117365,14 +117363,14 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { if n < uint64(4) && c<<(uint64(6)*n-uint64(6))&(Uint32FromUint32(1)<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } v4 = s s++ - c = c<= uint32(0x40) { @@ -117380,9 +117378,9 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v5 = s s++ - c = c<= uint32(0x40) { @@ -117390,7 +117388,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v6 = s s++ - *(*Twchar_t)(unsafe.Pointer(wc)) = int32(c<>Int32FromInt32(6)) *(*int8)(unsafe.Pointer(s)) = int8(int32(0x80) | wc&int32(0x3f)) return uint64(2) } else { - if uint32(wc) < uint32(0xd800) || uint32(wc)-uint32(0xe000) < uint32(0x2000) { + if Uint32FromInt32(wc) < uint32(0xd800) || Uint32FromInt32(wc)-uint32(0xe000) < uint32(0x2000) { v3 = s s++ *(*int8)(unsafe.Pointer(v3)) = int8(int32(0xe0) | wc>>Int32FromInt32(12)) @@ -117444,7 +117442,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { *(*int8)(unsafe.Pointer(s)) = int8(int32(0x80) | wc&int32(0x3f)) return uint64(3) } else { - if uint32(wc)-uint32(0x10000) < uint32(0x100000) { + if Uint32FromInt32(wc)-uint32(0x10000) < uint32(0x100000) { v5 = s s++ *(*int8)(unsafe.Pointer(v5)) = int8(int32(0xf0) | wc>>Int32FromInt32(18)) @@ -117462,7 +117460,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { } } *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st uintptr) (r Tsize_t) { @@ -117488,8 +117486,8 @@ func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st u v1 = dst } l = Xwcrtomb(tls, v1, *(*Twchar_t)(unsafe.Pointer(ws)), uintptr(0)) - if l == uint64(-Int32FromInt32(1)) { - cnt = uint64(-Int32FromInt32(1)) + if l == Uint64FromInt32(-Int32FromInt32(1)) { + cnt = Uint64FromInt32(-Int32FromInt32(1)) break } if dst != 0 { @@ -117535,10 +117533,10 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize if !(*(*Twchar_t)(unsafe.Pointer(ws2)) != 0) { break } - if uint32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(ws2)), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } n += l } else { @@ -117552,7 +117550,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize return n } for n >= uint64(4) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*int8)(unsafe.Pointer(s)) = 0 *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117560,7 +117558,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, s, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } s += uintptr(l) n -= l @@ -117573,7 +117571,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize *(*uintptr)(unsafe.Pointer(ws)) += 4 } for n != 0 { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*int8)(unsafe.Pointer(s)) = 0 *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117581,7 +117579,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if l > n { return N - n @@ -117619,7 +117617,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { var v1 int32 _ = v1 if c < uint32(128) { - return int32(c) + return Int32FromUint32(c) } if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { v1 = int32(4) @@ -117627,7 +117625,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { v1 = int32(1) } if v1 == int32(1) && c-uint32(0xdf80) < uint32(0x80) { - return int32(uint8(c)) + return Int32FromUint8(uint8(c)) } return -int32(1) } @@ -117640,7 +117638,7 @@ func Xwctomb(tls *TLS, s uintptr, wc Twchar_t) (r int32) { if !(s != 0) { return 0 } - return int32(Xwcrtomb(tls, s, wc, uintptr(0))) + return Int32FromUint64(Xwcrtomb(tls, s, wc, uintptr(0))) } func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { @@ -117672,7 +117670,7 @@ func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } type Tucred = struct { @@ -117718,7 +117716,7 @@ func Xaccept4(tls *TLS, fd int32, addr uintptr, len1 uintptr, flg int32) (r1 int v8 = r goto _9 _9: - ret = int32(X__syscall_ret(tls, uint64(v8))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(v8))) if ret >= 0 || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) && *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(EINVAL) { return ret } @@ -117752,7 +117750,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_bind) v2 = int64(fd) v3 = int64(addr) - v4 = int64(len1) + v4 = Int64FromUint32(len1) v5 = int64(Int32FromInt32(0)) v6 = int64(Int32FromInt32(0)) v7 = int64(Int32FromInt32(0)) @@ -117768,7 +117766,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { @@ -117784,7 +117782,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_connect) v2 = int64(fd) v3 = int64(addr) - v4 = int64(len1) + v4 = Int64FromUint32(len1) v5 = int64(Int32FromInt32(0)) v6 = int64(Int32FromInt32(0)) v7 = int64(Int32FromInt32(0)) @@ -117800,7 +117798,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } const ADD = 0 @@ -118710,11 +118708,11 @@ func _getoffs(tls *TLS, offs uintptr, base uintptr, s uintptr) (r int32) { _, _ = i, v2 i = 0 for { - for int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { - if int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { return 0 } - s = base + uintptr(int32(*(*uint8)(unsafe.Pointer(s)))&Int32FromInt32(0x3f)< uint32(62) { + if Uint32FromInt32(j-k)-uint32(1) > uint32(62) { return 0 } v3 = i i++ - *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = uint8(j - k) + *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = Uint8FromInt32(j - k) if j == l { return i } @@ -118786,12 +118784,12 @@ func _match(tls *TLS, offset uintptr, base uintptr, dn uintptr, end uintptr, len for { nlen-- v2 = nlen - l = int32(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) + l = Int32FromUint8(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) noff-- v3 = noff o = int32((*(*[128]int16)(unsafe.Pointer(bp)))[v3]) end -= uintptr(l) - if l != int32(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, uint64(l)) != 0 { + if l != Int32FromUint8(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, Uint64FromInt32(l)) != 0 { return m } *(*int32)(unsafe.Pointer(offset)) = o @@ -118836,7 +118834,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l return int32(1) } end = src + uintptr(l) - n = _getlens(tls, bp+4, src, int32(l)) + n = _getlens(tls, bp+4, src, Int32FromUint64(l)) if !(n != 0) { return -int32(1) } @@ -118851,7 +118849,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l if m > bestlen { bestlen = m bestoff = *(*int32)(unsafe.Pointer(bp)) - if uint64(m) == l { + if Uint64FromInt32(m) == l { break } } @@ -118862,15 +118860,15 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l } } /* encode unmatched part */ - if uint64(space) < l-uint64(bestlen)+uint64(2)+BoolUint64(uint64(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { + if Uint64FromInt32(space) < l-Uint64FromInt32(bestlen)+uint64(2)+BoolUint64(Uint64FromInt32(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { return -int32(1) } - Xmemcpy(tls, dst+uintptr(1), src, l-uint64(bestlen)) + Xmemcpy(tls, dst+uintptr(1), src, l-Uint64FromInt32(bestlen)) v3 = Int32FromInt32(0) j = v3 i = v3 for { - if !(uint64(i) < l-uint64(bestlen)) { + if !(Uint64FromInt32(i) < l-Uint64FromInt32(bestlen)) { break } *(*uint8)(unsafe.Pointer(dst + uintptr(i))) = (*(*[127]uint8)(unsafe.Pointer(bp + 4)))[j] @@ -118879,16 +118877,16 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l ; v4 = j j++ - i += int32((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) + i += Int32FromUint8((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) } /* add tail */ if bestlen != 0 { v5 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = uint8(int32(0xc0) | bestoff>>int32(8)) + *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = Uint8FromInt32(int32(0xc0) | bestoff>>int32(8)) v6 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(bestoff) + *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = Uint8FromInt32(bestoff) } else { v7 = i i++ @@ -118936,11 +118934,11 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr break } /* loop invariants: p= int64(end)-int64(p) || int64(j) >= int64(dend)-int64(dest) { return -int32(1) } @@ -118971,7 +118969,7 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr dest++ v7 = p p++ - *(*int8)(unsafe.Pointer(v6)) = int8(*(*uint8)(unsafe.Pointer(v7))) + *(*int8)(unsafe.Pointer(v6)) = Int8FromUint8(*(*uint8)(unsafe.Pointer(v7))) } } else { *(*int8)(unsafe.Pointer(dest)) = 0 @@ -119009,17 +119007,17 @@ func Xdn_skipname(tls *TLS, s uintptr, end uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { return int32(int64(p) - int64(s) + int64(1)) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { if p+uintptr(1) < end { return int32(int64(p) - int64(s) + int64(2)) } else { break } } else { - if int64(end)-int64(p) < int64(int32(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { + if int64(end)-int64(p) < int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { break } else { - p += uintptr(int32(*(*uint8)(unsafe.Pointer(p))) + int32(1)) + p += uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + int32(1)) } } } @@ -119133,12 +119131,12 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if rlen < int32(12) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { return 0 } p = r + uintptr(12) - qdcount = int32(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 5))) - ancount = int32(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 7))) + qdcount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 5))) + ancount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 7))) for { v1 = qdcount qdcount-- @@ -119166,11 +119164,11 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr return -int32(1) } p += uintptr(int32(1) + BoolInt32(!!(*(*uint8)(unsafe.Pointer(p)) != 0))) - len1 = int32(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(p + 9))) + len1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 9))) if int64(len1+int32(10)) > int64(r+uintptr(rlen))-int64(p) { return -int32(1) } - if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, int32(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { + if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { return -int32(1) } p += uintptr(int32(10) + len1) @@ -119567,7 +119565,7 @@ func Xether_ntoa_r(tls *TLS, p_a uintptr, x uintptr) (r uintptr) { } else { v2 = __ccgo_ts + 993 } - x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, int32(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) + x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) goto _1 _1: ; @@ -119789,14 +119787,14 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt return -int32(5) } nais = nservs * naddrs - canon_len = int32(Xstrlen(tls, bp+1352)) - out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(88)+uint64(canon_len)+uint64(1)) + canon_len = Int32FromUint64(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), Uint64FromInt32(nais)*uint64(88)+Uint64FromInt32(canon_len)+uint64(1)) if !(out != 0) { return -int32(10) } if canon_len != 0 { outcanon = out + uintptr(nais)*88 - Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+int32(1))) + Xmemcpy(tls, outcanon, bp+1352, Uint64FromInt32(canon_len+int32(1))) } else { outcanon = uintptr(0) } @@ -119820,8 +119818,8 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*88))).Fai = Taddrinfo{ Fai_family: (*(*[48]Taddress)(unsafe.Pointer(bp + 8)))[i].Ffamily, - Fai_socktype: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), - Fai_protocol: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), + Fai_socktype: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), + Fai_protocol: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), Fai_addrlen: uint32(v5), Fai_addr: out + uintptr(k)*88 + 48, Fai_canonname: outcanon, @@ -120019,7 +120017,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu Fsin Tsockaddr_in F__ccgo_pad2 [12]byte }{} - *(*uint16)(unsafe.Pointer(bp)) = uint16(af) + *(*uint16)(unsafe.Pointer(bp)) = Uint16FromInt32(af) if af == int32(PF_INET6) { v1 = uint64(28) } else { @@ -120039,15 +120037,15 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu } } /* Align buffer and check for space for pointers and ip address */ - i = int32(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) + i = Int32FromUint64(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) if !(i != 0) { i = int32(8) } - if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-uint64(i)+uint64(l) { + if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-Uint64FromInt32(i)+uint64(l) { return int32(ERANGE) } - buf += uintptr(uint64(8) - uint64(i)) - buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - uint64(i) + uint64(l) + buf += uintptr(uint64(8) - Uint64FromInt32(i)) + buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - Uint64FromInt32(i) + uint64(l) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(Uint64FromInt32(2) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf @@ -120076,7 +120074,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu break } (*Thostent)(unsafe.Pointer(h)).Fh_addrtype = af - (*Thostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*Thostent)(unsafe.Pointer(h)).Fh_length = Int32FromUint32(l) (*Thostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 @@ -120163,7 +120161,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, /* Align buffer */ align = -uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1)) need = Uint64FromInt32(4) * Uint64FromInt64(8) - need += uint64(cnt+Int32FromInt32(1)) * (uint64(8) + uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + need += Uint64FromInt32(cnt+Int32FromInt32(1)) * (uint64(8) + Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) need += Xstrlen(tls, name) + uint64(1) need += Xstrlen(tls, bp+1344) + uint64(1) need += align @@ -120174,7 +120172,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(Uint64FromInt32(3) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf - buf += uintptr(uint64(cnt+Int32FromInt32(1)) * uint64(8)) + buf += uintptr(Uint64FromInt32(cnt+Int32FromInt32(1)) * uint64(8)) i = 0 for { if !(i < cnt) { @@ -120182,7 +120180,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf buf += uintptr((*Thostent)(unsafe.Pointer(h)).Fh_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) goto _2 _2: ; @@ -120431,17 +120429,17 @@ func _copy_addr(tls *TLS, r uintptr, af int32, sa uintptr, addr uintptr, addrlen case int32(PF_INET6): dst = sa + 8 len1 = int32(16) - if int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { - (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = uint32(ifindex) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { + (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = Uint32FromInt32(ifindex) } default: return } - if addrlen < uint64(len1) { + if addrlen < Uint64FromInt32(len1) { return } - (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(af) - Xmemcpy(tls, dst, addr, uint64(len1)) + (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = Uint16FromInt32(af) + Xmemcpy(tls, dst, addr, Uint64FromInt32(len1)) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -120452,15 +120450,15 @@ func _gen_netmask(tls *TLS, r uintptr, af int32, sa uintptr, prefixlen int32) { var _ /* addr at bp+0 */ [16]Tuint8_t _, _ = i, v1 *(*[16]Tuint8_t)(unsafe.Pointer(bp)) = [16]Tuint8_t{} - if uint64(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { - prefixlen = int32(Uint64FromInt32(8) * Uint64FromInt64(16)) + if Uint64FromInt32(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { + prefixlen = Int32FromUint64(Uint64FromInt32(8) * Uint64FromInt64(16)) } i = prefixlen / int32(8) - Xmemset(tls, bp, int32(0xff), uint64(i)) - if uint64(i) < uint64(16) { + Xmemset(tls, bp, int32(0xff), Uint64FromInt32(i)) + if Uint64FromInt32(i) < uint64(16) { v1 = i i++ - (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = uint8(int32(0xff) << (int32(8) - prefixlen%int32(8))) + (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = Uint8FromInt32(int32(0xff) << (int32(8) - prefixlen%int32(8))) } _copy_addr(tls, r, af, sa, bp, uint64(16), 0) } @@ -120486,21 +120484,21 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { ifi = h + UintptrFromInt64(16) ifa = h + UintptrFromInt64(16) stats_len = 0 - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { goto _1 } - stats_len = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) + stats_len = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) break goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } } else { ifs0 = *(*uintptr)(unsafe.Pointer(ctx + 16 + uintptr((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index%uint32(IFADDRS_HASH_SIZE))*8)) @@ -120520,19 +120518,19 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { return 0 } } - ifs = Xcalloc(tls, uint64(1), uint64(200)+uint64(stats_len)) + ifs = Xcalloc(tls, uint64(1), uint64(200)+Uint64FromInt32(stats_len)) if ifs == uintptr(0) { return -int32(1) } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = uint32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = Uint32FromInt32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFLA_IFNAME): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120550,7 +120548,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _3 _3: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { bucket = (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex % uint32(IFADDRS_HASH_SIZE) @@ -120560,22 +120558,22 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { } else { (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_name (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFA_ADDRESS): /* If ifa_addr is already set we, received an IFA_LOCAL before * so treat this as destination address */ if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } else { - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } case int32(IFA_BROADCAST): - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LOCAL): /* If ifa_addr is set and we get IFA_LOCAL, assume we have * a point-to-point network. Move address to correct field. */ @@ -120584,7 +120582,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { *(*uintptr)(unsafe.Pointer(ifs + 40)) = ifs + 136 Xmemset(tls, ifs+64, 0, uint64(36)) } - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LABEL): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120595,10 +120593,10 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _4 _4: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _gen_netmask(tls, ifs+32, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) + _gen_netmask(tls, ifs+32, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) } } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { @@ -120649,7 +120647,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { for cond := true; cond; cond = x != 0 { p-- v2 = p - *(*int8)(unsafe.Pointer(v2)) = int8(uint32('0') + x%uint32(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint32(uint32('0') + x%uint32(10)) x /= uint32(10) } return p @@ -120658,7 +120656,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { func _mkptr4(tls *TLS, s uintptr, ip uintptr) { bp := tls.Alloc(48) defer tls.Free(48) - Xsprintf(tls, s, __ccgo_ts+999, VaList(bp+8, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) + Xsprintf(tls, s, __ccgo_ts+999, VaList(bp+8, Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 3))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip))))) } func _mkptr6(tls *TLS, s uintptr, ip uintptr) { @@ -120672,13 +120670,13 @@ func _mkptr6(tls *TLS, s uintptr, ip uintptr) { } v2 = s s++ - *(*int8)(unsafe.Pointer(v2)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] + *(*int8)(unsafe.Pointer(v2)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] v3 = s s++ *(*int8)(unsafe.Pointer(v3)) = int8('.') v4 = s s++ - *(*int8)(unsafe.Pointer(v4)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] + *(*int8)(unsafe.Pointer(v4)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] v5 = s s++ *(*int8)(unsafe.Pointer(v5)) = int8('.') @@ -120726,7 +120724,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int for { if v7 = *(*int8)(unsafe.Pointer(p)) != 0; v7 { v4 = int32(*(*int8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120758,7 +120756,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int for { if v13 = *(*int8)(unsafe.Pointer(p)) != 0; v13 { v10 = int32(*(*int8)(unsafe.Pointer(p))) - v11 = BoolInt32(v10 == int32(' ') || uint32(v10)-uint32('\t') < uint32(5)) + v11 = BoolInt32(v10 == int32(' ') || Uint32FromInt32(v10)-uint32('\t') < uint32(5)) goto _12 _12: } @@ -120774,7 +120772,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int for { if v18 = *(*int8)(unsafe.Pointer(z)) != 0; v18 { v15 = int32(*(*int8)(unsafe.Pointer(z))) - v16 = BoolInt32(v15 == int32(' ') || uint32(v15)-uint32('\t') < uint32(5)) + v16 = BoolInt32(v15 == int32(' ') || Uint32FromInt32(v15)-uint32('\t') < uint32(5)) goto _17 _17: } @@ -120788,7 +120786,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } *(*int8)(unsafe.Pointer(z)) = 0 if int64(z)-int64(p) < int64(256) { - Xmemcpy(tls, buf, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, buf, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) break } } @@ -120824,7 +120822,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { for { if v7 = *(*int8)(unsafe.Pointer(p)) != 0; v7 { v4 = int32(*(*int8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120843,7 +120841,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p++ *(*int8)(unsafe.Pointer(v8)) = 0 svport = Xstrtoul(tls, p, bp+128, int32(10)) - if svport != uint64(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { + if svport != Uint64FromInt32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { continue } if dgram != 0 && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+1071, uint64(4)) != 0 { @@ -120855,7 +120853,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { if int64(p)-t__predefined_ptrdiff_t(bp) > int64(32) { continue } - Xmemcpy(tls, buf, bp, uint64(int64(p)-t__predefined_ptrdiff_t(bp))) + Xmemcpy(tls, buf, bp, Uint64FromInt64(int64(p)-t__predefined_ptrdiff_t(bp))) break } X__fclose_ca(tls, f) @@ -120888,7 +120886,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso var _ /* reply at bp+443 */ [512]uint8 var _ /* tmp at bp+955 */ [17]int8 _, _, _, _, _, _, _, _, _ = a, af, p, p1, port, qlen, rlen, scopeid, v1 - af = int32((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) + af = Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) switch af { case int32(PF_INET): a = sa + 4 @@ -120922,7 +120920,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso rlen = X__res_send(tls, bp+347, qlen, bp+443, int32(512)) (*(*[256]int8)(unsafe.Pointer(bp + 78)))[0] = 0 if rlen > 0 { - if uint64(rlen) > uint64(512) { + if Uint64FromInt32(rlen) > uint64(512) { rlen = int32(512) } X__dns_parse(tls, bp+443, rlen, __ccgo_fp(_dns_parse_callback), bp+78) @@ -120935,7 +120933,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso Xinet_ntop(tls, af, a, bp+78, uint32(256)) if scopeid != 0 { p = uintptr(0) - if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { + if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { p = Xif_indextoname(tls, scopeid, bp+955+uintptr(1)) } if !(p != 0) { @@ -120954,13 +120952,13 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso } if serv != 0 && servlen != 0 { p1 = bp + 78 - port = int32(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) + port = Int32FromUint16(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) (*(*[256]int8)(unsafe.Pointer(bp + 78)))[0] = 0 if !(flags&Int32FromInt32(NI_NUMERICSERV) != 0) { _reverse_services(tls, bp+78, port, flags&int32(NI_DGRAM)) } if !(*(*int8)(unsafe.Pointer(p1)) != 0) { - p1 = _itoa(tls, bp+334, uint32(port)) + p1 = _itoa(tls, bp+334, Uint32FromInt32(port)) } if Xstrlen(tls, p1) >= uint64(servlen) { return -int32(12) @@ -120999,7 +120997,7 @@ func Xgetpeername(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xgetservbyname(tls *TLS, name uintptr, prots uintptr) (r uintptr) { @@ -121042,8 +121040,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin return int32(ENOENT) } /* Align buffer */ - align = int32(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) - if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+uint64(align) { + align = Int32FromUint64(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) + if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+Uint64FromInt32(align) { return int32(ERANGE) } buf += uintptr(align) @@ -121075,8 +121073,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin (*Tservent)(unsafe.Pointer(se)).Fs_aliases = buf *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases)) = (*Tservent)(unsafe.Pointer(se)).Fs_name *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases + 1*8)) = uintptr(0) - (*Tservent)(unsafe.Pointer(se)).Fs_port = int32(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) - if int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { + (*Tservent)(unsafe.Pointer(se)).Fs_port = Int32FromUint16(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) + if Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { v1 = __ccgo_ts + 1081 } else { v1 = __ccgo_ts + 1085 @@ -121115,7 +121113,7 @@ func Xgetsockname(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xgetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, optlen uintptr) (r2 int32) { @@ -121163,7 +121161,7 @@ _9: break } if uint64(*(*Tsocklen_t)(unsafe.Pointer(optlen))) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -121239,7 +121237,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func X__h_errno_location(tls *TLS) (r uintptr) { @@ -121369,14 +121367,14 @@ func Xhtons(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*int8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } func Xif_freenameindex(tls *TLS, idx uintptr) { @@ -121401,7 +121399,7 @@ func Xif_indextoname(tls *TLS, index uint32, name uintptr) (r1 uintptr) { if v1 < 0 { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 16)) = int32(index) + *(*int32)(unsafe.Pointer(bp + 16)) = Int32FromUint32(index) r = Xioctl(tls, fd, int32(SIOCGIFNAME), VaList(bp+48, bp)) X__syscall1(tls, int64(SYS_close), int64(fd)) if r < 0 { @@ -121435,25 +121433,25 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { var i, v2 uint32 _, _, _, _, _, _, _, _, _, _, _, _ = a, bucket, ctx, i, ifa, ifi, index, map1, namelen, rta, type1, v2 ctx = pctx - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { ifi = h + UintptrFromInt64(16) index = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index type1 = int32(IFLA_IFNAME) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } else { ifa = h + UintptrFromInt64(16) - index = int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) + index = Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) type1 = int32(IFA_LABEL) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { goto _1 } - namelen = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) + namelen = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) if namelen > int32(IF_NAMESIZE) { return 0 } @@ -121462,7 +121460,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { i = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) for i != 0 { map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr(i-uint32(1))*28 - if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == uint32(index) && int32((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) == 0 { + if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == Uint32FromInt32(index) && Int32FromUint8((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) == 0 { return 0 } i = (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next @@ -121485,10 +121483,10 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fallocated = uint32(a) } map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*28 - (*Tifnamemap)(unsafe.Pointer(map1)).Findex = uint32(index) - (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = uint8(namelen) - Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) - *(*uint32)(unsafe.Pointer(ctx + 8)) += uint32(namelen + int32(1)) + (*Tifnamemap)(unsafe.Pointer(map1)).Findex = Uint32FromInt32(index) + (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = Uint8FromInt32(namelen) + Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) + *(*uint32)(unsafe.Pointer(ctx + 8)) += Uint32FromInt32(namelen + int32(1)) (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum++ (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum @@ -121496,7 +121494,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } return 0 } @@ -121525,7 +121523,7 @@ func Xif_nameindex(tls *TLS) (r uintptr) { goto err } p = ifs + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*16 + UintptrFromInt32(1)*16 - i = int32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) + i = Int32FromUint32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) d = ifs s = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist for { @@ -121580,7 +121578,7 @@ func Xif_nametoindex(tls *TLS, name uintptr) (r1 uint32) { } else { v2 = *(*int32)(unsafe.Pointer(bp + 16)) } - return uint32(v2) + return Uint32FromInt32(v2) } func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { @@ -121592,7 +121590,7 @@ func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { defer tls.Free(16) var _ /* a at bp+0 */ Tin_addr if !(X__inet_aton(tls, p, bp) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } return (*(*Tin_addr)(unsafe.Pointer(bp))).Fs_addr } @@ -121618,7 +121616,7 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) (r int32) { break } (*(*[4]uint64)(unsafe.Pointer(bp)))[i] = Xstrtoul(tls, s, bp+32, 0) - if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return 0 } if !(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0) { @@ -121743,7 +121741,7 @@ func Xinet_ntoa(tls *TLS, _in Tin_addr) (r uintptr) { var a uintptr _ = a a = bp - Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1097, VaList(bp+16, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3))))) + Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1097, VaList(bp+16, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))))) return uintptr(unsafe.Pointer(&_buf4)) } @@ -121764,14 +121762,14 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint a = a0 switch af { case int32(PF_INET): - if uint32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1097, VaList(bp+112, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + if Uint32FromInt32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1097, VaList(bp+112, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { return s } case int32(PF_INET6): if Xmemcmp(tls, a, __ccgo_ts+1044, uint64(12)) != 0 { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1109, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1109, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } else { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1133, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1133, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } /* Replace longest /(^0|:)[:0]{2,}/ with "::" */ v2 = Int32FromInt32(0) @@ -121785,7 +121783,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint if i != 0 && int32((*(*[100]int8)(unsafe.Pointer(bp)))[i]) != int32(':') { goto _1 } - j = int32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1163)) + j = Int32FromUint64(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1163)) if j > max { best = i max = j @@ -121799,7 +121797,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint v3 = Int8FromUint8(':') (*(*[100]int8)(unsafe.Pointer(bp)))[best+int32(1)] = v3 (*(*[100]int8)(unsafe.Pointer(bp)))[best] = v3 - Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), uint64(i-best-max+int32(1))) + Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), Uint64FromInt32(i-best-max+int32(1))) } if Xstrlen(tls, bp) < uint64(l) { Xstrcpy(tls, s, bp) @@ -121815,11 +121813,11 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint func _hexval(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -121849,7 +121847,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { j = v3 v = v3 for { - if !(j < int32(3) && BoolInt32(uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { + if !(j < int32(3) && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { break } v = int32(10)*v + int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') @@ -121861,7 +121859,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 || j > int32(1) && int32(*(*int8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { return 0 } - *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = Uint8FromInt32(v) if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { return int32(1) } @@ -121908,7 +121906,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { v = v9 for { if v11 = j < int32(4); v11 { - v10 = _hexval(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))) + v10 = _hexval(tls, Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(j))))) d = v10 } if !(v11 && v10 >= 0) { @@ -121923,7 +121921,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 { return 0 } - (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(v) + (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = Uint16FromInt32(v) if !(*(*int8)(unsafe.Pointer(s + uintptr(j))) != 0) && (brk >= 0 || i == int32(7)) { break } @@ -121946,7 +121944,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { i++ } if brk >= 0 { - Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(int32(2)*(i+int32(1)-brk))) + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, Uint64FromInt32(int32(2)*(i+int32(1)-brk))) j = 0 for { if !(j < int32(7)-i) { @@ -121966,7 +121964,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { } v14 = a a++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint16((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) v15 = a a++ *(*uint8)(unsafe.Pointer(v15)) = uint8((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) @@ -122010,7 +122008,7 @@ func Xlisten(tls *TLS, fd int32, backlog int32) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r int32) { @@ -122039,7 +122037,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i p = Xstrchr(tls, name, int32('%')) scopeid = uint64(0) if p != 0 && int64(p)-int64(name) < int64(64) { - Xmemcpy(tls, bp+20, name, uint64(int64(p)-int64(name))) + Xmemcpy(tls, bp+20, name, Uint64FromInt64(int64(p)-int64(name))) (*(*[64]int8)(unsafe.Pointer(bp + 20)))[int64(p)-int64(name)] = 0 name = bp + 20 } @@ -122054,13 +122052,13 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i if p != 0 { p++ v1 = p - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(v1)))-uint32('0') < uint32(10)) != 0 { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(v1)))-uint32('0') < uint32(10)) != 0 { scopeid = Xstrtoull(tls, p, bp+88, int32(10)) } else { *(*uintptr)(unsafe.Pointer(bp + 88)) = p - uintptr(1) } if *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { - if !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { + if !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { return -int32(2) } scopeid = uint64(Xif_nametoindex(tls, p)) @@ -122091,12 +122089,12 @@ const RR_CNAME = 5 func _is_valid_hostname(tls *TLS, host uintptr) (r int32) { var s uintptr _ = s - if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == uint64(-Int32FromInt32(1)) { + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == Uint64FromInt32(-Int32FromInt32(1)) { return 0 } s = host for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || int32(*(*uint8)(unsafe.Pointer(s))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) != 0) { break } goto _1 @@ -122202,13 +122200,13 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family p = v4 if v12 = v4 != 0; v12 { v5 = int32(*(*int8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: ; if v11 = !(v6 != 0); !v11 { v8 = int32(*(*int8)(unsafe.Pointer(p + uintptr(l)))) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -122229,7 +122227,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family for { if v17 = *(*int8)(unsafe.Pointer(p)) != 0; v17 { v14 = int32(*(*int8)(unsafe.Pointer(p))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: } @@ -122260,7 +122258,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family for { if v23 = *(*int8)(unsafe.Pointer(p)) != 0; v23 { v20 = int32(*(*int8)(unsafe.Pointer(p))) - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: } @@ -122276,7 +122274,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family for { if v28 = *(*int8)(unsafe.Pointer(z)) != 0; v28 { v25 = int32(*(*int8)(unsafe.Pointer(z))) - v26 = BoolInt32(v25 == int32(' ') || uint32(v25)-uint32('\t') < uint32(5)) + v26 = BoolInt32(v25 == int32(' ') || Uint32FromInt32(v25)-uint32('\t') < uint32(5)) goto _27 _27: } @@ -122291,7 +122289,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family *(*int8)(unsafe.Pointer(z)) = 0 if _is_valid_hostname(tls, p) != 0 { have_canon = int32(1) - Xmemcpy(tls, canon, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, canon, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) } } X__fclose_ca(tls, f) @@ -122348,7 +122346,7 @@ func _dns_parse_callback1(tls *TLS, c uintptr, rr int32, data uintptr, len1 int3 v2 = ctx + 16 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ - Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, uint64(len1)) + Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, Uint64FromInt32(len1)) return 0 } @@ -122391,7 +122389,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i qtypes[nq] = _afrr[i].Frr *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280 + 3)) = uint8(0) /* don't need AD flag */ /* Ensure query IDs are distinct. */ - if nq != 0 && int32(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == int32(*(*uint8)(unsafe.Pointer(bp))) { + if nq != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) { *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))++ } nq++ @@ -122409,13 +122407,13 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i if !(i < nq) { break } - if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { + if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { return -int32(4) } goto _2 @@ -122429,7 +122427,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i break } (*(*Tdpc_ctx)(unsafe.Pointer(bp + 10208))).Frrtype = qtypes[i] - if uint64((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { + if Uint64FromInt32((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] = int32(4800) } X__dns_parse(tls, bp+560+uintptr(i)*4800, (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i], __ccgo_fp(_dns_parse_callback1), bp+10208) @@ -122515,7 +122513,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f } for { v5 = int32(*(*int8)(unsafe.Pointer(p))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -122530,7 +122528,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f for { if v12 = *(*int8)(unsafe.Pointer(z)) != 0; v12 { v9 = int32(*(*int8)(unsafe.Pointer(z))) - v10 = BoolInt32(v9 == int32(' ') || uint32(v9)-uint32('\t') < uint32(5)) + v10 = BoolInt32(v9 == int32(' ') || Uint32FromInt32(v9)-uint32('\t') < uint32(5)) goto _11 _11: } @@ -122545,9 +122543,9 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if z == p { break } - if uint64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { - Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, uint64(int64(z)-int64(p))) - *(*int8)(unsafe.Pointer(canon + uintptr(uint64(int64(z)-int64(p)+int64(1))+l))) = 0 + if Uint64FromInt64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { + Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, Uint64FromInt64(int64(z)-int64(p))) + *(*int8)(unsafe.Pointer(canon + uintptr(Uint64FromInt64(int64(z)-int64(p)+int64(1))+l))) = 0 cnt = _name_from_dns(tls, buf, canon, canon, family, bp+256) if cnt != 0 { return cnt @@ -122619,7 +122617,7 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&_defpolicy))+uintptr(i)*20, uint64(_defpolicy[i].Flen1)) != 0 { goto _1 } - if int32(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&int32(_defpolicy[i].Fmask) != int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&Int32FromUint8(_defpolicy[i].Fmask) != Int32FromUint8(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { goto _1 } return uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 @@ -122632,20 +122630,20 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { } func _labelof(tls *TLS, a uintptr) (r int32) { - return int32((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) + return Int32FromUint8((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) } func _scopeof(tls *TLS, a uintptr) (r int32) { - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { - return int32(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { + return Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { return int32(2) } - if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { + if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { return int32(2) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { return int32(5) } return int32(14) @@ -122656,7 +122654,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(128) && !((int32(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^int32(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { + if !(i < uint32(128) && !((Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { break } goto _1 @@ -122664,7 +122662,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { ; i++ } - return int32(i) + return Int32FromUint32(i) } func _addrcmp(tls *TLS, _a uintptr, _b uintptr) (r int32) { @@ -122849,8 +122847,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } dpolicy = _policyof(tls, bp+32+8) dscope = _scopeof(tls, bp+32+8) - dlabel = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) - dprec = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) + dlabel = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) + dprec = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) prefixlen = 0 fd = Xsocket(tls, family1, Int32FromInt32(SOCK_DGRAM)|Int32FromInt32(SOCK_CLOEXEC), int32(IPPROTO_UDP)) if fd >= 0 { @@ -122881,7 +122879,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i ; i++ } - Xqsort(tls, buf, uint64(cnt), uint64(28), __ccgo_fp(_addrcmp)) + Xqsort(tls, buf, Uint64FromInt32(cnt), uint64(28), __ccgo_fp(_addrcmp)) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) return cnt } @@ -122932,8 +122930,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -int32(8) } (*(*Tservice)(unsafe.Pointer(buf))).Fport = uint16(0) - (*(*Tservice)(unsafe.Pointer(buf))).Fproto = uint8(proto) - (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(socktype) + (*(*Tservice)(unsafe.Pointer(buf))).Fproto = Uint8FromInt32(proto) + (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = Uint8FromInt32(socktype) return int32(1) } if name != 0 { @@ -122998,7 +122996,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } if v10 = p > bp; v10 { v7 = int32(*(*int8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v8 = BoolInt32(v7 == int32(' ') || uint32(v7)-uint32('\t') < uint32(5)) + v8 = BoolInt32(v7 == int32(' ') || Uint32FromInt32(v7)-uint32('\t') < uint32(5)) goto _9 _9: } @@ -123007,7 +123005,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } if v14 = *(*int8)(unsafe.Pointer(p + uintptr(l))) != 0; v14 { v11 = int32(*(*int8)(unsafe.Pointer(p + uintptr(l)))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: } @@ -123028,7 +123026,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i for { if v19 = *(*int8)(unsafe.Pointer(p)) != 0; v19 { v16 = int32(*(*int8)(unsafe.Pointer(p))) - v17 = BoolInt32(v16 == int32(' ') || uint32(v16)-uint32('\t') < uint32(5)) + v17 = BoolInt32(v16 == int32(' ') || Uint32FromInt32(v16)-uint32('\t') < uint32(5)) goto _18 _18: } @@ -123110,7 +123108,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = uint16(type1) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = Uint16FromInt32(type1) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123121,7 +123119,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = uint16(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = Uint16FromInt32(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123143,7 +123141,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fg.Frtgen_family = uint8(af) + })(unsafe.Pointer(bp))))).Fg.Frtgen_family = Uint8FromInt32(af) r = int32(Xsend(tls, fd, bp, uint64(20), 0)) if r < 0 { return r @@ -123155,13 +123153,13 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } h = bp for { - if !(uint64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { + if !(Uint64FromInt64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { break } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { return 0 } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { return -int32(1) } ret = (*(*func(*TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{cb})))(tls, ctx, h) @@ -123171,7 +123169,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, goto _1 _1: ; - h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } } return r1 @@ -123217,7 +123215,7 @@ func Xns_get16(tls *TLS, cp uintptr) (r uint32) { trc("tls=%v cp=%v, (%v:)", tls, cp, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(int32(*(*uint8)(unsafe.Pointer(cp)))< %v", r) }() } - return uint64(uint32(*(*uint8)(unsafe.Pointer(cp)))< int64(eom)-int64(p) { goto bad } @@ -123387,7 +123385,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin if rrnum == -int32(1) { rrnum = (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum } - if rrnum < 0 || rrnum >= int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if rrnum < 0 || rrnum >= Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { goto bad } if rrnum < (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum { @@ -123426,7 +123424,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin p4 = handle + 72 *(*uintptr)(unsafe.Pointer(p4)) += uintptr(2) (*Tns_rr)(unsafe.Pointer(rr)).Frdlength = uint16(Xns_get16(tls, *(*uintptr)(unsafe.Pointer(p4))-uintptr(2))) - if int64((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { + if Int64FromUint16((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { goto size } (*Tns_rr)(unsafe.Pointer(rr)).Frdata = (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr @@ -123437,7 +123435,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin (*Tns_rr)(unsafe.Pointer(rr)).Frdata = UintptrFromInt32(0) } (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum++ - if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { (*Tns_msg)(unsafe.Pointer(handle)).F_sect = section + int32(1) if (*Tns_msg)(unsafe.Pointer(handle)).F_sect == int32(_ns_s_max) { (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum = -int32(1) @@ -123466,7 +123464,7 @@ func Xns_name_uncompress(tls *TLS, msg uintptr, eom uintptr, src uintptr, dst ui } var r int32 _ = r - r = Xdn_expand(tls, msg, eom, src, dst, int32(dstsiz)) + r = Xdn_expand(tls, msg, eom, src, dst, Int32FromUint64(dstsiz)) if r < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) } @@ -123519,14 +123517,14 @@ func Xntohs(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*int8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } /* do we really need all these?? */ @@ -123553,10 +123551,10 @@ func Xgetprotoent(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(_idx) >= uint64(239) { + if Uint64FromInt32(_idx) >= uint64(239) { return UintptrFromInt32(0) } - _p.Fp_proto = int32(_protos[_idx]) + _p.Fp_proto = Int32FromUint8(_protos[_idx]) _p.Fp_name = uintptr(unsafe.Pointer(&_protos)) + uintptr(_idx+int32(1)) _p.Fp_aliases = uintptr(unsafe.Pointer(&_aliases)) _idx = int32(uint64(_idx) + (Xstrlen(tls, _p.Fp_name) + Uint64FromInt32(2))) @@ -123616,7 +123614,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr _ = int32(__SC_recvfrom) v2 = int64(fd) v3 = int64(buf) - v4 = int64(len1) + v4 = Int64FromUint64(len1) v5 = int64(flags) v6 = int64(addr) v7 = int64(alen) @@ -123632,7 +123630,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v8 = r goto _9 _9: - return X__syscall_ret(tls, uint64(v8)) + return X__syscall_ret(tls, Uint64FromInt64(v8)) } func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, timeout uintptr) (r int32) { @@ -123659,7 +123657,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti i-- mh += 64 } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), int64(vlen), int64(flags), int64(timeout), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), Int64FromUint32(vlen), Int64FromUint32(flags), int64(timeout), 0)))) } func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { @@ -123723,10 +123721,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { goto _1 _1: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { v6 = uintptr(0) } else { - v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v6 } @@ -123739,10 +123737,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { } p7 = msg + 40 *(*Tsocklen_t)(unsafe.Pointer(p7)) = Tsocklen_t(uint64(*(*Tsocklen_t)(unsafe.Pointer(p7))) + ((Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)) + (Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)))) - if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { v8 = uintptr(0) } else { - v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v8 (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_level = int32(SOL_SOCKET) @@ -123795,7 +123793,7 @@ func Xrecvmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r2 Tssize_t) { v9 = r goto _10 _10: - r1 = X__syscall_ret(tls, uint64(v9)) + r1 = X__syscall_ret(tls, Uint64FromInt64(v9)) if r1 >= 0 { X__convert_scm_timestamps(tls, msg, orig_controllen) } @@ -123832,13 +123830,13 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, if l != 0 && int32(*(*int8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { return -int32(1) } - n = int32(uint64(17) + l + BoolUint64(!!(l != 0))) - if l > uint64(253) || buflen < n || uint32(op) > uint32(15) || uint32(class) > uint32(255) || uint32(type1) > uint32(255) { + n = Int32FromUint64(uint64(17) + l + BoolUint64(!!(l != 0))) + if l > uint64(253) || buflen < n || Uint32FromInt32(op) > uint32(15) || Uint32FromInt32(class) > uint32(255) || Uint32FromInt32(type1) > uint32(255) { return -int32(1) } /* Construct query template - ID will be filled later */ - Xmemset(tls, bp, 0, uint64(n)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(op*int32(8) + int32(1)) + Xmemset(tls, bp, 0, Uint64FromInt32(n)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = Uint8FromInt32(op*int32(8) + int32(1)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(32) /* AD */ (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(5)] = uint8(1) Xmemcpy(tls, bp+uintptr(13), dname, l) @@ -123849,7 +123847,7 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, } j = i for { - if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && int32((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { + if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && Int32FromUint8((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { break } goto _2 @@ -123857,23 +123855,23 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, ; j++ } - if uint32(j-i)-uint32(1) > uint32(62) { + if Uint32FromInt32(j-i)-uint32(1) > uint32(62) { return -int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = uint8(j - i) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = Uint8FromInt32(j - i) goto _1 _1: ; i = j + int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(type1) - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(class) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = Uint8FromInt32(type1) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = Uint8FromInt32(class) /* Make a reasonably unpredictable id */ Xclock_gettime(tls, CLOCK_REALTIME, bp+280) - id = int32((uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = uint8(id / int32(256)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(id) - Xmemcpy(tls, buf, bp, uint64(n)) + id = Int32FromUint64((Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = Uint8FromInt32(id / int32(256)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = Uint8FromInt32(id) + Xmemcpy(tls, buf, bp, Uint64FromInt32(n)) return n } @@ -124009,7 +124007,7 @@ func _mtime(tls *TLS) (r uint64) { if Xclock_gettime(tls, int32(CLOCK_MONOTONIC), bp) < 0 && *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOSYS) { Xclock_gettime(tls, CLOCK_REALTIME, bp) } - return uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) + return Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) } func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, q uintptr, ql int32) (r1 int32) { @@ -124019,8 +124017,8 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, var _ /* mh at bp+40 */ Tmsghdr _, _ = fd, r *(*[2]Tuint8_t)(unsafe.Pointer(bp + 32)) = [2]Tuint8_t{ - 0: uint8(ql >> int32(8)), - 1: uint8(ql), + 0: Uint8FromInt32(ql >> int32(8)), + 1: Uint8FromInt32(ql), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -124029,7 +124027,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, }, 1: { Fiov_base: q, - Fiov_len: uint64(ql), + Fiov_len: Uint64FromInt32(ql), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 40)) = Tmsghdr{ @@ -124138,20 +124136,20 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a sl = uint32(16) nns = 0 family = int32(PF_INET) - v1 = uint64(nqueries+int32(2)) * 8 + v1 = Uint64FromInt32(nqueries+int32(2)) * 8 pfd = Xrealloc(tls, pfd, v1) - v2 = uint64(nqueries) * 4 + v2 = Uint64FromInt32(nqueries) * 4 qpos = Xrealloc(tls, qpos, v2) - v3 = uint64(nqueries) * 4 + v3 = Uint64FromInt32(nqueries) * 4 apos = Xrealloc(tls, apos, v3) - v4 = uint64(nqueries) * 2 + v4 = Uint64FromInt32(nqueries) * 2 alen_buf = Xrealloc(tls, alen_buf, v4) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), bp+200) - timeout = int32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) - attempts = int32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) + timeout = Int32FromUint32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) + attempts = Int32FromUint32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) nns = 0 for { - if !(uint32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { + if !(Uint32FromInt32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { break } iplit = conf + uintptr(nns)*28 @@ -124174,7 +124172,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_scope_id = (*Taddress)(unsafe.Pointer(iplit)).Fscopeid v6 = Int32FromInt32(PF_INET6) family = v6 - (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = uint16(v6) + (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = Uint16FromInt32(v6) } goto _5 _5: @@ -124212,7 +124210,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(i < nns) { break } - if int32((*(*[3]struct { + if Int32FromUint16((*(*[3]struct { Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte @@ -124234,7 +124232,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte - })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = uint16(family) + })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = Uint16FromInt32(family) if fd < 0 || Xbind(tls, fd, bp+88, sl) < 0 { if fd >= 0 { Xclose(tls, fd) @@ -124261,15 +124259,15 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), (nqueries+int32(1))*8))).Ffd = -int32(2) __pthread_cleanup_push(tls, bp+208, __ccgo_fp(_cleanup), pfd) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp + 200)), uintptr(0)) - Xmemset(tls, alens, 0, uint64(4)*uint64(nqueries)) + Xmemset(tls, alens, 0, uint64(4)*Uint64FromInt32(nqueries)) retry_interval = timeout / attempts next = 0 v10 = _mtime(tls) t2 = v10 t0 = v10 - t1 = t2 - uint64(retry_interval) + t1 = t2 - Uint64FromInt32(retry_interval) for { - if !(t2-t0 < uint64(timeout)) { + if !(t2-t0 < Uint64FromInt32(timeout)) { break } /* This is the loop exit condition: that all queries @@ -124287,7 +124285,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if i == nqueries { break } - if t2-t1 >= uint64(retry_interval) { + if t2-t1 >= Uint64FromInt32(retry_interval) { /* Query all configured namservers in parallel */ i = 0 for { @@ -124300,7 +124298,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(j < nns) { break } - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) goto _14 _14: ; @@ -124316,14 +124314,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry = int32(2) * nqueries } /* Wait for a response, or until time to retry */ - if Xpoll(tls, pfd, uint64(nqueries+int32(1)), int32(t1+uint64(retry_interval)-t2)) <= 0 { + if Xpoll(tls, pfd, Uint64FromInt32(nqueries+int32(1)), Int32FromUint64(t1+Uint64FromInt32(retry_interval)-t2)) <= 0 { goto _11 } for next < nqueries { *(*[1]Tiovec)(unsafe.Pointer(bp + 8)) = [1]Tiovec{ 0: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 232)) = Tmsghdr{ @@ -124357,7 +124355,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Find which query this answer goes with, if any */ i = next for { - if !(i < nqueries && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { + if !(i < nqueries && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { break } goto _16 @@ -124374,7 +124372,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Only accept positive or negative responses; * retry immediately on server failure, and ignore * all other codes such as refusal. */ - switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { case 0: fallthrough case int32(3): @@ -124384,7 +124382,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry-- } if v18 && v17 != 0 { - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) } fallthrough default: @@ -124404,14 +124402,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a next++ } } else { - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), uint64(rlen)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), Uint64FromInt32(rlen)) } /* Ignore further UDP if all slots full or TCP-mode */ if next == nqueries { (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), nqueries*8))).Fevents = 0 } /* If answer is truncated (TC bit), fallback to TCP */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { *(*int32)(unsafe.Pointer(alens + uintptr(i)*4)) = -int32(1) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), uintptr(0)) r = _start_tcp(tls, pfd+uintptr(i)*8, family, bp+116+uintptr(j)*28, sl, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), *(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))) @@ -124430,8 +124428,8 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a } if int32((*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Frevents)&int32(POLLOUT) != 0 { *(*[2]Tuint8_t)(unsafe.Pointer(bp + 52)) = [2]Tuint8_t{ - 0: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), - 1: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + 0: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), + 1: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), } *(*[2]Tiovec)(unsafe.Pointer(bp + 24)) = [2]Tiovec{ 0: { @@ -124440,14 +124438,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), - Fiov_len: uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + Fiov_len: Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 288)) = Tmsghdr{ Fmsg_iov: bp + 24, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+288, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) + _step_mh(tls, bp+288, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) r = int32(Xsendmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+288, int32(MSG_NOSIGNAL))) if r < 0 { goto out @@ -124475,14 +124473,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 344)) = Tmsghdr{ Fmsg_iov: bp + 56, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+344, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) + _step_mh(tls, bp+344, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) r = int32(Xrecvmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+344, 0)) if r <= 0 { goto out @@ -124491,14 +124489,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < int32(2) { goto _21 } - alen = int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) + alen = Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) if alen < int32(13) { goto out } if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < alen+int32(2) && *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < asize+int32(2) { goto _21 } - rcode = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) + rcode = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) if rcode != 0 && rcode != int32(3) { goto out } @@ -124576,7 +124574,7 @@ func X__res_send(tls *TLS, _msg uintptr, _msglen int32, _answer uintptr, _anslen } else { v1 = *(*int32)(unsafe.Pointer(bp + 24)) } - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, uint64(v1)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, Uint64FromInt32(v1)) } return r } @@ -124655,13 +124653,13 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } if v4 = !(Xstrncmp(tls, bp, __ccgo_ts+1183, uint64(7)) != 0); v4 { v1 = int32((*(*[256]int8)(unsafe.Pointer(bp)))[int32(7)]) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: } if v4 && v2 != 0 { p = Xstrstr(tls, bp, __ccgo_ts+1191) - if p != 0 && BoolInt32(uint32(*(*int8)(unsafe.Pointer(p + 6)))-uint32('0') < uint32(10)) != 0 { + if p != 0 && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(p + 6)))-uint32('0') < uint32(10)) != 0 { p += uintptr(6) x = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -124674,7 +124672,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1198) - if p != 0 && BoolInt32(uint32(*(*int8)(unsafe.Pointer(p + 9)))-uint32('0') < uint32(10)) != 0 { + if p != 0 && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(p + 9)))-uint32('0') < uint32(10)) != 0 { p += uintptr(9) x1 = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -124687,7 +124685,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1208) - if p != 0 && (BoolInt32(uint32(*(*int8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*int8)(unsafe.Pointer(p + 8))) == int32('.')) { + if p != 0 && (BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*int8)(unsafe.Pointer(p + 8))) == int32('.')) { p += uintptr(8) x2 = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -124703,7 +124701,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } if v11 = !(Xstrncmp(tls, bp, __ccgo_ts+1217, uint64(10)) != 0); v11 { v8 = int32((*(*[256]int8)(unsafe.Pointer(bp)))[int32(10)]) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -124714,7 +124712,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ p = bp + uintptr(11) for { v13 = int32(*(*int8)(unsafe.Pointer(p))) - v14 = BoolInt32(v13 == int32(' ') || uint32(v13)-uint32('\t') < uint32(5)) + v14 = BoolInt32(v13 == int32(' ') || Uint32FromInt32(v13)-uint32('\t') < uint32(5)) goto _15 _15: if !(v14 != 0) { @@ -124729,7 +124727,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ for { if v20 = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744)))) != 0; v20 { v17 = int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) - v18 = BoolInt32(v17 == int32(' ') || uint32(v17)-uint32('\t') < uint32(5)) + v18 = BoolInt32(v17 == int32(' ') || Uint32FromInt32(v17)-uint32('\t') < uint32(5)) goto _19 _19: } @@ -124752,7 +124750,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } if v24 = Xstrncmp(tls, bp, __ccgo_ts+1228, uint64(6)) != 0 && Xstrncmp(tls, bp, __ccgo_ts+1235, uint64(6)) != 0; !v24 { v21 = int32((*(*[256]int8)(unsafe.Pointer(bp)))[int32(6)]) - v22 = BoolInt32(v21 == int32(' ') || uint32(v21)-uint32('\t') < uint32(5)) + v22 = BoolInt32(v21 == int32(' ') || Uint32FromInt32(v21)-uint32('\t') < uint32(5)) goto _23 _23: } @@ -124762,7 +124760,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ p = bp + uintptr(7) for { v26 = int32(*(*int8)(unsafe.Pointer(p))) - v27 = BoolInt32(v26 == int32(' ') || uint32(v26)-uint32('\t') < uint32(5)) + v27 = BoolInt32(v26 == int32(' ') || Uint32FromInt32(v26)-uint32('\t') < uint32(5)) goto _28 _28: if !(v27 != 0) { @@ -124788,7 +124786,7 @@ no_resolv_conf: X__lookup_ipliteral(tls, conf, __ccgo_ts+1242, PF_UNSPEC) nns = int32(1) } - (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(nns) + (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = Uint32FromInt32(nns) return 0 } @@ -124816,18 +124814,18 @@ func Xsendmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32) (r } i = 0 for { - if !(uint32(i) < vlen) { + if !(Uint32FromInt32(i) < vlen) { break } /* As an unfortunate inconsistency, the sendmmsg API uses * unsigned int for the resulting msg_len, despite sendmsg * returning ssize_t. However Linux limits the total bytes * sent by sendmsg to INT_MAX, so the assignment is safe. */ - r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, int32(flags)) + r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, Int32FromUint32(flags)) if r < 0 { goto error } - (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = uint32(r) + (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = Uint32FromInt64(r) goto _1 _1: ; @@ -124886,10 +124884,10 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { goto _2 _2: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_controllen))-int64(c1)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_controllen))-int64(c1)) { v4 = uintptr(0) } else { - v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } c1 = v4 } @@ -124915,7 +124913,7 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { v12 = r goto _13 _13: - return X__syscall_ret(tls, uint64(v12)) + return X__syscall_ret(tls, Uint64FromInt64(v12)) } func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr uintptr, alen Tsocklen_t) (r1 Tssize_t) { @@ -124931,10 +124929,10 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui _ = int32(__SC_sendto) v2 = int64(fd) v3 = int64(buf) - v4 = int64(len1) + v4 = Int64FromUint64(len1) v5 = int64(flags) v6 = int64(addr) - v7 = int64(alen) + v7 = Int64FromUint32(alen) if int32(1) != 0 { r = ___syscall_cp(tls, int64(v1), v2, v3, v4, v5, v6, v7) } else { @@ -124947,7 +124945,7 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v8 = r goto _9 _9: - return X__syscall_ret(tls, uint64(v8)) + return X__syscall_ret(tls, Uint64FromInt64(v8)) } func Xendservent(tls *TLS) { @@ -124991,7 +124989,7 @@ func Xsetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, v3 = int64(level) v4 = int64(optname) v5 = int64(optval) - v6 = int64(optlen) + v6 = Int64FromUint32(optlen) v7 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v1), v2, v3, v4, v5, v6, v7) @@ -125017,13 +125015,13 @@ _9: break } if uint64(optlen) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } tv = optval s = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec us = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -125031,14 +125029,14 @@ _9: if optname == int32(SO_SNDTIMEO) { optname = int32(SO_SNDTIMEO_OLD) } - if !((uint64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v10 = uint64(us) + if !((Uint64FromInt64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v10 = Uint64FromInt64(us) } else { - v10 = uint64(0x7fffffff) + (0+uint64(us))>>int32(63) + v10 = uint64(0x7fffffff) + (0+Uint64FromInt64(us))>>int32(63) } *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, - 1: int64(int32(v10)), + 1: int64(Int32FromUint64(v10)), } v11 = int32(SYS_setsockopt) _ = int32(__SC_setsockopt) @@ -125046,7 +125044,7 @@ _9: v13 = int64(level) v14 = int64(optname) v15 = int64(bp) - v16 = int64(Uint64FromInt32(2) * Uint64FromInt64(8)) + v16 = Int64FromUint64(Uint64FromInt32(2) * Uint64FromInt64(8)) v17 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v11), v12, v13, v14, v15, v16, v17) @@ -125079,7 +125077,7 @@ _9: v22 = int64(level) v23 = int64(optname) v24 = int64(optval) - v25 = int64(optlen) + v25 = Int64FromUint32(optlen) v26 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v20), v21, v22, v23, v24, v25, v26) @@ -125098,7 +125096,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { @@ -125130,7 +125128,7 @@ func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xsockatmark(tls *TLS, s int32) (r int32) { @@ -125200,7 +125198,7 @@ _9: _18: s = int32(v17) if s < 0 { - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } if type1&int32(SOCK_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) @@ -125209,7 +125207,7 @@ _9: X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFL)), int64(Int32FromInt32(O_NONBLOCK))) } } - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr) (r2 int32) { @@ -125241,7 +125239,7 @@ func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr v8 = r goto _9 _9: - r1 = int32(X__syscall_ret(tls, uint64(v8))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v8))) if r1 < 0 && (*(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EINVAL) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EPROTONOSUPPORT)) && type1&(Int32FromInt32(SOCK_CLOEXEC)|Int32FromInt32(SOCK_NONBLOCK)) != 0 { v10 = int32(SYS_socketpair) _ = int32(__SC_socketpair) @@ -125263,7 +125261,7 @@ _9: v17 = r goto _18 _18: - r1 = int32(X__syscall_ret(tls, uint64(v17))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v17))) if r1 < 0 { return r1 } @@ -125383,7 +125381,7 @@ func _itoa1(tls *TLS, p uintptr, x Tuint32_t) (r uintptr) { for cond := true; cond; cond = x != 0 { p-- v2 = p - *(*int8)(unsafe.Pointer(v2)) = int8(uint32('0') + x%uint32(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint32(uint32('0') + x%uint32(10)) x /= uint32(10) } return p @@ -125460,11 +125458,11 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) + len1 = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) i = 0 for { if !(i < (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]) { @@ -125515,18 +125513,18 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = v8 goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { rv = int32(ENOMEM) goto cleanup_f } - tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) + tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) if !(tmp1 != 0) { rv = *(*int32)(unsafe.Pointer(X__errno_location(tls))) goto cleanup_f } *(*uintptr)(unsafe.Pointer(mem)) = tmp1 - *(*Tsize_t)(unsafe.Pointer(nmem)) = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) + *(*Tsize_t)(unsafe.Pointer(nmem)) = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) } if (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] != 0 { *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(mem)))) = *(*uintptr)(unsafe.Pointer(buf)) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) @@ -125556,7 +125554,7 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz } (*Tgroup)(unsafe.Pointer(gr)).Fgr_name = *(*uintptr)(unsafe.Pointer(buf)) (*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd = (*Tgroup)(unsafe.Pointer(gr)).Fgr_name + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) - (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) + (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) (*Tgroup)(unsafe.Pointer(gr)).Fgr_mem = *(*uintptr)(unsafe.Pointer(mem)) if *(*int8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr(-Int32FromInt32(1)))) != 0 || *(*int8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]-int32(1)))) != 0 { rv = int32(EIO) @@ -125731,10 +125729,10 @@ func _atou(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -125909,11 +125907,11 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u goto cleanup } if (*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRFOUND)] != 0 { - nscdbuf = Xcalloc(tls, uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) + nscdbuf = Xcalloc(tls, Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) if !(nscdbuf != 0) { goto cleanup } - nbytes = uint64(4) * uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) + nbytes = uint64(4) * Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) if nbytes != 0 && !(Xfread(tls, nscdbuf, nbytes, uint64(1), f) != 0) { if !(Xferror(tls, f) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EIO) @@ -126042,7 +126040,7 @@ func _itoa2(tls *TLS, p uintptr, x Tuint32_t) (r uintptr) { for cond := true; cond; cond = x != 0 { p-- v2 = p - *(*int8)(unsafe.Pointer(v2)) = int8(uint32('0') + x%uint32(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint32(uint32('0') + x%uint32(10)) x /= uint32(10) } return p @@ -126124,11 +126122,11 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { + if Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) + len1 = Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) if len1 > *(*Tsize_t)(unsafe.Pointer(size)) || !(*(*uintptr)(unsafe.Pointer(buf)) != 0) { tmp = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(buf)), len1) if !(tmp != 0) { @@ -126152,8 +126150,8 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_passwd + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_shell = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) /* Don't assume that nscd made sure to null terminate strings. * It's supposed to, but malicious nscd should be ignored * rather than causing a crash. @@ -126301,10 +126299,10 @@ func _atou1(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126472,7 +126470,7 @@ func X__nscd_query(tls *TLS, req Tint32_t, key uintptr, buf uintptr, len1 Tsize_ *(*[3]Tint32_t)(unsafe.Pointer(bp + 32)) = [3]Tint32_t{ 0: int32(NSCDVERSION), 1: req, - 2: int32(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), + 2: Int32FromUint64(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -126545,11 +126543,11 @@ retry: if !(i < Uint64FromInt64(12)/Uint64FromInt64(4)) { break } - v3 = uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) + v3 = Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) v4 = v3>>int32(24) | v3>>int32(8)&uint32(0xff00) | v3<>int32(24) | v7>>int32(8)&uint32(0xff00) | v7< %v", r) }() } - return int64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) + return Int64FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) } func Xlrand48(tls *TLS) (r int64) { @@ -126838,7 +126836,7 @@ func Xjrand48(tls *TLS, s uintptr) (r int64) { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) + return int64(Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) } func Xmrand48(tls *TLS) (r int64) { @@ -126864,7 +126862,7 @@ func Xrand(tls *TLS) (r int32) { defer func() { trc("-> %v", r) }() } _seed = uint64(6364136223846793005)*_seed + uint64(1) - return int32(_seed >> int32(33)) + return Int32FromUint64(_seed >> int32(33)) } func _temper(tls *TLS, x uint32) (r uint32) { @@ -126884,7 +126882,7 @@ func Xrand_r(tls *TLS, seed uintptr) (r int32) { _ = v1 v1 = *(*uint32)(unsafe.Pointer(seed))*Uint32FromInt32(1103515245) + Uint32FromInt32(12345) *(*uint32)(unsafe.Pointer(seed)) = v1 - return int32(_temper(tls, v1) / uint32(2)) + return Int32FromUint32(_temper(tls, v1) / uint32(2)) } /* @@ -126942,15 +126940,15 @@ func _lcg64(tls *TLS, x Tuint64_t) (r Tuint64_t) { } func _savestate(tls *TLS) (r uintptr) { - *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) = uint32(_n<> int32(16)) - _i = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) - _j = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) + _n = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> int32(16)) + _i = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) + _j = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) } func ___srandom(tls *TLS, seed uint32) { @@ -127057,11 +127055,11 @@ func Xrandom(tls *TLS) (r int64) { if _n == 0 { v1 = _lcg31(tls, *(*Tuint32_t)(unsafe.Pointer(_x1))) *(*Tuint32_t)(unsafe.Pointer(_x1)) = v1 - k = int64(v1) + k = Int64FromUint32(v1) goto end } *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) += *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_j)*4)) - k = int64(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) + k = Int64FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) _i++ v2 = _i if v2 == _n { @@ -127099,8 +127097,8 @@ func Xsrand48(tls *TLS, seed int64) { defer tls.Free(16) *(*[3]uint16)(unsafe.Pointer(bp)) = [3]uint16{ 0: uint16(0x330e), - 1: uint16(seed), - 2: uint16(seed >> int32(16)), + 1: Uint16FromInt64(seed), + 2: Uint16FromInt64(seed >> int32(16)), } Xseed48(tls, bp) } @@ -127128,7 +127126,7 @@ func Xexecl(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127172,7 +127170,7 @@ func Xexecle(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127216,7 +127214,7 @@ func Xexeclp(tls *TLS, file uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127251,7 +127249,7 @@ func Xexecve(tls *TLS, path uintptr, argv uintptr, envp uintptr) (r int32) { defer func() { trc("-> %v", r) }() } /* do we need to use environ if envp is null? */ - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) } func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { @@ -127277,18 +127275,18 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { if !(path != 0) { path = __ccgo_ts + 1383 } - k = Xstrnlen(tls, file, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + k = Xstrnlen(tls, file, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if k > uint64(NAME_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENAMETOOLONG) return -int32(1) } - l = Xstrnlen(tls, path, uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) + l = Xstrnlen(tls, path, Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) p = path for { v2 = l + k + uint64(1) b = Xrealloc(tls, b, v2) z = X__strchrnul(tls, p, int32(':')) - if uint64(int64(z)-int64(p)) >= l { + if Uint64FromInt64(int64(z)-int64(p)) >= l { v3 = z z++ if !(*(*int8)(unsafe.Pointer(v3)) != 0) { @@ -127296,7 +127294,7 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { } goto _1 } - Xmemcpy(tls, b, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, b, p, Uint64FromInt64(int64(z)-int64(p))) *(*int8)(unsafe.Add(unsafe.Pointer(b), int64(z)-int64(p))) = int8('/') Xmemcpy(tls, b+uintptr(int64(z)-int64(p))+BoolUintptr(z > p), file, k+uint64(1)) Xexecve(tls, b, argv, envp) @@ -127354,9 +127352,9 @@ func Xfexecve(tls *TLS, fd int32, argv uintptr, envp uintptr) (r1 int32) { _ = r r = int32(X__syscall5(tls, int64(SYS_execveat), int64(fd), int64(__ccgo_ts), int64(argv), int64(envp), int64(Int32FromInt32(AT_EMPTY_PATH)))) if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - X__procfdname(tls, bp, uint32(fd)) + X__procfdname(tls, bp, Uint32FromInt32(fd)) Xexecve(tls, bp, argv, envp) if *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EBADF) @@ -127675,8 +127673,8 @@ func Xposix_spawnattr_setflags(tls *TLS, attr uintptr, flags int16) (r int32) { } var all_flags uint32 _ = all_flags - all_flags = uint32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) - if uint32(flags) & ^all_flags != 0 { + all_flags = Uint32FromInt32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) + if Uint32FromInt16(flags) & ^all_flags != 0 { return int32(EINVAL) } (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(flags) @@ -127716,7 +127714,7 @@ func Xvfork(tls *TLS) (r Tpid_t) { defer func() { trc("-> %v", r) }() } /* vfork syscall cannot be made from C code */ - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_fork))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_fork))))) } func Xwait(tls *TLS, status uintptr) (r Tpid_t) { @@ -127732,7 +127730,7 @@ func Xwaitid(tls *TLS, type1 Tidtype_t, id Tid_t, info uintptr, options int32) ( trc("tls=%v type1=%v id=%v info=%v options=%v, (%v:)", tls, type1, id, info, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), int64(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), Int64FromUint32(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) } func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { @@ -127740,7 +127738,7 @@ func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { trc("tls=%v pid=%v status=%v options=%v, (%v:)", tls, pid, status, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) } const BRACKET = -3 @@ -127767,13 +127765,13 @@ func _str_next(tls *TLS, str uintptr, n Tsize_t, step uintptr) (r int32) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(0) return 0 } - if uint32(*(*int8)(unsafe.Pointer(str))) >= uint32(128) { + if Uint32FromInt8(*(*int8)(unsafe.Pointer(str))) >= uint32(128) { k = Xmbtowc(tls, bp, str, n) if k < 0 { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) return -int32(1) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k) return *(*Twchar_t)(unsafe.Pointer(bp)) } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) @@ -127849,13 +127847,13 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i goto escaped escaped: ; - if uint32(*(*int8)(unsafe.Pointer(pat))) >= uint32(128) { + if Uint32FromInt8(*(*int8)(unsafe.Pointer(pat))) >= uint32(128) { k1 = Xmbtowc(tls, bp, pat, m) if k1 < 0 { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(0) return -int32(2) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k1 + esc) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k1 + esc) return *(*Twchar_t)(unsafe.Pointer(bp)) } return int32(*(*int8)(unsafe.Pointer(pat))) @@ -127865,13 +127863,13 @@ func _casefold(tls *TLS, k int32) (r int32) { var c int32 var v1 uint32 _, _ = c, v1 - c = int32(Xtowupper(tls, uint32(k))) + c = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(k))) if c == k { - v1 = Xtowlower(tls, uint32(k)) + v1 = Xtowlower(tls, Uint32FromInt32(k)) } else { - v1 = uint32(c) + v1 = Uint32FromInt32(c) } - return int32(v1) + return Int32FromUint32(v1) } func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { @@ -127913,7 +127911,7 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { return 0 } if *(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4)) { - if uint32(k)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || uint32(kfold)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { + if Uint32FromInt32(k)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || Uint32FromInt32(kfold)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { return BoolInt32(!(inv != 0)) } } @@ -127928,16 +127926,16 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { p++ } if z == int32(':') && int64(p-uintptr(1))-int64(p0) < int64(16) { - Xmemcpy(tls, bp+8, p0, uint64(int64(p-uintptr(1))-int64(p0))) + Xmemcpy(tls, bp+8, p0, Uint64FromInt64(int64(p-uintptr(1))-int64(p0))) (*(*[16]int8)(unsafe.Pointer(bp + 8)))[int64(p-uintptr(1))-int64(p0)] = 0 - if Xiswctype(tls, uint32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, uint32(kfold), Xwctype(tls, bp+8)) != 0 { + if Xiswctype(tls, Uint32FromInt32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, Uint32FromInt32(kfold), Xwctype(tls, bp+8)) != 0 { return BoolInt32(!(inv != 0)) } } goto _1 } - if uint32(*(*int8)(unsafe.Pointer(p))) < uint32(128) { - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(uint8(*(*int8)(unsafe.Pointer(p)))) + if Uint32FromInt8(*(*int8)(unsafe.Pointer(p))) < uint32(128) { + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint8(Uint8FromInt8(*(*int8)(unsafe.Pointer(p)))) } else { l1 = Xmbtowc(tls, bp, p, uint64(4)) if l1 < 0 { @@ -128027,7 +128025,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(p < endpat) { break } - switch _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) { + switch _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) { case -int32(2): return int32(FNM_NOMATCH) case -int32(5): @@ -128058,7 +128056,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(s > str && tailcnt != 0) { break } - if v9 = uint32(*(*int8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) < uint32(128); !v9 { + if v9 = Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) < uint32(128); !v9 { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { v8 = int32(4) } else { @@ -128071,7 +128069,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, for { s-- v10 = s - if !(uint32(uint8(*(*int8)(unsafe.Pointer(v10))))-uint32(0x80) < uint32(0x40) && s > str) { + if !(uint32(Uint8FromInt8(*(*int8)(unsafe.Pointer(v10))))-uint32(0x80) < uint32(0x40) && s > str) { break } } @@ -128088,9 +128086,9 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, /* Check that the pat and str tails match */ p = ptail for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) - v12 = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + v12 = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) k = v12 if v12 <= 0 { if c != END { @@ -128125,7 +128123,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, p = pat s = str for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) /* Encountering * completes/commits a component */ if c == -int32(5) { @@ -128133,7 +128131,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, str = s break } - k = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + k = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) if !(k != 0) { return int32(FNM_NOMATCH) } @@ -128161,13 +128159,13 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, } /* If we failed, advance str, by 1 char if it's a valid * char, or past all invalid bytes otherwise. */ - k = _str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) + k = _str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) if k > 0 { str += uintptr(*(*Tsize_t)(unsafe.Pointer(bp + 8))) } else { str++ for { - if !(_str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) < 0) { + if !(_str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) < 0) { break } goto _16 @@ -128205,7 +128203,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } p = pat for { - v4 = _pat_next(tls, p, uint64(-Int32FromInt32(1)), bp, flags) + v4 = _pat_next(tls, p, Uint64FromInt32(-Int32FromInt32(1)), bp, flags) c = v4 if !(v4 != END && c != int32('/')) { break @@ -128218,7 +128216,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if c != int32(*(*int8)(unsafe.Pointer(s))) && (!(*(*int8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { return int32(FNM_NOMATCH) } - if _fnmatch_internal(tls, pat, uint64(int64(p)-int64(pat)), str, uint64(int64(s)-int64(str)), flags) != 0 { + if _fnmatch_internal(tls, pat, Uint64FromInt64(int64(p)-int64(pat)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0 { return int32(FNM_NOMATCH) } if !(c != 0) { @@ -128239,7 +128237,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if int32(*(*int8)(unsafe.Pointer(s))) != int32('/') { goto _5 } - if !(_fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(int64(s)-int64(str)), flags) != 0) { + if !(_fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0) { return 0 } goto _5 @@ -128249,7 +128247,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } } } - return _fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(-Int32FromInt32(1)), flags) + return _fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt32(-Int32FromInt32(1)), flags) } const GLOB_ABORTED = 2 @@ -128338,7 +128336,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag return 0 } pat += uintptr(i) - pos += uint64(j) + pos += Uint64FromInt64(j) v4 = Int64FromInt32(0) j = v4 i = v4 @@ -128369,7 +128367,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag in_bracket = 0 pat += uintptr(i + int64(1)) i = int64(-int32(1)) - pos += uint64(j + int64(1)) + pos += Uint64FromInt64(j + int64(1)) j = int64(-int32(1)) } /* Only store a character if it fits in the buffer, but if @@ -128377,10 +128375,10 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag * must be remembered and handled later only if the bracket * is unterminated (and thereby a literal), so as not to * disallow long bracket expressions with short matches. */ - if pos+uint64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { + if pos+Uint64FromInt64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { v5 = j j++ - *(*int8)(unsafe.Pointer(buf + uintptr(pos+uint64(v5)))) = *(*int8)(unsafe.Pointer(pat + uintptr(i))) + *(*int8)(unsafe.Pointer(buf + uintptr(pos+Uint64FromInt64(v5)))) = *(*int8)(unsafe.Pointer(pat + uintptr(i))) } else { if in_bracket != 0 { overflow = int32(1) @@ -128457,7 +128455,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag break } /* Quickly skip non-directories when there's pattern left. */ - if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { + if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { continue } l = Xstrlen(tls, de+19) @@ -128495,7 +128493,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } else { v11 = __ccgo_ts } - r = _do_glob(tls, buf, pos+l, int32((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) + r = _do_glob(tls, buf, pos+l, Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) if r != 0 { Xclosedir(tls, dir) return r @@ -128597,7 +128595,7 @@ func _expand_tilde(tls *TLS, pat uintptr, buf uintptr, pos uintptr) (r int32) { ; home = (*(*Tpasswd)(unsafe.Pointer(bp))).Fpw_dir } - for i < uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*int8)(unsafe.Pointer(home)) != 0 { + for i < Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*int8)(unsafe.Pointer(home)) != 0 { v10 = i i++ v11 = home @@ -129060,7 +129058,7 @@ func _tre_ast_new_iter(tls *TLS, mem Ttre_mem_t, arg uintptr, min int32, max int (*Ttre_iteration_t)(unsafe.Pointer(iter)).Farg = arg (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmin = min (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmax = max - SetBitFieldPtr8Uint32(iter+16, uint32(minimal), 0, 0x1) + SetBitFieldPtr8Uint32(iter+16, Uint32FromInt32(minimal), 0, 0x1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnum_submatches = (*Ttre_ast_node_t)(unsafe.Pointer(arg)).Fnum_submatches return node } @@ -129129,7 +129127,7 @@ func _tre_stack_new(tls *TLS, size int32, max_size int32, increment int32) (r ui _ = s s = Xmalloc(tls, uint64(24)) if s != UintptrFromInt32(0) { - (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*uint64(size)) + (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*Uint64FromInt32(size)) if (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack == UintptrFromInt32(0) { Xfree(tls, s) return UintptrFromInt32(0) @@ -129166,7 +129164,7 @@ func _tre_stack_push(tls *TLS, s uintptr, value Ttre_stack_item) (r Treg_errcode if new_size > (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size { new_size = (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size } - new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*uint64(new_size)) + new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*Uint64FromInt32(new_size)) if new_buffer == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -129336,7 +129334,7 @@ func _tre_new_lit(tls *TLS, p uintptr) (r uintptr) { return uintptr(0) } *(*int32)(unsafe.Pointer(p + 20)) *= int32(2) - a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, uint64((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) + a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, Uint64FromInt32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) if !(a != 0) { return uintptr(0) } @@ -129362,8 +129360,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { /* assumes islower(c) and isupper(c) are exclusive and toupper(c)!=c if islower(c). multiple opposite case characters are not supported */ - if Xiswlower(tls, uint32(c)) != 0 { - v2 = int32(Xtowupper(tls, uint32(c))) + if Xiswlower(tls, Uint32FromInt32(c)) != 0 { + v2 = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(c))) e = v2 b = v2 c++ @@ -129372,7 +129370,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowupper(tls, uint32(c)) != uint32(e) { + if Xtowupper(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _3 @@ -129382,8 +129380,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { e++ } } else { - if Xiswupper(tls, uint32(c)) != 0 { - v4 = int32(Xtowlower(tls, uint32(c))) + if Xiswupper(tls, Uint32FromInt32(c)) != 0 { + v4 = Int32FromUint32(Xtowlower(tls, Uint32FromInt32(c))) e = v4 b = v4 c++ @@ -129392,7 +129390,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowlower(tls, uint32(c)) != uint32(e) { + if Xtowlower(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _5 @@ -129459,7 +129457,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint start = s for { class = uint64(0) - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 <= 0 { if *(*int8)(unsafe.Pointer(s)) != 0 { v2 = int32(REG_BADPAT) @@ -129487,7 +129485,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint break } if int32(*(*int8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { - Xmemcpy(tls, bp+4, s, uint64(len1)) + Xmemcpy(tls, bp+4, s, Uint64FromInt32(len1)) (*(*[15]int8)(unsafe.Pointer(bp + 4)))[len1] = 0 class = Xwctype(tls, bp+4) break @@ -129510,7 +129508,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint s += uintptr(len1) if int32(*(*int8)(unsafe.Pointer(s))) == int32('-') && int32(*(*int8)(unsafe.Pointer(s + 1))) != int32(']') { s++ - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) max = *(*Twchar_t)(unsafe.Pointer(bp)) /* XXX - Should use collation order instead of encoding values in character ranges. */ @@ -129570,7 +129568,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*(*Tliterals)(unsafe.Pointer(bp))).Fmem = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem (*(*Tliterals)(unsafe.Pointer(bp))).Flen1 = 0 (*(*Tliterals)(unsafe.Pointer(bp))).Fcap1 = int32(32) - (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) + (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) if !((*(*Tliterals)(unsafe.Pointer(bp))).Fa != 0) { return int32(REG_ESPACE) } @@ -129599,7 +129597,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) } /* Sort the array if we need to negate it. */ - Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) + Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) /* extra lit for the last negated range */ lit = _tre_new_lit(tls, bp) if !(lit != 0) { @@ -129611,12 +129609,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) /* negated classes */ if (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 != 0 { - nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) + nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) if !(nc != 0) { err = int32(REG_ESPACE) goto parse_bracket_done } - Xmemcpy(tls, nc, bp+24+8, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) + Xmemcpy(tls, nc, bp+24+8, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) *(*Ttre_ctype_t)(unsafe.Pointer(nc + uintptr((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*8)) = uint64(0) } } @@ -129672,14 +129670,14 @@ parse_bracket_done: func _parse_dup_count(tls *TLS, s uintptr, n uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(n)) = -int32(1) - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return s } *(*int32)(unsafe.Pointer(n)) = 0 for { *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (int32(*(*int8)(unsafe.Pointer(s))) - int32('0')) s++ - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { break } goto _1 @@ -129722,11 +129720,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u func _hexval1(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -129845,7 +129843,7 @@ _2: if !(i < len1 && v < int32(0x110000)) { break } - c = _hexval1(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(i))))) + c = _hexval1(tls, Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(i))))) if c < 0 { break } @@ -129888,7 +129886,7 @@ _2: /* fallthrough */ fallthrough default: - if !(ere != 0) && uint32(*(*int8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { + if !(ere != 0) && Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { /* back reference */ val = int32(*(*int8)(unsafe.Pointer(s))) - int32('0') v19 = ctx + 44 @@ -129977,14 +129975,14 @@ _12: goto parse_literal parse_literal: ; - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 < 0 { return int32(REG_BADPAT) } - if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { + if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { /* multiple opposite case characters are not supported */ - tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) - tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) if tmp11 != 0 && tmp21 != 0 { node = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, tmp11, tmp21) } else { @@ -130446,7 +130444,7 @@ func _tre_add_tags(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr, tnfa u } (*(*Ttre_submatch_data_t)(unsafe.Pointer((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fsubmatch_data + uintptr(id1)*16))).Fparents = UintptrFromInt32(0) if i2 > 0 { - p = Xmalloc(tls, uint64(4)*uint64(i2+Int32FromInt32(1))) + p = Xmalloc(tls, uint64(4)*Uint64FromInt32(i2+Int32FromInt32(1))) if p == UintptrFromInt32(0) { status = int32(REG_ESPACE) goto _10 @@ -131350,7 +131348,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; s2++ } - new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*uint64(s1+s2+Int32FromInt32(1))) + new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*Uint64FromInt32(s1+s2+Int32FromInt32(1))) if !(new_set != 0) { return UintptrFromInt32(0) } @@ -131379,7 +131377,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*uint64(i+num_tags+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*Uint64FromInt32(i+num_tags+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -131439,7 +131437,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*uint64(i+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*Uint64FromInt32(i+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -131757,7 +131755,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -131788,7 +131786,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -131846,8 +131844,8 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun } /* Use the character ranges, assertions, etc. from `p1' for the transition from `p1' to `p2'. */ - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition)*4)))*56 (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate_id = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition if (*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fclass != 0 { @@ -131878,7 +131876,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun ; i++ } - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*uint64(i+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*Uint64FromInt32(i+Int32FromInt32(1))) if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -131917,7 +131915,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = UintptrFromInt32(0) /* If there were any tags, allocate an array and fill it. */ if i+j > 0 { - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*uint64(i+j+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(i+j+Int32FromInt32(1))) if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags != 0) { return int32(REG_ESPACE) } @@ -132071,10 +132069,10 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) + (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) tree = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fn /* Referring to nonexistent subexpressions is illegal. */ - if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > int32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { + if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > Int32FromUint64((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { errcode = int32(REG_ESUBREG) if int32(1) != 0 { goto error_exit @@ -132090,7 +132088,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs = BoolInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref >= 0) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_approx = 0 - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) /* Set up tags for submatch addressing. If REG_NOSUB is set and the regexp does not have back references, this can be skipped. */ if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs != 0 || !(cflags&Int32FromInt32(REG_NOSUB) != 0) { @@ -132103,7 +132101,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 { - tag_directions = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + tag_directions = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) if tag_directions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132111,16 +132109,16 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftag_directions = tag_directions - Xmemset(tls, tag_directions, -int32(1), uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + Xmemset(tls, tag_directions, -int32(1), uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) } - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - submatch_data = Xcalloc(tls, uint64(uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) + submatch_data = Xcalloc(tls, uint64(Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) if submatch_data == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132173,14 +132171,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - counts = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + counts = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if counts == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - offs = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + offs = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if offs == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132213,7 +132211,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; i++ } - transitions = Xcalloc(tls, uint64(uint32(add)+uint32(1)), uint64(56)) + transitions = Xcalloc(tls, uint64(Uint32FromInt32(add)+uint32(1)), uint64(56)) if transitions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132221,7 +132219,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftransitions = transitions - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) errcode = _tre_ast_to_tnfa(tls, tree, transitions, counts, offs) if errcode != REG_OK { errcode = errcode @@ -132236,7 +132234,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { i++ p += 56 } - initial = Xcalloc(tls, uint64(uint32(i)+uint32(1)), uint64(56)) + initial = Xcalloc(tls, uint64(Uint32FromInt32(i)+uint32(1)), uint64(56)) if initial == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132266,14 +132264,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; j++ } - (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*uint64(j+Int32FromInt32(1))) + (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) if !((*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags != 0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*uint64(j+Int32FromInt32(1))) + Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fassertions = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Fassertions i++ @@ -132283,7 +132281,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { p += 56 } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fstate = UintptrFromInt32(0) - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ffinal = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*(*Ttre_pos_and_tags_t)(unsafe.Pointer((*Ttre_ast_node_t)(unsafe.Pointer(tree)).Flastpos))).Fposition)*4)))*56 (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags = cflags @@ -132420,7 +132418,7 @@ func Xregerror(tls *TLS, e int32, preg uintptr, buf uintptr, size Tsize_t) (r Ts s++ } s = X__lctrans_cur(tls, s) - return uint64(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) + return Uint64FromInt32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) } const tre_bt_mem_alloc = 0 @@ -132541,23 +132539,23 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags everything in a single large block with calloc(). */ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ - if uint64(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { + if Uint64FromInt32(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { return int32(REG_ESPACE) } /* Likewise check rbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Likewise check pbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Compute the length of the block we need. */ - tbytes = uint64(8) * uint64(num_tags) - rbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) - pbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) - xbytes = uint64(8) * uint64(num_tags) - total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes + tbytes = uint64(8) * Uint64FromInt32(num_tags) + rbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) + pbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) + xbytes = uint64(8) * Uint64FromInt32(num_tags) + total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes /* Allocate the memory. */ buf = Xcalloc(tls, total_bytes, uint64(1)) if buf == UintptrFromInt32(0) { @@ -132566,32 +132564,32 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = buf tmp_buf = buf + uintptr(tbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v1 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v1 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v1 = uint64(0) } tmp_buf += uintptr(v1) reach_next = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v2 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v2 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v2 = uint64(0) } tmp_buf += uintptr(v2) reach = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v3 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v3 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v3 = uint64(0) } tmp_buf += uintptr(v3) reach_pos = tmp_buf tmp_buf += uintptr(pbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v4 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v4 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v4 = uint64(0) } @@ -132642,7 +132640,7 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags trans_i = (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Finitial for (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != UintptrFromInt32(0) { if (*(*Ttre_reach_pos_t)(unsafe.Pointer(reach_pos + uintptr((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id)*16))).Fpos < pos { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { trans_i += 56 continue } @@ -132781,8 +132779,8 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags break } /* Does this transition match the input symbol? */ - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _14 } /* Compute the tags after this transition. */ @@ -132966,7 +132964,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fprev = UintptrFromInt32(0) (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fnext = UintptrFromInt32(0) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags != 0 { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !(tags != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -132980,7 +132978,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states != 0 { - states_seen = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) + states_seen = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) if !(states_seen != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -133039,7 +133037,7 @@ retry: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { goto _4 } if state == UintptrFromInt32(0) { @@ -133065,7 +133063,7 @@ retry: } (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133163,11 +133161,11 @@ _9: bt = *(*int32)(unsafe.Pointer(&(*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fu)) /* Get the substring we need to match against. Remember to turn off REG_NOSUB temporarily. */ - _tre_fill_pmatch(tls, uint64(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) + _tre_fill_pmatch(tls, Uint64FromInt32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) so = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_so eo = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_eo bt_len = eo - so - result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), uint64(bt_len)) + result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), Uint64FromInt64(bt_len)) if result == 0 { /* Back reference matched. Check for infinite loop. */ if bt_len == 0 { @@ -133223,8 +133221,8 @@ _9: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _13 } if next_state == UintptrFromInt32(0) { @@ -133253,7 +133251,7 @@ _9: } (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133480,7 +133478,7 @@ func Xregexec(tls *TLS, preg uintptr, string1 uintptr, nmatch Tsize_t, pmatch ui nmatch = uint64(0) } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 && nmatch > uint64(0) { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if tags == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -133577,7 +133575,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(TRE_MEM_BLOCK_SIZE) } else { if size*uint64(8) > uint64(TRE_MEM_BLOCK_SIZE) { - block_size = int32(size * uint64(8)) + block_size = Int32FromUint64(size * uint64(8)) } else { block_size = int32(TRE_MEM_BLOCK_SIZE) } @@ -133586,7 +133584,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) return UintptrFromInt32(0) } - (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, uint64(block_size)) + (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, Uint64FromInt32(block_size)) if (*Ttre_list_t)(unsafe.Pointer(l)).Fdata == UintptrFromInt32(0) { Xfree(tls, l) (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) @@ -133601,12 +133599,12 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl } (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fcurrent = l (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr = (*Ttre_list_t)(unsafe.Pointer(l)).Fdata - (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(block_size) + (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = Uint64FromInt32(block_size) } } /* Make sure the next pointer will be aligned. */ - if (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { - v1 = uint64(8) - (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) + if (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { + v1 = uint64(8) - (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) } else { v1 = uint64(0) } @@ -133693,8 +133691,8 @@ func _resize(tls *TLS, nel Tsize_t, htab uintptr) (r int32) { _, _, _, _, _, _, _, _ = e, i, j, newe, newsize, oldsize, oldtab, v4 oldsize = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fmask + uint64(1) oldtab = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fentries - if nel > uint64(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { - nel = uint64(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) + if nel > Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { + nel = Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) } newsize = uint64(MINSIZE) for { @@ -134137,7 +134135,7 @@ func X__tsearch_balance(tls *TLS, p uintptr) (r int32) { n = *(*uintptr)(unsafe.Pointer(p)) h0 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8))) h1 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8 + 1*8))) - if uint32(h0-h1)+uint32(1) < uint32(3) { + if Uint32FromInt32(h0-h1)+uint32(1) < uint32(3) { old = (*Tnode1)(unsafe.Pointer(n)).Fh if h0 < h1 { v1 = h1 + int32(1) @@ -134235,7 +134233,7 @@ func Xpoll(tls *TLS, fds uintptr, n Tnfds_t, timeout int32) (r int32) { trc("tls=%v fds=%v n=%v timeout=%v, (%v:)", tls, fds, n, timeout, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_poll), int64(fds), int64(n), int64(timeout), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_poll), int64(fds), Int64FromUint64(n), int64(timeout), 0, 0, 0)))) } type t__ucontext3 = Tucontext_t5 @@ -134272,7 +134270,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r int32 } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), int64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), Int64FromUint64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) } type t__ucontext4 = Tucontext_t4 @@ -134290,7 +134288,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui var _ /* data at bp+16 */ [2]Tsyscall_arg_t _, _, _, _, _ = ns, s, v1, v2, v3 *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 16)) = [2]Tsyscall_arg_t{ - 0: int64(uint64(mask)), + 0: Int64FromUint64(uint64(mask)), 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } if ts != 0 { @@ -134314,7 +134312,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) } type Tucontext_t6 = struct { @@ -134350,9 +134348,9 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin v2 = 0 } us = v2 - max_time = int64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) + max_time = Int64FromUint64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) if s < 0 || us < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if us/int64(1000000) > max_time-s { s = max_time @@ -134372,7 +134370,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_select), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_select), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), 0)))) } var _all_mask = [1]uint64{ @@ -134422,9 +134420,9 @@ func Xgetitimer(tls *TLS, which int32, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) } func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { @@ -134432,7 +134430,7 @@ func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { trc("tls=%v pid=%v sig=%v, (%v:)", tls, pid, sig, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) } func Xkillpg(tls *TLS, pgid Tpid_t, sig int32) (r int32) { @@ -134509,7 +134507,7 @@ func Xraise(tls *TLS, sig int32) (r int32) { var _ /* set at bp+0 */ Tsigset_t _ = ret X__block_app_sigs(tls, bp) - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid), int64(sig))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid), int64(sig))))) X__restore_sigs(tls, bp) return ret } @@ -134545,8 +134543,8 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { vs = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_sec ius = (*Titimerval)(unsafe.Pointer(new1)).Fit_interval.Ftv_usec vus = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_usec - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, @@ -134561,9 +134559,9 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) } const __restore = 0 @@ -134600,8 +134598,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) _, _, _, _, _, _ = r, v1, v2, v3, v4, v5 if sa != 0 { if uint64(*(*uintptr)(unsafe.Pointer(sa))) > uint64(1) { - v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(uint64(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 - v2 = int64(uint64(1) << (uint64(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) + v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(Uint64FromInt32(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 + v2 = Int64FromUint64(uint64(1) << (Uint64FromInt32(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) if Uint64FromInt64(8) == Uint64FromInt64(4) { // __asm__ __volatile__( // @@ -134639,7 +134637,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) } } (*(*Tk_sigaction)(unsafe.Pointer(bp + 8))).Fhandler = *(*uintptr)(unsafe.Pointer(sa)) - (*(*Tk_sigaction)(unsafe.Pointer(bp + 8))).Fflags = uint64((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) + (*(*Tk_sigaction)(unsafe.Pointer(bp + 8))).Fflags = Uint64FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) (*(*Tk_sigaction)(unsafe.Pointer(bp + 8))).Fflags |= uint64(SA_RESTORER) if (*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags&int32(SA_SIGINFO) != 0 { v3 = __ccgo_fp(X__restore_rt) @@ -134647,7 +134645,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) v3 = __ccgo_fp(X__restore_rt) } (*(*Tk_sigaction)(unsafe.Pointer(bp + 8))).Frestorer = v3 - Xmemcpy(tls, bp+8+24, sa+8, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + Xmemcpy(tls, bp+8+24, sa+8, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } if sa != 0 { v4 = bp + 8 @@ -134662,10 +134660,10 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) r = int32(X__syscall4(tls, int64(SYS_rt_sigaction), int64(sig), int64(v4), int64(v5), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if old != 0 && !(r != 0) { *(*uintptr)(unsafe.Pointer(old)) = (*(*Tk_sigaction)(unsafe.Pointer(bp + 40))).Fhandler - (*Tsigaction)(unsafe.Pointer(old)).Fsa_flags = int32((*(*Tk_sigaction)(unsafe.Pointer(bp + 40))).Fflags) - Xmemcpy(tls, old+8, bp+40+24, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*Tsigaction)(unsafe.Pointer(old)).Fsa_flags = Int32FromUint64((*(*Tk_sigaction)(unsafe.Pointer(bp + 40))).Fflags) + Xmemcpy(tls, old+8, bp+40+24, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { @@ -134678,7 +134676,7 @@ func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { var r int32 var _ /* set at bp+0 */ [1]uint64 _ = r - if uint32(sig)-uint32(32) < uint32(3) || uint32(sig)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(sig)-uint32(32) < uint32(3) || Uint32FromInt32(sig)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134712,8 +134710,8 @@ func Xsigaddset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134736,7 +134734,7 @@ func Xsigaltstack(tls *TLS, ss uintptr, old uintptr) (r int32) { return -int32(1) } } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) } const SST_SIZE = 8 @@ -134763,7 +134761,7 @@ func Xsigandset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) & *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -134782,8 +134780,8 @@ func Xsigdelset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134837,7 +134835,7 @@ func Xsigisemptyset(tls *TLS, set uintptr) (r int32) { _ = i i = uint64(0) for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } if *(*uint64)(unsafe.Pointer(set + uintptr(i)*8)) != 0 { @@ -134858,8 +134856,8 @@ func Xsigismember(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { return 0 } return BoolInt32(!!(*(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8))&(Uint64FromUint64(1)<<(uint64(s)&(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)))) != 0)) @@ -134878,7 +134876,7 @@ func Xsigorset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) { l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) | *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -134895,7 +134893,7 @@ func Xsigpending(tls *TLS, set uintptr) (r int32) { trc("tls=%v set=%v, (%v:)", tls, set, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) } func Xsigprocmask(tls *TLS, how int32, set uintptr, old uintptr) (r1 int32) { @@ -134931,7 +134929,7 @@ func Xsigqueue(tls *TLS, pid Tpid_t, sig int32, value Tsigval) (r1 int32) { *(*Tuid_t)(unsafe.Pointer(bp + 16 + 4)) = Xgetuid(tls) X__block_app_sigs(tls, bp+128) *(*Tpid_t)(unsafe.Pointer(bp + 16)) = Xgetpid(tls) - r = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) X__restore_sigs(tls, bp+128) return r } @@ -134991,7 +134989,7 @@ func Xsigsuspend(tls *TLS, mask uintptr) (r int32) { trc("tls=%v mask=%v, (%v:)", tls, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) } func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r int32) { @@ -135008,7 +135006,7 @@ func Xsigtimedwait(tls *TLS, mask uintptr, si uintptr, timeout uintptr) (r int32 for cond := true; cond; cond = ret == -int32(EINTR) { ret = _do_sigtimedwait(tls, mask, si, timeout) } - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsigwait(tls *TLS, mask uintptr, sig uintptr) (r int32) { @@ -135087,7 +135085,7 @@ func Xchmod(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_chmod), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_chmod), int64(path), Int64FromUint32(mode))))) } func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { @@ -135100,12 +135098,12 @@ func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]int8 _ = ret - ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), int64(mode))) + ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), Int64FromUint32(mode))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_chmod), int64(bp), int64(mode))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_chmod), int64(bp), Int64FromUint32(mode))))) } func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r int32) { @@ -135120,36 +135118,36 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in var _ /* st at bp+0 */ Tstat _, _, _ = fd2, ret, v1 if !(flag != 0) { - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), Int64FromUint32(mode))))) } - ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), int64(mode), int64(flag))) + ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), Int64FromUint32(mode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag != int32(AT_SYMLINK_NOFOLLOW) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if Xfstatat(tls, fd, path, bp, flag) != 0 { return -int32(1) } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } v1 = int32(X__syscall3(tls, int64(SYS_openat), int64(fd), int64(path), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_PATH)|Int32FromInt32(O_NOFOLLOW)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC)))) fd2 = v1 if v1 < 0 { if fd2 == -int32(ELOOP) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } - return int32(X__syscall_ret(tls, uint64(fd2))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd2))) } - X__procfdname(tls, bp+144, uint32(fd2)) + X__procfdname(tls, bp+144, Uint32FromInt32(fd2)) ret = Xstat(tls, bp+144, bp) if !(ret != 0) { if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - ret = int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + ret = int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } else { - ret = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+144), int64(mode))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+144), Int64FromUint32(mode))))) } } X__syscall1(tls, int64(SYS_close), int64(fd2)) @@ -135162,7 +135160,7 @@ func X__fstat(tls *TLS, fd int32, st uintptr) (r int32) { defer func() { trc("-> %v", r) }() } if fd < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EBADF)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EBADF)))) } return X__fstatat(tls, fd, __ccgo_ts, st, int32(AT_EMPTY_PATH)) } @@ -135234,20 +135232,20 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r Fst_uid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_uid, Fst_gid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_gid, Fst_rdev: uint64(uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<= 0 { ret = int32(X__syscall4(tls, int64(SYS_newfstatat), int64(fd), int64(path), int64(bp), int64(flag))) if ret == -int32(EINVAL) { - X__procfdname(tls, bp+144, uint32(fd)) + X__procfdname(tls, bp+144, Uint32FromInt32(fd)) ret = int32(X__syscall2(tls, int64(SYS_stat), int64(bp+144), int64(bp))) } } @@ -135341,11 +135339,11 @@ func X__fstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int if uint64(8) < uint64(8) { ret = _fstatat_statx(tls, fd, path, st, flag) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } ret = _fstatat_kstat(tls, fd, path, st, flag) - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xfstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int32) { @@ -135381,8 +135379,8 @@ func X__futimesat(tls *TLS, dirfd int32, pathname uintptr, times uintptr) (r int if !(i < int32(2)) { break } - if uint64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_sec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_nsec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec * int64(1000) @@ -135429,7 +135427,7 @@ func Xmkdir(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_mkdir), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_mkdir), int64(path), Int64FromUint32(mode))))) } func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { @@ -135437,7 +135435,7 @@ func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v fd=%v path=%v mode=%v, (%v:)", tls, fd, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), Int64FromUint32(mode))))) } func Xmkfifo(tls *TLS, path uintptr, mode Tmode_t) (r int32) { @@ -135461,7 +135459,7 @@ func Xmknod(tls *TLS, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { trc("tls=%v path=%v mode=%v dev=%v, (%v:)", tls, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mknod), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mknod), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { @@ -135469,7 +135467,7 @@ func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int trc("tls=%v fd=%v path=%v mode=%v dev=%v, (%v:)", tls, fd, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { @@ -135482,7 +135480,7 @@ func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { func ___statfs(tls *TLS, path uintptr, buf uintptr) (r int32) { *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_statfs), int64(path), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_statfs), int64(path), int64(buf))))) } func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { @@ -135491,7 +135489,7 @@ func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { defer func() { trc("-> %v", r) }() } *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fstatfs), int64(fd), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fstatfs), int64(fd), int64(buf))))) } func _fixup(tls *TLS, out uintptr, in uintptr) { @@ -135511,7 +135509,7 @@ func _fixup(tls *TLS, out uintptr, in uintptr) { (*Tstatvfs)(unsafe.Pointer(out)).Ff_files = (*Tstatfs)(unsafe.Pointer(in)).Ff_files (*Tstatvfs)(unsafe.Pointer(out)).Ff_ffree = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree (*Tstatvfs)(unsafe.Pointer(out)).Ff_favail = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree - (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = uint64(*(*int32)(unsafe.Pointer(in + 56))) + (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = Uint64FromInt32(*(*int32)(unsafe.Pointer(in + 56))) (*Tstatvfs)(unsafe.Pointer(out)).Ff_flag = (*Tstatfs)(unsafe.Pointer(in)).Ff_flags (*Tstatvfs)(unsafe.Pointer(out)).Ff_namemax = (*Tstatfs)(unsafe.Pointer(in)).Ff_namelen (*Tstatvfs)(unsafe.Pointer(out)).Ff_type = uint32((*Tstatfs)(unsafe.Pointer(in)).Ff_type) @@ -135552,7 +135550,7 @@ func Xumask(tls *TLS, mode Tmode_t) (r Tmode_t) { trc("tls=%v mode=%v, (%v:)", tls, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_umask), int64(mode))))) + return Uint32FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_umask), Int64FromUint32(mode))))) } func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r1 int32) { @@ -135571,7 +135569,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = int32(X__syscall4(tls, int64(SYS_utimensat), int64(fd), int64(path), int64(times), int64(flags))) if r != -int32(ENOSYS) || flags != 0 { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } tv = uintptr(0) if times != 0 { @@ -135581,11 +135579,11 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r if !(i < int32(2)) { break } - if uint64((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { + if Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { if (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int64(UTIME_NOW) || (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int64(UTIME_OMIT) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOSYS)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOSYS)))) } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)*i+0] = (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)*i+int32(1)] = (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec / int64(1000) @@ -135597,10 +135595,10 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = int32(X__syscall3(tls, int64(SYS_futimesat), int64(fd), int64(path), int64(tv))) if r != -int32(ENOSYS) || fd != -int32(100) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } r = int32(X__syscall2(tls, int64(SYS_utimes), int64(path), int64(tv))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__fclose_ca(tls *TLS, f uintptr) (r int32) { @@ -135642,7 +135640,7 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { } else { v2 = int32(F_NORD) } - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(v2) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(v2) } /* Apply close-on-exec flag */ if Xstrchr(tls, mode, int32('e')) != 0 { @@ -135724,12 +135722,12 @@ func X__fopen_rb_ca(tls *TLS, filename uintptr, f uintptr, buf uintptr, len1 Tsi defer func() { trc("-> %v", r) }() } Xmemset(tls, f, 0, uint64(232)) - (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_open), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) + (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_open), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) if (*TFILE)(unsafe.Pointer(f)).Ffd < 0 { return uintptr(0) } X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) (*TFILE)(unsafe.Pointer(f)).Fbuf = buf + uintptr(UNGET) (*TFILE)(unsafe.Pointer(f)).Fbuf_size = len1 - uint64(UNGET) (*TFILE)(unsafe.Pointer(f)).Fread = __ccgo_fp(X__stdio_read) @@ -135750,22 +135748,22 @@ func X__overflow(tls *TLS, f uintptr, _c int32) (r int32) { var v2, v3 uintptr var _ /* c at bp+0 */ uint8 _, _, _ = v1, v2, v3 - *(*uint8)(unsafe.Pointer(bp)) = uint8(_c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(_c) if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return -int32(1) } - if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && int32(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { + if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { v1 = *(*uint8)(unsafe.Pointer(bp)) v3 = f + 40 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ *(*uint8)(unsafe.Pointer(v2)) = v1 - return int32(v1) + return Int32FromUint8(v1) } if (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, bp, uint64(1)) != uint64(1) { return -int32(1) } - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } func _dummy9(tls *TLS, fd int32) (r int32) { @@ -135777,7 +135775,7 @@ func X__stdio_close(tls *TLS, f uintptr) (r int32) { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) } var _dummy_file = uintptr(0) @@ -135850,9 +135848,9 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { }, } if (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len != 0 { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) } else { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, SYS_read, int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, SYS_read, int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), Int64FromUint64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) } cnt = v1 if cnt <= 0 { @@ -135861,11 +135859,11 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32(F_EOF) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v2) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v2) return uint64(0) } - if uint64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { - return uint64(cnt) + if Uint64FromInt64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { + return Uint64FromInt64(cnt) } cnt = Tssize_t(uint64(cnt) - (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len) (*TFILE)(unsafe.Pointer(f)).Frpos = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -135904,7 +135902,7 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { Fiov_base: (*TFILE)(unsafe.Pointer(f)).Fwbase, - Fiov_len: uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), + Fiov_len: Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), }, 1: { Fiov_base: buf, @@ -135915,8 +135913,8 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) rem = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len + (*(*Tiovec)(unsafe.Pointer(iov + 1*16))).Fiov_len iovcnt = int32(2) for { - cnt = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) - if uint64(cnt) == rem { + cnt = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) + if Uint64FromInt64(cnt) == rem { (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v2 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fwbase = v2 @@ -135937,14 +135935,14 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) } return v5 } - rem -= uint64(cnt) - if uint64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { + rem -= Uint64FromInt64(cnt) + if Uint64FromInt64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { cnt = Tssize_t(uint64(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len) iov += 16 iovcnt-- } (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base + uintptr(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= uint64(cnt) + (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= Uint64FromInt64(cnt) goto _1 _1: } @@ -136048,7 +136046,7 @@ func X__uflow(tls *TLS, f uintptr) (r int32) { defer tls.Free(16) var _ /* c at bp+0 */ uint8 if !(X__toread(tls, f) != 0) && (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fread})))(tls, f, bp, uint64(1)) == uint64(1) { - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } return -int32(1) } @@ -136079,7 +136077,7 @@ func Xclearerr(tls *TLS, f uintptr) { v1 = 0 } __need_unlock = v1 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -136185,7 +136183,7 @@ func X__fpending(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__fpurge(tls *TLS, f uintptr) (r int32) { @@ -136229,7 +136227,7 @@ func X__freadahead(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { @@ -136240,7 +136238,7 @@ func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { if (*TFILE)(unsafe.Pointer(f)).Frpos == (*TFILE)(unsafe.Pointer(f)).Frend { return uintptr(0) } - *(*Tsize_t)(unsafe.Pointer(sizep)) = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + *(*Tsize_t)(unsafe.Pointer(sizep)) = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) return (*TFILE)(unsafe.Pointer(f)).Frpos } @@ -136488,7 +136486,7 @@ _3: v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, f) } @@ -136532,7 +136530,7 @@ func Xfgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -136568,27 +136566,27 @@ func Xfgetln(tls *TLS, f uintptr, plen uintptr) (r uintptr) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } Xungetc(tls, v2, f) if v6 = (*TFILE)(unsafe.Pointer(f)).Frend != 0; v6 { - v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) z = v5 } if v6 && v5 != 0 { ret = (*TFILE)(unsafe.Pointer(f)).Frpos z++ v7 = z - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(int64(v7) - int64(ret)) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(int64(v7) - int64(ret)) (*TFILE)(unsafe.Pointer(f)).Frpos = z } else { *(*[1]Tsize_t)(unsafe.Pointer(bp)) = [1]Tsize_t{} v8 = Xgetline(tls, f+168, bp, f) l = v8 if v8 > 0 { - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(l) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(l) ret = (*TFILE)(unsafe.Pointer(f)).Fgetln_buf } } @@ -136646,17 +136644,17 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { n-- for n != 0 { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v2 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v2 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v2) - if k < uint64(n) { + k = Uint64FromInt64(v2) + if k < Uint64FromInt32(n) { v3 = k } else { - v3 = uint64(n) + v3 = Uint64FromInt32(n) } k = v3 Xmemcpy(tls, p, (*TFILE)(unsafe.Pointer(f)).Frpos, k) @@ -136671,7 +136669,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -136721,27 +136719,27 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { _, _, _, _, _, _, _ = c, first, l, v1, v2, v3, v4 /* Convert character from buffer if possible */ if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - l = uint64(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) + l = Uint64FromInt32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) if l+uint64(1) >= uint64(1) { *(*uintptr)(unsafe.Pointer(f + 8)) += uintptr(l + BoolUint64(!(l != 0))) /* l==0 means 1 byte, null */ - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } /* Convert character byte-by-byte */ *(*Tmbstate_t)(unsafe.Pointer(bp + 8)) = Tmbstate_t{} first = int32(1) - for cond := true; cond; cond = l == uint64(-Int32FromInt32(2)) { + for cond := true; cond; cond = l == Uint64FromInt32(-Int32FromInt32(2)) { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } v1 = v2 c = v1 - *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(v1) + *(*uint8)(unsafe.Pointer(bp + 16)) = Uint8FromInt32(v1) if c < 0 { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) @@ -136750,16 +136748,16 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { return uint32(0xffffffff) } l = Xmbrtowc(tls, bp, bp+16, uint64(1), bp+8) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - Xungetc(tls, int32(*(*uint8)(unsafe.Pointer(bp + 16))), f) + Xungetc(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 16))), f) } return uint32(0xffffffff) } first = 0 } - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { @@ -136777,9 +136775,9 @@ func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - wc = int32(___fgetwc_unlocked_internal(tls, f)) + wc = Int32FromUint32(___fgetwc_unlocked_internal(tls, f)) *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(wc) + return Uint32FromInt32(wc) } func Xfgetwc(tls *TLS, f uintptr) (r Twint_t) { @@ -136850,7 +136848,7 @@ func Xfgetws(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { } v4 = p p += 4 - *(*Twchar_t)(unsafe.Pointer(v4)) = int32(c) + *(*Twchar_t)(unsafe.Pointer(v4)) = Int32FromUint32(c) if c == uint32('\n') { break } @@ -136947,7 +136945,7 @@ func _mseek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -136961,13 +136959,13 @@ _1: 1: (*Tcookie)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) - if off < -base || off > int64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + if off < -base || off > Int64FromUint64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _mread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -137001,7 +136999,7 @@ func _mwrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2, rem Tsize_t _, _, _ = c, len2, rem c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _mwrite(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwpos, len2) < len2 { @@ -137049,7 +137047,7 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } - if !(buf != 0) && size > uint64(Int64FromInt64(INT64_MAX)) { + if !(buf != 0) && size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -137081,7 +137079,7 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { } else { v2 = int32(F_NORD) } - (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } if int32(*(*int8)(unsafe.Pointer(mode))) == int32('r') { (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = size @@ -137121,7 +137119,7 @@ func Xfopen(tls *TLS, filename uintptr, mode uintptr) (r uintptr) { } /* Compute the flags to pass to open() */ flags = X__fmodeflags(tls, mode) - fd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) if fd < 0 { return uintptr(0) } @@ -137166,8 +137164,8 @@ func _cookieread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { if ret <= 0 { goto bail } - readlen += uint64(ret) - remain -= uint64(ret) + readlen += Uint64FromInt64(ret) + remain -= Uint64FromInt64(ret) } if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) || remain > BoolUint64(!!((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0)) { return readlen @@ -137193,7 +137191,7 @@ bail: } else { v4 = int32(F_ERR) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v4) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v4) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Frend = v5 (*TFILE)(unsafe.Pointer(f)).Frpos = v5 @@ -137206,7 +137204,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var ret Tssize_t _, _, _, _, _ = fc, len2, ret, v1, v2 fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if !((*Tfcookie)(unsafe.Pointer(fc)).Fiofuncs.Fwrite != 0) { return len1 } @@ -137226,7 +137224,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) return uint64(0) } - return uint64(ret) + return Uint64FromInt64(ret) } func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { @@ -137237,7 +137235,7 @@ func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { var res int32 _, _ = fc, res fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - if uint32(whence) > uint32(2) { + if Uint32FromInt32(whence) > uint32(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -137290,7 +137288,7 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun } else { v2 = int32(F_NORD) } - (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } /* Set up our fcookie */ (*Tcookie_FILE)(unsafe.Pointer(f)).Ffc.Fcookie = cookie @@ -137340,15 +137338,15 @@ _3: if v2 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v5 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v5 = Uint8FromInt32(c) v7 = f + 40 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ *(*uint8)(unsafe.Pointer(v6)) = v5 - v4 = int32(v5) + v4 = Int32FromUint8(v5) } else { - v4 = X__overflow(tls, f, int32(uint8(c))) + v4 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v4 v8 = 0 @@ -137388,15 +137386,15 @@ func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -137445,16 +137443,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - if BoolInt32(uint32(c) < uint32(128)) != 0 { - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if BoolInt32(Uint32FromInt32(c) < uint32(128)) != 0 { + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v1 } else { @@ -137467,16 +137465,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } } else { l = Xwctomb(tls, bp, c) - if l < 0 || X__fwritex(tls, bp, uint64(l), f) < uint64(l) { + if l < 0 || X__fwritex(tls, bp, Uint64FromInt32(l), f) < Uint64FromInt32(l) { c = Int32FromUint32(0xffffffff) } } } - if uint32(c) == uint32(0xffffffff) { + if Uint32FromInt32(c) == uint32(0xffffffff) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137492,11 +137490,11 @@ func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { v1 = 0 } __need_unlock = v1 - c = int32(X__fputwc_unlocked(tls, c, f)) + c = Int32FromUint32(X__fputwc_unlocked(tls, c, f)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137561,7 +137559,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { ___unlockfile(tls, f) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return int32(l) /* 0 or -1 */ + return Int32FromUint64(l) /* 0 or -1 */ } func Xfputws_unlocked(tls *TLS, _ws uintptr, f uintptr) (r int32) { @@ -137597,8 +137595,8 @@ func Xfread(tls *TLS, destv uintptr, size Tsize_t, nmemb Tsize_t, f uintptr) (r *(*int32)(unsafe.Pointer(f + 136)) |= (*TFILE)(unsafe.Pointer(f)).Fmode - int32(1) if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { /* First exhaust the buffer. */ - if uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { - v2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + if Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { + v2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) } else { v2 = l } @@ -137674,7 +137672,7 @@ func Xfreopen(tls *TLS, filename uintptr, mode uintptr, f uintptr) (r uintptr) { X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } fl &= ^(Int32FromInt32(O_CREAT) | Int32FromInt32(O_EXCL) | Int32FromInt32(O_CLOEXEC)) - if X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { goto fail } } else { @@ -137772,7 +137770,7 @@ func X__fseeko_unlocked(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32) v3 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v3 (*TFILE)(unsafe.Pointer(f)).Frpos = v3 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) return 0 } @@ -138077,14 +138075,14 @@ func X__fwritex(tls *TLS, s uintptr, l Tsize_t, f uintptr) (r Tsize_t) { if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return uint64(0) } - if l > uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { + if l > Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { return (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, s, l) } if (*TFILE)(unsafe.Pointer(f)).Flbf >= 0 { /* Match /^(.*\n|)/ */ i = l for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { break } goto _1 @@ -138187,7 +138185,7 @@ _3: v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, f) } @@ -138231,7 +138229,7 @@ func Xgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138264,7 +138262,7 @@ func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -138307,7 +138305,7 @@ _3: v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, f) } @@ -138351,7 +138349,7 @@ func Xgetchar(tls *TLS) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138376,7 +138374,7 @@ func Xgetchar_unlocked(tls *TLS) (r int32) { v3 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -138415,13 +138413,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize } for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v3 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v3 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v3) + k = Uint64FromInt64(v3) } else { z = uintptr(0) k = uint64(0) @@ -138465,7 +138463,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -138486,7 +138484,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) - *(*uint8)(unsafe.Pointer(v8)) = uint8(c) + *(*uint8)(unsafe.Pointer(v8)) = Uint8FromInt32(c) } else { v10 = int8(c) v11 = i @@ -138503,7 +138501,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize if __need_unlock != 0 { ___unlockfile(tls, f) } - return int64(i) + return Int64FromUint64(i) } func X__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t) { @@ -138543,7 +138541,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { v5 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -138667,7 +138665,7 @@ func _ms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -138681,13 +138679,13 @@ _1: 1: (*Tcookie1)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie1)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > int64(0x7fffffffffffffff)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie1)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -138695,7 +138693,7 @@ func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _ms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -138801,7 +138799,7 @@ func _wms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -138815,14 +138813,14 @@ _1: 1: (*Tcookie2)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie2)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)-base { goto fail } Xmemset(tls, c+48, 0, uint64(8)) - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie2)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -138833,7 +138831,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _wms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -138842,7 +138840,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { } if len1+(*Tcookie2)(unsafe.Pointer(c)).Fpos >= (*Tcookie2)(unsafe.Pointer(c)).Fspace { len2 = uint64(2)*(*Tcookie2)(unsafe.Pointer(c)).Fspace + uint64(1) | ((*Tcookie2)(unsafe.Pointer(c)).Fpos + len1 + uint64(1)) - if len2 > uint64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { + if len2 > Uint64FromInt64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { return uint64(0) } newbuf = Xrealloc(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf, len2*uint64(4)) @@ -138856,7 +138854,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { (*Tcookie2)(unsafe.Pointer(c)).Fspace = len2 } len2 = Xmbsnrtowcs(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf+uintptr((*Tcookie2)(unsafe.Pointer(c)).Fpos)*4, bp, len1, (*Tcookie2)(unsafe.Pointer(c)).Fspace-(*Tcookie2)(unsafe.Pointer(c)).Fpos, c+48) - if len2 == uint64(-Int32FromInt32(1)) { + if len2 == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } *(*Tsize_t)(unsafe.Pointer(c + 16)) += len2 @@ -138942,7 +138940,7 @@ func Xpclose(tls *TLS, f uintptr) (r1 int32) { } } if r < 0 { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } return *(*int32)(unsafe.Pointer(bp)) } @@ -139011,15 +139009,15 @@ _3: if v2 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v5 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v5 = Uint8FromInt32(c) v7 = f + 40 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ *(*uint8)(unsafe.Pointer(v6)) = v5 - v4 = int32(v5) + v4 = Int32FromUint8(v5) } else { - v4 = X__overflow(tls, f, int32(uint8(c))) + v4 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v4 v8 = 0 @@ -139059,15 +139057,15 @@ func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139095,15 +139093,15 @@ func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139141,15 +139139,15 @@ _3: if v2 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v5 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v5 = Uint8FromInt32(c) v7 = f + 40 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ *(*uint8)(unsafe.Pointer(v6)) = v5 - v4 = int32(v5) + v4 = Int32FromUint8(v5) } else { - v4 = X__overflow(tls, f, int32(uint8(c))) + v4 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v4 v8 = 0 @@ -139189,15 +139187,15 @@ func Xputchar(tls *TLS, c1 int32) (r int32) { v2 = uintptr(unsafe.Pointer(&X__stdout_FILE)) l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139217,15 +139215,15 @@ func Xputchar_unlocked(tls *TLS, c int32) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v2 = Uint8FromInt32(c) v4 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(c))) + v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139247,15 +139245,15 @@ func Xputs(tls *TLS, s uintptr) (r1 int32) { } __need_unlock = v1 if v6 = Xfputs(tls, s, uintptr(unsafe.Pointer(&X__stdout_FILE))) < 0; !v6 { - if int32(uint8(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v3 = uint8(Int32FromUint8('\n')) + if Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v3 = Uint8FromInt32(Int32FromUint8('\n')) v5 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ *(*uint8)(unsafe.Pointer(v4)) = v3 - v2 = int32(v3) + v2 = Int32FromUint8(v3) } else { - v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(Int32FromUint8('\n')))) + v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n')))) } } r = -BoolInt32(v6 || v2 < 0) @@ -139273,7 +139271,7 @@ func Xputw(tls *TLS, _x int32, f uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) *(*int32)(unsafe.Pointer(bp)) = _x - return int32(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) + return Int32FromUint64(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) } func Xputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -139311,7 +139309,7 @@ func Xremove(tls *TLS, path uintptr) (r1 int32) { if r == -int32(EISDIR) { r = int32(X__syscall1(tls, int64(SYS_rmdir), int64(path))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { @@ -139319,7 +139317,7 @@ func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { trc("tls=%v old=%v new1=%v, (%v:)", tls, old, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_rename), int64(old), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_rename), int64(old), int64(new1))))) } func Xrewind(tls *TLS, f uintptr) { @@ -139335,7 +139333,7 @@ func Xrewind(tls *TLS, f uintptr) { } __need_unlock = v1 X__fseeko_unlocked(tls, f, 0, 0) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -139610,7 +139608,7 @@ func Xtmpfile(tls *TLS) (r uintptr) { break } ___randname(tls, bp+uintptr(13)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) if fd >= 0 { X__syscall1(tls, int64(SYS_unlink), int64(bp)) f = X__fdopen(tls, fd, __ccgo_ts+1600) @@ -139694,12 +139692,12 @@ func Xungetc(tls *TLS, c int32, f uintptr) (r int32) { v3 = f + 8 *(*uintptr)(unsafe.Pointer(v3))-- v2 = *(*uintptr)(unsafe.Pointer(v3)) - *(*uint8)(unsafe.Pointer(v2)) = uint8(c) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(c) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(uint8(c)) + return Int32FromUint8(Uint8FromInt32(c)) } func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { @@ -139731,7 +139729,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { X__toread(tls, f) } if v3 = !((*TFILE)(unsafe.Pointer(f)).Frpos != 0) || c == uint32(0xffffffff); !v3 { - v2 = int32(Xwcrtomb(tls, bp, int32(c), uintptr(0))) + v2 = Int32FromUint64(Xwcrtomb(tls, bp, Int32FromUint32(c), uintptr(0))) l = v2 } if v3 || v2 < 0 || (*TFILE)(unsafe.Pointer(f)).Frpos < (*TFILE)(unsafe.Pointer(f)).Fbuf-uintptr(UNGET)+uintptr(l) { @@ -139749,9 +139747,9 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { } else { p6 = f + 8 *(*uintptr)(unsafe.Pointer(p6)) -= uintptr(l) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint64(l)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, Uint64FromInt32(l)) } - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -139773,13 +139771,13 @@ func Xvasprintf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32) { l = Xvsnprintf(tls, uintptr(0), uint64(0), fmt, ap2) _ = ap2 if v2 = l < 0; !v2 { - v1 = Xmalloc(tls, uint64(uint32(l)+uint32(1))) + v1 = Xmalloc(tls, uint64(Uint32FromInt32(l)+uint32(1))) *(*uintptr)(unsafe.Pointer(s)) = v1 } if v2 || !(v1 != 0) { return -int32(1) } - return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(uint32(l)+uint32(1)), fmt, ap) + return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(Uint32FromInt32(l)+uint32(1)), fmt, ap) } func Xvdprintf(tls *TLS, fd int32, fmt uintptr, ap Tva_list) (r int32) { @@ -139959,33 +139957,33 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -140007,18 +140005,18 @@ func _pad3(tls *TLS, f uintptr, c int8, w int32, l int32, fl int32) { var v1 uint64 var _ /* pad at bp+0 */ [256]int8 _ = v1 - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { return } l = w - l - if uint64(l) > uint64(256) { + if Uint64FromInt32(l) > uint64(256) { v1 = uint64(256) } else { - v1 = uint64(l) + v1 = Uint64FromInt32(l) } Xmemset(tls, bp, int32(c), v1) for { - if !(uint64(l) >= uint64(256)) { + if !(Uint64FromInt32(l) >= uint64(256)) { break } _out(tls, f, bp, uint64(256)) @@ -140027,7 +140025,7 @@ func _pad3(tls *TLS, f uintptr, c int8, w int32, l int32, fl int32) { ; l = int32(uint64(l) - Uint64FromInt64(256)) } - _out(tls, f, bp, uint64(l)) + _out(tls, f, bp, Uint64FromInt32(l)) } var _xdigits1 = [16]int8{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} @@ -140059,7 +140057,7 @@ func _fmt_o(tls *TLS, x Tuintmax_t, s uintptr) (r uintptr) { } s-- v2 = s - *(*int8)(unsafe.Pointer(v2)) = int8(uint64('0') + x&uint64(7)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint64(uint64('0') + x&uint64(7)) goto _1 _1: ; @@ -140078,7 +140076,7 @@ func _fmt_u(tls *TLS, x Tuintmax_t, s uintptr) (r uintptr) { } s-- v2 = s - *(*int8)(unsafe.Pointer(v2)) = int8(uint64('0') + x%uint64(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint64(uint64('0') + x%uint64(10)) goto _1 _1: ; @@ -140091,7 +140089,7 @@ func _fmt_u(tls *TLS, x Tuintmax_t, s uintptr) (r uintptr) { } s-- v4 = s - *(*int8)(unsafe.Pointer(v4)) = int8(uint64('0') + y%uint64(10)) + *(*int8)(unsafe.Pointer(v4)) = Int8FromUint64(uint64('0') + y%uint64(10)) goto _3 _3: ; @@ -140134,13 +140132,13 @@ func _fmt_fp(tls *TLS, f uintptr, y float64, w int32, p int32, fl int32, t int32 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: - if int32(v1>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v1>>Int32FromInt32(63)) != 0 { y = -y } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { prefix += uintptr(3) } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { prefix += uintptr(6) } else { prefix++ @@ -140167,10 +140165,10 @@ _4: } s1 = v6 } - _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) - _out(tls, f, prefix, uint64(pl)) + _pad3(tls, f, int8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) + _out(tls, f, prefix, Uint64FromInt32(pl)) _out(tls, f, s1, uint64(3)) - _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > int32(3)+pl { v7 = w } else { @@ -140218,7 +140216,7 @@ _4: } else { v9 = *(*int32)(unsafe.Pointer(bp + 512)) } - estr = _fmt_u(tls, uint64(v9), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v9), ebuf) if estr == ebuf { estr-- v10 = estr @@ -140242,7 +140240,7 @@ _4: s++ *(*int8)(unsafe.Pointer(v14)) = int8(int32(_xdigits1[x]) | t&int32(32)) y = Float64FromInt32(16) * (y - float64(x)) - if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { v15 = s s++ *(*int8)(unsafe.Pointer(v15)) = int8('.') @@ -140257,12 +140255,12 @@ _4: l = int32(int64(s) - t__predefined_ptrdiff_t(bp+516) + (int64(ebuf) - int64(estr))) } _pad3(tls, f, int8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, int8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) - _out(tls, f, bp+516, uint64(int64(s)-t__predefined_ptrdiff_t(bp+516))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, int8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, bp+516, Uint64FromInt64(int64(s)-t__predefined_ptrdiff_t(bp+516))) _pad3(tls, f, int8('0'), int32(int64(l)-(int64(ebuf)-int64(estr))-(int64(s)-t__predefined_ptrdiff_t(bp+516))), 0, 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) - _pad3(tls, f, int8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) + _pad3(tls, f, int8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v16 = w } else { @@ -140335,15 +140333,15 @@ _4: v25 = -*(*int32)(unsafe.Pointer(bp + 512)) } sh1 = v25 - need = int32(uint32(1) + (uint32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) + need = Int32FromUint32(uint32(1) + (Uint32FromInt32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) d = a for { if !(d < z) { break } - rm = *(*Tuint32_t)(unsafe.Pointer(d)) & uint32(int32(1)<>sh1 + carry1 - carry1 = uint32(Int32FromInt32(1000000000)>>sh1) * rm + carry1 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh1) * rm goto _26 _26: ; @@ -140373,7 +140371,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _29 @@ -140404,17 +140402,17 @@ _4: i *= int32(10) j++ } - x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(i) + x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % Uint32FromInt32(i) /* Are there any significant digits past j? */ if x2 != 0 || d+uintptr(1)*4 != z { round1 = Float64FromInt32(2) / Float64FromFloat64(2.22044604925031308085e-16) - if *(*Tuint32_t)(unsafe.Pointer(d))/uint32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { + if *(*Tuint32_t)(unsafe.Pointer(d))/Uint32FromInt32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { round1 += Float64FromInt32(2) } - if x2 < uint32(i/int32(2)) { + if x2 < Uint32FromInt32(i/int32(2)) { small = Float64FromFloat64(0.5) } else { - if x2 == uint32(i/int32(2)) && d+uintptr(1)*4 == z { + if x2 == Uint32FromInt32(i/int32(2)) && d+uintptr(1)*4 == z { small = Float64FromFloat64(1) } else { small = Float64FromFloat64(1.5) @@ -140427,7 +140425,7 @@ _4: *(*Tuint32_t)(unsafe.Pointer(d)) -= x2 /* Decide whether to round by probing round+small */ if round1+small != round1 { - *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + uint32(i) + *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + Uint32FromInt32(i) for *(*Tuint32_t)(unsafe.Pointer(d)) > uint32(999999999) { v31 = d d -= 4 @@ -140442,7 +140440,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _33 @@ -140477,13 +140475,13 @@ _4: t -= int32(2) p-- } - if !(uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if !(Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { /* Count trailing zeros in last place */ if z > a && *(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4)) != 0 { i = int32(10) j = Int32FromInt32(0) for { - if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%uint32(i) == uint32(0)) { + if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%Uint32FromInt32(i) == uint32(0)) { break } goto _35 @@ -140532,10 +140530,10 @@ _4: } } } - if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { return -int32(1) } - l = int32(1) + p + BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) + l = int32(1) + p + BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) if t|int32(32) == int32('f') { if e > int32(INT_MAX)-l { return -int32(1) @@ -140549,7 +140547,7 @@ _4: } else { v42 = e } - estr = _fmt_u(tls, uint64(v42), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v42), ebuf) for int64(ebuf)-int64(estr) < int64(2) { estr-- v43 = estr @@ -140575,8 +140573,8 @@ _4: return -int32(1) } _pad3(tls, f, int8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, int8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, int8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) if t|int32(32) == int32('f') { if a > r { a = r @@ -140600,13 +140598,13 @@ _4: *(*int8)(unsafe.Pointer(v49)) = int8('0') } } - _out(tls, f, s2, uint64(int64(bp+516+uintptr(9))-int64(s2))) + _out(tls, f, s2, Uint64FromInt64(int64(bp+516+uintptr(9))-int64(s2))) goto _47 _47: ; d += 4 } - if p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+575, uint64(1)) } for { @@ -140624,7 +140622,7 @@ _4: } else { v52 = p } - _out(tls, f, s3, uint64(v52)) + _out(tls, f, s3, Uint64FromInt32(v52)) goto _50 _50: ; @@ -140657,7 +140655,7 @@ _4: v56 = s4 s4++ _out(tls, f, v56, uint64(1)) - if p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+575, uint64(1)) } } @@ -140666,7 +140664,7 @@ _4: } else { v57 = int64(p) } - _out(tls, f, s4, uint64(v57)) + _out(tls, f, s4, Uint64FromInt64(v57)) p = int32(int64(p) - (int64(bp+516+UintptrFromInt32(9)) - int64(s4))) goto _53 _53: @@ -140674,9 +140672,9 @@ _4: d += 4 } _pad3(tls, f, int8('0'), p+int32(18), int32(18), 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) } - _pad3(tls, f, int8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v58 = w } else { @@ -140690,10 +140688,10 @@ func _getint(tls *TLS, s uintptr) (r int32) { _ = i i = 0 for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { i = int32(10)*i + (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) @@ -140765,12 +140763,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32(int64(z) - int64(a)) if f != 0 { - _out(tls, f, a, uint64(l)) + _out(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) argpos = int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) @@ -140781,7 +140779,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { + if !(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { break } fl |= uint32(1) << (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) @@ -140792,13 +140790,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read field width */ if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) if !(f != 0) { *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) w = Int32FromInt32(0) } else { - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { @@ -140827,12 +140825,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read precision */ if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { if !(f != 0) { *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) p = Int32FromInt32(0) } else { - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(4) } else { @@ -140862,7 +140860,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -140881,13 +140879,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { if argpos >= 0 { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) } else { *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } } else { if f != 0 { - _pop_arg(tls, bp+8, int32(st), ap) + _pop_arg(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -140967,24 +140965,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) break } goto _1 _10: ; - if uint64(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { - v31 = uint64(p) + if Uint64FromInt32(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { + v31 = Uint64FromInt32(p) } else { v31 = Uint64FromInt32(2) * Uint64FromInt64(8) } - p = int32(v31) + p = Int32FromUint64(v31) t = int32('x') fl |= Uint32FromUint32(1) << (Int32FromUint8('#') - Int32FromUint8(' ')) _12: @@ -141015,7 +141013,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, _14: ; pl = int32(1) - if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > uint64(Int64FromInt64(INT64_MAX)) { + if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) = -*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { if fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { @@ -141059,7 +141057,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, p = v36 v35 = z - uintptr(v36) a = v35 - *(*int8)(unsafe.Pointer(v35)) = int8(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) + *(*int8)(unsafe.Pointer(v35)) = Int8FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) fl &= ^(Uint32FromUint32(1) << (Int32FromUint8('0') - Int32FromUint8(' '))) goto _30 _19: @@ -141086,7 +141084,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v40 = p } - z = a + uintptr(Xstrnlen(tls, a, uint64(v40))) + z = a + uintptr(Xstrnlen(tls, a, Uint64FromInt32(v40))) if p < 0 && *(*int8)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -141098,7 +141096,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if !(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0) { goto narrow_c } - (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) + (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[int32(1)] = 0 *(*uintptr)(unsafe.Pointer(bp + 8)) = bp + 40 p = -int32(1) @@ -141107,21 +141105,21 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, ws = *(*uintptr)(unsafe.Pointer(bp + 8)) v42 = Int32FromInt32(0) l = v42 - i = uint64(v42) + i = Uint64FromInt32(v42) for { - if v45 = i < uint64(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { + if v45 = i < Uint64FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { v44 = ws ws += 4 v43 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v44))) l = v43 } - if !(v45 && v43 >= 0 && uint64(l) <= uint64(p)-i) { + if !(v45 && v43 >= 0 && Uint64FromInt32(l) <= Uint64FromInt32(p)-i) { break } goto _41 _41: ; - i += uint64(l) + i += Uint64FromInt32(l) } if l < 0 { return -int32(1) @@ -141129,27 +141127,27 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if i > uint64(INT_MAX) { goto overflow } - p = int32(i) - _pad3(tls, f, int8(' '), w, p, int32(fl)) + p = Int32FromUint64(i) + _pad3(tls, f, int8(' '), w, p, Int32FromUint32(fl)) ws = *(*uintptr)(unsafe.Pointer(bp + 8)) i = uint64(0) for { - if v49 = i < uint64(0+uint32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { + if v49 = i < uint64(0+Uint32FromInt32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { v48 = ws ws += 4 v47 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v48))) l = v47 } - if !(v49 && i+uint64(v47) <= uint64(p)) { + if !(v49 && i+Uint64FromInt32(v47) <= Uint64FromInt32(p)) { break } - _out(tls, f, bp+48, uint64(l)) + _out(tls, f, bp+48, Uint64FromInt32(l)) goto _46 _46: ; - i += uint64(l) + i += Uint64FromInt32(l) } - _pad3(tls, f, int8(' '), w, p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > p { v50 = w } else { @@ -141176,7 +141174,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if xp != 0 && p < 0 { goto overflow } - l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, int32(fl), t) + l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, Int32FromUint32(fl), t) if l < 0 { goto overflow } @@ -141195,12 +141193,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w > int32(INT_MAX)-cnt { goto overflow } - _pad3(tls, f, int8(' '), w, pl+p, int32(fl)) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, int8('0'), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, pl+p, Int32FromUint32(fl)) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, int8('0'), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) _pad3(tls, f, int8('0'), p, int32(int64(z)-int64(a)), 0) - _out(tls, f, a, uint64(int64(z)-int64(a))) - _pad3(tls, f, int8(' '), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, a, Uint64FromInt64(int64(z)-int64(a))) + _pad3(tls, f, int8(' '), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 _1: @@ -141275,8 +141273,8 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v1 = 0 } __need_unlock = v1 - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) { saved_buf = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fbuf = bp + 128 @@ -141308,7 +141306,7 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -141329,15 +141327,15 @@ func _store_int(tls *TLS, dest uintptr, size int32, i uint64) { } switch size { case -int32(2): - *(*int8)(unsafe.Pointer(dest)) = int8(i) + *(*int8)(unsafe.Pointer(dest)) = Int8FromUint64(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -141404,14 +141402,14 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - v3 = int32(*(*uint8)(unsafe.Pointer(p))) - v4 = BoolInt32(v3 == int32(' ') || uint32(v3)-uint32('\t') < uint32(5)) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v4 = BoolInt32(v3 == int32(' ') || Uint32FromInt32(v3)-uint32('\t') < uint32(5)) goto _5 _5: if v4 != 0 { for { - v6 = int32(*(*uint8)(unsafe.Pointer(p + 1))) - v7 = BoolInt32(v6 == int32(' ') || uint32(v6)-uint32('\t') < uint32(5)) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) + v7 = BoolInt32(v6 == int32(' ') || Uint32FromInt32(v6)-uint32('\t') < uint32(5)) goto _8 _8: if !(v7 != 0) { @@ -141425,12 +141423,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } v12 = v9 - v13 = BoolInt32(v12 == int32(' ') || uint32(v12)-uint32('\t') < uint32(5)) + v13 = BoolInt32(v12 == int32(' ') || Uint32FromInt32(v12)-uint32('\t') < uint32(5)) goto _14 _14: if !(v13 != 0) { @@ -141443,23 +141441,23 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { pos += (*TFILE)(unsafe.Pointer(f)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(f)).Frpos) - int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) goto _2 } - if int32(*(*uint8)(unsafe.Pointer(p))) != int32('%') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32('%') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { X__shlim(tls, f, int64(Int32FromInt32(0))) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('%') { p++ for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Fshend { v19 = f + 8 v18 = *(*uintptr)(unsafe.Pointer(v19)) *(*uintptr)(unsafe.Pointer(v19))++ - v17 = int32(*(*uint8)(unsafe.Pointer(v18))) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v18))) } else { v17 = X__shgetc(tls, f) } v16 = v17 c = v16 v20 = v16 - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: if !(v21 != 0) { @@ -141471,13 +141469,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ - v23 = int32(*(*uint8)(unsafe.Pointer(v24))) + v23 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v24))) } else { v23 = X__shgetc(tls, f) } c = v23 } - if c != int32(*(*uint8)(unsafe.Pointer(p))) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -141490,12 +141488,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto _2 } p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('*') { dest = uintptr(0) p++ } else { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { - dest = _arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { + dest = _arg_n(tls, ap, Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) p += uintptr(2) } else { dest = VaUintptr(&ap) @@ -141506,13 +141504,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } - width = int32(10)*width + int32(*(*uint8)(unsafe.Pointer(p))) - int32('0') + width = int32(10)*width + Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) - int32('0') goto _27 _27: ; p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('m') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('m') { wcs = uintptr(0) s = uintptr(0) alloc = BoolInt32(!!(dest != 0)) @@ -141523,16 +141521,16 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { size = SIZE_def v28 = p p++ - switch int32(*(*uint8)(unsafe.Pointer(v28))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) { case int32('h'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('h') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('h') { p++ size = -Int32FromInt32(2) } else { size = -int32(1) } case int32('l'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('l') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('l') { p++ size = Int32FromInt32(SIZE_ll) } else { @@ -141591,7 +141589,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*uint8)(unsafe.Pointer(p))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) /* C or S */ if t&int32(0x2f) == int32(3) { t |= int32(32) @@ -141605,7 +141603,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { fallthrough case int32('['): case int32('n'): - _store_int(tls, dest, size, uint64(pos)) + _store_int(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 default: @@ -141615,12 +141613,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } v32 = v29 - v33 = BoolInt32(v32 == int32(' ') || uint32(v32)-uint32('\t') < uint32(5)) + v33 = BoolInt32(v32 == int32(' ') || Uint32FromInt32(v32)-uint32('\t') < uint32(5)) goto _34 _34: if !(v33 != 0) { @@ -141637,7 +141635,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v38 = f + 8 v37 = *(*uintptr)(unsafe.Pointer(v38)) *(*uintptr)(unsafe.Pointer(v38))++ - v36 = int32(*(*uint8)(unsafe.Pointer(v37))) + v36 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v37))) } else { v36 = X__shgetc(tls, f) } @@ -141706,7 +141704,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { p++ v59 = p - if int32(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { p++ invert = Int32FromInt32(1) } else { @@ -141714,38 +141712,38 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } Xmemset(tls, bp+16, invert, uint64(257)) (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = Uint8FromInt32(Int32FromInt32(1) - invert) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = Uint8FromInt32(Int32FromInt32(1) - invert) } } for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } if !(*(*uint8)(unsafe.Pointer(p)) != 0) { goto fmt_fail } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { v62 = p p++ - c = int32(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) for { - if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + if !(c < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))) { break } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = Uint8FromInt32(int32(1) - invert) goto _61 _61: ; c++ } } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+int32(*(*uint8)(unsafe.Pointer(p)))] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))] = Uint8FromInt32(int32(1) - invert) goto _60 _60: ; @@ -141756,7 +141754,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { s = uintptr(0) i = uint64(0) if t == int32('c') { - v63 = uint32(width) + uint32(1) + v63 = Uint32FromInt32(width) + uint32(1) } else { v63 = uint32(31) } @@ -141776,7 +141774,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v67 = f + 8 v66 = *(*uintptr)(unsafe.Pointer(v67)) *(*uintptr)(unsafe.Pointer(v67))++ - v65 = int32(*(*uint8)(unsafe.Pointer(v66))) + v65 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v66))) } else { v65 = X__shgetc(tls, f) } @@ -141787,9 +141785,9 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } *(*int8)(unsafe.Pointer(bp)) = int8(c) switch Xmbrtowc(tls, bp+276, bp, uint64(1), bp+8) { - case uint64(-Int32FromInt32(1)): + case Uint64FromInt32(-Int32FromInt32(1)): goto input_fail - case uint64(-Int32FromInt32(2)): + case Uint64FromInt32(-Int32FromInt32(2)): continue } if wcs != 0 { @@ -141820,7 +141818,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v72 = f + 8 v71 = *(*uintptr)(unsafe.Pointer(v72)) *(*uintptr)(unsafe.Pointer(v72))++ - v70 = int32(*(*uint8)(unsafe.Pointer(v71))) + v70 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v71))) } else { v70 = X__shgetc(tls, f) } @@ -141850,7 +141848,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v78 = f + 8 v77 = *(*uintptr)(unsafe.Pointer(v78)) *(*uintptr)(unsafe.Pointer(v78))++ - v76 = int32(*(*uint8)(unsafe.Pointer(v77))) + v76 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v77))) } else { v76 = X__shgetc(tls, f) } @@ -141869,7 +141867,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v83 = f + 8 v82 = *(*uintptr)(unsafe.Pointer(v83)) *(*uintptr)(unsafe.Pointer(v83))++ - v81 = int32(*(*uint8)(unsafe.Pointer(v82))) + v81 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v82))) } else { v81 = X__shgetc(tls, f) } @@ -141931,7 +141929,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto int_common int_common: ; - x = X__intscan(tls, f, uint32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) + x = X__intscan(tls, f, Uint32FromInt32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) if !((*TFILE)(unsafe.Pointer(f)).Fshcnt+(int64((*TFILE)(unsafe.Pointer(f)).Frpos)-int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) != 0) { goto match_fail } @@ -142136,33 +142134,33 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -142191,7 +142189,7 @@ func _out1(tls *TLS, f uintptr, s uintptr, l Tsize_t) { func _pad4(tls *TLS, f uintptr, n int32, fl int32) { bp := tls.Alloc(32) defer tls.Free(32) - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return } Xfprintf(tls, f, __ccgo_ts+1651, VaList(bp+8, n, __ccgo_ts)) @@ -142202,10 +142200,10 @@ func _getint1(tls *TLS, s uintptr) (r int32) { _ = i i = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { i = int32(10)*i + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - int32('0')) @@ -142287,12 +142285,12 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32((int64(z) - int64(a)) / 4) if f != 0 { - _out1(tls, f, a, uint64(l)) + _out1(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) argpos = *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) - int32('0') *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 @@ -142303,7 +142301,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { + if !(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { break } fl |= uint32(1) << (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) - int32(' ')) @@ -142314,10 +142312,10 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read field width */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*4)) = int32(_INT) - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 } else { if !(l10n != 0) { @@ -142345,9 +142343,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read precision */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('.') && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*4)) = int32(_INT) - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(4) * 4 } else { if !(l10n != 0) { @@ -142376,7 +142374,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -142394,11 +142392,11 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } else { if argpos >= 0 { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) *(*Targ)(unsafe.Pointer(bp + 16)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } else { if f != 0 { - _pop_arg1(tls, bp+16, int32(st), ap) + _pop_arg1(tls, bp+16, Int32FromUint32(st), ap) } else { return 0 } @@ -142425,13 +142423,13 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) break } goto _1 @@ -142441,15 +142439,15 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < int32(1) { w = int32(1) } - _pad4(tls, f, w-int32(1), int32(fl)) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl)) if t == int32('C') { v9 = *(*Tuintmax_t)(unsafe.Pointer(bp + 16)) } else { - v9 = uint64(Xbtowc(tls, int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) + v9 = uint64(Xbtowc(tls, Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) } - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(v9) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint64(v9) _out1(tls, f, bp, uint64(1)) - _pad4(tls, f, w-int32(1), int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('S'): @@ -142459,7 +142457,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v10 = p } - z = a + uintptr(Xwcsnlen(tls, a, uint64(v10)))*4 + z = a + uintptr(Xwcsnlen(tls, a, Uint64FromInt32(v10)))*4 if p < 0 && *(*Twchar_t)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -142467,9 +142465,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) - _out1(tls, f, a, uint64(p)) - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl)) + _out1(tls, f, a, Uint64FromInt32(p)) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('m'): @@ -142512,7 +142510,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) + _pad4(tls, f, w-p, Int32FromUint32(fl)) bs = *(*uintptr)(unsafe.Pointer(bp + 16)) for { v16 = l @@ -142524,7 +142522,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, bs += uintptr(i) _out1(tls, f, bp+40, uint64(1)) } - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 } @@ -142626,13 +142624,13 @@ func Xvfwprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } __need_unlock = v1 Xfwide(tls, f, int32(1)) - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) ret = _wprintf_core(tls, f, fmt, bp, bp+48, bp+8) if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -142646,15 +142644,15 @@ func _store_int1(tls *TLS, dest uintptr, size int32, i uint64) { } switch size { case -int32(2): - *(*int8)(unsafe.Pointer(dest)) = int8(i) + *(*int8)(unsafe.Pointer(dest)) = Int8FromUint64(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -142762,12 +142760,12 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - if Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { + if Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { p += 4 } for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ @@ -142775,20 +142773,20 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v4 = Xgetwc(tls, f) } - v3 = int32(v4) + v3 = Int32FromUint32(v4) c = v3 - if !(Xiswspace(tls, uint32(v3)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v3)) != 0) { break } pos++ } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) _ = *(*uint8)(unsafe.Pointer(v8)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } goto _2 } @@ -142796,7 +142794,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == int32('%') { p += 4 for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ @@ -142804,15 +142802,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v11 = Xgetwc(tls, f) } - v10 = int32(v11) + v10 = Int32FromUint32(v11) c = v10 - if !(Xiswspace(tls, uint32(v10)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v10)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ @@ -142820,16 +142818,16 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v14 = Xgetwc(tls, f) } - c = int32(v14) + c = Int32FromUint32(v14) } if c != *(*Twchar_t)(unsafe.Pointer(p)) { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v19 = f + 8 *(*uintptr)(unsafe.Pointer(v19))-- v18 = *(*uintptr)(unsafe.Pointer(v19)) _ = *(*uint8)(unsafe.Pointer(v18)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if c < 0 { goto input_fail @@ -142844,8 +142842,8 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { dest = uintptr(0) p += 4 } else { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { - dest = _arg_n1(tls, ap, uint32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { + dest = _arg_n1(tls, ap, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) p += uintptr(2) * 4 } else { dest = VaUintptr(&ap) @@ -142853,7 +142851,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } width = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } width = int32(10)*width + *(*Twchar_t)(unsafe.Pointer(p)) - int32('0') @@ -142950,7 +142948,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if t != int32('n') { if t != int32('[') && t|int32(32) != int32('c') { for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ @@ -142958,15 +142956,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v23 = Xgetwc(tls, f) } - v22 = int32(v23) + v22 = Int32FromUint32(v23) c = v22 - if !(Xiswspace(tls, uint32(v22)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v22)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v28 = f + 8 v27 = *(*uintptr)(unsafe.Pointer(v28)) *(*uintptr)(unsafe.Pointer(v28))++ @@ -142974,23 +142972,23 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v26 = Xgetwc(tls, f) } - c = int32(v26) + c = Int32FromUint32(v26) } if c < 0 { goto input_fail } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v31 = f + 8 *(*uintptr)(unsafe.Pointer(v31))-- v30 = *(*uintptr)(unsafe.Pointer(v31)) _ = *(*uint8)(unsafe.Pointer(v30)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } } switch t { case int32('n'): - _store_int1(tls, dest, size, uint64(pos)) + _store_int1(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 case int32('s'): @@ -143048,7 +143046,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { i = uint64(0) if alloc != 0 { if t == int32('c') { - v35 = uint32(width) + uint32(1) + v35 = Uint32FromInt32(width) + uint32(1) } else { v35 = uint32(31) } @@ -143066,7 +143064,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } } for width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ @@ -143074,7 +143072,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v37 = Xgetwc(tls, f) } - v36 = int32(v37) + v36 = Int32FromUint32(v37) c = v36 if v36 < 0 { break @@ -143105,7 +143103,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if l < 0 { goto input_fail } - i += uint64(l) + i += Uint64FromInt32(l) if alloc != 0 && i > k-uint64(4) { k += k + uint64(1) tmp2 = Xrealloc(tls, s, k) @@ -143121,13 +143119,13 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { gotmatch = int32(1) } if width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v44 = f + 8 *(*uintptr)(unsafe.Pointer(v44))-- v43 = *(*uintptr)(unsafe.Pointer(v44)) _ = *(*uint8)(unsafe.Pointer(v43)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if t == int32('c') || !(gotmatch != 0) { goto match_fail @@ -143312,10 +143310,10 @@ func _sn_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { var v1, v2 uint64 _, _, _, _, _ = c, k, v1, v2, v3 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if (*Tcookie3)(unsafe.Pointer(c)).Fn < uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { + if (*Tcookie3)(unsafe.Pointer(c)).Fn < Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { v1 = (*Tcookie3)(unsafe.Pointer(c)).Fn } else { - v1 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + v1 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) } k = v1 if k != 0 { @@ -143406,7 +143404,7 @@ func _string_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { k = len1 + uint64(256) end = Xmemchr(tls, src, 0, k) if end != 0 { - k = uint64(int64(end) - int64(src)) + k = Uint64FromInt64(int64(end) - int64(src)) } if k < len1 { len1 = k @@ -143457,8 +143455,8 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { l0 = l i = 0 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == uint64(-Int32FromInt32(1)) { - return uint64(-Int32FromInt32(1)) + if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == Uint64FromInt32(-Int32FromInt32(1)) { + return Uint64FromInt32(-Int32FromInt32(1)) } for { if v2 = (*Tcookie4)(unsafe.Pointer(c)).Fl != 0 && l != 0; v2 { @@ -143472,7 +143470,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { i = int32(1) } s += uintptr(i) - l -= uint64(i) + l -= Uint64FromInt32(i) (*Tcookie4)(unsafe.Pointer(c)).Fl-- (*Tcookie4)(unsafe.Pointer(c)).Fws += 4 } @@ -143484,7 +143482,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { (*TFILE)(unsafe.Pointer(f)).Fwbase = v3 (*TFILE)(unsafe.Pointer(f)).Fwpos = v3 *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - return uint64(i) + return Uint64FromInt32(i) } (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -143522,7 +143520,7 @@ func Xvswprintf(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, ap Tva_list) (r1 in } r = Xvfwprintf(tls, bp+272, fmt, ap) _sw_write(tls, bp+272, uintptr(0), uint64(0)) - if uint64(r) >= n { + if Uint64FromInt32(r) >= n { v1 = -int32(1) } else { v1 = r @@ -143542,7 +143540,7 @@ func _wstring_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { return uint64(0) } k = Xwcsrtombs(tls, (*TFILE)(unsafe.Pointer(f)).Fbuf, bp, (*TFILE)(unsafe.Pointer(f)).Fbuf_size, uintptr(0)) - if k == uint64(-Int32FromInt32(1)) { + if k == Uint64FromInt32(-Int32FromInt32(1)) { v1 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v1 (*TFILE)(unsafe.Pointer(f)).Frpos = v1 @@ -143683,7 +143681,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { neg = 0 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143699,7 +143697,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { s++ } /* Compute n as a negative number to avoid overflow on INT_MIN */ - for BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + for BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ n = int32(10)*n - (int32(*(*int8)(unsafe.Pointer(v4))) - int32('0')) @@ -143725,7 +143723,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { neg = 0 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143741,7 +143739,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { s++ } /* Compute n as a negative number to avoid overflow on LONG_MIN */ - for BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + for BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ n = int64(10)*n - int64(int32(*(*int8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) @@ -143767,7 +143765,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { neg = 0 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143783,7 +143781,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { s++ } /* Compute n as a negative number to avoid overflow on LLONG_MIN */ - for BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + for BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ n = int64(10)*n - int64(int32(*(*int8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) @@ -143842,7 +143840,7 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, j, v1, v3 int32 var _ /* tmp at bp+0 */ [32]int8 _, _, _, _ = i, j, v1, v3 - if uint32(n)-uint32(1) > uint32(15) { + if Uint32FromInt32(n)-uint32(1) > uint32(15) { n = int32(15) } Xsprintf(tls, bp, __ccgo_ts+1708, VaList(bp+40, n-int32(1), x)) @@ -143879,20 +143877,20 @@ func Xfcvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, lz int32 var _ /* tmp at bp+0 */ [1500]int8 _, _ = i, lz - if uint32(n) > uint32(1400) { + if Uint32FromInt32(n) > uint32(1400) { n = int32(1400) } Xsprintf(tls, bp, __ccgo_ts+1713, VaList(bp+1512, n, x)) i = BoolInt32(int32((*(*[1500]int8)(unsafe.Pointer(bp)))[0]) == int32('-')) if int32((*(*[1500]int8)(unsafe.Pointer(bp)))[i]) == int32('0') { - lz = int32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1681)) + lz = Int32FromUint64(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1681)) } else { - lz = -int32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+575)) + lz = -Int32FromUint64(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+575)) } if n <= lz { *(*int32)(unsafe.Pointer(sign)) = i *(*int32)(unsafe.Pointer(dp)) = int32(1) - if uint32(n) > uint32(14) { + if Uint32FromInt32(n) > uint32(14) { n = int32(14) } return __ccgo_ts + 1718 + UintptrFromInt32(14) - uintptr(n) @@ -143997,10 +143995,10 @@ func _pntz(tls *TLS, p uintptr) (r1 int32) { _, _, _ = r, v1, v2 r = _a_ctz_l(tls, *(*Tsize_t)(unsafe.Pointer(p))-uint64(1)) if v2 = r != 0; !v2 { - v1 = int32(Uint64FromInt32(8)*Uint64FromInt64(8) + uint64(_a_ctz_l(tls, *(*Tsize_t)(unsafe.Pointer(p + 1*8))))) + v1 = Int32FromUint64(Uint64FromInt32(8)*Uint64FromInt64(8) + Uint64FromInt32(_a_ctz_l(tls, *(*Tsize_t)(unsafe.Pointer(p + 1*8))))) r = v1 } - if v2 || uint64(v1) != Uint64FromInt32(8)*Uint64FromInt64(8) { + if v2 || Uint64FromInt32(v1) != Uint64FromInt32(8)*Uint64FromInt64(8) { return r } return 0 @@ -144046,25 +144044,25 @@ func _cycle(tls *TLS, width Tsize_t, ar uintptr, n int32) { // // /* shl() and shr() need n > 0 */ func _shl(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = *(*Tsize_t)(unsafe.Pointer(p)) *(*Tsize_t)(unsafe.Pointer(p)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p)) <<= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p)) <<= Uint64FromInt32(n) } func _shr(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p)) = *(*Tsize_t)(unsafe.Pointer(p + 1*8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p)) >>= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p)) >>= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= Uint64FromInt32(n) } func _sift(tls *TLS, head uintptr, width Tsize_t, cmp Tcmpfun, arg uintptr, pshift int32, lp uintptr) { @@ -144182,7 +144180,7 @@ func X__qsort_r(tls *TLS, base uintptr, nel Tsize_t, width Tsize_t, cmp Tcmpfun, _shr(tls, bp+768, int32(2)) pshift += int32(2) } else { - if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= uint64(int64(high)-int64(head)) { + if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= Uint64FromInt64(int64(high)-int64(head)) { _trinkle(tls, head, width, cmp, arg, bp+768, pshift, 0, bp) } else { _sift(tls, head, width, cmp, arg, pshift, bp) @@ -144299,9 +144297,9 @@ func _strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*TFILE)(unsafe.Pointer(bp)).Fbuf = v1 (*TFILE)(unsafe.Pointer(bp)).Frend = uintptr(-Int32FromInt32(1)) X__shlim(tls, bp, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp, uint32(base), int32(1), lim) + y = X__intscan(tls, bp, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -144320,7 +144318,7 @@ func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -144336,7 +144334,7 @@ func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, uint64(Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1))))) + return Int64FromUint64(_strtox1(tls, s, p, base, uint64(Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1))))) } func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144426,7 +144424,7 @@ func _do_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -144465,14 +144463,14 @@ func _wcstox(tls *TLS, s uintptr, p uintptr, prec int32) (r float64) { (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) y = X__floatscan(tls, bp+64, prec, int32(1)) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -144530,7 +144528,7 @@ func _do_read1(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -144569,14 +144567,14 @@ func _wcstox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read1) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp+64, uint32(base), int32(1), lim) + y = X__intscan(tls, bp+64, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -144600,7 +144598,7 @@ func Xwcstoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -144616,7 +144614,7 @@ func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, uint64(Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1))))) + return Int64FromUint64(_wcstox1(tls, s, p, base, uint64(Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1))))) } func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144697,14 +144695,14 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt _, _, _, _, _, _, _, _, _ = d, k, s, wd, ws, v2, v3, v6, v7 d = dest s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(d)&(Uint64FromInt64(8)-Uint64FromInt32(1)) { for { if v3 = uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v2 } - if !(v3 && int32(v2) != c) { + if !(v3 && Int32FromUint8(v2) != c) { break } goto _1 @@ -144717,11 +144715,11 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 { goto tail } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -144740,7 +144738,7 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt v6 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v6 } - if !(v7 && int32(v6) != c) { + if !(v7 && Int32FromUint8(v6) != c) { break } goto _5 @@ -144779,9 +144777,9 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { var s, w, v4 uintptr _, _, _, _ = k, s, w, v4 s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { - if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _1 @@ -144790,11 +144788,11 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s++ n-- } - if n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c { - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + if n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c { + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -144806,7 +144804,7 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s = w } for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -144834,7 +144832,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { l = vl r = vr for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _1 @@ -144845,7 +144843,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { r++ } if n != 0 { - v2 = int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } else { v2 = 0 } @@ -145207,15 +145205,15 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145350,13 +145348,13 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -145364,7 +145362,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145399,7 +145397,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Search loop */ for { /* If remainder of haystack is shorter than needle, done */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } /* Check last byte first; advance by shift on mismatch */ @@ -145426,7 +145424,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin } k = v11 for { - if !(k < l && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(k < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -145442,7 +145440,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -145479,11 +145477,11 @@ func Xmemmem(tls *TLS, h0 uintptr, k Tsize_t, n0 uintptr, l Tsize_t) (r uintptr) return uintptr(0) } /* Use faster algorithms for short needles */ - h = Xmemchr(tls, h0, int32(*(*uint8)(unsafe.Pointer(n))), k) + h = Xmemchr(tls, h0, Int32FromUint8(*(*uint8)(unsafe.Pointer(n))), k) if !(h != 0) || l == uint64(1) { return h } - k -= uint64(int64(h) - int64(h0)) + k -= Uint64FromInt64(int64(h) - int64(h0)) if k < l { return uintptr(0) } @@ -145516,7 +145514,7 @@ func Xmemmove(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { if d == s { return d } - if uint64(s)-uint64(d)-n <= uint64(-Int32FromInt32(2))*n { + if uint64(s)-uint64(d)-n <= Uint64FromInt32(-Int32FromInt32(2))*n { return Xmemcpy(tls, d, s, n) } if d < s { @@ -145600,14 +145598,14 @@ func X__memrchr(tls *TLS, m uintptr, c int32, n Tsize_t) (r uintptr) { var v1 Tsize_t _, _ = s, v1 s = m - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { v1 = n n-- if !(v1 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { return s + uintptr(n) } } @@ -145639,20 +145637,20 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { if !(n != 0) { return dest } - *(*uint8)(unsafe.Pointer(s)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = Uint8FromInt32(c) if n <= uint64(2) { return dest } - *(*uint8)(unsafe.Pointer(s + 1)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + 2)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 1)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + 2)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = Uint8FromInt32(c) if n <= uint64(6) { return dest } - *(*uint8)(unsafe.Pointer(s + 3)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 3)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = Uint8FromInt32(c) if n <= uint64(8) { return dest } @@ -145663,8 +145661,8 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { k = -uint64(s) & uint64(3) s += uintptr(k) n -= k - n &= uint64(-Int32FromInt32(4)) - c32 = uint32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(uint8(c)) + n &= Uint64FromInt32(-Int32FromInt32(4)) + c32 = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(Uint8FromInt32(c)) /* In preparation to copy 32 bytes at a time, aligned on * an 8-byte bounary, fill head/tail up to 28 bytes each. * As in the initial byte-based head/tail fill, each @@ -145763,7 +145761,7 @@ func X__stpcpy(tls *TLS, d uintptr, s uintptr) (r uintptr) { wd = d ws = s for { - if !!((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _3 @@ -145852,7 +145850,7 @@ func X__stpncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -145915,7 +145913,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l = _l r = _r for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _1 @@ -145924,7 +145922,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l++ r++ } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strcasecmp_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) { @@ -145983,7 +145981,7 @@ func Xstrchr(tls *TLS, s uintptr, c int32) (r1 uintptr) { var r, v1 uintptr _, _ = r, v1 r = X__strchrnul(tls, s, c) - if int32(*(*uint8)(unsafe.Pointer(r))) == int32(uint8(c)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) == Int32FromUint8(Uint8FromInt32(c)) { v1 = r } else { v1 = uintptr(0) @@ -146010,7 +146008,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { var k Tsize_t var w uintptr _, _ = k, w - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } @@ -146018,7 +146016,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { if !(uint64(s)%Uint64FromInt64(8) != 0) { break } - if !(*(*int8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { + if !(*(*int8)(unsafe.Pointer(s)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == c { return s } goto _1 @@ -146026,10 +146024,10 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { ; s++ } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -146039,7 +146037,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { } s = w for { - if !(*(*int8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(*(*int8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -146082,7 +146080,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { l++ r++ } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrcpy(tls *TLS, dest uintptr, src uintptr) (r uintptr) { @@ -146107,7 +146105,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { _, _, _ = a, v3, p2 a = s if !(*(*int8)(unsafe.Pointer(c)) != 0) || !(*(*int8)(unsafe.Pointer(c + 1)) != 0) { - return uint64(int64(X__strchrnul(tls, s, int32(*(*int8)(unsafe.Pointer(c))))) - int64(a)) + return Uint64FromInt64(int64(X__strchrnul(tls, s, int32(*(*int8)(unsafe.Pointer(c))))) - int64(a)) } Xmemset(tls, bp, 0, uint64(32)) for { @@ -146132,7 +146130,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrdup(tls *TLS, s uintptr) (r uintptr) { @@ -146241,7 +146239,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*Tsize_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -146275,7 +146273,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { goto finish finish: ; - return uint64(int64(d)-int64(d0)) + Xstrlen(tls, s) + return Uint64FromInt64(int64(d)-int64(d0)) + Xstrlen(tls, s) return r } @@ -146303,7 +146301,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { break } if !(*(*int8)(unsafe.Pointer(s)) != 0) { - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } goto _1 _1: @@ -146312,7 +146310,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { } w = s for { - if !!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _2 @@ -146330,7 +146328,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { @@ -146349,7 +146347,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _2 @@ -146359,7 +146357,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, loc Tlocale_t) (r1 int32) { @@ -146417,7 +146415,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _2 @@ -146427,7 +146425,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { @@ -146467,7 +146465,7 @@ func Xstrnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _, _ = p, v1 p = Xmemchr(tls, s, 0, n) if p != 0 { - v1 = uint64(int64(p) - int64(s)) + v1 = Uint64FromInt64(int64(p) - int64(s)) } else { v1 = n } @@ -146533,7 +146531,7 @@ func Xstrsignal(tls *TLS, signum int32) (r uintptr) { _, _ = s, v2 s = uintptr(unsafe.Pointer(&_strings)) signum = signum - if uint32(signum)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(signum)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { signum = 0 } for { @@ -146585,7 +146583,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } for { if v4 = *(*int8)(unsafe.Pointer(c)) != 0; v4 { @@ -146609,18 +146607,18 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146748,13 +146746,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -146762,7 +146760,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146799,13 +146797,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { /* Fast estimate for MAX(l,63) */ grow = l | uint64(63) z2 = Xmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } } else { @@ -146836,7 +146834,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { } k = v11 for { - if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -146852,7 +146850,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -146991,14 +146989,14 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { i = v2 dp = v2 for { - if !(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { break } - c = int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) if !(c != 0) { return 0 } - if !(BoolInt32(uint32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { dp = i + uint64(1) z = Int32FromInt32(1) } else { @@ -147011,7 +147009,7 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { ; i++ } - if uint32(int32(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && uint32(int32(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { + if Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { /* If we're looking at non-degenerate digit sequences starting * with nonzero digits, longest digit string is greater. */ j = i @@ -147034,10 +147032,10 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { if z != 0 && dp < i && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-uint32('0') < uint32(10)) != 0 || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-uint32('0') < uint32(10)) != 0) { /* Otherwise, if common prefix of digit sequence is * all zeros, digits order less than non-digits. */ - return int32(uint8(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - int32(uint8(int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) + return Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) } } - return int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - int32(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) } func Xswab(tls *TLS, _src uintptr, _dest uintptr, n Tssize_t) { @@ -147084,7 +147082,7 @@ func Xwcscasecmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2)) defer func() { trc("-> %v", r1) }() } - return Xwcsncasecmp(tls, l, r, uint64(-Int32FromInt32(1))) + return Xwcsncasecmp(tls, l, r, Uint64FromInt32(-Int32FromInt32(1))) } func Xwcscasecmp_l(tls *TLS, l uintptr, r uintptr, locale Tlocale_t) (r1 int32) { @@ -147196,7 +147194,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { v2 = Xwcschr(tls, v3, *(*Twchar_t)(unsafe.Pointer(c))) s = v2 if v2 != 0 { - v1 = uint64((int64(s) - int64(a)) / 4) + v1 = Uint64FromInt64((int64(s) - int64(a)) / 4) } else { v1 = Xwcslen(tls, a) } @@ -147212,7 +147210,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsdup(tls *TLS, s uintptr) (r uintptr) { @@ -147248,7 +147246,7 @@ func Xwcslen(tls *TLS, s uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { @@ -147264,7 +147262,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r)))))) { + if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r)))))) { break } goto _2 @@ -147274,7 +147272,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { r += 4 n-- } - return int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r))))) + return Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r))))) } func Xwcsncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, locale Tlocale_t) (r1 int32) { @@ -147368,7 +147366,7 @@ func Xwcsnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _ = z z = Xwmemchr(tls, s, 0, n) if z != 0 { - n = uint64((int64(z) - int64(s)) / 4) + n = Uint64FromInt64((int64(z) - int64(s)) / 4) } return n } @@ -147431,7 +147429,7 @@ func Xwcsspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { @@ -147454,7 +147452,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return uintptr(0) } /* hit the end of h */ /* Compute maximal suffix */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v2 = Uint64FromInt32(1) p = v2 @@ -147485,7 +147483,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 @@ -147536,13 +147534,13 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { /* Fast estimate for MIN(l,63) */ grow = l | uint64(63) z2 = Xwmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { return uintptr(0) } } else { @@ -147847,7 +147845,7 @@ func X__mkostemps(tls *TLS, template uintptr, len1 int32, flags int32) (r int32) var l Tsize_t _, _, _, _, _ = fd, l, retries, v1, v3 l = Xstrlen(tls, template) - if l < uint64(6) || uint64(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1747, uint64(6)) != 0 { + if l < uint64(6) || Uint64FromInt32(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1747, uint64(6)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -147957,10 +147955,10 @@ func Xcfmakeraw(tls *TLS, t uintptr) { if __ccgo_strace { trc("tls=%v t=%v, (%v:)", tls, t, origin(2)) } - *(*Ttcflag_t)(unsafe.Pointer(t)) &= uint32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) - *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= uint32(^Int32FromInt32(OPOST)) - *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) - *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= uint32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) + *(*Ttcflag_t)(unsafe.Pointer(t)) &= Uint32FromInt32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) + *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= Uint32FromInt32(^Int32FromInt32(OPOST)) + *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) + *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= Uint32FromInt32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) *(*Ttcflag_t)(unsafe.Pointer(t + 8)) |= uint32(CS8) *(*Tcc_t)(unsafe.Pointer(t + 17 + 6)) = uint8(1) *(*Tcc_t)(unsafe.Pointer(t + 17 + 5)) = uint8(0) @@ -147971,11 +147969,11 @@ func Xcfsetospeed(tls *TLS, tio uintptr, speed Tspeed_t) (r int32) { trc("tls=%v tio=%v speed=%v, (%v:)", tls, tio, speed, origin(2)) defer func() { trc("-> %v", r) }() } - if speed&uint32(^Int32FromInt32(CBAUD)) != 0 { + if speed&Uint32FromInt32(^Int32FromInt32(CBAUD)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= uint32(^Int32FromInt32(CBAUD)) + *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= Uint32FromInt32(^Int32FromInt32(CBAUD)) *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) |= speed return 0 } @@ -148008,7 +148006,7 @@ func Xtcdrain(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) } func Xtcflow(tls *TLS, fd int32, action int32) (r int32) { @@ -148063,7 +148061,7 @@ func Xtcgetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) } func Xtcsendbreak(tls *TLS, fd int32, dur int32) (r int32) { @@ -148096,7 +148094,7 @@ func Xtcsetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) } func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { @@ -148111,13 +148109,13 @@ func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { var _ /* st at bp+0 */ Tstat _, _, _ = fd, map1, v1 map1 = uintptr(-Int32FromInt32(1)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_open), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_open), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) if fd < 0 { return uintptr(0) } if !(X__fstat(tls, fd, bp) != 0) { - map1 = X__mmap(tls, uintptr(0), uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) - *(*Tsize_t)(unsafe.Pointer(size)) = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + map1 = X__mmap(tls, uintptr(0), Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) + *(*Tsize_t)(unsafe.Pointer(size)) = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) } X__syscall1(tls, int64(SYS_close), int64(fd)) if map1 == uintptr(-Int32FromInt32(1)) { @@ -148323,16 +148321,16 @@ func _getint2(tls *TLS, p uintptr) (r int32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { break } - x = uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x + x = Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x goto _1 _1: ; *(*uintptr)(unsafe.Pointer(p))++ } - return int32(x) + return Int32FromUint32(x) } func _getoff(tls *TLS, p uintptr) (r int32) { @@ -148417,7 +148415,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } else { i = 0 for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { break } if i < int32(TZNAME_MAX) { @@ -148439,7 +148437,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } func _zi_read32(tls *TLS, z uintptr) (r Tuint32_t) { - return uint32(*(*uint8)(unsafe.Pointer(z)))< uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { + if i > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { *(*uintptr)(unsafe.Pointer(bp + 288)) = uintptr(unsafe.Pointer(&X__utc)) i = Uint64FromInt32(3) } @@ -148516,8 +148514,8 @@ func _do_tzset(tls *TLS) { if i >= _old_tz_size { _old_tz_size = i + uint64(1) } - if _old_tz_size > uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { - _old_tz_size = uint64(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) + if _old_tz_size > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { + _old_tz_size = Uint64FromInt32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) } _old_tz = Xmalloc(tls, _old_tz_size) } @@ -148528,7 +148526,7 @@ func _do_tzset(tls *TLS) { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { *(*uintptr)(unsafe.Pointer(bp + 296)) = *(*uintptr)(unsafe.Pointer(bp + 288)) _getname(tls, bp+308, bp+296) - if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1772) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1776) != 0)) { + if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1772) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1776) != 0)) { posix_form = int32(1) } } @@ -148575,7 +148573,7 @@ func _do_tzset(tls *TLS) { _zi = map1 if map1 != 0 { scale = int32(2) - if int32(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { *(*[6]uint8)(unsafe.Pointer(bp)) = [6]uint8{ 0: uint8(1), 1: uint8(1), @@ -148594,7 +148592,7 @@ func _do_tzset(tls *TLS) { _types = _index + uintptr(_zi_read32(tls, _trans-uintptr(12))) _abbrevs = _types + uintptr(uint32(6)*_zi_read32(tls, _trans-uintptr(8))) _abbrevs_end = _abbrevs + uintptr(_zi_read32(tls, _trans-uintptr(4))) - if int32(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { *(*uintptr)(unsafe.Pointer(bp + 288)) = _zi + uintptr(_map_size) - uintptr(2) for { if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { @@ -148622,11 +148620,11 @@ func _do_tzset(tls *TLS) { } if !(*(*uint8)(unsafe.Pointer(p1 + 4)) != 0) && !(Xtzname[0] != 0) { Xtzname[0] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - Xtimezone = int64(-_zi_read32(tls, p1)) + Xtimezone = Int64FromUint32(-_zi_read32(tls, p1)) } if *(*uint8)(unsafe.Pointer(p1 + 4)) != 0 && !(Xtzname[int32(1)] != 0) { Xtzname[int32(1)] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - _dst_off = int32(-_zi_read32(tls, p1)) + _dst_off = Int32FromUint32(-_zi_read32(tls, p1)) Xdaylight = int32(1) } goto _8 @@ -148657,7 +148655,7 @@ func _do_tzset(tls *TLS) { Xtzname[int32(1)] = uintptr(unsafe.Pointer(&_dst_name)) if _dst_name[0] != 0 { Xdaylight = int32(1) - if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { + if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { _dst_off = _getoff(tls, bp+288) } else { _dst_off = int32(Xtimezone - int64(3600)) @@ -148689,7 +148687,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { scale = int32(3) - BoolInt32(_trans == _zi+uintptr(44)) off = 0 a = uint64(0) - n = uint64((int64(_index) - int64(_trans)) >> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if !(n != 0) { if alt != 0 { *(*Tsize_t)(unsafe.Pointer(alt)) = uint64(0) @@ -148703,12 +148701,12 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if a == n-uint64(1) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if a == uint64(0) { x = uint64(_zi_read32(tls, _trans)) if scale == int32(3) { x = x<= uint64(int64(_abbrevs_end)-int64(_abbrevs))) { + if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint64(p)-uint64(_abbrevs) >= Uint64FromInt64(int64(_abbrevs_end)-int64(_abbrevs))) { p = __ccgo_ts } ___unlock(tls, uintptr(unsafe.Pointer(&_lock4))) @@ -148931,7 +148929,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { var centuries, cycles, leaps, leaps1, rem, y int32 var _ /* dummy at bp+0 */ int32 _, _, _, _, _, _ = centuries, cycles, leaps, leaps1, rem, y - if uint64(year)-uint64(2) <= uint64(136) { + if Uint64FromInt64(year)-uint64(2) <= uint64(136) { y = int32(year) leaps = (y - int32(68)) >> int32(2) if !((y-Int32FromInt32(68))&Int32FromInt32(3) != 0) { @@ -148980,7 +148978,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { *(*int32)(unsafe.Pointer(is_leap)) = 0 leaps1 = 0 } else { - leaps1 = int32(uint32(rem) / uint32(4)) + leaps1 = Int32FromUint32(Uint32FromInt32(rem) / uint32(4)) rem = int32(uint32(rem) % Uint32FromUint32(4)) *(*int32)(unsafe.Pointer(is_leap)) = BoolInt32(!(rem != 0)) } @@ -149065,7 +149063,7 @@ func Xclock_getcpuclockid(tls *TLS, pid Tpid_t, clk uintptr) (r int32) { var ret int32 var _ /* ts at bp+0 */ Ttimespec _, _ = id, ret - id = int32(uint32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) + id = Int32FromUint32(Uint32FromInt32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) ret = int32(X__syscall2(tls, int64(SYS_clock_getres), int64(id), int64(bp))) if ret == -int32(EINVAL) { ret = -int32(ESRCH) @@ -149084,7 +149082,7 @@ func Xclock_getres(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { } /* If reaching this point, it's a 64-bit arch or time64-only * 32-bit arch and we can get result directly into timespec. */ - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) } func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { @@ -149103,7 +149101,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { } r = -int32(EINVAL) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xclock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { @@ -149141,7 +149139,7 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { trc("tls=%v clk=%v ts=%v, (%v:)", tls, clk, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) } func Xctime(tls *TLS, t uintptr) (r uintptr) { @@ -149204,7 +149202,7 @@ func Xftime(tls *TLS, tp uintptr) (r int32) { _ = v1 Xclock_gettime(tls, CLOCK_REALTIME, bp) (*Ttimeb)(unsafe.Pointer(tp)).Ftime = (*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec - (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = uint16((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) + (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = Uint16FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) v1 = Int16FromInt32(0) (*Ttimeb)(unsafe.Pointer(tp)).Fdstflag = v1 (*Ttimeb)(unsafe.Pointer(tp)).Ftimezone = v1 @@ -149406,7 +149404,7 @@ func Xnanosleep(tls *TLS, req uintptr, rem uintptr) (r int32) { trc("tls=%v req=%v rem=%v, (%v:)", tls, req, rem, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) } func _is_leap(tls *TLS, y int32) (r int32) { @@ -149421,10 +149419,10 @@ func _is_leap(tls *TLS, y int32) (r int32) { func _week_num(tls *TLS, tm uintptr) (r int32) { var dec31, jan1, val int32 _, _, _ = dec31, jan1, val - val = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) /* If 1 Jan is just 1-3 days past Monday, * the previous week is also in this year. */ - if (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { + if (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { val++ } if !(val != 0) { @@ -149432,7 +149430,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 31 December of prev year a Thursday, * or Friday of a leap year, then the * prev year has 53 weeks. */ - dec31 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) + dec31 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) if dec31 == int32(4) || dec31 == int32(5) && _is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year%int32(400)-int32(1)) != 0 { val++ } @@ -149441,7 +149439,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 1 January is not a Thursday, and not * a Wednesday of a leap year, then this * year has only 52 weeks. */ - jan1 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) + jan1 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) if jan1 != int32(4) && (jan1 != int32(3) || !(_is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year) != 0)) { val = int32(1) } @@ -149467,13 +149465,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc def_pad = int32('0') switch f { case int32('a'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(ABDAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday goto nl_strcat case int32('A'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(DAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday @@ -149481,13 +149479,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('h'): fallthrough case int32('b'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(ABMON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon goto nl_strcat case int32('B'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(MON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon @@ -149622,10 +149620,10 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc width = int32(1) goto number case int32('U'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) goto number case int32('W'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) goto number case int32('V'): val = int64(_week_num(tls, tm)) @@ -149649,7 +149647,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('Y'): val = int64((*Ttm)(unsafe.Pointer(tm)).Ftm_year) + int64(1900) if val >= int64(10000) { - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1870, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1870, VaList(bp+8, val))) return s } width = int32(4) @@ -149659,7 +149657,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc *(*Tsize_t)(unsafe.Pointer(l)) = uint64(0) return __ccgo_ts } - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1876, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1876, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) return s case int32('Z'): if (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst < 0 { @@ -149684,13 +149682,13 @@ number: } switch v7 { case int32('-'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1883, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1883, VaList(bp+8, val))) case int32('_'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1888, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1888, VaList(bp+8, width, val))) case int32('0'): fallthrough default: - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1894, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1894, VaList(bp+8, width, val))) break } return s @@ -149760,7 +149758,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl if v4 != 0 { f++ } - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { width = Xstrtoul(tls, f, bp+112, int32(10)) } else { width = uint64(0) @@ -149790,7 +149788,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl *(*Tsize_t)(unsafe.Pointer(bp))-- } for { - if !(int32(*(*int8)(unsafe.Pointer(t))) == int32('0') && uint32(int32(*(*int8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { + if !(int32(*(*int8)(unsafe.Pointer(t))) == int32('0') && Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { break } goto _5 @@ -149804,7 +149802,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } d = uint64(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { break } goto _6 @@ -149825,7 +149823,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl v8 = int32(5) } } - if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= uint64(v8) { + if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= Uint64FromInt32(v8) { v10 = l l++ *(*int8)(unsafe.Pointer(s + uintptr(v10))) = int8('+') @@ -149902,14 +149900,14 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { for *(*int8)(unsafe.Pointer(f)) != 0 { if int32(*(*int8)(unsafe.Pointer(f))) != int32('%') { v1 = int32(*(*int8)(unsafe.Pointer(f))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if v2 != 0 { for { if v8 = *(*int8)(unsafe.Pointer(s)) != 0; v8 { v5 = int32(*(*int8)(unsafe.Pointer(s))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: } @@ -149935,8 +149933,8 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { if int32(*(*int8)(unsafe.Pointer(f))) == int32('+') { f++ } - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { - w = int32(Xstrtoul(tls, f, bp+16, int32(10))) + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { + w = Int32FromUint64(Xstrtoul(tls, f, bp+16, int32(10))) f = *(*uintptr)(unsafe.Pointer(bp + 16)) } else { w = -int32(1) @@ -150097,7 +150095,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; if v48 = *(*int8)(unsafe.Pointer(s)) != 0; v48 { v45 = int32(*(*int8)(unsafe.Pointer(s))) - v46 = BoolInt32(v45 == int32(' ') || uint32(v45)-uint32('\t') < uint32(5)) + v46 = BoolInt32(v45 == int32(' ') || Uint32FromInt32(v45)-uint32('\t') < uint32(5)) goto _47 _47: } @@ -150216,13 +150214,13 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { goto numeric_range numeric_range: ; - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) = 0 i = int32(1) for { - if !(i <= min+range1 && BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { + if !(i <= min+range1 && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { break } v51 = s @@ -150233,12 +150231,12 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; i *= int32(10) } - if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(range1) { + if Uint32FromInt32(*(*int32)(unsafe.Pointer(dest))-min) >= Uint32FromInt32(range1) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) -= adj switch int64(dest) - int64(tm) { - case int64(uint64(UintptrFromInt32(0) + 28)): + case Int64FromUint64(uint64(UintptrFromInt32(0) + 28)): } goto update goto numeric_digits @@ -150253,14 +150251,14 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { s++ } } - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return uintptr(0) } v53 = Int32FromInt32(0) i = v53 *(*int32)(unsafe.Pointer(dest)) = v53 for { - if !(i < w && BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { + if !(i < w && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { break } v54 = s @@ -150386,9 +150384,9 @@ func Xtimer_getoverrun(tls *TLS, t Ttimer_t) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) } func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { @@ -150400,9 +150398,9 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) } func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (r int32) { @@ -150414,9 +150412,9 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) } type Ttms = struct { @@ -150547,7 +150545,7 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl break } *(*Tsize_t)(unsafe.Pointer(bp)) = Xmbstowcs(tls, bp+108, t_mb, Uint64FromInt64(400)/Uint64FromInt64(4)) - if *(*Tsize_t)(unsafe.Pointer(bp)) == uint64(-Int32FromInt32(1)) { + if *(*Tsize_t)(unsafe.Pointer(bp)) == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } t = bp + 108 @@ -150636,7 +150634,7 @@ func Xaccess(tls *TLS, filename uintptr, amode int32) (r int32) { trc("tls=%v filename=%v amode=%v, (%v:)", tls, filename, amode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_access), int64(filename), int64(amode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_access), int64(filename), int64(amode))))) } func Xacct(tls *TLS, filename uintptr) (r int32) { @@ -150644,7 +150642,7 @@ func Xacct(tls *TLS, filename uintptr) (r int32) { trc("tls=%v filename=%v, (%v:)", tls, filename, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) } func Xalarm(tls *TLS, seconds uint32) (r uint32) { @@ -150658,12 +150656,12 @@ func Xalarm(tls *TLS, seconds uint32) (r uint32) { var _ /* old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_value: Ttimeval{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), }, } *(*Titimerval)(unsafe.Pointer(bp + 32)) = Titimerval{} Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) } func Xchdir(tls *TLS, path uintptr) (r int32) { @@ -150671,7 +150669,7 @@ func Xchdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) } func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { @@ -150679,7 +150677,7 @@ func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_chown), int64(path), int64(uid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_chown), int64(path), Int64FromUint32(uid), Int64FromUint32(gid))))) } func _dummy12(tls *TLS, fd int32) (r int32) { @@ -150698,7 +150696,7 @@ func Xclose(tls *TLS, fd int32) (r1 int32) { if r == -int32(EINTR) { r = 0 } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xctermid(tls *TLS, s uintptr) (r uintptr) { @@ -150721,7 +150719,7 @@ func Xdup(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) } func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { @@ -150738,7 +150736,7 @@ func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { break } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { @@ -150749,7 +150747,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { var r, v1, v2 int32 _, _, _ = r, v1, v2 if old == new1 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if flags != 0 { for { @@ -150760,10 +150758,10 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { } } if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } if flags & ^Int32FromInt32(O_CLOEXEC) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } } for { @@ -150776,7 +150774,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { if r >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(new1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xdup3(tls *TLS, old int32, new1 int32, flags int32) (r int32) { @@ -150805,7 +150803,7 @@ func _checker(tls *TLS, p uintptr) (r int32) { X__syscall1(tls, int64(SYS_exit), int64(Int32FromInt32(1))) } *(*int32)(unsafe.Pointer(bp)) = int32(X__syscall4(tls, int64(SYS_faccessat), int64((*Tctx1)(unsafe.Pointer(c)).Ffd), int64((*Tctx1)(unsafe.Pointer(c)).Ffilename), int64((*Tctx1)(unsafe.Pointer(c)).Famode), int64(Int32FromInt32(0)))) - X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), int64(Uint64FromInt64(4))) + X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), Int64FromUint64(Uint64FromInt64(4))) return 0 } @@ -150819,13 +150817,13 @@ func Xfaccessat(tls *TLS, fd int32, filename uintptr, amode int32, flag int32) ( if flag != 0 { ret = int32(X__syscall4(tls, int64(SYS_faccessat2), int64(fd), int64(filename), int64(amode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } if flag & ^Int32FromInt32(AT_EACCESS) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) } func Xfchdir(tls *TLS, fd int32) (r int32) { @@ -150840,10 +150838,10 @@ func Xfchdir(tls *TLS, fd int32) (r int32) { _ = ret ret = int32(X__syscall1(tls, int64(SYS_fchdir), int64(fd))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) } func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { @@ -150856,12 +150854,12 @@ func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]int8 _ = ret - ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), int64(uid), int64(gid))) + ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), Int64FromUint32(uid), Int64FromUint32(gid))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_chown), int64(bp), int64(uid), int64(gid))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_chown), int64(bp), Int64FromUint32(uid), Int64FromUint32(gid))))) } func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag int32) (r int32) { @@ -150869,7 +150867,7 @@ func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag in trc("tls=%v fd=%v path=%v uid=%v gid=%v flag=%v, (%v:)", tls, fd, path, uid, gid, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), int64(uid), int64(gid), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(flag))))) } func Xfdatasync(tls *TLS, fd int32) (r int32) { @@ -150877,7 +150875,7 @@ func Xfdatasync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) } func Xfsync(tls *TLS, fd int32) (r int32) { @@ -150885,7 +150883,7 @@ func Xfsync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) } func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { @@ -150893,7 +150891,7 @@ func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { trc("tls=%v fd=%v length=%v, (%v:)", tls, fd, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) } func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { @@ -150912,7 +150910,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { } else { v2 = int32(PATH_MAX) } - v1 = uint64(v2) + v1 = Uint64FromInt32(v2) tmp = Xrealloc(tls, tmp, v1) if !(buf != 0) { buf = tmp @@ -150923,7 +150921,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { return uintptr(0) } } - ret = X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), int64(size)))) + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), Int64FromUint64(size)))) if ret < 0 { return uintptr(0) } @@ -150944,7 +150942,7 @@ func Xgetegid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getegid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getegid))) } func Xgeteuid(tls *TLS) (r Tuid_t) { @@ -150952,7 +150950,7 @@ func Xgeteuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_geteuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_geteuid))) } func Xgetgid(tls *TLS) (r Tgid_t) { @@ -150960,7 +150958,7 @@ func Xgetgid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getgid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getgid))) } func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { @@ -150968,7 +150966,7 @@ func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { trc("tls=%v count=%v list=%v, (%v:)", tls, count, list, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) } func Xgethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -151040,7 +151038,7 @@ func Xgetpgid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) } func Xgetpgrp(tls *TLS) (r Tpid_t) { @@ -151072,7 +151070,7 @@ func Xgetsid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) } func Xgetuid(tls *TLS) (r Tuid_t) { @@ -151080,7 +151078,7 @@ func Xgetuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getuid))) } func Xisatty(tls *TLS, fd int32) (r1 int32) { @@ -151093,7 +151091,7 @@ func Xisatty(tls *TLS, fd int32) (r1 int32) { var r uint64 var _ /* wsz at bp+0 */ Twinsize _ = r - r = uint64(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) + r = Uint64FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) if r == uint64(0) { return int32(1) } @@ -151108,7 +151106,7 @@ func Xlchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_lchown), int64(path), int64(uid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_lchown), int64(path), Int64FromUint32(uid), Int64FromUint32(gid))))) } func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { @@ -151116,7 +151114,7 @@ func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_link), int64(existing), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_link), int64(existing), int64(new1))))) } func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, flag int32) (r int32) { @@ -151124,7 +151122,7 @@ func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, fla trc("tls=%v fd1=%v existing=%v fd2=%v new1=%v flag=%v, (%v:)", tls, fd1, existing, fd2, new1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) } func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151132,7 +151130,7 @@ func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { trc("tls=%v fd=%v offset=%v whence=%v, (%v:)", tls, fd, offset, whence, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_lseek), int64(fd), offset, int64(whence)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_lseek), int64(fd), offset, int64(whence)))) } func Xlseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151178,7 +151176,7 @@ func Xpause(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pause), 0, 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pause), 0, 0, 0, 0, 0, 0)))) } func Xpipe(tls *TLS, fd uintptr) (r int32) { @@ -151186,7 +151184,7 @@ func Xpipe(tls *TLS, fd uintptr) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_pipe), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_pipe), int64(fd))))) } func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { @@ -151201,10 +151199,10 @@ func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { } ret = int32(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag & ^(Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } ret = Xpipe(tls, fd) if ret != 0 { @@ -151234,7 +151232,7 @@ func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151242,7 +151240,7 @@ func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { @@ -151250,7 +151248,7 @@ func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151258,7 +151256,7 @@ func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { @@ -151266,7 +151264,7 @@ func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, SYS_read, int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, SYS_read, int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151283,11 +151281,11 @@ func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_ buf = bp bufsize = uint64(1) } - r = int32(X__syscall3(tls, int64(SYS_readlink), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall3(tls, int64(SYS_readlink), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151304,11 +151302,11 @@ func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) buf = bp bufsize = uint64(1) } - r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151316,7 +151314,7 @@ func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r int32) { @@ -151324,7 +151322,7 @@ func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r trc("tls=%v oldfd=%v old=%v newfd=%v new1=%v, (%v:)", tls, oldfd, old, newfd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_renameat), int64(oldfd), int64(old), int64(newfd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_renameat), int64(oldfd), int64(old), int64(newfd), int64(new1))))) } func Xrmdir(tls *TLS, path uintptr) (r int32) { @@ -151332,7 +151330,7 @@ func Xrmdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_rmdir), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_rmdir), int64(path))))) } func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { @@ -151340,7 +151338,7 @@ func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setgid), int32(gid), 0, 0) + return X__setxid(tls, int32(SYS_setgid), Int32FromUint32(gid), 0, 0) } func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { @@ -151348,7 +151346,7 @@ func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { trc("tls=%v pid=%v pgid=%v, (%v:)", tls, pid, pgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) } func Xsetpgrp(tls *TLS) (r Tpid_t) { @@ -151364,7 +151362,7 @@ func Xsetsid(tls *TLS) (r Tpid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_setsid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_setsid))))) } func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { @@ -151372,7 +151370,7 @@ func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setuid), int32(uid), 0, 0) + return X__setxid(tls, int32(SYS_setuid), Int32FromUint32(uid), 0, 0) } type Tctx2 = struct { @@ -151428,7 +151426,7 @@ func X__setxid(tls *TLS, nr int32, id int32, eid int32, sid int32) (r int32) { } else { v1 = (*(*Tctx2)(unsafe.Pointer(bp))).Fret } - return int32(X__syscall_ret(tls, uint64(v1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(v1))) } func Xsleep(tls *TLS, seconds uint32) (r uint32) { @@ -151440,10 +151438,10 @@ func Xsleep(tls *TLS, seconds uint32) (r uint32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), } if Xnanosleep(tls, bp, bp) != 0 { - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) } return uint32(0) } @@ -151453,7 +151451,7 @@ func Xsymlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_symlink), int64(existing), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_symlink), int64(existing), int64(new1))))) } func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { @@ -151461,7 +151459,7 @@ func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { trc("tls=%v existing=%v fd=%v new1=%v, (%v:)", tls, existing, fd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) } func Xsync(tls *TLS) { @@ -151502,7 +151500,7 @@ func Xtruncate(tls *TLS, path uintptr, length Toff_t) (r int32) { trc("tls=%v path=%v length=%v, (%v:)", tls, path, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) } /* Support signed or unsigned plain-char */ @@ -151547,12 +151545,12 @@ func Xttyname_r(tls *TLS, fd int32, name uintptr, size Tsize_t) (r int32) { if !(Xisatty(tls, fd) != 0) { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } - X__procfdname(tls, bp+288, uint32(fd)) + X__procfdname(tls, bp+288, Uint32FromInt32(fd)) l = Xreadlink(tls, bp+288, name, size) if l < 0 { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } else { - if uint64(l) == size { + if Uint64FromInt64(l) == size { return int32(ERANGE) } } @@ -151577,14 +151575,14 @@ func Xualarm(tls *TLS, value uint32, interval uint32) (r uint32) { var _ /* it_old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_interval: Ttimeval{ - Ftv_usec: int64(interval), + Ftv_usec: Int64FromUint32(interval), }, Fit_value: Ttimeval{ - Ftv_usec: int64(value), + Ftv_usec: Int64FromUint32(value), }, } Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) } func Xunlink(tls *TLS, path uintptr) (r int32) { @@ -151592,7 +151590,7 @@ func Xunlink(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_unlink), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_unlink), int64(path))))) } func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { @@ -151600,7 +151598,7 @@ func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { trc("tls=%v fd=%v path=%v flag=%v, (%v:)", tls, fd, path, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) } func Xusleep(tls *TLS, useconds uint32) (r int32) { @@ -151612,8 +151610,8 @@ func Xusleep(tls *TLS, useconds uint32) (r int32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(useconds / uint32(1000000)), - Ftv_nsec: int64(useconds % uint32(1000000) * uint32(1000)), + Ftv_sec: Int64FromUint32(useconds / uint32(1000000)), + Ftv_nsec: Int64FromUint32(useconds % uint32(1000000) * uint32(1000)), } return Xnanosleep(tls, bp, bp) } @@ -151623,7 +151621,7 @@ func Xwrite(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151631,7 +151629,7 @@ func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func __ccgo_fp(f interface{}) uintptr { @@ -152006,22 +152004,22 @@ var X__fsmu8 = [51]Tuint32_t{ 11: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x0), 31: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x1), 32: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x2), @@ -154706,7 +154704,7 @@ var Xsigngam int32 var X__stack_chk_guard Tuintptr_t var X__stderr_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf5)) + uintptr(UNGET), Ffd: int32(2), Flock: -int32(1), @@ -154716,7 +154714,7 @@ var X__stderr_FILE = TFILE{ var X__stderr_used = uintptr(unsafe.Pointer(&X__stderr_FILE)) var X__stdin_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), Fbuf: uintptr(unsafe.Pointer(&_buf6)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Flock: -int32(1), @@ -154727,7 +154725,7 @@ var X__stdin_used = uintptr(unsafe.Pointer(&X__stdin_FILE)) var X__stdio_ofl_lockptr = uintptr(unsafe.Pointer(&_ofl_lock)) var X__stdout_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf7)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Ffd: int32(1), diff --git a/vendor/modernc.org/libc/ccgo_linux_arm.go b/vendor/modernc.org/libc/ccgo_linux_arm.go index d543227a..0161c688 100644 --- a/vendor/modernc.org/libc/ccgo_linux_arm.go +++ b/vendor/modernc.org/libc/ccgo_linux_arm.go @@ -1,4 +1,4 @@ -// Code generated for linux/arm by 'gcc --package-name=libc --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -isystem -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/arm -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/arm/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/src/unistd/ualarm.lo.go obj/src/unistd/unlink.lo.go obj/src/unistd/unlinkat.lo.go obj/src/unistd/usleep.lo.go obj/src/unistd/write.lo.go obj/src/unistd/writev.lo.go obj/compat/time32/__xstat.lo.go obj/compat/time32/adjtime32.lo.go obj/compat/time32/adjtimex_time32.lo.go obj/compat/time32/clock_adjtime32.lo.go obj/compat/time32/clock_getres_time32.lo.go obj/compat/time32/clock_gettime32.lo.go obj/compat/time32/clock_nanosleep_time32.lo.go obj/compat/time32/clock_settime32.lo.go obj/compat/time32/ctime32.lo.go obj/compat/time32/ctime32_r.lo.go obj/compat/time32/difftime32.lo.go obj/compat/time32/fstat_time32.lo.go obj/compat/time32/fstatat_time32.lo.go obj/compat/time32/ftime32.lo.go obj/compat/time32/futimens_time32.lo.go obj/compat/time32/futimes_time32.lo.go obj/compat/time32/futimesat_time32.lo.go obj/compat/time32/getitimer_time32.lo.go obj/compat/time32/getrusage_time32.lo.go obj/compat/time32/gettimeofday_time32.lo.go obj/compat/time32/gmtime32.lo.go obj/compat/time32/gmtime32_r.lo.go obj/compat/time32/localtime32.lo.go obj/compat/time32/localtime32_r.lo.go obj/compat/time32/lstat_time32.lo.go obj/compat/time32/lutimes_time32.lo.go obj/compat/time32/mktime32.lo.go obj/compat/time32/nanosleep_time32.lo.go obj/compat/time32/ppoll_time32.lo.go obj/compat/time32/pselect_time32.lo.go obj/compat/time32/recvmmsg_time32.lo.go obj/compat/time32/select_time32.lo.go obj/compat/time32/semtimedop_time32.lo.go obj/compat/time32/setitimer_time32.lo.go obj/compat/time32/settimeofday_time32.lo.go obj/compat/time32/sigtimedwait_time32.lo.go obj/compat/time32/stat_time32.lo.go obj/compat/time32/stime32.lo.go obj/compat/time32/time32.lo.go obj/compat/time32/time32gm.lo.go obj/compat/time32/timer_gettime32.lo.go obj/compat/time32/timer_settime32.lo.go obj/compat/time32/timerfd_gettime32.lo.go obj/compat/time32/timerfd_settime32.lo.go obj/compat/time32/timespec_get_time32.lo.go obj/compat/time32/utime_time32.lo.go obj/compat/time32/utimensat_time32.lo.go obj/compat/time32/utimes_time32.lo.go obj/compat/time32/wait3_time32.lo.go obj/compat/time32/wait4_time32.lo.go -lgcc -lgcc_eh', DO NOT EDIT. +// Code generated for linux/arm by 'gcc --package-name=libc --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -isystem -hide pread,pwrite,ftruncate,read,write -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/arm -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/arm/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/src/unistd/ualarm.lo.go obj/src/unistd/unlink.lo.go obj/src/unistd/unlinkat.lo.go obj/src/unistd/usleep.lo.go obj/src/unistd/write.lo.go obj/src/unistd/writev.lo.go obj/compat/time32/__xstat.lo.go obj/compat/time32/adjtime32.lo.go obj/compat/time32/adjtimex_time32.lo.go obj/compat/time32/clock_adjtime32.lo.go obj/compat/time32/clock_getres_time32.lo.go obj/compat/time32/clock_gettime32.lo.go obj/compat/time32/clock_nanosleep_time32.lo.go obj/compat/time32/clock_settime32.lo.go obj/compat/time32/ctime32.lo.go obj/compat/time32/ctime32_r.lo.go obj/compat/time32/difftime32.lo.go obj/compat/time32/fstat_time32.lo.go obj/compat/time32/fstatat_time32.lo.go obj/compat/time32/ftime32.lo.go obj/compat/time32/futimens_time32.lo.go obj/compat/time32/futimes_time32.lo.go obj/compat/time32/futimesat_time32.lo.go obj/compat/time32/getitimer_time32.lo.go obj/compat/time32/getrusage_time32.lo.go obj/compat/time32/gettimeofday_time32.lo.go obj/compat/time32/gmtime32.lo.go obj/compat/time32/gmtime32_r.lo.go obj/compat/time32/localtime32.lo.go obj/compat/time32/localtime32_r.lo.go obj/compat/time32/lstat_time32.lo.go obj/compat/time32/lutimes_time32.lo.go obj/compat/time32/mktime32.lo.go obj/compat/time32/nanosleep_time32.lo.go obj/compat/time32/ppoll_time32.lo.go obj/compat/time32/pselect_time32.lo.go obj/compat/time32/recvmmsg_time32.lo.go obj/compat/time32/select_time32.lo.go obj/compat/time32/semtimedop_time32.lo.go obj/compat/time32/setitimer_time32.lo.go obj/compat/time32/settimeofday_time32.lo.go obj/compat/time32/sigtimedwait_time32.lo.go obj/compat/time32/stat_time32.lo.go obj/compat/time32/stime32.lo.go obj/compat/time32/time32.lo.go obj/compat/time32/time32gm.lo.go obj/compat/time32/timer_gettime32.lo.go obj/compat/time32/timer_settime32.lo.go obj/compat/time32/timerfd_gettime32.lo.go obj/compat/time32/timerfd_settime32.lo.go obj/compat/time32/timespec_get_time32.lo.go obj/compat/time32/utime_time32.lo.go obj/compat/time32/utimensat_time32.lo.go obj/compat/time32/utimes_time32.lo.go obj/compat/time32/wait3_time32.lo.go obj/compat/time32/wait4_time32.lo.go -lgcc -lgcc_eh', DO NOT EDIT. //go:build linux && arm @@ -9,10 +9,8 @@ import ( "unsafe" ) -var ( - _ reflect.Type - _ unsafe.Pointer -) +var _ reflect.Type +var _ unsafe.Pointer const BIG_ENDIAN = 4321 const BYTE_ORDER = 1234 @@ -620,8 +618,8 @@ func ___frexp_exp(tls *TLS, x float64, expt uintptr) (r float64) { */ exp_x = Xexp(tls, x-_kln2) hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&exp_x)) >> int32(32)) - *(*int32)(unsafe.Pointer(expt)) = int32(hx>>Int32FromInt32(20) - uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) - v1 = uint64(hx&Uint32FromInt32(0xfffff)|uint32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(20) - Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) + v1 = uint64(hx&Uint32FromInt32(0xfffff)|Uint32FromInt32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) - v1 = hx&uint32(0x7fffff) | uint32((Int32FromInt32(0x7f)+Int32FromInt32(127))<>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) + v1 = hx&uint32(0x7fffff) | Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(127))<> Int32FromInt32(63)) + zineg = Int32FromUint64(v1 >> Int32FromInt32(63)) z = Xcacos(tls, z) if zineg != 0 { v3 = [2]float64{ @@ -849,7 +847,7 @@ func Xcacoshf(tls *TLS, z complex64) (r complex64) { v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: - zineg = int32(v1 >> Int32FromInt32(31)) + zineg = Int32FromUint32(v1 >> Int32FromInt32(31)) z = Xcacosf(tls, z) if zineg != 0 { v3 = [2]float32{ @@ -1230,11 +1228,11 @@ func Xccosh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -1391,8 +1389,8 @@ func Xccoshf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -1987,11 +1985,11 @@ func Xcsinh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -2149,8 +2147,8 @@ func Xcsinhf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -2346,7 +2344,7 @@ _9: v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v12 = [2]float64{ 0: Xfabs(tls, b-b), 1: Xcopysign(tls, a, b), @@ -2466,7 +2464,7 @@ _9: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v12 = [2]float32{ 0: Xfabsf(tls, b-b), 1: Xcopysignf(tls, a, b), @@ -3230,14 +3228,14 @@ func Xconfstr(tls *TLS, name int32, buf uintptr, len1 Tsize_t) (r Tsize_t) { if !(name != 0) { s = __ccgo_ts + 1 } else { - if uint32(name) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { + if Uint32FromInt32(name) & ^Uint32FromUint32(4) != uint32(1) && Uint32FromInt32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uint32(0) } } // snprintf is overkill but avoid wasting code size to implement // this completely useless function and its truncation semantics - return uint32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) + return Uint32FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) } const ARG_MAX = 131072 @@ -3355,7 +3353,7 @@ func Xfpathconf(tls *TLS, fd int32, name int32) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - if uint32(name) >= Uint32FromInt64(42)/Uint32FromInt64(2) { + if Uint32FromInt32(name) >= Uint32FromInt64(42)/Uint32FromInt64(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -7649,7 +7647,7 @@ func Xsysconf(tls *TLS, name int32) (r int32) { var _ /* set at bp+16 */ [128]uint8 var _ /* si at bp+144 */ Tsysinfo _, _, _, _, _, _, _, _ = cnt, i, mem, val, v1, v3, v6, p5 - if uint32(name) >= Uint32FromInt64(502)/Uint32FromInt64(2) || !(_values1[name] != 0) { + if Uint32FromInt32(name) >= Uint32FromInt64(502)/Uint32FromInt64(2) || !(_values1[name] != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } else { @@ -7666,11 +7664,11 @@ func Xsysconf(tls *TLS, name int32) (r int32) { } else { v1 = (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur } - return int32(v1) + return Int32FromUint64(v1) } } } - switch int32(uint8(_values1[name])) { + switch Int32FromUint8(Uint8FromInt16(_values1[name])) { case (-Int32FromInt32(256) | Int32FromInt32(1)) & Int32FromInt32(255): return int32(200809) case (-Int32FromInt32(256) | Int32FromInt32(2)) & Int32FromInt32(255): @@ -7678,7 +7676,7 @@ func Xsysconf(tls *TLS, name int32) (r int32) { case (-Int32FromInt32(256) | Int32FromInt32(3)) & Int32FromInt32(255): return int32(MQ_PRIO_MAX) case (-Int32FromInt32(256) | Int32FromInt32(4)) & Int32FromInt32(255): - return int32(X__libc.Fpage_size) + return Int32FromUint32(X__libc.Fpage_size) case (-Int32FromInt32(256) | Int32FromInt32(5)) & Int32FromInt32(255): return int32(SEM_VALUE_MAX) case (-Int32FromInt32(256) | Int32FromInt32(11)) & Int32FromInt32(255): @@ -7689,12 +7687,12 @@ func Xsysconf(tls *TLS, name int32) (r int32) { *(*[128]uint8)(unsafe.Pointer(bp + 16)) = [128]uint8{ 0: uint8(1), } - X__syscall3(tls, int32(SYS_sched_getaffinity), Int32FromInt32(0), int32(Uint32FromInt64(128)), int32(bp+16)) + X__syscall3(tls, int32(SYS_sched_getaffinity), Int32FromInt32(0), Int32FromUint32(Uint32FromInt64(128)), int32(bp+16)) v3 = Int32FromInt32(0) cnt = v3 i = v3 for { - if !(uint32(i) < uint32(128)) { + if !(Uint32FromInt32(i) < uint32(128)) { break } for { @@ -7705,7 +7703,7 @@ func Xsysconf(tls *TLS, name int32) (r int32) { _4: ; p5 = bp + 16 + uintptr(i) - *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (int32((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (Int32FromUint8((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) cnt++ } goto _2 @@ -7733,11 +7731,11 @@ func Xsysconf(tls *TLS, name int32) (r int32) { } else { v6 = mem } - return int32(v6) + return Int32FromUint64(v6) case (-Int32FromInt32(256) | Int32FromInt32(12)) & Int32FromInt32(255): fallthrough case (-Int32FromInt32(256) | Int32FromInt32(13)) & Int32FromInt32(255): - val = int32(X__getauxval(tls, uint32(AT_MINSIGSTKSZ))) + val = Int32FromUint32(X__getauxval(tls, uint32(AT_MINSIGSTKSZ))) if val < int32(MINSIGSTKSZ) { val = int32(MINSIGSTKSZ) } @@ -9367,14 +9365,14 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags * Prefix "$2x$": bug = 1, safety = 0 * Prefix "$2y$": bug = 0, safety = 0 */ - bug = uint32(int32(flags) & int32(1)) + bug = Uint32FromInt32(Int32FromUint8(flags) & int32(1)) safety = uint32(flags) & uint32(2) << int32(15) v1 = Uint32FromInt32(0) diff = v1 sign = v1 i = uint32(0) for { - if !(i < uint32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { + if !(i < Uint32FromInt32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { break } v3 = Uint32FromInt32(0) @@ -9388,7 +9386,7 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags *(*TBF_word)(unsafe.Pointer(bp)) <<= uint32(8) *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(*(*uint8)(unsafe.Pointer(ptr))) /* correct */ *(*TBF_word)(unsafe.Pointer(bp + 1*4)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(int8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ + *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= Uint32FromInt8(Int8FromUint8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ /* * Sign extension in the first char has no effect - nothing to overwrite yet, * and those extra 24 bits will be fully shifted out of the 32-bit word. For @@ -9468,15 +9466,15 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w } } _, _, _, _, _, _, _, _, _, _, _, _, _ = L, L1, R, count, done, i, ptr, tmp1, tmp2, tmp3, tmp4, v1, v6 - if int32(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { return UintptrFromInt32(0) } - count = Uint32FromInt32(1) << ((int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (int32(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) + count = Uint32FromInt32(1) << ((Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) if count < min || _BF_decode(tls, bp+4240, setting+7, int32(16)) != 0 { return UintptrFromInt32(0) } _BF_swap(tls, bp+4240, int32(4)) - _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) _memcpy(tls, bp+72, uintptr(unsafe.Pointer(&_BF_init_state))+72, uint32(4096)) L = uint32(0) R = uint32(0) @@ -9568,8 +9566,8 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w ; i += int32(2) } - _memcpy(tls, output, setting, uint32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) - *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[int32(_BF_atoi64[int32(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] + _memcpy(tls, output, setting, Uint32FromInt32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[Int32FromUint8(_BF_atoi64[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] /* This has to be bug-compatible with the original implementation, so * only encode 23 of the 24 bytes. :-) */ _BF_swap(tls, bp+4240, int32(6)) @@ -9633,14 +9631,14 @@ func X__crypt_blowfish(tls *TLS, key uintptr, setting uintptr, output uintptr) ( */ _memcpy(tls, bp, test_setting, uint32(30)) if retval != 0 { - flags = uint32(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + flags = uint32(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) test_hash = uintptr(unsafe.Pointer(&_test_hashes)) + uintptr(flags&uint32(1))*34 *(*uint8)(unsafe.Pointer(bp + 2)) = *(*uint8)(unsafe.Pointer(setting + 2)) } Xmemset(tls, bp+30, int32(0x55), uint32(63)) *(*uint8)(unsafe.Pointer(bp + 30 + uintptr(Uint32FromInt64(63)-Uint32FromInt32(1)))) = uint8(0) p = _BF_crypt(tls, test_key, bp, bp+30, uint32(1)) - ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, uint32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, uint32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) + ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, Uint32FromInt32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, Uint32FromInt32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) k = __ccgo_ts + 58 _BF_set_key(tls, k, bp+96, bp+168, uint8(2)) /* $2a$ */ _BF_set_key(tls, k, bp+240, bp+312, uint8(4)) /* $2y$ */ @@ -11450,7 +11448,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { } } retval &= int32(0x3f) - return uint32(retval) + return Uint32FromInt32(retval) } // C documentation @@ -11460,7 +11458,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { // * containing characters that would violate the passwd file format. // */ func _ascii_is_unsafe(tls *TLS, ch uint8) (r int32) { - return BoolInt32(!(ch != 0) || int32(ch) == int32('\n') || int32(ch) == int32(':')) + return BoolInt32(!(ch != 0) || Int32FromUint8(ch) == int32('\n') || Int32FromUint8(ch) == int32(':')) } func _setup_salt(tls *TLS, salt Tuint32_t) (r Tuint32_t) { @@ -11711,13 +11709,13 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin for q <= bp+128+uintptr(Uint32FromInt64(8)-Uint32FromInt32(1)) { v1 = q q++ - *(*uint8)(unsafe.Pointer(v1)) = uint8(int32(*(*uint8)(unsafe.Pointer(key))) << int32(1)) + *(*uint8)(unsafe.Pointer(v1)) = Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(key))) << int32(1)) if *(*uint8)(unsafe.Pointer(key)) != 0 { key++ } } X__des_setkey(tls, bp+128, bp) - if int32(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { /* * "new"-style: * setting - underscore, 4 chars of count, 4 chars of salt @@ -11729,8 +11727,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(5)) { break } - value = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } count |= value << ((i - uint32(1)) * uint32(6)) @@ -11748,8 +11746,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(9)) { break } - value1 = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value1]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value1 = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value1]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } salt |= value1 << ((i - uint32(5)) * uint32(6)) @@ -11773,7 +11771,7 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin p4 = v5 v6 = key key++ - *(*uint8)(unsafe.Pointer(p4)) = uint8(int32(*(*uint8)(unsafe.Pointer(p4))) ^ int32(*(*uint8)(unsafe.Pointer(v6)))< uint32(KEY_MAX) { return uintptr(0) } @@ -12204,7 +12202,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt salt = setting + uintptr(3) i = uint32(0) for { - if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } goto _1 @@ -12292,7 +12290,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt if !(i < uint32(5)) { break } - p = _to64(tls, p, uint32(int32((*(*[16]uint8)(unsafe.Pointer(bp + 88)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm)) + uintptr(i)*3))])< uint32(KEY_MAX1) { return uintptr(0) } @@ -12721,7 +12719,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui return uintptr(0) } u = Xstrtoul(tls, salt, bp+220, int32(10)) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 220))))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 220))))) != int32('$') { return uintptr(0) } salt = *(*uintptr)(unsafe.Pointer(bp + 220)) + uintptr(1) @@ -12739,11 +12737,11 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui } i = uint32(0) for { - if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } /* reject characters that interfere with /etc/shadow parsing */ - if int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { return uintptr(0) } goto _1 @@ -12797,7 +12795,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha256_init(tls, bp) i = uint32(0) for { - if !(i < uint32(int32(16)+int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { + if !(i < Uint32FromInt32(int32(16)+Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { break } _sha256_update(tls, bp, salt, slen) @@ -12844,13 +12842,13 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(10)) { break } - p = _to641(tls, p, uint32(int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm1)) + uintptr(i)*3))])<= 0) { break } - *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= uint32(int32(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j + *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j goto _2 _2: ; @@ -13674,134 +13672,134 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } var _table = [384]uint16{ - 128: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 129: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 130: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 131: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 132: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 133: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 134: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 135: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 136: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 137: uint16((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 138: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 139: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 140: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 141: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 142: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 143: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 144: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 145: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 146: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 147: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 148: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 149: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 150: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 151: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 152: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 153: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 154: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 155: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 156: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 157: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 158: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 159: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 160: uint16((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 161: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 162: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 163: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 164: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 165: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 166: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 167: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 168: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 169: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 170: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 171: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 172: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 173: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 174: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 175: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 176: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 177: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 178: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 179: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 180: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 181: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 182: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 183: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 184: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 185: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 186: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 187: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 188: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 189: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 190: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 191: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 192: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 193: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 194: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 195: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 196: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 197: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 198: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 199: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 200: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 201: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 202: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 203: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 204: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 205: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 206: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 207: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 208: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 209: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 210: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 211: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 212: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 213: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 214: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 215: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 216: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 217: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 218: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 219: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 220: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 221: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 222: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 223: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 224: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 225: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 226: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 227: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 228: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 229: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 230: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 231: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 232: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 233: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 234: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 235: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 236: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 237: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 238: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 239: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 240: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 241: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 242: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 243: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 244: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 245: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 246: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 247: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 248: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 249: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 250: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 251: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 252: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 253: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 254: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 255: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 128: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 129: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 130: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 131: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 132: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 133: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 134: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 135: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 136: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 137: Uint16FromInt32((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 138: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 139: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 140: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 141: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 142: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 143: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 144: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 145: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 146: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 147: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 148: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 149: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 150: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 151: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 152: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 153: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 154: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 155: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 156: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 157: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 158: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 159: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 160: Uint16FromInt32((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 161: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 162: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 163: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 164: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 165: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 166: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 167: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 168: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 169: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 170: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 171: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 172: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 173: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 174: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 175: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 176: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 177: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 178: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 179: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 180: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 181: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 182: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 183: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 184: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 185: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 186: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 187: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 188: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 189: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 190: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 191: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 192: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 193: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 194: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 195: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 196: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 197: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 198: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 199: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 200: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 201: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 202: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 203: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 204: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 205: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 206: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 207: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 208: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 209: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 210: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 211: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 212: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 213: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 214: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 215: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 216: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 217: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 218: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 219: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 220: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 221: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 222: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 223: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 224: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 225: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 226: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 227: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 228: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 229: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 230: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 231: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 232: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 233: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 234: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 235: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 236: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 237: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 238: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 239: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 240: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 241: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 242: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 243: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 244: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 245: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 246: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 247: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 248: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 249: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 250: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 251: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 252: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 253: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 254: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 255: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), } var _ptable = uintptr(unsafe.Pointer(&_table)) + uintptr(128)*2 @@ -14147,7 +14145,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) { } else { v1 = int32(1) } - return uint32(v1) + return Uint32FromInt32(v1) } var _table1 = [384]Tint32_t{ @@ -14435,7 +14433,7 @@ func Xisalnum(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0) + return BoolInt32(BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0) } func X__isalnum_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14459,7 +14457,7 @@ func Xisalpha(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14515,7 +14513,7 @@ func Xiscntrl(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c) < uint32(0x20) || c == int32(0x7f)) + return BoolInt32(Uint32FromInt32(c) < uint32(0x20) || c == int32(0x7f)) } func X__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14539,7 +14537,7 @@ func Xisdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('0') < uint32(10)) + return BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14563,7 +14561,7 @@ func Xisgraph(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) } func X__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14587,7 +14585,7 @@ func Xislower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14611,7 +14609,7 @@ func Xisprint(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x20) < uint32(0x5f)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14635,7 +14633,7 @@ func Xispunct(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) } func X__ispunct_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14659,7 +14657,7 @@ func Xisspace(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(c == int32(' ') || uint32(c)-uint32('\t') < uint32(5)) + return BoolInt32(c == int32(' ') || Uint32FromInt32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14683,7 +14681,7 @@ func Xisupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('A') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -17576,7 +17574,7 @@ func Xiswalpha(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table3[uint32(int32(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table3[Uint32FromInt32(Int32FromUint8(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } if wc < uint32(0x2fffe) { return int32(1) @@ -17605,7 +17603,7 @@ func Xiswblank(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return Xisblank(tls, int32(wc)) + return Xisblank(tls, Int32FromUint32(wc)) } func X__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32) { @@ -17709,8 +17707,8 @@ func Xwctype(tls *TLS, s uintptr) (r Twctype_t) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { - return uint32(i) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { + return Uint32FromInt32(i) } goto _1 _1: @@ -17844,10 +17842,10 @@ func Xiswprint(tls *TLS, wc Twint_t) (r int32) { if wc < uint32(0xff) { return BoolInt32((wc+uint32(1))&uint32(0x7f) >= uint32(0x21)) } - if wc < uint32(0x2028) || wc-uint32(0x202a) < uint32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < uint32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { + if wc < uint32(0x2028) || wc-uint32(0x202a) < Uint32FromInt32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < Uint32FromInt32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { return int32(1) } - if wc-uint32(0xfffc) > uint32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { + if wc-uint32(0xfffc) > Uint32FromInt32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { return 0 } return int32(1) @@ -19427,7 +19425,7 @@ func Xiswpunct(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table4[uint32(int32(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table4[Uint32FromInt32(Int32FromUint8(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } return 0 } @@ -19560,7 +19558,7 @@ func Xisxdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0 || Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -19595,7 +19593,7 @@ func Xtolower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('A') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) != 0 { return c | int32(32) } return c @@ -19622,7 +19620,7 @@ func Xtoupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('a') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) != 0 { return c & int32(0x5f) } return c @@ -22428,40 +22426,40 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { var b, rt, try, v, x, xb, xn, y uint32 var c0, r, rd, v1 int32 _, _, _, _, _, _, _, _, _, _, _, _ = b, c0, r, rd, rt, try, v, x, xb, xn, y, v1 - c0 = int32(c) + c0 = Int32FromUint32(c) if c >= uint32(0x20000) { - return int32(c) + return Int32FromUint32(c) } b = c >> int32(8) c &= uint32(255) x = c / uint32(3) y = c % uint32(3) /* lookup entry in two-level base-6 table */ - v = uint32(_tab1[uint32(int32(_tab1[b])*int32(86))+x]) - v = v * uint32(_mt[y]) >> int32(11) % uint32(6) + v = uint32(_tab1[Uint32FromInt32(Int32FromUint8(_tab1[b])*int32(86))+x]) + v = v * Uint32FromInt32(_mt[y]) >> int32(11) % uint32(6) /* use the bit vector out of the tables as an index into * a block-specific set of rules and decode the rule into * a type and a case-mapping delta. */ r = _rules[uint32(_rulebases[b])+v] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) /* rules 0/1 are simple lower/upper case with a delta. * apply according to desired mapping direction. */ if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* binary search. endpoints of the binary search for * this block are stored in the rule delta field. */ - xn = uint32(rd & int32(0xff)) - xb = uint32(rd) >> int32(8) + xn = Uint32FromInt32(rd & int32(0xff)) + xb = Uint32FromInt32(rd) >> int32(8) for xn != 0 { try = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2))) if try == c { r = _rules[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2 + 1))] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* Hard-coded for the four exceptional titlecase */ if dir != 0 { @@ -22493,7 +22491,7 @@ func Xtowlower(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, 0)) + return Uint32FromInt32(_casemap(tls, wc, 0)) } func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { @@ -22501,7 +22499,7 @@ func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, int32(1))) + return Uint32FromInt32(_casemap(tls, wc, int32(1))) } func X__towupper_l(tls *TLS, c Twint_t, l Tlocale_t) (r Twint_t) { @@ -24714,10 +24712,10 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { return v1 } if wc&uint32(0xfffeffff) < uint32(0xfffe) { - if int32(_table5[uint32(int32(_table5[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)])>>(wc&uint32(7))&int32(1) != 0 { + if Int32FromUint8(_table5[Uint32FromInt32(Int32FromUint8(_table5[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)])>>(wc&uint32(7))&int32(1) != 0 { return 0 } - if int32(_wtable[uint32(int32(_wtable[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)])>>(wc&uint32(7))&int32(1) != 0 { + if Int32FromUint8(_wtable[Uint32FromInt32(Int32FromUint8(_wtable[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)])>>(wc&uint32(7))&int32(1) != 0 { return int32(2) } return int32(1) @@ -25077,7 +25075,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { var len1 int32 _, _ = de, len1 if (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos >= (*TDIR)(unsafe.Pointer(dir)).Fbuf_end { - len1 = X__syscall3(tls, int32(SYS_getdents64), (*TDIR)(unsafe.Pointer(dir)).Ffd, int32(dir+24), int32(Uint32FromInt64(2048))) + len1 = X__syscall3(tls, int32(SYS_getdents64), (*TDIR)(unsafe.Pointer(dir)).Ffd, int32(dir+24), Int32FromUint32(Uint32FromInt64(2048))) if len1 <= 0 { if len1 < 0 && len1 != -int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = -len1 @@ -25088,7 +25086,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos = 0 } de = dir + 24 + uintptr((*TDIR)(unsafe.Pointer(dir)).Fbuf_pos) - *(*int32)(unsafe.Pointer(dir + 12)) += int32((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) + *(*int32)(unsafe.Pointer(dir + 12)) += Int32FromUint16((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) (*TDIR)(unsafe.Pointer(dir)).Ftell = (*Tdirent)(unsafe.Pointer(de)).Fd_off return de } @@ -25203,7 +25201,7 @@ func Xscandir(tls *TLS, path uintptr, res uintptr, sel uintptr, cmp uintptr) (r Xqsort(tls, names, cnt, uint32(4), cmp) } *(*uintptr)(unsafe.Pointer(res)) = names - return int32(cnt) + return Int32FromUint32(cnt) } func Xseekdir(tls *TLS, dir uintptr, off int32) { @@ -25325,14 +25323,14 @@ func Xgetenv(tls *TLS, name uintptr) (r uintptr) { var e uintptr var l Tsize_t _, _ = e, l - l = uint32(int32(X__strchrnul(tls, name, int32('='))) - int32(name)) + l = Uint32FromInt32(int32(X__strchrnul(tls, name, int32('='))) - int32(name)) if l != 0 && !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) && Xenviron != 0 { e = Xenviron for { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { return *(*uintptr)(unsafe.Pointer(e)) + uintptr(l) + uintptr(1) } goto _1 @@ -25415,7 +25413,7 @@ func Xputenv(tls *TLS, s uintptr) (r int32) { } var l Tsize_t _ = l - l = uint32(int32(X__strchrnul(tls, s, int32('='))) - int32(s)) + l = Uint32FromInt32(int32(X__strchrnul(tls, s, int32('='))) - int32(s)) if !(l != 0) || !(*(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0) { return Xunsetenv(tls, s) } @@ -25504,7 +25502,7 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) (r int32) { var v2 bool _, _, _, _, _ = l1, l2, s, v1, v2 if v2 = !(var1 != 0); !v2 { - v1 = uint32(int32(X__strchrnul(tls, var1, int32('='))) - int32(var1)) + v1 = Uint32FromInt32(int32(X__strchrnul(tls, var1, int32('='))) - int32(var1)) l1 = v1 } if v2 || !(v1 != 0) || *(*uint8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { @@ -25536,7 +25534,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { var e, eo, v2 uintptr var l Tsize_t _, _, _, _ = e, eo, l, v2 - l = uint32(int32(X__strchrnul(tls, name, int32('='))) - int32(name)) + l = Uint32FromInt32(int32(X__strchrnul(tls, name, int32('='))) - int32(name)) if !(l != 0) || *(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) @@ -25548,7 +25546,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { X__env_rm_add(tls, *(*uintptr)(unsafe.Pointer(e)), uintptr(0)) } else { if eo != e { @@ -25871,7 +25869,7 @@ func X__strerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { } var s uintptr _ = s - if uint32(e) >= Uint32FromInt64(264)/Uint32FromInt64(2) { + if Uint32FromInt32(e) >= Uint32FromInt64(264)/Uint32FromInt64(2) { e = 0 } s = uintptr(unsafe.Pointer(&_errmsgstr)) + uintptr(_errmsgidx[e]) @@ -26000,7 +25998,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { arg |= uint32(O_LARGEFILE) } if cmd == int32(F_SETLKW) { - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg)), 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg)), 0, 0, 0))) } if cmd == int32(F_GETOWN) { ret = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_GETOWN_EX), int32(bp)) @@ -26008,7 +26006,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg))) } if ret != 0 { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } if (*(*Tf_owner_ex)(unsafe.Pointer(bp))).Ftype1 == int32(F_OWNER_PGRP) { v1 = -(*(*Tf_owner_ex)(unsafe.Pointer(bp))).Fpid @@ -26018,25 +26016,25 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return v1 } if cmd == int32(F_DUPFD_CLOEXEC) { - ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD_CLOEXEC), int32(arg)) + ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD_CLOEXEC), Int32FromUint32(arg)) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall3(tls, int32(SYS_fcntl64), ret1, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } - return X__syscall_ret(tls, uint32(ret1)) + return X__syscall_ret(tls, Uint32FromInt32(ret1)) } ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD_CLOEXEC), Int32FromInt32(0)) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall1(tls, int32(SYS_close), ret1) } - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } - ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD), int32(arg)) + ret1 = X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_DUPFD), Int32FromUint32(arg)) if ret1 >= 0 { X__syscall3(tls, int32(SYS_fcntl64), ret1, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } - return X__syscall_ret(tls, uint32(ret1)) + return X__syscall_ret(tls, Uint32FromInt32(ret1)) } switch cmd { case int32(F_SETLK): @@ -26046,9 +26044,9 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { case int32(F_GETOWN_EX): fallthrough case int32(F_SETOWN_EX): - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg))))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, int32(uintptr(arg))))) default: - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, int32(arg)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fcntl64), fd, cmd, Int32FromUint32(arg)))) } return r } @@ -26068,11 +26066,11 @@ func Xopen(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) { mode = VaUint32(&ap) _ = ap } - fd = ___syscall_cp(tls, int32(SYS_open), int32(filename), flags|Int32FromInt32(O_LARGEFILE), int32(mode), 0, 0, 0) + fd = ___syscall_cp(tls, int32(SYS_open), int32(filename), flags|Int32FromInt32(O_LARGEFILE), Int32FromUint32(mode), 0, 0, 0) if fd >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } - return X__syscall_ret(tls, uint32(fd)) + return X__syscall_ret(tls, Uint32FromInt32(fd)) } func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r int32) { @@ -26089,7 +26087,7 @@ func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r i mode = VaUint32(&ap) _ = ap } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_openat), fd, int32(filename), flags|Int32FromInt32(O_LARGEFILE), int32(mode), 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_openat), fd, int32(filename), flags|Int32FromInt32(O_LARGEFILE), Int32FromUint32(mode), 0, 0))) } func Xposix_fadvise(tls *TLS, fd int32, base Toff_t, len1 Toff_t, advice int32) (r int32) { @@ -26188,7 +26186,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v3 = f + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26199,18 +26197,18 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v6 = f + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__shgetc(tls, f) } c = v4 - if uint32(c-int32('0')) >= uint32(10) && pok != 0 { + if Uint32FromInt32(c-int32('0')) >= uint32(10) && pok != 0 { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } } } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -26218,7 +26216,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } x = 0 for { - if !(uint32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { break } x = int32(10)*x + c - int32('0') @@ -26229,7 +26227,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v12 = f + 4 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__shgetc(tls, f) } @@ -26237,7 +26235,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } y = int64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { break } y = int64(10)*y + int64(c) - int64('0') @@ -26248,14 +26246,14 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v16 = f + 4 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 } for { - if !(uint32(c-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10)) { break } goto _17 @@ -26265,7 +26263,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v20 = f + 4 v19 = *(*uintptr)(unsafe.Pointer(v20)) *(*uintptr)(unsafe.Pointer(v20))++ - v18 = int32(*(*uint8)(unsafe.Pointer(v19))) + v18 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) } else { v18 = X__shgetc(tls, f) } @@ -26318,7 +26316,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } @@ -26330,7 +26328,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v8 = f + 4 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ - v6 = int32(*(*uint8)(unsafe.Pointer(v7))) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v7))) } else { v6 = X__shgetc(tls, f) } @@ -26348,7 +26346,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v11 = f + 4 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } @@ -26357,7 +26355,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0] = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || c == int32('.')) { break } if c == int32('.') { @@ -26373,9 +26371,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, lnz = int32(dc) } if j != 0 { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(c) - uint32('0') + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + Uint32FromInt32(c) - uint32('0') } else { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(c - int32('0')) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = Uint32FromInt32(c - int32('0')) } j++ v13 = j @@ -26399,7 +26397,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v16 = f + 4 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } @@ -26507,9 +26505,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % uint32(p10) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/uint32(p10) + carry - carry = uint32(int32(1000000000)/p10) * tmp + tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % Uint32FromInt32(p10) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/Uint32FromInt32(p10) + carry + carry = Uint32FromInt32(int32(1000000000)/p10) * tmp if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) rp -= int32(9) @@ -26596,9 +26594,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp2 = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] & uint32(int32(1)<>sh + carry2 - carry2 = uint32(Int32FromInt32(1000000000)>>sh) * tmp2 + carry2 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh) * tmp2 if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) i-- @@ -26731,7 +26729,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v3 = f + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26749,7 +26747,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v7 = f + 4 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__shgetc(tls, f) } @@ -26761,7 +26759,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v10 = f + 4 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26780,7 +26778,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v14 = f + 4 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26789,7 +26787,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } } for { - if !(uint32(c-int32('0')) < uint32(10) || uint32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { break } if c == int32('.') { @@ -26806,7 +26804,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 d = c - int32('0') } if dc < int64(8) { - x = x*uint32(16) + uint32(d) + x = x*uint32(16) + Uint32FromInt32(d) } else { if dc < int64(Int32FromInt32(LDBL_MANT_DIG)/Int32FromInt32(4)+Int32FromInt32(1)) { scale /= Float64FromInt32(16) @@ -26827,7 +26825,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v18 = f + 4 v17 = *(*uintptr)(unsafe.Pointer(v18)) *(*uintptr)(unsafe.Pointer(v18))++ - v16 = int32(*(*uint8)(unsafe.Pointer(v17))) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) } else { v16 = X__shgetc(tls, f) } @@ -26947,14 +26945,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -26967,7 +26965,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v10 = f + 4 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26975,7 +26973,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { } i = uint32(0) for { - if !(i < uint32(8) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 247 + uintptr(i))))) { + if !(i < uint32(8) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 247 + uintptr(i))))) { break } if i < uint32(7) { @@ -26983,7 +26981,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v14 = f + 4 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -27019,7 +27017,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { if !(i != 0) { i = uint32(0) for { - if !(i < uint32(3) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 256 + uintptr(i))))) { + if !(i < uint32(3) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 256 + uintptr(i))))) { break } if i < uint32(2) { @@ -27027,7 +27025,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v21 = f + 4 v20 = *(*uintptr)(unsafe.Pointer(v21)) *(*uintptr)(unsafe.Pointer(v21))++ - v19 = int32(*(*uint8)(unsafe.Pointer(v20))) + v19 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v20))) } else { v19 = X__shgetc(tls, f) } @@ -27044,7 +27042,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v24 = f + 4 v23 = *(*uintptr)(unsafe.Pointer(v24)) *(*uintptr)(unsafe.Pointer(v24))++ - v22 = int32(*(*uint8)(unsafe.Pointer(v23))) + v22 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) } else { v22 = X__shgetc(tls, f) } @@ -27060,12 +27058,12 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v29 = f + 4 v28 = *(*uintptr)(unsafe.Pointer(v29)) *(*uintptr)(unsafe.Pointer(v29))++ - v27 = int32(*(*uint8)(unsafe.Pointer(v28))) + v27 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) } else { v27 = X__shgetc(tls, f) } c = v27 - if uint32(c-int32('0')) < uint32(10) || uint32(c-int32('A')) < uint32(26) || uint32(c-int32('a')) < uint32(26) || c == int32('_') { + if Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c-int32('A')) < uint32(26) || Uint32FromInt32(c-int32('a')) < uint32(26) || c == int32('_') { goto _26 } if c == int32(')') { @@ -27110,7 +27108,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v36 = f + 4 v35 = *(*uintptr)(unsafe.Pointer(v36)) *(*uintptr)(unsafe.Pointer(v36))++ - v34 = int32(*(*uint8)(unsafe.Pointer(v35))) + v34 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v35))) } else { v34 = X__shgetc(tls, f) } @@ -27130,55 +27128,55 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { // // /* Lookup table for digit values. -1==255>=36 -> invalid */ var _table6 = [257]uint8{ - 0: uint8(-Int32FromInt32(1)), - 1: uint8(-Int32FromInt32(1)), - 2: uint8(-Int32FromInt32(1)), - 3: uint8(-Int32FromInt32(1)), - 4: uint8(-Int32FromInt32(1)), - 5: uint8(-Int32FromInt32(1)), - 6: uint8(-Int32FromInt32(1)), - 7: uint8(-Int32FromInt32(1)), - 8: uint8(-Int32FromInt32(1)), - 9: uint8(-Int32FromInt32(1)), - 10: uint8(-Int32FromInt32(1)), - 11: uint8(-Int32FromInt32(1)), - 12: uint8(-Int32FromInt32(1)), - 13: uint8(-Int32FromInt32(1)), - 14: uint8(-Int32FromInt32(1)), - 15: uint8(-Int32FromInt32(1)), - 16: uint8(-Int32FromInt32(1)), - 17: uint8(-Int32FromInt32(1)), - 18: uint8(-Int32FromInt32(1)), - 19: uint8(-Int32FromInt32(1)), - 20: uint8(-Int32FromInt32(1)), - 21: uint8(-Int32FromInt32(1)), - 22: uint8(-Int32FromInt32(1)), - 23: uint8(-Int32FromInt32(1)), - 24: uint8(-Int32FromInt32(1)), - 25: uint8(-Int32FromInt32(1)), - 26: uint8(-Int32FromInt32(1)), - 27: uint8(-Int32FromInt32(1)), - 28: uint8(-Int32FromInt32(1)), - 29: uint8(-Int32FromInt32(1)), - 30: uint8(-Int32FromInt32(1)), - 31: uint8(-Int32FromInt32(1)), - 32: uint8(-Int32FromInt32(1)), - 33: uint8(-Int32FromInt32(1)), - 34: uint8(-Int32FromInt32(1)), - 35: uint8(-Int32FromInt32(1)), - 36: uint8(-Int32FromInt32(1)), - 37: uint8(-Int32FromInt32(1)), - 38: uint8(-Int32FromInt32(1)), - 39: uint8(-Int32FromInt32(1)), - 40: uint8(-Int32FromInt32(1)), - 41: uint8(-Int32FromInt32(1)), - 42: uint8(-Int32FromInt32(1)), - 43: uint8(-Int32FromInt32(1)), - 44: uint8(-Int32FromInt32(1)), - 45: uint8(-Int32FromInt32(1)), - 46: uint8(-Int32FromInt32(1)), - 47: uint8(-Int32FromInt32(1)), - 48: uint8(-Int32FromInt32(1)), + 0: Uint8FromInt32(-Int32FromInt32(1)), + 1: Uint8FromInt32(-Int32FromInt32(1)), + 2: Uint8FromInt32(-Int32FromInt32(1)), + 3: Uint8FromInt32(-Int32FromInt32(1)), + 4: Uint8FromInt32(-Int32FromInt32(1)), + 5: Uint8FromInt32(-Int32FromInt32(1)), + 6: Uint8FromInt32(-Int32FromInt32(1)), + 7: Uint8FromInt32(-Int32FromInt32(1)), + 8: Uint8FromInt32(-Int32FromInt32(1)), + 9: Uint8FromInt32(-Int32FromInt32(1)), + 10: Uint8FromInt32(-Int32FromInt32(1)), + 11: Uint8FromInt32(-Int32FromInt32(1)), + 12: Uint8FromInt32(-Int32FromInt32(1)), + 13: Uint8FromInt32(-Int32FromInt32(1)), + 14: Uint8FromInt32(-Int32FromInt32(1)), + 15: Uint8FromInt32(-Int32FromInt32(1)), + 16: Uint8FromInt32(-Int32FromInt32(1)), + 17: Uint8FromInt32(-Int32FromInt32(1)), + 18: Uint8FromInt32(-Int32FromInt32(1)), + 19: Uint8FromInt32(-Int32FromInt32(1)), + 20: Uint8FromInt32(-Int32FromInt32(1)), + 21: Uint8FromInt32(-Int32FromInt32(1)), + 22: Uint8FromInt32(-Int32FromInt32(1)), + 23: Uint8FromInt32(-Int32FromInt32(1)), + 24: Uint8FromInt32(-Int32FromInt32(1)), + 25: Uint8FromInt32(-Int32FromInt32(1)), + 26: Uint8FromInt32(-Int32FromInt32(1)), + 27: Uint8FromInt32(-Int32FromInt32(1)), + 28: Uint8FromInt32(-Int32FromInt32(1)), + 29: Uint8FromInt32(-Int32FromInt32(1)), + 30: Uint8FromInt32(-Int32FromInt32(1)), + 31: Uint8FromInt32(-Int32FromInt32(1)), + 32: Uint8FromInt32(-Int32FromInt32(1)), + 33: Uint8FromInt32(-Int32FromInt32(1)), + 34: Uint8FromInt32(-Int32FromInt32(1)), + 35: Uint8FromInt32(-Int32FromInt32(1)), + 36: Uint8FromInt32(-Int32FromInt32(1)), + 37: Uint8FromInt32(-Int32FromInt32(1)), + 38: Uint8FromInt32(-Int32FromInt32(1)), + 39: Uint8FromInt32(-Int32FromInt32(1)), + 40: Uint8FromInt32(-Int32FromInt32(1)), + 41: Uint8FromInt32(-Int32FromInt32(1)), + 42: Uint8FromInt32(-Int32FromInt32(1)), + 43: Uint8FromInt32(-Int32FromInt32(1)), + 44: Uint8FromInt32(-Int32FromInt32(1)), + 45: Uint8FromInt32(-Int32FromInt32(1)), + 46: Uint8FromInt32(-Int32FromInt32(1)), + 47: Uint8FromInt32(-Int32FromInt32(1)), + 48: Uint8FromInt32(-Int32FromInt32(1)), 50: uint8(1), 51: uint8(2), 52: uint8(3), @@ -27188,13 +27186,13 @@ var _table6 = [257]uint8{ 56: uint8(7), 57: uint8(8), 58: uint8(9), - 59: uint8(-Int32FromInt32(1)), - 60: uint8(-Int32FromInt32(1)), - 61: uint8(-Int32FromInt32(1)), - 62: uint8(-Int32FromInt32(1)), - 63: uint8(-Int32FromInt32(1)), - 64: uint8(-Int32FromInt32(1)), - 65: uint8(-Int32FromInt32(1)), + 59: Uint8FromInt32(-Int32FromInt32(1)), + 60: Uint8FromInt32(-Int32FromInt32(1)), + 61: Uint8FromInt32(-Int32FromInt32(1)), + 62: Uint8FromInt32(-Int32FromInt32(1)), + 63: Uint8FromInt32(-Int32FromInt32(1)), + 64: Uint8FromInt32(-Int32FromInt32(1)), + 65: Uint8FromInt32(-Int32FromInt32(1)), 66: uint8(10), 67: uint8(11), 68: uint8(12), @@ -27221,12 +27219,12 @@ var _table6 = [257]uint8{ 89: uint8(33), 90: uint8(34), 91: uint8(35), - 92: uint8(-Int32FromInt32(1)), - 93: uint8(-Int32FromInt32(1)), - 94: uint8(-Int32FromInt32(1)), - 95: uint8(-Int32FromInt32(1)), - 96: uint8(-Int32FromInt32(1)), - 97: uint8(-Int32FromInt32(1)), + 92: Uint8FromInt32(-Int32FromInt32(1)), + 93: Uint8FromInt32(-Int32FromInt32(1)), + 94: Uint8FromInt32(-Int32FromInt32(1)), + 95: Uint8FromInt32(-Int32FromInt32(1)), + 96: Uint8FromInt32(-Int32FromInt32(1)), + 97: Uint8FromInt32(-Int32FromInt32(1)), 98: uint8(10), 99: uint8(11), 100: uint8(12), @@ -27253,139 +27251,139 @@ var _table6 = [257]uint8{ 121: uint8(33), 122: uint8(34), 123: uint8(35), - 124: uint8(-Int32FromInt32(1)), - 125: uint8(-Int32FromInt32(1)), - 126: uint8(-Int32FromInt32(1)), - 127: uint8(-Int32FromInt32(1)), - 128: uint8(-Int32FromInt32(1)), - 129: uint8(-Int32FromInt32(1)), - 130: uint8(-Int32FromInt32(1)), - 131: uint8(-Int32FromInt32(1)), - 132: uint8(-Int32FromInt32(1)), - 133: uint8(-Int32FromInt32(1)), - 134: uint8(-Int32FromInt32(1)), - 135: uint8(-Int32FromInt32(1)), - 136: uint8(-Int32FromInt32(1)), - 137: uint8(-Int32FromInt32(1)), - 138: uint8(-Int32FromInt32(1)), - 139: uint8(-Int32FromInt32(1)), - 140: uint8(-Int32FromInt32(1)), - 141: uint8(-Int32FromInt32(1)), - 142: uint8(-Int32FromInt32(1)), - 143: uint8(-Int32FromInt32(1)), - 144: uint8(-Int32FromInt32(1)), - 145: uint8(-Int32FromInt32(1)), - 146: uint8(-Int32FromInt32(1)), - 147: uint8(-Int32FromInt32(1)), - 148: uint8(-Int32FromInt32(1)), - 149: uint8(-Int32FromInt32(1)), - 150: uint8(-Int32FromInt32(1)), - 151: uint8(-Int32FromInt32(1)), - 152: uint8(-Int32FromInt32(1)), - 153: uint8(-Int32FromInt32(1)), - 154: uint8(-Int32FromInt32(1)), - 155: uint8(-Int32FromInt32(1)), - 156: uint8(-Int32FromInt32(1)), - 157: uint8(-Int32FromInt32(1)), - 158: uint8(-Int32FromInt32(1)), - 159: uint8(-Int32FromInt32(1)), - 160: uint8(-Int32FromInt32(1)), - 161: uint8(-Int32FromInt32(1)), - 162: uint8(-Int32FromInt32(1)), - 163: uint8(-Int32FromInt32(1)), - 164: uint8(-Int32FromInt32(1)), - 165: uint8(-Int32FromInt32(1)), - 166: uint8(-Int32FromInt32(1)), - 167: uint8(-Int32FromInt32(1)), - 168: uint8(-Int32FromInt32(1)), - 169: uint8(-Int32FromInt32(1)), - 170: uint8(-Int32FromInt32(1)), - 171: uint8(-Int32FromInt32(1)), - 172: uint8(-Int32FromInt32(1)), - 173: uint8(-Int32FromInt32(1)), - 174: uint8(-Int32FromInt32(1)), - 175: uint8(-Int32FromInt32(1)), - 176: uint8(-Int32FromInt32(1)), - 177: uint8(-Int32FromInt32(1)), - 178: uint8(-Int32FromInt32(1)), - 179: uint8(-Int32FromInt32(1)), - 180: uint8(-Int32FromInt32(1)), - 181: uint8(-Int32FromInt32(1)), - 182: uint8(-Int32FromInt32(1)), - 183: uint8(-Int32FromInt32(1)), - 184: uint8(-Int32FromInt32(1)), - 185: uint8(-Int32FromInt32(1)), - 186: uint8(-Int32FromInt32(1)), - 187: uint8(-Int32FromInt32(1)), - 188: uint8(-Int32FromInt32(1)), - 189: uint8(-Int32FromInt32(1)), - 190: uint8(-Int32FromInt32(1)), - 191: uint8(-Int32FromInt32(1)), - 192: uint8(-Int32FromInt32(1)), - 193: uint8(-Int32FromInt32(1)), - 194: uint8(-Int32FromInt32(1)), - 195: uint8(-Int32FromInt32(1)), - 196: uint8(-Int32FromInt32(1)), - 197: uint8(-Int32FromInt32(1)), - 198: uint8(-Int32FromInt32(1)), - 199: uint8(-Int32FromInt32(1)), - 200: uint8(-Int32FromInt32(1)), - 201: uint8(-Int32FromInt32(1)), - 202: uint8(-Int32FromInt32(1)), - 203: uint8(-Int32FromInt32(1)), - 204: uint8(-Int32FromInt32(1)), - 205: uint8(-Int32FromInt32(1)), - 206: uint8(-Int32FromInt32(1)), - 207: uint8(-Int32FromInt32(1)), - 208: uint8(-Int32FromInt32(1)), - 209: uint8(-Int32FromInt32(1)), - 210: uint8(-Int32FromInt32(1)), - 211: uint8(-Int32FromInt32(1)), - 212: uint8(-Int32FromInt32(1)), - 213: uint8(-Int32FromInt32(1)), - 214: uint8(-Int32FromInt32(1)), - 215: uint8(-Int32FromInt32(1)), - 216: uint8(-Int32FromInt32(1)), - 217: uint8(-Int32FromInt32(1)), - 218: uint8(-Int32FromInt32(1)), - 219: uint8(-Int32FromInt32(1)), - 220: uint8(-Int32FromInt32(1)), - 221: uint8(-Int32FromInt32(1)), - 222: uint8(-Int32FromInt32(1)), - 223: uint8(-Int32FromInt32(1)), - 224: uint8(-Int32FromInt32(1)), - 225: uint8(-Int32FromInt32(1)), - 226: uint8(-Int32FromInt32(1)), - 227: uint8(-Int32FromInt32(1)), - 228: uint8(-Int32FromInt32(1)), - 229: uint8(-Int32FromInt32(1)), - 230: uint8(-Int32FromInt32(1)), - 231: uint8(-Int32FromInt32(1)), - 232: uint8(-Int32FromInt32(1)), - 233: uint8(-Int32FromInt32(1)), - 234: uint8(-Int32FromInt32(1)), - 235: uint8(-Int32FromInt32(1)), - 236: uint8(-Int32FromInt32(1)), - 237: uint8(-Int32FromInt32(1)), - 238: uint8(-Int32FromInt32(1)), - 239: uint8(-Int32FromInt32(1)), - 240: uint8(-Int32FromInt32(1)), - 241: uint8(-Int32FromInt32(1)), - 242: uint8(-Int32FromInt32(1)), - 243: uint8(-Int32FromInt32(1)), - 244: uint8(-Int32FromInt32(1)), - 245: uint8(-Int32FromInt32(1)), - 246: uint8(-Int32FromInt32(1)), - 247: uint8(-Int32FromInt32(1)), - 248: uint8(-Int32FromInt32(1)), - 249: uint8(-Int32FromInt32(1)), - 250: uint8(-Int32FromInt32(1)), - 251: uint8(-Int32FromInt32(1)), - 252: uint8(-Int32FromInt32(1)), - 253: uint8(-Int32FromInt32(1)), - 254: uint8(-Int32FromInt32(1)), - 255: uint8(-Int32FromInt32(1)), - 256: uint8(-Int32FromInt32(1)), + 124: Uint8FromInt32(-Int32FromInt32(1)), + 125: Uint8FromInt32(-Int32FromInt32(1)), + 126: Uint8FromInt32(-Int32FromInt32(1)), + 127: Uint8FromInt32(-Int32FromInt32(1)), + 128: Uint8FromInt32(-Int32FromInt32(1)), + 129: Uint8FromInt32(-Int32FromInt32(1)), + 130: Uint8FromInt32(-Int32FromInt32(1)), + 131: Uint8FromInt32(-Int32FromInt32(1)), + 132: Uint8FromInt32(-Int32FromInt32(1)), + 133: Uint8FromInt32(-Int32FromInt32(1)), + 134: Uint8FromInt32(-Int32FromInt32(1)), + 135: Uint8FromInt32(-Int32FromInt32(1)), + 136: Uint8FromInt32(-Int32FromInt32(1)), + 137: Uint8FromInt32(-Int32FromInt32(1)), + 138: Uint8FromInt32(-Int32FromInt32(1)), + 139: Uint8FromInt32(-Int32FromInt32(1)), + 140: Uint8FromInt32(-Int32FromInt32(1)), + 141: Uint8FromInt32(-Int32FromInt32(1)), + 142: Uint8FromInt32(-Int32FromInt32(1)), + 143: Uint8FromInt32(-Int32FromInt32(1)), + 144: Uint8FromInt32(-Int32FromInt32(1)), + 145: Uint8FromInt32(-Int32FromInt32(1)), + 146: Uint8FromInt32(-Int32FromInt32(1)), + 147: Uint8FromInt32(-Int32FromInt32(1)), + 148: Uint8FromInt32(-Int32FromInt32(1)), + 149: Uint8FromInt32(-Int32FromInt32(1)), + 150: Uint8FromInt32(-Int32FromInt32(1)), + 151: Uint8FromInt32(-Int32FromInt32(1)), + 152: Uint8FromInt32(-Int32FromInt32(1)), + 153: Uint8FromInt32(-Int32FromInt32(1)), + 154: Uint8FromInt32(-Int32FromInt32(1)), + 155: Uint8FromInt32(-Int32FromInt32(1)), + 156: Uint8FromInt32(-Int32FromInt32(1)), + 157: Uint8FromInt32(-Int32FromInt32(1)), + 158: Uint8FromInt32(-Int32FromInt32(1)), + 159: Uint8FromInt32(-Int32FromInt32(1)), + 160: Uint8FromInt32(-Int32FromInt32(1)), + 161: Uint8FromInt32(-Int32FromInt32(1)), + 162: Uint8FromInt32(-Int32FromInt32(1)), + 163: Uint8FromInt32(-Int32FromInt32(1)), + 164: Uint8FromInt32(-Int32FromInt32(1)), + 165: Uint8FromInt32(-Int32FromInt32(1)), + 166: Uint8FromInt32(-Int32FromInt32(1)), + 167: Uint8FromInt32(-Int32FromInt32(1)), + 168: Uint8FromInt32(-Int32FromInt32(1)), + 169: Uint8FromInt32(-Int32FromInt32(1)), + 170: Uint8FromInt32(-Int32FromInt32(1)), + 171: Uint8FromInt32(-Int32FromInt32(1)), + 172: Uint8FromInt32(-Int32FromInt32(1)), + 173: Uint8FromInt32(-Int32FromInt32(1)), + 174: Uint8FromInt32(-Int32FromInt32(1)), + 175: Uint8FromInt32(-Int32FromInt32(1)), + 176: Uint8FromInt32(-Int32FromInt32(1)), + 177: Uint8FromInt32(-Int32FromInt32(1)), + 178: Uint8FromInt32(-Int32FromInt32(1)), + 179: Uint8FromInt32(-Int32FromInt32(1)), + 180: Uint8FromInt32(-Int32FromInt32(1)), + 181: Uint8FromInt32(-Int32FromInt32(1)), + 182: Uint8FromInt32(-Int32FromInt32(1)), + 183: Uint8FromInt32(-Int32FromInt32(1)), + 184: Uint8FromInt32(-Int32FromInt32(1)), + 185: Uint8FromInt32(-Int32FromInt32(1)), + 186: Uint8FromInt32(-Int32FromInt32(1)), + 187: Uint8FromInt32(-Int32FromInt32(1)), + 188: Uint8FromInt32(-Int32FromInt32(1)), + 189: Uint8FromInt32(-Int32FromInt32(1)), + 190: Uint8FromInt32(-Int32FromInt32(1)), + 191: Uint8FromInt32(-Int32FromInt32(1)), + 192: Uint8FromInt32(-Int32FromInt32(1)), + 193: Uint8FromInt32(-Int32FromInt32(1)), + 194: Uint8FromInt32(-Int32FromInt32(1)), + 195: Uint8FromInt32(-Int32FromInt32(1)), + 196: Uint8FromInt32(-Int32FromInt32(1)), + 197: Uint8FromInt32(-Int32FromInt32(1)), + 198: Uint8FromInt32(-Int32FromInt32(1)), + 199: Uint8FromInt32(-Int32FromInt32(1)), + 200: Uint8FromInt32(-Int32FromInt32(1)), + 201: Uint8FromInt32(-Int32FromInt32(1)), + 202: Uint8FromInt32(-Int32FromInt32(1)), + 203: Uint8FromInt32(-Int32FromInt32(1)), + 204: Uint8FromInt32(-Int32FromInt32(1)), + 205: Uint8FromInt32(-Int32FromInt32(1)), + 206: Uint8FromInt32(-Int32FromInt32(1)), + 207: Uint8FromInt32(-Int32FromInt32(1)), + 208: Uint8FromInt32(-Int32FromInt32(1)), + 209: Uint8FromInt32(-Int32FromInt32(1)), + 210: Uint8FromInt32(-Int32FromInt32(1)), + 211: Uint8FromInt32(-Int32FromInt32(1)), + 212: Uint8FromInt32(-Int32FromInt32(1)), + 213: Uint8FromInt32(-Int32FromInt32(1)), + 214: Uint8FromInt32(-Int32FromInt32(1)), + 215: Uint8FromInt32(-Int32FromInt32(1)), + 216: Uint8FromInt32(-Int32FromInt32(1)), + 217: Uint8FromInt32(-Int32FromInt32(1)), + 218: Uint8FromInt32(-Int32FromInt32(1)), + 219: Uint8FromInt32(-Int32FromInt32(1)), + 220: Uint8FromInt32(-Int32FromInt32(1)), + 221: Uint8FromInt32(-Int32FromInt32(1)), + 222: Uint8FromInt32(-Int32FromInt32(1)), + 223: Uint8FromInt32(-Int32FromInt32(1)), + 224: Uint8FromInt32(-Int32FromInt32(1)), + 225: Uint8FromInt32(-Int32FromInt32(1)), + 226: Uint8FromInt32(-Int32FromInt32(1)), + 227: Uint8FromInt32(-Int32FromInt32(1)), + 228: Uint8FromInt32(-Int32FromInt32(1)), + 229: Uint8FromInt32(-Int32FromInt32(1)), + 230: Uint8FromInt32(-Int32FromInt32(1)), + 231: Uint8FromInt32(-Int32FromInt32(1)), + 232: Uint8FromInt32(-Int32FromInt32(1)), + 233: Uint8FromInt32(-Int32FromInt32(1)), + 234: Uint8FromInt32(-Int32FromInt32(1)), + 235: Uint8FromInt32(-Int32FromInt32(1)), + 236: Uint8FromInt32(-Int32FromInt32(1)), + 237: Uint8FromInt32(-Int32FromInt32(1)), + 238: Uint8FromInt32(-Int32FromInt32(1)), + 239: Uint8FromInt32(-Int32FromInt32(1)), + 240: Uint8FromInt32(-Int32FromInt32(1)), + 241: Uint8FromInt32(-Int32FromInt32(1)), + 242: Uint8FromInt32(-Int32FromInt32(1)), + 243: Uint8FromInt32(-Int32FromInt32(1)), + 244: Uint8FromInt32(-Int32FromInt32(1)), + 245: Uint8FromInt32(-Int32FromInt32(1)), + 246: Uint8FromInt32(-Int32FromInt32(1)), + 247: Uint8FromInt32(-Int32FromInt32(1)), + 248: Uint8FromInt32(-Int32FromInt32(1)), + 249: Uint8FromInt32(-Int32FromInt32(1)), + 250: Uint8FromInt32(-Int32FromInt32(1)), + 251: Uint8FromInt32(-Int32FromInt32(1)), + 252: Uint8FromInt32(-Int32FromInt32(1)), + 253: Uint8FromInt32(-Int32FromInt32(1)), + 254: Uint8FromInt32(-Int32FromInt32(1)), + 255: Uint8FromInt32(-Int32FromInt32(1)), + 256: Uint8FromInt32(-Int32FromInt32(1)), } func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint64) { @@ -27409,14 +27407,14 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -27429,7 +27427,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v10 = f + 4 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -27440,7 +27438,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v13 = f + 4 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ - v11 = int32(*(*uint8)(unsafe.Pointer(v12))) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) } else { v11 = X__shgetc(tls, f) } @@ -27450,12 +27448,12 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v16 = f + 4 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 - if int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -27490,10 +27488,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint if base == uint32(10) { x = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { break } - x = x*uint32(10) + uint32(c-Int32FromUint8('0')) + x = x*uint32(10) + Uint32FromInt32(c-Int32FromUint8('0')) goto _20 _20: ; @@ -27501,7 +27499,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v23 = f + 4 v22 = *(*uintptr)(unsafe.Pointer(v23)) *(*uintptr)(unsafe.Pointer(v23))++ - v21 = int32(*(*uint8)(unsafe.Pointer(v22))) + v21 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v22))) } else { v21 = X__shgetc(tls, f) } @@ -27509,10 +27507,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } y = uint64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(c-Int32FromUint8('0'))) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-Uint64FromInt32(c-Int32FromUint8('0'))) { break } - y = y*uint64(10) + uint64(c-Int32FromUint8('0')) + y = y*uint64(10) + Uint64FromInt32(c-Int32FromUint8('0')) goto _24 _24: ; @@ -27520,18 +27518,18 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v27 = f + 4 v26 = *(*uintptr)(unsafe.Pointer(v27)) *(*uintptr)(unsafe.Pointer(v27))++ - v25 = int32(*(*uint8)(unsafe.Pointer(v26))) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v26))) } else { v25 = X__shgetc(tls, f) } c = v25 } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { goto done } } else { if !(base&(base-Uint32FromInt32(1)) != 0) { - bs = int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 260 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) + bs = Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 260 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) x = uint32(0) for { if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(32)) { @@ -27545,7 +27543,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v31 = f + 4 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } @@ -27564,7 +27562,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v35 = f + 4 v34 = *(*uintptr)(unsafe.Pointer(v35)) *(*uintptr)(unsafe.Pointer(v35))++ - v33 = int32(*(*uint8)(unsafe.Pointer(v34))) + v33 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v34))) } else { v33 = X__shgetc(tls, f) } @@ -27584,7 +27582,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v39 = f + 4 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ - v37 = int32(*(*uint8)(unsafe.Pointer(v38))) + v37 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v38))) } else { v37 = X__shgetc(tls, f) } @@ -27603,7 +27601,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v43 = f + 4 v42 = *(*uintptr)(unsafe.Pointer(v43)) *(*uintptr)(unsafe.Pointer(v43))++ - v41 = int32(*(*uint8)(unsafe.Pointer(v42))) + v41 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v42))) } else { v41 = X__shgetc(tls, f) } @@ -27623,7 +27621,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v47 = f + 4 v46 = *(*uintptr)(unsafe.Pointer(v47)) *(*uintptr)(unsafe.Pointer(v47))++ - v45 = int32(*(*uint8)(unsafe.Pointer(v46))) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v46))) } else { v45 = X__shgetc(tls, f) } @@ -27652,7 +27650,7 @@ done: } } } - return y ^ uint64(neg) - uint64(neg) + return y ^ Uint64FromInt32(neg) - Uint64FromInt32(neg) } func X__procfdname(tls *TLS, buf uintptr, fd uint32) { @@ -27752,7 +27750,7 @@ func X__shgetc(tls *TLS, f uintptr) (r int32) { } (*TFILE)(unsafe.Pointer(f)).Fshcnt = int64(int32((*TFILE)(unsafe.Pointer(f)).Fbuf)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)) + cnt if (*TFILE)(unsafe.Pointer(f)).Frpos <= (*TFILE)(unsafe.Pointer(f)).Fbuf { - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = Uint8FromInt32(c) } return c } @@ -27763,10 +27761,10 @@ func X__syscall_ret(tls *TLS, r uint32) (r1 int32) { defer func() { trc("-> %v", r1) }() } if r > -Uint32FromUint32(4096) { - *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(-r) + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = Int32FromUint32(-r) return -int32(1) } - return int32(r) + return Int32FromUint32(r) } type TElf_Symndx = uint32 @@ -27840,7 +27838,7 @@ func Xftok(tls *TLS, path uintptr, id int32) (r Tkey_t) { if Xstat(tls, path, bp) < 0 { return -int32(1) } - return int32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ino&Uint64FromInt32(0xffff) | (*(*Tstat)(unsafe.Pointer(bp))).Fst_dev&Uint64FromInt32(0xff)<= 0 && cmd&(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) != 0 { buf = orig *(*Tmsqid_ds)(unsafe.Pointer(buf)) = *(*Tmsqid_ds)(unsafe.Pointer(bp)) - (*Tmsqid_ds)(unsafe.Pointer(buf)).Fmsg_stime = int64((*Tmsqid_ds)(unsafe.Pointer(buf)).F__msg_stime_lo) | (0+int64((*Tmsqid_ds)(unsafe.Pointer(buf)).F__msg_stime_hi))< %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_msgget), k, flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_msgget), k, flag))) } func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int32, flag int32) (r Tssize_t) { @@ -27939,7 +27937,7 @@ func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int32, flag int32 trc("tls=%v q=%v m=%v len1=%v type1=%v flag=%v, (%v:)", tls, q, m, len1, type1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_msgrcv), q, int32(m), int32(len1), type1, flag, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_msgrcv), q, int32(m), Int32FromUint32(len1), type1, flag, 0))) } func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { @@ -27947,7 +27945,7 @@ func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { trc("tls=%v q=%v m=%v len1=%v flag=%v, (%v:)", tls, q, m, len1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_msgsnd), q, int32(m), int32(len1), flag, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_msgsnd), q, int32(m), Int32FromUint32(len1), flag, 0, 0))) } const GETALL = 13 @@ -28049,10 +28047,10 @@ func Xsemctl(tls *TLS, id int32, num int32, cmd int32, va uintptr) (r1 int32) { if r >= 0 && cmd&(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) != 0 { *(*uintptr)(unsafe.Pointer(bp)) = orig *(*Tsemid_ds)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) = *(*Tsemid_ds)(unsafe.Pointer(bp + 8)) - (*Tsemid_ds)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fsem_otime = int64((*Tsemid_ds)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).F__sem_otime_lo) | (0+int64((*Tsemid_ds)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).F__sem_otime_hi))< int32(USHRT_MAX) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_semget), key, n, fl))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_semget), key, n, fl))) } func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { @@ -28075,7 +28073,7 @@ func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { trc("tls=%v id=%v buf=%v n=%v, (%v:)", tls, id, buf, n, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_semop), id, int32(buf), int32(n)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_semop), id, int32(buf), Int32FromUint32(n)))) } const NO_TIME32 = 0 @@ -28135,7 +28133,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r1 int } ns = v2 r = -int32(ENOSYS) - if Bool(NO_TIME32 != 0) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(NO_TIME32 != 0) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if ts != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -28145,19 +28143,19 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r1 int } else { v3 = uintptr(0) } - r = X__syscall4(tls, int32(SYS_semtimedop_time64), id, int32(buf), int32(n), int32(v3)) + r = X__syscall4(tls, int32(SYS_semtimedop_time64), id, int32(buf), Int32FromUint32(n), int32(v3)) } if Bool(NO_TIME32 != 0) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } if ts != 0 { - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v5 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v5 = Uint64FromInt64(s) } else { - v5 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v5 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ - 0: int32(v5), + 0: Int32FromUint64(v5), 1: ns, } v4 = bp + 16 @@ -28165,7 +28163,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r1 int v4 = uintptr(0) } ts = v4 - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_semtimedop), id, int32(buf), int32(n), int32(ts)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_semtimedop), id, int32(buf), Int32FromUint32(n), int32(ts)))) } const SHMLBA = 4096 @@ -28245,7 +28243,7 @@ func Xshmat(tls *TLS, id int32, addr uintptr, flag int32) (r uintptr) { trc("tls=%v id=%v addr=%v flag=%v, (%v:)", tls, id, addr, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return uintptr(X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_shmat), id, int32(addr), flag)))) + return uintptr(X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_shmat), id, int32(addr), flag)))) } func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { @@ -28268,11 +28266,11 @@ func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { if r >= 0 && cmd&(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) != 0 { buf = orig *(*Tshmid_ds)(unsafe.Pointer(buf)) = *(*Tshmid_ds)(unsafe.Pointer(bp)) - (*Tshmid_ds)(unsafe.Pointer(buf)).Fshm_atime = int64((*Tshmid_ds)(unsafe.Pointer(buf)).F__shm_atime_lo) | (0+int64((*Tshmid_ds)(unsafe.Pointer(buf)).F__shm_atime_hi))< %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_shmdt), int32(addr)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_shmdt), int32(addr)))) } func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { @@ -28288,10 +28286,10 @@ func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { trc("tls=%v key=%v size=%v flag=%v, (%v:)", tls, key, size, flag, origin(2)) defer func() { trc("-> %v", r) }() } - if size > uint32(Int32FromInt32(INT32_MAX)) { + if size > Uint32FromInt32(Int32FromInt32(INT32_MAX)) { size = Uint32FromUint32(0xffffffff) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_shmget), key, int32(size), flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_shmget), key, Int32FromUint32(size), flag))) } type Tpasswd = struct { @@ -28558,7 +28556,7 @@ func Xgetdtablesize(tls *TLS) (r int32) { } else { v1 = uint64(INT_MAX) } - return int32(v1) + return Int32FromUint64(v1) } func Xgetloadavg(tls *TLS, a uintptr, n int32) (r int32) { @@ -28602,7 +28600,7 @@ func Xgetpagesize(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__libc.Fpage_size) + return Int32FromUint32(X__libc.Fpage_size) } const B0 = 0 @@ -28789,16 +28787,16 @@ func Xgetpass(tls *TLS, prompt uintptr) (r uintptr) { } Xtcgetattr(tls, fd, bp+60) *(*Ttermios)(unsafe.Pointer(bp)) = *(*Ttermios)(unsafe.Pointer(bp + 60)) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag |= uint32(ICANON) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= uint32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= Uint32FromInt32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag |= uint32(ICRNL) Xtcsetattr(tls, fd, int32(TCSAFLUSH), bp+60) Xtcdrain(tls, fd) Xdprintf(tls, fd, __ccgo_ts+15, VaList(bp+128, prompt)) - l = Xread(tls, fd, uintptr(unsafe.Pointer(&_password)), uint32(128)) + l = _read(tls, fd, uintptr(unsafe.Pointer(&_password)), uint32(128)) if l >= 0 { - if l > 0 && int32(_password[l-int32(1)]) == int32('\n') || uint32(l) == uint32(128) { + if l > 0 && Int32FromUint8(_password[l-int32(1)]) == int32('\n') || Uint32FromInt32(l) == uint32(128) { l-- } _password[l] = uint8(0) @@ -28861,7 +28859,7 @@ func Xgetusershell(tls *TLS) (r uintptr) { if l <= 0 { return uintptr(0) } - if int32(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int32(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int32(1))))) == int32('\n') { *(*uint8)(unsafe.Pointer(_line + uintptr(l-int32(1)))) = uint8(0) } return _line @@ -29038,12 +29036,12 @@ func Xulimit(tls *TLS, cmd int32, va uintptr) (r int32) { ap = va val = VaInt32(&ap) _ = ap - (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * uint64(val) + (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * Uint64FromInt32(val) if Xsetrlimit(tls, int32(RLIMIT_FSIZE), bp) != 0 { return -int32(1) } } - return int32((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) + return Int32FromUint64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) } const BOOT_TIME = 2 @@ -29318,7 +29316,7 @@ func Xbrk(tls *TLS, end uintptr) (r int32) { trc("tls=%v end=%v, (%v:)", tls, end, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(-Int32FromInt32(ENOMEM))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(ENOMEM))) } func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29326,7 +29324,7 @@ func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_capset), int32(a), int32(b)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_capset), int32(a), int32(b)))) } func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29334,7 +29332,7 @@ func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_capget), int32(a), int32(b)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_capget), int32(a), int32(b)))) } func Xchroot(tls *TLS, path uintptr) (r int32) { @@ -29342,7 +29340,7 @@ func Xchroot(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_chroot), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_chroot), int32(path)))) } type Tktimex64 = struct { @@ -29459,10 +29457,10 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex64)(unsafe.Pointer(bp))).Ftai } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if (*Ttimex)(unsafe.Pointer(utx)).Fmodes&uint32(ADJ_SETOFFSET) != 0 && !!((uint64((*Ttimex)(unsafe.Pointer(utx)).Ftime.Ftv_sec)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if (*Ttimex)(unsafe.Pointer(utx)).Fmodes&uint32(ADJ_SETOFFSET) != 0 && !!((Uint64FromInt64((*Ttimex)(unsafe.Pointer(utx)).Ftime.Ftv_sec)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } if uint32(8) > uint32(4) { *(*Tktimex)(unsafe.Pointer(bp + 208)) = Tktimex{ @@ -29516,12 +29514,12 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Fstbcnt = (*(*Tktimex)(unsafe.Pointer(bp + 208))).Fstbcnt (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex)(unsafe.Pointer(bp + 208))).Ftai } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } if clock_id == CLOCK_REALTIME { - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_adjtimex), int32(utx)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_adjtimex), int32(utx)))) } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_clock_adjtime), clock_id, int32(utx)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_clock_adjtime), clock_id, int32(utx)))) } func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -29529,7 +29527,7 @@ func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_o trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall6(tls, int32(SYS_copy_file_range), fd_in, int32(off_in), fd_out, int32(off_out), int32(len1), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, int32(SYS_copy_file_range), fd_in, int32(off_in), fd_out, int32(off_out), Int32FromUint32(len1), Int32FromUint32(flags)))) } const EPOLLERR = 8 @@ -29586,7 +29584,7 @@ func Xepoll_create(tls *TLS, size int32) (r int32) { defer func() { trc("-> %v", r) }() } if size <= 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } return Xepoll_create1(tls, 0) } @@ -29602,7 +29600,7 @@ func Xepoll_create1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = X__syscall1(tls, int32(SYS_epoll_create), Int32FromInt32(1)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { @@ -29610,7 +29608,7 @@ func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { trc("tls=%v fd=%v op=%v fd2=%v ev=%v, (%v:)", tls, fd, op, fd2, ev, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_epoll_ctl), fd, op, fd2, int32(ev)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_epoll_ctl), fd, op, fd2, int32(ev)))) } func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uintptr) (r1 int32) { @@ -29624,7 +29622,7 @@ func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uint if r == -int32(ENOSYS) && !(sigs != 0) { r = ___syscall_cp(tls, int32(SYS_epoll_wait), fd, int32(ev), cnt, to, 0, 0) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xepoll_wait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32) (r int32) { @@ -29648,11 +29646,11 @@ func Xeventfd(tls *TLS, count uint32, flags int32) (r1 int32) { } var r int32 _ = r - r = X__syscall2(tls, int32(SYS_eventfd2), int32(count), flags) + r = X__syscall2(tls, int32(SYS_eventfd2), Int32FromUint32(count), flags) if r == -int32(ENOSYS) && !(flags != 0) { - r = X__syscall1(tls, int32(SYS_eventfd), int32(count)) + r = X__syscall1(tls, int32(SYS_eventfd), Int32FromUint32(count)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { @@ -29662,7 +29660,7 @@ func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { } var v1 int32 _ = v1 - if uint32(8) == uint32(Xread(tls, fd, value, uint32(8))) { + if uint32(8) == Uint32FromInt32(_read(tls, fd, value, uint32(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29680,7 +29678,7 @@ func Xeventfd_write(tls *TLS, fd int32, _value Teventfd_t) (r int32) { *(*Teventfd_t)(unsafe.Pointer(bp)) = _value var v1 int32 _ = v1 - if uint32(8) == uint32(Xwrite(tls, fd, bp, uint32(8))) { + if uint32(8) == Uint32FromInt32(_write(tls, fd, bp, uint32(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29693,7 +29691,7 @@ func Xfallocate(tls *TLS, fd int32, mode int32, base Toff_t, len1 Toff_t) (r int trc("tls=%v fd=%v mode=%v base=%v len1=%v, (%v:)", tls, fd, mode, base, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_fallocate), fd, mode, int32(base), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_fallocate), fd, mode, int32(base), int32(len1)))) } const FANOTIFY_METADATA_VERSION = 3 @@ -29843,7 +29841,7 @@ func Xfanotify_init(tls *TLS, flags uint32, event_f_flags uint32) (r int32) { trc("tls=%v flags=%v event_f_flags=%v, (%v:)", tls, flags, event_f_flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_fanotify_init), int32(flags), int32(event_f_flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_fanotify_init), Int32FromUint32(flags), Int32FromUint32(event_f_flags)))) } func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd int32, pathname uintptr) (r int32) { @@ -29851,7 +29849,7 @@ func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd trc("tls=%v fanotify_fd=%v flags=%v mask=%v dfd=%v pathname=%v, (%v:)", tls, fanotify_fd, flags, mask, dfd, pathname, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_fanotify_mark), fanotify_fd, int32(flags), int32(mask), dfd, int32(pathname)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_fanotify_mark), fanotify_fd, Int32FromUint32(flags), Int32FromUint64(mask), dfd, int32(pathname)))) } const LOCK_EX = 2 @@ -29864,7 +29862,7 @@ func Xflock(tls *TLS, fd int32, op int32) (r int32) { trc("tls=%v fd=%v op=%v, (%v:)", tls, fd, op, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_flock), fd, op))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_flock), fd, op))) } func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { @@ -29875,7 +29873,7 @@ func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if len1 > uint32(INT_MAX) { len1 = uint32(INT_MAX) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_getdents64), fd, int32(buf), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_getdents64), fd, int32(buf), Int32FromUint32(len1)))) } const GRND_INSECURE = 4 @@ -29887,7 +29885,7 @@ func Xgetrandom(tls *TLS, buf uintptr, buflen Tsize_t, flags uint32) (r Tssize_t trc("tls=%v buf=%v buflen=%v flags=%v, (%v:)", tls, buf, buflen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_getrandom), int32(buf), int32(buflen), int32(flags), 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_getrandom), int32(buf), Int32FromUint32(buflen), Int32FromUint32(flags), 0, 0, 0))) } const IN_ACCESS = 1 @@ -29944,7 +29942,7 @@ func Xinotify_init1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = X__syscall0(tls, int32(SYS_inotify_init)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r int32) { @@ -29952,7 +29950,7 @@ func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r trc("tls=%v fd=%v pathname=%v mask=%v, (%v:)", tls, fd, pathname, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_inotify_add_watch), fd, int32(pathname), int32(mask)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_inotify_add_watch), fd, int32(pathname), Int32FromUint32(mask)))) } func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { @@ -29960,7 +29958,7 @@ func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { trc("tls=%v fd=%v wd=%v, (%v:)", tls, fd, wd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_inotify_rm_watch), fd, wd))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_inotify_rm_watch), fd, wd))) } func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { @@ -29968,7 +29966,7 @@ func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { trc("tls=%v type1=%v buf=%v len1=%v, (%v:)", tls, type1, buf, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_syslog), type1, int32(buf), len1))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_syslog), type1, int32(buf), len1))) } const MADV_COLD = 20 @@ -30006,7 +30004,7 @@ func Xmemfd_create(tls *TLS, name uintptr, flags uint32) (r int32) { trc("tls=%v name=%v flags=%v, (%v:)", tls, name, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_memfd_create), int32(name), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_memfd_create), int32(name), Int32FromUint32(flags)))) } func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { @@ -30017,7 +30015,7 @@ func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { if flags == uint32(0) { return Xmlock(tls, addr, len1) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mlock2), int32(addr), int32(len1), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mlock2), int32(addr), Int32FromUint32(len1), Int32FromUint32(flags)))) } func Xinit_module(tls *TLS, a uintptr, b uint32, c uintptr) (r int32) { @@ -30025,7 +30023,7 @@ func Xinit_module(tls *TLS, a uintptr, b uint32, c uintptr) (r int32) { trc("tls=%v a=%v b=%v c=%v, (%v:)", tls, a, b, c, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_init_module), int32(a), int32(b), int32(c)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_init_module), int32(a), Int32FromUint32(b), int32(c)))) } func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { @@ -30033,7 +30031,7 @@ func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_delete_module), int32(a), int32(b)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_delete_module), int32(a), Int32FromUint32(b)))) } const BLKBSZGET = 2147488368 @@ -30281,7 +30279,7 @@ func Xmount(tls *TLS, special uintptr, dir uintptr, fstype uintptr, flags uint32 trc("tls=%v special=%v dir=%v fstype=%v flags=%v data=%v, (%v:)", tls, special, dir, fstype, flags, data, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_mount), int32(special), int32(dir), int32(fstype), int32(flags), int32(data)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_mount), int32(special), int32(dir), int32(fstype), Int32FromUint32(flags), int32(data)))) } func Xumount(tls *TLS, special uintptr) (r int32) { @@ -30289,7 +30287,7 @@ func Xumount(tls *TLS, special uintptr) (r int32) { trc("tls=%v special=%v, (%v:)", tls, special, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_umount2), int32(special), Int32FromInt32(0)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_umount2), int32(special), Int32FromInt32(0)))) } func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { @@ -30297,7 +30295,7 @@ func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { trc("tls=%v special=%v flags=%v, (%v:)", tls, special, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_umount2), int32(special), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_umount2), int32(special), flags))) } func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, mount_id uintptr, flags int32) (r int32) { @@ -30305,7 +30303,7 @@ func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, trc("tls=%v dirfd=%v pathname=%v handle=%v mount_id=%v flags=%v, (%v:)", tls, dirfd, pathname, handle, mount_id, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_name_to_handle_at), dirfd, int32(pathname), int32(handle), int32(mount_id), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_name_to_handle_at), dirfd, int32(pathname), int32(handle), int32(mount_id), flags))) } func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) (r int32) { @@ -30313,7 +30311,7 @@ func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) ( trc("tls=%v mount_fd=%v handle=%v flags=%v, (%v:)", tls, mount_fd, handle, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_open_by_handle_at), mount_fd, int32(handle), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_open_by_handle_at), mount_fd, int32(handle), flags))) } const ADDR_COMPAT_LAYOUT = 2097152 @@ -30356,7 +30354,7 @@ func Xpersonality(tls *TLS, persona uint32) (r int32) { trc("tls=%v persona=%v, (%v:)", tls, persona, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_personality), int32(persona)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_personality), Int32FromUint32(persona)))) } func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { @@ -30364,7 +30362,7 @@ func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { trc("tls=%v new1=%v old=%v, (%v:)", tls, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_pivot_root), int32(new1), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_pivot_root), int32(new1), int32(old)))) } const PR_CAPBSET_DROP = 24 @@ -30543,7 +30541,7 @@ func Xprctl(tls *TLS, op int32, va uintptr) (r int32) { i++ } _ = ap - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_prctl), op, int32(x[0]), int32(x[int32(1)]), int32(x[int32(2)]), int32(x[int32(3)])))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_prctl), op, Int32FromUint32(x[0]), Int32FromUint32(x[int32(1)]), Int32FromUint32(x[int32(2)]), Int32FromUint32(x[int32(3)])))) } const RWF_APPEND = 16 @@ -30562,9 +30560,9 @@ func Xpreadv2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags in if ofs == int64(-int32(1)) { return Xreadv(tls, fd, iov, count) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_preadv), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_preadv), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_preadv2), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), flags))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_preadv2), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), flags))) } func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit uintptr) (r1 int32) { @@ -30587,7 +30585,7 @@ func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit } new_limit = bp } - r = X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_prlimit64), pid, resource, int32(new_limit), int32(old_limit)))) + r = X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_prlimit64), pid, resource, int32(new_limit), int32(old_limit)))) if !(r != 0) && old_limit != 0 && Bool(^Uint64FromUint64(0) != ^Uint64FromUint64(0)) { if (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur = ^Uint64FromUint64(0) @@ -30604,7 +30602,7 @@ func Xprocess_vm_writev(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint32, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall6(tls, int32(SYS_process_vm_writev), pid, int32(lvec), int32(liovcnt), int32(rvec), int32(riovcnt), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, int32(SYS_process_vm_writev), pid, int32(lvec), Int32FromUint32(liovcnt), int32(rvec), Int32FromUint32(riovcnt), Int32FromUint32(flags)))) } func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint32, rvec uintptr, riovcnt uint32, flags uint32) (r Tssize_t) { @@ -30612,7 +30610,7 @@ func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint32, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall6(tls, int32(SYS_process_vm_readv), pid, int32(lvec), int32(liovcnt), int32(rvec), int32(riovcnt), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, int32(SYS_process_vm_readv), pid, int32(lvec), Int32FromUint32(liovcnt), int32(rvec), Int32FromUint32(riovcnt), Int32FromUint32(flags)))) } const PTRACE_ATTACH = 16 @@ -30795,11 +30793,11 @@ func Xptrace(tls *TLS, req int32, va uintptr) (r int32) { data = VaUintptr(&ap) /* PTRACE_{READ,WRITE}{DATA,TEXT} (16...19) are specific to SPARC. */ _ = ap - if uint32(req)-uint32(1) < uint32(3) { + if Uint32FromInt32(req)-uint32(1) < uint32(3) { data = bp } - ret = X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_ptrace), req, pid, int32(addr), int32(data), int32(addr2)))) - if ret < 0 || uint32(req)-uint32(1) >= uint32(3) { + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_ptrace), req, pid, int32(addr), int32(data), int32(addr2)))) + if ret < 0 || Uint32FromInt32(req)-uint32(1) >= uint32(3) { return ret } return *(*int32)(unsafe.Pointer(bp)) @@ -30814,9 +30812,9 @@ func Xpwritev2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags i if ofs == int64(-int32(1)) { return Xwritev(tls, fd, iov, count) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pwritev), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pwritev), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pwritev2), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), flags))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pwritev2), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), flags))) } const GRPQUOTA = 1 @@ -30885,7 +30883,7 @@ func Xquotactl(tls *TLS, cmd int32, special uintptr, id int32, addr uintptr) (r trc("tls=%v cmd=%v special=%v id=%v addr=%v, (%v:)", tls, cmd, special, id, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_quotactl), cmd, int32(special), id, int32(addr)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_quotactl), cmd, int32(special), id, int32(addr)))) } func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { @@ -30893,7 +30891,7 @@ func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v pos=%v len1=%v, (%v:)", tls, fd, pos, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_readahead), fd, int32(pos), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_readahead), fd, int32(pos), Int32FromUint32(len1)))) } const RB_AUTOBOOT = 19088743 @@ -30909,7 +30907,7 @@ func Xreboot(tls *TLS, type1 int32) (r int32) { trc("tls=%v type1=%v, (%v:)", tls, type1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_reboot), int32(Uint32FromUint32(0xfee1dead)), Int32FromInt32(672274793), type1))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_reboot), Int32FromUint32(Uint32FromUint32(0xfee1dead)), Int32FromInt32(672274793), type1))) } func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff Tsize_t, flags int32) (r int32) { @@ -30917,7 +30915,7 @@ func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff T trc("tls=%v addr=%v size=%v prot=%v pgoff=%v flags=%v, (%v:)", tls, addr, size, prot, pgoff, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_remap_file_pages), int32(addr), int32(size), prot, int32(pgoff), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_remap_file_pages), int32(addr), Int32FromUint32(size), prot, Int32FromUint32(pgoff), flags))) } func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { @@ -30926,7 +30924,7 @@ func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { defer func() { trc("-> %v", r) }() } if inc != 0 { - return uintptr(X__syscall_ret(tls, uint32(-Int32FromInt32(ENOMEM)))) + return uintptr(X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(ENOMEM)))) } return uintptr(X__syscall1(tls, int32(SYS_brk), Int32FromInt32(0))) } @@ -30936,7 +30934,7 @@ func Xsendfile(tls *TLS, out_fd int32, in_fd int32, ofs uintptr, count Tsize_t) trc("tls=%v out_fd=%v in_fd=%v ofs=%v count=%v, (%v:)", tls, out_fd, in_fd, ofs, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_sendfile64), out_fd, in_fd, int32(ofs), int32(count)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_sendfile64), out_fd, in_fd, int32(ofs), Int32FromUint32(count)))) } func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { @@ -30944,7 +30942,7 @@ func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_setfsgid32), int32(gid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_setfsgid32), Int32FromUint32(gid)))) } func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { @@ -30952,7 +30950,7 @@ func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_setfsuid32), int32(uid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_setfsuid32), Int32FromUint32(uid)))) } func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -30960,7 +30958,7 @@ func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_sethostname), int32(name), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_sethostname), int32(name), Int32FromUint32(len1)))) } const CLONE_CHILD_CLEARTID = 2097152 @@ -31000,7 +30998,7 @@ func Xsetns(tls *TLS, fd int32, nstype int32) (r int32) { trc("tls=%v fd=%v nstype=%v, (%v:)", tls, fd, nstype, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_setns), fd, nstype))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_setns), fd, nstype))) } const __tm_gmtoff = 0 @@ -31030,8 +31028,8 @@ func Xsettimeofday(tls *TLS, tv uintptr, tz uintptr) (r int32) { if !(tv != 0) { return 0 } - if uint64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + if Uint64FromInt64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ Ftv_sec: (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec, @@ -31078,7 +31076,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { _ = ret ret = X__syscall4(tls, int32(SYS_signalfd4), fd, int32(sigs), Int32FromInt32(_NSIG)/Int32FromInt32(8), flags) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } ret = X__syscall3(tls, int32(SYS_signalfd), fd, int32(sigs), Int32FromInt32(_NSIG)/Int32FromInt32(8)) if ret >= 0 { @@ -31089,7 +31087,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { X__syscall3(tls, int32(SYS_fcntl64), ret, Int32FromInt32(F_SETFL), Int32FromInt32(O_NONBLOCK)) } } - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -31097,7 +31095,7 @@ func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintpt trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall6(tls, int32(SYS_splice), fd_in, int32(off_in), fd_out, int32(off_out), int32(len1), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, int32(SYS_splice), fd_in, int32(off_in), fd_out, int32(off_out), Int32FromUint32(len1), Int32FromUint32(flags)))) } func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx uintptr) (r int32) { @@ -31110,9 +31108,9 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u var ret int32 var _ /* st at bp+0 */ Tstat _ = ret - ret = X__syscall5(tls, int32(SYS_statx), dirfd, int32(path), flags, int32(mask), int32(stx)) + ret = X__syscall5(tls, int32(SYS_statx), dirfd, int32(path), flags, Int32FromUint32(mask), int32(stx)) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } ret = Xfstatat(tls, dirfd, path, bp, flags) if ret != 0 { @@ -31125,15 +31123,15 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u (*Tstatx)(unsafe.Pointer(stx)).Fstx_nlink = (*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink (*Tstatx)(unsafe.Pointer(stx)).Fstx_uid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_uid (*Tstatx)(unsafe.Pointer(stx)).Fstx_gid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_gid - (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_btime = Tstatx_timestamp{} (*Tstatx)(unsafe.Pointer(stx)).Fstx_mask = uint32(0x7ff) return 0 @@ -31163,7 +31161,7 @@ func Xswapon(tls *TLS, path uintptr, flags int32) (r int32) { trc("tls=%v path=%v flags=%v, (%v:)", tls, path, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_swapon), int32(path), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_swapon), int32(path), flags))) } func Xswapoff(tls *TLS, path uintptr) (r int32) { @@ -31171,7 +31169,7 @@ func Xswapoff(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_swapoff), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_swapoff), int32(path)))) } func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) (r int32) { @@ -31179,7 +31177,7 @@ func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) trc("tls=%v fd=%v pos=%v len1=%v flags=%v, (%v:)", tls, fd, pos, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_sync_file_range2), fd, int32(flags), int32(pos), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_sync_file_range2), fd, Int32FromUint32(flags), int32(pos), int32(len1)))) } func Xsyncfs(tls *TLS, fd int32) (r int32) { @@ -31187,7 +31185,7 @@ func Xsyncfs(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_syncfs), fd))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_syncfs), fd))) } func X__lsysinfo(tls *TLS, info uintptr) (r int32) { @@ -31195,7 +31193,7 @@ func X__lsysinfo(tls *TLS, info uintptr) (r int32) { trc("tls=%v info=%v, (%v:)", tls, info, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_sysinfo), int32(info)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_sysinfo), int32(info)))) } func Xsysinfo(tls *TLS, info uintptr) (r int32) { @@ -31211,7 +31209,7 @@ func Xtee(tls *TLS, src int32, dest int32, len1 Tsize_t, flags uint32) (r Tssize trc("tls=%v src=%v dest=%v len1=%v flags=%v, (%v:)", tls, src, dest, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_tee), src, dest, int32(len1), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_tee), src, dest, Int32FromUint32(len1), Int32FromUint32(flags)))) } const TFD_CLOEXEC = 524288 @@ -31224,7 +31222,7 @@ func Xtimerfd_create(tls *TLS, clockid int32, flags int32) (r int32) { trc("tls=%v clockid=%v flags=%v, (%v:)", tls, clockid, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_timerfd_create), clockid, flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_timerfd_create), clockid, flags))) } func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr) (r1 int32) { @@ -31243,7 +31241,7 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr ins = (*Titimerspec)(unsafe.Pointer(new1)).Fit_interval.Ftv_nsec vns = (*Titimerspec)(unsafe.Pointer(new1)).Fit_value.Ftv_nsec r = -int32(ENOSYS) - if Bool(false) || !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || Bool(uint32(8) > uint32(4)) && old != 0 { + if Bool(false) || !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || Bool(uint32(8) > uint32(4)) && old != 0 { *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, 1: int64(ins), @@ -31253,10 +31251,10 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr r = X__syscall4(tls, int32(SYS_timerfd_settime64), fd, flags, int32(bp), int32(old)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } *(*[4]int32)(unsafe.Pointer(bp + 32)) = [4]int32{ 0: int32(is), @@ -31271,8 +31269,8 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr (*Titimerspec)(unsafe.Pointer(old)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(2)]) (*Titimerspec)(unsafe.Pointer(old)).Fit_value.Ftv_nsec = (*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(3)] } - return X__syscall_ret(tls, uint32(r)) - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_timerfd_settime32), fd, flags, int32(new1), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(r)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_timerfd_settime32), fd, flags, int32(new1), int32(old)))) } func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r1 int32) { @@ -31290,7 +31288,7 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r1 int32) { r = X__syscall2(tls, int32(SYS_timerfd_gettime64), fd, int32(cur)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } r = X__syscall2(tls, int32(SYS_timerfd_gettime32), fd, int32(bp)) if !(r != 0) { @@ -31299,8 +31297,8 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r1 int32) { (*Titimerspec)(unsafe.Pointer(cur)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(2)]) (*Titimerspec)(unsafe.Pointer(cur)).Fit_value.Ftv_nsec = (*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)] } - return X__syscall_ret(tls, uint32(r)) - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_timerfd_gettime32), fd, int32(cur)))) + return X__syscall_ret(tls, Uint32FromInt32(r)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_timerfd_gettime32), fd, int32(cur)))) } func Xunshare(tls *TLS, flags int32) (r int32) { @@ -31308,7 +31306,7 @@ func Xunshare(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_unshare), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_unshare), flags))) } func Xutimes(tls *TLS, path uintptr, times uintptr) (r int32) { @@ -31324,7 +31322,7 @@ func Xvhangup(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall0(tls, int32(SYS_vhangup)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall0(tls, int32(SYS_vhangup)))) } func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Tssize_t) { @@ -31332,7 +31330,7 @@ func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Ts trc("tls=%v fd=%v iov=%v cnt=%v flags=%v, (%v:)", tls, fd, iov, cnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_vmsplice), fd, int32(iov), int32(cnt), int32(flags)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_vmsplice), fd, int32(iov), Int32FromUint32(cnt), Int32FromUint32(flags)))) } const NSIG = 65 @@ -31425,7 +31423,7 @@ func Xwait4(tls *TLS, pid Tpid_t, status uintptr, options int32, ru uintptr) (r1 Ftv_usec: int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)]), } } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } const XATTR_CREATE = 1 @@ -31437,7 +31435,7 @@ func Xgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_getxattr), int32(path), int32(name), int32(value), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_getxattr), int32(path), int32(name), int32(value), Int32FromUint32(size)))) } func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31445,7 +31443,7 @@ func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_lgetxattr), int32(path), int32(name), int32(value), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_lgetxattr), int32(path), int32(name), int32(value), Int32FromUint32(size)))) } func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31453,7 +31451,7 @@ func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v, (%v:)", tls, filedes, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_fgetxattr), filedes, int32(name), int32(value), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_fgetxattr), filedes, int32(name), int32(value), Int32FromUint32(size)))) } func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31461,7 +31459,7 @@ func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_listxattr), int32(path), int32(list), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_listxattr), int32(path), int32(list), Int32FromUint32(size)))) } func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31469,7 +31467,7 @@ func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_llistxattr), int32(path), int32(list), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_llistxattr), int32(path), int32(list), Int32FromUint32(size)))) } func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31477,7 +31475,7 @@ func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_ trc("tls=%v filedes=%v list=%v size=%v, (%v:)", tls, filedes, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_flistxattr), filedes, int32(list), int32(size)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_flistxattr), filedes, int32(list), Int32FromUint32(size)))) } func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31485,7 +31483,7 @@ func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_setxattr), int32(path), int32(name), int32(value), int32(size), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_setxattr), int32(path), int32(name), int32(value), Int32FromUint32(size), flags))) } func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31493,7 +31491,7 @@ func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_lsetxattr), int32(path), int32(name), int32(value), int32(size), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_lsetxattr), int32(path), int32(name), int32(value), Int32FromUint32(size), flags))) } func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31501,7 +31499,7 @@ func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, filedes, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_fsetxattr), filedes, int32(name), int32(value), int32(size), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_fsetxattr), filedes, int32(name), int32(value), Int32FromUint32(size), flags))) } func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31509,7 +31507,7 @@ func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_removexattr), int32(path), int32(name)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_removexattr), int32(path), int32(name)))) } func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31517,7 +31515,7 @@ func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_lremovexattr), int32(path), int32(name)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_lremovexattr), int32(path), int32(name)))) } func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { @@ -31525,7 +31523,7 @@ func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_fremovexattr), fd, int32(name)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_fremovexattr), fd, int32(name)))) } type Tucontext_t2 = struct { @@ -31579,7 +31577,7 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { var sign, sw int32 _, _, _, _, _, _, _, _, _, _, _ = b, mo, n, o, ol, os, sign, sw, t, tl, ts mo = p - sw = int32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) + sw = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) b = uint32(0) n = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 2*4)), sw) o = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 3*4)), sw) @@ -31636,9 +31634,9 @@ func Xbind_textdomain_codeset(tls *TLS, domainname uintptr, codeset uintptr) (r var _empty_mo = [5]Tuint32_t{ 0: uint32(0x950412de), - 2: uint32(-Int32FromInt32(1)), - 3: uint32(-Int32FromInt32(1)), - 4: uint32(-Int32FromInt32(1)), + 2: Uint32FromInt32(-Int32FromInt32(1)), + 3: Uint32FromInt32(-Int32FromInt32(1)), + 4: Uint32FromInt32(-Int32FromInt32(1)), } const NL_CAT_LOCALE = 1 @@ -31721,12 +31719,12 @@ _6: goto _9 _9: strings = map1 + uintptr(20) + uintptr(v8) - v10 = uint32(set_id) + v10 = Uint32FromInt32(set_id) v11 = v10>>int32(24) | v10>>int32(8)&uint32(0xff00) | v10<>int32(24) | v13>>int32(8)&uint32(0xff00) | v13< uint32(NAME_MAX) || dirlen >= uint32(PATH_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) @@ -32046,7 +32044,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r uintptr) return uintptr(0) } (*Tbinding)(unsafe.Pointer(p3)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) - (*Tbinding)(unsafe.Pointer(p3)).Fdirlen = int32(dirlen) + (*Tbinding)(unsafe.Pointer(p3)).Fdirlen = Int32FromUint32(dirlen) (*Tbinding)(unsafe.Pointer(p3)).Fdomainname = p3 + 20 (*Tbinding)(unsafe.Pointer(p3)).Fdirname = p3 + 20 + uintptr(domlen) + uintptr(1) _memcpy(tls, (*Tbinding)(unsafe.Pointer(p3)).Fdomainname, domainname, domlen+uint32(1)) @@ -32141,13 +32139,13 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n if !(msgid1 != 0) { goto notrans } - if uint32(category) >= uint32(LC_ALL) { + if Uint32FromInt32(category) >= uint32(LC_ALL) { goto notrans } if !(domainname != 0) { domainname = X__gettextdomain(tls) } - domlen = Xstrnlen(tls, domainname, uint32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + domlen = Xstrnlen(tls, domainname, Uint32FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if domlen > uint32(NAME_MAX) { goto notrans } @@ -32200,7 +32198,7 @@ _2: dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 8 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 - dirlen = uint32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) + dirlen = Uint32FromInt32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) loclen = Xstrlen(tls, locname) catlen = uint32(_catlens[category]) /* Logically split @mod suffix from locale name. */ @@ -32208,19 +32206,19 @@ _2: if !(modname != 0) { modname = locname + uintptr(loclen) } - v5 = loclen - uint32(int32(modname)-int32(locname)) + v5 = loclen - Uint32FromInt32(int32(modname)-int32(locname)) modlen = v5 alt_modlen = v5 - loclen = uint32(int32(modname) - int32(locname)) + loclen = Uint32FromInt32(int32(modname) - int32(locname)) /* Drop .charset identifier; it is not used. */ csp = Xmemchr(tls, locname, int32('.'), loclen) if csp != 0 { - loclen = uint32(int32(csp) - int32(locname)) + loclen = Uint32FromInt32(int32(csp) - int32(locname)) } v6 = dirlen + uint32(1) + loclen + modlen + uint32(1) + catlen + uint32(1) + domlen + uint32(3) + uint32(1) name = Xrealloc(tls, name, v6) for { - Xsnprintf(tls, name, v6, __ccgo_ts+359, VaList(bp+16, dirname, int32(loclen), locname, int32(alt_modlen), modname, catname, domainname)) + Xsnprintf(tls, name, v6, __ccgo_ts+359, VaList(bp+16, dirname, Int32FromUint32(loclen), locname, Int32FromUint32(alt_modlen), modname, catname, domainname)) v8 = X__map_file(tls, name, bp) map1 = v8 if v8 != 0 { @@ -32233,7 +32231,7 @@ _2: v9 = Xmemchr(tls, locname, int32('_'), loclen) locp = v9 if v9 != 0 { - loclen = uint32(int32(locp) - int32(locname)) + loclen = Uint32FromInt32(int32(locp) - int32(locname)) alt_modlen = modlen } else { break @@ -32270,8 +32268,8 @@ _2: if r != 0 { r += uintptr(13) for { - v11 = int32(*(*uint8)(unsafe.Pointer(r))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: if !(v12 != 0) { @@ -32283,14 +32281,14 @@ _2: np = Xstrtoul(tls, r+uintptr(9), bp+4, int32(10)) r = *(*uintptr)(unsafe.Pointer(bp + 4)) } - for *(*uint8)(unsafe.Pointer(r)) != 0 && int32(*(*uint8)(unsafe.Pointer(r))) != int32(';') { + for *(*uint8)(unsafe.Pointer(r)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) != int32(';') { r++ } if *(*uint8)(unsafe.Pointer(r)) != 0 { r++ for { - v14 = int32(*(*uint8)(unsafe.Pointer(r))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: if !(v15 != 0) { @@ -32303,7 +32301,7 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p2)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p2)).Fnplurals = Int32FromUint32(np) (*Tmsgcat)(unsafe.Pointer(p2)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) @@ -32337,7 +32335,7 @@ _2: * msgid2 to request that dcngettext suppress plural processing. */ if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p2)).Fnplurals != 0 { plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p2)).Fplural_rule, n) - if plural > uint32((*Tmsgcat)(unsafe.Pointer(p2)).Fnplurals) { + if plural > Uint32FromInt32((*Tmsgcat)(unsafe.Pointer(p2)).Fnplurals) { goto notrans } for { @@ -32346,7 +32344,7 @@ _2: if !(v23 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p2)).Fmap_size - uint32(int32(trans)-int32((*Tmsgcat)(unsafe.Pointer(p2)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p2)).Fmap_size - Uint32FromInt32(int32(trans)-int32((*Tmsgcat)(unsafe.Pointer(p2)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint32(1) >= rem { goto notrans @@ -98575,7 +98573,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(a)) != 0 && *(*uint8)(unsafe.Pointer(b)) != 0) { break } - for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && uint32(int32(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { + for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { a++ } if uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32) != uint32(*(*uint8)(unsafe.Pointer(b))) { @@ -98587,7 +98585,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { a++ b++ } - return BoolInt32(int32(*(*uint8)(unsafe.Pointer(a))) != int32(*(*uint8)(unsafe.Pointer(b)))) + return BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(b)))) } func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { @@ -98611,11 +98609,11 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { ; s += uintptr(Xstrlen(tls, s) + uint32(1)) } - return uint32(int32(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) + return Uint32FromInt32(int32(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) } s += uintptr(Xstrlen(tls, s) + uint32(1)) if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - if int32(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { s += uintptr(2) } else { s += uintptr(uint32(2) + (uint32(64)-uint32(*(*uint8)(unsafe.Pointer(s + 1))))*uint32(5)) @@ -98624,7 +98622,7 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { goto _1 _1: } - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } type Tstateful_cd = struct { @@ -98656,16 +98654,16 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { _, _, _, _, _, _, _ = cd, f, scd, t, v1, v2, v3 v1 = _find_charmap(tls, to) t = v1 - if v3 = v1 == uint32(-Int32FromInt32(1)); !v3 { + if v3 = v1 == Uint32FromInt32(-Int32FromInt32(1)); !v3 { v2 = _find_charmap(tls, from) f = v2 } - if v3 || v2 == uint32(-Int32FromInt32(1)) || int32(_charmaps[t]) >= int32(0330) { + if v3 || v2 == Uint32FromInt32(-Int32FromInt32(1)) || Int32FromUint8(_charmaps[t]) >= int32(0330) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } cd = _combine_to_from(tls, t, f) - switch int32(_charmaps[f]) { + switch Int32FromUint8(_charmaps[f]) { case int32(UTF_16): fallthrough case int32(UTF_32): @@ -98686,7 +98684,7 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { func _get_16(tls *TLS, s uintptr, e int32) (r uint32) { e &= int32(1) - return uint32(int32(*(*uint8)(unsafe.Pointer(s + uintptr(e))))<>(uint32(2)*x%uint32(8)) | int32(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) + x = c - Uint32FromInt32(int32(4)*Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1)))))) + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)))))>>(uint32(2)*x%uint32(8)) | Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) if x < uint32(256) { v1 = x } else { @@ -98802,7 +98800,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } c = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) l = uint32(1) - switch int32(type1) { + switch Int32FromUint8(type1) { case int32(UTF_8): goto _2 case int32(US_ASCII): @@ -98853,10 +98851,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } l = Xmbrtowc(tls, bp+24, *(*uintptr)(unsafe.Pointer(in)), *(*Tsize_t)(unsafe.Pointer(inb)), bp+16) - if l == uint32(-Int32FromInt32(1)) { + if l == Uint32FromInt32(-Int32FromInt32(1)) { goto ilseq } - if l == uint32(-Int32FromInt32(2)) { + if l == Uint32FromInt32(-Int32FromInt32(2)) { goto starved } c = *(*Twchar_t)(unsafe.Pointer(bp + 24)) @@ -98885,7 +98883,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint32(4) { goto starved } - c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) _24: ; if c-uint32(0xd800) < uint32(0x800) || c >= uint32(0x110000) { @@ -98904,19 +98902,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint32(2) { goto starved } - c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) if c-Uint32FromInt32(0xdc00) < uint32(0x400) { goto ilseq } if c-Uint32FromInt32(0xd800) < uint32(0x400) { - if uint32(int32(type1)-int32(UCS2BE)) < uint32(2) { + if Uint32FromInt32(Int32FromUint8(type1)-int32(UCS2BE)) < uint32(2) { goto ilseq } l = uint32(4) if *(*Tsize_t)(unsafe.Pointer(inb)) < uint32(4) { goto starved } - d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), int32(type1)) + d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), Int32FromUint8(type1)) if d-Uint32FromInt32(0xdc00) >= uint32(0x400) { goto ilseq } @@ -98933,7 +98931,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), 0) - if int32(type1) == int32(UCS2) { + if Int32FromUint8(type1) == int32(UCS2) { if c == uint32(0xfffe) { v26 = int32(UCS2LE) } else { @@ -98948,7 +98946,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } v25 = v27 } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v25) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v25) if c == uint32(0xfffe) || c == uint32(0xfeff) { l = uint32(2) } @@ -98968,7 +98966,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v28 = int32(UTF_32BE) } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v28) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v28) if c == uint32(0xfffe0000) || c == uint32(0xfeff) { l = uint32(4) } @@ -98980,8 +98978,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto _23 } - if c-uint32(0xa1) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + if c-uint32(0xa1) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } l = uint32(2) @@ -98989,17 +98987,17 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if c-uint32(129) <= uint32(Int32FromInt32(159)-Int32FromInt32(129)) { + if c-uint32(129) <= Uint32FromInt32(Int32FromInt32(159)-Int32FromInt32(129)) { c -= uint32(129) } else { - if c-uint32(224) <= uint32(Int32FromInt32(239)-Int32FromInt32(224)) { + if c-uint32(224) <= Uint32FromInt32(Int32FromInt32(239)-Int32FromInt32(224)) { c -= uint32(193) } else { goto ilseq } } c *= uint32(2) - if d-uint32(64) <= uint32(Int32FromInt32(158)-Int32FromInt32(64)) { + if d-uint32(64) <= Uint32FromInt32(Int32FromInt32(158)-Int32FromInt32(64)) { if d == uint32(127) { goto ilseq } @@ -99008,7 +99006,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } d -= uint32(64) } else { - if d-uint32(159) <= uint32(Int32FromInt32(252)-Int32FromInt32(159)) { + if d-uint32(159) <= Uint32FromInt32(Int32FromInt32(252)-Int32FromInt32(159)) { c++ d -= uint32(159) } @@ -99033,10 +99031,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) if c == uint32(0x8e) { c = d - if c-uint32(0xa1) > uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + if c-uint32(0xa1) > Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { goto ilseq } - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } c -= uint32(0xa1) @@ -99064,7 +99062,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c != uint32('(') && c != uint32('$') { goto ilseq } - switch uint32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { + switch Uint32FromInt32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { case uint32('B'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(0) goto _1 @@ -99074,10 +99072,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui case uint32('I'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(4) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('@')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('@')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(2) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('B')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('B')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(3) goto _1 } @@ -99113,7 +99111,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto ilseq } if c-uint32(0x21) < uint32(0x5e) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) } break } @@ -99146,11 +99144,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d < uint32(0xa1) && int32(type1) == int32(GB2312) { + if d < uint32(0xa1) && Int32FromUint8(type1) == int32(GB2312) { goto ilseq } if d-uint32(0x40) >= uint32(191) || d == uint32(127) { - if d-uint32('0') > uint32(9) || int32(type1) != int32(GB18030) { + if d-uint32('0') > uint32(9) || Int32FromUint8(type1) != int32(GB18030) { goto ilseq } l = uint32(4) @@ -99221,23 +99219,23 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d-uint32(0x40) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < uint32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { + if d-uint32(0x40) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < Uint32FromInt32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { goto ilseq } d -= uint32(0x40) if d > uint32(0x3e) { d -= uint32(0x22) } - if c-uint32(0xa1) >= uint32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { - if c-uint32(0x87) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { + if c-uint32(0xa1) >= Uint32FromInt32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { + if c-uint32(0x87) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { goto ilseq } if c < uint32(0xa1) { c -= uint32(0x87) } else { - c -= uint32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) + c -= Uint32FromInt32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) } - c = uint32(int32(_hkscs[uint32(4867)+(c*uint32(157)+d)/uint32(16)])>>((c*uint32(157)+d)%uint32(16))%int32(2)<>((c*uint32(157)+d)%uint32(16))%int32(2)< *(*Tsize_t)(unsafe.Pointer(outb)) { goto toobig } @@ -99266,7 +99264,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } c -= uint32(0xa1) - c = uint32(int32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(&_big5)) + uintptr(c)*314 + uintptr(d)*2))) | BoolInt32(c == uint32(0x27) && (d == uint32(0x3a) || d == uint32(0x3c) || d == uint32(0x42)))<= uint32(93) || d >= uint32(94) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) d += uint32(0xa1) - if c >= uint32(93) || c >= uint32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { + if c >= uint32(93) || c >= Uint32FromInt32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { goto ilseq } if d-uint32('A') < uint32(26) { @@ -99295,7 +99293,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if d-uint32('a') < uint32(26) { d = d - uint32('a') + uint32(26) } else { - if d-uint32(0x81) < uint32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { + if d-uint32(0x81) < Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { d = d - uint32(0x81) + uint32(52) } else { goto ilseq @@ -99305,7 +99303,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(0x20) { c = uint32(178)*c + d } else { - c = uint32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d + c = Uint32FromInt32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d } c += uint32(0xac00) d = uint32(0xac00) @@ -99360,7 +99358,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } _23: ; - switch int32(totype) { + switch Int32FromUint8(totype) { case int32(WCHAR_T): goto _35 case int32(UTF_8): @@ -99407,13 +99405,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui _36: ; if *(*Tsize_t)(unsafe.Pointer(outb)) < uint32(4) { - k = uint32(Xwctomb(tls, bp+44, c)) + k = Uint32FromInt32(Xwctomb(tls, bp+44, c)) if *(*Tsize_t)(unsafe.Pointer(outb)) < k { goto toobig } _memcpy(tls, *(*uintptr)(unsafe.Pointer(out)), bp+44, k) } else { - k = uint32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), c)) + k = Uint32FromInt32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), c)) } *(*uintptr)(unsafe.Pointer(out)) += uintptr(k) *(*Tsize_t)(unsafe.Pointer(outb)) -= k @@ -99453,7 +99451,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui _53: ; d = c - c = uint32(int32(4) * int32(totype)) + c = Uint32FromInt32(int32(4) * Int32FromUint8(totype)) for { if !(c < uint32(256)) { break @@ -99482,8 +99480,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui c = uint32('~') goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) goto revout } c = _uni_to_jis(tls, c) @@ -99503,7 +99501,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v59 = int32(176) } - *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + uint32(v59)) + *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + Uint32FromInt32(v59)) v61 = out v60 = *(*uintptr)(unsafe.Pointer(v61)) *(*uintptr)(unsafe.Pointer(v61))++ @@ -99520,8 +99518,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) } else { c = _uni_to_jis(tls, c) } @@ -99546,7 +99544,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { if *(*Tsize_t)(unsafe.Pointer(outb)) < uint32(7) { goto toobig } @@ -99657,14 +99655,14 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ; _43: ; - if c < uint32(0x10000) || uint32(int32(totype)-int32(UCS2BE)) < uint32(2) { + if c < uint32(0x10000) || Uint32FromInt32(Int32FromUint8(totype)-int32(UCS2BE)) < uint32(2) { if c >= uint32(0x10000) { c = uint32(0xFFFD) } if *(*Tsize_t)(unsafe.Pointer(outb)) < uint32(2) { goto toobig } - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(2) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(2) goto _51 @@ -99673,8 +99671,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto toobig } c -= uint32(0x10000) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), int32(totype)) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), Int32FromUint8(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(4) goto _51 @@ -99688,7 +99686,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint32(4) { goto toobig } - _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint32(4) goto _51 @@ -99706,19 +99704,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ilseq: ; err = int32(EILSEQ) - x = uint32(-Int32FromInt32(1)) + x = Uint32FromInt32(-Int32FromInt32(1)) goto end goto toobig toobig: ; err = int32(E2BIG) - x = uint32(-Int32FromInt32(1)) + x = Uint32FromInt32(-Int32FromInt32(1)) goto end goto starved starved: ; err = int32(EINVAL) - x = uint32(-Int32FromInt32(1)) + x = Uint32FromInt32(-Int32FromInt32(1)) goto end end: ; @@ -99907,7 +99905,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { /* Limit name length and forbid leading dot or any slashes. */ n = uint32(0) for { - if !(n < uint32(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && int32(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { + if !(n < uint32(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { break } goto _8 @@ -99915,12 +99913,12 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { ; n++ } - if int32(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { val = __ccgo_ts + 456 } - builtin = BoolInt32(int32(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+456) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+464) != 0)) + builtin = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+456) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+464) != 0)) if builtin != 0 { - if cat == LC_CTYPE && int32(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { + if cat == LC_CTYPE && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { return uintptr(unsafe.Pointer(&X__c_dot_utf8)) } return uintptr(0) @@ -99948,7 +99946,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { break } z = X__strchrnul(tls, path, int32(':')) - l = uint32(int32(z) - int32(path)) + l = Uint32FromInt32(int32(z) - int32(path)) if l >= uint32(256)-n-uint32(2) { goto _10 } @@ -100187,8 +100185,8 @@ func _skipspace(tls *TLS, s uintptr) (r uintptr) { var v1, v2 int32 _, _ = v1, v2 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -100213,23 +100211,23 @@ func _evalprim(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { s = _skipspace(tls, s) if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { (*Tst)(unsafe.Pointer(st)).Fr = Xstrtoul(tls, s, bp, int32(10)) - if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == uint32(-Int32FromInt32(1)) { + if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == Uint32FromInt32(-Int32FromInt32(1)) { return __ccgo_ts } return _skipspace(tls, *(*uintptr)(unsafe.Pointer(bp))) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('n') { (*Tst)(unsafe.Pointer(st)).Fr = (*Tst)(unsafe.Pointer(st)).Fn return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(')') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(')') { return __ccgo_ts } return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('!') { s = _evalprim(tls, st, s+uintptr(1), d) (*Tst)(unsafe.Pointer(st)).Fr = BoolUint32(!((*Tst)(unsafe.Pointer(st)).Fr != 0)) return s @@ -100300,9 +100298,9 @@ func _parseop(tls *TLS, st uintptr, s uintptr) (r uintptr) { if !(i < int32(11)) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(_opch[i]) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(_opch[i]) { /* note: >,< are accepted with or without = */ - if i < int32(6) && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(_opch2[i]) { + if i < int32(6) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == Int32FromUint8(_opch2[i]) { (*Tst)(unsafe.Pointer(st)).Fop = i return s + uintptr(2) } @@ -100339,11 +100337,11 @@ func _evalbinop(tls *TLS, st uintptr, s uintptr, minprec int32, d int32) (r uint if op was missing then prec[op]==0 */ op = (*Tst)(unsafe.Pointer(st)).Fop - if int32(_prec[op]) <= minprec { + if Int32FromUint8(_prec[op]) <= minprec { return s } left = (*Tst)(unsafe.Pointer(st)).Fr - s = _evalbinop(tls, st, s, int32(_prec[op]), d) + s = _evalbinop(tls, st, s, Int32FromUint8(_prec[op]), d) if _binop(tls, st, op, left) != 0 { return __ccgo_ts } @@ -100379,12 +100377,12 @@ func _evalexpr(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { return __ccgo_ts } s = _evalbinop(tls, st, s, 0, d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') { return s } a = (*Tst)(unsafe.Pointer(st)).Fr s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(':') { return __ccgo_ts } b = (*Tst)(unsafe.Pointer(st)).Fr @@ -100410,10 +100408,10 @@ func X__pleval(tls *TLS, s uintptr, n uint32) (r uint32) { _ = v1 (*(*Tst)(unsafe.Pointer(bp))).Fn = n s = _evalexpr(tls, bp, s, int32(100)) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(';') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(';') { v1 = (*(*Tst)(unsafe.Pointer(bp))).Fr } else { - v1 = uint32(-Int32FromInt32(1)) + v1 = Uint32FromInt32(-Int32FromInt32(1)) } return v1 } @@ -100433,7 +100431,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { var _ /* part at bp+24 */ [24]uint8 var _ /* tmp_locale at bp+0 */ t__locale_struct _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, l, lm, lm1, p, part1, ret, s, same, z, v3, v4, v5, v6 - if uint32(cat) > uint32(LC_ALL) { + if Uint32FromInt32(cat) > uint32(LC_ALL) { return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&X__locale_lock))) @@ -100453,7 +100451,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { } z = X__strchrnul(tls, p, int32(';')) if int32(z)-int32(p) <= int32(LOCALE_NAME_MAX) { - _memcpy(tls, bp+24, p, uint32(int32(z)-int32(p))) + _memcpy(tls, bp+24, p, Uint32FromInt32(int32(z)-int32(p))) (*(*[24]uint8)(unsafe.Pointer(bp + 24)))[int32(z)-int32(p)] = uint8(0) if *(*uint8)(unsafe.Pointer(z)) != 0 { p = z + uintptr(1) @@ -100567,7 +100565,7 @@ _3: if !(n != 0 && *(*uint8)(unsafe.Pointer(fmt)) != 0) { goto _1 } - if !(int32(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { goto _4 } goto literal @@ -100583,7 +100581,7 @@ literal: _4: ; fmt++ - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { goto literal } fill = int32(' ') @@ -100592,11 +100590,11 @@ _4: nosym = 0 left = 0 for { - switch int32(*(*uint8)(unsafe.Pointer(fmt))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) { case int32('='): fmt++ v8 = fmt - fill = int32(*(*uint8)(unsafe.Pointer(v8))) + fill = Int32FromUint8(*(*uint8)(unsafe.Pointer(v8))) goto _7 case int32('^'): nogrp = int32(1) @@ -100624,7 +100622,7 @@ _4: if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - fw = int32(10)*fw + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + fw = int32(10)*fw + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _9 _9: ; @@ -100632,28 +100630,28 @@ _4: } lp = 0 rp = int32(2) - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { lp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - lp = int32(10)*lp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + lp = int32(10)*lp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _10 _10: ; fmt++ } } - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { rp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - rp = int32(10)*rp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + rp = int32(10)*rp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _11 _11: ; @@ -100662,13 +100660,13 @@ _4: } v12 = fmt fmt++ - intl = BoolInt32(int32(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) + intl = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) w = lp + int32(1) + rp if !(left != 0) && fw > w { w = fw } x = VaFloat64(&ap) - l = uint32(Xsnprintf(tls, s, n, __ccgo_ts+485, VaList(bp+8, w, rp, x))) + l = Uint32FromInt32(Xsnprintf(tls, s, n, __ccgo_ts+485, VaList(bp+8, w, rp, x))) if l >= n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(E2BIG) return -int32(1) @@ -100839,7 +100837,7 @@ func Xtextdomain(tls *TLS, domainname uintptr) (r uintptr) { return uintptr(0) } if !(_current_domain != 0) { - _current_domain = Xmalloc(tls, uint32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + _current_domain = Xmalloc(tls, Uint32FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if !(_current_domain != 0) { return uintptr(0) } @@ -100975,7 +100973,7 @@ func Xreallocarray(tls *TLS, ptr uintptr, m Tsize_t, n Tsize_t) (r uintptr) { trc("tls=%v ptr=%v m=%v n=%v, (%v:)", tls, ptr, m, n, origin(2)) defer func() { trc("-> %v", r) }() } - if n != 0 && m > uint32(-Int32FromInt32(1))/n { + if n != 0 && m > Uint32FromInt32(-Int32FromInt32(1))/n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -101049,7 +101047,7 @@ func X__expo2(tls *TLS, x float64, sign float64) (r float64) { var v1 Tuint64_t _, _ = scale, v1 /* note that k is odd and scale*scale overflows */ - v1 = uint64(uint32(Int32FromInt32(0x3ff)+_k2/Int32FromInt32(2))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(e != 0) { if *(*Tuint64_t)(unsafe.Pointer(bp))<> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(e != 0) { if *(*Tuint32_t)(unsafe.Pointer(bp))<> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix <= uint32(0x400f6a7a) { /* |x| ~<= 5pi/4 */ if ix&uint32(0xfffff) == uint32(0x921fb) { /* |x| ~= pi/2 or 2pi/2 */ @@ -101458,8 +101456,8 @@ medium: } *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - ex = int32(ix >> int32(20)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ex = Int32FromUint32(ix >> int32(20)) if ex-ey > int32(16) { /* 2nd round, good to 118 bits */ t = r w = fn * _pio2_2 @@ -101467,7 +101465,7 @@ medium: w = fn*_pio2_2t - (t - r - w) *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if ex-ey > int32(49) { /* 3rd round, good to 151 bits, covers all cases */ t = r w = fn * _pio2_3 @@ -101491,8 +101489,8 @@ _1: } /* set z = scalbn(|x|,-ilogb(x)+23) */ *(*float64)(unsafe.Pointer(bp)) = x - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) >> Int32FromInt32(12) - *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) >> Int32FromInt32(12) + *(*Tuint64_t)(unsafe.Pointer(bp)) |= Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) z = *(*float64)(unsafe.Pointer(bp)) i = 0 for { @@ -101511,7 +101509,7 @@ _1: for (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] == float64(0) { i-- } - n = X__rem_pio2_large(tls, bp+8, bp+32, int32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) + n = X__rem_pio2_large(tls, bp+8, bp+32, Int32FromUint32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) if sign != 0 { *(*float64)(unsafe.Pointer(y)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[0] *(*float64)(unsafe.Pointer(y + 1*8)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[int32(1)] @@ -102083,9 +102081,9 @@ func X__rem_pio2f(tls *TLS, x float32, y uintptr) (r int32) { return 0 } /* scale x into [2^23, 2^24-1] */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) - e0 = int32(ix>>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ - *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - uint32(e0<> int32(31)) + e0 = Int32FromUint32(ix>>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - Uint32FromInt32(e0<> int32(63)) + return Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) } // C documentation @@ -102148,7 +102146,7 @@ func X__signbitf(tls *TLS, x float32) (r int32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - return int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + return Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) } func X__signbitl(tls *TLS, x float64) (r int32) { @@ -102241,7 +102239,7 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) big = BoolInt32(hx&uint32(0x7fffffff) >= uint32(0x3FE59428)) /* |x| >= 0.6744 */ if big != 0 { - sign = int32(hx >> int32(31)) + sign = Int32FromUint32(hx >> int32(31)) if sign != 0 { x = -x y = -y @@ -102276,13 +102274,13 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { } /* -1.0/(x+r) has up to 2ulp error, so compute it accurately */ w0 = w - v2 = *(*Tuint64_t)(unsafe.Pointer(&w0))>>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) /* x < 1 domain error is handled in the called functions */ - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| < 2, up to 2ulp error in [1,1.125] */ return Xlog1p(tls, x-Float64FromInt32(1)+Xsqrt(tls, (x-Float64FromInt32(1))*(x-Float64FromInt32(1))+Float64FromInt32(2)*(x-Float64FromInt32(1)))) } - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| < 0x1p26 */ return Xlog(tls, Float64FromInt32(2)*x-Float64FromInt32(1)/(x+Xsqrt(tls, x*x-Float64FromInt32(1)))) } @@ -102531,12 +102529,12 @@ func Xacoshf(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x a = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - if a < uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { - if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { @@ -102779,15 +102777,15 @@ func Xasinhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i x3 = *(*float32)(unsafe.Pointer(bp)) - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { - if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { @@ -103045,7 +103043,7 @@ _2: } } /* |y/x| > 0x1p64 */ - if ix+uint32(Int32FromInt32(64)< 0x1p26 */ - if ix+uint32(Int32FromInt32(26)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) y3 = *(*float64)(unsafe.Pointer(bp)) - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { /* handle underflow */ if e == uint32(0) { if uint32(4) == uint32(4) { @@ -103407,10 +103405,10 @@ func Xatanhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) y3 = *(*float32)(unsafe.Pointer(bp)) - if *(*Tuint32_t)(unsafe.Pointer(bp)) < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(1)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -103716,12 +103714,12 @@ func Xceilf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -103890,7 +103888,7 @@ func Xcos(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) @@ -103984,7 +103982,7 @@ func Xcosf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -104033,12 +104031,12 @@ func Xcosh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(2) */ if w < uint32(0x3fe62e42) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -104286,7 +104284,7 @@ func Xerfc(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104431,7 +104429,7 @@ func Xerff(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -104471,7 +104469,7 @@ func Xerfcf(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104639,7 +104637,7 @@ _3: kd -= X__exp_data.Fshift r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<>int32(52)&uint64(0x7ff) < uint64(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { + if *(*Tuint64_t)(unsafe.Pointer(bp + 8))>>int32(52)&uint64(0x7ff) < Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { if !(y != 0) { return _p10[int32(*(*float64)(unsafe.Pointer(bp)))+int32(15)] } @@ -104769,7 +104767,7 @@ func Xexp10f(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp + 4)) = *(*float32)(unsafe.Pointer(bp)) /* fabsf(n) < 8 without raising invalid on nan */ - if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < uint32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { + if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { if !(y != 0) { return _p101[int32(*(*float32)(unsafe.Pointer(bp)))+int32(7)] } @@ -104936,7 +104934,7 @@ _5: kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4043687A) { /* if |x|>=56*ln2 */ *(*float64)(unsafe.Pointer(bp)) = x3 @@ -105277,7 +105275,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return float64(1) + float64(2)*(x3-e) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ twopk = *(*float64)(unsafe.Pointer(bp + 8)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + float64(1) @@ -105288,7 +105286,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return y3 - float64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { @@ -105334,7 +105332,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4195b844) { /* if |x|>=27*ln2 */ if hx > uint32(0x7f800000) { /* NaN */ @@ -105412,7 +105410,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return Float32FromFloat32(1) + Float32FromFloat32(2)*(x3-e) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) + k) << int32(23)) /* 2^k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) + k) << int32(23)) /* 2^k */ twopk = *(*float32)(unsafe.Pointer(bp)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + Float32FromFloat32(1) @@ -105423,7 +105421,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return y3 - Float32FromFloat32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { y3 = (x3 - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk } else { @@ -105650,7 +105648,7 @@ func Xfloor(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -105710,12 +105708,12 @@ func Xfloorf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -105778,13 +105776,13 @@ func _normalize(tls *TLS, x float64) (r Tnum) { var v1 float64 _, _, _, _, _ = e, ix, sign, v1, v2 ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - e = int32(ix >> int32(52)) + e = Int32FromUint64(ix >> int32(52)) sign = e & int32(0x800) e &= int32(0x7ff) if !(e != 0) { v1 = x * float64(9.223372036854776e+18) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) - e = int32(ix >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(ix >> int32(52) & uint64(0x7ff)) if e != 0 { v2 = e - int32(63) } else { @@ -105942,7 +105940,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { } e -= d /* convert to double */ - i = int64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ + i = Int64FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ if sign != 0 { i = -i } @@ -105964,7 +105962,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { /* one bit is lost when scaled, add another top bit to only round once at conversion if it is inexact */ if *(*Tuint64_t)(unsafe.Pointer(bp))<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) + i = Int64FromUint64((*(*Tuint64_t)(unsafe.Pointer(bp))>>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) if sign != 0 { i = -i } @@ -106037,12 +106035,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = y } else { v9 = x @@ -106094,12 +106092,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = y } else { v9 = x @@ -106160,12 +106158,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = x } else { v9 = y @@ -106217,12 +106215,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = x } else { v9 = y @@ -106292,9 +106290,9 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* in the followings uxi should be ux.i, but then gcc wrongly adds */ /* float load/store to inner loops ruining performance and code size */ uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) @@ -106326,7 +106324,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ex-- i <<= uint64(1) } - uxi <<= uint64(-ex + int32(1)) + uxi <<= Uint64FromInt32(-ex + int32(1)) } else { uxi &= -Uint64FromUint64(1) >> Int32FromInt32(12) uxi |= Uint64FromUint64(1) << Int32FromInt32(52) @@ -106343,7 +106341,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ey-- i <<= uint64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= uint64(-ey + int32(1)) + *(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= Uint64FromInt32(-ey + int32(1)) } else { *(*Tuint64_t)(unsafe.Pointer(bp + 16)) &= -Uint64FromUint64(1) >> Int32FromInt32(12) *(*Tuint64_t)(unsafe.Pointer(bp + 16)) |= Uint64FromUint64(1) << Int32FromInt32(52) @@ -106386,11 +106384,11 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { /* scale result */ if ex > 0 { uxi -= Uint64FromUint64(1) << Int32FromInt32(52) - uxi |= uint64(ex) << int32(52) + uxi |= Uint64FromInt32(ex) << int32(52) } else { - uxi >>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } - uxi |= uint64(sx) << int32(63) + uxi |= Uint64FromInt32(sx) << int32(63) *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi return *(*float64)(unsafe.Pointer(bp + 8)) } @@ -106435,8 +106433,8 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) sx = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) & uint32(0x80000000) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106484,7 +106482,7 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106527,9 +106525,9 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { /* scale result up */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } uxi |= sx *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi @@ -106568,7 +106566,7 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { Fd float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ee = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(ee != 0) { if x != 0 { x = Xfrexp(tls, x*float64(1.8446744073709552e+19), e) @@ -106610,7 +106608,7 @@ func Xfrexpf(tls *TLS, x float32, e uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + ee = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(ee != 0) { if x != 0 { x = Xfrexpf(tls, float32(float64(x)*float64(1.8446744073709552e+19)), e) @@ -106726,8 +106724,8 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) { })(unsafe.Pointer(bp + 8)) = ut } /* special cases */ - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) x = *(*float64)(unsafe.Pointer(bp)) y = *(*float64)(unsafe.Pointer(bp + 8)) /* note: hypot(inf,nan) == inf */ @@ -106819,19 +106817,19 @@ func Xhypotf(tls *TLS, x float32, y float32) (r float32) { } x = *(*float32)(unsafe.Pointer(bp)) y = *(*float32)(unsafe.Pointer(bp + 4)) - if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(25)<= Uint32FromInt32(Int32FromInt32(0xff)<= Uint32FromInt32(Int32FromInt32(25)<= uint32((Int32FromInt32(0x7f)+Int32FromInt32(60))<= Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(60))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { i <<= uint64(12) if i == uint64(0) { @@ -106950,7 +106948,7 @@ func Xilogbf(tls *TLS, x3 float32) (r int32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) - e = int32(i >> int32(23) & uint32(0xff)) + e = Int32FromUint32(i >> int32(23) & uint32(0xff)) if !(e != 0) { i <<= uint32(9) if i == uint32(0) { @@ -107758,7 +107756,7 @@ func Xj1(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { return Float64FromInt32(1) / (x * x) @@ -108094,7 +108092,7 @@ func Xj1f(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return Float32FromInt32(1) / (x * x) @@ -108383,7 +108381,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108585,7 +108583,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108679,7 +108677,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { var ix Tuint32_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = a, b, h, i, ix, k, nf, nm1, q0, q1, sign, t, temp, tmp, w, z, v6 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108844,7 +108842,7 @@ func Xynf(tls *TLS, n int32, x float32) (r float32) { var ib, ix Tuint32_t _, _, _, _, _, _, _, _, _, _ = a, b, i, ib, ix, nm1, sign, temp, v1, v3 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -109049,12 +109047,12 @@ func X__lgamma_r(tls *TLS, x float64, signgamp uintptr) (r1 float64) { *(*float64)(unsafe.Pointer(bp)) = x /* purge off +-inf, NaN, +-0, tiny and negative arguments */ *(*int32)(unsafe.Pointer(signgamp)) = int32(1) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix >= uint32(0x7ff00000) { return x * x } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(70))<> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) ix = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return x * x @@ -109590,7 +109588,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109611,8 +109609,8 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<>Int32FromInt32(20)) - int32(0x3ff) + hx += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k += Int32FromUint32(hx>>Int32FromInt32(20)) - int32(0x3ff) hx = hx&uint32(0x000fffff) + uint32(0x3fe6a09e) *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(hx)<>Int32FromInt32(23)) - int32(0x7f) + ix += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k += Int32FromUint32(ix>>Int32FromInt32(23)) - int32(0x7f) ix = ix&uint32(0x007fffff) + uint32(0x3f3504f3) *(*Tuint32_t)(unsafe.Pointer(bp)) = ix x = *(*float32)(unsafe.Pointer(bp)) @@ -109889,7 +109887,7 @@ func Xlog1p(tls *TLS, x3 float64) (r float64) { } /* log1p(-1) = -inf */ return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } - if hx<> int32(32)) - hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) - k = int32(hu>>Int32FromInt32(20)) - int32(0x3ff) + hu += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k = Int32FromUint32(hu>>Int32FromInt32(20)) - int32(0x3ff) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(54) { if k >= int32(2) { @@ -109989,7 +109987,7 @@ func Xlog1pf(tls *TLS, x3 float32) (r float32) { } /* log1p(-1)=+inf */ return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } - if ix<>Int32FromInt32(23)) - int32(0x7f) + iu += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k = Int32FromUint32(iu>>Int32FromInt32(23)) - int32(0x7f) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(25) { if k >= int32(2) { @@ -110114,7 +110112,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { _9: return v8 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -110135,8 +110133,8 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -110245,16 +110243,16 @@ func Xlog2f(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + k = Int32FromUint32(tmp) >> int32(23) /* arithmetic shift */ invc = (*(*struct { F__ccgo_align [0]uint32 Finvc float64 @@ -110434,7 +110432,7 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) } - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -110448,14 +110446,14 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % uint32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + i = Int32FromUint32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ iz = ix - tmp&uint32(0xff800000) invc = (*(*struct { F__ccgo_align [0]uint32 @@ -110634,7 +110632,7 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) /* no fractional part */ if e >= int32(52) { *(*float64)(unsafe.Pointer(iptr)) = x @@ -110683,7 +110681,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) /* no fractional part */ if e >= int32(23) { *(*float32)(unsafe.Pointer(iptr)) = x @@ -110699,7 +110697,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { *(*float32)(unsafe.Pointer(iptr)) = *(*float32)(unsafe.Pointer(bp)) return x } - mask = uint32(int32(0x007fffff) >> e) + mask = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&mask == uint32(0) { *(*float32)(unsafe.Pointer(iptr)) = x *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x80000000) @@ -110829,7 +110827,7 @@ _2: *(*Tuint64_t)(unsafe.Pointer(bp + 8))++ } } - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) /* raise overflow if ux.f is infinite and x is finite */ if e == int32(0x7ff) { if uint32(8) == uint32(4) { @@ -111031,7 +111029,7 @@ _2: v6 = *(*uint64)(unsafe.Pointer(bp + 8)) goto _7 _7: - if int32(v6>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v6>>Int32FromInt32(63)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16)) |= uint32(0x80000000) } } else { @@ -111040,7 +111038,7 @@ _2: v8 = *(*uint32)(unsafe.Pointer(bp)) goto _9 _9: - if int32(v8>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v8>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ @@ -111050,7 +111048,7 @@ _2: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- @@ -111125,8 +111123,8 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF2) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(iy >> int32(52) & uint64(0x7ff)) if e < int32(0x3ff) { return 0 } @@ -111375,7 +111373,7 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) topx = _top124(tls, x1) topy = _top124(tls, y1) - if topx-uint32(0x001) >= uint32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topx-uint32(0x001) >= Uint32FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1. */ /* Special cases: (x < 0x1p-126 or inf or nan) or @@ -111431,12 +111429,12 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { return X__math_invalid(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) + sign_bias = Uint32FromInt32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) } ix &= uint64(0x7fffffffffffffff) topx &= uint32(0x7ff) } - if topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: sign_bias == 0 here because y is not odd. */ v10 = float64(1) if ix == *(*Tuint64_t)(unsafe.Pointer(&v10)) { @@ -111530,10 +111528,10 @@ func _log2_inline(tls *TLS, ix Tuint32_t) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF3) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ + k = Int32FromUint32(top) >> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ invc = (*(*struct { F__ccgo_align [0]uint32 Finvc float64 @@ -111581,7 +111579,7 @@ _2: kd -= X__exp2f_data.Fshift_scaled /* k/N */ r = xd - kd /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */ - t = *(*Tuint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + uintptr(ki%uint64(Int32FromInt32(1)<> int32(23) & uint32(0xff)) + e = Int32FromUint32(iy >> int32(23) & uint32(0xff)) if e < int32(0x7f) { return 0 } if e > Int32FromInt32(0x7f)+Int32FromInt32(23) { return int32(2) } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { return 0 } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { return int32(1) } return int32(2) @@ -111639,7 +111637,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { sign_bias = uint32(0) ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) iy = *(*Tuint32_t)(unsafe.Pointer(&y1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ if _zeroinfnan1(tls, iy) != 0 { if uint32(2)*iy == uint32(0) { @@ -111651,10 +111649,10 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { return x1 + y1 } - if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { + if uint32(2)*ix == Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) } - if BoolInt32(uint32(2)*ix < uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { + if BoolInt32(uint32(2)*ix < Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { return Float32FromFloat32(0) } /* |x|<1 && y==inf or |x|>1 && y==-inf. */ return y1 * y1 @@ -111685,7 +111683,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { return X__math_invalidf(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) + sign_bias = Uint32FromInt32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) } ix &= uint32(0x7fffffff) } @@ -111694,7 +111692,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } } logx = _log2_inline(tls, ix) @@ -111826,10 +111824,10 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) - sy = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sy = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint64_t)(unsafe.Pointer(bp + 16))<> Int32FromInt32(12) uxi |= Uint64FromUint64(1) << Int32FromInt32(52) @@ -111874,7 +111872,7 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { ey-- i <<= uint64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= uint64(-ey + int32(1)) + *(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= Uint64FromInt32(-ey + int32(1)) } else { *(*Tuint64_t)(unsafe.Pointer(bp + 16)) &= -Uint64FromUint64(1) >> Int32FromInt32(12) *(*Tuint64_t)(unsafe.Pointer(bp + 16)) |= Uint64FromUint64(1) << Int32FromInt32(52) @@ -111928,9 +111926,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint64FromUint64(1) << Int32FromInt32(52) - uxi |= uint64(ex) << int32(52) + uxi |= Uint64FromInt32(ex) << int32(52) } else { - uxi >>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi x = *(*float64)(unsafe.Pointer(bp + 8)) @@ -111943,9 +111941,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -111997,10 +111995,10 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) - sx = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) - sy = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + sx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) + sy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -112045,7 +112043,7 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -112099,9 +112097,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi x = *(*float32)(unsafe.Pointer(bp + 4)) @@ -112114,9 +112112,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -112165,8 +112163,8 @@ func Xrint(tls *TLS, x float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - s = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + s = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x } @@ -112214,8 +112212,8 @@ func Xrintf(tls *TLS, x float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) - s = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + s = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x } @@ -112276,7 +112274,7 @@ func Xround(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x3 } @@ -112341,7 +112339,7 @@ func Xroundf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x3 } @@ -112567,7 +112565,7 @@ func Xscalbn(tls *TLS, x float64, n int32) (r float64) { } } } - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(Int32FromInt32(0x3ff)+n) << int32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) = Uint64FromInt32(Int32FromInt32(0x3ff)+n) << int32(52) x = y * *(*float64)(unsafe.Pointer(bp)) return x } @@ -112609,7 +112607,7 @@ func Xscalbnf(tls *TLS, x float32, n int32) (r float32) { } } } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32(Int32FromInt32(0x7f)+n) << int32(23) + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32(Int32FromInt32(0x7f)+n) << int32(23) x = y * *(*float32)(unsafe.Pointer(bp)) return x } @@ -112691,7 +112689,7 @@ func Xsin(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) @@ -112764,7 +112762,7 @@ func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) s = X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) c = X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) switch n & Uint32FromInt32(3) { @@ -112911,7 +112909,7 @@ func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) s = X__sindf(tls, *(*float64)(unsafe.Pointer(bp))) c = X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) switch n & Uint32FromInt32(3) { @@ -112973,7 +112971,7 @@ func Xsinf(tls *TLS, x3 float32) (r float32) { var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ @@ -113093,14 +113091,14 @@ func Xsinh(tls *TLS, x float64) (r float64) { h = -h } /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) absx = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(DBL_MAX) */ if w < uint32(0x40862e42) { t = Xexpm1(tls, absx) if w < uint32(0x3ff00000) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<> int32(52) - if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { + if top-uint64(0x001) >= Uint64FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return x1 @@ -113234,7 +113232,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { x = 4^e m; with integer e, and m in [1, 4) m: fixed point representation [2.62] 2^e is the exponent part of the result. */ - even = int32(top & uint64(1)) + even = Int32FromUint64(top & uint64(1)) m = ix<>= uint64(1) @@ -113278,7 +113276,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { /* handle rounding modes and inexact exception: only (s+1)^2 == 2^42 m case is exact otherwise add a tiny value to cause the fenv effects. */ - tiny = uint64(v2) + tiny = Uint64FromInt64(v2) tiny |= (d1 ^ d2) & uint64(0x8000000000000000) t = *(*float64)(unsafe.Pointer(&tiny)) y = y1 + t @@ -113363,7 +113361,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { var v3 int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, t, tiny, u, y, y1, v1, v2, v3, v4 ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return x1 @@ -113377,7 +113375,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 4^e m; with int e and m in [1, 4). */ even = ix & uint32(0x00800000) @@ -113391,7 +113389,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { m = v2 /* 2^e is the exponent part of the return value. */ ey = ix >> int32(1) - ey += uint32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) + ey += Uint32FromInt32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) ey &= uint32(0x7f800000) i = ix >> Int32FromInt32(17) % uint32(128) r = uint32(X__rsqrt_tab[i]) << int32(16) @@ -113423,7 +113421,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { v3 = int32(0x01000000) } /* handle rounding and inexact exception. */ - tiny = uint32(v3) + tiny = Uint32FromInt32(v3) tiny |= (d1 ^ d2) & uint32(0x80000000) t = *(*float32)(unsafe.Pointer(&tiny)) y = y1 + t @@ -113498,8 +113496,8 @@ func Xtan(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) - return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) + return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], Int32FromUint32(n&uint32(1))) } const M_PI_29 = 1.5707963267948966 @@ -113599,8 +113597,8 @@ func Xtanf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x3, bp)) - return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) + return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), Int32FromUint32(n&uint32(1))) } const M_PI_210 = 0 @@ -113640,8 +113638,8 @@ func Xtanh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { @@ -113713,7 +113711,7 @@ func Xtanhf(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) @@ -113941,13 +113939,13 @@ func Xtgamma(tls *TLS, x3 float64) (r1 float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ return x3 + float64(X__builtin_inff(tls)) } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { return x3 } @@ -114103,7 +114101,7 @@ func Xtruncf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { return x3 } @@ -114152,18 +114150,18 @@ func Xa64l(tls *TLS, s uintptr) (r int32) { if !(e < int32(36) && *(*uint8)(unsafe.Pointer(s)) != 0) { break } - d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), int32(*(*uint8)(unsafe.Pointer(s)))) + d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) if !(d != 0) { break } - x |= uint32(int32(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e + x |= Uint32FromInt32(int32(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e goto _1 _1: ; e += int32(6) s++ } - return int32(x) + return Int32FromUint32(x) } func Xl64a(tls *TLS, x0 int32) (r uintptr) { @@ -114174,7 +114172,7 @@ func Xl64a(tls *TLS, x0 int32) (r uintptr) { var p uintptr var x Tuint32_t _, _ = p, x - x = uint32(x0) + x = Uint32FromInt32(x0) p = uintptr(unsafe.Pointer(&_s)) for { if !(x != 0) { @@ -114205,7 +114203,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint32(1) for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) @@ -114215,7 +114213,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint32(1))))) != int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint32(1))))) != int32('/')) { break } goto _2 @@ -114246,7 +114244,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint32(1) for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -114258,7 +114256,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { break } if !(i != 0) { @@ -114270,7 +114268,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -114295,7 +114293,7 @@ func Xffs(tls *TLS, i int32) (r int32) { var v5 Tuint32_t _, _, _, _, _ = v1, v2, v3, v5, v6 if i != 0 { - v2 = uint32(i) + v2 = Uint32FromInt32(i) v5 = v2 v6 = int32(31) - _a_clz_32(tls, v5&-v5) goto _7 @@ -114320,7 +114318,7 @@ func Xffsl(tls *TLS, i int32) (r int32) { var v5 Tuint32_t _, _, _, _, _ = v1, v2, v3, v5, v6 if i != 0 { - v2 = uint32(i) + v2 = Uint32FromInt32(i) v5 = v2 v6 = int32(31) - _a_clz_32(tls, v5&-v5) goto _7 @@ -114345,7 +114343,7 @@ func Xffsll(tls *TLS, i int64) (r int32) { var v2 Tuint64_t _, _, _, _, _, _, _, _ = y, v1, v2, v3, v5, v6, v8, v9 if i != 0 { - v2 = uint64(i) + v2 = Uint64FromInt64(i) if Uint32FromInt64(4) < Uint32FromInt32(8) { y = uint32(v2) if !(y != 0) { @@ -114364,7 +114362,7 @@ func Xffsll(tls *TLS, i int64) (r int32) { v3 = v9 goto _4 } - v3 = int32(_debruijn64[v2&-v2*uint64(0x022fdd63cc95386d)>>int32(58)]) + v3 = Int32FromUint8(_debruijn64[v2&-v2*uint64(0x022fdd63cc95386d)>>int32(58)]) goto _4 _4: v1 = v3 + int32(1) @@ -114472,10 +114470,10 @@ func __strcolcmp(tls *TLS, lstr uintptr, bstr uintptr) (r int32) { var i Tsize_t _ = i i = uint32(0) - for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { + for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { i++ } - if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { + if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { return int32(1) } return 0 @@ -114760,7 +114758,7 @@ func Xgetentropy(tls *TLS, buffer uintptr, len1 Tsize_t) (r int32) { } } pos += uintptr(ret) - len1 -= uint32(ret) + len1 -= Uint32FromInt32(ret) ret = 0 } _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) @@ -114830,8 +114828,8 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if Xoptind >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4))))) != int32('-') { - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4))))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { v1 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v1)*4)) @@ -114842,7 +114840,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 2)) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 2)) != 0) { Xoptind++ return -Int32FromInt32(1) } @@ -114861,7 +114859,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { Xoptind++ X__optpos = 0 } - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { optstring++ } i = 0 @@ -114875,15 +114873,15 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { } } if *(*Twchar_t)(unsafe.Pointer(bp + 4)) != *(*Twchar_t)(unsafe.Pointer(bp)) || *(*Twchar_t)(unsafe.Pointer(bp)) == uint32(':') { - Xoptopt = int32(*(*Twchar_t)(unsafe.Pointer(bp))) - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+611, optchar, uint32(k)) + Xoptopt = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+611, optchar, Uint32FromInt32(k)) } return int32('?') } - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { Xoptarg = uintptr(0) - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { v3 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v3)*4)) @@ -114893,17 +114891,17 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { X__optpos = 0 } if Xoptind > argc { - Xoptopt = int32(*(*Twchar_t)(unsafe.Pointer(bp))) - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { + Xoptopt = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { return int32(':') } if Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+635, optchar, uint32(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+635, optchar, Uint32FromInt32(k)) } return int32('?') } } - return int32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) } func X__posix_getopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { @@ -114957,13 +114955,13 @@ func ___getopt_long(tls *TLS, argc int32, argv uintptr, optstring uintptr, longo return -int32(1) } skipped = Xoptind - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { i = Xoptind for { if i >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4)) + 1)) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4)) + 1)) != 0 { break } goto _1 @@ -114998,8 +114996,8 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, var cnt, colon, i, j, l, match, v2 int32 _, _, _, _, _, _, _, _, _, _, _, _, _ = arg, cnt, colon, i, j, l, match, name, opt, start, v2, v5, v6 Xoptarg = uintptr(0) - if longopts != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 2)) != 0) { - colon = BoolInt32(int32(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) + if longopts != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 2)) != 0) { + colon = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) start = *(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + uintptr(1) v2 = Int32FromInt32(0) i = v2 @@ -115010,14 +115008,14 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } name = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*16))).Fname opt = start - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { opt++ } - for *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && int32(*(*uint8)(unsafe.Pointer(opt))) == int32(*(*uint8)(unsafe.Pointer(name))) { + for *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) { name++ opt++ } - if *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { + if *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { goto _1 } arg = opt @@ -115041,7 +115039,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } j = 0 for { - if !(j < l && int32(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { + if !(j < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { break } goto _4 @@ -115063,7 +115061,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, i = match opt = arg Xoptind++ - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { if !((*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*16))).Fhas_arg != 0) { Xoptopt = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*16))).Fval if colon != 0 || !(Xopterr != 0) { @@ -115100,7 +115098,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } return (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*16))).Fval } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*4)) + 1))) == int32('-') { Xoptopt = 0 if !(colon != 0) && Xopterr != 0 { if cnt != 0 { @@ -115140,7 +115138,7 @@ func Xgetpriority(tls *TLS, which int32, who Tid_t) (r int32) { } var ret int32 _ = ret - ret = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_getpriority), which, int32(who)))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_getpriority), which, Int32FromUint32(who)))) if ret < 0 { return ret } @@ -115152,7 +115150,7 @@ func Xgetresgid(tls *TLS, rgid uintptr, egid uintptr, sgid uintptr) (r int32) { trc("tls=%v rgid=%v egid=%v sgid=%v, (%v:)", tls, rgid, egid, sgid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_getresgid32), int32(rgid), int32(egid), int32(sgid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_getresgid32), int32(rgid), int32(egid), int32(sgid)))) } func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { @@ -115160,7 +115158,7 @@ func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { trc("tls=%v ruid=%v euid=%v suid=%v, (%v:)", tls, ruid, euid, suid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_getresuid32), int32(ruid), int32(euid), int32(suid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_getresuid32), int32(ruid), int32(euid), int32(suid)))) } func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { @@ -115174,7 +115172,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { var v1, v2 uint64 var _ /* k_rlim at bp+0 */ [2]uint32 _, _, _ = ret, v1, v2 - ret = X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_prlimit64), Int32FromInt32(0), resource, Int32FromInt32(0), int32(rlim)))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_prlimit64), Int32FromInt32(0), resource, Int32FromInt32(0), int32(rlim)))) if !(ret != 0) { if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur = ^Uint64FromUint64(0) @@ -115186,7 +115184,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { if !(ret != 0) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) { return ret } - if X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_ugetrlimit), resource, int32(bp)))) < 0 { + if X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_ugetrlimit), resource, int32(bp)))) < 0 { return -int32(1) } if (*(*[2]uint32)(unsafe.Pointer(bp)))[0] == -Uint32FromUint32(1) { @@ -115234,7 +115232,7 @@ func Xgetrusage(tls *TLS, who int32, ru uintptr) (r1 int32) { Ftv_usec: int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)]), } } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { @@ -115266,7 +115264,7 @@ func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { if Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(keys + uintptr(i)*4)), s, l) != 0 { goto _3 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { *(*uintptr)(unsafe.Pointer(val)) = s + uintptr(l) + uintptr(1) } else { if *(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0 { @@ -115313,7 +115311,7 @@ type Tv4l2_event = struct { var _compat_map = [20]Tioctl_compat_map{ 0: { - Fnew_req: int32(Uint32FromUint32(2)< %v", r) }() } - return int32(X__libc.Fsecure) + return Int32FromUint8(X__libc.Fsecure) } func Xlockf(tls *TLS, fd int32, op int32, size Toff_t) (r int32) { @@ -115791,7 +115789,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { src = beg for *(*uint8)(unsafe.Pointer(src)) != 0 { cval = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { v1 = dest dest++ v2 = src @@ -115799,7 +115797,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { *(*uint8)(unsafe.Pointer(v1)) = *(*uint8)(unsafe.Pointer(v2)) continue } - if int32(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { src++ v3 = dest dest++ @@ -115814,11 +115812,11 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { if !(i < int32(3)) { break } - if int32(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && int32(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { cval = uint8(int32(cval) << Int32FromInt32(3)) v6 = val val++ - cval = uint8(int32(cval) + (int32(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) + cval = uint8(int32(cval) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) } else { break } @@ -115858,7 +115856,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 use_internal = BoolInt32(linebuf == uintptr(unsafe.Pointer(&_internal_buf))) (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_freq = 0 (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_passno = 0 - for cond := true; cond; cond = int32(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || uint32((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { + for cond := true; cond; cond = Int32FromUint8(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || Uint32FromInt32((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { if use_internal != 0 { Xgetline(tls, uintptr(unsafe.Pointer(&_internal_buf)), uintptr(unsafe.Pointer(&_internal_bufsize)), f) linebuf = _internal_buf @@ -115882,7 +115880,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 if !(i < Uint32FromInt64(32)/Uint32FromInt64(4)) { break } - (*(*[8]int32)(unsafe.Pointer(bp)))[i] = int32(len1) + (*(*[8]int32)(unsafe.Pointer(bp)))[i] = Int32FromUint32(len1) goto _1 _1: ; @@ -115956,7 +115954,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h var _ /* st at bp+0 */ Tstat _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, de, dfd, err, j, k, l, r, type1, v1, v10, v11, v12, v13, v2, v3, v4, v7, v8 l = Xstrlen(tls, path) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint32(1))))) == int32('/') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint32(1))))) == int32('/') { v1 = l - uint32(1) } else { v1 = l @@ -116011,14 +116009,14 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h v4 = 0 } (*(*Thistory)(unsafe.Pointer(bp + 152))).Flevel = v4 - (*(*Thistory)(unsafe.Pointer(bp + 152))).Fbase = int32(j + uint32(1)) + (*(*Thistory)(unsafe.Pointer(bp + 152))).Fbase = Int32FromUint32(j + uint32(1)) (*(*TFTW)(unsafe.Pointer(bp + 184))).Flevel = (*(*Thistory)(unsafe.Pointer(bp + 152))).Flevel if h != 0 { (*(*TFTW)(unsafe.Pointer(bp + 184))).Fbase = (*Thistory)(unsafe.Pointer(h)).Fbase } else { k = j for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { break } goto _5 @@ -116027,7 +116025,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h k-- } for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint32(1))))) != int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint32(1))))) != int32('/')) { break } goto _6 @@ -116035,7 +116033,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h ; k-- } - (*(*TFTW)(unsafe.Pointer(bp + 184))).Fbase = int32(k) + (*(*TFTW)(unsafe.Pointer(bp + 184))).Fbase = Int32FromUint32(k) } if type1 == int32(FTW_D) || type1 == int32(FTW_DP) { dfd = Xopen(tls, path, O_RDONLY, 0) @@ -116079,7 +116077,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h if !(v10 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { continue } if Xstrlen(tls, de+19) >= uint32(PATH_MAX)-l { @@ -116254,12 +116252,12 @@ func X__ptsname_r(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if !(buf != 0) { len1 = uint32(0) } - v1 = X__syscall3(tls, int32(SYS_ioctl), fd, int32(Uint32FromUint32(TIOCGPTN)), int32(bp)) + v1 = X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromUint32(Uint32FromUint32(TIOCGPTN)), int32(bp)) err = v1 if v1 != 0 { return -err } - if uint32(Xsnprintf(tls, buf, len1, __ccgo_ts+824, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { + if Uint32FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+824, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { return int32(ERANGE) } return 0 @@ -116277,10 +116275,10 @@ func _slash_len(tls *TLS, s uintptr) (r Tsize_t) { var s0 uintptr _ = s0 s0 = s - for int32(*(*uint8)(unsafe.Pointer(s))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('/') { s++ } - return uint32(int32(s) - int32(s0)) + return Uint32FromInt32(int32(s) - int32(s0)) } func Xrealpath(tls *TLS, filename uintptr, resolved uintptr) (r uintptr) { @@ -116326,7 +116324,7 @@ _3: ; /* If stack starts with /, the whole component is / or // * and the output state must be reset. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { check_dir = 0 nup = uint32(0) q = uint32(0) @@ -116335,7 +116333,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v4] = uint8('/') p++ /* Initial // is special. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint32(1)]) != int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint32(1)]) != int32('/') { v5 = q q++ (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v5] = uint8('/') @@ -116343,21 +116341,21 @@ _3: goto _2 } z = X__strchrnul(tls, bp+uintptr(p), int32('/')) - v6 = uint32(int32(z) - int32(bp+uintptr(p))) + v6 = Uint32FromInt32(int32(z) - int32(bp+uintptr(p))) l = v6 l0 = v6 if !(l != 0) && !(check_dir != 0) { goto _1 } /* Skip any . component but preserve check_dir status. */ - if l == uint32(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { + if l == uint32(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { p += l goto _2 } /* Copy next component onto output at least temporarily, to * call readlink, but wait to advance output position until * determining it's not a link. */ - if q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint32(1)]) != int32('/') { + if q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint32(1)]) != int32('/') { if !(p != 0) { goto toolong } @@ -116373,7 +116371,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q+l] = uint8(0) p += l up = 0 - if l0 == uint32(2) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint32(2)]) == int32('.') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint32(1)]) == int32('.') { + if l0 == uint32(2) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint32(2)]) == int32('.') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint32(1)]) == int32('.') { up = int32(1) /* Any non-.. path components we could cancel start * after nup repetitions of the 3-byte string "../"; @@ -116391,7 +116389,7 @@ _3: } } k = Xreadlink(tls, bp+4097, bp, p) - if uint32(k) == p { + if Uint32FromInt32(k) == p { goto toolong } if !(k != 0) { @@ -116409,10 +116407,10 @@ skip_readlink: ; check_dir = 0 if up != 0 { - for q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint32(1)]) != int32('/') { + for q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint32(1)]) != int32('/') { q-- } - if q > uint32(1) && (q > uint32(2) || int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { + if q > uint32(1) && (q > uint32(2) || Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { q-- } goto _2 @@ -116420,7 +116418,7 @@ skip_readlink: if l0 != 0 { q += l } - check_dir = int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) + check_dir = Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) goto _2 _8: ; @@ -116432,13 +116430,13 @@ _8: } /* If link contents end in /, strip any slashes already on * stack to avoid /->// or //->/// or spurious toolong. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int32(1)]) == int32('/') { - for int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int32(1)]) == int32('/') { + for Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { p++ } } - p -= uint32(k) - Xmemmove(tls, bp+uintptr(p), bp, uint32(k)) + p -= Uint32FromInt32(k) + Xmemmove(tls, bp+uintptr(p), bp, Uint32FromInt32(k)) /* Skip the stack advancement in case we have a new * absolute base path. */ goto restart @@ -116451,7 +116449,7 @@ _2: _1: ; (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q] = uint8(0) - if int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { + if Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { if !(Xgetcwd(tls, bp, uint32(4097)) != 0) { return uintptr(0) } @@ -116464,7 +116462,7 @@ _1: if !(v10 != 0) { break } - for l > uint32(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint32(1)]) != int32('/') { + for l > uint32(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint32(1)]) != int32('/') { l-- } if l > uint32(1) { @@ -116475,7 +116473,7 @@ _1: p++ } } - if q-p != 0 && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint32(1)]) != int32('/') { + if q-p != 0 && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint32(1)]) != int32('/') { v11 = l l++ (*(*[4097]uint8)(unsafe.Pointer(bp)))[v11] = uint8('/') @@ -116504,7 +116502,7 @@ func Xsetdomainname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_setdomainname), int32(name), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_setdomainname), int32(name), Int32FromUint32(len1)))) } func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { @@ -116512,7 +116510,7 @@ func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { trc("tls=%v which=%v who=%v prio=%v, (%v:)", tls, which, who, prio, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_setpriority), which, int32(who), prio))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_setpriority), which, Int32FromUint32(who), prio))) } type Tctx = struct { @@ -116555,7 +116553,7 @@ func Xsetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { } ret = X__syscall4(tls, int32(SYS_prlimit64), Int32FromInt32(0), resource, int32(rlim), Int32FromInt32(0)) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur < uint64(-Uint32FromUint32(1)) { v1 = (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur @@ -116601,7 +116599,7 @@ func Xsyscall(tls *TLS, n int32, va uintptr) (r int32) { e = VaInt32(&ap) f = VaInt32(&ap) _ = ap - return X__syscall_ret(tls, uint32(X__syscall6(tls, n, a, b, c, d, e, f))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall6(tls, n, a, b, c, d, e, f))) } const AF_ALG = 38 @@ -117026,19 +117024,19 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { pid = v1 l = Xsnprintf(tls, bp+68, uint32(1024), __ccgo_ts+845, VaList(bp+1104, priority, bp, bp+1092, uintptr(unsafe.Pointer(&_log_ident)), __ccgo_ts+867+BoolUintptr(!(pid != 0)), pid, __ccgo_ts+869+BoolUintptr(!(pid != 0)))) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = errno_save - l2 = Xvsnprintf(tls, bp+68+uintptr(l), uint32(1024)-uint32(l), message, ap) + l2 = Xvsnprintf(tls, bp+68+uintptr(l), uint32(1024)-Uint32FromInt32(l), message, ap) if l2 >= 0 { - if uint32(l2) >= uint32(1024)-uint32(l) { - l = int32(Uint32FromInt64(1024) - Uint32FromInt32(1)) + if Uint32FromInt32(l2) >= uint32(1024)-Uint32FromInt32(l) { + l = Int32FromUint32(Uint32FromInt64(1024) - Uint32FromInt32(1)) } else { l += l2 } - if int32((*(*[1024]uint8)(unsafe.Pointer(bp + 68)))[l-int32(1)]) != int32('\n') { + if Int32FromUint8((*(*[1024]uint8)(unsafe.Pointer(bp + 68)))[l-int32(1)]) != int32('\n') { v2 = l l++ (*(*[1024]uint8)(unsafe.Pointer(bp + 68)))[v2] = uint8('\n') } - if Xsend(tls, _log_fd, bp+68, uint32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+68, uint32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { + if Xsend(tls, _log_fd, bp+68, Uint32FromInt32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+68, Uint32FromInt32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { fd = Xopen(tls, __ccgo_ts+564, Int32FromInt32(O_WRONLY)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC), 0) if fd >= 0 { Xdprintf(tls, fd, __ccgo_ts+871, VaList(bp+1104, l-*(*int32)(unsafe.Pointer(bp + 1092)), bp+68+uintptr(*(*int32)(unsafe.Pointer(bp + 1092))))) @@ -117090,7 +117088,7 @@ func Xuname(tls *TLS, uts uintptr) (r int32) { trc("tls=%v uts=%v, (%v:)", tls, uts, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_uname), int32(uts)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_uname), int32(uts)))) } func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -117098,7 +117096,7 @@ func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { trc("tls=%v addr=%v len1=%v advice=%v, (%v:)", tls, addr, len1, advice, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_madvise), int32(addr), int32(len1), advice))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_madvise), int32(addr), Int32FromUint32(len1), advice))) } func Xmadvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -117114,7 +117112,7 @@ func Xmincore(tls *TLS, addr uintptr, len1 Tsize_t, vec uintptr) (r int32) { trc("tls=%v addr=%v len1=%v vec=%v, (%v:)", tls, addr, len1, vec, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mincore), int32(addr), int32(len1), int32(vec)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mincore), int32(addr), Int32FromUint32(len1), int32(vec)))) } func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -117122,7 +117120,7 @@ func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_mlock), int32(addr), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_mlock), int32(addr), Int32FromUint32(len1)))) } func Xmlockall(tls *TLS, flags int32) (r int32) { @@ -117130,7 +117128,7 @@ func Xmlockall(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_mlockall), flags))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_mlockall), flags))) } const OFF_MASK = 4095 @@ -117146,23 +117144,23 @@ func X__mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd } var ret int32 _ = ret - if uint64(off)&(-Uint64FromUint64(0x2000)<<(Uint32FromInt32(8)*Uint32FromInt64(4)-Uint32FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { + if Uint64FromInt64(off)&(-Uint64FromUint64(0x2000)<<(Uint32FromInt32(8)*Uint32FromInt64(4)-Uint32FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } - if len1 >= uint32(Int32FromInt32(INT32_MAX)) { + if len1 >= Uint32FromInt32(Int32FromInt32(INT32_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } if flags&int32(MAP_FIXED) != 0 { _dummy5(tls) } - ret = X__syscall6(tls, int32(SYS_mmap2), int32(start), int32(len1), prot, flags, fd, int32(uint64(off)/Uint64FromUint64(4096))) + ret = X__syscall6(tls, int32(SYS_mmap2), int32(start), Int32FromUint32(len1), prot, flags, fd, Int32FromUint64(Uint64FromInt64(off)/Uint64FromUint64(4096))) /* Fixup incorrect EPERM from kernel. */ if ret == -int32(EPERM) && !(start != 0) && flags&int32(MAP_ANON) != 0 && !(flags&Int32FromInt32(MAP_FIXED) != 0) { ret = -int32(ENOMEM) } - return uintptr(X__syscall_ret(tls, uint32(ret))) + return uintptr(X__syscall_ret(tls, Uint32FromInt32(ret))) } func Xmmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { @@ -117182,7 +117180,7 @@ func X__mprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { _, _ = end, start start = uint32(addr) & -X__libc.Fpage_size end = uint32(addr+uintptr(len1)+uintptr(X__libc.Fpage_size)-UintptrFromInt32(1)) & -X__libc.Fpage_size - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mprotect), int32(start), int32(end-start), prot))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mprotect), Int32FromUint32(start), Int32FromUint32(end-start), prot))) } func Xmprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { @@ -117205,7 +117203,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla var new_addr uintptr _, _ = ap, new_addr new_addr = uintptr(0) - if new_len >= uint32(Int32FromInt32(INT32_MAX)) { + if new_len >= Uint32FromInt32(Int32FromInt32(INT32_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } @@ -117215,7 +117213,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla new_addr = VaUintptr(&ap) _ = ap } - return uintptr(X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_mremap), int32(old_addr), int32(old_len), int32(new_len), flags, int32(new_addr))))) + return uintptr(X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_mremap), int32(old_addr), Int32FromUint32(old_len), Int32FromUint32(new_len), flags, int32(new_addr))))) } func Xmremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, flags int32, va uintptr) (r uintptr) { @@ -117231,7 +117229,7 @@ func Xmsync(tls *TLS, start uintptr, len1 Tsize_t, flags int32) (r int32) { trc("tls=%v start=%v len1=%v flags=%v, (%v:)", tls, start, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_msync), int32(start), int32(len1), flags, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_msync), int32(start), Int32FromUint32(len1), flags, 0, 0, 0))) } func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -117239,7 +117237,7 @@ func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_munlock), int32(addr), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_munlock), int32(addr), Int32FromUint32(len1)))) } func Xmunlockall(tls *TLS) (r int32) { @@ -117247,7 +117245,7 @@ func Xmunlockall(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall0(tls, int32(SYS_munlockall)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall0(tls, int32(SYS_munlockall)))) } func _dummy7(tls *TLS) { @@ -117259,7 +117257,7 @@ func X__munmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { defer func() { trc("-> %v", r) }() } _dummy7(tls) - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_munmap), int32(start), int32(len1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_munmap), int32(start), Int32FromUint32(len1)))) } func Xmunmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { @@ -117278,7 +117276,7 @@ func Xposix_madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32 if advice == int32(MADV_DONTNEED) { return 0 } - return -X__syscall3(tls, int32(SYS_madvise), int32(addr), int32(len1), advice) + return -X__syscall3(tls, int32(SYS_madvise), int32(addr), Int32FromUint32(len1), advice) } func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { @@ -117288,12 +117286,12 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { } var p, v1 uintptr _, _ = p, v1 - for int32(*(*uint8)(unsafe.Pointer(name))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('/') { name++ } v1 = X__strchrnul(tls, name, int32('/')) p = v1 - if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int32(p)-int32(name) <= int32(2) && int32(*(*uint8)(unsafe.Pointer(name))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { + if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int32(p)-int32(name) <= int32(2) && Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -117302,7 +117300,7 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { return uintptr(0) } _memcpy(tls, buf, __ccgo_ts+876, uint32(9)) - _memcpy(tls, buf+uintptr(9), name, uint32(int32(p)-int32(name)+int32(1))) + _memcpy(tls, buf+uintptr(9), name, Uint32FromInt32(int32(p)-int32(name)+int32(1))) return buf } @@ -117369,9 +117367,9 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { var b, v3 int32 var v1, v2 uint32 _, _, _, _ = b, v1, v2, v3 - b = int32(uint8(c)) - if uint32(b) < uint32(128) { - v1 = uint32(b) + b = Int32FromUint8(Uint8FromInt32(c)) + if Uint32FromInt32(b) < uint32(128) { + v1 = Uint32FromInt32(b) } else { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v3 = int32(4) @@ -117379,7 +117377,7 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { v3 = int32(1) } if v3 == int32(1) && c != -int32(1) { - v2 = uint32(Int32FromInt32(0xdfff) & int32(int8(c))) + v2 = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(int8(c))) } else { v2 = uint32(0xffffffff) } @@ -117411,7 +117409,7 @@ func Xc16rtomb(tls *TLS, s uintptr, c16 Tchar16_t, ps uintptr) (r Tsize_t) { return uint32(1) } if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(c16)-uint32(0xd800) < uint32(0x400) { - *(*uint32)(unsafe.Pointer(x)) = uint32((int32(c16) - int32(0xd7c0)) << int32(10)) + *(*uint32)(unsafe.Pointer(x)) = Uint32FromInt32((Int32FromUint16(c16) - int32(0xd7c0)) << int32(10)) return uint32(0) } if *(*uint32)(unsafe.Pointer(x)) != 0 { @@ -117430,7 +117428,7 @@ ilseq: ; *(*uint32)(unsafe.Pointer(x)) = uint32(0) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } var _internal_state uint32 @@ -117488,12 +117486,12 @@ func Xmbrtoc16(tls *TLS, pc16 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } /* mbrtowc states for partial UTF-8 characters have the high bit set; * we use nonzero states without high bit for pending surrogates. */ - if int32(*(*uint32)(unsafe.Pointer(pending))) > 0 { + if Int32FromUint32(*(*uint32)(unsafe.Pointer(pending))) > 0 { if pc16 != 0 { *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*uint32)(unsafe.Pointer(pending))) } *(*uint32)(unsafe.Pointer(pending)) = uint32(0) - return uint32(-Int32FromInt32(3)) + return Uint32FromInt32(-Int32FromInt32(3)) } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint32(4) { @@ -117566,10 +117564,10 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize } } if !(n != 0) { - return uint32(-Int32FromInt32(2)) + return Uint32FromInt32(-Int32FromInt32(2)) } if !(c != 0) { - if int32(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { v1 = uint32(*(*uint8)(unsafe.Pointer(s))) *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolUint32(!!(v1 != 0)) @@ -117580,7 +117578,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize v2 = int32(1) } if v2 == int32(1) { - *(*Twchar_t)(unsafe.Pointer(wc)) = uint32(Int32FromInt32(0xdfff) & int32(int8(*(*uint8)(unsafe.Pointer(s))))) + *(*Twchar_t)(unsafe.Pointer(wc)) = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(Int8FromUint8(*(*uint8)(unsafe.Pointer(s))))) return Uint32FromInt32(1) } if uint32(*(*uint8)(unsafe.Pointer(s)))-uint32(0xc2) > Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117592,7 +117590,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize n-- } if n != 0 { - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } goto loop @@ -117600,7 +117598,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize ; v4 = s s++ - c = c<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _9 } @@ -117881,13 +117879,13 @@ _15: goto resume resume: ; - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _13 } v27 = s s++ - c = c<= uint32(0x40) { s -= uintptr(2) @@ -117895,7 +117893,7 @@ resume: } v28 = s s++ - c = c<= uint32(0x40) { s -= uintptr(3) @@ -117903,7 +117901,7 @@ resume: } v29 = s s++ - c = c< Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117994,12 +117992,12 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { if n < uint32(4) && c<<(uint32(6)*n-uint32(6))&(Uint32FromUint32(1)<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } v4 = s s++ - c = c<= uint32(0x80) { l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(ws2)), uintptr(0)) if !(l+Uint32FromInt32(1) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } n += l } else { @@ -118189,7 +118187,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, s, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint32FromInt32(1) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } s += uintptr(l) n -= l @@ -118210,7 +118208,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint32FromInt32(1) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } if l > n { return N - n @@ -118248,7 +118246,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { var v1 int32 _ = v1 if c < uint32(128) { - return int32(c) + return Int32FromUint32(c) } if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) @@ -118256,7 +118254,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { v1 = int32(1) } if v1 == int32(1) && c-uint32(0xdf80) < uint32(0x80) { - return int32(uint8(c)) + return Int32FromUint8(uint8(c)) } return -int32(1) } @@ -118269,7 +118267,7 @@ func Xwctomb(tls *TLS, s uintptr, wc Twchar_t) (r int32) { if !(s != 0) { return 0 } - return int32(Xwcrtomb(tls, s, wc, uintptr(0))) + return Int32FromUint32(Xwcrtomb(tls, s, wc, uintptr(0))) } func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { @@ -118300,7 +118298,7 @@ func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } type Tucred = struct { @@ -118345,7 +118343,7 @@ func Xaccept4(tls *TLS, fd int32, addr uintptr, len1 uintptr, flg int32) (r1 int v8 = r goto _9 _9: - ret = X__syscall_ret(tls, uint32(v8)) + ret = X__syscall_ret(tls, Uint32FromInt32(v8)) if ret >= 0 || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) && *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(EINVAL) { return ret } @@ -118378,7 +118376,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_bind) v2 = fd v3 = int32(addr) - v4 = int32(len1) + v4 = Int32FromUint32(len1) v5 = Int32FromInt32(0) v6 = Int32FromInt32(0) v7 = Int32FromInt32(0) @@ -118394,7 +118392,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { @@ -118409,7 +118407,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_connect) v2 = fd v3 = int32(addr) - v4 = int32(len1) + v4 = Int32FromUint32(len1) v5 = Int32FromInt32(0) v6 = Int32FromInt32(0) v7 = Int32FromInt32(0) @@ -118425,7 +118423,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } const ADD = 0 @@ -119335,11 +119333,11 @@ func _getoffs(tls *TLS, offs uintptr, base uintptr, s uintptr) (r int32) { _, _ = i, v2 i = 0 for { - for int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { - if int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { return 0 } - s = base + uintptr(int32(*(*uint8)(unsafe.Pointer(s)))&Int32FromInt32(0x3f)< uint32(62) { + if Uint32FromInt32(j-k)-uint32(1) > uint32(62) { return 0 } v3 = i i++ - *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = uint8(j - k) + *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = Uint8FromInt32(j - k) if j == l { return i } @@ -119411,12 +119409,12 @@ func _match(tls *TLS, offset uintptr, base uintptr, dn uintptr, end uintptr, len for { nlen-- v2 = nlen - l = int32(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) + l = Int32FromUint8(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) noff-- v3 = noff o = int32((*(*[128]int16)(unsafe.Pointer(bp)))[v3]) end -= uintptr(l) - if l != int32(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, uint32(l)) != 0 { + if l != Int32FromUint8(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, Uint32FromInt32(l)) != 0 { return m } *(*int32)(unsafe.Pointer(offset)) = o @@ -119450,7 +119448,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l m = 0 bestlen = 0 l = Xstrnlen(tls, src, uint32(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint32(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint32(1))))) == int32('.') { l-- } if l > uint32(253) || space <= 0 { @@ -119461,7 +119459,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l return int32(1) } end = src + uintptr(l) - n = _getlens(tls, bp+4, src, int32(l)) + n = _getlens(tls, bp+4, src, Int32FromUint32(l)) if !(n != 0) { return -int32(1) } @@ -119476,7 +119474,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l if m > bestlen { bestlen = m bestoff = *(*int32)(unsafe.Pointer(bp)) - if uint32(m) == l { + if Uint32FromInt32(m) == l { break } } @@ -119487,15 +119485,15 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l } } /* encode unmatched part */ - if uint32(space) < l-uint32(bestlen)+uint32(2)+BoolUint32(uint32(bestlen-Int32FromInt32(1)) < l-Uint32FromInt32(1)) { + if Uint32FromInt32(space) < l-Uint32FromInt32(bestlen)+uint32(2)+BoolUint32(Uint32FromInt32(bestlen-Int32FromInt32(1)) < l-Uint32FromInt32(1)) { return -int32(1) } - _memcpy(tls, dst+uintptr(1), src, l-uint32(bestlen)) + _memcpy(tls, dst+uintptr(1), src, l-Uint32FromInt32(bestlen)) v3 = Int32FromInt32(0) j = v3 i = v3 for { - if !(uint32(i) < l-uint32(bestlen)) { + if !(Uint32FromInt32(i) < l-Uint32FromInt32(bestlen)) { break } *(*uint8)(unsafe.Pointer(dst + uintptr(i))) = (*(*[127]uint8)(unsafe.Pointer(bp + 4)))[j] @@ -119504,16 +119502,16 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l ; v4 = j j++ - i += int32((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) + i += Int32FromUint8((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) } /* add tail */ if bestlen != 0 { v5 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = uint8(int32(0xc0) | bestoff>>int32(8)) + *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = Uint8FromInt32(int32(0xc0) | bestoff>>int32(8)) v6 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(bestoff) + *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = Uint8FromInt32(bestoff) } else { v7 = i i++ @@ -119561,11 +119559,11 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr break } /* loop invariants: p= int32(end)-int32(p) || j >= int32(dend)-int32(dest) { return -int32(1) } @@ -119634,17 +119632,17 @@ func Xdn_skipname(tls *TLS, s uintptr, end uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { return int32(p) - int32(s) + int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { if p+uintptr(1) < end { return int32(p) - int32(s) + int32(2) } else { break } } else { - if int32(end)-int32(p) < int32(*(*uint8)(unsafe.Pointer(p)))+int32(1) { + if int32(end)-int32(p) < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))+int32(1) { break } else { - p += uintptr(int32(*(*uint8)(unsafe.Pointer(p))) + int32(1)) + p += uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + int32(1)) } } } @@ -119758,12 +119756,12 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if rlen < int32(12) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { return 0 } p = r + uintptr(12) - qdcount = int32(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 5))) - ancount = int32(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 7))) + qdcount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 5))) + ancount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 7))) for { v1 = qdcount qdcount-- @@ -119791,11 +119789,11 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr return -int32(1) } p += uintptr(int32(1) + BoolInt32(!!(*(*uint8)(unsafe.Pointer(p)) != 0))) - len1 = int32(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(p + 9))) + len1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 9))) if len1+int32(10) > int32(r+uintptr(rlen))-int32(p) { return -int32(1) } - if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, int32(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { + if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { return -int32(1) } p += uintptr(int32(10) + len1) @@ -120137,7 +120135,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { break } if ii != 0 { - if int32(*(*uint8)(unsafe.Pointer(x))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != int32(':') { return uintptr(0) } else { x++ @@ -120154,7 +120152,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { ; ii++ } - if int32(*(*uint8)(unsafe.Pointer(x))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != 0 { return uintptr(0) } /* bad format */ *(*Tether_addr)(unsafe.Pointer(p_a)) = *(*Tether_addr)(unsafe.Pointer(bp)) @@ -120192,7 +120190,7 @@ func Xether_ntoa_r(tls *TLS, p_a uintptr, x uintptr) (r uintptr) { } else { v2 = __ccgo_ts + 891 } - x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, int32(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) + x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) goto _1 _1: ; @@ -120414,14 +120412,14 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt return -int32(5) } nais = nservs * naddrs - canon_len = int32(Xstrlen(tls, bp+1352)) - out = Xcalloc(tls, uint32(1), uint32(nais)*uint32(68)+uint32(canon_len)+uint32(1)) + canon_len = Int32FromUint32(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint32(1), Uint32FromInt32(nais)*uint32(68)+Uint32FromInt32(canon_len)+uint32(1)) if !(out != 0) { return -int32(10) } if canon_len != 0 { outcanon = out + uintptr(nais)*68 - _memcpy(tls, outcanon, bp+1352, uint32(canon_len+int32(1))) + _memcpy(tls, outcanon, bp+1352, Uint32FromInt32(canon_len+int32(1))) } else { outcanon = uintptr(0) } @@ -120445,8 +120443,8 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*68))).Fai = Taddrinfo{ Fai_family: (*(*[48]Taddress)(unsafe.Pointer(bp + 8)))[i].Ffamily, - Fai_socktype: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), - Fai_protocol: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), + Fai_socktype: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), + Fai_protocol: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), Fai_addrlen: v5, Fai_addr: out + uintptr(k)*68 + 32, Fai_canonname: outcanon, @@ -120644,7 +120642,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu Fsin Tsockaddr_in F__ccgo_pad2 [12]byte }{} - *(*uint16)(unsafe.Pointer(bp)) = uint16(af) + *(*uint16)(unsafe.Pointer(bp)) = Uint16FromInt32(af) if af == int32(PF_INET6) { v1 = uint32(28) } else { @@ -120664,15 +120662,15 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu } } /* Align buffer and check for space for pointers and ip address */ - i = int32(uint32(buf) & (Uint32FromInt64(4) - Uint32FromInt32(1))) + i = Int32FromUint32(uint32(buf) & (Uint32FromInt64(4) - Uint32FromInt32(1))) if !(i != 0) { i = int32(4) } - if buflen <= Uint32FromInt32(5)*Uint32FromInt64(4)-uint32(i)+l { + if buflen <= Uint32FromInt32(5)*Uint32FromInt64(4)-Uint32FromInt32(i)+l { return int32(ERANGE) } - buf += uintptr(uint32(4) - uint32(i)) - buflen -= Uint32FromInt32(5)*Uint32FromInt64(4) - uint32(i) + l + buf += uintptr(uint32(4) - Uint32FromInt32(i)) + buflen -= Uint32FromInt32(5)*Uint32FromInt64(4) - Uint32FromInt32(i) + l (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(Uint32FromInt32(2) * Uint32FromInt64(4)) (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf @@ -120701,7 +120699,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu break } (*Thostent)(unsafe.Pointer(h)).Fh_addrtype = af - (*Thostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*Thostent)(unsafe.Pointer(h)).Fh_length = Int32FromUint32(l) (*Thostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 @@ -120788,7 +120786,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, /* Align buffer */ align = -uint32(buf) & (Uint32FromInt64(4) - Uint32FromInt32(1)) need = Uint32FromInt32(4) * Uint32FromInt64(4) - need += uint32(cnt+Int32FromInt32(1)) * (uint32(4) + uint32((*Thostent)(unsafe.Pointer(h)).Fh_length)) + need += Uint32FromInt32(cnt+Int32FromInt32(1)) * (uint32(4) + Uint32FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) need += Xstrlen(tls, name) + uint32(1) need += Xstrlen(tls, bp+1344) + uint32(1) need += align @@ -120799,7 +120797,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(Uint32FromInt32(3) * Uint32FromInt64(4)) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf - buf += uintptr(uint32(cnt+Int32FromInt32(1)) * uint32(4)) + buf += uintptr(Uint32FromInt32(cnt+Int32FromInt32(1)) * uint32(4)) i = 0 for { if !(i < cnt) { @@ -120807,7 +120805,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = buf buf += uintptr((*Thostent)(unsafe.Pointer(h)).Fh_length) - _memcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, uint32((*Thostent)(unsafe.Pointer(h)).Fh_length)) + _memcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, Uint32FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) goto _2 _2: ; @@ -121055,17 +121053,17 @@ func _copy_addr(tls *TLS, r uintptr, af int32, sa uintptr, addr uintptr, addrlen case int32(PF_INET6): dst = sa + 8 len1 = int32(16) - if int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { - (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = uint32(ifindex) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { + (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = Uint32FromInt32(ifindex) } default: return } - if addrlen < uint32(len1) { + if addrlen < Uint32FromInt32(len1) { return } - (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(af) - _memcpy(tls, dst, addr, uint32(len1)) + (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = Uint16FromInt32(af) + _memcpy(tls, dst, addr, Uint32FromInt32(len1)) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -121076,15 +121074,15 @@ func _gen_netmask(tls *TLS, r uintptr, af int32, sa uintptr, prefixlen int32) { var _ /* addr at bp+0 */ [16]Tuint8_t _, _ = i, v1 *(*[16]Tuint8_t)(unsafe.Pointer(bp)) = [16]Tuint8_t{} - if uint32(prefixlen) > Uint32FromInt32(8)*Uint32FromInt64(16) { - prefixlen = int32(Uint32FromInt32(8) * Uint32FromInt64(16)) + if Uint32FromInt32(prefixlen) > Uint32FromInt32(8)*Uint32FromInt64(16) { + prefixlen = Int32FromUint32(Uint32FromInt32(8) * Uint32FromInt64(16)) } i = prefixlen / int32(8) - Xmemset(tls, bp, int32(0xff), uint32(i)) - if uint32(i) < uint32(16) { + Xmemset(tls, bp, int32(0xff), Uint32FromInt32(i)) + if Uint32FromInt32(i) < uint32(16) { v1 = i i++ - (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = uint8(int32(0xff) << (int32(8) - prefixlen%int32(8))) + (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = Uint8FromInt32(int32(0xff) << (int32(8) - prefixlen%int32(8))) } _copy_addr(tls, r, af, sa, bp, uint32(16), 0) } @@ -121110,21 +121108,21 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { ifi = h + UintptrFromInt64(16) ifa = h + UintptrFromInt64(16) stats_len = 0 - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) for { - if !(uint32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { + if !(Uint32FromInt32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { goto _1 } - stats_len = int32(uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint32FromInt64(4)) + stats_len = Int32FromUint32(uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint32FromInt64(4)) break goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } } else { ifs0 = *(*uintptr)(unsafe.Pointer(ctx + 8 + uintptr((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index%uint32(IFADDRS_HASH_SIZE))*4)) @@ -121144,19 +121142,19 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { return 0 } } - ifs = Xcalloc(tls, uint32(1), uint32(164)+uint32(stats_len)) + ifs = Xcalloc(tls, uint32(1), uint32(164)+Uint32FromInt32(stats_len)) if ifs == uintptr(0) { return -int32(1) } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = uint32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = Uint32FromInt32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) for { - if !(uint32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { + if !(Uint32FromInt32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFLA_IFNAME): if uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint32(4) < uint32(17) { _memcpy(tls, ifs+144, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4)) @@ -121174,7 +121172,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _3 _3: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { bucket = (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex % uint32(IFADDRS_HASH_SIZE) @@ -121184,22 +121182,22 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { } else { (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_name (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(8)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(8)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) for { - if !(uint32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { + if !(Uint32FromInt32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFA_ADDRESS): /* If ifa_addr is already set we, received an IFA_LOCAL before * so treat this as destination address */ if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _copy_addr(tls, ifs+20, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+104, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+20, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+104, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } else { - _copy_addr(tls, ifs+12, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+32, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+12, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+32, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } case int32(IFA_BROADCAST): - _copy_addr(tls, ifs+20, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+104, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+20, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+104, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LOCAL): /* If ifa_addr is set and we get IFA_LOCAL, assume we have * a point-to-point network. Move address to correct field. */ @@ -121208,7 +121206,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { *(*uintptr)(unsafe.Pointer(ifs + 20)) = ifs + 104 Xmemset(tls, ifs+32, 0, uint32(36)) } - _copy_addr(tls, ifs+12, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+32, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+12, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+32, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LABEL): if uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint32(4) < uint32(17) { _memcpy(tls, ifs+144, rta+UintptrFromInt64(4), uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint32FromInt64(4)) @@ -121219,10 +121217,10 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _4 _4: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _gen_netmask(tls, ifs+16, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+68, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) + _gen_netmask(tls, ifs+16, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+68, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) } } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { @@ -121282,7 +121280,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { func _mkptr4(tls *TLS, s uintptr, ip uintptr) { bp := tls.Alloc(48) defer tls.Free(48) - Xsprintf(tls, s, __ccgo_ts+897, VaList(bp+8, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) + Xsprintf(tls, s, __ccgo_ts+897, VaList(bp+8, Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 3))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip))))) } func _mkptr6(tls *TLS, s uintptr, ip uintptr) { @@ -121296,13 +121294,13 @@ func _mkptr6(tls *TLS, s uintptr, ip uintptr) { } v2 = s s++ - *(*uint8)(unsafe.Pointer(v2)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] + *(*uint8)(unsafe.Pointer(v2)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] v3 = s s++ *(*uint8)(unsafe.Pointer(v3)) = uint8('.') v4 = s s++ - *(*uint8)(unsafe.Pointer(v4)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] + *(*uint8)(unsafe.Pointer(v4)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] v5 = s s++ *(*uint8)(unsafe.Pointer(v5)) = uint8('.') @@ -121349,8 +121347,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -121381,8 +121379,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } for { if v13 = *(*uint8)(unsafe.Pointer(p)) != 0; v13 { - v10 = int32(*(*uint8)(unsafe.Pointer(p))) - v11 = BoolInt32(v10 == int32(' ') || uint32(v10)-uint32('\t') < uint32(5)) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v11 = BoolInt32(v10 == int32(' ') || Uint32FromInt32(v10)-uint32('\t') < uint32(5)) goto _12 _12: } @@ -121397,8 +121395,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int z = p for { if v18 = *(*uint8)(unsafe.Pointer(z)) != 0; v18 { - v15 = int32(*(*uint8)(unsafe.Pointer(z))) - v16 = BoolInt32(v15 == int32(' ') || uint32(v15)-uint32('\t') < uint32(5)) + v15 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v16 = BoolInt32(v15 == int32(' ') || Uint32FromInt32(v15)-uint32('\t') < uint32(5)) goto _17 _17: } @@ -121412,7 +121410,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } *(*uint8)(unsafe.Pointer(z)) = uint8(0) if int32(z)-int32(p) < int32(256) { - _memcpy(tls, buf, p, uint32(int32(z)-int32(p)+int32(1))) + _memcpy(tls, buf, p, Uint32FromInt32(int32(z)-int32(p)+int32(1))) break } } @@ -121447,8 +121445,8 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -121467,7 +121465,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) svport = Xstrtoul(tls, p, bp+128, int32(10)) - if svport != uint32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { + if svport != Uint32FromInt32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { continue } if dgram != 0 && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+969, uint32(4)) != 0 { @@ -121479,7 +121477,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { if int32(p)-t__predefined_ptrdiff_t(bp) > int32(32) { continue } - _memcpy(tls, buf, bp, uint32(int32(p)-t__predefined_ptrdiff_t(bp))) + _memcpy(tls, buf, bp, Uint32FromInt32(int32(p)-t__predefined_ptrdiff_t(bp))) break } X__fclose_ca(tls, f) @@ -121512,7 +121510,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso var _ /* reply at bp+443 */ [512]uint8 var _ /* tmp at bp+955 */ [17]uint8 _, _, _, _, _, _, _, _, _ = a, af, p, p1, port, qlen, rlen, scopeid, v1 - af = int32((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) + af = Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) switch af { case int32(PF_INET): a = sa + 4 @@ -121546,7 +121544,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso rlen = X__res_send(tls, bp+347, qlen, bp+443, int32(512)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if rlen > 0 { - if uint32(rlen) > uint32(512) { + if Uint32FromInt32(rlen) > uint32(512) { rlen = int32(512) } X__dns_parse(tls, bp+443, rlen, __ccgo_fp(_dns_parse_callback), bp+78) @@ -121559,7 +121557,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso Xinet_ntop(tls, af, a, bp+78, uint32(256)) if scopeid != 0 { p = uintptr(0) - if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { + if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { p = Xif_indextoname(tls, scopeid, bp+955+uintptr(1)) } if !(p != 0) { @@ -121578,13 +121576,13 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso } if serv != 0 && servlen != 0 { p1 = bp + 78 - port = int32(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) + port = Int32FromUint16(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if !(flags&Int32FromInt32(NI_NUMERICSERV) != 0) { _reverse_services(tls, bp+78, port, flags&int32(NI_DGRAM)) } if !(*(*uint8)(unsafe.Pointer(p1)) != 0) { - p1 = _itoa(tls, bp+334, uint32(port)) + p1 = _itoa(tls, bp+334, Uint32FromInt32(port)) } if Xstrlen(tls, p1) >= servlen { return -int32(12) @@ -121622,7 +121620,7 @@ func Xgetpeername(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } func Xgetservbyname(tls *TLS, name uintptr, prots uintptr) (r uintptr) { @@ -121665,8 +121663,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin return int32(ENOENT) } /* Align buffer */ - align = int32(-uint32(buf) & (Uint32FromInt64(8) - Uint32FromInt64(4) - Uint32FromInt32(1))) - if buflen < Uint32FromInt32(2)*Uint32FromInt64(4)+uint32(align) { + align = Int32FromUint32(-uint32(buf) & (Uint32FromInt64(8) - Uint32FromInt64(4) - Uint32FromInt32(1))) + if buflen < Uint32FromInt32(2)*Uint32FromInt64(4)+Uint32FromInt32(align) { return int32(ERANGE) } buf += uintptr(align) @@ -121698,8 +121696,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin (*Tservent)(unsafe.Pointer(se)).Fs_aliases = buf *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases)) = (*Tservent)(unsafe.Pointer(se)).Fs_name *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases + 1*4)) = uintptr(0) - (*Tservent)(unsafe.Pointer(se)).Fs_port = int32(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) - if int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { + (*Tservent)(unsafe.Pointer(se)).Fs_port = Int32FromUint16(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) + if Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { v1 = __ccgo_ts + 979 } else { v1 = __ccgo_ts + 983 @@ -121737,7 +121735,7 @@ func Xgetsockname(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } func Xgetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, optlen uintptr) (r2 int32) { @@ -121784,7 +121782,7 @@ _9: break } if *(*Tsocklen_t)(unsafe.Pointer(optlen)) < uint32(16) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -121860,7 +121858,7 @@ _9: } } } - return X__syscall_ret(tls, uint32(r1)) + return X__syscall_ret(tls, Uint32FromInt32(r1)) } func X__h_errno_location(tls *TLS) (r uintptr) { @@ -121991,14 +121989,14 @@ func Xhtons(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } func Xif_freenameindex(tls *TLS, idx uintptr) { @@ -122023,7 +122021,7 @@ func Xif_indextoname(tls *TLS, index uint32, name uintptr) (r1 uintptr) { if v1 < 0 { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 16)) = int32(index) + *(*int32)(unsafe.Pointer(bp + 16)) = Int32FromUint32(index) r = Xioctl(tls, fd, int32(SIOCGIFNAME), VaList(bp+40, bp)) X__syscall1(tls, int32(SYS_close), fd) if r < 0 { @@ -122057,25 +122055,25 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { var i, v2 uint32 _, _, _, _, _, _, _, _, _, _, _, _ = a, bucket, ctx, i, ifa, ifi, index, map1, namelen, rta, type1, v2 ctx = pctx - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { ifi = h + UintptrFromInt64(16) index = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index type1 = int32(IFLA_IFNAME) - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(16)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } else { ifa = h + UintptrFromInt64(16) - index = int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) + index = Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) type1 = int32(IFA_LABEL) - rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(8)+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint32FromInt64(8)+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } for { - if !(uint32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { + if !(Uint32FromInt32(int32(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int32(rta)) >= uint32(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { goto _1 } - namelen = int32(uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint32(4) - uint32(1)) + namelen = Int32FromUint32(uint32((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint32(4) - uint32(1)) if namelen > int32(IF_NAMESIZE) { return 0 } @@ -122084,7 +122082,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { i = *(*uint32)(unsafe.Pointer(ctx + 16 + uintptr(bucket)*4)) for i != 0 { map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr(i-uint32(1))*28 - if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == uint32(index) && int32((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), uint32(namelen)) == 0 { + if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == Uint32FromInt32(index) && Int32FromUint8((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), Uint32FromInt32(namelen)) == 0 { return 0 } i = (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next @@ -122107,10 +122105,10 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fallocated = a } map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*28 - (*Tifnamemap)(unsafe.Pointer(map1)).Findex = uint32(index) - (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = uint8(namelen) - _memcpy(tls, map1+9, rta+UintptrFromInt64(4), uint32(namelen)) - *(*uint32)(unsafe.Pointer(ctx + 8)) += uint32(namelen + int32(1)) + (*Tifnamemap)(unsafe.Pointer(map1)).Findex = Uint32FromInt32(index) + (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = Uint8FromInt32(namelen) + _memcpy(tls, map1+9, rta+UintptrFromInt64(4), Uint32FromInt32(namelen)) + *(*uint32)(unsafe.Pointer(ctx + 8)) += Uint32FromInt32(namelen + int32(1)) (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum++ (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next = *(*uint32)(unsafe.Pointer(ctx + 16 + uintptr(bucket)*4)) *(*uint32)(unsafe.Pointer(ctx + 16 + uintptr(bucket)*4)) = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum @@ -122118,7 +122116,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } return 0 } @@ -122147,7 +122145,7 @@ func Xif_nameindex(tls *TLS) (r uintptr) { goto err } p = ifs + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*8 + UintptrFromInt32(1)*8 - i = int32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) + i = Int32FromUint32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) d = ifs s = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist for { @@ -122202,7 +122200,7 @@ func Xif_nametoindex(tls *TLS, name uintptr) (r1 uint32) { } else { v2 = *(*int32)(unsafe.Pointer(bp + 16)) } - return uint32(v2) + return Uint32FromInt32(v2) } func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { @@ -122214,7 +122212,7 @@ func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { defer tls.Free(16) var _ /* a at bp+0 */ Tin_addr if !(X__inet_aton(tls, p, bp) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } return (*(*Tin_addr)(unsafe.Pointer(bp))).Fs_addr } @@ -122240,7 +122238,7 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) (r int32) { break } (*(*[4]uint32)(unsafe.Pointer(bp)))[i] = Xstrtoul(tls, s, bp+16, 0) - if *(*uintptr)(unsafe.Pointer(bp + 16)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if *(*uintptr)(unsafe.Pointer(bp + 16)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return 0 } if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) != 0) { @@ -122365,7 +122363,7 @@ func Xinet_ntoa(tls *TLS, _in Tin_addr) (r uintptr) { var a uintptr _ = a a = bp - Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint32(16), __ccgo_ts+995, VaList(bp+16, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3))))) + Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint32(16), __ccgo_ts+995, VaList(bp+16, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))))) return uintptr(unsafe.Pointer(&_buf4)) } @@ -122386,14 +122384,14 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint a = a0 switch af { case int32(PF_INET): - if uint32(Xsnprintf(tls, s, l, __ccgo_ts+995, VaList(bp+112, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + if Uint32FromInt32(Xsnprintf(tls, s, l, __ccgo_ts+995, VaList(bp+112, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { return s } case int32(PF_INET6): if Xmemcmp(tls, a, __ccgo_ts+942, uint32(12)) != 0 { - Xsnprintf(tls, bp, uint32(100), __ccgo_ts+1007, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint32(100), __ccgo_ts+1007, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } else { - Xsnprintf(tls, bp, uint32(100), __ccgo_ts+1031, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint32(100), __ccgo_ts+1031, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } /* Replace longest /(^0|:)[:0]{2,}/ with "::" */ v2 = Int32FromInt32(0) @@ -122404,10 +122402,10 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint if !((*(*[100]uint8)(unsafe.Pointer(bp)))[i] != 0) { break } - if i != 0 && int32((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { + if i != 0 && Int32FromUint8((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { goto _1 } - j = int32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1061)) + j = Int32FromUint32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1061)) if j > max { best = i max = j @@ -122421,7 +122419,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint v3 = Uint8FromUint8(':') (*(*[100]uint8)(unsafe.Pointer(bp)))[best+int32(1)] = v3 (*(*[100]uint8)(unsafe.Pointer(bp)))[best] = v3 - Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), uint32(i-best-max+int32(1))) + Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), Uint32FromInt32(i-best-max+int32(1))) } if Xstrlen(tls, bp) < l { Xstrcpy(tls, s, bp) @@ -122437,11 +122435,11 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint func _hexval(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -122474,20 +122472,20 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if !(j < int32(3) && BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { break } - v = int32(10)*v + int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') + v = int32(10)*v + Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') goto _2 _2: ; j++ } - if j == 0 || j > int32(1) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { + if j == 0 || j > int32(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { return 0 } - *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = Uint8FromInt32(v) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { return int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { return 0 } s += uintptr(j + int32(1)) @@ -122503,16 +122501,16 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { return -int32(1) } } - if v5 = int32(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { + if v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { s++ v4 = s } - if v5 && int32(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { + if v5 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { return 0 } i = 0 for { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { brk = i (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(0) s++ @@ -122545,15 +122543,15 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 { return 0 } - (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(v) + (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = Uint16FromInt32(v) if !(*(*uint8)(unsafe.Pointer(s + uintptr(j))) != 0) && (brk >= 0 || i == int32(7)) { break } if i == int32(7) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { return 0 } need_v4 = int32(1) @@ -122568,7 +122566,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { i++ } if brk >= 0 { - Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint32(int32(2)*(i+int32(1)-brk))) + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, Uint32FromInt32(int32(2)*(i+int32(1)-brk))) j = 0 for { if !(j < int32(7)-i) { @@ -122588,7 +122586,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { } v14 = a a++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint16((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) v15 = a a++ *(*uint8)(unsafe.Pointer(v15)) = uint8((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) @@ -122631,7 +122629,7 @@ func Xlisten(tls *TLS, fd int32, backlog int32) (r1 int32) { v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r int32) { @@ -122660,7 +122658,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i p = Xstrchr(tls, name, int32('%')) scopeid = uint64(0) if p != 0 && int32(p)-int32(name) < int32(64) { - _memcpy(tls, bp+20, name, uint32(int32(p)-int32(name))) + _memcpy(tls, bp+20, name, Uint32FromInt32(int32(p)-int32(name))) (*(*[64]uint8)(unsafe.Pointer(bp + 20)))[int32(p)-int32(name)] = uint8(0) name = bp + 20 } @@ -122681,7 +122679,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i *(*uintptr)(unsafe.Pointer(bp + 84)) = p - uintptr(1) } if *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 84)))) != 0 { - if !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { + if !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { return -int32(2) } scopeid = uint64(Xif_nametoindex(tls, p)) @@ -122712,12 +122710,12 @@ const RR_CNAME = 5 func _is_valid_hostname(tls *TLS, host uintptr) (r int32) { var s uintptr _ = s - if Xstrnlen(tls, host, uint32(255))-uint32(1) >= uint32(254) || Xmbstowcs(tls, uintptr(0), host, uint32(0)) == uint32(-Int32FromInt32(1)) { + if Xstrnlen(tls, host, uint32(255))-uint32(1) >= uint32(254) || Xmbstowcs(tls, uintptr(0), host, uint32(0)) == Uint32FromInt32(-Int32FromInt32(1)) { return 0 } s = host for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || int32(*(*uint8)(unsafe.Pointer(s))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) != 0) { break } goto _1 @@ -122822,14 +122820,14 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family v4 = Xstrstr(tls, p, name) p = v4 if v12 = v4 != 0; v12 { - v5 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: ; if v11 = !(v6 != 0); !v11 { - v8 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -122849,8 +122847,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family p = bp for { if v17 = *(*uint8)(unsafe.Pointer(p)) != 0; v17 { - v14 = int32(*(*uint8)(unsafe.Pointer(p))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: } @@ -122880,8 +122878,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family /* Extract first name as canonical name */ for { if v23 = *(*uint8)(unsafe.Pointer(p)) != 0; v23 { - v20 = int32(*(*uint8)(unsafe.Pointer(p))) - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v20 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: } @@ -122896,8 +122894,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family z = p for { if v28 = *(*uint8)(unsafe.Pointer(z)) != 0; v28 { - v25 = int32(*(*uint8)(unsafe.Pointer(z))) - v26 = BoolInt32(v25 == int32(' ') || uint32(v25)-uint32('\t') < uint32(5)) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v26 = BoolInt32(v25 == int32(' ') || Uint32FromInt32(v25)-uint32('\t') < uint32(5)) goto _27 _27: } @@ -122912,7 +122910,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family *(*uint8)(unsafe.Pointer(z)) = uint8(0) if _is_valid_hostname(tls, p) != 0 { have_canon = int32(1) - _memcpy(tls, canon, p, uint32(int32(z)-int32(p)+int32(1))) + _memcpy(tls, canon, p, Uint32FromInt32(int32(z)-int32(p)+int32(1))) } } X__fclose_ca(tls, f) @@ -122969,7 +122967,7 @@ func _dns_parse_callback1(tls *TLS, c uintptr, rr int32, data uintptr, len1 int3 v2 = ctx + 8 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ - _memcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, uint32(len1)) + _memcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, Uint32FromInt32(len1)) return 0 } @@ -123012,7 +123010,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i qtypes[nq] = _afrr[i].Frr *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280 + 3)) = uint8(0) /* don't need AD flag */ /* Ensure query IDs are distinct. */ - if nq != 0 && int32(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == int32(*(*uint8)(unsafe.Pointer(bp))) { + if nq != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) { *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))++ } nq++ @@ -123030,13 +123028,13 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i if !(i < nq) { break } - if (*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i] < int32(4) || int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { + if (*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i] < int32(4) || Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { return -int32(4) } goto _2 @@ -123050,7 +123048,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i break } (*(*Tdpc_ctx)(unsafe.Pointer(bp + 10192))).Frrtype = qtypes[i] - if uint32((*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i]) > uint32(4800) { + if Uint32FromInt32((*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i]) > uint32(4800) { (*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i] = int32(4800) } X__dns_parse(tls, bp+560+uintptr(i)*4800, (*(*[2]int32)(unsafe.Pointer(bp + 10184)))[i], __ccgo_fp(_dns_parse_callback1), bp+10192) @@ -123101,7 +123099,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { dots++ } goto _1 @@ -123109,14 +123107,14 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f ; l++ } - if dots >= (*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint32(1))))) == int32('.') { + if dots >= (*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint32(1))))) == int32('.') { *(*uint8)(unsafe.Pointer(bp)) = uint8(0) } /* Strip final dot for canon, fail if multiple trailing dots. */ - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint32(1))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint32(1))))) == int32('.') { l-- } - if !(l != 0) || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint32(1))))) == int32('.') { + if !(l != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint32(1))))) == int32('.') { return -int32(2) } /* This can never happen; the caller already checked length. */ @@ -123135,8 +123133,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f break } for { - v5 = int32(*(*uint8)(unsafe.Pointer(p))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -123150,8 +123148,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f z = p for { if v12 = *(*uint8)(unsafe.Pointer(z)) != 0; v12 { - v9 = int32(*(*uint8)(unsafe.Pointer(z))) - v10 = BoolInt32(v9 == int32(' ') || uint32(v9)-uint32('\t') < uint32(5)) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v10 = BoolInt32(v9 == int32(' ') || Uint32FromInt32(v9)-uint32('\t') < uint32(5)) goto _11 _11: } @@ -123166,9 +123164,9 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if z == p { break } - if uint32(int32(z)-int32(p)) < uint32(256)-l-uint32(1) { - _memcpy(tls, canon+uintptr(l)+uintptr(1), p, uint32(int32(z)-int32(p))) - *(*uint8)(unsafe.Pointer(canon + uintptr(uint32(int32(z)-int32(p)+int32(1))+l))) = uint8(0) + if Uint32FromInt32(int32(z)-int32(p)) < uint32(256)-l-uint32(1) { + _memcpy(tls, canon+uintptr(l)+uintptr(1), p, Uint32FromInt32(int32(z)-int32(p))) + *(*uint8)(unsafe.Pointer(canon + uintptr(Uint32FromInt32(int32(z)-int32(p)+int32(1))+l))) = uint8(0) cnt = _name_from_dns(tls, buf, canon, canon, family, bp+256) if cnt != 0 { return cnt @@ -123240,7 +123238,7 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&_defpolicy))+uintptr(i)*20, uint32(_defpolicy[i].Flen1)) != 0 { goto _1 } - if int32(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&int32(_defpolicy[i].Fmask) != int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&Int32FromUint8(_defpolicy[i].Fmask) != Int32FromUint8(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { goto _1 } return uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 @@ -123253,20 +123251,20 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { } func _labelof(tls *TLS, a uintptr) (r int32) { - return int32((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) + return Int32FromUint8((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) } func _scopeof(tls *TLS, a uintptr) (r int32) { - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { - return int32(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { + return Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { return int32(2) } - if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { + if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { return int32(2) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { return int32(5) } return int32(14) @@ -123277,7 +123275,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(128) && !((int32(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^int32(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { + if !(i < uint32(128) && !((Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { break } goto _1 @@ -123285,7 +123283,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { ; i++ } - return int32(i) + return Int32FromUint32(i) } func _addrcmp(tls *TLS, _a uintptr, _b uintptr) (r int32) { @@ -123470,8 +123468,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } dpolicy = _policyof(tls, bp+32+8) dscope = _scopeof(tls, bp+32+8) - dlabel = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) - dprec = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) + dlabel = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) + dprec = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) prefixlen = 0 fd = Xsocket(tls, family1, Int32FromInt32(SOCK_DGRAM)|Int32FromInt32(SOCK_CLOEXEC), int32(IPPROTO_UDP)) if fd >= 0 { @@ -123502,7 +123500,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i ; i++ } - Xqsort(tls, buf, uint32(cnt), uint32(28), __ccgo_fp(_addrcmp)) + Xqsort(tls, buf, Uint32FromInt32(cnt), uint32(28), __ccgo_fp(_addrcmp)) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) return cnt } @@ -123553,8 +123551,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -int32(8) } (*(*Tservice)(unsafe.Pointer(buf))).Fport = uint16(0) - (*(*Tservice)(unsafe.Pointer(buf))).Fproto = uint8(proto) - (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(socktype) + (*(*Tservice)(unsafe.Pointer(buf))).Fproto = Uint8FromInt32(proto) + (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = Uint8FromInt32(socktype) return int32(1) } if name != 0 { @@ -123618,8 +123616,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i break } if v10 = p > bp; v10 { - v7 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v8 = BoolInt32(v7 == int32(' ') || uint32(v7)-uint32('\t') < uint32(5)) + v7 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v8 = BoolInt32(v7 == int32(' ') || Uint32FromInt32(v7)-uint32('\t') < uint32(5)) goto _9 _9: } @@ -123627,8 +123625,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i goto _5 } if v14 = *(*uint8)(unsafe.Pointer(p + uintptr(l))) != 0; v14 { - v11 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: } @@ -123648,8 +123646,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i p = bp for { if v19 = *(*uint8)(unsafe.Pointer(p)) != 0; v19 { - v16 = int32(*(*uint8)(unsafe.Pointer(p))) - v17 = BoolInt32(v16 == int32(' ') || uint32(v16)-uint32('\t') < uint32(5)) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v17 = BoolInt32(v16 == int32(' ') || Uint32FromInt32(v16)-uint32('\t') < uint32(5)) goto _18 _18: } @@ -123731,7 +123729,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = uint16(type1) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = Uint16FromInt32(type1) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123742,7 +123740,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = uint16(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = Uint16FromInt32(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123764,7 +123762,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fg.Frtgen_family = uint8(af) + })(unsafe.Pointer(bp))))).Fg.Frtgen_family = Uint8FromInt32(af) r = Xsend(tls, fd, bp, uint32(20), 0) if r < 0 { return r @@ -123776,13 +123774,13 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } h = bp for { - if !(uint32(int32(bp+uintptr(r))-int32(h)) >= uint32(16)) { + if !(Uint32FromInt32(int32(bp+uintptr(r))-int32(h)) >= uint32(16)) { break } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { return 0 } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { return -int32(1) } ret = (*(*func(*TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{cb})))(tls, ctx, h) @@ -123792,7 +123790,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, goto _1 _1: ; - h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } } return r1 @@ -123838,7 +123836,7 @@ func Xns_get16(tls *TLS, cp uintptr) (r uint32) { trc("tls=%v cp=%v, (%v:)", tls, cp, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(int32(*(*uint8)(unsafe.Pointer(cp)))< %v", r) }() } - return uint32(*(*uint8)(unsafe.Pointer(cp)))< int32(eom)-int32(p) { goto bad } @@ -124008,7 +124006,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin if rrnum == -int32(1) { rrnum = (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum } - if rrnum < 0 || rrnum >= int32(*(*Tuint16_t)(unsafe.Pointer(handle + 12 + uintptr(section)*2))) { + if rrnum < 0 || rrnum >= Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 12 + uintptr(section)*2))) { goto bad } if rrnum < (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum { @@ -124047,7 +124045,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin p4 = handle + 44 *(*uintptr)(unsafe.Pointer(p4)) += uintptr(2) (*Tns_rr)(unsafe.Pointer(rr)).Frdlength = uint16(Xns_get16(tls, *(*uintptr)(unsafe.Pointer(p4))-uintptr(2))) - if int32((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int32((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int32((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { + if Int32FromUint16((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int32((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int32((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { goto size } (*Tns_rr)(unsafe.Pointer(rr)).Frdata = (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr @@ -124058,7 +124056,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin (*Tns_rr)(unsafe.Pointer(rr)).Frdata = UintptrFromInt32(0) } (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum++ - if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > int32(*(*Tuint16_t)(unsafe.Pointer(handle + 12 + uintptr(section)*2))) { + if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 12 + uintptr(section)*2))) { (*Tns_msg)(unsafe.Pointer(handle)).F_sect = section + int32(1) if (*Tns_msg)(unsafe.Pointer(handle)).F_sect == int32(_ns_s_max) { (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum = -int32(1) @@ -124087,7 +124085,7 @@ func Xns_name_uncompress(tls *TLS, msg uintptr, eom uintptr, src uintptr, dst ui } var r int32 _ = r - r = Xdn_expand(tls, msg, eom, src, dst, int32(dstsiz)) + r = Xdn_expand(tls, msg, eom, src, dst, Int32FromUint32(dstsiz)) if r < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) } @@ -124140,14 +124138,14 @@ func Xntohs(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } /* do we really need all these?? */ @@ -124174,10 +124172,10 @@ func Xgetprotoent(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if uint32(_idx) >= uint32(239) { + if Uint32FromInt32(_idx) >= uint32(239) { return UintptrFromInt32(0) } - _p.Fp_proto = int32(_protos[_idx]) + _p.Fp_proto = Int32FromUint8(_protos[_idx]) _p.Fp_name = uintptr(unsafe.Pointer(&_protos)) + uintptr(_idx+int32(1)) _p.Fp_aliases = uintptr(unsafe.Pointer(&_aliases)) _idx = int32(uint32(_idx) + (Xstrlen(tls, _p.Fp_name) + Uint32FromInt32(2))) @@ -124236,7 +124234,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr _ = int32(__SC_recvfrom) v2 = fd v3 = int32(buf) - v4 = int32(len1) + v4 = Int32FromUint32(len1) v5 = flags v6 = int32(addr) v7 = int32(alen) @@ -124252,7 +124250,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, timeout uintptr) (r1 int32) { @@ -124291,9 +124289,9 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti } else { v3 = uintptr(0) } - r = ___syscall_cp(tls, int32(SYS_recvmmsg_time64), fd, int32(msgvec), int32(vlen), int32(flags), int32(v3), 0) + r = ___syscall_cp(tls, int32(SYS_recvmmsg_time64), fd, int32(msgvec), Int32FromUint32(vlen), Int32FromUint32(flags), int32(v3), 0) if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } if vlen > uint32(IOV_MAX) { vlen = uint32(IOV_MAX) @@ -124302,7 +124300,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti csize = Xrealloc(tls, csize, v4) i = 0 for { - if !(uint32(i) < vlen) { + if !(Uint32FromInt32(i) < vlen) { break } *(*Tsocklen_t)(unsafe.Add(unsafe.Pointer(csize), i*4)) = (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*32))).Fmsg_hdr.Fmsg_controllen @@ -124312,20 +124310,20 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti i++ } if timeout != 0 { - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v7 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v7 = Uint64FromInt64(s) } else { - v7 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v7 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ - 0: int32(v7), + 0: Int32FromUint64(v7), 1: ns, } v6 = bp + 16 } else { v6 = uintptr(0) } - r = ___syscall_cp(tls, int32(SYS_recvmmsg), fd, int32(msgvec), int32(vlen), int32(flags), int32(v6), 0) + r = ___syscall_cp(tls, int32(SYS_recvmmsg), fd, int32(msgvec), Int32FromUint32(vlen), Int32FromUint32(flags), int32(v6), 0) i1 = 0 for { if !(i1 < r) { @@ -124337,7 +124335,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti ; i1++ } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { @@ -124401,10 +124399,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { goto _1 _1: ; - if (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len < uint32(12) || ((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&uint32(^int32(Uint32FromInt64(4)-Uint32FromInt32(1)))+uint32(12) >= uint32(int32((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int32(cmsg)) { + if (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len < uint32(12) || ((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&Uint32FromInt32(^Int32FromUint32(Uint32FromInt64(4)-Uint32FromInt32(1)))+uint32(12) >= Uint32FromInt32(int32((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int32(cmsg)) { v6 = uintptr(0) } else { - v6 = cmsg + uintptr(((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&uint32(^int32(Uint32FromInt64(4)-Uint32FromInt32(1)))) + v6 = cmsg + uintptr(((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&Uint32FromInt32(^Int32FromUint32(Uint32FromInt64(4)-Uint32FromInt32(1)))) } cmsg = v6 } @@ -124416,10 +124414,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { return } *(*Tsocklen_t)(unsafe.Pointer(msg + 20)) += (Uint32FromInt64(16)+Uint32FromInt64(4)-Uint32FromInt32(1)) & ^(Uint32FromInt64(4)-Uint32FromInt32(1)) + (Uint32FromInt64(12)+Uint32FromInt64(4)-Uint32FromInt32(1)) & ^(Uint32FromInt64(4)-Uint32FromInt32(1)) - if (*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len < uint32(12) || ((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&uint32(^int32(Uint32FromInt64(4)-Uint32FromInt32(1)))+uint32(12) >= uint32(int32((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int32(last)) { + if (*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len < uint32(12) || ((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&Uint32FromInt32(^Int32FromUint32(Uint32FromInt64(4)-Uint32FromInt32(1)))+uint32(12) >= Uint32FromInt32(int32((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int32(last)) { v7 = uintptr(0) } else { - v7 = last + uintptr(((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&uint32(^int32(Uint32FromInt64(4)-Uint32FromInt32(1)))) + v7 = last + uintptr(((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len+Uint32FromInt64(4)-Uint32FromInt32(1))&Uint32FromInt32(^Int32FromUint32(Uint32FromInt64(4)-Uint32FromInt32(1)))) } cmsg = v7 (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_level = int32(SOL_SOCKET) @@ -124459,7 +124457,7 @@ func Xrecvmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r2 Tssize_t) { v8 = r goto _9 _9: - r1 = X__syscall_ret(tls, uint32(v8)) + r1 = X__syscall_ret(tls, Uint32FromInt32(v8)) if r1 >= 0 { X__convert_scm_timestamps(tls, msg, orig_controllen) } @@ -124487,19 +124485,19 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, var _ /* ts at bp+280 */ Ttimespec _, _, _, _, _ = i, id, j, l, n l = Xstrnlen(tls, dname, uint32(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint32(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint32(1))))) == int32('.') { l-- } - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint32(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint32(1))))) == int32('.') { return -int32(1) } - n = int32(uint32(17) + l + BoolUint32(!!(l != 0))) - if l > uint32(253) || buflen < n || uint32(op) > uint32(15) || uint32(class) > uint32(255) || uint32(type1) > uint32(255) { + n = Int32FromUint32(uint32(17) + l + BoolUint32(!!(l != 0))) + if l > uint32(253) || buflen < n || Uint32FromInt32(op) > uint32(15) || Uint32FromInt32(class) > uint32(255) || Uint32FromInt32(type1) > uint32(255) { return -int32(1) } /* Construct query template - ID will be filled later */ - Xmemset(tls, bp, 0, uint32(n)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(op*int32(8) + int32(1)) + Xmemset(tls, bp, 0, Uint32FromInt32(n)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = Uint8FromInt32(op*int32(8) + int32(1)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(32) /* AD */ (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(5)] = uint8(1) _memcpy(tls, bp+uintptr(13), dname, l) @@ -124510,7 +124508,7 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, } j = i for { - if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && int32((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { + if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && Int32FromUint8((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { break } goto _2 @@ -124518,23 +124516,23 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, ; j++ } - if uint32(j-i)-uint32(1) > uint32(62) { + if Uint32FromInt32(j-i)-uint32(1) > uint32(62) { return -int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = uint8(j - i) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = Uint8FromInt32(j - i) goto _1 _1: ; i = j + int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(type1) - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(class) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = Uint8FromInt32(type1) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = Uint8FromInt32(class) /* Make a reasonably unpredictable id */ Xclock_gettime(tls, CLOCK_REALTIME, bp+280) - id = int32((uint32((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + uint32((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint32(65536)) & uint32(0xffff)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = uint8(id / int32(256)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(id) - _memcpy(tls, buf, bp, uint32(n)) + id = Int32FromUint32((Uint32FromInt32((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + Uint32FromInt32((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint32(65536)) & uint32(0xffff)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = Uint8FromInt32(id / int32(256)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = Uint8FromInt32(id) + _memcpy(tls, buf, bp, Uint32FromInt32(n)) return n } @@ -124670,7 +124668,7 @@ func _mtime(tls *TLS) (r uint32) { if Xclock_gettime(tls, int32(CLOCK_MONOTONIC), bp) < 0 && *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOSYS) { Xclock_gettime(tls, CLOCK_REALTIME, bp) } - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint32(1000) + uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int32(1000000)) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint32(1000) + Uint32FromInt32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int32(1000000)) } func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, q uintptr, ql int32) (r1 int32) { @@ -124680,8 +124678,8 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, var _ /* mh at bp+24 */ Tmsghdr _, _ = fd, r *(*[2]Tuint8_t)(unsafe.Pointer(bp + 16)) = [2]Tuint8_t{ - 0: uint8(ql >> int32(8)), - 1: uint8(ql), + 0: Uint8FromInt32(ql >> int32(8)), + 1: Uint8FromInt32(ql), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -124690,7 +124688,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, }, 1: { Fiov_base: q, - Fiov_len: uint32(ql), + Fiov_len: Uint32FromInt32(ql), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 24)) = Tmsghdr{ @@ -124799,20 +124797,20 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a sl = uint32(16) nns = 0 family = int32(PF_INET) - v1 = uint32(nqueries+int32(2)) * 8 + v1 = Uint32FromInt32(nqueries+int32(2)) * 8 pfd = Xrealloc(tls, pfd, v1) - v2 = uint32(nqueries) * 4 + v2 = Uint32FromInt32(nqueries) * 4 qpos = Xrealloc(tls, qpos, v2) - v3 = uint32(nqueries) * 4 + v3 = Uint32FromInt32(nqueries) * 4 apos = Xrealloc(tls, apos, v3) - v4 = uint32(nqueries) * 2 + v4 = Uint32FromInt32(nqueries) * 2 alen_buf = Xrealloc(tls, alen_buf, v4) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), bp+160) - timeout = int32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) - attempts = int32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) + timeout = Int32FromUint32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) + attempts = Int32FromUint32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) nns = 0 for { - if !(uint32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { + if !(Uint32FromInt32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { break } iplit = conf + uintptr(nns)*28 @@ -124835,7 +124833,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 76 + uintptr(nns)*28))).Fsin6_scope_id = (*Taddress)(unsafe.Pointer(iplit)).Fscopeid v6 = Int32FromInt32(PF_INET6) family = v6 - (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 76 + uintptr(nns)*28))).Fsin6_family = uint16(v6) + (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 76 + uintptr(nns)*28))).Fsin6_family = Uint16FromInt32(v6) } goto _5 _5: @@ -124873,7 +124871,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(i < nns) { break } - if int32((*(*[3]struct { + if Int32FromUint16((*(*[3]struct { Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte @@ -124895,7 +124893,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte - })(unsafe.Pointer(bp + 48))).Fsin.Fsin_family = uint16(family) + })(unsafe.Pointer(bp + 48))).Fsin.Fsin_family = Uint16FromInt32(family) if fd < 0 || Xbind(tls, fd, bp+48, sl) < 0 { if fd >= 0 { Xclose(tls, fd) @@ -124922,15 +124920,15 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), (nqueries+int32(1))*8))).Ffd = -int32(2) __pthread_cleanup_push(tls, bp+164, __ccgo_fp(_cleanup), pfd) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp + 160)), uintptr(0)) - Xmemset(tls, alens, 0, uint32(4)*uint32(nqueries)) + Xmemset(tls, alens, 0, uint32(4)*Uint32FromInt32(nqueries)) retry_interval = timeout / attempts next = 0 v10 = _mtime(tls) t2 = v10 t0 = v10 - t1 = t2 - uint32(retry_interval) + t1 = t2 - Uint32FromInt32(retry_interval) for { - if !(t2-t0 < uint32(timeout)) { + if !(t2-t0 < Uint32FromInt32(timeout)) { break } /* This is the loop exit condition: that all queries @@ -124948,7 +124946,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if i == nqueries { break } - if t2-t1 >= uint32(retry_interval) { + if t2-t1 >= Uint32FromInt32(retry_interval) { /* Query all configured namservers in parallel */ i = 0 for { @@ -124961,7 +124959,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(j < nns) { break } - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), uint32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+76+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), Uint32FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+76+uintptr(j)*28, sl) goto _14 _14: ; @@ -124977,14 +124975,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry = int32(2) * nqueries } /* Wait for a response, or until time to retry */ - if Xpoll(tls, pfd, uint32(nqueries+int32(1)), int32(t1+uint32(retry_interval)-t2)) <= 0 { + if Xpoll(tls, pfd, Uint32FromInt32(nqueries+int32(1)), Int32FromUint32(t1+Uint32FromInt32(retry_interval)-t2)) <= 0 { goto _11 } for next < nqueries { *(*[1]Tiovec)(unsafe.Pointer(bp + 8)) = [1]Tiovec{ 0: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)), - Fiov_len: uint32(asize), + Fiov_len: Uint32FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 176)) = Tmsghdr{ @@ -125018,7 +125016,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Find which query this answer goes with, if any */ i = next for { - if !(i < nqueries && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4))))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4))))) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)) + 1))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)) + 1))))) { + if !(i < nqueries && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4))))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4))))) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)) + 1))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)) + 1))))) { break } goto _16 @@ -125035,7 +125033,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Only accept positive or negative responses; * retry immediately on server failure, and ignore * all other codes such as refusal. */ - switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)) + 3))) & Int32FromInt32(15) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)) + 3))) & Int32FromInt32(15) { case 0: fallthrough case int32(3): @@ -125045,7 +125043,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry-- } if v18 && v17 != 0 { - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), uint32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+76+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), Uint32FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+76+uintptr(j)*28, sl) } fallthrough default: @@ -125065,14 +125063,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a next++ } } else { - _memcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)), uint32(rlen)) + _memcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*4)), Uint32FromInt32(rlen)) } /* Ignore further UDP if all slots full or TCP-mode */ if next == nqueries { (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), nqueries*8))).Fevents = 0 } /* If answer is truncated (TC bit), fallback to TCP */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 176))).Fmsg_flags&int32(MSG_TRUNC) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 176))).Fmsg_flags&int32(MSG_TRUNC) != 0 { *(*int32)(unsafe.Pointer(alens + uintptr(i)*4)) = -int32(1) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), uintptr(0)) r = _start_tcp(tls, pfd+uintptr(i)*8, family, bp+76+uintptr(j)*28, sl, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), *(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))) @@ -125091,8 +125089,8 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a } if int32((*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Frevents)&int32(POLLOUT) != 0 { *(*[2]Tuint8_t)(unsafe.Pointer(bp + 28)) = [2]Tuint8_t{ - 0: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), - 1: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + 0: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), + 1: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), } *(*[2]Tiovec)(unsafe.Pointer(bp + 12)) = [2]Tiovec{ 0: { @@ -125101,14 +125099,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*4)), - Fiov_len: uint32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + Fiov_len: Uint32FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 204)) = Tmsghdr{ Fmsg_iov: bp + 12, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+204, uint32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) + _step_mh(tls, bp+204, Uint32FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) r = Xsendmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+204, int32(MSG_NOSIGNAL)) if r < 0 { goto out @@ -125136,14 +125134,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)), - Fiov_len: uint32(asize), + Fiov_len: Uint32FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 232)) = Tmsghdr{ Fmsg_iov: bp + 32, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+232, uint32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) + _step_mh(tls, bp+232, Uint32FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) r = Xrecvmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+232, 0) if r <= 0 { goto out @@ -125152,14 +125150,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < int32(2) { goto _21 } - alen = int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) + alen = Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) if alen < int32(13) { goto out } if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < alen+int32(2) && *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < asize+int32(2) { goto _21 } - rcode = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)) + 3))) & int32(15) + rcode = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*4)) + 3))) & int32(15) if rcode != 0 && rcode != int32(3) { goto out } @@ -125237,7 +125235,7 @@ func X__res_send(tls *TLS, _msg uintptr, _msglen int32, _answer uintptr, _anslen } else { v1 = *(*int32)(unsafe.Pointer(bp + 12)) } - _memcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp+16, uint32(v1)) + _memcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp+16, Uint32FromInt32(v1)) } return r } @@ -125315,8 +125313,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v4 = !(Xstrncmp(tls, bp, __ccgo_ts+1081, uint32(7)) != 0); v4 { - v1 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: } @@ -125348,7 +125346,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1106) - if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { + if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { p += uintptr(8) x2 = Xstrtoul(tls, p, bp+656, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 656)) != p { @@ -125363,8 +125361,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v11 = !(Xstrncmp(tls, bp, __ccgo_ts+1115, uint32(10)) != 0); v11 { - v8 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -125374,8 +125372,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(11) for { - v13 = int32(*(*uint8)(unsafe.Pointer(p))) - v14 = BoolInt32(v13 == int32(' ') || uint32(v13)-uint32('\t') < uint32(5)) + v13 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v14 = BoolInt32(v13 == int32(' ') || Uint32FromInt32(v13)-uint32('\t') < uint32(5)) goto _15 _15: if !(v14 != 0) { @@ -125389,8 +125387,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ *(*uintptr)(unsafe.Pointer(bp + 656)) = p for { if v20 = *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 656)))) != 0; v20 { - v17 = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 656))))) - v18 = BoolInt32(v17 == int32(' ') || uint32(v17)-uint32('\t') < uint32(5)) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 656))))) + v18 = BoolInt32(v17 == int32(' ') || Uint32FromInt32(v17)-uint32('\t') < uint32(5)) goto _19 _19: } @@ -125412,8 +125410,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v24 = Xstrncmp(tls, bp, __ccgo_ts+1126, uint32(6)) != 0 && Xstrncmp(tls, bp, __ccgo_ts+1133, uint32(6)) != 0; !v24 { - v21 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) - v22 = BoolInt32(v21 == int32(' ') || uint32(v21)-uint32('\t') < uint32(5)) + v21 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) + v22 = BoolInt32(v21 == int32(' ') || Uint32FromInt32(v21)-uint32('\t') < uint32(5)) goto _23 _23: } @@ -125422,8 +125420,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(7) for { - v26 = int32(*(*uint8)(unsafe.Pointer(p))) - v27 = BoolInt32(v26 == int32(' ') || uint32(v26)-uint32('\t') < uint32(5)) + v26 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v27 = BoolInt32(v26 == int32(' ') || Uint32FromInt32(v26)-uint32('\t') < uint32(5)) goto _28 _28: if !(v27 != 0) { @@ -125449,7 +125447,7 @@ no_resolv_conf: X__lookup_ipliteral(tls, conf, __ccgo_ts+1140, PF_UNSPEC) nns = int32(1) } - (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(nns) + (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = Uint32FromInt32(nns) return 0 } @@ -125466,7 +125464,7 @@ func Xsendmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32) (r trc("tls=%v fd=%v msgvec=%v vlen=%v flags=%v, (%v:)", tls, fd, msgvec, vlen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_sendmmsg), fd, int32(msgvec), int32(vlen), int32(flags), 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_sendmmsg), fd, int32(msgvec), Int32FromUint32(vlen), Int32FromUint32(flags), 0, 0))) } func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { @@ -125497,7 +125495,7 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr uintptr, alen Tsocklen_t) (r1 Tssize_t) { @@ -125512,10 +125510,10 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui _ = int32(__SC_sendto) v2 = fd v3 = int32(buf) - v4 = int32(len1) + v4 = Int32FromUint32(len1) v5 = flags v6 = int32(addr) - v7 = int32(alen) + v7 = Int32FromUint32(alen) if int32(1) != 0 { r = ___syscall_cp(tls, v1, v2, v3, v4, v5, v6, v7) } else { @@ -125528,7 +125526,7 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } func Xendservent(tls *TLS) { @@ -125571,7 +125569,7 @@ func Xsetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, v3 = level v4 = optname v5 = int32(optval) - v6 = int32(optlen) + v6 = Int32FromUint32(optlen) v7 = Int32FromInt32(0) if 0 != 0 { r = ___syscall_cp(tls, v1, v2, v3, v4, v5, v6, v7) @@ -125597,13 +125595,13 @@ _9: break } if optlen < uint32(16) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } tv = optval s = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec us = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -125611,14 +125609,14 @@ _9: if optname == int32(SO_SNDTIMEO) { optname = int32(SO_SNDTIMEO_OLD) } - if !((uint64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v10 = uint64(us) + if !((Uint64FromInt64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v10 = Uint64FromInt64(us) } else { - v10 = uint64(0x7fffffff) + (0+uint64(us))>>int32(63) + v10 = uint64(0x7fffffff) + (0+Uint64FromInt64(us))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp)) = [2]int32{ 0: int32(s), - 1: int32(v10), + 1: Int32FromUint64(v10), } v11 = int32(SYS_setsockopt) _ = int32(__SC_setsockopt) @@ -125626,7 +125624,7 @@ _9: v13 = level v14 = optname v15 = int32(bp) - v16 = int32(Uint32FromInt32(2) * Uint32FromInt64(4)) + v16 = Int32FromUint32(Uint32FromInt32(2) * Uint32FromInt64(4)) v17 = Int32FromInt32(0) if 0 != 0 { r = ___syscall_cp(tls, v11, v12, v13, v14, v15, v16, v17) @@ -125659,7 +125657,7 @@ _9: v22 = level v23 = optname v24 = int32(optval) - v25 = int32(optlen) + v25 = Int32FromUint32(optlen) v26 = Int32FromInt32(0) if 0 != 0 { r = ___syscall_cp(tls, v20, v21, v22, v23, v24, v25, v26) @@ -125678,7 +125676,7 @@ _9: } } } - return X__syscall_ret(tls, uint32(r1)) + return X__syscall_ret(tls, Uint32FromInt32(r1)) } func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { @@ -125709,7 +125707,7 @@ func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { v8 = r goto _9 _9: - return X__syscall_ret(tls, uint32(v8)) + return X__syscall_ret(tls, Uint32FromInt32(v8)) } func Xsockatmark(tls *TLS, s int32) (r int32) { @@ -125778,7 +125776,7 @@ _9: _18: s = v17 if s < 0 { - return X__syscall_ret(tls, uint32(s)) + return X__syscall_ret(tls, Uint32FromInt32(s)) } if type1&int32(SOCK_CLOEXEC) != 0 { X__syscall3(tls, int32(SYS_fcntl64), s, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) @@ -125787,7 +125785,7 @@ _9: X__syscall3(tls, int32(SYS_fcntl64), s, Int32FromInt32(F_SETFL), Int32FromInt32(O_NONBLOCK)) } } - return X__syscall_ret(tls, uint32(s)) + return X__syscall_ret(tls, Uint32FromInt32(s)) } func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr) (r2 int32) { @@ -125818,7 +125816,7 @@ func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr v8 = r goto _9 _9: - r1 = X__syscall_ret(tls, uint32(v8)) + r1 = X__syscall_ret(tls, Uint32FromInt32(v8)) if r1 < 0 && (*(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EINVAL) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EPROTONOSUPPORT)) && type1&(Int32FromInt32(SOCK_CLOEXEC)|Int32FromInt32(SOCK_NONBLOCK)) != 0 { v10 = int32(SYS_socketpair) _ = int32(__SC_socketpair) @@ -125840,7 +125838,7 @@ _9: v17 = r goto _18 _18: - r1 = X__syscall_ret(tls, uint32(v17)) + r1 = X__syscall_ret(tls, Uint32FromInt32(v17)) if r1 < 0 { return r1 } @@ -126037,11 +126035,11 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint32(0xffffffff)-uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { + if Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint32(0xffffffff)-Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) + len1 = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) i = 0 for { if !(i < (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]) { @@ -126092,18 +126090,18 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = v8 goto cleanup_f } - if uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { - if uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint32FromUint32(0xffffffff)/Uint32FromInt64(4) { + if Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { + if Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint32FromUint32(0xffffffff)/Uint32FromInt64(4) { rv = int32(ENOMEM) goto cleanup_f } - tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint32(4)) + tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint32(4)) if !(tmp1 != 0) { rv = *(*int32)(unsafe.Pointer(X__errno_location(tls))) goto cleanup_f } *(*uintptr)(unsafe.Pointer(mem)) = tmp1 - *(*Tsize_t)(unsafe.Pointer(nmem)) = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) + *(*Tsize_t)(unsafe.Pointer(nmem)) = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) } if (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] != 0 { *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(mem)))) = *(*uintptr)(unsafe.Pointer(buf)) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) @@ -126133,7 +126131,7 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz } (*Tgroup)(unsafe.Pointer(gr)).Fgr_name = *(*uintptr)(unsafe.Pointer(buf)) (*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd = (*Tgroup)(unsafe.Pointer(gr)).Fgr_name + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) - (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) + (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) (*Tgroup)(unsafe.Pointer(gr)).Fgr_mem = *(*uintptr)(unsafe.Pointer(mem)) if *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr(-Int32FromInt32(1)))) != 0 || *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]-int32(1)))) != 0 { rv = int32(EIO) @@ -126308,10 +126306,10 @@ func _atou(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126374,7 +126372,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = _atou(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) @@ -126390,7 +126388,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { *(*Tsize_t)(unsafe.Pointer(nmem))++ } goto _10 @@ -126415,7 +126413,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { v12 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v12)) = uint8(0) @@ -126485,11 +126483,11 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u goto cleanup } if (*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRFOUND)] != 0 { - nscdbuf = Xcalloc(tls, uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRNGRPS)]), uint32(4)) + nscdbuf = Xcalloc(tls, Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRNGRPS)]), uint32(4)) if !(nscdbuf != 0) { goto cleanup } - nbytes = uint32(4) * uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRNGRPS)]) + nbytes = uint32(4) * Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 24)))[int32(INITGRNGRPS)]) if nbytes != 0 && !(Xfread(tls, nscdbuf, nbytes, uint32(1), f) != 0) { if !(Xferror(tls, f) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EIO) @@ -126700,11 +126698,11 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint32FromUint32(0xffffffff)/Uint32FromInt32(8) { + if Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint32FromUint32(0xffffffff)/Uint32FromInt32(8) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) + len1 = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) if len1 > *(*Tsize_t)(unsafe.Pointer(size)) || !(*(*uintptr)(unsafe.Pointer(buf)) != 0) { tmp = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(buf)), len1) if !(tmp != 0) { @@ -126728,8 +126726,8 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_passwd + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_shell = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) /* Don't assume that nscd made sure to null terminate strings. * It's supposed to, but malicious nscd should be ignored * rather than causing a crash. @@ -126877,10 +126875,10 @@ func _atou1(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126942,14 +126940,14 @@ func X__getpwent_a(tls *TLS, f uintptr, pw uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v9)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v10 = *(*uintptr)(unsafe.Pointer(bp)) @@ -127048,7 +127046,7 @@ func X__nscd_query(tls *TLS, req Tint32_t, key uintptr, buf uintptr, len1 Tsize_ *(*[3]Tint32_t)(unsafe.Pointer(bp + 16)) = [3]Tint32_t{ 0: int32(NSCDVERSION), 1: req, - 2: int32(Xstrnlen(tls, key, uint32(LOGIN_NAME_MAX)) + uint32(1)), + 2: Int32FromUint32(Xstrnlen(tls, key, uint32(LOGIN_NAME_MAX)) + uint32(1)), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -127121,11 +127119,11 @@ retry: if !(i < Uint32FromInt64(12)/Uint32FromInt64(4)) { break } - v3 = uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 16)))[i]) + v3 = Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 16)))[i]) v4 = v3>>int32(24) | v3>>int32(8)&uint32(0xff00) | v3<>int32(24) | v7>>int32(8)&uint32(0xff00) | v7< %v", r) }() } - return int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) + return Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) } func Xlrand48(tls *TLS) (r int32) { @@ -127416,7 +127414,7 @@ func Xjrand48(tls *TLS, s uintptr) (r int32) { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16)) + return Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16)) } func Xmrand48(tls *TLS) (r int32) { @@ -127442,7 +127440,7 @@ func Xrand(tls *TLS) (r int32) { defer func() { trc("-> %v", r) }() } _seed = uint64(6364136223846793005)*_seed + uint64(1) - return int32(_seed >> int32(33)) + return Int32FromUint64(_seed >> int32(33)) } func _temper(tls *TLS, x uint32) (r uint32) { @@ -127462,7 +127460,7 @@ func Xrand_r(tls *TLS, seed uintptr) (r int32) { _ = v1 v1 = *(*uint32)(unsafe.Pointer(seed))*Uint32FromInt32(1103515245) + Uint32FromInt32(12345) *(*uint32)(unsafe.Pointer(seed)) = v1 - return int32(_temper(tls, v1) / uint32(2)) + return Int32FromUint32(_temper(tls, v1) / uint32(2)) } /* @@ -127520,15 +127518,15 @@ func _lcg64(tls *TLS, x Tuint64_t) (r Tuint64_t) { } func _savestate(tls *TLS) (r uintptr) { - *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) = uint32(_n<> int32(16)) - _i = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) - _j = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) + _n = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> int32(16)) + _i = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) + _j = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) } func ___srandom(tls *TLS, seed uint32) { @@ -127634,11 +127632,11 @@ func Xrandom(tls *TLS) (r int32) { if _n == 0 { v1 = _lcg31(tls, *(*Tuint32_t)(unsafe.Pointer(_x1))) *(*Tuint32_t)(unsafe.Pointer(_x1)) = v1 - k = int32(v1) + k = Int32FromUint32(v1) goto end } *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) += *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_j)*4)) - k = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) + k = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) _i++ v2 = _i if v2 == _n { @@ -127676,8 +127674,8 @@ func Xsrand48(tls *TLS, seed int32) { defer tls.Free(16) *(*[3]uint16)(unsafe.Pointer(bp)) = [3]uint16{ 0: uint16(0x330e), - 1: uint16(seed), - 2: uint16(seed >> int32(16)), + 1: Uint16FromInt32(seed), + 2: Uint16FromInt32(seed >> int32(16)), } Xseed48(tls, bp) } @@ -127705,7 +127703,7 @@ func Xexecl(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint32(argc+int32(1)) * 4 + v2 = Uint32FromInt32(argc+int32(1)) * 4 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*4)) = argv0 @@ -127749,7 +127747,7 @@ func Xexecle(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint32(argc+int32(1)) * 4 + v2 = Uint32FromInt32(argc+int32(1)) * 4 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*4)) = argv0 @@ -127793,7 +127791,7 @@ func Xexeclp(tls *TLS, file uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint32(argc+int32(1)) * 4 + v2 = Uint32FromInt32(argc+int32(1)) * 4 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*4)) = argv0 @@ -127828,7 +127826,7 @@ func Xexecve(tls *TLS, path uintptr, argv uintptr, envp uintptr) (r int32) { defer func() { trc("-> %v", r) }() } /* do we need to use environ if envp is null? */ - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_execve), int32(path), int32(argv), int32(envp)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_execve), int32(path), int32(argv), int32(envp)))) } func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { @@ -127854,18 +127852,18 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { if !(path != 0) { path = __ccgo_ts + 1281 } - k = Xstrnlen(tls, file, uint32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + k = Xstrnlen(tls, file, Uint32FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if k > uint32(NAME_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENAMETOOLONG) return -int32(1) } - l = Xstrnlen(tls, path, uint32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint32(1) + l = Xstrnlen(tls, path, Uint32FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint32(1) p = path for { v2 = l + k + uint32(1) b = Xrealloc(tls, b, v2) z = X__strchrnul(tls, p, int32(':')) - if uint32(int32(z)-int32(p)) >= l { + if Uint32FromInt32(int32(z)-int32(p)) >= l { v3 = z z++ if !(*(*uint8)(unsafe.Pointer(v3)) != 0) { @@ -127873,7 +127871,7 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { } goto _1 } - _memcpy(tls, b, p, uint32(int32(z)-int32(p))) + _memcpy(tls, b, p, Uint32FromInt32(int32(z)-int32(p))) *(*uint8)(unsafe.Add(unsafe.Pointer(b), int32(z)-int32(p))) = uint8('/') _memcpy(tls, b+uintptr(int32(z)-int32(p))+BoolUintptr(z > p), file, k+uint32(1)) Xexecve(tls, b, argv, envp) @@ -127931,9 +127929,9 @@ func Xfexecve(tls *TLS, fd int32, argv uintptr, envp uintptr) (r1 int32) { _ = r r = X__syscall5(tls, int32(SYS_execveat), fd, int32(__ccgo_ts), int32(argv), int32(envp), Int32FromInt32(AT_EMPTY_PATH)) if r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - X__procfdname(tls, bp, uint32(fd)) + X__procfdname(tls, bp, Uint32FromInt32(fd)) Xexecve(tls, bp, argv, envp) if *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EBADF) @@ -128252,8 +128250,8 @@ func Xposix_spawnattr_setflags(tls *TLS, attr uintptr, flags int16) (r int32) { } var all_flags uint32 _ = all_flags - all_flags = uint32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) - if uint32(flags) & ^all_flags != 0 { + all_flags = Uint32FromInt32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) + if Uint32FromInt16(flags) & ^all_flags != 0 { return int32(EINVAL) } (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(flags) @@ -128293,7 +128291,7 @@ func Xvfork(tls *TLS) (r Tpid_t) { defer func() { trc("-> %v", r) }() } /* vfork syscall cannot be made from C code */ - return X__syscall_ret(tls, uint32(X__syscall0(tls, int32(SYS_fork)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall0(tls, int32(SYS_fork)))) } func Xwait(tls *TLS, status uintptr) (r Tpid_t) { @@ -128309,7 +128307,7 @@ func Xwaitid(tls *TLS, type1 Tidtype_t, id Tid_t, info uintptr, options int32) ( trc("tls=%v type1=%v id=%v info=%v options=%v, (%v:)", tls, type1, id, info, options, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_waitid), type1, int32(id), int32(info), options, Int32FromInt32(0), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_waitid), type1, Int32FromUint32(id), int32(info), options, Int32FromInt32(0), 0))) } func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { @@ -128317,7 +128315,7 @@ func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { trc("tls=%v pid=%v status=%v options=%v, (%v:)", tls, pid, status, options, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_wait4), pid, int32(status), options, Int32FromInt32(0), 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_wait4), pid, int32(status), options, Int32FromInt32(0), 0, 0))) } const BRACKET = -3 @@ -128350,11 +128348,11 @@ func _str_next(tls *TLS, str uintptr, n Tsize_t, step uintptr) (r int32) { *(*Tsize_t)(unsafe.Pointer(step)) = uint32(1) return -int32(1) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint32(k) - return int32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint32FromInt32(k) + return Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) } *(*Tsize_t)(unsafe.Pointer(step)) = uint32(1) - return int32(*(*uint8)(unsafe.Pointer(str))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) } func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r int32) { @@ -128370,35 +128368,35 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i return END } *(*Tsize_t)(unsafe.Pointer(step)) = uint32(1) - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { *(*Tsize_t)(unsafe.Pointer(step)) = uint32(2) pat++ esc = int32(1) goto escaped } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { k = uint32(1) if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { k++ } } if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { k++ } } for { - if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { break } - if k+uint32(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1)))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1))))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1))))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1))))) == int32('=')) { - z = int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1))))) + if k+uint32(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1))))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1))))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1))))) == int32('=')) { + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint32(1))))) k += uint32(2) if k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 { k++ } - for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint32(1))))) != z || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint32(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { k++ } if k == m || !(*(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0) { @@ -128417,10 +128415,10 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i *(*Tsize_t)(unsafe.Pointer(step)) = k + uint32(1) return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { return -int32(5) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { return -int32(4) } goto escaped @@ -128432,23 +128430,23 @@ escaped: *(*Tsize_t)(unsafe.Pointer(step)) = uint32(0) return -int32(2) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint32(k1 + esc) - return int32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint32FromInt32(k1 + esc) + return Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) } - return int32(*(*uint8)(unsafe.Pointer(pat))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) } func _casefold(tls *TLS, k int32) (r int32) { var c int32 var v1 uint32 _, _ = c, v1 - c = int32(Xtowupper(tls, uint32(k))) + c = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(k))) if c == k { - v1 = Xtowlower(tls, uint32(k)) + v1 = Xtowlower(tls, Uint32FromInt32(k)) } else { - v1 = uint32(c) + v1 = Uint32FromInt32(c) } - return int32(v1) + return Int32FromUint32(v1) } func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { @@ -128462,17 +128460,17 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { _, _, _, _, _ = inv, l, l1, p0, z inv = 0 p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(p))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('!') { inv = int32(1) p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { if k == int32(']') { return BoolInt32(!(inv != 0)) } p++ } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { if k == int32('-') { return BoolInt32(!(inv != 0)) } @@ -128481,33 +128479,33 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { } *(*Twchar_t)(unsafe.Pointer(bp)) = uint32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { l = Xmbtowc(tls, bp+4, p+uintptr(1), uint32(4)) if l < 0 { return 0 } if *(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4)) { - if uint32(k)-*(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp)) || uint32(kfold)-*(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp)) { + if Uint32FromInt32(k)-*(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp)) || Uint32FromInt32(kfold)-*(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp)) { return BoolInt32(!(inv != 0)) } } p += uintptr(l - int32(1)) goto _1 } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { p0 = p + uintptr(2) - z = int32(*(*uint8)(unsafe.Pointer(p + 1))) + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) p += uintptr(3) - for int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || int32(*(*uint8)(unsafe.Pointer(p))) != int32(']') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']') { p++ } if z == int32(':') && int32(p-uintptr(1))-int32(p0) < int32(16) { - _memcpy(tls, bp+8, p0, uint32(int32(p-uintptr(1))-int32(p0))) + _memcpy(tls, bp+8, p0, Uint32FromInt32(int32(p-uintptr(1))-int32(p0))) (*(*[16]uint8)(unsafe.Pointer(bp + 8)))[int32(p-uintptr(1))-int32(p0)] = uint8(0) - if Xiswctype(tls, uint32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, uint32(kfold), Xwctype(tls, bp+8)) != 0 { + if Xiswctype(tls, Uint32FromInt32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, Uint32FromInt32(kfold), Xwctype(tls, bp+8)) != 0 { return BoolInt32(!(inv != 0)) } } @@ -128522,7 +128520,7 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { } p += uintptr(l1 - int32(1)) } - if *(*Twchar_t)(unsafe.Pointer(bp)) == uint32(k) || *(*Twchar_t)(unsafe.Pointer(bp)) == uint32(kfold) { + if *(*Twchar_t)(unsafe.Pointer(bp)) == Uint32FromInt32(k) || *(*Twchar_t)(unsafe.Pointer(bp)) == Uint32FromInt32(kfold) { return BoolInt32(!(inv != 0)) } goto _1 @@ -128545,7 +128543,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, endpat, endstr, k, kfold, p, ptail, s, stail, tailcnt, v10, v12, v13, v15, v2, v3, v4, v6, v8, v9 tailcnt = uint32(0) if flags&int32(FNM_PERIOD) != 0 { - if int32(*(*uint8)(unsafe.Pointer(str))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { return int32(FNM_NOMATCH) } } @@ -128604,7 +128602,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(p < endpat) { break } - switch _pat_next(tls, p, uint32(int32(endpat)-int32(p)), bp, flags) { + switch _pat_next(tls, p, Uint32FromInt32(int32(endpat)-int32(p)), bp, flags) { case -int32(2): return int32(FNM_NOMATCH) case -int32(5): @@ -128665,9 +128663,9 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, /* Check that the pat and str tails match */ p = ptail for { - c = _pat_next(tls, p, uint32(int32(endpat)-int32(p)), bp, flags) + c = _pat_next(tls, p, Uint32FromInt32(int32(endpat)-int32(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) - v12 = _str_next(tls, s, uint32(int32(endstr)-int32(s)), bp+4) + v12 = _str_next(tls, s, Uint32FromInt32(int32(endstr)-int32(s)), bp+4) k = v12 if v12 <= 0 { if c != END { @@ -128702,7 +128700,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, p = pat s = str for { - c = _pat_next(tls, p, uint32(int32(endpat)-int32(p)), bp, flags) + c = _pat_next(tls, p, Uint32FromInt32(int32(endpat)-int32(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) /* Encountering * completes/commits a component */ if c == -int32(5) { @@ -128710,7 +128708,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, str = s break } - k = _str_next(tls, s, uint32(int32(endstr)-int32(s)), bp+4) + k = _str_next(tls, s, Uint32FromInt32(int32(endstr)-int32(s)), bp+4) if !(k != 0) { return int32(FNM_NOMATCH) } @@ -128738,13 +128736,13 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, } /* If we failed, advance str, by 1 char if it's a valid * char, or past all invalid bytes otherwise. */ - k = _str_next(tls, str, uint32(int32(endstr)-int32(str)), bp+4) + k = _str_next(tls, str, Uint32FromInt32(int32(endstr)-int32(str)), bp+4) if k > 0 { str += uintptr(*(*Tsize_t)(unsafe.Pointer(bp + 4))) } else { str++ for { - if !(_str_next(tls, str, uint32(int32(endstr)-int32(str)), bp+4) < 0) { + if !(_str_next(tls, str, Uint32FromInt32(int32(endstr)-int32(str)), bp+4) < 0) { break } goto _16 @@ -128772,7 +128770,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { for { s = str for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { break } goto _2 @@ -128782,7 +128780,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } p = pat for { - v4 = _pat_next(tls, p, uint32(-Int32FromInt32(1)), bp, flags) + v4 = _pat_next(tls, p, Uint32FromInt32(-Int32FromInt32(1)), bp, flags) c = v4 if !(v4 != END && c != int32('/')) { break @@ -128792,10 +128790,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { ; p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) } - if c != int32(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { return int32(FNM_NOMATCH) } - if _fnmatch_internal(tls, pat, uint32(int32(p)-int32(pat)), str, uint32(int32(s)-int32(str)), flags) != 0 { + if _fnmatch_internal(tls, pat, Uint32FromInt32(int32(p)-int32(pat)), str, Uint32FromInt32(int32(s)-int32(str)), flags) != 0 { return int32(FNM_NOMATCH) } if !(c != 0) { @@ -128813,10 +128811,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if !(*(*uint8)(unsafe.Pointer(s)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/') { goto _5 } - if !(_fnmatch_internal(tls, pat, uint32(-Int32FromInt32(1)), str, uint32(int32(s)-int32(str)), flags) != 0) { + if !(_fnmatch_internal(tls, pat, Uint32FromInt32(-Int32FromInt32(1)), str, Uint32FromInt32(int32(s)-int32(str)), flags) != 0) { return 0 } goto _5 @@ -128826,7 +128824,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } } } - return _fnmatch_internal(tls, pat, uint32(-Int32FromInt32(1)), str, uint32(-Int32FromInt32(1)), flags) + return _fnmatch_internal(tls, pat, Uint32FromInt32(-Int32FromInt32(1)), str, Uint32FromInt32(-Int32FromInt32(1)), flags) } const GLOB_ABORTED = 2 @@ -128866,7 +128864,7 @@ func _append(tls *TLS, tail uintptr, name uintptr, len1 Tsize_t, mark int32) (r (*Tmatch)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tail)))).Fnext = new1 (*Tmatch)(unsafe.Pointer(new1)).Fnext = UintptrFromInt32(0) _memcpy(tls, new1+4, name, len1+uint32(1)) - if mark != 0 && len1 != 0 && int32(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint32(1))))) != int32('/') { + if mark != 0 && len1 != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint32(1))))) != int32('/') { *(*uint8)(unsafe.Pointer(new1 + 4 + uintptr(len1))) = uint8('/') *(*uint8)(unsafe.Pointer(new1 + 4 + uintptr(len1+uint32(1)))) = uint8(0) } @@ -128893,7 +128891,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if *(*uint8)(unsafe.Pointer(pat)) != 0 && type1 != int32(DT_DIR) { type1 = 0 } - for pos+uint32(1) < uint32(PATH_MAX) && int32(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { + for pos+uint32(1) < uint32(PATH_MAX) && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { v1 = pos pos++ v2 = pat @@ -128907,7 +128905,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag in_bracket = 0 overflow = 0 for { - if !(int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { break } if !(*(*uint8)(unsafe.Pointer(pat + uintptr(i))) != 0) { @@ -128915,20 +128913,20 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag return 0 } pat += uintptr(i) - pos += uint32(j) + pos += Uint32FromInt32(j) v4 = Int32FromInt32(0) j = v4 i = v4 break } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { in_bracket = int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { /* Backslashes inside a bracket are (at least by * our interpretation) non-special, so if next * char is ']' we have a complete expression. */ - if in_bracket != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int32(1))))) == int32(']') { + if in_bracket != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int32(1))))) == int32(']') { break } /* Unpaired final backslash never matches. */ @@ -128939,14 +128937,14 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } } } - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { if overflow != 0 { return 0 } in_bracket = 0 pat += uintptr(i + int32(1)) i = -int32(1) - pos += uint32(j + int32(1)) + pos += Uint32FromInt32(j + int32(1)) j = -int32(1) } /* Only store a character if it fits in the buffer, but if @@ -128954,10 +128952,10 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag * must be remembered and handled later only if the bracket * is unterminated (and thereby a literal), so as not to * disallow long bracket expressions with short matches. */ - if pos+uint32(j+Int32FromInt32(1)) < uint32(PATH_MAX) { + if pos+Uint32FromInt32(j+Int32FromInt32(1)) < uint32(PATH_MAX) { v5 = j j++ - *(*uint8)(unsafe.Pointer(buf + uintptr(pos+uint32(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) + *(*uint8)(unsafe.Pointer(buf + uintptr(pos+Uint32FromInt32(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) } else { if in_bracket != 0 { overflow = int32(1) @@ -129000,7 +128998,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if p2 != 0 && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { p = p2 for { - if !(p > pat && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { + if !(p > pat && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { break } goto _6 @@ -129034,7 +129032,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag break } /* Quickly skip non-directories when there's pattern left. */ - if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { + if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { continue } l = Xstrlen(tls, de+19) @@ -129060,7 +129058,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } /* With GLOB_PERIOD, don't allow matching . or .. unless * fnmatch would match them with FNM_PERIOD rules in effect. */ - if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { + if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { continue } _memcpy(tls, buf+uintptr(pos), de+19, l+uint32(1)) @@ -129072,7 +129070,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } else { v11 = __ccgo_ts } - r = _do_glob(tls, buf, pos+l, int32((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) + r = _do_glob(tls, buf, pos+l, Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) if r != 0 { Xclosedir(tls, dir) return r @@ -129174,7 +129172,7 @@ func _expand_tilde(tls *TLS, pat uintptr, buf uintptr, pos uintptr) (r int32) { ; home = (*(*Tpasswd)(unsafe.Pointer(bp))).Fpw_dir } - for i < uint32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { + for i < Uint32FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { v10 = i i++ v11 = home @@ -129239,7 +129237,7 @@ func Xglob(tls *TLS, pat uintptr, flags int32, errfunc uintptr, g uintptr) (r in (*(*[4096]uint8)(unsafe.Pointer(bp + 8)))[0] = uint8(0) *(*Tsize_t)(unsafe.Pointer(bp + 4104)) = uint32(0) *(*uintptr)(unsafe.Pointer(bp + 4108)) = p - if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && int32(*(*uint8)(unsafe.Pointer(p))) == int32('~') { + if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('~') { error1 = _expand_tilde(tls, bp+4108, bp+8, bp+4104) } if !(error1 != 0) { @@ -129637,7 +129635,7 @@ func _tre_ast_new_iter(tls *TLS, mem Ttre_mem_t, arg uintptr, min int32, max int (*Ttre_iteration_t)(unsafe.Pointer(iter)).Farg = arg (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmin = min (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmax = max - SetBitFieldPtr8Uint32(iter+12, uint32(minimal), 0, 0x1) + SetBitFieldPtr8Uint32(iter+12, Uint32FromInt32(minimal), 0, 0x1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnum_submatches = (*Ttre_ast_node_t)(unsafe.Pointer(arg)).Fnum_submatches return node } @@ -129706,7 +129704,7 @@ func _tre_stack_new(tls *TLS, size int32, max_size int32, increment int32) (r ui _ = s s = Xmalloc(tls, uint32(20)) if s != UintptrFromInt32(0) { - (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint32(4)*uint32(size)) + (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint32(4)*Uint32FromInt32(size)) if (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack == UintptrFromInt32(0) { Xfree(tls, s) return UintptrFromInt32(0) @@ -129743,7 +129741,7 @@ func _tre_stack_push(tls *TLS, s uintptr, value Ttre_stack_item) (r Treg_errcode if new_size > (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size { new_size = (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size } - new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint32(4)*uint32(new_size)) + new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint32(4)*Uint32FromInt32(new_size)) if new_buffer == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -129878,7 +129876,7 @@ func _tre_expand_macro(tls *TLS, s uintptr) (r uintptr) { _ = i i = 0 for { - if !(_tre_macros[i].Fc != 0 && int32(_tre_macros[i].Fc) != int32(*(*uint8)(unsafe.Pointer(s)))) { + if !(_tre_macros[i].Fc != 0 && Int32FromUint8(_tre_macros[i].Fc) != Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) { break } goto _1 @@ -129914,7 +129912,7 @@ func _tre_new_lit(tls *TLS, p uintptr) (r uintptr) { return uintptr(0) } *(*int32)(unsafe.Pointer(p + 12)) *= int32(2) - a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, uint32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint32(4)) + a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, Uint32FromInt32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint32(4)) if !(a != 0) { return uintptr(0) } @@ -129940,8 +129938,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { /* assumes islower(c) and isupper(c) are exclusive and toupper(c)!=c if islower(c). multiple opposite case characters are not supported */ - if Xiswlower(tls, uint32(c)) != 0 { - v2 = int32(Xtowupper(tls, uint32(c))) + if Xiswlower(tls, Uint32FromInt32(c)) != 0 { + v2 = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(c))) e = v2 b = v2 c++ @@ -129950,7 +129948,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowupper(tls, uint32(c)) != uint32(e) { + if Xtowupper(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _3 @@ -129960,8 +129958,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { e++ } } else { - if Xiswupper(tls, uint32(c)) != 0 { - v4 = int32(Xtowlower(tls, uint32(c))) + if Xiswupper(tls, Uint32FromInt32(c)) != 0 { + v4 = Int32FromUint32(Xtowlower(tls, Uint32FromInt32(c))) e = v4 b = v4 c++ @@ -129970,7 +129968,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowlower(tls, uint32(c)) != uint32(e) { + if Xtowlower(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _5 @@ -130037,7 +130035,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint start = s for { class = uint32(0) - len1 = Xmbtowc(tls, bp, s, uint32(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint32FromInt32(-Int32FromInt32(1))) if len1 <= 0 { if *(*uint8)(unsafe.Pointer(s)) != 0 { v2 = int32(REG_BADPAT) @@ -130046,26 +130044,26 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint } return v2 } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fs = s + uintptr(1) return REG_OK } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { return int32(REG_ERANGE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { /* collating symbols and equivalence classes are not supported */ return int32(REG_ECOLLATE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { s += uintptr(2) len1 = 0 for { if !(len1 < int32(CHARCLASS_NAME_MAX) && *(*uint8)(unsafe.Pointer(s + uintptr(len1))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { - _memcpy(tls, bp+4, s, uint32(len1)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { + _memcpy(tls, bp+4, s, Uint32FromInt32(len1)) (*(*[15]uint8)(unsafe.Pointer(bp + 4)))[len1] = uint8(0) class = Xwctype(tls, bp+4) break @@ -130075,21 +130073,21 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint ; len1++ } - if !(class != 0) || int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { + if !(class != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { return int32(REG_ECTYPE) } min = 0 max = int32(TRE_CHAR_MAX) s += uintptr(len1 + int32(2)) } else { - v4 = int32(*(*Twchar_t)(unsafe.Pointer(bp))) + v4 = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) max = v4 min = v4 s += uintptr(len1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { s++ - len1 = Xmbtowc(tls, bp, s, uint32(-Int32FromInt32(1))) - max = int32(*(*Twchar_t)(unsafe.Pointer(bp))) + len1 = Xmbtowc(tls, bp, s, Uint32FromInt32(-Int32FromInt32(1))) + max = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) /* XXX - Should use collation order instead of encoding values in character ranges. */ if len1 <= 0 || min > max { @@ -130148,12 +130146,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*(*Tliterals)(unsafe.Pointer(bp))).Fmem = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem (*(*Tliterals)(unsafe.Pointer(bp))).Flen1 = 0 (*(*Tliterals)(unsafe.Pointer(bp))).Fcap1 = int32(32) - (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, uint32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint32(4)) + (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, Uint32FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint32(4)) if !((*(*Tliterals)(unsafe.Pointer(bp))).Fa != 0) { return int32(REG_ESPACE) } (*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1 = 0 - (*(*Tneg)(unsafe.Pointer(bp + 16))).Fnegate = BoolInt32(int32(*(*uint8)(unsafe.Pointer(s))) == int32('^')) + (*(*Tneg)(unsafe.Pointer(bp + 16))).Fnegate = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('^')) if (*(*Tneg)(unsafe.Pointer(bp + 16))).Fnegate != 0 { s++ } @@ -130177,7 +130175,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) } /* Sort the array if we need to negate it. */ - Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, uint32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint32(4), __ccgo_fp(_tre_compare_lit)) + Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, Uint32FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint32(4), __ccgo_fp(_tre_compare_lit)) /* extra lit for the last negated range */ lit = _tre_new_lit(tls, bp) if !(lit != 0) { @@ -130189,12 +130187,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) /* negated classes */ if (*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1 != 0 { - nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, uint32((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1+Int32FromInt32(1))*uint32(4)) + nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, Uint32FromInt32((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1+Int32FromInt32(1))*uint32(4)) if !(nc != 0) { err = int32(REG_ESPACE) goto parse_bracket_done } - _memcpy(tls, nc, bp+16+8, uint32((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1)*uint32(4)) + _memcpy(tls, nc, bp+16+8, Uint32FromInt32((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1)*uint32(4)) *(*Ttre_ctype_t)(unsafe.Pointer(nc + uintptr((*(*Tneg)(unsafe.Pointer(bp + 16))).Flen1)*4)) = uint32(0) } } @@ -130255,7 +130253,7 @@ func _parse_dup_count(tls *TLS, s uintptr, n uintptr) (r uintptr) { } *(*int32)(unsafe.Pointer(n)) = 0 for { - *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (int32(*(*uint8)(unsafe.Pointer(s))) - int32('0')) + *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0')) s++ if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { break @@ -130275,7 +130273,7 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u var _ /* min at bp+0 */ int32 _, _, _, _, _ = v1, v2, v3, v4, v5 s = _parse_dup_count(tls, s, bp) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(',') { s = _parse_dup_count(tls, s+uintptr(1), bp+4) } else { *(*int32)(unsafe.Pointer(bp + 4)) = *(*int32)(unsafe.Pointer(bp)) @@ -130286,11 +130284,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u s++ } } - if v5 = v3 || v2 && int32(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { + if v5 = v3 || v2 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { v4 = s s++ } - if v5 || int32(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { + if v5 || Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { return uintptr(0) } *(*int32)(unsafe.Pointer(pmin)) = *(*int32)(unsafe.Pointer(bp)) @@ -130300,11 +130298,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u func _hexval1(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -130357,7 +130355,7 @@ func _parse_atom(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { var _ /* wc at bp+0 */ Twchar_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, ere, err, i, len1, node, p, tmp1, tmp11, tmp2, tmp21, v, val, v14, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26 ere = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags & int32(REG_EXTENDED) - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('['): goto _1 case int32('\\'): @@ -130399,7 +130397,7 @@ _2: /* extensions: \b, \B, \<, \>, \xHH \x{HHHH} */ s++ v14 = s - switch int32(*(*uint8)(unsafe.Pointer(v14))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v14))) { case 0: return int32(REG_EESCAPE) case int32('b'): @@ -130414,7 +130412,7 @@ _2: s++ v = 0 len1 = int32(2) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { len1 = int32(8) s++ } @@ -130435,7 +130433,7 @@ _2: } s += uintptr(i) if len1 == int32(8) { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('}') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('}') { return int32(REG_EBRACE) } s++ @@ -130468,7 +130466,7 @@ _2: default: if !(ere != 0) && uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { /* back reference */ - val = int32(*(*uint8)(unsafe.Pointer(s))) - int32('0') + val = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0') v19 = ctx + 24 v18 = *(*int32)(unsafe.Pointer(v19)) *(*int32)(unsafe.Pointer(v19))++ @@ -130523,7 +130521,7 @@ _4: _5: ; /* '$' is special everywhere in EREs, and at the end of a BRE subexpression. */ - if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { + if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { goto parse_literal } node = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(2), int32(ASSERT_AT_EOL), -int32(1)) @@ -130555,21 +130553,21 @@ _12: goto parse_literal parse_literal: ; - len1 = Xmbtowc(tls, bp, s, uint32(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint32FromInt32(-Int32FromInt32(1))) if len1 < 0 { return int32(REG_BADPAT) } if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, *(*Twchar_t)(unsafe.Pointer(bp))) != 0 || Xiswlower(tls, *(*Twchar_t)(unsafe.Pointer(bp))) != 0) { /* multiple opposite case characters are not supported */ - tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowupper(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), int32(Xtowupper(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) - tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), int32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowupper(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), Int32FromUint32(Xtowupper(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), Int32FromUint32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) if tmp11 != 0 && tmp21 != 0 { node = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, tmp11, tmp21) } else { node = uintptr(0) } } else { - node = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(*(*Twchar_t)(unsafe.Pointer(bp))), int32(*(*Twchar_t)(unsafe.Pointer(bp))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + node = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))), Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) } (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition++ s += uintptr(len1) @@ -130611,7 +130609,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { return err } for { - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { v4 = _tre_stack_push_voidptr(tls, stack, nunion) err = v4 if v4 != REG_OK { @@ -130640,7 +130638,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s goto _3 } - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(1), -int32(1), -int32(1)) if !((*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn != 0) { return int32(REG_ESPACE) @@ -130656,33 +130654,33 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { parse_iter: ; for { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('*') { if !(ere != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('{') { break } } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { break } /* extension: treat \+, \? as repetitions in BRE */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { s++ } /* handle ^* at the start of a BRE. */ - if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && int32(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { + if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { break } /* extension: multiple consecutive *+?{,} is unspecified, but (a+)+ has to be supported so accepting a++ makes sense, note however that the RE_DUP_MAX limit can be circumvented: (a{255}){255} uses a lot of memory.. */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { s = _parse_dup(tls, s+uintptr(1), ere, bp, bp+4) if !(s != 0) { return int32(REG_BADBR) @@ -130690,10 +130688,10 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { } else { *(*int32)(unsafe.Pointer(bp)) = 0 *(*int32)(unsafe.Pointer(bp + 4)) = -int32(1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { *(*int32)(unsafe.Pointer(bp)) = int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('?') { *(*int32)(unsafe.Pointer(bp + 4)) = int32(1) } s++ @@ -130710,13 +130708,13 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { _9: } nbranch = _tre_ast_new_catenation(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nbranch, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn) - if ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { + if ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { /* extension: empty branch is unspecified (), (|a), (a|) here they are not rejected but match on empty string */ - c = int32(*(*uint8)(unsafe.Pointer(s))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) nunion = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nunion, nbranch) nbranch = uintptr(0) - if c == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { + if c == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { s += uintptr(2) (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s } else { @@ -131024,7 +131022,7 @@ func _tre_add_tags(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr, tnfa u } (*(*Ttre_submatch_data_t)(unsafe.Pointer((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fsubmatch_data + uintptr(id1)*12))).Fparents = UintptrFromInt32(0) if i2 > 0 { - p = Xmalloc(tls, uint32(4)*uint32(i2+Int32FromInt32(1))) + p = Xmalloc(tls, uint32(4)*Uint32FromInt32(i2+Int32FromInt32(1))) if p == UintptrFromInt32(0) { status = int32(REG_ESPACE) goto _10 @@ -131928,7 +131926,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; s2++ } - new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint32(32)*uint32(s1+s2+Int32FromInt32(1))) + new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint32(32)*Uint32FromInt32(s1+s2+Int32FromInt32(1))) if !(new_set != 0) { return UintptrFromInt32(0) } @@ -131957,7 +131955,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint32FromInt64(4)*uint32(i+num_tags+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint32FromInt64(4)*Uint32FromInt32(i+num_tags+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -132017,7 +132015,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*uint32(i+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*Uint32FromInt32(i+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -132335,7 +132333,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint32(4)*uint32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint32(4)*Uint32FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -132366,7 +132364,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint32(4)*uint32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint32(4)*Uint32FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -132424,8 +132422,8 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun } /* Use the character ranges, assertions, etc. from `p1' for the transition from `p1' to `p2'. */ - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition)*4)))*32 (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate_id = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition if (*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fclass != 0 { @@ -132456,7 +132454,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun ; i++ } - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint32(4)*uint32(i+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint32(4)*Uint32FromInt32(i+Int32FromInt32(1))) if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -132495,7 +132493,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = UintptrFromInt32(0) /* If there were any tags, allocate an array and fill it. */ if i+j > 0 { - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint32(4)*uint32(i+j+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint32(4)*Uint32FromInt32(i+j+Int32FromInt32(1))) if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags != 0) { return int32(REG_ESPACE) } @@ -132649,10 +132647,10 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) + (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) tree = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fn /* Referring to nonexistent subexpressions is illegal. */ - if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > int32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { + if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > Int32FromUint32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { errcode = int32(REG_ESUBREG) if int32(1) != 0 { goto error_exit @@ -132668,7 +132666,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs = BoolInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref >= 0) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_approx = 0 - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) /* Set up tags for submatch addressing. If REG_NOSUB is set and the regexp does not have back references, this can be skipped. */ if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs != 0 || !(cflags&Int32FromInt32(REG_NOSUB) != 0) { @@ -132681,7 +132679,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 { - tag_directions = Xmalloc(tls, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + tag_directions = Xmalloc(tls, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) if tag_directions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132689,16 +132687,16 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftag_directions = tag_directions - Xmemset(tls, tag_directions, -int32(1), uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + Xmemset(tls, tag_directions, -int32(1), uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) } - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1), uint32(4)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1), uint32(4)) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - submatch_data = Xcalloc(tls, uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id), uint32(12)) + submatch_data = Xcalloc(tls, Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id), uint32(12)) if submatch_data == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132751,14 +132749,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - counts = Xmalloc(tls, uint32(4)*uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + counts = Xmalloc(tls, uint32(4)*Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if counts == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - offs = Xmalloc(tls, uint32(4)*uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + offs = Xmalloc(tls, uint32(4)*Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if offs == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132791,7 +132789,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; i++ } - transitions = Xcalloc(tls, uint32(add)+uint32(1), uint32(32)) + transitions = Xcalloc(tls, Uint32FromInt32(add)+uint32(1), uint32(32)) if transitions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132799,7 +132797,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftransitions = transitions - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) errcode = _tre_ast_to_tnfa(tls, tree, transitions, counts, offs) if errcode != REG_OK { errcode = errcode @@ -132814,7 +132812,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { i++ p += 32 } - initial = Xcalloc(tls, uint32(i)+uint32(1), uint32(32)) + initial = Xcalloc(tls, Uint32FromInt32(i)+uint32(1), uint32(32)) if initial == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132844,14 +132842,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; j++ } - (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags = Xmalloc(tls, uint32(4)*uint32(j+Int32FromInt32(1))) + (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags = Xmalloc(tls, uint32(4)*Uint32FromInt32(j+Int32FromInt32(1))) if !((*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags != 0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - _memcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint32(4)*uint32(j+Int32FromInt32(1))) + _memcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint32(4)*Uint32FromInt32(j+Int32FromInt32(1))) } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Fassertions = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Fassertions i++ @@ -132861,7 +132859,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { p += 32 } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*32))).Fstate = UintptrFromInt32(0) - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ffinal = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*(*Ttre_pos_and_tags_t)(unsafe.Pointer((*Ttre_ast_node_t)(unsafe.Pointer(tree)).Flastpos))).Fposition)*4)))*32 (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags = cflags @@ -132998,7 +132996,7 @@ func Xregerror(tls *TLS, e int32, preg uintptr, buf uintptr, size Tsize_t) (r Ts s++ } s = X__lctrans_cur(tls, s) - return uint32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) + return Uint32FromInt32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) } const tre_bt_mem_alloc = 0 @@ -133119,23 +133117,23 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags everything in a single large block with calloc(). */ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ - if uint32(num_tags) > uint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { + if Uint32FromInt32(num_tags) > uint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { return int32(REG_ESPACE) } /* Likewise check rbytes. */ - if uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint32FromUint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(8)) { + if Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint32FromUint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(8)) { return int32(REG_ESPACE) } /* Likewise check pbytes. */ - if uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint32FromUint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(8)) { + if Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint32FromUint32(0xffffffff)/(Uint32FromInt32(8)*Uint32FromInt64(8)) { return int32(REG_ESPACE) } /* Compute the length of the block we need. */ - tbytes = uint32(4) * uint32(num_tags) - rbytes = uint32(8) * uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) - pbytes = uint32(8) * uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) - xbytes = uint32(4) * uint32(num_tags) - total_bytes = (Uint32FromInt64(4)-Uint32FromInt32(1))*Uint32FromInt32(4) + (rbytes+xbytes*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint32(2) + tbytes + pbytes + tbytes = uint32(4) * Uint32FromInt32(num_tags) + rbytes = uint32(8) * Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) + pbytes = uint32(8) * Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) + xbytes = uint32(4) * Uint32FromInt32(num_tags) + total_bytes = (Uint32FromInt64(4)-Uint32FromInt32(1))*Uint32FromInt32(4) + (rbytes+xbytes*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint32(2) + tbytes + pbytes /* Allocate the memory. */ buf = Xcalloc(tls, total_bytes, uint32(1)) if buf == UintptrFromInt32(0) { @@ -133144,32 +133142,32 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = buf tmp_buf = buf + uintptr(tbytes) - if uint32(int32(tmp_buf))%uint32(4) != 0 { - v1 = uint32(4) - uint32(int32(tmp_buf))%uint32(4) + if Uint32FromInt32(int32(tmp_buf))%uint32(4) != 0 { + v1 = uint32(4) - Uint32FromInt32(int32(tmp_buf))%uint32(4) } else { v1 = uint32(0) } tmp_buf += uintptr(v1) reach_next = tmp_buf tmp_buf += uintptr(rbytes) - if uint32(int32(tmp_buf))%uint32(4) != 0 { - v2 = uint32(4) - uint32(int32(tmp_buf))%uint32(4) + if Uint32FromInt32(int32(tmp_buf))%uint32(4) != 0 { + v2 = uint32(4) - Uint32FromInt32(int32(tmp_buf))%uint32(4) } else { v2 = uint32(0) } tmp_buf += uintptr(v2) reach = tmp_buf tmp_buf += uintptr(rbytes) - if uint32(int32(tmp_buf))%uint32(4) != 0 { - v3 = uint32(4) - uint32(int32(tmp_buf))%uint32(4) + if Uint32FromInt32(int32(tmp_buf))%uint32(4) != 0 { + v3 = uint32(4) - Uint32FromInt32(int32(tmp_buf))%uint32(4) } else { v3 = uint32(0) } tmp_buf += uintptr(v3) reach_pos = tmp_buf tmp_buf += uintptr(pbytes) - if uint32(int32(tmp_buf))%uint32(4) != 0 { - v4 = uint32(4) - uint32(int32(tmp_buf))%uint32(4) + if Uint32FromInt32(int32(tmp_buf))%uint32(4) != 0 { + v4 = uint32(4) - Uint32FromInt32(int32(tmp_buf))%uint32(4) } else { v4 = uint32(0) } @@ -133544,7 +133542,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fprev = UintptrFromInt32(0) (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fnext = UintptrFromInt32(0) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags != 0 { - tags = Xmalloc(tls, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !(tags != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -133558,7 +133556,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states != 0 { - states_seen = Xmalloc(tls, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) + states_seen = Xmalloc(tls, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) if !(states_seen != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -133608,7 +133606,7 @@ retry: } str_byte += uintptr(pos_add_next) pos_start = pos - next_c_start = int32(*(*Ttre_char_t)(unsafe.Pointer(bp))) + next_c_start = Int32FromUint32(*(*Ttre_char_t)(unsafe.Pointer(bp))) str_byte_start = str_byte /* Handle initial states. */ next_tags = UintptrFromInt32(0) @@ -133643,7 +133641,7 @@ retry: } (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133666,7 +133664,7 @@ retry: (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstr_byte = str_byte (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate = (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate_id = (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id - (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c = int32(*(*Ttre_char_t)(unsafe.Pointer(bp))) + (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c = Int32FromUint32(*(*Ttre_char_t)(unsafe.Pointer(bp))) i1 = 0 for { if !(i1 < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags) { @@ -133741,11 +133739,11 @@ _9: bt = *(*int32)(unsafe.Pointer(trans_i + 24)) /* Get the substring we need to match against. Remember to turn off REG_NOSUB temporarily. */ - _tre_fill_pmatch(tls, uint32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) + _tre_fill_pmatch(tls, Uint32FromInt32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) so = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*8))).Frm_so eo = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*8))).Frm_eo bt_len = eo - so - result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), uint32(bt_len)) + result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), Uint32FromInt32(bt_len)) if result == 0 { /* Back reference matched. Check for infinite loop. */ if bt_len == 0 { @@ -133831,7 +133829,7 @@ _9: } (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133854,7 +133852,7 @@ _9: (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstr_byte = str_byte (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate = (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate_id = (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id - (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c = int32(*(*Ttre_char_t)(unsafe.Pointer(bp))) + (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c = Int32FromUint32(*(*Ttre_char_t)(unsafe.Pointer(bp))) i3 = 0 for { if !(i3 < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags) { @@ -133911,7 +133909,7 @@ backtrack: pos = (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fpos str_byte = (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstr_byte state = (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate - *(*Ttre_char_t)(unsafe.Pointer(bp)) = uint32((*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c) + *(*Ttre_char_t)(unsafe.Pointer(bp)) = Uint32FromInt32((*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c) i4 = 0 for { if !(i4 < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags) { @@ -133931,7 +133929,7 @@ backtrack: if *(*Ttre_char_t)(unsafe.Pointer(bp)) == uint32('\000') { goto _8 } - *(*Ttre_char_t)(unsafe.Pointer(bp)) = uint32(next_c_start) + *(*Ttre_char_t)(unsafe.Pointer(bp)) = Uint32FromInt32(next_c_start) str_byte = str_byte_start goto retry } else { @@ -134058,7 +134056,7 @@ func Xregexec(tls *TLS, preg uintptr, string1 uintptr, nmatch Tsize_t, pmatch ui nmatch = uint32(0) } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 && nmatch > uint32(0) { - tags = Xmalloc(tls, uint32(4)*uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint32(4)*Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if tags == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -134155,7 +134153,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint32(TRE_MEM_BLOCK_SIZE) } else { if size*uint32(8) > uint32(TRE_MEM_BLOCK_SIZE) { - block_size = int32(size * uint32(8)) + block_size = Int32FromUint32(size * uint32(8)) } else { block_size = int32(TRE_MEM_BLOCK_SIZE) } @@ -134164,7 +134162,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) return UintptrFromInt32(0) } - (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, uint32(block_size)) + (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, Uint32FromInt32(block_size)) if (*Ttre_list_t)(unsafe.Pointer(l)).Fdata == UintptrFromInt32(0) { Xfree(tls, l) (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) @@ -134179,12 +134177,12 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl } (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fcurrent = l (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr = (*Ttre_list_t)(unsafe.Pointer(l)).Fdata - (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint32(block_size) + (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = Uint32FromInt32(block_size) } } /* Make sure the next pointer will be aligned. */ - if (uint32(int32((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint32(4) != 0 { - v1 = uint32(4) - (uint32(int32((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint32(4) + if (Uint32FromInt32(int32((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint32(4) != 0 { + v1 = uint32(4) - (Uint32FromInt32(int32((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint32(4) } else { v1 = uint32(0) } @@ -134271,8 +134269,8 @@ func _resize(tls *TLS, nel Tsize_t, htab uintptr) (r int32) { _, _, _, _, _, _, _, _ = e, i, j, newe, newsize, oldsize, oldtab, v4 oldsize = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fmask + uint32(1) oldtab = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fentries - if nel > uint32(-Int32FromInt32(1))/Uint32FromInt32(2)+Uint32FromInt32(1) { - nel = uint32(-Int32FromInt32(1))/Uint32FromInt32(2) + Uint32FromInt32(1) + if nel > Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(2)+Uint32FromInt32(1) { + nel = Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(2) + Uint32FromInt32(1) } newsize = uint32(MINSIZE) for { @@ -134715,7 +134713,7 @@ func X__tsearch_balance(tls *TLS, p uintptr) (r int32) { n = *(*uintptr)(unsafe.Pointer(p)) h0 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 4))) h1 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 4 + 1*4))) - if uint32(h0-h1)+uint32(1) < uint32(3) { + if Uint32FromInt32(h0-h1)+uint32(1) < uint32(3) { old = (*Tnode1)(unsafe.Pointer(n)).Fh if h0 < h1 { v1 = h1 + int32(1) @@ -134813,7 +134811,7 @@ func Xpoll(tls *TLS, fds uintptr, n Tnfds_t, timeout int32) (r int32) { trc("tls=%v fds=%v n=%v timeout=%v, (%v:)", tls, fds, n, timeout, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_poll), int32(fds), int32(n), timeout, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_poll), int32(fds), Int32FromUint32(n), timeout, 0, 0, 0))) } type t__ucontext3 = Tucontext_t5 @@ -134844,7 +134842,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r1 int3 } ns = v2 r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if to != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -134854,17 +134852,17 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r1 int3 } else { v3 = uintptr(0) } - r = ___syscall_cp(tls, int32(SYS_ppoll_time64), int32(fds), int32(n), int32(v3), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0) + r = ___syscall_cp(tls, int32(SYS_ppoll_time64), int32(fds), Int32FromUint32(n), int32(v3), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v4 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v4 = Uint64FromInt64(s) } else { - v4 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v4 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } - s = int64(int32(v4)) + s = int64(Int32FromUint64(v4)) if to != 0 { *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ 0: int32(s), @@ -134874,7 +134872,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r1 int3 } else { v5 = uintptr(0) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_ppoll), int32(fds), int32(n), int32(v5), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_ppoll), int32(fds), Int32FromUint32(n), int32(v5), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0))) } type t__ucontext4 = Tucontext_t4 @@ -134894,7 +134892,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui var _ /* data at bp+24 */ [2]Tsyscall_arg_t _, _, _, _, _, _, _, _ = ns, r, s, v1, v2, v3, v4, v5 *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 24)) = [2]Tsyscall_arg_t{ - 0: int32(uint32(mask)), + 0: Int32FromUint32(uint32(mask)), 1: Int32FromInt32(_NSIG) / Int32FromInt32(8), } if ts != 0 { @@ -134910,7 +134908,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } ns = v2 r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if ts != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -134923,14 +134921,14 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui r = ___syscall_cp(tls, int32(SYS_pselect6_time64), n, int32(rfds), int32(wfds), int32(efds), int32(v3), int32(bp+24)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v4 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v4 = Uint64FromInt64(s) } else { - v4 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v4 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } - s = int64(int32(v4)) + s = int64(Int32FromUint64(v4)) if ts != 0 { *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ 0: int32(s), @@ -134940,7 +134938,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } else { v5 = uintptr(0) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pselect6), n, int32(rfds), int32(wfds), int32(efds), int32(v5), int32(bp+24)))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pselect6), n, int32(rfds), int32(wfds), int32(efds), int32(v5), int32(bp+24)))) } type Tucontext_t6 = struct { @@ -134979,9 +134977,9 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin v2 = 0 } us = v2 - max_time = int64(Uint64FromUint64(1)<<(Uint32FromInt32(8)*Uint32FromInt64(8)-Uint32FromInt32(1)) - Uint64FromInt32(1)) + max_time = Int64FromUint64(Uint64FromUint64(1)<<(Uint32FromInt32(8)*Uint32FromInt64(8)-Uint32FromInt32(1)) - Uint64FromInt32(1)) if s < 0 || us < 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } if us/int64(1000000) > max_time-s { s = max_time @@ -134993,7 +134991,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin ns = int32(us * int64(1000)) } r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if tv != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -135009,14 +135007,14 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin r = ___syscall_cp(tls, int32(SYS_pselect6_time64), n, int32(rfds), int32(wfds), int32(efds), int32(v3), int32(bp+16)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v4 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v4 = Uint64FromInt64(s) } else { - v4 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v4 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } - s = int64(int32(v4)) + s = int64(Int32FromUint64(v4)) if tv != 0 { *(*[2]int32)(unsafe.Pointer(bp + 24)) = [2]int32{ 0: int32(s), @@ -135026,7 +135024,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin } else { v5 = uintptr(0) } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS__newselect), n, int32(rfds), int32(wfds), int32(efds), int32(v5), 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS__newselect), n, int32(rfds), int32(wfds), int32(efds), int32(v5), 0))) } var _all_mask = [2]uint32{ @@ -135078,9 +135076,9 @@ func Xgetitimer(tls *TLS, which int32, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(2)]) (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)]) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_getitimer), which, int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_getitimer), which, int32(old)))) } func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { @@ -135088,7 +135086,7 @@ func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { trc("tls=%v pid=%v sig=%v, (%v:)", tls, pid, sig, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_kill), pid, sig))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_kill), pid, sig))) } func Xkillpg(tls *TLS, pgid Tpid_t, sig int32) (r int32) { @@ -135165,7 +135163,7 @@ func Xraise(tls *TLS, sig int32) (r int32) { var _ /* set at bp+0 */ Tsigset_t _ = ret X__block_app_sigs(tls, bp) - ret = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_tkill), (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid, sig))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_tkill), (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid, sig))) X__restore_sigs(tls, bp) return ret } @@ -135200,8 +135198,8 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { vs = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_sec ius = int32((*Titimerval)(unsafe.Pointer(new1)).Fit_interval.Ftv_usec) vus = int32((*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_usec) - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } *(*[4]int32)(unsafe.Pointer(bp)) = [4]int32{ 0: int32(is), @@ -135216,9 +135214,9 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp + 16)))[int32(2)]) (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = int64((*(*[4]int32)(unsafe.Pointer(bp + 16)))[int32(3)]) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_setitimer), which, int32(new1), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_setitimer), which, int32(new1), int32(old)))) } type Tk_sigaction = struct { @@ -135257,8 +135255,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) _, _, _, _, _, _, _, _, _, _, _ = old, r, v1, v10, v11, v12, v2, v3, v5, v6, v8 if sa != 0 { if uint32(*(*uintptr)(unsafe.Pointer(sa))) > uint32(1) { - v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(uint32(sig-Int32FromInt32(1))/(Uint32FromInt32(8)*Uint32FromInt64(4)))*4 - v2 = int32(uint32(1) << (uint32(sig-Int32FromInt32(1)) % (Uint32FromInt32(8) * Uint32FromInt64(4)))) + v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(Uint32FromInt32(sig-Int32FromInt32(1))/(Uint32FromInt32(8)*Uint32FromInt64(4)))*4 + v2 = Int32FromUint32(uint32(1) << (Uint32FromInt32(sig-Int32FromInt32(1)) % (Uint32FromInt32(8) * Uint32FromInt64(4)))) if Uint32FromInt64(4) == Uint32FromInt64(4) { v3 = v1 _a_barrier(tls) @@ -135280,11 +135278,11 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) Fr [0][2]Tuint32_t Fv Tuint64_t }{} - *(*uint64)(unsafe.Pointer(bp + 8)) = uint64(v2) + *(*uint64)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(v2) if *(*Tuint32_t)(unsafe.Pointer(bp + 8)) != 0 { v6 = v5 _a_barrier(tls) - for cond := true; cond; cond = !(_a_sc(tls, v6, old|int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)))) != 0) { + for cond := true; cond; cond = !(_a_sc(tls, v6, old|Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)))) != 0) { old = _a_ll(tls, v6) } _a_barrier(tls) @@ -135295,7 +135293,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) if *(*Tuint32_t)(unsafe.Pointer(bp + 8 + 1*4)) != 0 { v8 = v5 + uintptr(1)*4 _a_barrier(tls) - for cond := true; cond; cond = !(_a_sc(tls, v8, old|int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8 + 1*4)))) != 0) { + for cond := true; cond; cond = !(_a_sc(tls, v8, old|Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8 + 1*4)))) != 0) { old = _a_ll(tls, v8) } _a_barrier(tls) @@ -135326,7 +135324,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) } } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fhandler = *(*uintptr)(unsafe.Pointer(sa)) - (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = uint32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) + (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = Uint32FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags |= uint32(SA_RESTORER) if (*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags&int32(SA_SIGINFO) != 0 { v10 = __ccgo_fp(X__restore_rt) @@ -135334,7 +135332,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) v10 = __ccgo_fp(X__restore) } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Frestorer = v10 - _memcpy(tls, bp+16+12, sa+4, uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + _memcpy(tls, bp+16+12, sa+4, Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } if sa != 0 { v11 = bp + 16 @@ -135349,10 +135347,10 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) r = X__syscall4(tls, int32(SYS_rt_sigaction), sig, int32(v11), int32(v12), Int32FromInt32(_NSIG)/Int32FromInt32(8)) if old1 != 0 && !(r != 0) { *(*uintptr)(unsafe.Pointer(old1)) = (*(*Tk_sigaction)(unsafe.Pointer(bp + 36))).Fhandler - (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = int32((*(*Tk_sigaction)(unsafe.Pointer(bp + 36))).Fflags) - _memcpy(tls, old1+4, bp+36+12, uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = Int32FromUint32((*(*Tk_sigaction)(unsafe.Pointer(bp + 36))).Fflags) + _memcpy(tls, old1+4, bp+36+12, Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { @@ -135365,7 +135363,7 @@ func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { var r int32 var _ /* set at bp+0 */ [2]uint32 _ = r - if uint32(sig)-uint32(32) < uint32(3) || uint32(sig)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(sig)-uint32(32) < uint32(3) || Uint32FromInt32(sig)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135399,8 +135397,8 @@ func Xsigaddset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135423,7 +135421,7 @@ func Xsigaltstack(tls *TLS, ss uintptr, old uintptr) (r int32) { return -int32(1) } } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_sigaltstack), int32(ss), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_sigaltstack), int32(ss), int32(old)))) } const SST_SIZE = 8 @@ -135451,7 +135449,7 @@ func Xsigandset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) l = left r = right for { - if !(i < uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { + if !(i < Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { break } *(*uint32)(unsafe.Pointer(d + uintptr(i)*4)) = *(*uint32)(unsafe.Pointer(l + uintptr(i)*4)) & *(*uint32)(unsafe.Pointer(r + uintptr(i)*4)) @@ -135470,8 +135468,8 @@ func Xsigdelset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135527,7 +135525,7 @@ func Xsigisemptyset(tls *TLS, set uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { + if !(i < Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { break } if *(*uint32)(unsafe.Pointer(set + uintptr(i)*4)) != 0 { @@ -135548,8 +135546,8 @@ func Xsigismember(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { return 0 } return BoolInt32(!!(*(*uint32)(unsafe.Pointer(set + uintptr(s/uint32(8)/uint32(4))*4))&(Uint32FromUint32(1)<<(s&(Uint32FromInt32(8)*Uint32FromInt64(4)-Uint32FromInt32(1)))) != 0)) @@ -135568,7 +135566,7 @@ func Xsigorset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) { l = left r = right for { - if !(i < uint32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { + if !(i < Uint32FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint32FromInt64(4)) { break } *(*uint32)(unsafe.Pointer(d + uintptr(i)*4)) = *(*uint32)(unsafe.Pointer(l + uintptr(i)*4)) | *(*uint32)(unsafe.Pointer(r + uintptr(i)*4)) @@ -135585,7 +135583,7 @@ func Xsigpending(tls *TLS, set uintptr) (r int32) { trc("tls=%v set=%v, (%v:)", tls, set, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_rt_sigpending), int32(set), Int32FromInt32(_NSIG)/Int32FromInt32(8)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_rt_sigpending), int32(set), Int32FromInt32(_NSIG)/Int32FromInt32(8)))) } func Xsigprocmask(tls *TLS, how int32, set uintptr, old uintptr) (r1 int32) { @@ -135621,7 +135619,7 @@ func Xsigqueue(tls *TLS, pid Tpid_t, sig int32, value Tsigval) (r1 int32) { *(*Tuid_t)(unsafe.Pointer(bp + 12 + 4)) = Xgetuid(tls) X__block_app_sigs(tls, bp+128) *(*Tpid_t)(unsafe.Pointer(bp + 12)) = Xgetpid(tls) - r = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_rt_sigqueueinfo), pid, sig, int32(bp)))) + r = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_rt_sigqueueinfo), pid, sig, int32(bp)))) X__restore_sigs(tls, bp+128) return r } @@ -135683,7 +135681,7 @@ func Xsigsuspend(tls *TLS, mask uintptr) (r int32) { trc("tls=%v mask=%v, (%v:)", tls, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_rt_sigsuspend), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_rt_sigsuspend), int32(mask), Int32FromInt32(_NSIG)/Int32FromInt32(8), 0, 0, 0, 0))) } func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r1 int32) { @@ -135708,7 +135706,7 @@ func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r1 int32) } ns = v2 r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if ts != 0 { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, @@ -135724,13 +135722,13 @@ func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r1 int32) return r } if ts != 0 { - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v5 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v5 = Uint64FromInt64(s) } else { - v5 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v5 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ - 0: int32(v5), + 0: Int32FromUint64(v5), 1: ns, } v4 = bp + 16 @@ -135751,7 +135749,7 @@ func Xsigtimedwait(tls *TLS, mask uintptr, si uintptr, timeout uintptr) (r int32 for cond := true; cond; cond = ret == -int32(EINTR) { ret = _do_sigtimedwait(tls, mask, si, timeout) } - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } func Xsigwait(tls *TLS, mask uintptr, sig uintptr) (r int32) { @@ -135798,7 +135796,7 @@ func Xchmod(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_chmod), int32(path), int32(mode)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_chmod), int32(path), Int32FromUint32(mode)))) } func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { @@ -135811,12 +135809,12 @@ func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = X__syscall2(tls, int32(SYS_fchmod), fd, int32(mode)) + ret = X__syscall2(tls, int32(SYS_fchmod), fd, Int32FromUint32(mode)) if ret != -int32(EBADF) || X__syscall2(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_GETFD)) < 0 { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } - X__procfdname(tls, bp, uint32(fd)) - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_chmod), int32(bp), int32(mode)))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_chmod), int32(bp), Int32FromUint32(mode)))) } func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r int32) { @@ -135831,36 +135829,36 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in var _ /* st at bp+0 */ Tstat _, _, _ = fd2, ret, v1 if !(flag != 0) { - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fchmodat), fd, int32(path), int32(mode)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fchmodat), fd, int32(path), Int32FromUint32(mode)))) } - ret = X__syscall4(tls, int32(SYS_fchmodat2), fd, int32(path), int32(mode), flag) + ret = X__syscall4(tls, int32(SYS_fchmodat2), fd, int32(path), Int32FromUint32(mode), flag) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } if flag != int32(AT_SYMLINK_NOFOLLOW) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } if Xfstatat(tls, fd, path, bp, flag) != 0 { return -int32(1) } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } v1 = X__syscall3(tls, int32(SYS_openat), fd, int32(path), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_PATH)|Int32FromInt32(O_NOFOLLOW)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC)) fd2 = v1 if v1 < 0 { if fd2 == -int32(ELOOP) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } - return X__syscall_ret(tls, uint32(fd2)) + return X__syscall_ret(tls, Uint32FromInt32(fd2)) } - X__procfdname(tls, bp+152, uint32(fd2)) + X__procfdname(tls, bp+152, Uint32FromInt32(fd2)) ret = Xstat(tls, bp+152, bp) if !(ret != 0) { if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - ret = X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + ret = X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } else { - ret = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fchmodat), -Int32FromInt32(100), int32(bp+152), int32(mode)))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fchmodat), -Int32FromInt32(100), int32(bp+152), Int32FromUint32(mode)))) } } X__syscall1(tls, int32(SYS_close), fd2) @@ -135873,7 +135871,7 @@ func X__fstat(tls *TLS, fd int32, st uintptr) (r int32) { defer func() { trc("-> %v", r) }() } if fd < 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EBADF))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EBADF))) } return X__fstatat(tls, fd, __ccgo_ts, st, int32(AT_EMPTY_PATH)) } @@ -135949,42 +135947,42 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r Fst_uid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_uid, Fst_gid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_gid, Fst_rdev: uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<= 0 { ret = X__syscall4(tls, int32(SYS_fstatat64), fd, int32(path), int32(bp), flag) if ret == -int32(EINVAL) { - X__procfdname(tls, bp+104, uint32(fd)) + X__procfdname(tls, bp+104, Uint32FromInt32(fd)) ret = X__syscall2(tls, int32(SYS_stat64), int32(bp+104), int32(bp)) } } } else { - if (fd == -int32(100) || int32(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && flag == int32(AT_SYMLINK_NOFOLLOW) { + if (fd == -int32(100) || Int32FromUint8(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && flag == int32(AT_SYMLINK_NOFOLLOW) { ret = X__syscall2(tls, int32(SYS_lstat64), int32(path), int32(bp)) } else { - if (fd == -int32(100) || int32(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && !(flag != 0) { + if (fd == -int32(100) || Int32FromUint8(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && !(flag != 0) { ret = X__syscall2(tls, int32(SYS_stat64), int32(path), int32(bp)) } else { ret = X__syscall4(tls, int32(SYS_fstatat64), fd, int32(path), int32(bp), flag) @@ -136103,11 +136101,11 @@ func X__fstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int if uint32(4) < uint32(8) { ret = _fstatat_statx(tls, fd, path, st, flag) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } } ret = _fstatat_kstat(tls, fd, path, st, flag) - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } func Xfstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int32) { @@ -136143,8 +136141,8 @@ func X__futimesat(tls *TLS, dirfd int32, pathname uintptr, times uintptr) (r int if !(i < int32(2)) { break } - if uint64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + if Uint64FromInt64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_sec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_nsec = int32((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec * int64(1000)) @@ -136191,7 +136189,7 @@ func Xmkdir(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_mkdir), int32(path), int32(mode)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_mkdir), int32(path), Int32FromUint32(mode)))) } func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { @@ -136199,7 +136197,7 @@ func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v fd=%v path=%v mode=%v, (%v:)", tls, fd, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mkdirat), fd, int32(path), int32(mode)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mkdirat), fd, int32(path), Int32FromUint32(mode)))) } func Xmkfifo(tls *TLS, path uintptr, mode Tmode_t) (r int32) { @@ -136223,7 +136221,7 @@ func Xmknod(tls *TLS, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { trc("tls=%v path=%v mode=%v dev=%v, (%v:)", tls, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_mknod), int32(path), int32(mode), int32(dev)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_mknod), int32(path), Int32FromUint32(mode), Int32FromUint64(dev)))) } func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { @@ -136231,7 +136229,7 @@ func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int trc("tls=%v fd=%v path=%v mode=%v dev=%v, (%v:)", tls, fd, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_mknodat), fd, int32(path), int32(mode), int32(dev)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_mknodat), fd, int32(path), Int32FromUint32(mode), Int32FromUint64(dev)))) } func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { @@ -136244,7 +136242,7 @@ func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { func ___statfs(tls *TLS, path uintptr, buf uintptr) (r int32) { *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_statfs64), int32(path), int32(Uint32FromInt64(88)), int32(buf)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_statfs64), int32(path), Int32FromUint32(Uint32FromInt64(88)), int32(buf)))) } func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { @@ -136253,7 +136251,7 @@ func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { defer func() { trc("-> %v", r) }() } *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fstatfs64), fd, int32(Uint32FromInt64(88)), int32(buf)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fstatfs64), fd, Int32FromUint32(Uint32FromInt64(88)), int32(buf)))) } func _fixup(tls *TLS, out uintptr, in uintptr) { @@ -136273,7 +136271,7 @@ func _fixup(tls *TLS, out uintptr, in uintptr) { (*Tstatvfs)(unsafe.Pointer(out)).Ff_files = (*Tstatfs)(unsafe.Pointer(in)).Ff_files (*Tstatvfs)(unsafe.Pointer(out)).Ff_ffree = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree (*Tstatvfs)(unsafe.Pointer(out)).Ff_favail = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree - (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = uint32(*(*int32)(unsafe.Pointer(in + 48))) + (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = Uint32FromInt32(*(*int32)(unsafe.Pointer(in + 48))) (*Tstatvfs)(unsafe.Pointer(out)).Ff_flag = (*Tstatfs)(unsafe.Pointer(in)).Ff_flags (*Tstatvfs)(unsafe.Pointer(out)).Ff_namemax = (*Tstatfs)(unsafe.Pointer(in)).Ff_namelen (*Tstatvfs)(unsafe.Pointer(out)).Ff_type = (*Tstatfs)(unsafe.Pointer(in)).Ff_type @@ -136314,7 +136312,7 @@ func Xumask(tls *TLS, mode Tmode_t) (r Tmode_t) { trc("tls=%v mode=%v, (%v:)", tls, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_umask), int32(mode))))) + return Uint32FromInt32(X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_umask), Int32FromUint32(mode))))) } func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r1 int32) { @@ -136347,7 +136345,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r s1 = (*(*Ttimespec)(unsafe.Pointer(times + 1*16))).Ftv_sec } } - if Bool(false) || !!((uint64(s0)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(s1)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s0)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(s1)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { if times != 0 { *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: s0, @@ -136362,10 +136360,10 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r r = X__syscall4(tls, int32(SYS_utimensat_time64), fd, int32(path), int32(v1), flags) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !!((uint64(s0)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(s1)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(s0)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(s1)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } if times != 0 { *(*[4]int32)(unsafe.Pointer(bp + 32)) = [4]int32{ @@ -136380,7 +136378,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = X__syscall4(tls, int32(SYS_utimensat), fd, int32(path), int32(v2), flags) if r != -int32(ENOSYS) || flags != 0 { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } tv = uintptr(0) if times != 0 { @@ -136390,11 +136388,11 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r if !(i < int32(2)) { break } - if uint64((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { + if Uint64FromInt32((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { if (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int32(UTIME_NOW) || (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int32(UTIME_OMIT) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(ENOSYS))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(ENOSYS))) } - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } (*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(2)*i+0] = int32((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec) (*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(2)*i+int32(1)] = (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec / int32(1000) @@ -136406,10 +136404,10 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = X__syscall3(tls, int32(SYS_futimesat), fd, int32(path), int32(tv)) if r != -int32(ENOSYS) || fd != -int32(100) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } r = X__syscall2(tls, int32(SYS_utimes), int32(path), int32(tv)) - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func X__fclose_ca(tls *TLS, f uintptr) (r int32) { @@ -136432,7 +136430,7 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { var _ /* wsz at bp+0 */ Twinsize _, _, _, _ = f, flags, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1402, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1402, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -136446,19 +136444,19 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { Xmemset(tls, f, 0, uint32(144)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(v2) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(v2) } /* Apply close-on-exec flag */ if Xstrchr(tls, mode, int32('e')) != 0 { X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } /* Set append mode on fd if opened for append */ - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { flags = X__syscall2(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_GETFL)) if !(flags&Int32FromInt32(O_APPEND) != 0) { X__syscall3(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_SETFL), flags|Int32FromInt32(O_APPEND)) @@ -136503,7 +136501,7 @@ func X__fmodeflags(tls *TLS, mode uintptr) (r int32) { if Xstrchr(tls, mode, int32('+')) != 0 { flags = int32(O_RDWR) } else { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { flags = O_RDONLY } else { flags = int32(O_WRONLY) @@ -136515,13 +136513,13 @@ func X__fmodeflags(tls *TLS, mode uintptr) (r int32) { if Xstrchr(tls, mode, int32('e')) != 0 { flags |= int32(O_CLOEXEC) } - if int32(*(*uint8)(unsafe.Pointer(mode))) != int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) != int32('r') { flags |= int32(O_CREAT) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('w') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('w') { flags |= int32(O_TRUNC) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { flags |= int32(O_APPEND) } return flags @@ -136533,12 +136531,12 @@ func X__fopen_rb_ca(tls *TLS, filename uintptr, f uintptr, buf uintptr, len1 Tsi defer func() { trc("-> %v", r) }() } Xmemset(tls, f, 0, uint32(144)) - (*TFILE)(unsafe.Pointer(f)).Ffd = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_open), int32(filename), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))) + (*TFILE)(unsafe.Pointer(f)).Ffd = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_open), int32(filename), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))) if (*TFILE)(unsafe.Pointer(f)).Ffd < 0 { return uintptr(0) } X__syscall3(tls, int32(SYS_fcntl64), (*TFILE)(unsafe.Pointer(f)).Ffd, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) (*TFILE)(unsafe.Pointer(f)).Fbuf = buf + uintptr(UNGET) (*TFILE)(unsafe.Pointer(f)).Fbuf_size = len1 - uint32(UNGET) (*TFILE)(unsafe.Pointer(f)).Fread = __ccgo_fp(X__stdio_read) @@ -136559,22 +136557,22 @@ func X__overflow(tls *TLS, f uintptr, _c int32) (r int32) { var v2, v3 uintptr var _ /* c at bp+0 */ uint8 _, _, _ = v1, v2, v3 - *(*uint8)(unsafe.Pointer(bp)) = uint8(_c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(_c) if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return -int32(1) } - if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && int32(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { + if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { v1 = *(*uint8)(unsafe.Pointer(bp)) v3 = f + 20 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ *(*uint8)(unsafe.Pointer(v2)) = v1 - return int32(v1) + return Int32FromUint8(v1) } if (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, bp, uint32(1)) != uint32(1) { return -int32(1) } - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } func _dummy9(tls *TLS, fd int32) (r int32) { @@ -136586,7 +136584,7 @@ func X__stdio_close(tls *TLS, f uintptr) (r int32) { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_close), _dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_close), _dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))) } var _dummy_file = uintptr(0) @@ -136658,9 +136656,9 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { }, } if (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len != 0 { - v1 = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_readv), (*TFILE)(unsafe.Pointer(f)).Ffd, int32(bp), Int32FromInt32(2)))) + v1 = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_readv), (*TFILE)(unsafe.Pointer(f)).Ffd, int32(bp), Int32FromInt32(2)))) } else { - v1 = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_read), (*TFILE)(unsafe.Pointer(f)).Ffd, int32((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), int32((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) + v1 = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_read), (*TFILE)(unsafe.Pointer(f)).Ffd, int32((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), Int32FromUint32((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) } cnt = v1 if cnt <= 0 { @@ -136669,11 +136667,11 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32(F_EOF) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v2) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v2) return uint32(0) } - if uint32(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { - return uint32(cnt) + if Uint32FromInt32(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { + return Uint32FromInt32(cnt) } cnt = Tssize_t(uint32(cnt) - (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len) (*TFILE)(unsafe.Pointer(f)).Frpos = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -136712,7 +136710,7 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { Fiov_base: (*TFILE)(unsafe.Pointer(f)).Fwbase, - Fiov_len: uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)), + Fiov_len: Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)), }, 1: { Fiov_base: buf, @@ -136723,8 +136721,8 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) rem = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len + (*(*Tiovec)(unsafe.Pointer(iov + 1*8))).Fiov_len iovcnt = int32(2) for { - cnt = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_writev), (*TFILE)(unsafe.Pointer(f)).Ffd, int32(iov), iovcnt))) - if uint32(cnt) == rem { + cnt = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_writev), (*TFILE)(unsafe.Pointer(f)).Ffd, int32(iov), iovcnt))) + if Uint32FromInt32(cnt) == rem { (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v2 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fwbase = v2 @@ -136745,14 +136743,14 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) } return v5 } - rem -= uint32(cnt) - if uint32(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { + rem -= Uint32FromInt32(cnt) + if Uint32FromInt32(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { cnt = Tssize_t(uint32(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len) iov += 8 iovcnt-- } (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base + uintptr(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= uint32(cnt) + (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= Uint32FromInt32(cnt) goto _1 _1: } @@ -136856,7 +136854,7 @@ func X__uflow(tls *TLS, f uintptr) (r int32) { defer tls.Free(16) var _ /* c at bp+0 */ uint8 if !(X__toread(tls, f) != 0) && (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fread})))(tls, f, bp, uint32(1)) == uint32(1) { - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } return -int32(1) } @@ -136887,7 +136885,7 @@ func Xclearerr(tls *TLS, f uintptr) { v1 = 0 } __need_unlock = v1 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -136993,7 +136991,7 @@ func X__fpending(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint32(v1) + return Uint32FromInt32(v1) } func X__fpurge(tls *TLS, f uintptr) (r int32) { @@ -137037,7 +137035,7 @@ func X__freadahead(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint32(v1) + return Uint32FromInt32(v1) } func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { @@ -137048,7 +137046,7 @@ func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { if (*TFILE)(unsafe.Pointer(f)).Frpos == (*TFILE)(unsafe.Pointer(f)).Frend { return uintptr(0) } - *(*Tsize_t)(unsafe.Pointer(sizep)) = uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos)) + *(*Tsize_t)(unsafe.Pointer(sizep)) = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos)) return (*TFILE)(unsafe.Pointer(f)).Frpos } @@ -137296,7 +137294,7 @@ _3: v6 = f + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, f) } @@ -137340,7 +137338,7 @@ func Xfgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -137376,27 +137374,27 @@ func Xfgetln(tls *TLS, f uintptr, plen uintptr) (r uintptr) { v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } Xungetc(tls, v2, f) if v6 = (*TFILE)(unsafe.Pointer(f)).Frend != 0; v6 { - v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) + v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) z = v5 } if v6 && v5 != 0 { ret = (*TFILE)(unsafe.Pointer(f)).Frpos z++ v7 = z - *(*Tsize_t)(unsafe.Pointer(plen)) = uint32(int32(v7) - int32(ret)) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint32FromInt32(int32(v7) - int32(ret)) (*TFILE)(unsafe.Pointer(f)).Frpos = z } else { *(*[1]Tsize_t)(unsafe.Pointer(bp)) = [1]Tsize_t{} v8 = Xgetline(tls, f+96, bp, f) l = v8 if v8 > 0 { - *(*Tsize_t)(unsafe.Pointer(plen)) = uint32(l) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint32FromInt32(l) ret = (*TFILE)(unsafe.Pointer(f)).Fgetln_buf } } @@ -137453,17 +137451,17 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { n-- for n != 0 { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v2 = int32(z) - int32((*TFILE)(unsafe.Pointer(f)).Frpos) + int32(1) } else { v2 = int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint32(v2) - if k < uint32(n) { + k = Uint32FromInt32(v2) + if k < Uint32FromInt32(n) { v3 = k } else { - v3 = uint32(n) + v3 = Uint32FromInt32(n) } k = v3 _memcpy(tls, p, (*TFILE)(unsafe.Pointer(f)).Frpos, k) @@ -137478,7 +137476,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { v7 = f + 4 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -137491,11 +137489,11 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { break } n-- - v8 = uint8(c) + v8 = Uint8FromInt32(c) v9 = p p++ *(*uint8)(unsafe.Pointer(v9)) = v8 - if int32(v8) == int32('\n') { + if Int32FromUint8(v8) == int32('\n') { break } } @@ -137528,7 +137526,7 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { _, _, _, _, _, _, _ = c, first, l, v1, v2, v3, v4 /* Convert character from buffer if possible */ if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - l = uint32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)))) + l = Uint32FromInt32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)))) if l+uint32(1) >= uint32(1) { *(*uintptr)(unsafe.Pointer(f + 4)) += uintptr(l + BoolUint32(!(l != 0))) /* l==0 means 1 byte, null */ return *(*Twchar_t)(unsafe.Pointer(bp)) @@ -137537,18 +137535,18 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { /* Convert character byte-by-byte */ *(*Tmbstate_t)(unsafe.Pointer(bp + 8)) = Tmbstate_t{} first = int32(1) - for cond := true; cond; cond = l == uint32(-Int32FromInt32(2)) { + for cond := true; cond; cond = l == Uint32FromInt32(-Int32FromInt32(2)) { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { v4 = f + 4 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } v1 = v2 c = v1 - *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(v1) + *(*uint8)(unsafe.Pointer(bp + 16)) = Uint8FromInt32(v1) if c < 0 { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) @@ -137557,10 +137555,10 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { return uint32(0xffffffff) } l = Xmbrtowc(tls, bp, bp+16, uint32(1), bp+8) - if l == uint32(-Int32FromInt32(1)) { + if l == Uint32FromInt32(-Int32FromInt32(1)) { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - Xungetc(tls, int32(*(*uint8)(unsafe.Pointer(bp + 16))), f) + Xungetc(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 16))), f) } return uint32(0xffffffff) } @@ -137756,7 +137754,7 @@ func _mseek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -137770,13 +137768,13 @@ _1: 1: (*Tcookie)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie)(unsafe.Pointer(c)).Flen1, } - base = int32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) - if off < int64(-base) || off > int64(int32((*Tcookie)(unsafe.Pointer(c)).Fsize)-base) { + base = Int32FromUint32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) + if off < int64(-base) || off > int64(Int32FromUint32((*Tcookie)(unsafe.Pointer(c)).Fsize)-base) { goto fail } - v2 = uint32(int64(base) + off) + v2 = Uint32FromInt64(int64(base) + off) (*Tcookie)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint32(v2) } func _mread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -137810,7 +137808,7 @@ func _mwrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2, rem Tsize_t _, _, _ = c, len2, rem c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _mwrite(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwpos, len2) < len2 { @@ -137854,11 +137852,11 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { var v3 Tsize_t _, _, _, _, _ = f, plus, v1, v2, v3 plus = BoolInt32(!!(Xstrchr(tls, mode, int32('+')) != 0)) - if !(Xstrchr(tls, __ccgo_ts+1402, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1402, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } - if !(buf != 0) && size > uint32(Int32FromInt32(INT32_MAX)) { + if !(buf != 0) && size > Uint32FromInt32(Int32FromInt32(INT32_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -137883,19 +137881,19 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { } (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fbuf = buf (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fsize = size - (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = int32(*(*uint8)(unsafe.Pointer(mode))) + (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) if !(plus != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = size } else { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { v3 = Xstrnlen(tls, buf, size) (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fpos = v3 (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = v3 @@ -137924,13 +137922,13 @@ func Xfopen(tls *TLS, filename uintptr, mode uintptr) (r uintptr) { var fd, flags int32 _, _, _ = f, fd, flags /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1402, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1402, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } /* Compute the flags to pass to open() */ flags = X__fmodeflags(tls, mode) - fd = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_open), int32(filename), flags|Int32FromInt32(O_LARGEFILE), Int32FromInt32(0666)))) + fd = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_open), int32(filename), flags|Int32FromInt32(O_LARGEFILE), Int32FromInt32(0666)))) if fd < 0 { return uintptr(0) } @@ -137977,8 +137975,8 @@ func _cookieread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { if ret <= 0 { goto bail } - readlen += uint32(ret) - remain -= uint32(ret) + readlen += Uint32FromInt32(ret) + remain -= Uint32FromInt32(ret) } if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) || remain > BoolUint32(!!((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0)) { return readlen @@ -138004,7 +138002,7 @@ bail: } else { v4 = int32(F_ERR) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v4) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v4) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Frend = v5 (*TFILE)(unsafe.Pointer(f)).Frpos = v5 @@ -138017,7 +138015,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var ret Tssize_t _, _, _, _, _ = fc, len2, ret, v1, v2 fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) if !((*Tfcookie)(unsafe.Pointer(fc)).Fiofuncs.Fwrite != 0) { return len1 } @@ -138037,7 +138035,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) return uint32(0) } - return uint32(ret) + return Uint32FromInt32(ret) } func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { @@ -138048,7 +138046,7 @@ func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { var res int32 _, _ = fc, res fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - if uint32(whence) > uint32(2) { + if Uint32FromInt32(whence) > uint32(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -138082,7 +138080,7 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun var v2 int32 _, _, _ = f, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1402, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1402, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -138096,12 +138094,12 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun Xmemset(tls, f, 0, uint32(144)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } /* Set up our fcookie */ (*Tcookie_FILE)(unsafe.Pointer(f)).Ffc.Fcookie = cookie @@ -138151,15 +138149,15 @@ _3: if v2 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v5 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v5 = Uint8FromInt32(c) v7 = f + 20 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ *(*uint8)(unsafe.Pointer(v6)) = v5 - v4 = int32(v5) + v4 = Int32FromUint8(v5) } else { - v4 = X__overflow(tls, f, int32(uint8(c))) + v4 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v4 v8 = f + 76 @@ -138199,15 +138197,15 @@ func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 76) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 20 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -138257,17 +138255,17 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale if BoolInt32(c < uint32(128)) != 0 { - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + if Int32FromUint8(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { v2 = uint8(c) v4 = f + 20 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(uint8(c))) } - c = uint32(v1) + c = Uint32FromInt32(v1) } else { if (*TFILE)(unsafe.Pointer(f)).Fwpos+uintptr(MB_LEN_MAX) < (*TFILE)(unsafe.Pointer(f)).Fwend { l = Xwctomb(tls, (*TFILE)(unsafe.Pointer(f)).Fwpos, c) @@ -138278,7 +138276,7 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } } else { l = Xwctomb(tls, bp, c) - if l < 0 || X__fwritex(tls, bp, uint32(l), f) < uint32(l) { + if l < 0 || X__fwritex(tls, bp, Uint32FromInt32(l), f) < Uint32FromInt32(l) { c = uint32(0xffffffff) } } @@ -138372,7 +138370,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { ___unlockfile(tls, f) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return int32(l) /* 0 or -1 */ + return Int32FromUint32(l) /* 0 or -1 */ } func Xfputws_unlocked(tls *TLS, _ws uintptr, f uintptr) (r int32) { @@ -138408,8 +138406,8 @@ func Xfread(tls *TLS, destv uintptr, size Tsize_t, nmemb Tsize_t, f uintptr) (r *(*int32)(unsafe.Pointer(f + 72)) |= (*TFILE)(unsafe.Pointer(f)).Fmode - int32(1) if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { /* First exhaust the buffer. */ - if uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { - v2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos)) + if Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { + v2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos)) } else { v2 = l } @@ -138485,7 +138483,7 @@ func Xfreopen(tls *TLS, filename uintptr, mode uintptr, f uintptr) (r uintptr) { X__syscall3(tls, int32(SYS_fcntl64), (*TFILE)(unsafe.Pointer(f)).Ffd, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } fl &= ^(Int32FromInt32(O_CREAT) | Int32FromInt32(O_EXCL) | Int32FromInt32(O_CLOEXEC)) - if X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_fcntl64), (*TFILE)(unsafe.Pointer(f)).Ffd, Int32FromInt32(F_SETFL), fl))) < 0 { + if X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_fcntl64), (*TFILE)(unsafe.Pointer(f)).Ffd, Int32FromInt32(F_SETFL), fl))) < 0 { goto fail } } else { @@ -138583,7 +138581,7 @@ func X__fseeko_unlocked(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32) v3 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v3 (*TFILE)(unsafe.Pointer(f)).Frpos = v3 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) return 0 } @@ -138887,14 +138885,14 @@ func X__fwritex(tls *TLS, s uintptr, l Tsize_t, f uintptr) (r Tsize_t) { if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return uint32(0) } - if l > uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwend)-int32((*TFILE)(unsafe.Pointer(f)).Fwpos)) { + if l > Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwend)-int32((*TFILE)(unsafe.Pointer(f)).Fwpos)) { return (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, s, l) } if (*TFILE)(unsafe.Pointer(f)).Flbf >= 0 { /* Match /^(.*\n|)/ */ i = l for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint32(1))))) != int32('\n')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint32(1))))) != int32('\n')) { break } goto _1 @@ -138997,7 +138995,7 @@ _3: v6 = f + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, f) } @@ -139041,7 +139039,7 @@ func Xgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -139074,7 +139072,7 @@ func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { v3 = f + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -139117,7 +139115,7 @@ _3: v6 = f + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, f) } @@ -139161,7 +139159,7 @@ func Xgetchar(tls *TLS) (r int32) { v6 = v1 + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -139186,7 +139184,7 @@ func Xgetchar_unlocked(tls *TLS) (r int32) { v3 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 4 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -139224,13 +139222,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize } for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, uint32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Frend)-int32((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v3 = int32(z) - int32((*TFILE)(unsafe.Pointer(f)).Frpos) + int32(1) } else { v3 = int32((*TFILE)(unsafe.Pointer(f)).Frend) - int32((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint32(v3) + k = Uint32FromInt32(v3) } else { z = uintptr(0) k = uint32(0) @@ -139274,7 +139272,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v7 = f + 4 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -139295,13 +139293,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v9 = f + 4 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) - *(*uint8)(unsafe.Pointer(v8)) = uint8(c) + *(*uint8)(unsafe.Pointer(v8)) = Uint8FromInt32(c) } else { - v10 = uint8(c) + v10 = Uint8FromInt32(c) v11 = i i++ *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)) + uintptr(v11))) = v10 - if int32(v10) == delim { + if Int32FromUint8(v10) == delim { break } } @@ -139312,7 +139310,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(i) + return Int32FromUint32(i) } func X__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t) { @@ -139352,7 +139350,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { v5 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 4 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -139363,7 +139361,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { } v6 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = Uint8FromInt32(c) } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) if c != int32('\n') && (!((*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdin_FILE)))).Fflags&Uint32FromInt32(F_EOF) != 0) || !(i != 0)) { @@ -139477,7 +139475,7 @@ func _ms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -139491,13 +139489,13 @@ _1: 1: (*Tcookie1)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie1)(unsafe.Pointer(c)).Flen1, } - base = int32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) + base = Int32FromUint32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) if off < int64(-base) || off > int64(int32(0x7fffffff)-base) { goto fail } - v2 = uint32(int64(base) + off) + v2 = Uint32FromInt64(int64(base) + off) (*Tcookie1)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint32(v2) } func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -139505,7 +139503,7 @@ func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _ms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -139613,7 +139611,7 @@ func _wms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -139627,14 +139625,14 @@ _1: 1: (*Tcookie2)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie2)(unsafe.Pointer(c)).Flen1, } - base = int32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) + base = Int32FromUint32(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*4))) if off < int64(-base) || off > int64(Int32FromInt32(0x7fffffff)/Int32FromInt32(4)-base) { goto fail } Xmemset(tls, c+24, 0, uint32(8)) - v2 = uint32(int64(base) + off) + v2 = Uint32FromInt64(int64(base) + off) (*Tcookie2)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint32(v2) } func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -139645,7 +139643,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _wms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -139654,7 +139652,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { } if len1+(*Tcookie2)(unsafe.Pointer(c)).Fpos >= (*Tcookie2)(unsafe.Pointer(c)).Fspace { len2 = uint32(2)*(*Tcookie2)(unsafe.Pointer(c)).Fspace + uint32(1) | ((*Tcookie2)(unsafe.Pointer(c)).Fpos + len1 + uint32(1)) - if len2 > uint32(Int32FromInt32(0x7fffffff)/Int32FromInt32(4)) { + if len2 > Uint32FromInt32(Int32FromInt32(0x7fffffff)/Int32FromInt32(4)) { return uint32(0) } newbuf = Xrealloc(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf, len2*uint32(4)) @@ -139668,7 +139666,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { (*Tcookie2)(unsafe.Pointer(c)).Fspace = len2 } len2 = Xmbsnrtowcs(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf+uintptr((*Tcookie2)(unsafe.Pointer(c)).Fpos)*4, bp, len1, (*Tcookie2)(unsafe.Pointer(c)).Fspace-(*Tcookie2)(unsafe.Pointer(c)).Fpos, c+24) - if len2 == uint32(-Int32FromInt32(1)) { + if len2 == Uint32FromInt32(-Int32FromInt32(1)) { return uint32(0) } *(*Tsize_t)(unsafe.Pointer(c + 8)) += len2 @@ -139754,7 +139752,7 @@ func Xpclose(tls *TLS, f uintptr) (r1 int32) { } } if r < 0 { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } return *(*int32)(unsafe.Pointer(bp)) } @@ -139823,15 +139821,15 @@ _3: if v2 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v5 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v5 = Uint8FromInt32(c) v7 = f + 20 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ *(*uint8)(unsafe.Pointer(v6)) = v5 - v4 = int32(v5) + v4 = Int32FromUint8(v5) } else { - v4 = X__overflow(tls, f, int32(uint8(c))) + v4 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v4 v8 = f + 76 @@ -139871,15 +139869,15 @@ func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 76) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 20 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139907,15 +139905,15 @@ func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 20 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139953,15 +139951,15 @@ _3: if v2 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v5 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v5 = Uint8FromInt32(c) v7 = f + 20 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ *(*uint8)(unsafe.Pointer(v6)) = v5 - v4 = int32(v5) + v4 = Int32FromUint8(v5) } else { - v4 = X__overflow(tls, f, int32(uint8(c))) + v4 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v4 v8 = f + 76 @@ -140001,15 +139999,15 @@ func Xputchar(tls *TLS, c1 int32) (r int32) { v2 = uintptr(unsafe.Pointer(&X__stdout_FILE)) l = AtomicLoadPInt32(v2 + 76) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 20 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -140029,15 +140027,15 @@ func Xputchar_unlocked(tls *TLS, c int32) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v2 = Uint8FromInt32(c) v4 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 20 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(c))) + v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -140059,15 +140057,15 @@ func Xputs(tls *TLS, s uintptr) (r1 int32) { } __need_unlock = v1 if v6 = Xfputs(tls, s, uintptr(unsafe.Pointer(&X__stdout_FILE))) < 0; !v6 { - if int32(uint8(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v3 = uint8(Int32FromUint8('\n')) + if Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v3 = Uint8FromInt32(Int32FromUint8('\n')) v5 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 20 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ *(*uint8)(unsafe.Pointer(v4)) = v3 - v2 = int32(v3) + v2 = Int32FromUint8(v3) } else { - v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(Int32FromUint8('\n')))) + v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n')))) } } r = -BoolInt32(v6 || v2 < 0) @@ -140085,7 +140083,7 @@ func Xputw(tls *TLS, _x int32, f uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) *(*int32)(unsafe.Pointer(bp)) = _x - return int32(Xfwrite(tls, bp, uint32(4), uint32(1), f)) - int32(1) + return Int32FromUint32(Xfwrite(tls, bp, uint32(4), uint32(1), f)) - int32(1) } func Xputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -140123,7 +140121,7 @@ func Xremove(tls *TLS, path uintptr) (r1 int32) { if r == -int32(EISDIR) { r = X__syscall1(tls, int32(SYS_rmdir), int32(path)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { @@ -140131,7 +140129,7 @@ func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { trc("tls=%v old=%v new1=%v, (%v:)", tls, old, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_rename), int32(old), int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_rename), int32(old), int32(new1)))) } func Xrewind(tls *TLS, f uintptr) { @@ -140147,7 +140145,7 @@ func Xrewind(tls *TLS, f uintptr) { } __need_unlock = v1 X__fseeko_unlocked(tls, f, 0, 0) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -140422,7 +140420,7 @@ func Xtmpfile(tls *TLS) (r uintptr) { break } ___randname(tls, bp+uintptr(13)) - fd = X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_open), int32(bp), Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE), Int32FromInt32(0600)))) + fd = X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_open), int32(bp), Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE), Int32FromInt32(0600)))) if fd >= 0 { X__syscall1(tls, int32(SYS_unlink), int32(bp)) f = X__fdopen(tls, fd, __ccgo_ts+1416) @@ -140506,12 +140504,12 @@ func Xungetc(tls *TLS, c int32, f uintptr) (r int32) { v3 = f + 4 *(*uintptr)(unsafe.Pointer(v3))-- v2 = *(*uintptr)(unsafe.Pointer(v3)) - *(*uint8)(unsafe.Pointer(v2)) = uint8(c) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(c) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(uint8(c)) + return Int32FromUint8(Uint8FromInt32(c)) } func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { @@ -140543,7 +140541,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { X__toread(tls, f) } if v3 = !((*TFILE)(unsafe.Pointer(f)).Frpos != 0) || c == uint32(0xffffffff); !v3 { - v2 = int32(Xwcrtomb(tls, bp, c, uintptr(0))) + v2 = Int32FromUint32(Xwcrtomb(tls, bp, c, uintptr(0))) l = v2 } if v3 || v2 < 0 || (*TFILE)(unsafe.Pointer(f)).Frpos < (*TFILE)(unsafe.Pointer(f)).Fbuf-uintptr(UNGET)+uintptr(l) { @@ -140561,9 +140559,9 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { } else { p6 = f + 4 *(*uintptr)(unsafe.Pointer(p6)) -= uintptr(l) - _memcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint32(l)) + _memcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, Uint32FromInt32(l)) } - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -140585,13 +140583,13 @@ func Xvasprintf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32) { l = Xvsnprintf(tls, uintptr(0), uint32(0), fmt, ap2) _ = ap2 if v2 = l < 0; !v2 { - v1 = Xmalloc(tls, uint32(l)+uint32(1)) + v1 = Xmalloc(tls, Uint32FromInt32(l)+uint32(1)) *(*uintptr)(unsafe.Pointer(s)) = v1 } if v2 || !(v1 != 0) { return -int32(1) } - return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint32(l)+uint32(1), fmt, ap) + return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), Uint32FromInt32(l)+uint32(1), fmt, ap) } func Xvdprintf(tls *TLS, fd int32, fmt uintptr, ap Tva_list) (r int32) { @@ -140772,33 +140770,33 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint32(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_DBL): @@ -140820,18 +140818,18 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { var v1 uint32 var _ /* pad at bp+0 */ [256]uint8 _ = v1 - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { return } l = w - l - if uint32(l) > uint32(256) { + if Uint32FromInt32(l) > uint32(256) { v1 = uint32(256) } else { - v1 = uint32(l) + v1 = Uint32FromInt32(l) } - Xmemset(tls, bp, int32(c), v1) + Xmemset(tls, bp, Int32FromUint8(c), v1) for { - if !(uint32(l) >= uint32(256)) { + if !(Uint32FromInt32(l) >= uint32(256)) { break } _out(tls, f, bp, uint32(256)) @@ -140840,7 +140838,7 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { ; l = int32(uint32(l) - Uint32FromInt64(256)) } - _out(tls, f, bp, uint32(l)) + _out(tls, f, bp, Uint32FromInt32(l)) } var _xdigits1 = [16]uint8{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} @@ -140854,7 +140852,7 @@ func _fmt_x(tls *TLS, x Tuintmax_t, s uintptr, lower int32) (r uintptr) { } s-- v2 = s - *(*uint8)(unsafe.Pointer(v2)) = uint8(int32(_xdigits1[x&uint64(15)]) | lower) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x&uint64(15)]) | lower) goto _1 _1: ; @@ -140947,13 +140945,13 @@ func _fmt_fp(tls *TLS, f uintptr, y float64, w int32, p int32, fl int32, t int32 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: - if int32(v1>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v1>>Int32FromInt32(63)) != 0 { y = -y } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { prefix += uintptr(3) } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { prefix += uintptr(6) } else { prefix++ @@ -140980,10 +140978,10 @@ _4: } s1 = v6 } - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) - _out(tls, f, prefix, uint32(pl)) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) + _out(tls, f, prefix, Uint32FromInt32(pl)) _out(tls, f, s1, uint32(3)) - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > int32(3)+pl { v7 = w } else { @@ -141016,7 +141014,7 @@ _4: } round *= Float64FromInt32(16) } - if int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { y = -y y -= round y += round @@ -141031,7 +141029,7 @@ _4: } else { v9 = *(*int32)(unsafe.Pointer(bp + 512)) } - estr = _fmt_u(tls, uint64(v9), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v9), ebuf) if estr == ebuf { estr-- v10 = estr @@ -141044,18 +141042,18 @@ _4: } else { v12 = int32('+') } - *(*uint8)(unsafe.Pointer(v11)) = uint8(v12) + *(*uint8)(unsafe.Pointer(v11)) = Uint8FromInt32(v12) estr-- v13 = estr - *(*uint8)(unsafe.Pointer(v13)) = uint8(t + (Int32FromUint8('p') - Int32FromUint8('a'))) + *(*uint8)(unsafe.Pointer(v13)) = Uint8FromInt32(t + (Int32FromUint8('p') - Int32FromUint8('a'))) s = bp + 516 for cond := true; cond; cond = y != 0 { x = int32(y) v14 = s s++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32(_xdigits1[x]) | t&int32(32)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x]) | t&int32(32)) y = Float64FromInt32(16) * (y - float64(x)) - if int32(s)-t__predefined_ptrdiff_t(bp+516) == int32(1) && (y != 0 || p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if int32(s)-t__predefined_ptrdiff_t(bp+516) == int32(1) && (y != 0 || p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { v15 = s s++ *(*uint8)(unsafe.Pointer(v15)) = uint8('.') @@ -141070,12 +141068,12 @@ _4: l = int32(s) - t__predefined_ptrdiff_t(bp+516) + (int32(ebuf) - int32(estr)) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint32(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) - _out(tls, f, bp+516, uint32(int32(s)-t__predefined_ptrdiff_t(bp+516))) + _out(tls, f, prefix, Uint32FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, bp+516, Uint32FromInt32(int32(s)-t__predefined_ptrdiff_t(bp+516))) _pad3(tls, f, uint8('0'), l-(int32(ebuf)-int32(estr))-(int32(s)-t__predefined_ptrdiff_t(bp+516)), 0, 0) - _out(tls, f, estr, uint32(int32(ebuf)-int32(estr))) - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, estr, Uint32FromInt32(int32(ebuf)-int32(estr))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v16 = w } else { @@ -141148,15 +141146,15 @@ _4: v25 = -*(*int32)(unsafe.Pointer(bp + 512)) } sh1 = v25 - need = int32(uint32(1) + (uint32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) + need = Int32FromUint32(uint32(1) + (Uint32FromInt32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) d = a for { if !(d < z) { break } - rm = *(*Tuint32_t)(unsafe.Pointer(d)) & uint32(int32(1)<>sh1 + carry1 - carry1 = uint32(Int32FromInt32(1000000000)>>sh1) * rm + carry1 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh1) * rm goto _26 _26: ; @@ -141186,7 +141184,7 @@ _4: i = int32(10) e = Int32FromInt32(9) * ((int32(r) - int32(a)) / 4) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _29 @@ -141217,30 +141215,30 @@ _4: i *= int32(10) j++ } - x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(i) + x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % Uint32FromInt32(i) /* Are there any significant digits past j? */ if x2 != 0 || d+uintptr(1)*4 != z { round1 = Float64FromInt32(2) / Float64FromFloat64(2.22044604925031308085e-16) - if *(*Tuint32_t)(unsafe.Pointer(d))/uint32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { + if *(*Tuint32_t)(unsafe.Pointer(d))/Uint32FromInt32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { round1 += Float64FromInt32(2) } - if x2 < uint32(i/int32(2)) { + if x2 < Uint32FromInt32(i/int32(2)) { small = Float64FromFloat64(0.5) } else { - if x2 == uint32(i/int32(2)) && d+uintptr(1)*4 == z { + if x2 == Uint32FromInt32(i/int32(2)) && d+uintptr(1)*4 == z { small = Float64FromFloat64(1) } else { small = Float64FromFloat64(1.5) } } - if pl != 0 && int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if pl != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { round1 *= float64(-Int32FromInt32(1)) small *= float64(-Int32FromInt32(1)) } *(*Tuint32_t)(unsafe.Pointer(d)) -= x2 /* Decide whether to round by probing round+small */ if round1+small != round1 { - *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + uint32(i) + *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + Uint32FromInt32(i) for *(*Tuint32_t)(unsafe.Pointer(d)) > uint32(999999999) { v31 = d d -= 4 @@ -141255,7 +141253,7 @@ _4: i = int32(10) e = Int32FromInt32(9) * ((int32(r) - int32(a)) / 4) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _33 @@ -141290,13 +141288,13 @@ _4: t -= int32(2) p-- } - if !(uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if !(Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { /* Count trailing zeros in last place */ if z > a && *(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4)) != 0 { i = int32(10) j = Int32FromInt32(0) for { - if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%uint32(i) == uint32(0)) { + if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%Uint32FromInt32(i) == uint32(0)) { break } goto _35 @@ -141345,10 +141343,10 @@ _4: } } } - if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { return -int32(1) } - l = int32(1) + p + BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) + l = int32(1) + p + BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) if t|int32(32) == int32('f') { if e > int32(INT_MAX)-l { return -int32(1) @@ -141362,7 +141360,7 @@ _4: } else { v42 = e } - estr = _fmt_u(tls, uint64(v42), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v42), ebuf) for int32(ebuf)-int32(estr) < int32(2) { estr-- v43 = estr @@ -141375,10 +141373,10 @@ _4: } else { v45 = int32('+') } - *(*uint8)(unsafe.Pointer(v44)) = uint8(v45) + *(*uint8)(unsafe.Pointer(v44)) = Uint8FromInt32(v45) estr-- v46 = estr - *(*uint8)(unsafe.Pointer(v46)) = uint8(t) + *(*uint8)(unsafe.Pointer(v46)) = Uint8FromInt32(t) if int32(ebuf)-int32(estr) > int32(INT_MAX)-l { return -int32(1) } @@ -141388,8 +141386,8 @@ _4: return -int32(1) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint32(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, prefix, Uint32FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) if t|int32(32) == int32('f') { if a > r { a = r @@ -141413,13 +141411,13 @@ _4: *(*uint8)(unsafe.Pointer(v49)) = uint8('0') } } - _out(tls, f, s2, uint32(int32(bp+516+uintptr(9))-int32(s2))) + _out(tls, f, s2, Uint32FromInt32(int32(bp+516+uintptr(9))-int32(s2))) goto _47 _47: ; d += 4 } - if p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+483, uint32(1)) } for { @@ -141437,7 +141435,7 @@ _4: } else { v52 = p } - _out(tls, f, s3, uint32(v52)) + _out(tls, f, s3, Uint32FromInt32(v52)) goto _50 _50: ; @@ -141470,7 +141468,7 @@ _4: v56 = s4 s4++ _out(tls, f, v56, uint32(1)) - if p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+483, uint32(1)) } } @@ -141479,7 +141477,7 @@ _4: } else { v57 = p } - _out(tls, f, s4, uint32(v57)) + _out(tls, f, s4, Uint32FromInt32(v57)) p -= int32(bp+516+uintptr(9)) - int32(s4) goto _53 _53: @@ -141487,9 +141485,9 @@ _4: d += 4 } _pad3(tls, f, uint8('0'), p+int32(18), int32(18), 0) - _out(tls, f, estr, uint32(int32(ebuf)-int32(estr))) + _out(tls, f, estr, Uint32FromInt32(int32(ebuf)-int32(estr))) } - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v58 = w } else { @@ -141506,10 +141504,10 @@ func _getint(tls *TLS, s uintptr) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { - i = int32(10)*i + (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) + i = int32(10)*i + (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) } goto _1 _1: @@ -141552,7 +141550,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Handle literal text and %% format specifiers */ a = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { break } goto _2 @@ -141562,7 +141560,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } z = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { break } goto _3 @@ -141576,14 +141574,14 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32(z) - int32(a) if f != 0 { - _out(tls, f, a, uint32(l)) + _out(tls, f, a, Uint32FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) - argpos = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') + argpos = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { argpos = -int32(1) @@ -141592,24 +141590,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { + if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { break } - fl |= uint32(1) << (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) + fl |= uint32(1) << (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) goto _4 _4: ; *(*uintptr)(unsafe.Pointer(bp))++ } /* Read field width */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) w = Int32FromInt32(0) } else { - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { @@ -141637,13 +141635,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } /* Read precision */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) p = Int32FromInt32(0) } else { - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(4) } else { @@ -141661,7 +141659,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } xp = BoolInt32(p >= 0) } else { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { *(*uintptr)(unsafe.Pointer(bp))++ p = _getint(tls, bp) xp = int32(1) @@ -141673,13 +141671,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st v8 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ - st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(int32(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) + st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) } if !(st != 0) { goto inval @@ -141692,13 +141690,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { if argpos >= 0 { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) } else { *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } } else { if f != 0 { - _pop_arg(tls, bp+8, int32(st), ap) + _pop_arg(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -141714,7 +141712,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, z = bp + 16 + uintptr(24) prefix = __ccgo_ts + 1450 pl = 0 - t = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) /* Transform ls,lc -> S,C */ if ps != 0 && t&int32(15) == int32(3) { t &= ^Int32FromInt32(32) @@ -141778,24 +141776,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint32(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint32FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint64FromInt32(cnt) break } goto _1 _10: ; - if uint32(p) > Uint32FromInt32(2)*Uint32FromInt64(4) { - v31 = uint32(p) + if Uint32FromInt32(p) > Uint32FromInt32(2)*Uint32FromInt64(4) { + v31 = Uint32FromInt32(p) } else { v31 = Uint32FromInt32(2) * Uint32FromInt64(4) } - p = int32(v31) + p = Int32FromUint32(v31) t = int32('x') fl |= Uint32FromUint32(1) << (Int32FromUint8('#') - Int32FromUint8(' ')) _12: @@ -141826,7 +141824,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, _14: ; pl = int32(1) - if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > uint64(Int64FromInt64(INT64_MAX)) { + if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) = -*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { if fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { @@ -141897,7 +141895,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v40 = p } - z = a + uintptr(Xstrnlen(tls, a, uint32(v40))) + z = a + uintptr(Xstrnlen(tls, a, Uint32FromInt32(v40))) if p < 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -141918,21 +141916,21 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, ws = *(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))) v42 = Int32FromInt32(0) l = v42 - i = uint32(v42) + i = Uint32FromInt32(v42) for { - if v45 = i < uint32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { + if v45 = i < Uint32FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { v44 = ws ws += 4 v43 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v44))) l = v43 } - if !(v45 && v43 >= 0 && uint32(l) <= uint32(p)-i) { + if !(v45 && v43 >= 0 && Uint32FromInt32(l) <= Uint32FromInt32(p)-i) { break } goto _41 _41: ; - i += uint32(l) + i += Uint32FromInt32(l) } if l < 0 { return -int32(1) @@ -141940,27 +141938,27 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if i > uint32(INT_MAX) { goto overflow } - p = int32(i) - _pad3(tls, f, uint8(' '), w, p, int32(fl)) + p = Int32FromUint32(i) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl)) ws = *(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))) i = uint32(0) for { - if v49 = i < 0+uint32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { + if v49 = i < 0+Uint32FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { v48 = ws ws += 4 v47 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v48))) l = v47 } - if !(v49 && i+uint32(v47) <= uint32(p)) { + if !(v49 && i+Uint32FromInt32(v47) <= Uint32FromInt32(p)) { break } - _out(tls, f, bp+48, uint32(l)) + _out(tls, f, bp+48, Uint32FromInt32(l)) goto _46 _46: ; - i += uint32(l) + i += Uint32FromInt32(l) } - _pad3(tls, f, uint8(' '), w, p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > p { v50 = w } else { @@ -141987,7 +141985,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if xp != 0 && p < 0 { goto overflow } - l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, int32(fl), t) + l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, Int32FromUint32(fl), t) if l < 0 { goto overflow } @@ -142006,12 +142004,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w > int32(INT_MAX)-cnt { goto overflow } - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl)) - _out(tls, f, prefix, uint32(pl)) - _pad3(tls, f, uint8('0'), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl)) + _out(tls, f, prefix, Uint32FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) _pad3(tls, f, uint8('0'), p, int32(z)-int32(a), 0) - _out(tls, f, a, uint32(int32(z)-int32(a))) - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, a, Uint32FromInt32(int32(z)-int32(a))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 _1: @@ -142086,8 +142084,8 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v1 = 0 } __need_unlock = v1 - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) { saved_buf = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fbuf = bp + 128 @@ -142119,7 +142117,7 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -142142,13 +142140,13 @@ func _store_int(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -142215,14 +142213,14 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - v3 = int32(*(*uint8)(unsafe.Pointer(p))) - v4 = BoolInt32(v3 == int32(' ') || uint32(v3)-uint32('\t') < uint32(5)) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v4 = BoolInt32(v3 == int32(' ') || Uint32FromInt32(v3)-uint32('\t') < uint32(5)) goto _5 _5: if v4 != 0 { for { - v6 = int32(*(*uint8)(unsafe.Pointer(p + 1))) - v7 = BoolInt32(v6 == int32(' ') || uint32(v6)-uint32('\t') < uint32(5)) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) + v7 = BoolInt32(v6 == int32(' ') || Uint32FromInt32(v6)-uint32('\t') < uint32(5)) goto _8 _8: if !(v7 != 0) { @@ -142236,12 +142234,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v11 = f + 4 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } v12 = v9 - v13 = BoolInt32(v12 == int32(' ') || uint32(v12)-uint32('\t') < uint32(5)) + v13 = BoolInt32(v12 == int32(' ') || Uint32FromInt32(v12)-uint32('\t') < uint32(5)) goto _14 _14: if !(v13 != 0) { @@ -142254,23 +142252,23 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { pos += (*TFILE)(unsafe.Pointer(f)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(f)).Frpos)-int32((*TFILE)(unsafe.Pointer(f)).Fbuf)) goto _2 } - if int32(*(*uint8)(unsafe.Pointer(p))) != int32('%') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32('%') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { X__shlim(tls, f, int64(Int32FromInt32(0))) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('%') { p++ for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Fshend { v19 = f + 4 v18 = *(*uintptr)(unsafe.Pointer(v19)) *(*uintptr)(unsafe.Pointer(v19))++ - v17 = int32(*(*uint8)(unsafe.Pointer(v18))) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v18))) } else { v17 = X__shgetc(tls, f) } v16 = v17 c = v16 v20 = v16 - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: if !(v21 != 0) { @@ -142282,13 +142280,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v25 = f + 4 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ - v23 = int32(*(*uint8)(unsafe.Pointer(v24))) + v23 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v24))) } else { v23 = X__shgetc(tls, f) } c = v23 } - if c != int32(*(*uint8)(unsafe.Pointer(p))) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -142301,12 +142299,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto _2 } p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('*') { dest = uintptr(0) p++ } else { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { - dest = _arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { + dest = _arg_n(tls, ap, Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) p += uintptr(2) } else { dest = VaUintptr(&ap) @@ -142317,13 +142315,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } - width = int32(10)*width + int32(*(*uint8)(unsafe.Pointer(p))) - int32('0') + width = int32(10)*width + Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) - int32('0') goto _27 _27: ; p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('m') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('m') { wcs = uintptr(0) s = uintptr(0) alloc = BoolInt32(!!(dest != 0)) @@ -142334,16 +142332,16 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { size = SIZE_def v28 = p p++ - switch int32(*(*uint8)(unsafe.Pointer(v28))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) { case int32('h'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('h') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('h') { p++ size = -Int32FromInt32(2) } else { size = -int32(1) } case int32('l'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('l') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('l') { p++ size = Int32FromInt32(SIZE_ll) } else { @@ -142402,7 +142400,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*uint8)(unsafe.Pointer(p))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) /* C or S */ if t&int32(0x2f) == int32(3) { t |= int32(32) @@ -142416,7 +142414,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { fallthrough case int32('['): case int32('n'): - _store_int(tls, dest, size, uint64(pos)) + _store_int(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 default: @@ -142426,12 +142424,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v31 = f + 4 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } v32 = v29 - v33 = BoolInt32(v32 == int32(' ') || uint32(v32)-uint32('\t') < uint32(5)) + v33 = BoolInt32(v32 == int32(' ') || Uint32FromInt32(v32)-uint32('\t') < uint32(5)) goto _34 _34: if !(v33 != 0) { @@ -142448,7 +142446,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v38 = f + 4 v37 = *(*uintptr)(unsafe.Pointer(v38)) *(*uintptr)(unsafe.Pointer(v38))++ - v36 = int32(*(*uint8)(unsafe.Pointer(v37))) + v36 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v37))) } else { v36 = X__shgetc(tls, f) } @@ -142517,7 +142515,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { p++ v59 = p - if int32(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { p++ invert = Int32FromInt32(1) } else { @@ -142525,38 +142523,38 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } Xmemset(tls, bp+16, invert, uint32(257)) (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = Uint8FromInt32(Int32FromInt32(1) - invert) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = Uint8FromInt32(Int32FromInt32(1) - invert) } } for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } if !(*(*uint8)(unsafe.Pointer(p)) != 0) { goto fmt_fail } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { v62 = p p++ - c = int32(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) for { - if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + if !(c < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))) { break } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = Uint8FromInt32(int32(1) - invert) goto _61 _61: ; c++ } } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+int32(*(*uint8)(unsafe.Pointer(p)))] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))] = Uint8FromInt32(int32(1) - invert) goto _60 _60: ; @@ -142567,7 +142565,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { s = uintptr(0) i = uint32(0) if t == int32('c') { - v63 = uint32(width) + uint32(1) + v63 = Uint32FromInt32(width) + uint32(1) } else { v63 = uint32(31) } @@ -142587,7 +142585,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v67 = f + 4 v66 = *(*uintptr)(unsafe.Pointer(v67)) *(*uintptr)(unsafe.Pointer(v67))++ - v65 = int32(*(*uint8)(unsafe.Pointer(v66))) + v65 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v66))) } else { v65 = X__shgetc(tls, f) } @@ -142596,11 +142594,11 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !((*(*[257]uint8)(unsafe.Pointer(bp + 16)))[v64+int32(1)] != 0) { break } - *(*uint8)(unsafe.Pointer(bp)) = uint8(c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(c) switch Xmbrtowc(tls, bp+276, bp, uint32(1), bp+8) { - case uint32(-Int32FromInt32(1)): + case Uint32FromInt32(-Int32FromInt32(1)): goto input_fail - case uint32(-Int32FromInt32(2)): + case Uint32FromInt32(-Int32FromInt32(2)): continue } if wcs != 0 { @@ -142631,7 +142629,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v72 = f + 4 v71 = *(*uintptr)(unsafe.Pointer(v72)) *(*uintptr)(unsafe.Pointer(v72))++ - v70 = int32(*(*uint8)(unsafe.Pointer(v71))) + v70 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v71))) } else { v70 = X__shgetc(tls, f) } @@ -142642,7 +142640,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v73 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = Uint8FromInt32(c) if i == k { k += k + uint32(1) tmp1 = Xrealloc(tls, s, k) @@ -142661,7 +142659,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v78 = f + 4 v77 = *(*uintptr)(unsafe.Pointer(v78)) *(*uintptr)(unsafe.Pointer(v78))++ - v76 = int32(*(*uint8)(unsafe.Pointer(v77))) + v76 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v77))) } else { v76 = X__shgetc(tls, f) } @@ -142672,7 +142670,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v79 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = Uint8FromInt32(c) } } else { for { @@ -142680,7 +142678,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v83 = f + 4 v82 = *(*uintptr)(unsafe.Pointer(v83)) *(*uintptr)(unsafe.Pointer(v83))++ - v81 = int32(*(*uint8)(unsafe.Pointer(v82))) + v81 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v82))) } else { v81 = X__shgetc(tls, f) } @@ -142742,7 +142740,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto int_common int_common: ; - x = X__intscan(tls, f, uint32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) + x = X__intscan(tls, f, Uint32FromInt32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) if !((*TFILE)(unsafe.Pointer(f)).Fshcnt+int64(int32((*TFILE)(unsafe.Pointer(f)).Frpos)-int32((*TFILE)(unsafe.Pointer(f)).Fbuf)) != 0) { goto match_fail } @@ -142947,33 +142945,33 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint32(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_DBL): @@ -143002,7 +143000,7 @@ func _out1(tls *TLS, f uintptr, s uintptr, l Tsize_t) { func _pad4(tls *TLS, f uintptr, n int32, fl int32) { bp := tls.Alloc(32) defer tls.Free(32) - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return } Xfprintf(tls, f, __ccgo_ts+1467, VaList(bp+8, n, __ccgo_ts)) @@ -143016,10 +143014,10 @@ func _getint1(tls *TLS, s uintptr) (r int32) { if !(BoolInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-uint32('0') > uint32(int32(INT_MAX)-int32(10)*i) { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-uint32('0') > Uint32FromInt32(int32(INT_MAX)-int32(10)*i) { i = -int32(1) } else { - i = int32(uint32(int32(10)*i) + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - uint32('0'))) + i = Int32FromUint32(Uint32FromInt32(int32(10)*i) + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - uint32('0'))) } goto _1 _1: @@ -143098,14 +143096,14 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = (int32(z) - int32(a)) / 4 if f != 0 { - _out1(tls, f, a, uint32(l)) + _out1(tls, f, a, Uint32FromInt32(l)) } if l != 0 { goto _1 } if BoolInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4)) == uint32('$') { l10n = uint32(1) - argpos = int32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4)) - uint32('0')) + argpos = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4)) - uint32('0')) *(*uintptr)(unsafe.Pointer(bp + 4)) += uintptr(3) * 4 } else { argpos = -int32(1) @@ -143128,7 +143126,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if BoolInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4)) == uint32('$') { l10n = uint32(1) *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4))-uint32('0'))*4)) = int32(_INT) - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4))-uint32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4))-uint32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 4)) += uintptr(3) * 4 } else { if !(l10n != 0) { @@ -143158,7 +143156,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)))) == uint32('.') && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 1*4)) == uint32('*') { if BoolInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 3*4)) == uint32('$') { *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4))-uint32('0'))*4)) = int32(_INT) - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4))-uint32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + 2*4))-uint32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 4)) += uintptr(4) * 4 } else { if !(l10n != 0) { @@ -143187,7 +143185,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -143205,11 +143203,11 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } else { if argpos >= 0 { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } else { if f != 0 { - _pop_arg1(tls, bp+8, int32(st), ap) + _pop_arg1(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -143222,7 +143220,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return -int32(1) } - t = int32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + uintptr(-Int32FromInt32(1))*4))) + t = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4)) + uintptr(-Int32FromInt32(1))*4))) if ps != 0 && t&int32(15) == int32(3) { t &= ^Int32FromInt32(32) } @@ -143236,13 +143234,13 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint32(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint32FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))))) = Uint64FromInt32(cnt) break } goto _1 @@ -143252,15 +143250,15 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < int32(1) { w = int32(1) } - _pad4(tls, f, w-int32(1), int32(fl)) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl)) if t == int32('C') { v9 = *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { - v9 = uint64(Xbtowc(tls, int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))))) + v9 = uint64(Xbtowc(tls, Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))))) } *(*Twchar_t)(unsafe.Pointer(bp)) = uint32(v9) _out1(tls, f, bp, uint32(1)) - _pad4(tls, f, w-int32(1), int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('S'): @@ -143270,7 +143268,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v10 = p } - z = a + uintptr(Xwcsnlen(tls, a, uint32(v10)))*4 + z = a + uintptr(Xwcsnlen(tls, a, Uint32FromInt32(v10)))*4 if p < 0 && *(*Twchar_t)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -143278,9 +143276,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) - _out1(tls, f, a, uint32(p)) - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl)) + _out1(tls, f, a, Uint32FromInt32(p)) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('m'): @@ -143323,7 +143321,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) + _pad4(tls, f, w-p, Int32FromUint32(fl)) bs = *(*uintptr)(unsafe.Pointer(&*(*Targ)(unsafe.Pointer(bp + 8)))) for { v16 = l @@ -143335,14 +143333,14 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, bs += uintptr(i) _out1(tls, f, bp+32, uint32(1)) } - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 } if xp != 0 && p < 0 { goto overflow } - Xsnprintf(tls, bp+16, uint32(16), __ccgo_ts+1471, VaList(bp+48, __ccgo_ts+1491+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1493+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1495+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+587+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1497+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), int32(_sizeprefix[t|int32(32)-int32('a')]), t)) + Xsnprintf(tls, bp+16, uint32(16), __ccgo_ts+1471, VaList(bp+48, __ccgo_ts+1491+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1493+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1495+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+587+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1497+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), Int32FromUint8(_sizeprefix[t|int32(32)-int32('a')]), t)) switch t | Int32FromInt32(32) { case int32('a'): fallthrough @@ -143437,13 +143435,13 @@ func Xvfwprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } __need_unlock = v1 Xfwide(tls, f, int32(1)) - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) ret = _wprintf_core(tls, f, fmt, bp, bp+48, bp+4) if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -143459,13 +143457,13 @@ func _store_int1(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -143517,9 +143515,9 @@ func _in_set(tls *TLS, set uintptr, c int32) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == uint32('-') && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) != uint32(']') { v3 = p p += 4 - j = int32(*(*Twchar_t)(unsafe.Pointer(v3 + uintptr(-Int32FromInt32(1))*4))) + j = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(v3 + uintptr(-Int32FromInt32(1))*4))) for { - if !(uint32(j) < *(*Twchar_t)(unsafe.Pointer(p))) { + if !(Uint32FromInt32(j) < *(*Twchar_t)(unsafe.Pointer(p))) { break } if c == j { @@ -143531,7 +143529,7 @@ func _in_set(tls *TLS, set uintptr, c int32) (r int32) { j++ } } - if uint32(c) == *(*Twchar_t)(unsafe.Pointer(p)) { + if Uint32FromInt32(c) == *(*Twchar_t)(unsafe.Pointer(p)) { return int32(1) } goto _1 @@ -143578,7 +143576,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { p += 4 } for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v6 = f + 4 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ @@ -143586,20 +143584,20 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v4 = Xgetwc(tls, f) } - v3 = int32(v4) + v3 = Int32FromUint32(v4) c = v3 - if !(Xiswspace(tls, uint32(v3)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v3)) != 0) { break } pos++ } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v9 = f + 4 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) _ = *(*uint8)(unsafe.Pointer(v8)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } goto _2 } @@ -143607,7 +143605,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == uint32('%') { p += 4 for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v13 = f + 4 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ @@ -143615,15 +143613,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v11 = Xgetwc(tls, f) } - v10 = int32(v11) + v10 = Int32FromUint32(v11) c = v10 - if !(Xiswspace(tls, uint32(v10)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v10)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v16 = f + 4 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ @@ -143631,16 +143629,16 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v14 = Xgetwc(tls, f) } - c = int32(v14) + c = Int32FromUint32(v14) } - if uint32(c) != *(*Twchar_t)(unsafe.Pointer(p)) { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if Uint32FromInt32(c) != *(*Twchar_t)(unsafe.Pointer(p)) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v19 = f + 4 *(*uintptr)(unsafe.Pointer(v19))-- v18 = *(*uintptr)(unsafe.Pointer(v19)) _ = *(*uint8)(unsafe.Pointer(v18)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if c < 0 { goto input_fail @@ -143667,7 +143665,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(*(*Twchar_t)(unsafe.Pointer(p))-uint32('0') < uint32(10)) != 0) { break } - width = int32(uint32(int32(10)*width) + *(*Twchar_t)(unsafe.Pointer(p)) - uint32('0')) + width = Int32FromUint32(Uint32FromInt32(int32(10)*width) + *(*Twchar_t)(unsafe.Pointer(p)) - uint32('0')) goto _20 _20: ; @@ -143752,7 +143750,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*Twchar_t)(unsafe.Pointer(p))) + t = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(p))) /* Transform S,C -> ls,lc */ if t&int32(0x2f) == int32(3) { size = int32(SIZE_l) @@ -143761,7 +143759,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if t != int32('n') { if t != int32('[') && t|int32(32) != int32('c') { for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v25 = f + 4 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ @@ -143769,15 +143767,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v23 = Xgetwc(tls, f) } - v22 = int32(v23) + v22 = Int32FromUint32(v23) c = v22 - if !(Xiswspace(tls, uint32(v22)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v22)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v28 = f + 4 v27 = *(*uintptr)(unsafe.Pointer(v28)) *(*uintptr)(unsafe.Pointer(v28))++ @@ -143785,23 +143783,23 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v26 = Xgetwc(tls, f) } - c = int32(v26) + c = Int32FromUint32(v26) } if c < 0 { goto input_fail } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v31 = f + 4 *(*uintptr)(unsafe.Pointer(v31))-- v30 = *(*uintptr)(unsafe.Pointer(v31)) _ = *(*uint8)(unsafe.Pointer(v30)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } } switch t { case int32('n'): - _store_int1(tls, dest, size, uint64(pos)) + _store_int1(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 case int32('s'): @@ -143859,7 +143857,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { i = uint32(0) if alloc != 0 { if t == int32('c') { - v35 = uint32(width) + uint32(1) + v35 = Uint32FromInt32(width) + uint32(1) } else { v35 = uint32(31) } @@ -143877,7 +143875,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } } for width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v39 = f + 4 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ @@ -143885,7 +143883,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v37 = Xgetwc(tls, f) } - v36 = int32(v37) + v36 = Int32FromUint32(v37) c = v36 if v36 < 0 { break @@ -143896,7 +143894,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if wcs != 0 { v40 = i i++ - *(*Twchar_t)(unsafe.Pointer(wcs + uintptr(v40)*4)) = uint32(c) + *(*Twchar_t)(unsafe.Pointer(wcs + uintptr(v40)*4)) = Uint32FromInt32(c) if alloc != 0 && i == k { k += k + uint32(1) tmp1 = Xrealloc(tls, wcs, k*uint32(4)) @@ -143912,11 +143910,11 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v41 = bp + 8 } - l = Xwctomb(tls, v41, uint32(c)) + l = Xwctomb(tls, v41, Uint32FromInt32(c)) if l < 0 { goto input_fail } - i += uint32(l) + i += Uint32FromInt32(l) if alloc != 0 && i > k-uint32(4) { k += k + uint32(1) tmp2 = Xrealloc(tls, s, k) @@ -143932,13 +143930,13 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { gotmatch = int32(1) } if width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v44 = f + 4 *(*uintptr)(unsafe.Pointer(v44))-- v43 = *(*uintptr)(unsafe.Pointer(v44)) _ = *(*uint8)(unsafe.Pointer(v43)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if t == int32('c') || !(gotmatch != 0) { goto match_fail @@ -144123,10 +144121,10 @@ func _sn_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { var v1, v2 uint32 _, _, _, _, _ = c, k, v1, v2, v3 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if (*Tcookie3)(unsafe.Pointer(c)).Fn < uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos)-int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) { + if (*Tcookie3)(unsafe.Pointer(c)).Fn < Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos)-int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) { v1 = (*Tcookie3)(unsafe.Pointer(c)).Fn } else { - v1 = uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) + v1 = Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos) - int32((*TFILE)(unsafe.Pointer(f)).Fwbase)) } k = v1 if k != 0 { @@ -144217,7 +144215,7 @@ func _string_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { k = len1 + uint32(256) end = Xmemchr(tls, src, 0, k) if end != 0 { - k = uint32(int32(end) - int32(src)) + k = Uint32FromInt32(int32(end) - int32(src)) } if k < len1 { len1 = k @@ -144268,8 +144266,8 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { l0 = l i = 0 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, uint32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos)-int32((*TFILE)(unsafe.Pointer(f)).Fwbase))) == uint32(-Int32FromInt32(1)) { - return uint32(-Int32FromInt32(1)) + if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, Uint32FromInt32(int32((*TFILE)(unsafe.Pointer(f)).Fwpos)-int32((*TFILE)(unsafe.Pointer(f)).Fwbase))) == Uint32FromInt32(-Int32FromInt32(1)) { + return Uint32FromInt32(-Int32FromInt32(1)) } for { if v2 = (*Tcookie4)(unsafe.Pointer(c)).Fl != 0 && l != 0; v2 { @@ -144283,7 +144281,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { i = int32(1) } s += uintptr(i) - l -= uint32(i) + l -= Uint32FromInt32(i) (*Tcookie4)(unsafe.Pointer(c)).Fl-- (*Tcookie4)(unsafe.Pointer(c)).Fws += 4 } @@ -144295,7 +144293,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { (*TFILE)(unsafe.Pointer(f)).Fwbase = v3 (*TFILE)(unsafe.Pointer(f)).Fwpos = v3 *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - return uint32(i) + return Uint32FromInt32(i) } (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -144333,7 +144331,7 @@ func Xvswprintf(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, ap Tva_list) (r1 in } r = Xvfwprintf(tls, bp+264, fmt, ap) _sw_write(tls, bp+264, uintptr(0), uint32(0)) - if uint32(r) >= n { + if Uint32FromInt32(r) >= n { v1 = -int32(1) } else { v1 = r @@ -144353,7 +144351,7 @@ func _wstring_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { return uint32(0) } k = Xwcsrtombs(tls, (*TFILE)(unsafe.Pointer(f)).Fbuf, bp, (*TFILE)(unsafe.Pointer(f)).Fbuf_size, uintptr(0)) - if k == uint32(-Int32FromInt32(1)) { + if k == Uint32FromInt32(-Int32FromInt32(1)) { v1 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v1 (*TFILE)(unsafe.Pointer(f)).Frpos = v1 @@ -144493,8 +144491,8 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144502,7 +144500,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -144513,7 +144511,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int32(10)*n - (int32(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) + n = int32(10)*n - (Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) } if neg != 0 { v5 = n @@ -144534,8 +144532,8 @@ func Xatol(tls *TLS, s uintptr) (r int32) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144543,7 +144541,7 @@ func Xatol(tls *TLS, s uintptr) (r int32) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -144554,7 +144552,7 @@ func Xatol(tls *TLS, s uintptr) (r int32) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int32(10)*n - (int32(*(*uint8)(unsafe.Pointer(v4))) - Int32FromUint8('0')) + n = int32(10)*n - (Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) - Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -144576,8 +144574,8 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144585,7 +144583,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -144596,7 +144594,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int64(10)*n - int64(int32(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) + n = int64(10)*n - int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -144652,16 +144650,16 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, j, v1, v3 int32 var _ /* tmp at bp+0 */ [32]uint8 _, _, _, _ = i, j, v1, v3 - if uint32(n)-uint32(1) > uint32(15) { + if Uint32FromInt32(n)-uint32(1) > uint32(15) { n = int32(15) } Xsprintf(tls, bp, __ccgo_ts+1524, VaList(bp+40, n-int32(1), x)) - v1 = BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) + v1 = BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) *(*int32)(unsafe.Pointer(sign)) = v1 i = v1 j = 0 for { - if !(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { + if !(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { break } _buf8[j] = (*(*[32]uint8)(unsafe.Pointer(bp)))[i] @@ -144670,7 +144668,7 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { ; v3 = i i++ - j += BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) + j += BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) } _buf8[j] = uint8(0) *(*int32)(unsafe.Pointer(dp)) = Xatoi(tls, bp+uintptr(i)+uintptr(1)) + int32(1) @@ -144689,20 +144687,20 @@ func Xfcvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, lz int32 var _ /* tmp at bp+0 */ [1500]uint8 _, _ = i, lz - if uint32(n) > uint32(1400) { + if Uint32FromInt32(n) > uint32(1400) { n = int32(1400) } Xsprintf(tls, bp, __ccgo_ts+1529, VaList(bp+1512, n, x)) - i = BoolInt32(int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) - if int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { - lz = int32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1497)) + i = BoolInt32(Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) + if Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { + lz = Int32FromUint32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1497)) } else { - lz = -int32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+483)) + lz = -Int32FromUint32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+483)) } if n <= lz { *(*int32)(unsafe.Pointer(sign)) = i *(*int32)(unsafe.Pointer(dp)) = int32(1) - if uint32(n) > uint32(14) { + if Uint32FromInt32(n) > uint32(14) { n = int32(14) } return __ccgo_ts + 1534 + UintptrFromInt32(14) - uintptr(n) @@ -144825,10 +144823,10 @@ _3: v9 = v12 goto _10 _10: - v7 = int32(Uint32FromInt32(8)*Uint32FromInt64(4) + uint32(v9)) + v7 = Int32FromUint32(Uint32FromInt32(8)*Uint32FromInt64(4) + Uint32FromInt32(v9)) r = v7 } - if v14 || uint32(v7) != Uint32FromInt32(8)*Uint32FromInt64(4) { + if v14 || Uint32FromInt32(v7) != Uint32FromInt32(8)*Uint32FromInt64(4) { return r } return 0 @@ -144874,25 +144872,25 @@ func _cycle(tls *TLS, width Tsize_t, ar uintptr, n int32) { // // /* shl() and shr() need n > 0 */ func _shl(tls *TLS, p uintptr, n int32) { - if uint32(n) >= Uint32FromInt32(8)*Uint32FromInt64(4) { + if Uint32FromInt32(n) >= Uint32FromInt32(8)*Uint32FromInt64(4) { n = int32(uint32(n) - Uint32FromInt32(8)*Uint32FromInt64(4)) *(*Tsize_t)(unsafe.Pointer(p + 1*4)) = *(*Tsize_t)(unsafe.Pointer(p)) *(*Tsize_t)(unsafe.Pointer(p)) = uint32(0) } - *(*Tsize_t)(unsafe.Pointer(p + 1*4)) <<= uint32(n) - *(*Tsize_t)(unsafe.Pointer(p + 1*4)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint32FromInt64(4)*Uint32FromInt32(8) - uint32(n)) - *(*Tsize_t)(unsafe.Pointer(p)) <<= uint32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*4)) <<= Uint32FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*4)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint32FromInt64(4)*Uint32FromInt32(8) - Uint32FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p)) <<= Uint32FromInt32(n) } func _shr(tls *TLS, p uintptr, n int32) { - if uint32(n) >= Uint32FromInt32(8)*Uint32FromInt64(4) { + if Uint32FromInt32(n) >= Uint32FromInt32(8)*Uint32FromInt64(4) { n = int32(uint32(n) - Uint32FromInt32(8)*Uint32FromInt64(4)) *(*Tsize_t)(unsafe.Pointer(p)) = *(*Tsize_t)(unsafe.Pointer(p + 1*4)) *(*Tsize_t)(unsafe.Pointer(p + 1*4)) = uint32(0) } - *(*Tsize_t)(unsafe.Pointer(p)) >>= uint32(n) - *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*4)) << (Uint32FromInt64(4)*Uint32FromInt32(8) - uint32(n)) - *(*Tsize_t)(unsafe.Pointer(p + 1*4)) >>= uint32(n) + *(*Tsize_t)(unsafe.Pointer(p)) >>= Uint32FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*4)) << (Uint32FromInt64(4)*Uint32FromInt32(8) - Uint32FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p + 1*4)) >>= Uint32FromInt32(n) } func _sift(tls *TLS, head uintptr, width Tsize_t, cmp Tcmpfun, arg uintptr, pshift int32, lp uintptr) { @@ -145010,7 +145008,7 @@ func X__qsort_r(tls *TLS, base uintptr, nel Tsize_t, width Tsize_t, cmp Tcmpfun, _shr(tls, bp+192, int32(2)) pshift += int32(2) } else { - if (*(*[48]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= uint32(int32(high)-int32(head)) { + if (*(*[48]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= Uint32FromInt32(int32(high)-int32(head)) { _trinkle(tls, head, width, cmp, arg, bp+192, pshift, 0, bp) } else { _sift(tls, head, width, cmp, arg, pshift, bp) @@ -145127,9 +145125,9 @@ func _strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*TFILE)(unsafe.Pointer(bp)).Fbuf = v1 (*TFILE)(unsafe.Pointer(bp)).Frend = uintptr(-Int32FromInt32(1)) X__shlim(tls, bp, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp, uint32(base), int32(1), lim) + y = X__intscan(tls, bp, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint32((*TFILE)(unsafe.Pointer(bp)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp)).Fbuf))) + cnt = Uint32FromInt64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp)).Fbuf))) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -145148,7 +145146,7 @@ func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint32) { @@ -145164,7 +145162,7 @@ func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int32) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(_strtox1(tls, s, p, base, uint64(Uint32FromUint32(0)+uint32(-Int32FromInt32(0x7fffffff)-Int32FromInt32(1))))) + return Int32FromUint64(_strtox1(tls, s, p, base, uint64(Uint32FromUint32(0)+Uint32FromInt32(-Int32FromInt32(0x7fffffff)-Int32FromInt32(1))))) } func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -145300,7 +145298,7 @@ func _wcstox(tls *TLS, s uintptr, p uintptr, prec int32) (r float64) { X__shlim(tls, bp+64, int64(Int32FromInt32(0))) y = X__floatscan(tls, bp+64, prec, int32(1)) if p != 0 { - cnt = uint32((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp+64)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint32FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp+64)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -145402,9 +145400,9 @@ func _wcstox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp+64, uint32(base), int32(1), lim) + y = X__intscan(tls, bp+64, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint32((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp+64)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint32FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + int64(int32((*TFILE)(unsafe.Pointer(bp+64)).Frpos)-int32((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -145428,7 +145426,7 @@ func Xwcstoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint32) { @@ -145444,7 +145442,7 @@ func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int32) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(_wcstox1(tls, s, p, base, uint64(Uint32FromUint32(0)+uint32(-Int32FromInt32(0x7fffffff)-Int32FromInt32(1))))) + return Int32FromUint64(_wcstox1(tls, s, p, base, uint64(Uint32FromUint32(0)+Uint32FromInt32(-Int32FromInt32(0x7fffffff)-Int32FromInt32(1))))) } func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -145525,14 +145523,14 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt _, _, _, _, _, _, _, _, _ = d, k, s, wd, ws, v2, v3, v6, v7 d = dest s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) == uint32(d)&(Uint32FromInt64(4)-Uint32FromInt32(1)) { for { if v3 = uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v2 } - if !(v3 && int32(v2) != c) { + if !(v3 && Int32FromUint8(v2) != c) { break } goto _1 @@ -145545,11 +145543,11 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt if uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) != 0 { goto tail } - k = uint32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * uint32(c) + k = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * Uint32FromInt32(c) wd = d ws = s for { - if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))^k-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(ws))^k) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))^k-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(ws))^k) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint32)(unsafe.Pointer(wd)) = *(*uint32)(unsafe.Pointer(ws)) @@ -145568,7 +145566,7 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt v6 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v6 } - if !(v7 && int32(v6) != c) { + if !(v7 && Int32FromUint8(v6) != c) { break } goto _5 @@ -145607,9 +145605,9 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { var s, w, v4 uintptr _, _, _, _ = k, s, w, v4 s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { - if !(uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(uint32(s)&(Uint32FromInt64(4)-Uint32FromInt32(1)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _1 @@ -145618,11 +145616,11 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s++ n-- } - if n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c { - k = uint32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * uint32(c) + if n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c { + k = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * Uint32FromInt32(c) w = s for { - if !(n >= Uint32FromInt64(4) && !((*(*uint32)(unsafe.Pointer(w))^k-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= Uint32FromInt64(4) && !((*(*uint32)(unsafe.Pointer(w))^k-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -145634,7 +145632,7 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s = w } for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -145662,7 +145660,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { l = vl r = vr for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _1 @@ -145673,7 +145671,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { r++ } if n != 0 { - v2 = int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } else { v2 = 0 } @@ -145684,15 +145682,15 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint32(1) p = jp - ip @@ -145827,13 +145825,13 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin ms = ip p0 = p /* And with the opposite comparison */ - ip = uint32(-Int32FromInt32(1)) + ip = Uint32FromInt32(-Int32FromInt32(1)) jp = uint32(0) v5 = Uint32FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint32(1) @@ -145841,7 +145839,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint32(1) p = jp - ip @@ -145876,7 +145874,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Search loop */ for { /* If remainder of haystack is shorter than needle, done */ - if uint32(int32(z)-int32(h)) < l { + if Uint32FromInt32(int32(z)-int32(h)) < l { return uintptr(0) } /* Check last byte first; advance by shift on mismatch */ @@ -145903,7 +145901,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin } k = v11 for { - if !(k < l && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(k < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -145919,7 +145917,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Compare left half */ k = ms + uint32(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint32(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint32(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint32(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint32(1)))))) { break } goto _12 @@ -145956,11 +145954,11 @@ func Xmemmem(tls *TLS, h0 uintptr, k Tsize_t, n0 uintptr, l Tsize_t) (r uintptr) return uintptr(0) } /* Use faster algorithms for short needles */ - h = Xmemchr(tls, h0, int32(*(*uint8)(unsafe.Pointer(n))), k) + h = Xmemchr(tls, h0, Int32FromUint8(*(*uint8)(unsafe.Pointer(n))), k) if !(h != 0) || l == uint32(1) { return h } - k -= uint32(int32(h) - int32(h0)) + k -= Uint32FromInt32(int32(h) - int32(h0)) if k < l { return uintptr(0) } @@ -145993,7 +145991,7 @@ func Xmemmove(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { if d == s { return d } - if uint32(s)-uint32(d)-n <= uint32(-Int32FromInt32(2))*n { + if uint32(s)-uint32(d)-n <= Uint32FromInt32(-Int32FromInt32(2))*n { return _memcpy(tls, d, s, n) } if d < s { @@ -146077,14 +146075,14 @@ func X__memrchr(tls *TLS, m uintptr, c int32, n Tsize_t) (r uintptr) { var v1 Tsize_t _, _ = s, v1 s = m - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { v1 = n n-- if !(v1 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { return s + uintptr(n) } } @@ -146116,20 +146114,20 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { if !(n != 0) { return dest } - *(*uint8)(unsafe.Pointer(s)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(1)))) = Uint8FromInt32(c) if n <= uint32(2) { return dest } - *(*uint8)(unsafe.Pointer(s + 1)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + 2)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(2)))) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(3)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 1)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + 2)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(2)))) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(3)))) = Uint8FromInt32(c) if n <= uint32(6) { return dest } - *(*uint8)(unsafe.Pointer(s + 3)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(4)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 3)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint32(4)))) = Uint8FromInt32(c) if n <= uint32(8) { return dest } @@ -146140,8 +146138,8 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { k = -uint32(s) & uint32(3) s += uintptr(k) n -= k - n &= uint32(-Int32FromInt32(4)) - c32 = uint32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(uint8(c)) + n &= Uint32FromInt32(-Int32FromInt32(4)) + c32 = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(Uint8FromInt32(c)) /* In preparation to copy 32 bytes at a time, aligned on * an 8-byte bounary, fill head/tail up to 28 bytes each. * As in the initial byte-based head/tail fill, each @@ -146240,7 +146238,7 @@ func X__stpcpy(tls *TLS, d uintptr, s uintptr) (r uintptr) { wd = d ws = s for { - if !!((*(*uint32)(unsafe.Pointer(ws))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint32)(unsafe.Pointer(ws))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _3 @@ -146329,7 +146327,7 @@ func X__stpncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { wd = d ws = s for { - if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint32)(unsafe.Pointer(wd)) = *(*uint32)(unsafe.Pointer(ws)) @@ -146392,7 +146390,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l = _l r = _r for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _1 @@ -146401,7 +146399,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l++ r++ } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strcasecmp_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) { @@ -146460,7 +146458,7 @@ func Xstrchr(tls *TLS, s uintptr, c int32) (r1 uintptr) { var r, v1 uintptr _, _ = r, v1 r = X__strchrnul(tls, s, c) - if int32(*(*uint8)(unsafe.Pointer(r))) == int32(uint8(c)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) == Int32FromUint8(Uint8FromInt32(c)) { v1 = r } else { v1 = uintptr(0) @@ -146487,7 +146485,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { var k Tsize_t var w uintptr _, _ = k, w - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } @@ -146495,7 +146493,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { if !(uint32(s)%Uint32FromInt64(4) != 0) { break } - if !(*(*uint8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { + if !(*(*uint8)(unsafe.Pointer(s)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == c { return s } goto _1 @@ -146503,10 +146501,10 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { ; s++ } - k = uint32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * uint32(c) + k = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(UCHAR_MAX) * Uint32FromInt32(c) w = s for { - if !(!((*(*uint32)(unsafe.Pointer(w))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(w)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint32)(unsafe.Pointer(w))^k-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(!((*(*uint32)(unsafe.Pointer(w))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(w)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint32)(unsafe.Pointer(w))^k-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -146516,7 +146514,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { } s = w for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -146550,7 +146548,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { defer func() { trc("-> %v", r1) }() } for { - if !(int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { break } goto _1 @@ -146559,7 +146557,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { l++ r++ } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrcpy(tls *TLS, dest uintptr, src uintptr) (r uintptr) { @@ -146584,7 +146582,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { _, _, _ = a, v3, p2 a = s if !(*(*uint8)(unsafe.Pointer(c)) != 0) || !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { - return uint32(int32(X__strchrnul(tls, s, int32(*(*uint8)(unsafe.Pointer(c))))) - int32(a)) + return Uint32FromInt32(int32(X__strchrnul(tls, s, Int32FromUint8(*(*uint8)(unsafe.Pointer(c))))) - int32(a)) } Xmemset(tls, bp, 0, uint32(32)) for { @@ -146609,7 +146607,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } func Xstrdup(tls *TLS, s uintptr) (r uintptr) { @@ -146718,7 +146716,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { wd = d ws = s for { - if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint32(4) && !((*(*uint32)(unsafe.Pointer(ws))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(ws)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*Tsize_t)(unsafe.Pointer(wd)) = *(*uint32)(unsafe.Pointer(ws)) @@ -146752,7 +146750,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { goto finish finish: ; - return uint32(int32(d)-int32(d0)) + Xstrlen(tls, s) + return Uint32FromInt32(int32(d)-int32(d0)) + Xstrlen(tls, s) return r } @@ -146780,7 +146778,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { break } if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } goto _1 _1: @@ -146789,7 +146787,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { } w = s for { - if !!((*(*uint32)(unsafe.Pointer(w))-uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(w)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*uint32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint32)(unsafe.Pointer(w))-Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(w)) & (Uint32FromInt32(-Int32FromInt32(1))/Uint32FromInt32(UCHAR_MAX)*Uint32FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _2 @@ -146807,7 +146805,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { ; s++ } - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { @@ -146826,7 +146824,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _2 @@ -146836,7 +146834,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, loc Tlocale_t) (r1 int32) { @@ -146894,7 +146892,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _2 @@ -146904,7 +146902,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { @@ -146944,7 +146942,7 @@ func Xstrnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _, _ = p, v1 p = Xmemchr(tls, s, 0, n) if p != 0 { - v1 = uint32(int32(p) - int32(s)) + v1 = Uint32FromInt32(int32(p) - int32(s)) } else { v1 = n } @@ -147010,7 +147008,7 @@ func Xstrsignal(tls *TLS, signum int32) (r uintptr) { _, _ = s, v2 s = uintptr(unsafe.Pointer(&_strings)) signum = signum - if uint32(signum)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(signum)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { signum = 0 } for { @@ -147054,7 +147052,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { } if !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(c)))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(c)))) { break } goto _1 @@ -147062,7 +147060,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } for { if v4 = *(*uint8)(unsafe.Pointer(c)) != 0; v4 { @@ -147086,18 +147084,18 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint32(int32(s) - int32(a)) + return Uint32FromInt32(int32(s) - int32(a)) } func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint32(1) p = jp - ip @@ -147225,13 +147223,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint32(-Int32FromInt32(1)) + ip = Uint32FromInt32(-Int32FromInt32(1)) jp = uint32(0) v5 = Uint32FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint32(1) @@ -147239,7 +147237,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint32(1) p = jp - ip @@ -147276,13 +147274,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint32(int32(z)-int32(h)) < l { + if Uint32FromInt32(int32(z)-int32(h)) < l { /* Fast estimate for MAX(l,63) */ grow = l | uint32(63) z2 = Xmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint32(int32(z)-int32(h)) < l { + if Uint32FromInt32(int32(z)-int32(h)) < l { return uintptr(0) } } else { @@ -147313,7 +147311,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { } k = v11 for { - if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -147329,7 +147327,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Compare left half */ k = ms + uint32(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint32(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint32(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint32(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint32(1)))))) { break } goto _12 @@ -147358,7 +147356,7 @@ func Xstrstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return h } /* Use faster algorithms for short needles */ - h = Xstrchr(tls, h, int32(*(*uint8)(unsafe.Pointer(n)))) + h = Xstrchr(tls, h, Int32FromUint8(*(*uint8)(unsafe.Pointer(n)))) if !(h != 0) || !(*(*uint8)(unsafe.Pointer(n + 1)) != 0) { return h } @@ -147468,14 +147466,14 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { i = v2 dp = v2 for { - if !(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { break } - c = int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) if !(c != 0) { return 0 } - if !(BoolInt32(uint32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { dp = i + uint32(1) z = Int32FromInt32(1) } else { @@ -147488,7 +147486,7 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { ; i++ } - if uint32(int32(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && uint32(int32(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { + if Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { /* If we're looking at non-degenerate digit sequences starting * with nonzero digits, longest digit string is greater. */ j = i @@ -147511,10 +147509,10 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { if z != 0 && dp < i && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-uint32('0') < uint32(10)) != 0 || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-uint32('0') < uint32(10)) != 0) { /* Otherwise, if common prefix of digit sequence is * all zeros, digits order less than non-digits. */ - return int32(uint8(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - int32(uint8(int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) + return Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) } } - return int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - int32(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) } func Xswab(tls *TLS, _src uintptr, _dest uintptr, n Tssize_t) { @@ -147561,7 +147559,7 @@ func Xwcscasecmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2)) defer func() { trc("-> %v", r1) }() } - return Xwcsncasecmp(tls, l, r, uint32(-Int32FromInt32(1))) + return Xwcsncasecmp(tls, l, r, Uint32FromInt32(-Int32FromInt32(1))) } func Xwcscasecmp_l(tls *TLS, l uintptr, r uintptr, locale Tlocale_t) (r1 int32) { @@ -147673,7 +147671,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { v2 = Xwcschr(tls, v3, *(*Twchar_t)(unsafe.Pointer(c))) s = v2 if v2 != 0 { - v1 = uint32((int32(s) - int32(a)) / 4) + v1 = Uint32FromInt32((int32(s) - int32(a)) / 4) } else { v1 = Xwcslen(tls, a) } @@ -147689,7 +147687,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint32((int32(s) - int32(a)) / 4) + return Uint32FromInt32((int32(s) - int32(a)) / 4) } func Xwcsdup(tls *TLS, s uintptr) (r uintptr) { @@ -147725,7 +147723,7 @@ func Xwcslen(tls *TLS, s uintptr) (r Tsize_t) { ; s += 4 } - return uint32((int32(s) - int32(a)) / 4) + return Uint32FromInt32((int32(s) - int32(a)) / 4) } func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { @@ -147751,7 +147749,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { r += 4 n-- } - return int32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(l))) - Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(r)))) + return Int32FromUint32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(l))) - Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(r)))) } func Xwcsncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, locale Tlocale_t) (r1 int32) { @@ -147845,7 +147843,7 @@ func Xwcsnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _ = z z = Xwmemchr(tls, s, uint32(0), n) if z != 0 { - n = uint32((int32(z) - int32(s)) / 4) + n = Uint32FromInt32((int32(z) - int32(s)) / 4) } return n } @@ -147908,7 +147906,7 @@ func Xwcsspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint32((int32(s) - int32(a)) / 4) + return Uint32FromInt32((int32(s) - int32(a)) / 4) } func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { @@ -147931,7 +147929,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return uintptr(0) } /* hit the end of h */ /* Compute maximal suffix */ - ip = uint32(-Int32FromInt32(1)) + ip = Uint32FromInt32(-Int32FromInt32(1)) jp = uint32(0) v2 = Uint32FromInt32(1) p = v2 @@ -147962,7 +147960,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint32(-Int32FromInt32(1)) + ip = Uint32FromInt32(-Int32FromInt32(1)) jp = uint32(0) v5 = Uint32FromInt32(1) p = v5 @@ -148013,13 +148011,13 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint32((int32(z)-int32(h))/4) < l { + if Uint32FromInt32((int32(z)-int32(h))/4) < l { /* Fast estimate for MIN(l,63) */ grow = l | uint32(63) z2 = Xwmemchr(tls, z, uint32(0), grow) if z2 != 0 { z = z2 - if uint32((int32(z)-int32(h))/4) < l { + if Uint32FromInt32((int32(z)-int32(h))/4) < l { return uintptr(0) } } else { @@ -148324,7 +148322,7 @@ func X__mkostemps(tls *TLS, template uintptr, len1 int32, flags int32) (r int32) var l Tsize_t _, _, _, _, _ = fd, l, retries, v1, v3 l = Xstrlen(tls, template) - if l < uint32(6) || uint32(len1) > l-uint32(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1563, uint32(6)) != 0 { + if l < uint32(6) || Uint32FromInt32(len1) > l-uint32(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1563, uint32(6)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -148434,10 +148432,10 @@ func Xcfmakeraw(tls *TLS, t uintptr) { if __ccgo_strace { trc("tls=%v t=%v, (%v:)", tls, t, origin(2)) } - *(*Ttcflag_t)(unsafe.Pointer(t)) &= uint32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) - *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= uint32(^Int32FromInt32(OPOST)) - *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) - *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= uint32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) + *(*Ttcflag_t)(unsafe.Pointer(t)) &= Uint32FromInt32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) + *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= Uint32FromInt32(^Int32FromInt32(OPOST)) + *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) + *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= Uint32FromInt32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) *(*Ttcflag_t)(unsafe.Pointer(t + 8)) |= uint32(CS8) *(*Tcc_t)(unsafe.Pointer(t + 17 + 6)) = uint8(1) *(*Tcc_t)(unsafe.Pointer(t + 17 + 5)) = uint8(0) @@ -148448,11 +148446,11 @@ func Xcfsetospeed(tls *TLS, tio uintptr, speed Tspeed_t) (r int32) { trc("tls=%v tio=%v speed=%v, (%v:)", tls, tio, speed, origin(2)) defer func() { trc("-> %v", r) }() } - if speed&uint32(^Int32FromInt32(CBAUD)) != 0 { + if speed&Uint32FromInt32(^Int32FromInt32(CBAUD)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= uint32(^Int32FromInt32(CBAUD)) + *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= Uint32FromInt32(^Int32FromInt32(CBAUD)) *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) |= speed return 0 } @@ -148485,7 +148483,7 @@ func Xtcdrain(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_ioctl), fd, Int32FromInt32(TCSBRK), Int32FromInt32(1), 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_ioctl), fd, Int32FromInt32(TCSBRK), Int32FromInt32(1), 0, 0, 0))) } func Xtcflow(tls *TLS, fd int32, action int32) (r int32) { @@ -148540,7 +148538,7 @@ func Xtcgetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCGWINSZ), int32(wsz)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCGWINSZ), int32(wsz)))) } func Xtcsendbreak(tls *TLS, fd int32, dur int32) (r int32) { @@ -148573,7 +148571,7 @@ func Xtcsetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCSWINSZ), int32(wsz)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCSWINSZ), int32(wsz)))) } func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { @@ -148588,13 +148586,13 @@ func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { var _ /* st at bp+0 */ Tstat _, _, _ = fd, map1, v1 map1 = uintptr(-Int32FromInt32(1)) - fd = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_open), int32(pathname), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))) + fd = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_open), int32(pathname), Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))) if fd < 0 { return uintptr(0) } if !(X__fstat(tls, fd, bp) != 0) { - map1 = X__mmap(tls, uintptr(0), uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) - *(*Tsize_t)(unsafe.Pointer(size)) = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + map1 = X__mmap(tls, uintptr(0), Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) + *(*Tsize_t)(unsafe.Pointer(size)) = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) } X__syscall1(tls, int32(SYS_close), fd) if map1 == uintptr(-Int32FromInt32(1)) { @@ -148701,10 +148699,10 @@ func X__secs_to_tm(tls *TLS, t int64, tm uintptr) (r int32) { years = int64(remyears+int32(4)*q_cycles+int32(100)*c_cycles) + int64(400)*int64(qc_cycles) months = 0 for { - if !(int32(_days_in_month[months]) <= remdays) { + if !(Int32FromUint8(_days_in_month[months]) <= remdays) { break } - remdays -= int32(_days_in_month[months]) + remdays -= Int32FromUint8(_days_in_month[months]) goto _1 _1: ; @@ -148800,35 +148798,35 @@ func _getint2(tls *TLS, p uintptr) (r int32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { break } - x = uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x goto _1 _1: ; *(*uintptr)(unsafe.Pointer(p))++ } - return int32(x) + return Int32FromUint32(x) } func _getoff(tls *TLS, p uintptr) (r int32) { var neg, off, v1 int32 _, _, _ = neg, off, v1 neg = 0 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('-') { *(*uintptr)(unsafe.Pointer(p))++ neg = int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('+') { *(*uintptr)(unsafe.Pointer(p))++ } } off = int32(3600) * _getint2(tls, p) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { *(*uintptr)(unsafe.Pointer(p))++ off += int32(60) * _getint2(tls, p) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { *(*uintptr)(unsafe.Pointer(p))++ off += _getint2(tls, p) } @@ -148844,7 +148842,7 @@ func _getoff(tls *TLS, p uintptr) (r int32) { func _getrule(tls *TLS, p uintptr, rule uintptr) { var r, v1 int32 _, _ = r, v1 - v1 = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) *(*int32)(unsafe.Pointer(rule)) = v1 r = v1 if r != int32('M') { @@ -148862,7 +148860,7 @@ func _getrule(tls *TLS, p uintptr, rule uintptr) { *(*uintptr)(unsafe.Pointer(p))++ *(*int32)(unsafe.Pointer(rule + 3*4)) = _getint2(tls, p) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('/') { *(*uintptr)(unsafe.Pointer(p))++ *(*int32)(unsafe.Pointer(rule + 4*4)) = _getoff(tls, p) } else { @@ -148873,11 +148871,11 @@ func _getrule(tls *TLS, p uintptr, rule uintptr) { func _getname(tls *TLS, d uintptr, p uintptr) { var i, v3 int32 _, _ = i, v3 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('<') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('<') { *(*uintptr)(unsafe.Pointer(p))++ i = 0 for { - if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i)))) != int32('>')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i)))) != int32('>')) { break } if i < int32(TZNAME_MAX) { @@ -148894,7 +148892,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } else { i = 0 for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { break } if i < int32(TZNAME_MAX) { @@ -148916,7 +148914,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } func _zi_read32(tls *TLS, z uintptr) (r Tuint32_t) { - return uint32(*(*uint8)(unsafe.Pointer(z)))< uint32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { + if i > Uint32FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { *(*uintptr)(unsafe.Pointer(bp + 288)) = uintptr(unsafe.Pointer(&X__utc)) i = Uint32FromInt32(3) } @@ -148992,8 +148990,8 @@ func _do_tzset(tls *TLS) { if i >= _old_tz_size { _old_tz_size = i + uint32(1) } - if _old_tz_size > uint32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { - _old_tz_size = uint32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) + if _old_tz_size > Uint32FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { + _old_tz_size = Uint32FromInt32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) } _old_tz = Xmalloc(tls, _old_tz_size) } @@ -149001,10 +148999,10 @@ func _do_tzset(tls *TLS) { _memcpy(tls, _old_tz, *(*uintptr)(unsafe.Pointer(bp + 288)), i+uint32(1)) } posix_form = 0 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { *(*uintptr)(unsafe.Pointer(bp + 292)) = *(*uintptr)(unsafe.Pointer(bp + 288)) _getname(tls, bp+301, bp+292) - if *(*uintptr)(unsafe.Pointer(bp + 292)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+301, __ccgo_ts+1588) != 0) || !(Xstrcmp(tls, bp+301, __ccgo_ts+1592) != 0)) { + if *(*uintptr)(unsafe.Pointer(bp + 292)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 292)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+301, __ccgo_ts+1588) != 0) || !(Xstrcmp(tls, bp+301, __ccgo_ts+1592) != 0)) { posix_form = int32(1) } } @@ -149012,10 +149010,10 @@ func _do_tzset(tls *TLS) { * pathame beginning with "."; in secure mode, only the * standard path will be searched. */ if !(posix_form != 0) { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { *(*uintptr)(unsafe.Pointer(bp + 288))++ } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { if !(X__libc.Fsecure != 0) || !(Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), __ccgo_ts+1573) != 0) { map1 = X__map_file(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), uintptr(unsafe.Pointer(&_map_size))) } @@ -149051,7 +149049,7 @@ func _do_tzset(tls *TLS) { _zi = map1 if map1 != 0 { scale = int32(2) - if int32(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { *(*[6]uint8)(unsafe.Pointer(bp)) = [6]uint8{ 0: uint8(1), 1: uint8(1), @@ -149070,10 +149068,10 @@ func _do_tzset(tls *TLS) { _types = _index + uintptr(_zi_read32(tls, _trans-uintptr(12))) _abbrevs = _types + uintptr(uint32(6)*_zi_read32(tls, _trans-uintptr(8))) _abbrevs_end = _abbrevs + uintptr(_zi_read32(tls, _trans-uintptr(4))) - if int32(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint32(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint32(1))))) == int32('\n') { *(*uintptr)(unsafe.Pointer(bp + 288)) = _zi + uintptr(_map_size) - uintptr(2) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { break } goto _4 @@ -149098,11 +149096,11 @@ func _do_tzset(tls *TLS) { } if !(*(*uint8)(unsafe.Pointer(p1 + 4)) != 0) && !(Xtzname[0] != 0) { Xtzname[0] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - Xtimezone = int32(-_zi_read32(tls, p1)) + Xtimezone = Int32FromUint32(-_zi_read32(tls, p1)) } if *(*uint8)(unsafe.Pointer(p1 + 4)) != 0 && !(Xtzname[int32(1)] != 0) { Xtzname[int32(1)] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - _dst_off = int32(-_zi_read32(tls, p1)) + _dst_off = Int32FromUint32(-_zi_read32(tls, p1)) Xdaylight = int32(1) } goto _8 @@ -149133,7 +149131,7 @@ func _do_tzset(tls *TLS) { Xtzname[int32(1)] = uintptr(unsafe.Pointer(&_dst_name)) if _dst_name[0] != 0 { Xdaylight = int32(1) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { _dst_off = _getoff(tls, bp+288) } else { _dst_off = Xtimezone - int32(3600) @@ -149142,11 +149140,11 @@ func _do_tzset(tls *TLS) { Xdaylight = 0 _dst_off = Xtimezone } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r0))) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r12))) } @@ -149165,7 +149163,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { scale = int32(3) - BoolInt32(_trans == _zi+uintptr(44)) off = 0 a = uint32(0) - n = uint32((int32(_index) - int32(_trans)) >> scale) + n = Uint32FromInt32((int32(_index) - int32(_trans)) >> scale) if !(n != 0) { if alt != 0 { *(*Tsize_t)(unsafe.Pointer(alt)) = uint32(0) @@ -149179,12 +149177,12 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<> scale) + n = Uint32FromInt32((int32(_index) - int32(_trans)) >> scale) if a == n-uint32(1) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } if a == uint32(0) { x = uint64(_zi_read32(tls, _trans)) if scale == int32(3) { x = x<= uint32(int32(_abbrevs_end)-int32(_abbrevs))) { + if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint32(p)-uint32(_abbrevs) >= Uint32FromInt32(int32(_abbrevs_end)-int32(_abbrevs))) { p = __ccgo_ts } ___unlock(tls, uintptr(unsafe.Pointer(&_lock4))) @@ -149407,7 +149405,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { var centuries, cycles, leaps, leaps1, rem, y int32 var _ /* dummy at bp+0 */ int32 _, _, _, _, _, _ = centuries, cycles, leaps, leaps1, rem, y - if uint64(year)-uint64(2) <= uint64(136) { + if Uint64FromInt64(year)-uint64(2) <= uint64(136) { y = int32(year) leaps = (y - int32(68)) >> int32(2) if !((y-Int32FromInt32(68))&Int32FromInt32(3) != 0) { @@ -149456,7 +149454,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { *(*int32)(unsafe.Pointer(is_leap)) = 0 leaps1 = 0 } else { - leaps1 = int32(uint32(rem) / uint32(4)) + leaps1 = Int32FromUint32(Uint32FromInt32(rem) / uint32(4)) rem = int32(uint32(rem) % Uint32FromUint32(4)) *(*int32)(unsafe.Pointer(is_leap)) = BoolInt32(!(rem != 0)) } @@ -149540,7 +149538,7 @@ func Xclock_getcpuclockid(tls *TLS, pid Tpid_t, clk uintptr) (r int32) { var ret int32 var _ /* ts at bp+0 */ Ttimespec _, _ = id, ret - id = int32(uint32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) + id = Int32FromUint32(Uint32FromInt32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) ret = X__syscall2(tls, int32(SYS_clock_getres_time32), id, int32(bp)) if ret == -int32(EINVAL) { ret = -int32(ESRCH) @@ -149569,11 +149567,11 @@ func Xclock_getres(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { (*Ttimespec)(unsafe.Pointer(ts)).Ftv_sec = int64((*(*[2]int32)(unsafe.Pointer(bp)))[0]) (*Ttimespec)(unsafe.Pointer(ts)).Ftv_nsec = (*(*[2]int32)(unsafe.Pointer(bp)))[int32(1)] } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } /* If reaching this point, it's a 64-bit arch or time64-only * 32-bit arch and we can get result directly into timespec. */ - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_clock_getres_time32), clk, int32(ts)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_clock_getres_time32), clk, int32(ts)))) } func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { @@ -149591,7 +149589,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { r = X__syscall2(tls, int32(SYS_clock_gettime64), clk, int32(ts)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } r = X__syscall2(tls, int32(SYS_clock_gettime32), clk, int32(bp)) if r == -int32(ENOSYS) && clk == CLOCK_REALTIME { @@ -149603,7 +149601,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { (*Ttimespec)(unsafe.Pointer(ts)).Ftv_nsec = (*(*[2]int32)(unsafe.Pointer(bp)))[int32(1)] return r } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xclock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { @@ -149633,7 +149631,7 @@ func X__clock_nanosleep(tls *TLS, clk Tclockid_t, flags int32, req uintptr, rem s = (*Ttimespec)(unsafe.Pointer(req)).Ftv_sec ns = (*Ttimespec)(unsafe.Pointer(req)).Ftv_nsec r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, 1: int64(ns), @@ -149643,19 +149641,19 @@ func X__clock_nanosleep(tls *TLS, clk Tclockid_t, flags int32, req uintptr, rem if Bool(false) || r != -int32(ENOSYS) { return -r } - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v1 = uint64(s) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v1 = Uint64FromInt64(s) } else { - v1 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v1 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } - extra = s - int64(int32(v1)) - if !((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v2 = uint64(s) + extra = s - int64(Int32FromUint64(v1)) + if !((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v2 = Uint64FromInt64(s) } else { - v2 = uint64(0x7fffffff) + (0+uint64(s))>>int32(63) + v2 = uint64(0x7fffffff) + (0+Uint64FromInt64(s))>>int32(63) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ - 0: int32(v2), + 0: Int32FromUint64(v2), 1: ns, } if clk == CLOCK_REALTIME && !(flags != 0) { @@ -149691,7 +149689,7 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { s = (*Ttimespec)(unsafe.Pointer(ts)).Ftv_sec ns = (*Ttimespec)(unsafe.Pointer(ts)).Ftv_nsec r = -int32(ENOSYS) - if Bool(false) || !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + if Bool(false) || !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, 1: int64(ns), @@ -149699,16 +149697,16 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { r = X__syscall2(tls, int32(SYS_clock_settime64), clk, int32(bp)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } *(*[2]int32)(unsafe.Pointer(bp + 16)) = [2]int32{ 0: int32(s), 1: ns, } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_clock_settime32), clk, int32(bp+16)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_clock_settime32), clk, int32(bp+16)))) } func Xctime(tls *TLS, t uintptr) (r uintptr) { @@ -149773,7 +149771,7 @@ func Xftime(tls *TLS, tp uintptr) (r int32) { _ = v1 Xclock_gettime(tls, CLOCK_REALTIME, bp) (*Ttimeb)(unsafe.Pointer(tp)).Ftime = (*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec - (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = uint16((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int32(1000000)) + (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = Uint16FromInt32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int32(1000000)) v1 = Int16FromInt32(0) (*Ttimeb)(unsafe.Pointer(tp)).Fdstflag = v1 (*Ttimeb)(unsafe.Pointer(tp)).Ftimezone = v1 @@ -149975,7 +149973,7 @@ func Xnanosleep(tls *TLS, req uintptr, rem uintptr) (r int32) { trc("tls=%v req=%v rem=%v, (%v:)", tls, req, rem, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem))) + return X__syscall_ret(tls, Uint32FromInt32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem))) } func _is_leap(tls *TLS, y int32) (r int32) { @@ -149990,10 +149988,10 @@ func _is_leap(tls *TLS, y int32) (r int32) { func _week_num(tls *TLS, tm uintptr) (r int32) { var dec31, jan1, val int32 _, _, _ = dec31, jan1, val - val = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) /* If 1 Jan is just 1-3 days past Monday, * the previous week is also in this year. */ - if (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { + if (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { val++ } if !(val != 0) { @@ -150001,7 +149999,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 31 December of prev year a Thursday, * or Friday of a leap year, then the * prev year has 53 weeks. */ - dec31 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) + dec31 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) if dec31 == int32(4) || dec31 == int32(5) && _is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year%int32(400)-int32(1)) != 0 { val++ } @@ -150010,7 +150008,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 1 January is not a Thursday, and not * a Wednesday of a leap year, then this * year has only 52 weeks. */ - jan1 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) + jan1 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) if jan1 != int32(4) && (jan1 != int32(3) || !(_is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year) != 0)) { val = int32(1) } @@ -150036,13 +150034,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc def_pad = int32('0') switch f { case int32('a'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(ABDAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday goto nl_strcat case int32('A'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(DAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday @@ -150050,13 +150048,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('h'): fallthrough case int32('b'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(ABMON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon goto nl_strcat case int32('B'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(MON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon @@ -150155,7 +150153,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc d++ v5 = fmt fmt++ - *(*uint8)(unsafe.Pointer(v4)) = uint8(Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(v5))))) + *(*uint8)(unsafe.Pointer(v4)) = Uint8FromInt32(Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))))) goto _3 _3: ; @@ -150191,10 +150189,10 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc width = int32(1) goto number case int32('U'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) goto number case int32('W'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) goto number case int32('V'): val = int64(_week_num(tls, tm)) @@ -150218,7 +150216,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('Y'): val = int64((*Ttm)(unsafe.Pointer(tm)).Ftm_year) + int64(1900) if val >= int64(10000) { - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1674, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1674, VaList(bp+8, val))) return s } width = int32(4) @@ -150228,7 +150226,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc *(*Tsize_t)(unsafe.Pointer(l)) = uint32(0) return __ccgo_ts } - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1680, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int32(3600)*int32(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int32(3600)/int32(60)))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1680, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int32(3600)*int32(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int32(3600)/int32(60)))) return s case int32('Z'): if (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst < 0 { @@ -150253,13 +150251,13 @@ number: } switch v7 { case int32('-'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1687, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1687, VaList(bp+8, val))) case int32('_'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1692, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1692, VaList(bp+8, width, val))) case int32('0'): fallthrough default: - *(*Tsize_t)(unsafe.Pointer(l)) = uint32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1698, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint32FromInt32(Xsnprintf(tls, s, uint32(100), __ccgo_ts+1698, VaList(bp+8, width, val))) break } return s @@ -150311,7 +150309,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl *(*uint8)(unsafe.Pointer(s + uintptr(l))) = uint8(0) return l } - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { v2 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v2))) = *(*uint8)(unsafe.Pointer(f)) @@ -150319,12 +150317,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } f++ pad = 0 - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('_') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('0') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('_') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('0') { v3 = f f++ - pad = int32(*(*uint8)(unsafe.Pointer(v3))) + pad = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } - v4 = BoolInt32(int32(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) + v4 = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) plus = v4 if v4 != 0 { f++ @@ -150335,7 +150333,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint32(0) *(*uintptr)(unsafe.Pointer(bp + 104)) = f } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('C') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('F') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('G') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('Y') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('C') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('F') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('G') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('Y') { if !(width != 0) && *(*uintptr)(unsafe.Pointer(bp + 104)) != f { width = uint32(1) } @@ -150343,10 +150341,10 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint32(0) } f = *(*uintptr)(unsafe.Pointer(bp + 104)) - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('E') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('O') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('E') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('O') { f++ } - t = X__strftime_fmt_1(tls, bp+4, bp, int32(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) + t = X__strftime_fmt_1(tls, bp+4, bp, Int32FromUint8(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) if !(t != 0) { break } @@ -150354,12 +150352,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl /* Trim off any sign and leading zeros, then * count remaining digits to determine behavior * for the + flag. */ - if int32(*(*uint8)(unsafe.Pointer(t))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(t))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('-') { t++ *(*Tsize_t)(unsafe.Pointer(bp))-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(t))) == int32('0') && uint32(int32(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('0') && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { break } goto _5 @@ -150373,7 +150371,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } d = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { break } goto _6 @@ -150388,13 +150386,13 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width-- } else { if v9 = plus != 0; v9 { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('C') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) == int32('C') { v8 = int32(3) } else { v8 = int32(5) } } - if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= uint32(v8) { + if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= Uint32FromInt32(v8) { v10 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v10))) = uint8('+') @@ -150469,16 +150467,16 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(bp + 4)) = 0 *(*int32)(unsafe.Pointer(bp + 8)) = 0 for *(*uint8)(unsafe.Pointer(f)) != 0 { - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { - v1 = int32(*(*uint8)(unsafe.Pointer(f))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if v2 != 0 { for { if v8 = *(*uint8)(unsafe.Pointer(s)) != 0; v8 { - v5 = int32(*(*uint8)(unsafe.Pointer(s))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: } @@ -150491,7 +150489,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { s++ } } else { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(*(*uint8)(unsafe.Pointer(f))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) { return uintptr(0) } else { s++ @@ -150501,11 +150499,11 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { continue } f++ - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('+') { f++ } if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { - w = int32(Xstrtoul(tls, f, bp+12, int32(10))) + w = Int32FromUint32(Xstrtoul(tls, f, bp+12, int32(10))) f = *(*uintptr)(unsafe.Pointer(bp + 12)) } else { w = -int32(1) @@ -150513,7 +150511,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { adj = 0 v9 = f f++ - switch int32(*(*uint8)(unsafe.Pointer(v9))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) { case int32('A'): goto _10 case int32('a'): @@ -150665,8 +150663,8 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { _44: ; if v48 = *(*uint8)(unsafe.Pointer(s)) != 0; v48 { - v45 = int32(*(*uint8)(unsafe.Pointer(s))) - v46 = BoolInt32(v45 == int32(' ') || uint32(v45)-uint32('\t') < uint32(5)) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v46 = BoolInt32(v45 == int32(' ') || Uint32FromInt32(v45)-uint32('\t') < uint32(5)) goto _47 _47: } @@ -150775,7 +150773,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; v49 = s s++ - if int32(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { return uintptr(0) } goto _41 @@ -150796,28 +150794,28 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v51 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v51))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v51))) - int32('0') goto _50 _50: ; i *= int32(10) } - if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(range1) { + if Uint32FromInt32(*(*int32)(unsafe.Pointer(dest))-min) >= Uint32FromInt32(range1) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) -= adj switch int32(dest) - int32(tm) { - case int32(uint32(UintptrFromInt32(0) + 28)): + case Int32FromUint32(uint32(UintptrFromInt32(0) + 28)): } goto update goto numeric_digits numeric_digits: ; neg = 0 - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { s++ } else { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') { neg = int32(1) s++ } @@ -150834,7 +150832,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v54 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v54))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v54))) - int32('0') goto _52 _52: ; @@ -150953,9 +150951,9 @@ func Xtimer_getoverrun(tls *TLS, t Ttimer_t) (r int32) { _ = td if int32(t) < 0 { td = uintptr(uint32(t) << Int32FromInt32(1)) - t = uintptr(uint32(AtomicLoadPInt32(td+84) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint32FromInt32(AtomicLoadPInt32(td+84) & Int32FromInt32(INT_MAX))) } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_timer_getoverrun), int32(t)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_timer_getoverrun), int32(t)))) } func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r1 int32) { @@ -150971,14 +150969,14 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r1 int32) { _, _ = r, td if int32(t) < 0 { td = uintptr(uint32(t) << Int32FromInt32(1)) - t = uintptr(uint32(AtomicLoadPInt32(td+84) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint32FromInt32(AtomicLoadPInt32(td+84) & Int32FromInt32(INT_MAX))) } r = -int32(ENOSYS) if uint32(8) > uint32(4) { r = X__syscall2(tls, int32(SYS_timer_gettime64), int32(t), int32(val)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } r = X__syscall2(tls, int32(SYS_timer_gettime32), int32(t), int32(bp)) if !(r != 0) { @@ -150987,8 +150985,8 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r1 int32) { (*Titimerspec)(unsafe.Pointer(val)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp)))[int32(2)]) (*Titimerspec)(unsafe.Pointer(val)).Fit_value.Ftv_nsec = (*(*[4]int32)(unsafe.Pointer(bp)))[int32(3)] } - return X__syscall_ret(tls, uint32(r)) - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_timer_gettime32), int32(t), int32(val)))) + return X__syscall_ret(tls, Uint32FromInt32(r)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_timer_gettime32), int32(t), int32(val)))) } func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (r1 int32) { @@ -151005,14 +151003,14 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) _, _, _, _, _, _ = ins, is, r, td, vns, vs if int32(t) < 0 { td = uintptr(uint32(t) << Int32FromInt32(1)) - t = uintptr(uint32(AtomicLoadPInt32(td+84) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint32FromInt32(AtomicLoadPInt32(td+84) & Int32FromInt32(INT_MAX))) } is = (*Titimerspec)(unsafe.Pointer(val)).Fit_interval.Ftv_sec vs = (*Titimerspec)(unsafe.Pointer(val)).Fit_value.Ftv_sec ins = (*Titimerspec)(unsafe.Pointer(val)).Fit_interval.Ftv_nsec vns = (*Titimerspec)(unsafe.Pointer(val)).Fit_value.Ftv_nsec r = -int32(ENOSYS) - if Bool(false) || !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || Bool(uint32(8) > uint32(4)) && old != 0 { + if Bool(false) || !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || Bool(uint32(8) > uint32(4)) && old != 0 { *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, 1: int64(ins), @@ -151022,10 +151020,10 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) r = X__syscall4(tls, int32(SYS_timer_settime64), int32(t), flags, int32(bp), int32(old)) } if Bool(false) || r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EOPNOTSUPP))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EOPNOTSUPP))) } *(*[4]int32)(unsafe.Pointer(bp + 32)) = [4]int32{ 0: int32(is), @@ -151040,8 +151038,8 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (*Titimerspec)(unsafe.Pointer(old)).Fit_value.Ftv_sec = int64((*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(2)]) (*Titimerspec)(unsafe.Pointer(old)).Fit_value.Ftv_nsec = (*(*[4]int32)(unsafe.Pointer(bp + 48)))[int32(3)] } - return X__syscall_ret(tls, uint32(r)) - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_timer_settime32), int32(t), flags, int32(val), int32(old)))) + return X__syscall_ret(tls, Uint32FromInt32(r)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_timer_settime32), int32(t), flags, int32(val), int32(old)))) } type Ttms = struct { @@ -151149,7 +151147,7 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl if *(*Twchar_t)(unsafe.Pointer(f)) == uint32('-') || *(*Twchar_t)(unsafe.Pointer(f)) == uint32('_') || *(*Twchar_t)(unsafe.Pointer(f)) == uint32('0') { v3 = f f += 4 - pad = int32(*(*Twchar_t)(unsafe.Pointer(v3))) + pad = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(v3))) } v4 = BoolInt32(*(*Twchar_t)(unsafe.Pointer(f)) == Uint32FromUint8('+')) plus = v4 @@ -151168,12 +151166,12 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl if *(*Twchar_t)(unsafe.Pointer(f)) == uint32('E') || *(*Twchar_t)(unsafe.Pointer(f)) == uint32('O') { f += 4 } - t_mb = X__strftime_fmt_1(tls, bp+4, bp, int32(*(*Twchar_t)(unsafe.Pointer(f))), tm, loc, pad) + t_mb = X__strftime_fmt_1(tls, bp+4, bp, Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(f))), tm, loc, pad) if !(t_mb != 0) { break } *(*Tsize_t)(unsafe.Pointer(bp)) = Xmbstowcs(tls, bp+104, t_mb, Uint32FromInt64(400)/Uint32FromInt64(4)) - if *(*Tsize_t)(unsafe.Pointer(bp)) == uint32(-Int32FromInt32(1)) { + if *(*Tsize_t)(unsafe.Pointer(bp)) == Uint32FromInt32(-Int32FromInt32(1)) { return uint32(0) } t = bp + 104 @@ -151262,7 +151260,7 @@ func Xaccess(tls *TLS, filename uintptr, amode int32) (r int32) { trc("tls=%v filename=%v amode=%v, (%v:)", tls, filename, amode, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_access), int32(filename), amode))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_access), int32(filename), amode))) } func Xacct(tls *TLS, filename uintptr) (r int32) { @@ -151270,7 +151268,7 @@ func Xacct(tls *TLS, filename uintptr) (r int32) { trc("tls=%v filename=%v, (%v:)", tls, filename, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_acct), int32(filename)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_acct), int32(filename)))) } func Xalarm(tls *TLS, seconds uint32) (r uint32) { @@ -151284,12 +151282,12 @@ func Xalarm(tls *TLS, seconds uint32) (r uint32) { var _ /* old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_value: Ttimeval{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), }, } *(*Titimerval)(unsafe.Pointer(bp + 32)) = Titimerval{} Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) } func Xchdir(tls *TLS, path uintptr) (r int32) { @@ -151297,7 +151295,7 @@ func Xchdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_chdir), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_chdir), int32(path)))) } func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { @@ -151305,7 +151303,7 @@ func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_chown32), int32(path), int32(uid), int32(gid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_chown32), int32(path), Int32FromUint32(uid), Int32FromUint32(gid)))) } func _dummy12(tls *TLS, fd int32) (r int32) { @@ -151324,7 +151322,7 @@ func Xclose(tls *TLS, fd int32) (r1 int32) { if r == -int32(EINTR) { r = 0 } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xctermid(tls *TLS, s uintptr) (r uintptr) { @@ -151347,7 +151345,7 @@ func Xdup(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_dup), fd))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_dup), fd))) } func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { @@ -151364,7 +151362,7 @@ func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { break } } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { @@ -151375,7 +151373,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { var r, v1, v2 int32 _, _, _ = r, v1, v2 if old == new1 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } if flags != 0 { for { @@ -151386,10 +151384,10 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { } } if r != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } if flags & ^Int32FromInt32(O_CLOEXEC) != 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } } for { @@ -151402,7 +151400,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { if r >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int32(SYS_fcntl64), new1, Int32FromInt32(F_SETFD), Int32FromInt32(FD_CLOEXEC)) } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xdup3(tls *TLS, old int32, new1 int32, flags int32) (r int32) { @@ -151431,7 +151429,7 @@ func _checker(tls *TLS, p uintptr) (r int32) { X__syscall1(tls, int32(SYS_exit), Int32FromInt32(1)) } *(*int32)(unsafe.Pointer(bp)) = X__syscall4(tls, int32(SYS_faccessat), (*Tctx1)(unsafe.Pointer(c)).Ffd, int32((*Tctx1)(unsafe.Pointer(c)).Ffilename), (*Tctx1)(unsafe.Pointer(c)).Famode, Int32FromInt32(0)) - X__syscall3(tls, int32(SYS_write), (*Tctx1)(unsafe.Pointer(c)).Fp, int32(bp), int32(Uint32FromInt64(4))) + X__syscall3(tls, int32(SYS_write), (*Tctx1)(unsafe.Pointer(c)).Fp, int32(bp), Int32FromUint32(Uint32FromInt64(4))) return 0 } @@ -151445,13 +151443,13 @@ func Xfaccessat(tls *TLS, fd int32, filename uintptr, amode int32, flag int32) ( if flag != 0 { ret = X__syscall4(tls, int32(SYS_faccessat2), fd, int32(filename), amode, flag) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } } if flag & ^Int32FromInt32(AT_EACCESS) != 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_faccessat), fd, int32(filename), amode))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_faccessat), fd, int32(filename), amode))) } func Xfchdir(tls *TLS, fd int32) (r int32) { @@ -151466,10 +151464,10 @@ func Xfchdir(tls *TLS, fd int32) (r int32) { _ = ret ret = X__syscall1(tls, int32(SYS_fchdir), fd) if ret != -int32(EBADF) || X__syscall2(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_GETFD)) < 0 { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } - X__procfdname(tls, bp, uint32(fd)) - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_chdir), int32(bp)))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_chdir), int32(bp)))) } func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { @@ -151482,12 +151480,12 @@ func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = X__syscall3(tls, int32(SYS_fchown32), fd, int32(uid), int32(gid)) + ret = X__syscall3(tls, int32(SYS_fchown32), fd, Int32FromUint32(uid), Int32FromUint32(gid)) if ret != -int32(EBADF) || X__syscall2(tls, int32(SYS_fcntl64), fd, Int32FromInt32(F_GETFD)) < 0 { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } - X__procfdname(tls, bp, uint32(fd)) - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_chown32), int32(bp), int32(uid), int32(gid)))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_chown32), int32(bp), Int32FromUint32(uid), Int32FromUint32(gid)))) } func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag int32) (r int32) { @@ -151495,7 +151493,7 @@ func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag in trc("tls=%v fd=%v path=%v uid=%v gid=%v flag=%v, (%v:)", tls, fd, path, uid, gid, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_fchownat), fd, int32(path), int32(uid), int32(gid), flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_fchownat), fd, int32(path), Int32FromUint32(uid), Int32FromUint32(gid), flag))) } func Xfdatasync(tls *TLS, fd int32) (r int32) { @@ -151503,7 +151501,7 @@ func Xfdatasync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_fdatasync), fd, 0, 0, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_fdatasync), fd, 0, 0, 0, 0, 0))) } func Xfsync(tls *TLS, fd int32) (r int32) { @@ -151511,15 +151509,7 @@ func Xfsync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_fsync), fd, 0, 0, 0, 0, 0))) -} - -func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { - if __ccgo_strace { - trc("tls=%v fd=%v length=%v, (%v:)", tls, fd, length, origin(2)) - defer func() { trc("-> %v", r) }() - } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_ftruncate64), fd, int32(length)))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_fsync), fd, 0, 0, 0, 0, 0))) } func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { @@ -151537,7 +151527,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { } else { v2 = int32(PATH_MAX) } - v1 = uint32(v2) + v1 = Uint32FromInt32(v2) tmp = Xrealloc(tls, tmp, v1) if !(buf != 0) { buf = tmp @@ -151548,11 +151538,11 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { return uintptr(0) } } - ret = X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_getcwd), int32(buf), int32(size)))) + ret = X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_getcwd), int32(buf), Int32FromUint32(size)))) if ret < 0 { return uintptr(0) } - if ret == 0 || int32(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { + if ret == 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOENT) return uintptr(0) } @@ -151569,7 +151559,7 @@ func Xgetegid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int32(SYS_getegid32))) + return Uint32FromInt32(X__syscall0(tls, int32(SYS_getegid32))) } func Xgeteuid(tls *TLS) (r Tuid_t) { @@ -151577,7 +151567,7 @@ func Xgeteuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int32(SYS_geteuid32))) + return Uint32FromInt32(X__syscall0(tls, int32(SYS_geteuid32))) } func Xgetgid(tls *TLS) (r Tgid_t) { @@ -151585,7 +151575,7 @@ func Xgetgid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int32(SYS_getgid32))) + return Uint32FromInt32(X__syscall0(tls, int32(SYS_getgid32))) } func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { @@ -151593,7 +151583,7 @@ func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { trc("tls=%v count=%v list=%v, (%v:)", tls, count, list, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_getgroups32), count, int32(list)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_getgroups32), count, int32(list)))) } func Xgethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -151665,7 +151655,7 @@ func Xgetpgid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_getpgid), pid))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_getpgid), pid))) } func Xgetpgrp(tls *TLS) (r Tpid_t) { @@ -151697,7 +151687,7 @@ func Xgetsid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_getsid), pid))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_getsid), pid))) } func Xgetuid(tls *TLS) (r Tuid_t) { @@ -151705,7 +151695,7 @@ func Xgetuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int32(SYS_getuid32))) + return Uint32FromInt32(X__syscall0(tls, int32(SYS_getuid32))) } func Xisatty(tls *TLS, fd int32) (r1 int32) { @@ -151718,7 +151708,7 @@ func Xisatty(tls *TLS, fd int32) (r1 int32) { var r uint32 var _ /* wsz at bp+0 */ Twinsize _ = r - r = uint32(X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCGWINSZ), int32(bp))))) + r = Uint32FromInt32(X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_ioctl), fd, Int32FromInt32(TIOCGWINSZ), int32(bp))))) if r == uint32(0) { return int32(1) } @@ -151733,7 +151723,7 @@ func Xlchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_lchown32), int32(path), int32(uid), int32(gid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_lchown32), int32(path), Int32FromUint32(uid), Int32FromUint32(gid)))) } func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { @@ -151741,7 +151731,7 @@ func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_link), int32(existing), int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_link), int32(existing), int32(new1)))) } func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, flag int32) (r int32) { @@ -151749,7 +151739,7 @@ func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, fla trc("tls=%v fd1=%v existing=%v fd2=%v new1=%v flag=%v, (%v:)", tls, fd1, existing, fd2, new1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS_linkat), fd1, int32(existing), fd2, int32(new1), flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS_linkat), fd1, int32(existing), fd2, int32(new1), flag))) } func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151762,7 +151752,7 @@ func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { var v1 int64 var _ /* result at bp+0 */ Toff_t _ = v1 - if X__syscall_ret(tls, uint32(X__syscall5(tls, int32(SYS__llseek), fd, int32(offset>>Int32FromInt32(32)), int32(offset), int32(bp), whence))) != 0 { + if X__syscall_ret(tls, Uint32FromInt32(X__syscall5(tls, int32(SYS__llseek), fd, int32(offset>>Int32FromInt32(32)), int32(offset), int32(bp), whence))) != 0 { v1 = int64(-int32(1)) } else { v1 = *(*Toff_t)(unsafe.Pointer(bp)) @@ -151813,7 +151803,7 @@ func Xpause(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pause), 0, 0, 0, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pause), 0, 0, 0, 0, 0, 0))) } func Xpipe(tls *TLS, fd uintptr) (r int32) { @@ -151821,7 +151811,7 @@ func Xpipe(tls *TLS, fd uintptr) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_pipe), int32(fd)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_pipe), int32(fd)))) } func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { @@ -151836,10 +151826,10 @@ func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { } ret = X__syscall2(tls, int32(SYS_pipe2), int32(fd), flag) if ret != -int32(ENOSYS) { - return X__syscall_ret(tls, uint32(ret)) + return X__syscall_ret(tls, Uint32FromInt32(ret)) } if flag & ^(Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)) != 0 { - return X__syscall_ret(tls, uint32(-Int32FromInt32(EINVAL))) + return X__syscall_ret(tls, Uint32FromInt32(-Int32FromInt32(EINVAL))) } ret = Xpipe(tls, fd) if ret != 0 { @@ -151864,28 +151854,12 @@ func Xposix_close(tls *TLS, fd int32, flags int32) (r int32) { return Xclose(tls, fd) } -func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { - if __ccgo_strace { - trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) - defer func() { trc("-> %v", r) }() - } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pread64), fd, int32(buf), int32(size), int32(ofs), 0, 0))) -} - func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { if __ccgo_strace { trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_preadv), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) -} - -func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { - if __ccgo_strace { - trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) - defer func() { trc("-> %v", r) }() - } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pwrite64), fd, int32(buf), int32(size), int32(ofs), 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_preadv), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) } func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151893,15 +151867,7 @@ func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_pwritev), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) -} - -func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { - if __ccgo_strace { - trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) - defer func() { trc("-> %v", r) }() - } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_read), fd, int32(buf), int32(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_pwritev), fd, int32(iov), count, int32(ofs), int32(ofs>>Int32FromInt32(32)), 0))) } func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151918,11 +151884,11 @@ func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_ buf = bp bufsize = uint32(1) } - r = X__syscall3(tls, int32(SYS_readlink), int32(path), int32(buf), int32(bufsize)) + r = X__syscall3(tls, int32(SYS_readlink), int32(path), int32(buf), Int32FromUint32(bufsize)) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151939,11 +151905,11 @@ func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) buf = bp bufsize = uint32(1) } - r = X__syscall4(tls, int32(SYS_readlinkat), fd, int32(path), int32(buf), int32(bufsize)) + r = X__syscall4(tls, int32(SYS_readlinkat), fd, int32(path), int32(buf), Int32FromUint32(bufsize)) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint32(r)) + return X__syscall_ret(tls, Uint32FromInt32(r)) } func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151951,7 +151917,7 @@ func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_readv), fd, int32(iov), count, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_readv), fd, int32(iov), count, 0, 0, 0))) } func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r int32) { @@ -151959,7 +151925,7 @@ func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r trc("tls=%v oldfd=%v old=%v newfd=%v new1=%v, (%v:)", tls, oldfd, old, newfd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall4(tls, int32(SYS_renameat), oldfd, int32(old), newfd, int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall4(tls, int32(SYS_renameat), oldfd, int32(old), newfd, int32(new1)))) } func Xrmdir(tls *TLS, path uintptr) (r int32) { @@ -151967,7 +151933,7 @@ func Xrmdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_rmdir), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_rmdir), int32(path)))) } func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { @@ -151975,7 +151941,7 @@ func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setgid32), int32(gid), 0, 0) + return X__setxid(tls, int32(SYS_setgid32), Int32FromUint32(gid), 0, 0) } func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { @@ -151983,7 +151949,7 @@ func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { trc("tls=%v pid=%v pgid=%v, (%v:)", tls, pid, pgid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_setpgid), pid, pgid))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_setpgid), pid, pgid))) } func Xsetpgrp(tls *TLS) (r Tpid_t) { @@ -151999,7 +151965,7 @@ func Xsetsid(tls *TLS) (r Tpid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall0(tls, int32(SYS_setsid)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall0(tls, int32(SYS_setsid)))) } func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { @@ -152007,7 +151973,7 @@ func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setuid32), int32(uid), 0, 0) + return X__setxid(tls, int32(SYS_setuid32), Int32FromUint32(uid), 0, 0) } type Tctx2 = struct { @@ -152063,7 +152029,7 @@ func X__setxid(tls *TLS, nr int32, id int32, eid int32, sid int32) (r int32) { } else { v1 = (*(*Tctx2)(unsafe.Pointer(bp))).Fret } - return X__syscall_ret(tls, uint32(v1)) + return X__syscall_ret(tls, Uint32FromInt32(v1)) } func Xsleep(tls *TLS, seconds uint32) (r uint32) { @@ -152075,10 +152041,10 @@ func Xsleep(tls *TLS, seconds uint32) (r uint32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), } if Xnanosleep(tls, bp, bp) != 0 { - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) } return uint32(0) } @@ -152088,7 +152054,7 @@ func Xsymlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_symlink), int32(existing), int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_symlink), int32(existing), int32(new1)))) } func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { @@ -152096,7 +152062,7 @@ func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { trc("tls=%v existing=%v fd=%v new1=%v, (%v:)", tls, existing, fd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_symlinkat), int32(existing), fd, int32(new1)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_symlinkat), int32(existing), fd, int32(new1)))) } func Xsync(tls *TLS) { @@ -152137,7 +152103,7 @@ func Xtruncate(tls *TLS, path uintptr, length Toff_t) (r int32) { trc("tls=%v path=%v length=%v, (%v:)", tls, path, length, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_truncate64), int32(path), int32(length)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall2(tls, int32(SYS_truncate64), int32(path), int32(length)))) } /* Support signed or unsigned plain-char */ @@ -152182,12 +152148,12 @@ func Xttyname_r(tls *TLS, fd int32, name uintptr, size Tsize_t) (r int32) { if !(Xisatty(tls, fd) != 0) { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } - X__procfdname(tls, bp+304, uint32(fd)) + X__procfdname(tls, bp+304, Uint32FromInt32(fd)) l = Xreadlink(tls, bp+304, name, size) if l < 0 { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } else { - if uint32(l) == size { + if Uint32FromInt32(l) == size { return int32(ERANGE) } } @@ -152212,14 +152178,14 @@ func Xualarm(tls *TLS, value uint32, interval uint32) (r uint32) { var _ /* it_old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_interval: Ttimeval{ - Ftv_usec: int64(interval), + Ftv_usec: Int64FromUint32(interval), }, Fit_value: Ttimeval{ - Ftv_usec: int64(value), + Ftv_usec: Int64FromUint32(value), }, } Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) } func Xunlink(tls *TLS, path uintptr) (r int32) { @@ -152227,7 +152193,7 @@ func Xunlink(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall1(tls, int32(SYS_unlink), int32(path)))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall1(tls, int32(SYS_unlink), int32(path)))) } func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { @@ -152235,7 +152201,7 @@ func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { trc("tls=%v fd=%v path=%v flag=%v, (%v:)", tls, fd, path, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(X__syscall3(tls, int32(SYS_unlinkat), fd, int32(path), flag))) + return X__syscall_ret(tls, Uint32FromInt32(X__syscall3(tls, int32(SYS_unlinkat), fd, int32(path), flag))) } func Xusleep(tls *TLS, useconds uint32) (r int32) { @@ -152247,26 +152213,18 @@ func Xusleep(tls *TLS, useconds uint32) (r int32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(useconds / uint32(1000000)), - Ftv_nsec: int32(useconds % uint32(1000000) * uint32(1000)), + Ftv_sec: Int64FromUint32(useconds / uint32(1000000)), + Ftv_nsec: Int32FromUint32(useconds % uint32(1000000) * uint32(1000)), } return Xnanosleep(tls, bp, bp) } -func Xwrite(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { - if __ccgo_strace { - trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) - defer func() { trc("-> %v", r) }() - } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_write), fd, int32(buf), int32(count), 0, 0, 0))) -} - func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { if __ccgo_strace { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_writev), fd, int32(iov), count, 0, 0, 0))) + return X__syscall_ret(tls, Uint32FromInt32(___syscall_cp(tls, int32(SYS_writev), fd, int32(iov), count, 0, 0, 0))) } type Ttime32_t = int32 @@ -153849,22 +153807,22 @@ var X__fsmu8 = [51]Tuint32_t{ 11: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x0), 31: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x1), 32: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x2), @@ -156557,7 +156515,7 @@ var Xsigngam int32 var X__stack_chk_guard Tuintptr_t var X__stderr_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf5)) + uintptr(UNGET), Ffd: int32(2), Flock: -int32(1), @@ -156567,7 +156525,7 @@ var X__stderr_FILE = TFILE{ var X__stderr_used = uintptr(unsafe.Pointer(&X__stderr_FILE)) var X__stdin_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), Fbuf: uintptr(unsafe.Pointer(&_buf6)) + uintptr(UNGET), Fbuf_size: Uint32FromInt64(1032) - Uint32FromInt32(UNGET), Flock: -int32(1), @@ -156578,7 +156536,7 @@ var X__stdin_used = uintptr(unsafe.Pointer(&X__stdin_FILE)) var X__stdio_ofl_lockptr = uintptr(unsafe.Pointer(&_ofl_lock)) var X__stdout_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf7)) + uintptr(UNGET), Fbuf_size: Uint32FromInt64(1032) - Uint32FromInt32(UNGET), Ffd: int32(1), diff --git a/vendor/modernc.org/libc/ccgo_linux_arm64.go b/vendor/modernc.org/libc/ccgo_linux_arm64.go index 1bfa897e..73a58c56 100644 --- a/vendor/modernc.org/libc/ccgo_linux_arm64.go +++ b/vendor/modernc.org/libc/ccgo_linux_arm64.go @@ -9,10 +9,8 @@ import ( "unsafe" ) -var ( - _ reflect.Type - _ unsafe.Pointer -) +var _ reflect.Type +var _ unsafe.Pointer const BIG_ENDIAN = 4321 const BYTE_ORDER = 1234 @@ -564,8 +562,8 @@ func ___frexp_exp(tls *TLS, x float64, expt uintptr) (r float64) { */ exp_x = Xexp(tls, x-_kln2) hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&exp_x)) >> int32(32)) - *(*int32)(unsafe.Pointer(expt)) = int32(hx>>Int32FromInt32(20) - uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) - v1 = uint64(hx&Uint32FromInt32(0xfffff)|uint32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(20) - Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) + v1 = uint64(hx&Uint32FromInt32(0xfffff)|Uint32FromInt32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) - v1 = hx&uint32(0x7fffff) | uint32((Int32FromInt32(0x7f)+Int32FromInt32(127))<>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) + v1 = hx&uint32(0x7fffff) | Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(127))<> Int32FromInt32(63)) + zineg = Int32FromUint64(v1 >> Int32FromInt32(63)) z = Xcacos(tls, z) if zineg != 0 { v3 = [2]float64{ @@ -792,7 +790,7 @@ func Xcacoshf(tls *TLS, z complex64) (r complex64) { v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: - zineg = int32(v1 >> Int32FromInt32(31)) + zineg = Int32FromUint32(v1 >> Int32FromInt32(31)) z = Xcacosf(tls, z) if zineg != 0 { v3 = [2]float32{ @@ -1173,11 +1171,11 @@ func Xccosh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -1334,8 +1332,8 @@ func Xccoshf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -1929,11 +1927,11 @@ func Xcsinh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -2091,8 +2089,8 @@ func Xcsinhf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -2287,7 +2285,7 @@ _9: v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v12 = [2]float64{ 0: Xfabs(tls, b-b), 1: Xcopysign(tls, a, b), @@ -2407,7 +2405,7 @@ _9: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v12 = [2]float32{ 0: Xfabsf(tls, b-b), 1: Xcopysignf(tls, a, b), @@ -3169,14 +3167,14 @@ func Xconfstr(tls *TLS, name int32, buf uintptr, len1 Tsize_t) (r Tsize_t) { if !(name != 0) { s = __ccgo_ts + 1 } else { - if uint32(name) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { + if Uint32FromInt32(name) & ^Uint32FromUint32(4) != uint32(1) && Uint32FromInt32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uint64(0) } } // snprintf is overkill but avoid wasting code size to implement // this completely useless function and its truncation semantics - return uint64(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) + return Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) } const ARG_MAX = 131072 @@ -3294,7 +3292,7 @@ func Xfpathconf(tls *TLS, fd int32, name int32) (r int64) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { + if Uint64FromInt32(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -7380,7 +7378,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { var _ /* set at bp+16 */ [128]uint8 var _ /* si at bp+144 */ Tsysinfo _, _, _, _, _, _, _, _ = cnt, i, mem, val, v1, v3, v6, p5 - if uint64(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { + if Uint64FromInt32(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } else { @@ -7397,11 +7395,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v1 = (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur } - return int64(v1) + return Int64FromUint64(v1) } } } - switch int32(uint8(_values1[name])) { + switch Int32FromUint8(Uint8FromInt16(_values1[name])) { case (-Int32FromInt32(256) | Int32FromInt32(1)) & Int32FromInt32(255): return int64(200809) case (-Int32FromInt32(256) | Int32FromInt32(2)) & Int32FromInt32(255): @@ -7409,7 +7407,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { case (-Int32FromInt32(256) | Int32FromInt32(3)) & Int32FromInt32(255): return int64(MQ_PRIO_MAX) case (-Int32FromInt32(256) | Int32FromInt32(4)) & Int32FromInt32(255): - return int64(X__libc.Fpage_size) + return Int64FromUint64(X__libc.Fpage_size) case (-Int32FromInt32(256) | Int32FromInt32(5)) & Int32FromInt32(255): return int64(SEM_VALUE_MAX) case (-Int32FromInt32(256) | Int32FromInt32(11)) & Int32FromInt32(255): @@ -7420,12 +7418,12 @@ func Xsysconf(tls *TLS, name int32) (r int64) { *(*[128]uint8)(unsafe.Pointer(bp + 16)) = [128]uint8{ 0: uint8(1), } - X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), int64(Uint64FromInt64(128)), int64(bp+16)) + X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), Int64FromUint64(Uint64FromInt64(128)), int64(bp+16)) v3 = Int32FromInt32(0) cnt = v3 i = v3 for { - if !(uint64(i) < uint64(128)) { + if !(Uint64FromInt32(i) < uint64(128)) { break } for { @@ -7436,7 +7434,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { _4: ; p5 = bp + 16 + uintptr(i) - *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (int32((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (Int32FromUint8((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) cnt++ } goto _2 @@ -7464,11 +7462,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v6 = mem } - return int64(v6) + return Int64FromUint64(v6) case (-Int32FromInt32(256) | Int32FromInt32(12)) & Int32FromInt32(255): fallthrough case (-Int32FromInt32(256) | Int32FromInt32(13)) & Int32FromInt32(255): - val = int64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) + val = Int64FromUint64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) if val < int64(MINSIGSTKSZ) { val = int64(MINSIGSTKSZ) } @@ -9098,14 +9096,14 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags * Prefix "$2x$": bug = 1, safety = 0 * Prefix "$2y$": bug = 0, safety = 0 */ - bug = uint32(int32(flags) & int32(1)) + bug = Uint32FromInt32(Int32FromUint8(flags) & int32(1)) safety = uint32(flags) & uint32(2) << int32(15) v1 = Uint32FromInt32(0) diff = v1 sign = v1 i = uint32(0) for { - if !(i < uint32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { + if !(i < Uint32FromInt32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { break } v3 = Uint32FromInt32(0) @@ -9119,7 +9117,7 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags *(*TBF_word)(unsafe.Pointer(bp)) <<= uint32(8) *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(*(*uint8)(unsafe.Pointer(ptr))) /* correct */ *(*TBF_word)(unsafe.Pointer(bp + 1*4)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(int8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ + *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= Uint32FromInt8(Int8FromUint8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ /* * Sign extension in the first char has no effect - nothing to overwrite yet, * and those extra 24 bits will be fully shifted out of the 32-bit word. For @@ -9199,15 +9197,15 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w } } _, _, _, _, _, _, _, _, _, _, _, _, _ = L, L1, R, count, done, i, ptr, tmp1, tmp2, tmp3, tmp4, v1, v6 - if int32(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { return UintptrFromInt32(0) } - count = Uint32FromInt32(1) << ((int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (int32(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) + count = Uint32FromInt32(1) << ((Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) if count < min || _BF_decode(tls, bp+4240, setting+7, int32(16)) != 0 { return UintptrFromInt32(0) } _BF_swap(tls, bp+4240, int32(4)) - _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) Xmemcpy(tls, bp+72, uintptr(unsafe.Pointer(&_BF_init_state))+72, uint64(4096)) L = uint32(0) R = uint32(0) @@ -9299,8 +9297,8 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w ; i += int32(2) } - Xmemcpy(tls, output, setting, uint64(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) - *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[int32(_BF_atoi64[int32(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] + Xmemcpy(tls, output, setting, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[Int32FromUint8(_BF_atoi64[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] /* This has to be bug-compatible with the original implementation, so * only encode 23 of the 24 bytes. :-) */ _BF_swap(tls, bp+4240, int32(6)) @@ -9364,14 +9362,14 @@ func X__crypt_blowfish(tls *TLS, key uintptr, setting uintptr, output uintptr) ( */ Xmemcpy(tls, bp, test_setting, uint64(30)) if retval != 0 { - flags = uint32(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + flags = uint32(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) test_hash = uintptr(unsafe.Pointer(&_test_hashes)) + uintptr(flags&uint32(1))*34 *(*uint8)(unsafe.Pointer(bp + 2)) = *(*uint8)(unsafe.Pointer(setting + 2)) } Xmemset(tls, bp+30, int32(0x55), uint64(63)) *(*uint8)(unsafe.Pointer(bp + 30 + uintptr(Uint64FromInt64(63)-Uint64FromInt32(1)))) = uint8(0) p = _BF_crypt(tls, test_key, bp, bp+30, uint32(1)) - ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, uint64(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, uint64(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) + ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, Uint64FromInt32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) k = __ccgo_ts + 58 _BF_set_key(tls, k, bp+96, bp+168, uint8(2)) /* $2a$ */ _BF_set_key(tls, k, bp+240, bp+312, uint8(4)) /* $2y$ */ @@ -11181,7 +11179,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { } } retval &= int32(0x3f) - return uint32(retval) + return Uint32FromInt32(retval) } // C documentation @@ -11191,7 +11189,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { // * containing characters that would violate the passwd file format. // */ func _ascii_is_unsafe(tls *TLS, ch uint8) (r int32) { - return BoolInt32(!(ch != 0) || int32(ch) == int32('\n') || int32(ch) == int32(':')) + return BoolInt32(!(ch != 0) || Int32FromUint8(ch) == int32('\n') || Int32FromUint8(ch) == int32(':')) } func _setup_salt(tls *TLS, salt Tuint32_t) (r Tuint32_t) { @@ -11442,13 +11440,13 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin for q <= bp+128+uintptr(Uint64FromInt64(8)-Uint64FromInt32(1)) { v1 = q q++ - *(*uint8)(unsafe.Pointer(v1)) = uint8(int32(*(*uint8)(unsafe.Pointer(key))) << int32(1)) + *(*uint8)(unsafe.Pointer(v1)) = Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(key))) << int32(1)) if *(*uint8)(unsafe.Pointer(key)) != 0 { key++ } } X__des_setkey(tls, bp+128, bp) - if int32(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { /* * "new"-style: * setting - underscore, 4 chars of count, 4 chars of salt @@ -11460,8 +11458,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(5)) { break } - value = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } count |= value << ((i - uint32(1)) * uint32(6)) @@ -11479,8 +11477,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(9)) { break } - value1 = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value1]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value1 = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value1]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } salt |= value1 << ((i - uint32(5)) * uint32(6)) @@ -11504,7 +11502,7 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin p4 = v5 v6 = key key++ - *(*uint8)(unsafe.Pointer(p4)) = uint8(int32(*(*uint8)(unsafe.Pointer(p4))) ^ int32(*(*uint8)(unsafe.Pointer(v6)))< uint32(KEY_MAX) { return uintptr(0) } @@ -11934,7 +11932,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt salt = setting + uintptr(3) i = uint32(0) for { - if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } goto _1 @@ -12022,7 +12020,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt if !(i < uint32(5)) { break } - p = _to64(tls, p, uint32(int32((*(*[16]uint8)(unsafe.Pointer(bp + 88)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm)) + uintptr(i)*3))])< uint32(KEY_MAX1) { return uintptr(0) } @@ -12451,7 +12449,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui return uintptr(0) } u = Xstrtoul(tls, salt, bp+224, int32(10)) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224))))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224))))) != int32('$') { return uintptr(0) } salt = *(*uintptr)(unsafe.Pointer(bp + 224)) + uintptr(1) @@ -12469,11 +12467,11 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui } i = uint32(0) for { - if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } /* reject characters that interfere with /etc/shadow parsing */ - if int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { return uintptr(0) } goto _1 @@ -12527,7 +12525,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha256_init(tls, bp) i = uint32(0) for { - if !(i < uint32(int32(16)+int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { + if !(i < Uint32FromInt32(int32(16)+Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { break } _sha256_update(tls, bp, salt, uint64(slen)) @@ -12574,13 +12572,13 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(10)) { break } - p = _to641(tls, p, uint32(int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm1)) + uintptr(i)*3))])<= 0) { break } - *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= uint32(int32(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j + *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j goto _2 _2: ; @@ -13404,134 +13402,134 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } var _table = [384]uint16{ - 128: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 129: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 130: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 131: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 132: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 133: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 134: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 135: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 136: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 137: uint16((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 138: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 139: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 140: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 141: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 142: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 143: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 144: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 145: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 146: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 147: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 148: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 149: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 150: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 151: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 152: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 153: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 154: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 155: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 156: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 157: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 158: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 159: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 160: uint16((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 161: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 162: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 163: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 164: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 165: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 166: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 167: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 168: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 169: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 170: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 171: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 172: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 173: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 174: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 175: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 176: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 177: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 178: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 179: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 180: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 181: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 182: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 183: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 184: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 185: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 186: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 187: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 188: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 189: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 190: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 191: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 192: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 193: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 194: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 195: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 196: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 197: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 198: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 199: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 200: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 201: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 202: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 203: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 204: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 205: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 206: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 207: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 208: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 209: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 210: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 211: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 212: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 213: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 214: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 215: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 216: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 217: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 218: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 219: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 220: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 221: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 222: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 223: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 224: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 225: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 226: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 227: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 228: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 229: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 230: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 231: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 232: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 233: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 234: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 235: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 236: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 237: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 238: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 239: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 240: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 241: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 242: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 243: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 244: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 245: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 246: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 247: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 248: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 249: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 250: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 251: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 252: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 253: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 254: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 255: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 128: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 129: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 130: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 131: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 132: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 133: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 134: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 135: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 136: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 137: Uint16FromInt32((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 138: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 139: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 140: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 141: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 142: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 143: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 144: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 145: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 146: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 147: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 148: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 149: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 150: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 151: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 152: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 153: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 154: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 155: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 156: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 157: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 158: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 159: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 160: Uint16FromInt32((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 161: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 162: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 163: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 164: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 165: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 166: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 167: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 168: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 169: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 170: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 171: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 172: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 173: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 174: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 175: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 176: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 177: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 178: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 179: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 180: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 181: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 182: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 183: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 184: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 185: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 186: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 187: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 188: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 189: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 190: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 191: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 192: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 193: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 194: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 195: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 196: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 197: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 198: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 199: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 200: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 201: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 202: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 203: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 204: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 205: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 206: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 207: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 208: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 209: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 210: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 211: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 212: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 213: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 214: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 215: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 216: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 217: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 218: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 219: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 220: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 221: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 222: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 223: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 224: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 225: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 226: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 227: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 228: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 229: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 230: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 231: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 232: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 233: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 234: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 235: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 236: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 237: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 238: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 239: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 240: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 241: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 242: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 243: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 244: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 245: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 246: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 247: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 248: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 249: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 250: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 251: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 252: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 253: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 254: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 255: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), } var _ptable = uintptr(unsafe.Pointer(&_table)) + uintptr(128)*2 @@ -13874,7 +13872,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) { } else { v1 = int32(1) } - return uint64(v1) + return Uint64FromInt32(v1) } var _table1 = [384]Tint32_t{ @@ -14162,7 +14160,7 @@ func Xisalnum(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0) + return BoolInt32(BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0) } func X__isalnum_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14186,7 +14184,7 @@ func Xisalpha(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14242,7 +14240,7 @@ func Xiscntrl(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c) < uint32(0x20) || c == int32(0x7f)) + return BoolInt32(Uint32FromInt32(c) < uint32(0x20) || c == int32(0x7f)) } func X__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14266,7 +14264,7 @@ func Xisdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('0') < uint32(10)) + return BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14290,7 +14288,7 @@ func Xisgraph(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) } func X__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14314,7 +14312,7 @@ func Xislower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14338,7 +14336,7 @@ func Xisprint(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x20) < uint32(0x5f)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14362,7 +14360,7 @@ func Xispunct(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) } func X__ispunct_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14386,7 +14384,7 @@ func Xisspace(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(c == int32(' ') || uint32(c)-uint32('\t') < uint32(5)) + return BoolInt32(c == int32(' ') || Uint32FromInt32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14410,7 +14408,7 @@ func Xisupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('A') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -17303,7 +17301,7 @@ func Xiswalpha(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table3[uint32(int32(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table3[Uint32FromInt32(Int32FromUint8(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } if wc < uint32(0x2fffe) { return int32(1) @@ -17332,7 +17330,7 @@ func Xiswblank(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return Xisblank(tls, int32(wc)) + return Xisblank(tls, Int32FromUint32(wc)) } func X__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32) { @@ -17436,8 +17434,8 @@ func Xwctype(tls *TLS, s uintptr) (r Twctype_t) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { - return uint64(i) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { + return Uint64FromInt32(i) } goto _1 _1: @@ -17571,10 +17569,10 @@ func Xiswprint(tls *TLS, wc Twint_t) (r int32) { if wc < uint32(0xff) { return BoolInt32((wc+uint32(1))&uint32(0x7f) >= uint32(0x21)) } - if wc < uint32(0x2028) || wc-uint32(0x202a) < uint32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < uint32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { + if wc < uint32(0x2028) || wc-uint32(0x202a) < Uint32FromInt32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < Uint32FromInt32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { return int32(1) } - if wc-uint32(0xfffc) > uint32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { + if wc-uint32(0xfffc) > Uint32FromInt32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { return 0 } return int32(1) @@ -19154,7 +19152,7 @@ func Xiswpunct(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table4[uint32(int32(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table4[Uint32FromInt32(Int32FromUint8(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } return 0 } @@ -19287,7 +19285,7 @@ func Xisxdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0 || Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -19322,7 +19320,7 @@ func Xtolower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('A') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) != 0 { return c | int32(32) } return c @@ -19349,7 +19347,7 @@ func Xtoupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('a') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) != 0 { return c & int32(0x5f) } return c @@ -22155,40 +22153,40 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { var b, rt, try, v, x, xb, xn, y uint32 var c0, r, rd, v1 int32 _, _, _, _, _, _, _, _, _, _, _, _ = b, c0, r, rd, rt, try, v, x, xb, xn, y, v1 - c0 = int32(c) + c0 = Int32FromUint32(c) if c >= uint32(0x20000) { - return int32(c) + return Int32FromUint32(c) } b = c >> int32(8) c &= uint32(255) x = c / uint32(3) y = c % uint32(3) /* lookup entry in two-level base-6 table */ - v = uint32(_tab1[uint32(int32(_tab1[b])*int32(86))+x]) - v = v * uint32(_mt[y]) >> int32(11) % uint32(6) + v = uint32(_tab1[Uint32FromInt32(Int32FromUint8(_tab1[b])*int32(86))+x]) + v = v * Uint32FromInt32(_mt[y]) >> int32(11) % uint32(6) /* use the bit vector out of the tables as an index into * a block-specific set of rules and decode the rule into * a type and a case-mapping delta. */ r = _rules[uint32(_rulebases[b])+v] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) /* rules 0/1 are simple lower/upper case with a delta. * apply according to desired mapping direction. */ if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* binary search. endpoints of the binary search for * this block are stored in the rule delta field. */ - xn = uint32(rd & int32(0xff)) - xb = uint32(rd) >> int32(8) + xn = Uint32FromInt32(rd & int32(0xff)) + xb = Uint32FromInt32(rd) >> int32(8) for xn != 0 { try = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2))) if try == c { r = _rules[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2 + 1))] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* Hard-coded for the four exceptional titlecase */ if dir != 0 { @@ -22220,7 +22218,7 @@ func Xtowlower(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, 0)) + return Uint32FromInt32(_casemap(tls, wc, 0)) } func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { @@ -22228,7 +22226,7 @@ func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, int32(1))) + return Uint32FromInt32(_casemap(tls, wc, int32(1))) } func X__towupper_l(tls *TLS, c Twint_t, l Tlocale_t) (r Twint_t) { @@ -24441,10 +24439,10 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { return v1 } if wc&uint32(0xfffeffff) < uint32(0xfffe) { - if int32(_table5[uint32(int32(_table5[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)])>>(wc&uint32(7))&int32(1) != 0 { + if Int32FromUint8(_table5[Uint32FromInt32(Int32FromUint8(_table5[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)])>>(wc&uint32(7))&int32(1) != 0 { return 0 } - if int32(_wtable[uint32(int32(_wtable[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)])>>(wc&uint32(7))&int32(1) != 0 { + if Int32FromUint8(_wtable[Uint32FromInt32(Int32FromUint8(_wtable[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)])>>(wc&uint32(7))&int32(1) != 0 { return int32(2) } return int32(1) @@ -24783,7 +24781,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { var len1 int32 _, _ = de, len1 if (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos >= (*TDIR)(unsafe.Pointer(dir)).Fbuf_end { - len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), int64(Uint64FromInt64(2048)))) + len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), Int64FromUint64(Uint64FromInt64(2048)))) if len1 <= 0 { if len1 < 0 && len1 != -int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = -len1 @@ -24794,7 +24792,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos = 0 } de = dir + 24 + uintptr((*TDIR)(unsafe.Pointer(dir)).Fbuf_pos) - *(*int32)(unsafe.Pointer(dir + 12)) += int32((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) + *(*int32)(unsafe.Pointer(dir + 12)) += Int32FromUint16((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) (*TDIR)(unsafe.Pointer(dir)).Ftell = (*Tdirent)(unsafe.Pointer(de)).Fd_off return de } @@ -24909,7 +24907,7 @@ func Xscandir(tls *TLS, path uintptr, res uintptr, sel uintptr, cmp uintptr) (r Xqsort(tls, names, cnt, uint64(8), cmp) } *(*uintptr)(unsafe.Pointer(res)) = names - return int32(cnt) + return Int32FromUint64(cnt) } func Xseekdir(tls *TLS, dir uintptr, off int64) { @@ -25037,14 +25035,14 @@ func Xgetenv(tls *TLS, name uintptr) (r uintptr) { var e uintptr var l Tsize_t _, _ = e, l - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if l != 0 && !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) && Xenviron != 0 { e = Xenviron for { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { return *(*uintptr)(unsafe.Pointer(e)) + uintptr(l) + uintptr(1) } goto _1 @@ -25127,7 +25125,7 @@ func Xputenv(tls *TLS, s uintptr) (r int32) { } var l Tsize_t _ = l - l = uint64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) + l = Uint64FromInt64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) if !(l != 0) || !(*(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0) { return Xunsetenv(tls, s) } @@ -25216,7 +25214,7 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) (r int32) { var v2 bool _, _, _, _, _ = l1, l2, s, v1, v2 if v2 = !(var1 != 0); !v2 { - v1 = uint64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) + v1 = Uint64FromInt64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) l1 = v1 } if v2 || !(v1 != 0) || *(*uint8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { @@ -25248,7 +25246,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { var e, eo, v2 uintptr var l Tsize_t _, _, _, _ = e, eo, l, v2 - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if !(l != 0) || *(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) @@ -25260,7 +25258,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { X__env_rm_add(tls, *(*uintptr)(unsafe.Pointer(e)), uintptr(0)) } else { if eo != e { @@ -25583,7 +25581,7 @@ func X__strerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { } var s uintptr _ = s - if uint64(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { + if Uint64FromInt32(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { e = 0 } s = uintptr(unsafe.Pointer(&_errmsgstr)) + uintptr(_errmsgidx[e]) @@ -25712,7 +25710,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { arg |= uint64(O_LARGEFILE) } if cmd == int32(F_SETLKW) { - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) } if cmd == int32(F_GETOWN) { ret = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETOWN_EX)), int64(bp))) @@ -25720,7 +25718,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))) } if ret != 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*(*Tf_owner_ex)(unsafe.Pointer(bp))).Ftype1 == int32(F_OWNER_PGRP) { v1 = -(*(*Tf_owner_ex)(unsafe.Pointer(bp))).Fpid @@ -25730,25 +25728,25 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return v1 } if cmd == int32(F_DUPFD_CLOEXEC) { - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), Int64FromUint64(arg))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(Int32FromInt32(0)))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall1(tls, int64(SYS_close), int64(ret1)) } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), Int64FromUint64(arg))) if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } switch cmd { case int32(F_SETLK): @@ -25758,9 +25756,9 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { case int32(F_GETOWN_EX): fallthrough case int32(F_SETOWN_EX): - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) default: - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(arg))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), Int64FromUint64(arg))))) } return r } @@ -25780,11 +25778,11 @@ func Xopen(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) { mode = VaUint32(&ap) _ = ap } - fd = int32(___syscall_cp(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0)) + fd = int32(___syscall_cp(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0)) if fd >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(fd))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd))) } func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r int32) { @@ -25801,7 +25799,7 @@ func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r i mode = VaUint32(&ap) _ = ap } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0)))) } func Xposix_fadvise(tls *TLS, fd int32, base Toff_t, len1 Toff_t, advice int32) (r int32) { @@ -25973,7 +25971,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -25984,18 +25982,18 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__shgetc(tls, f) } c = v4 - if uint32(c-int32('0')) >= uint32(10) && pok != 0 { + if Uint32FromInt32(c-int32('0')) >= uint32(10) && pok != 0 { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } } } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -26003,7 +26001,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } x = 0 for { - if !(uint32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { break } x = int32(10)*x + c - int32('0') @@ -26014,7 +26012,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v12 = f + 8 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__shgetc(tls, f) } @@ -26022,7 +26020,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } y = int64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { break } y = int64(10)*y + int64(c) - int64('0') @@ -26033,14 +26031,14 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 } for { - if !(uint32(c-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10)) { break } goto _17 @@ -26050,7 +26048,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v20 = f + 8 v19 = *(*uintptr)(unsafe.Pointer(v20)) *(*uintptr)(unsafe.Pointer(v20))++ - v18 = int32(*(*uint8)(unsafe.Pointer(v19))) + v18 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) } else { v18 = X__shgetc(tls, f) } @@ -26103,7 +26101,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } @@ -26115,7 +26113,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v8 = f + 8 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ - v6 = int32(*(*uint8)(unsafe.Pointer(v7))) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v7))) } else { v6 = X__shgetc(tls, f) } @@ -26133,7 +26131,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } @@ -26142,7 +26140,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0] = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || c == int32('.')) { break } if c == int32('.') { @@ -26158,9 +26156,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, lnz = int32(dc) } if j != 0 { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(c) - uint32('0') + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + Uint32FromInt32(c) - uint32('0') } else { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(c - int32('0')) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = Uint32FromInt32(c - int32('0')) } j++ v13 = j @@ -26184,7 +26182,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } @@ -26292,9 +26290,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % uint32(p10) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/uint32(p10) + carry - carry = uint32(int32(1000000000)/p10) * tmp + tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % Uint32FromInt32(p10) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/Uint32FromInt32(p10) + carry + carry = Uint32FromInt32(int32(1000000000)/p10) * tmp if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) rp -= int32(9) @@ -26381,9 +26379,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp2 = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] & uint32(int32(1)<>sh + carry2 - carry2 = uint32(Int32FromInt32(1000000000)>>sh) * tmp2 + carry2 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh) * tmp2 if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) i-- @@ -26516,7 +26514,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26534,7 +26532,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__shgetc(tls, f) } @@ -26546,7 +26544,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26565,7 +26563,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26574,7 +26572,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } } for { - if !(uint32(c-int32('0')) < uint32(10) || uint32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { break } if c == int32('.') { @@ -26591,7 +26589,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 d = c - int32('0') } if dc < int64(8) { - x = x*uint32(16) + uint32(d) + x = x*uint32(16) + Uint32FromInt32(d) } else { if dc < int64(Int32FromInt32(LDBL_MANT_DIG)/Int32FromInt32(4)+Int32FromInt32(1)) { scale /= Float64FromInt32(16) @@ -26612,7 +26610,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v18 = f + 8 v17 = *(*uintptr)(unsafe.Pointer(v18)) *(*uintptr)(unsafe.Pointer(v18))++ - v16 = int32(*(*uint8)(unsafe.Pointer(v17))) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) } else { v16 = X__shgetc(tls, f) } @@ -26732,14 +26730,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -26752,7 +26750,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26760,7 +26758,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { } i = uint64(0) for { - if !(i < uint64(8) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 247 + uintptr(i))))) { + if !(i < uint64(8) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 247 + uintptr(i))))) { break } if i < uint64(7) { @@ -26768,7 +26766,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26804,7 +26802,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { if !(i != 0) { i = uint64(0) for { - if !(i < uint64(3) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 256 + uintptr(i))))) { + if !(i < uint64(3) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 256 + uintptr(i))))) { break } if i < uint64(2) { @@ -26812,7 +26810,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v21 = f + 8 v20 = *(*uintptr)(unsafe.Pointer(v21)) *(*uintptr)(unsafe.Pointer(v21))++ - v19 = int32(*(*uint8)(unsafe.Pointer(v20))) + v19 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v20))) } else { v19 = X__shgetc(tls, f) } @@ -26829,7 +26827,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v24 = f + 8 v23 = *(*uintptr)(unsafe.Pointer(v24)) *(*uintptr)(unsafe.Pointer(v24))++ - v22 = int32(*(*uint8)(unsafe.Pointer(v23))) + v22 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) } else { v22 = X__shgetc(tls, f) } @@ -26845,12 +26843,12 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v29 = f + 8 v28 = *(*uintptr)(unsafe.Pointer(v29)) *(*uintptr)(unsafe.Pointer(v29))++ - v27 = int32(*(*uint8)(unsafe.Pointer(v28))) + v27 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) } else { v27 = X__shgetc(tls, f) } c = v27 - if uint32(c-int32('0')) < uint32(10) || uint32(c-int32('A')) < uint32(26) || uint32(c-int32('a')) < uint32(26) || c == int32('_') { + if Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c-int32('A')) < uint32(26) || Uint32FromInt32(c-int32('a')) < uint32(26) || c == int32('_') { goto _26 } if c == int32(')') { @@ -26895,7 +26893,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v36 = f + 8 v35 = *(*uintptr)(unsafe.Pointer(v36)) *(*uintptr)(unsafe.Pointer(v36))++ - v34 = int32(*(*uint8)(unsafe.Pointer(v35))) + v34 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v35))) } else { v34 = X__shgetc(tls, f) } @@ -26915,55 +26913,55 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { // // /* Lookup table for digit values. -1==255>=36 -> invalid */ var _table6 = [257]uint8{ - 0: uint8(-Int32FromInt32(1)), - 1: uint8(-Int32FromInt32(1)), - 2: uint8(-Int32FromInt32(1)), - 3: uint8(-Int32FromInt32(1)), - 4: uint8(-Int32FromInt32(1)), - 5: uint8(-Int32FromInt32(1)), - 6: uint8(-Int32FromInt32(1)), - 7: uint8(-Int32FromInt32(1)), - 8: uint8(-Int32FromInt32(1)), - 9: uint8(-Int32FromInt32(1)), - 10: uint8(-Int32FromInt32(1)), - 11: uint8(-Int32FromInt32(1)), - 12: uint8(-Int32FromInt32(1)), - 13: uint8(-Int32FromInt32(1)), - 14: uint8(-Int32FromInt32(1)), - 15: uint8(-Int32FromInt32(1)), - 16: uint8(-Int32FromInt32(1)), - 17: uint8(-Int32FromInt32(1)), - 18: uint8(-Int32FromInt32(1)), - 19: uint8(-Int32FromInt32(1)), - 20: uint8(-Int32FromInt32(1)), - 21: uint8(-Int32FromInt32(1)), - 22: uint8(-Int32FromInt32(1)), - 23: uint8(-Int32FromInt32(1)), - 24: uint8(-Int32FromInt32(1)), - 25: uint8(-Int32FromInt32(1)), - 26: uint8(-Int32FromInt32(1)), - 27: uint8(-Int32FromInt32(1)), - 28: uint8(-Int32FromInt32(1)), - 29: uint8(-Int32FromInt32(1)), - 30: uint8(-Int32FromInt32(1)), - 31: uint8(-Int32FromInt32(1)), - 32: uint8(-Int32FromInt32(1)), - 33: uint8(-Int32FromInt32(1)), - 34: uint8(-Int32FromInt32(1)), - 35: uint8(-Int32FromInt32(1)), - 36: uint8(-Int32FromInt32(1)), - 37: uint8(-Int32FromInt32(1)), - 38: uint8(-Int32FromInt32(1)), - 39: uint8(-Int32FromInt32(1)), - 40: uint8(-Int32FromInt32(1)), - 41: uint8(-Int32FromInt32(1)), - 42: uint8(-Int32FromInt32(1)), - 43: uint8(-Int32FromInt32(1)), - 44: uint8(-Int32FromInt32(1)), - 45: uint8(-Int32FromInt32(1)), - 46: uint8(-Int32FromInt32(1)), - 47: uint8(-Int32FromInt32(1)), - 48: uint8(-Int32FromInt32(1)), + 0: Uint8FromInt32(-Int32FromInt32(1)), + 1: Uint8FromInt32(-Int32FromInt32(1)), + 2: Uint8FromInt32(-Int32FromInt32(1)), + 3: Uint8FromInt32(-Int32FromInt32(1)), + 4: Uint8FromInt32(-Int32FromInt32(1)), + 5: Uint8FromInt32(-Int32FromInt32(1)), + 6: Uint8FromInt32(-Int32FromInt32(1)), + 7: Uint8FromInt32(-Int32FromInt32(1)), + 8: Uint8FromInt32(-Int32FromInt32(1)), + 9: Uint8FromInt32(-Int32FromInt32(1)), + 10: Uint8FromInt32(-Int32FromInt32(1)), + 11: Uint8FromInt32(-Int32FromInt32(1)), + 12: Uint8FromInt32(-Int32FromInt32(1)), + 13: Uint8FromInt32(-Int32FromInt32(1)), + 14: Uint8FromInt32(-Int32FromInt32(1)), + 15: Uint8FromInt32(-Int32FromInt32(1)), + 16: Uint8FromInt32(-Int32FromInt32(1)), + 17: Uint8FromInt32(-Int32FromInt32(1)), + 18: Uint8FromInt32(-Int32FromInt32(1)), + 19: Uint8FromInt32(-Int32FromInt32(1)), + 20: Uint8FromInt32(-Int32FromInt32(1)), + 21: Uint8FromInt32(-Int32FromInt32(1)), + 22: Uint8FromInt32(-Int32FromInt32(1)), + 23: Uint8FromInt32(-Int32FromInt32(1)), + 24: Uint8FromInt32(-Int32FromInt32(1)), + 25: Uint8FromInt32(-Int32FromInt32(1)), + 26: Uint8FromInt32(-Int32FromInt32(1)), + 27: Uint8FromInt32(-Int32FromInt32(1)), + 28: Uint8FromInt32(-Int32FromInt32(1)), + 29: Uint8FromInt32(-Int32FromInt32(1)), + 30: Uint8FromInt32(-Int32FromInt32(1)), + 31: Uint8FromInt32(-Int32FromInt32(1)), + 32: Uint8FromInt32(-Int32FromInt32(1)), + 33: Uint8FromInt32(-Int32FromInt32(1)), + 34: Uint8FromInt32(-Int32FromInt32(1)), + 35: Uint8FromInt32(-Int32FromInt32(1)), + 36: Uint8FromInt32(-Int32FromInt32(1)), + 37: Uint8FromInt32(-Int32FromInt32(1)), + 38: Uint8FromInt32(-Int32FromInt32(1)), + 39: Uint8FromInt32(-Int32FromInt32(1)), + 40: Uint8FromInt32(-Int32FromInt32(1)), + 41: Uint8FromInt32(-Int32FromInt32(1)), + 42: Uint8FromInt32(-Int32FromInt32(1)), + 43: Uint8FromInt32(-Int32FromInt32(1)), + 44: Uint8FromInt32(-Int32FromInt32(1)), + 45: Uint8FromInt32(-Int32FromInt32(1)), + 46: Uint8FromInt32(-Int32FromInt32(1)), + 47: Uint8FromInt32(-Int32FromInt32(1)), + 48: Uint8FromInt32(-Int32FromInt32(1)), 50: uint8(1), 51: uint8(2), 52: uint8(3), @@ -26973,13 +26971,13 @@ var _table6 = [257]uint8{ 56: uint8(7), 57: uint8(8), 58: uint8(9), - 59: uint8(-Int32FromInt32(1)), - 60: uint8(-Int32FromInt32(1)), - 61: uint8(-Int32FromInt32(1)), - 62: uint8(-Int32FromInt32(1)), - 63: uint8(-Int32FromInt32(1)), - 64: uint8(-Int32FromInt32(1)), - 65: uint8(-Int32FromInt32(1)), + 59: Uint8FromInt32(-Int32FromInt32(1)), + 60: Uint8FromInt32(-Int32FromInt32(1)), + 61: Uint8FromInt32(-Int32FromInt32(1)), + 62: Uint8FromInt32(-Int32FromInt32(1)), + 63: Uint8FromInt32(-Int32FromInt32(1)), + 64: Uint8FromInt32(-Int32FromInt32(1)), + 65: Uint8FromInt32(-Int32FromInt32(1)), 66: uint8(10), 67: uint8(11), 68: uint8(12), @@ -27006,12 +27004,12 @@ var _table6 = [257]uint8{ 89: uint8(33), 90: uint8(34), 91: uint8(35), - 92: uint8(-Int32FromInt32(1)), - 93: uint8(-Int32FromInt32(1)), - 94: uint8(-Int32FromInt32(1)), - 95: uint8(-Int32FromInt32(1)), - 96: uint8(-Int32FromInt32(1)), - 97: uint8(-Int32FromInt32(1)), + 92: Uint8FromInt32(-Int32FromInt32(1)), + 93: Uint8FromInt32(-Int32FromInt32(1)), + 94: Uint8FromInt32(-Int32FromInt32(1)), + 95: Uint8FromInt32(-Int32FromInt32(1)), + 96: Uint8FromInt32(-Int32FromInt32(1)), + 97: Uint8FromInt32(-Int32FromInt32(1)), 98: uint8(10), 99: uint8(11), 100: uint8(12), @@ -27038,139 +27036,139 @@ var _table6 = [257]uint8{ 121: uint8(33), 122: uint8(34), 123: uint8(35), - 124: uint8(-Int32FromInt32(1)), - 125: uint8(-Int32FromInt32(1)), - 126: uint8(-Int32FromInt32(1)), - 127: uint8(-Int32FromInt32(1)), - 128: uint8(-Int32FromInt32(1)), - 129: uint8(-Int32FromInt32(1)), - 130: uint8(-Int32FromInt32(1)), - 131: uint8(-Int32FromInt32(1)), - 132: uint8(-Int32FromInt32(1)), - 133: uint8(-Int32FromInt32(1)), - 134: uint8(-Int32FromInt32(1)), - 135: uint8(-Int32FromInt32(1)), - 136: uint8(-Int32FromInt32(1)), - 137: uint8(-Int32FromInt32(1)), - 138: uint8(-Int32FromInt32(1)), - 139: uint8(-Int32FromInt32(1)), - 140: uint8(-Int32FromInt32(1)), - 141: uint8(-Int32FromInt32(1)), - 142: uint8(-Int32FromInt32(1)), - 143: uint8(-Int32FromInt32(1)), - 144: uint8(-Int32FromInt32(1)), - 145: uint8(-Int32FromInt32(1)), - 146: uint8(-Int32FromInt32(1)), - 147: uint8(-Int32FromInt32(1)), - 148: uint8(-Int32FromInt32(1)), - 149: uint8(-Int32FromInt32(1)), - 150: uint8(-Int32FromInt32(1)), - 151: uint8(-Int32FromInt32(1)), - 152: uint8(-Int32FromInt32(1)), - 153: uint8(-Int32FromInt32(1)), - 154: uint8(-Int32FromInt32(1)), - 155: uint8(-Int32FromInt32(1)), - 156: uint8(-Int32FromInt32(1)), - 157: uint8(-Int32FromInt32(1)), - 158: uint8(-Int32FromInt32(1)), - 159: uint8(-Int32FromInt32(1)), - 160: uint8(-Int32FromInt32(1)), - 161: uint8(-Int32FromInt32(1)), - 162: uint8(-Int32FromInt32(1)), - 163: uint8(-Int32FromInt32(1)), - 164: uint8(-Int32FromInt32(1)), - 165: uint8(-Int32FromInt32(1)), - 166: uint8(-Int32FromInt32(1)), - 167: uint8(-Int32FromInt32(1)), - 168: uint8(-Int32FromInt32(1)), - 169: uint8(-Int32FromInt32(1)), - 170: uint8(-Int32FromInt32(1)), - 171: uint8(-Int32FromInt32(1)), - 172: uint8(-Int32FromInt32(1)), - 173: uint8(-Int32FromInt32(1)), - 174: uint8(-Int32FromInt32(1)), - 175: uint8(-Int32FromInt32(1)), - 176: uint8(-Int32FromInt32(1)), - 177: uint8(-Int32FromInt32(1)), - 178: uint8(-Int32FromInt32(1)), - 179: uint8(-Int32FromInt32(1)), - 180: uint8(-Int32FromInt32(1)), - 181: uint8(-Int32FromInt32(1)), - 182: uint8(-Int32FromInt32(1)), - 183: uint8(-Int32FromInt32(1)), - 184: uint8(-Int32FromInt32(1)), - 185: uint8(-Int32FromInt32(1)), - 186: uint8(-Int32FromInt32(1)), - 187: uint8(-Int32FromInt32(1)), - 188: uint8(-Int32FromInt32(1)), - 189: uint8(-Int32FromInt32(1)), - 190: uint8(-Int32FromInt32(1)), - 191: uint8(-Int32FromInt32(1)), - 192: uint8(-Int32FromInt32(1)), - 193: uint8(-Int32FromInt32(1)), - 194: uint8(-Int32FromInt32(1)), - 195: uint8(-Int32FromInt32(1)), - 196: uint8(-Int32FromInt32(1)), - 197: uint8(-Int32FromInt32(1)), - 198: uint8(-Int32FromInt32(1)), - 199: uint8(-Int32FromInt32(1)), - 200: uint8(-Int32FromInt32(1)), - 201: uint8(-Int32FromInt32(1)), - 202: uint8(-Int32FromInt32(1)), - 203: uint8(-Int32FromInt32(1)), - 204: uint8(-Int32FromInt32(1)), - 205: uint8(-Int32FromInt32(1)), - 206: uint8(-Int32FromInt32(1)), - 207: uint8(-Int32FromInt32(1)), - 208: uint8(-Int32FromInt32(1)), - 209: uint8(-Int32FromInt32(1)), - 210: uint8(-Int32FromInt32(1)), - 211: uint8(-Int32FromInt32(1)), - 212: uint8(-Int32FromInt32(1)), - 213: uint8(-Int32FromInt32(1)), - 214: uint8(-Int32FromInt32(1)), - 215: uint8(-Int32FromInt32(1)), - 216: uint8(-Int32FromInt32(1)), - 217: uint8(-Int32FromInt32(1)), - 218: uint8(-Int32FromInt32(1)), - 219: uint8(-Int32FromInt32(1)), - 220: uint8(-Int32FromInt32(1)), - 221: uint8(-Int32FromInt32(1)), - 222: uint8(-Int32FromInt32(1)), - 223: uint8(-Int32FromInt32(1)), - 224: uint8(-Int32FromInt32(1)), - 225: uint8(-Int32FromInt32(1)), - 226: uint8(-Int32FromInt32(1)), - 227: uint8(-Int32FromInt32(1)), - 228: uint8(-Int32FromInt32(1)), - 229: uint8(-Int32FromInt32(1)), - 230: uint8(-Int32FromInt32(1)), - 231: uint8(-Int32FromInt32(1)), - 232: uint8(-Int32FromInt32(1)), - 233: uint8(-Int32FromInt32(1)), - 234: uint8(-Int32FromInt32(1)), - 235: uint8(-Int32FromInt32(1)), - 236: uint8(-Int32FromInt32(1)), - 237: uint8(-Int32FromInt32(1)), - 238: uint8(-Int32FromInt32(1)), - 239: uint8(-Int32FromInt32(1)), - 240: uint8(-Int32FromInt32(1)), - 241: uint8(-Int32FromInt32(1)), - 242: uint8(-Int32FromInt32(1)), - 243: uint8(-Int32FromInt32(1)), - 244: uint8(-Int32FromInt32(1)), - 245: uint8(-Int32FromInt32(1)), - 246: uint8(-Int32FromInt32(1)), - 247: uint8(-Int32FromInt32(1)), - 248: uint8(-Int32FromInt32(1)), - 249: uint8(-Int32FromInt32(1)), - 250: uint8(-Int32FromInt32(1)), - 251: uint8(-Int32FromInt32(1)), - 252: uint8(-Int32FromInt32(1)), - 253: uint8(-Int32FromInt32(1)), - 254: uint8(-Int32FromInt32(1)), - 255: uint8(-Int32FromInt32(1)), - 256: uint8(-Int32FromInt32(1)), + 124: Uint8FromInt32(-Int32FromInt32(1)), + 125: Uint8FromInt32(-Int32FromInt32(1)), + 126: Uint8FromInt32(-Int32FromInt32(1)), + 127: Uint8FromInt32(-Int32FromInt32(1)), + 128: Uint8FromInt32(-Int32FromInt32(1)), + 129: Uint8FromInt32(-Int32FromInt32(1)), + 130: Uint8FromInt32(-Int32FromInt32(1)), + 131: Uint8FromInt32(-Int32FromInt32(1)), + 132: Uint8FromInt32(-Int32FromInt32(1)), + 133: Uint8FromInt32(-Int32FromInt32(1)), + 134: Uint8FromInt32(-Int32FromInt32(1)), + 135: Uint8FromInt32(-Int32FromInt32(1)), + 136: Uint8FromInt32(-Int32FromInt32(1)), + 137: Uint8FromInt32(-Int32FromInt32(1)), + 138: Uint8FromInt32(-Int32FromInt32(1)), + 139: Uint8FromInt32(-Int32FromInt32(1)), + 140: Uint8FromInt32(-Int32FromInt32(1)), + 141: Uint8FromInt32(-Int32FromInt32(1)), + 142: Uint8FromInt32(-Int32FromInt32(1)), + 143: Uint8FromInt32(-Int32FromInt32(1)), + 144: Uint8FromInt32(-Int32FromInt32(1)), + 145: Uint8FromInt32(-Int32FromInt32(1)), + 146: Uint8FromInt32(-Int32FromInt32(1)), + 147: Uint8FromInt32(-Int32FromInt32(1)), + 148: Uint8FromInt32(-Int32FromInt32(1)), + 149: Uint8FromInt32(-Int32FromInt32(1)), + 150: Uint8FromInt32(-Int32FromInt32(1)), + 151: Uint8FromInt32(-Int32FromInt32(1)), + 152: Uint8FromInt32(-Int32FromInt32(1)), + 153: Uint8FromInt32(-Int32FromInt32(1)), + 154: Uint8FromInt32(-Int32FromInt32(1)), + 155: Uint8FromInt32(-Int32FromInt32(1)), + 156: Uint8FromInt32(-Int32FromInt32(1)), + 157: Uint8FromInt32(-Int32FromInt32(1)), + 158: Uint8FromInt32(-Int32FromInt32(1)), + 159: Uint8FromInt32(-Int32FromInt32(1)), + 160: Uint8FromInt32(-Int32FromInt32(1)), + 161: Uint8FromInt32(-Int32FromInt32(1)), + 162: Uint8FromInt32(-Int32FromInt32(1)), + 163: Uint8FromInt32(-Int32FromInt32(1)), + 164: Uint8FromInt32(-Int32FromInt32(1)), + 165: Uint8FromInt32(-Int32FromInt32(1)), + 166: Uint8FromInt32(-Int32FromInt32(1)), + 167: Uint8FromInt32(-Int32FromInt32(1)), + 168: Uint8FromInt32(-Int32FromInt32(1)), + 169: Uint8FromInt32(-Int32FromInt32(1)), + 170: Uint8FromInt32(-Int32FromInt32(1)), + 171: Uint8FromInt32(-Int32FromInt32(1)), + 172: Uint8FromInt32(-Int32FromInt32(1)), + 173: Uint8FromInt32(-Int32FromInt32(1)), + 174: Uint8FromInt32(-Int32FromInt32(1)), + 175: Uint8FromInt32(-Int32FromInt32(1)), + 176: Uint8FromInt32(-Int32FromInt32(1)), + 177: Uint8FromInt32(-Int32FromInt32(1)), + 178: Uint8FromInt32(-Int32FromInt32(1)), + 179: Uint8FromInt32(-Int32FromInt32(1)), + 180: Uint8FromInt32(-Int32FromInt32(1)), + 181: Uint8FromInt32(-Int32FromInt32(1)), + 182: Uint8FromInt32(-Int32FromInt32(1)), + 183: Uint8FromInt32(-Int32FromInt32(1)), + 184: Uint8FromInt32(-Int32FromInt32(1)), + 185: Uint8FromInt32(-Int32FromInt32(1)), + 186: Uint8FromInt32(-Int32FromInt32(1)), + 187: Uint8FromInt32(-Int32FromInt32(1)), + 188: Uint8FromInt32(-Int32FromInt32(1)), + 189: Uint8FromInt32(-Int32FromInt32(1)), + 190: Uint8FromInt32(-Int32FromInt32(1)), + 191: Uint8FromInt32(-Int32FromInt32(1)), + 192: Uint8FromInt32(-Int32FromInt32(1)), + 193: Uint8FromInt32(-Int32FromInt32(1)), + 194: Uint8FromInt32(-Int32FromInt32(1)), + 195: Uint8FromInt32(-Int32FromInt32(1)), + 196: Uint8FromInt32(-Int32FromInt32(1)), + 197: Uint8FromInt32(-Int32FromInt32(1)), + 198: Uint8FromInt32(-Int32FromInt32(1)), + 199: Uint8FromInt32(-Int32FromInt32(1)), + 200: Uint8FromInt32(-Int32FromInt32(1)), + 201: Uint8FromInt32(-Int32FromInt32(1)), + 202: Uint8FromInt32(-Int32FromInt32(1)), + 203: Uint8FromInt32(-Int32FromInt32(1)), + 204: Uint8FromInt32(-Int32FromInt32(1)), + 205: Uint8FromInt32(-Int32FromInt32(1)), + 206: Uint8FromInt32(-Int32FromInt32(1)), + 207: Uint8FromInt32(-Int32FromInt32(1)), + 208: Uint8FromInt32(-Int32FromInt32(1)), + 209: Uint8FromInt32(-Int32FromInt32(1)), + 210: Uint8FromInt32(-Int32FromInt32(1)), + 211: Uint8FromInt32(-Int32FromInt32(1)), + 212: Uint8FromInt32(-Int32FromInt32(1)), + 213: Uint8FromInt32(-Int32FromInt32(1)), + 214: Uint8FromInt32(-Int32FromInt32(1)), + 215: Uint8FromInt32(-Int32FromInt32(1)), + 216: Uint8FromInt32(-Int32FromInt32(1)), + 217: Uint8FromInt32(-Int32FromInt32(1)), + 218: Uint8FromInt32(-Int32FromInt32(1)), + 219: Uint8FromInt32(-Int32FromInt32(1)), + 220: Uint8FromInt32(-Int32FromInt32(1)), + 221: Uint8FromInt32(-Int32FromInt32(1)), + 222: Uint8FromInt32(-Int32FromInt32(1)), + 223: Uint8FromInt32(-Int32FromInt32(1)), + 224: Uint8FromInt32(-Int32FromInt32(1)), + 225: Uint8FromInt32(-Int32FromInt32(1)), + 226: Uint8FromInt32(-Int32FromInt32(1)), + 227: Uint8FromInt32(-Int32FromInt32(1)), + 228: Uint8FromInt32(-Int32FromInt32(1)), + 229: Uint8FromInt32(-Int32FromInt32(1)), + 230: Uint8FromInt32(-Int32FromInt32(1)), + 231: Uint8FromInt32(-Int32FromInt32(1)), + 232: Uint8FromInt32(-Int32FromInt32(1)), + 233: Uint8FromInt32(-Int32FromInt32(1)), + 234: Uint8FromInt32(-Int32FromInt32(1)), + 235: Uint8FromInt32(-Int32FromInt32(1)), + 236: Uint8FromInt32(-Int32FromInt32(1)), + 237: Uint8FromInt32(-Int32FromInt32(1)), + 238: Uint8FromInt32(-Int32FromInt32(1)), + 239: Uint8FromInt32(-Int32FromInt32(1)), + 240: Uint8FromInt32(-Int32FromInt32(1)), + 241: Uint8FromInt32(-Int32FromInt32(1)), + 242: Uint8FromInt32(-Int32FromInt32(1)), + 243: Uint8FromInt32(-Int32FromInt32(1)), + 244: Uint8FromInt32(-Int32FromInt32(1)), + 245: Uint8FromInt32(-Int32FromInt32(1)), + 246: Uint8FromInt32(-Int32FromInt32(1)), + 247: Uint8FromInt32(-Int32FromInt32(1)), + 248: Uint8FromInt32(-Int32FromInt32(1)), + 249: Uint8FromInt32(-Int32FromInt32(1)), + 250: Uint8FromInt32(-Int32FromInt32(1)), + 251: Uint8FromInt32(-Int32FromInt32(1)), + 252: Uint8FromInt32(-Int32FromInt32(1)), + 253: Uint8FromInt32(-Int32FromInt32(1)), + 254: Uint8FromInt32(-Int32FromInt32(1)), + 255: Uint8FromInt32(-Int32FromInt32(1)), + 256: Uint8FromInt32(-Int32FromInt32(1)), } func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint64) { @@ -27194,14 +27192,14 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -27214,7 +27212,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -27225,7 +27223,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ - v11 = int32(*(*uint8)(unsafe.Pointer(v12))) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) } else { v11 = X__shgetc(tls, f) } @@ -27235,12 +27233,12 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 - if int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -27275,10 +27273,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint if base == uint32(10) { x = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { break } - x = x*uint32(10) + uint32(c-Int32FromUint8('0')) + x = x*uint32(10) + Uint32FromInt32(c-Int32FromUint8('0')) goto _20 _20: ; @@ -27286,7 +27284,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v23 = f + 8 v22 = *(*uintptr)(unsafe.Pointer(v23)) *(*uintptr)(unsafe.Pointer(v23))++ - v21 = int32(*(*uint8)(unsafe.Pointer(v22))) + v21 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v22))) } else { v21 = X__shgetc(tls, f) } @@ -27294,10 +27292,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } y = uint64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(c-Int32FromUint8('0'))) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-Uint64FromInt32(c-Int32FromUint8('0'))) { break } - y = y*uint64(10) + uint64(c-Int32FromUint8('0')) + y = y*uint64(10) + Uint64FromInt32(c-Int32FromUint8('0')) goto _24 _24: ; @@ -27305,18 +27303,18 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v27 = f + 8 v26 = *(*uintptr)(unsafe.Pointer(v27)) *(*uintptr)(unsafe.Pointer(v27))++ - v25 = int32(*(*uint8)(unsafe.Pointer(v26))) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v26))) } else { v25 = X__shgetc(tls, f) } c = v25 } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { goto done } } else { if !(base&(base-Uint32FromInt32(1)) != 0) { - bs = int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 260 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) + bs = Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 260 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) x = uint32(0) for { if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(32)) { @@ -27330,7 +27328,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } @@ -27349,7 +27347,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v35 = f + 8 v34 = *(*uintptr)(unsafe.Pointer(v35)) *(*uintptr)(unsafe.Pointer(v35))++ - v33 = int32(*(*uint8)(unsafe.Pointer(v34))) + v33 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v34))) } else { v33 = X__shgetc(tls, f) } @@ -27369,7 +27367,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ - v37 = int32(*(*uint8)(unsafe.Pointer(v38))) + v37 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v38))) } else { v37 = X__shgetc(tls, f) } @@ -27388,7 +27386,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v43 = f + 8 v42 = *(*uintptr)(unsafe.Pointer(v43)) *(*uintptr)(unsafe.Pointer(v43))++ - v41 = int32(*(*uint8)(unsafe.Pointer(v42))) + v41 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v42))) } else { v41 = X__shgetc(tls, f) } @@ -27408,7 +27406,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v47 = f + 8 v46 = *(*uintptr)(unsafe.Pointer(v47)) *(*uintptr)(unsafe.Pointer(v47))++ - v45 = int32(*(*uint8)(unsafe.Pointer(v46))) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v46))) } else { v45 = X__shgetc(tls, f) } @@ -27437,7 +27435,7 @@ done: } } } - return y ^ uint64(neg) - uint64(neg) + return y ^ Uint64FromInt32(neg) - Uint64FromInt32(neg) } func X__procfdname(tls *TLS, buf uintptr, fd uint32) { @@ -27537,7 +27535,7 @@ func X__shgetc(tls *TLS, f uintptr) (r int32) { } (*TFILE)(unsafe.Pointer(f)).Fshcnt = int64((*TFILE)(unsafe.Pointer(f)).Fbuf) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + cnt if (*TFILE)(unsafe.Pointer(f)).Frpos <= (*TFILE)(unsafe.Pointer(f)).Fbuf { - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = Uint8FromInt32(c) } return c } @@ -27548,10 +27546,10 @@ func X__syscall_ret(tls *TLS, r uint64) (r1 int64) { defer func() { trc("-> %v", r1) }() } if r > -Uint64FromUint64(4096) { - *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(-r) + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = Int32FromUint64(-r) return int64(-int32(1)) } - return int64(r) + return Int64FromUint64(r) } type TElf_Symndx = uint32 @@ -27623,7 +27621,7 @@ func Xftok(tls *TLS, path uintptr, id int32) (r Tkey_t) { if Xstat(tls, path, bp) < 0 { return -int32(1) } - return int32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ino&Uint64FromInt32(0xffff) | (*(*Tstat)(unsafe.Pointer(bp))).Fst_dev&Uint64FromInt32(0xff)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_msgget), int64(k), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_msgget), int64(k), int64(flag))))) } func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32) (r Tssize_t) { @@ -27698,7 +27696,7 @@ func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32 trc("tls=%v q=%v m=%v len1=%v type1=%v flag=%v, (%v:)", tls, q, m, len1, type1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msgrcv), int64(q), int64(m), int64(len1), type1, int64(flag), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msgrcv), int64(q), int64(m), Int64FromUint64(len1), type1, int64(flag), 0))) } func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { @@ -27706,7 +27704,7 @@ func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { trc("tls=%v q=%v m=%v len1=%v flag=%v, (%v:)", tls, q, m, len1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msgsnd), int64(q), int64(m), int64(len1), int64(flag), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msgsnd), int64(q), int64(m), Int64FromUint64(len1), int64(flag), 0, 0)))) } const GETALL = 13 @@ -27794,7 +27792,7 @@ func Xsemctl(tls *TLS, id int32, num int32, cmd int32, va uintptr) (r1 int32) { _ = ap } r = int32(X__syscall4(tls, int64(SYS_semctl), int64(id), int64(num), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(*(*uintptr)(unsafe.Pointer(bp))))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { @@ -27807,9 +27805,9 @@ func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { * n fits in the correct (per POSIX) userspace type, so * we have to check here. */ if n > int32(USHRT_MAX) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_semget), int64(key), int64(n), int64(fl))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_semget), int64(key), int64(n), int64(fl))))) } func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { @@ -27817,7 +27815,7 @@ func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { trc("tls=%v id=%v buf=%v n=%v, (%v:)", tls, id, buf, n, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_semop), int64(id), int64(buf), int64(n))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_semop), int64(id), int64(buf), Int64FromUint64(n))))) } const NO_TIME32 = 0 @@ -27851,7 +27849,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r int3 trc("tls=%v id=%v buf=%v n=%v ts=%v, (%v:)", tls, id, buf, n, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_semtimedop), int64(id), int64(buf), int64(n), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_semtimedop), int64(id), int64(buf), Int64FromUint64(n), int64(ts))))) } const SHMLBA = 4096 @@ -27923,7 +27921,7 @@ func Xshmat(tls *TLS, id int32, addr uintptr, flag int32) (r uintptr) { trc("tls=%v id=%v addr=%v flag=%v, (%v:)", tls, id, addr, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return uintptr(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_shmat), int64(id), int64(addr), int64(flag))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_shmat), int64(id), int64(addr), int64(flag))))) } func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { @@ -27934,7 +27932,7 @@ func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { var r int32 _ = r r = int32(X__syscall3(tls, int64(SYS_shmctl), int64(id), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(buf))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xshmdt(tls *TLS, addr uintptr) (r int32) { @@ -27942,7 +27940,7 @@ func Xshmdt(tls *TLS, addr uintptr) (r int32) { trc("tls=%v addr=%v, (%v:)", tls, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_shmdt), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_shmdt), int64(addr))))) } func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { @@ -27950,10 +27948,10 @@ func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { trc("tls=%v key=%v size=%v flag=%v, (%v:)", tls, key, size, flag, origin(2)) defer func() { trc("-> %v", r) }() } - if size > uint64(Int64FromInt64(INT64_MAX)) { + if size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { size = Uint64FromUint64(0xffffffffffffffff) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_shmget), int64(key), int64(size), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_shmget), int64(key), Int64FromUint64(size), int64(flag))))) } type Tpasswd = struct { @@ -28218,7 +28216,7 @@ func Xgetdtablesize(tls *TLS) (r int32) { } else { v1 = uint64(INT_MAX) } - return int32(v1) + return Int32FromUint64(v1) } func Xgetloadavg(tls *TLS, a uintptr, n int32) (r int32) { @@ -28262,7 +28260,7 @@ func Xgetpagesize(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__libc.Fpage_size) + return Int32FromUint64(X__libc.Fpage_size) } const B0 = 0 @@ -28449,16 +28447,16 @@ func Xgetpass(tls *TLS, prompt uintptr) (r uintptr) { } Xtcgetattr(tls, fd, bp+60) *(*Ttermios)(unsafe.Pointer(bp)) = *(*Ttermios)(unsafe.Pointer(bp + 60)) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag |= uint32(ICANON) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= uint32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= Uint32FromInt32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag |= uint32(ICRNL) Xtcsetattr(tls, fd, int32(TCSAFLUSH), bp+60) Xtcdrain(tls, fd) Xdprintf(tls, fd, __ccgo_ts+15, VaList(bp+128, prompt)) l = Xread(tls, fd, uintptr(unsafe.Pointer(&_password)), uint64(128)) if l >= 0 { - if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || uint64(l) == uint64(128) { + if l > 0 && Int32FromUint8(_password[l-int64(1)]) == int32('\n') || Uint64FromInt64(l) == uint64(128) { l-- } _password[l] = uint8(0) @@ -28521,7 +28519,7 @@ func Xgetusershell(tls *TLS) (r uintptr) { if l <= 0 { return uintptr(0) } - if int32(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1))))) == int32('\n') { *(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1)))) = uint8(0) } return _line @@ -28698,12 +28696,12 @@ func Xulimit(tls *TLS, cmd int32, va uintptr) (r int64) { ap = va val = VaInt64(&ap) _ = ap - (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * uint64(val) + (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * Uint64FromInt64(val) if Xsetrlimit(tls, int32(RLIMIT_FSIZE), bp) != 0 { return int64(-int32(1)) } } - return int64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) + return Int64FromUint64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) } const BOOT_TIME = 2 @@ -28972,7 +28970,7 @@ func Xbrk(tls *TLS, end uintptr) (r int32) { trc("tls=%v end=%v, (%v:)", tls, end, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -28980,7 +28978,7 @@ func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) } func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -28988,7 +28986,7 @@ func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) } func Xchroot(tls *TLS, path uintptr) (r int32) { @@ -28996,7 +28994,7 @@ func Xchroot(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) } type Tktimex64 = struct { @@ -29115,12 +29113,12 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Fstbcnt = (*(*Tktimex)(unsafe.Pointer(bp))).Fstbcnt (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex)(unsafe.Pointer(bp))).Ftai } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } if clock_id == CLOCK_REALTIME { - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) } func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -29128,7 +29126,7 @@ func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_o trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } const EPOLLERR = 8 @@ -29181,7 +29179,7 @@ func Xepoll_create(tls *TLS, size int32) (r int32) { defer func() { trc("-> %v", r) }() } if size <= 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } return Xepoll_create1(tls, 0) } @@ -29194,7 +29192,7 @@ func Xepoll_create1(tls *TLS, flags int32) (r1 int32) { var r int32 _ = r r = int32(X__syscall1(tls, int64(SYS_epoll_create1), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { @@ -29202,7 +29200,7 @@ func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { trc("tls=%v fd=%v op=%v fd2=%v ev=%v, (%v:)", tls, fd, op, fd2, ev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) } func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uintptr) (r1 int32) { @@ -29213,7 +29211,7 @@ func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uint var r int32 _ = r r = int32(___syscall_cp(tls, int64(SYS_epoll_pwait), int64(fd), int64(ev), int64(cnt), int64(to), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_wait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32) (r int32) { @@ -29237,8 +29235,8 @@ func Xeventfd(tls *TLS, count uint32, flags int32) (r1 int32) { } var r int32 _ = r - r = int32(X__syscall2(tls, int64(SYS_eventfd2), int64(count), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + r = int32(X__syscall2(tls, int64(SYS_eventfd2), Int64FromUint32(count), int64(flags))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { @@ -29248,7 +29246,7 @@ func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { } var v1 int32 _ = v1 - if uint64(8) == uint64(Xread(tls, fd, value, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xread(tls, fd, value, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29266,7 +29264,7 @@ func Xeventfd_write(tls *TLS, fd int32, _value Teventfd_t) (r int32) { *(*Teventfd_t)(unsafe.Pointer(bp)) = _value var v1 int32 _ = v1 - if uint64(8) == uint64(Xwrite(tls, fd, bp, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xwrite(tls, fd, bp, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29279,7 +29277,7 @@ func Xfallocate(tls *TLS, fd int32, mode int32, base Toff_t, len1 Toff_t) (r int trc("tls=%v fd=%v mode=%v base=%v len1=%v, (%v:)", tls, fd, mode, base, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) } const FANOTIFY_METADATA_VERSION = 3 @@ -29424,7 +29422,7 @@ func Xfanotify_init(tls *TLS, flags uint32, event_f_flags uint32) (r int32) { trc("tls=%v flags=%v event_f_flags=%v, (%v:)", tls, flags, event_f_flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fanotify_init), int64(flags), int64(event_f_flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fanotify_init), Int64FromUint32(flags), Int64FromUint32(event_f_flags))))) } func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd int32, pathname uintptr) (r int32) { @@ -29432,7 +29430,7 @@ func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd trc("tls=%v fanotify_fd=%v flags=%v mask=%v dfd=%v pathname=%v, (%v:)", tls, fanotify_fd, flags, mask, dfd, pathname, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), int64(flags), int64(mask), int64(dfd), int64(pathname))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), Int64FromUint32(flags), Int64FromUint64(mask), int64(dfd), int64(pathname))))) } const LOCK_EX = 2 @@ -29445,7 +29443,7 @@ func Xflock(tls *TLS, fd int32, op int32) (r int32) { trc("tls=%v fd=%v op=%v, (%v:)", tls, fd, op, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) } func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { @@ -29456,7 +29454,7 @@ func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if len1 > uint64(INT_MAX) { len1 = uint64(INT_MAX) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), Int64FromUint64(len1))))) } const GRND_INSECURE = 4 @@ -29468,7 +29466,7 @@ func Xgetrandom(tls *TLS, buf uintptr, buflen Tsize_t, flags uint32) (r Tssize_t trc("tls=%v buf=%v buflen=%v flags=%v, (%v:)", tls, buf, buflen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), int64(buflen), int64(flags), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), Int64FromUint64(buflen), Int64FromUint32(flags), 0, 0, 0))) } const IN_ACCESS = 1 @@ -29522,7 +29520,7 @@ func Xinotify_init1(tls *TLS, flags int32) (r1 int32) { var r int32 _ = r r = int32(X__syscall1(tls, int64(SYS_inotify_init1), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r int32) { @@ -29530,7 +29528,7 @@ func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r trc("tls=%v fd=%v pathname=%v mask=%v, (%v:)", tls, fd, pathname, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), int64(mask))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), Int64FromUint32(mask))))) } func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { @@ -29538,7 +29536,7 @@ func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { trc("tls=%v fd=%v wd=%v, (%v:)", tls, fd, wd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) } func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { @@ -29546,7 +29544,7 @@ func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { trc("tls=%v type1=%v buf=%v len1=%v, (%v:)", tls, type1, buf, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) } const MADV_COLD = 20 @@ -29584,7 +29582,7 @@ func Xmemfd_create(tls *TLS, name uintptr, flags uint32) (r int32) { trc("tls=%v name=%v flags=%v, (%v:)", tls, name, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), Int64FromUint32(flags))))) } func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { @@ -29595,7 +29593,7 @@ func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { if flags == uint32(0) { return Xmlock(tls, addr, len1) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), int64(len1), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), Int64FromUint64(len1), Int64FromUint32(flags))))) } func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { @@ -29603,7 +29601,7 @@ func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { trc("tls=%v a=%v b=%v c=%v, (%v:)", tls, a, b, c, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_init_module), int64(a), int64(b), int64(c))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_init_module), int64(a), Int64FromUint64(b), int64(c))))) } func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { @@ -29611,7 +29609,7 @@ func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_delete_module), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_delete_module), int64(a), Int64FromUint32(b))))) } const BLKBSZGET = 2147488368 @@ -29860,7 +29858,7 @@ func Xmount(tls *TLS, special uintptr, dir uintptr, fstype uintptr, flags uint64 trc("tls=%v special=%v dir=%v fstype=%v flags=%v data=%v, (%v:)", tls, special, dir, fstype, flags, data, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), int64(flags), int64(data))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), Int64FromUint64(flags), int64(data))))) } func Xumount(tls *TLS, special uintptr) (r int32) { @@ -29868,7 +29866,7 @@ func Xumount(tls *TLS, special uintptr) (r int32) { trc("tls=%v special=%v, (%v:)", tls, special, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) } func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { @@ -29876,7 +29874,7 @@ func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { trc("tls=%v special=%v flags=%v, (%v:)", tls, special, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) } func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, mount_id uintptr, flags int32) (r int32) { @@ -29884,7 +29882,7 @@ func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, trc("tls=%v dirfd=%v pathname=%v handle=%v mount_id=%v flags=%v, (%v:)", tls, dirfd, pathname, handle, mount_id, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) } func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) (r int32) { @@ -29892,7 +29890,7 @@ func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) ( trc("tls=%v mount_fd=%v handle=%v flags=%v, (%v:)", tls, mount_fd, handle, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) } const ADDR_COMPAT_LAYOUT = 2097152 @@ -29935,7 +29933,7 @@ func Xpersonality(tls *TLS, persona uint64) (r int32) { trc("tls=%v persona=%v, (%v:)", tls, persona, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_personality), int64(persona))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_personality), Int64FromUint64(persona))))) } func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { @@ -29943,7 +29941,7 @@ func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { trc("tls=%v new1=%v old=%v, (%v:)", tls, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) } const PR_CAPBSET_DROP = 24 @@ -30120,7 +30118,7 @@ func Xprctl(tls *TLS, op int32, va uintptr) (r int32) { i++ } _ = ap - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_prctl), int64(op), int64(x[0]), int64(x[int32(1)]), int64(x[int32(2)]), int64(x[int32(3)]))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_prctl), int64(op), Int64FromUint64(x[0]), Int64FromUint64(x[int32(1)]), Int64FromUint64(x[int32(2)]), Int64FromUint64(x[int32(3)]))))) } const RWF_APPEND = 16 @@ -30139,9 +30137,9 @@ func Xpreadv2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags in if ofs == int64(-int32(1)) { return Xreadv(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit uintptr) (r1 int32) { @@ -30164,7 +30162,7 @@ func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit } new_limit = bp } - r = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) if !(r != 0) && old_limit != 0 && Bool(^Uint64FromUint64(0) != ^Uint64FromUint64(0)) { if (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur = ^Uint64FromUint64(0) @@ -30181,7 +30179,7 @@ func Xprocess_vm_writev(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec uintptr, riovcnt uint64, flags uint64) (r Tssize_t) { @@ -30189,7 +30187,7 @@ func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } const PTRACE_ATTACH = 16 @@ -30338,11 +30336,11 @@ func Xptrace(tls *TLS, req int32, va uintptr) (r int64) { data = VaUintptr(&ap) /* PTRACE_{READ,WRITE}{DATA,TEXT} (16...19) are specific to SPARC. */ _ = ap - if uint32(req)-uint32(1) < uint32(3) { + if Uint32FromInt32(req)-uint32(1) < uint32(3) { data = bp } - ret = X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) - if ret < 0 || uint32(req)-uint32(1) >= uint32(3) { + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) + if ret < 0 || Uint32FromInt32(req)-uint32(1) >= uint32(3) { return ret } return *(*int64)(unsafe.Pointer(bp)) @@ -30357,9 +30355,9 @@ func Xpwritev2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags i if ofs == int64(-int32(1)) { return Xwritev(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } const GRPQUOTA = 1 @@ -30425,7 +30423,7 @@ func Xquotactl(tls *TLS, cmd int32, special uintptr, id int32, addr uintptr) (r trc("tls=%v cmd=%v special=%v id=%v addr=%v, (%v:)", tls, cmd, special, id, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) } func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { @@ -30433,7 +30431,7 @@ func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v pos=%v len1=%v, (%v:)", tls, fd, pos, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, int64(len1)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, Int64FromUint64(len1)))) } const RB_AUTOBOOT = 19088743 @@ -30449,7 +30447,7 @@ func Xreboot(tls *TLS, type1 int32) (r int32) { trc("tls=%v type1=%v, (%v:)", tls, type1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_reboot), int64(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_reboot), Int64FromUint32(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) } func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff Tsize_t, flags int32) (r int32) { @@ -30457,7 +30455,7 @@ func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff T trc("tls=%v addr=%v size=%v prot=%v pgoff=%v flags=%v, (%v:)", tls, addr, size, prot, pgoff, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), int64(size), int64(prot), int64(pgoff), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), Int64FromUint64(size), int64(prot), Int64FromUint64(pgoff), int64(flags))))) } func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { @@ -30466,7 +30464,7 @@ func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { defer func() { trc("-> %v", r) }() } if inc != 0 { - return uintptr(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return uintptr(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } return uintptr(X__syscall1(tls, int64(SYS_brk), int64(Int32FromInt32(0)))) } @@ -30476,7 +30474,7 @@ func Xsendfile(tls *TLS, out_fd int32, in_fd int32, ofs uintptr, count Tsize_t) trc("tls=%v out_fd=%v in_fd=%v ofs=%v count=%v, (%v:)", tls, out_fd, in_fd, ofs, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), int64(count)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), Int64FromUint64(count)))) } func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { @@ -30484,7 +30482,7 @@ func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsgid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsgid), Int64FromUint32(gid))))) } func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { @@ -30492,7 +30490,7 @@ func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsuid), int64(uid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsuid), Int64FromUint32(uid))))) } func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -30500,7 +30498,7 @@ func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sethostname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sethostname), int64(name), Int64FromUint64(len1))))) } const CLONE_CHILD_CLEARTID = 2097152 @@ -30540,7 +30538,7 @@ func Xsetns(tls *TLS, fd int32, nstype int32) (r int32) { trc("tls=%v fd=%v nstype=%v, (%v:)", tls, fd, nstype, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) } const __tm_gmtoff = 0 @@ -30570,8 +30568,8 @@ func Xsettimeofday(tls *TLS, tv uintptr, tz uintptr) (r int32) { if !(tv != 0) { return 0 } - if uint64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ Ftv_sec: (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec, @@ -30616,7 +30614,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { var ret int32 _ = ret ret = int32(X__syscall4(tls, int64(SYS_signalfd4), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), int64(flags))) - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -30624,7 +30622,7 @@ func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintpt trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx uintptr) (r int32) { @@ -30637,9 +30635,9 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u var ret int32 var _ /* st at bp+0 */ Tstat _ = ret - ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), int64(mask), int64(stx))) + ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), Int64FromUint32(mask), int64(stx))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } ret = Xfstatat(tls, dirfd, path, bp, flags) if ret != 0 { @@ -30652,15 +30650,15 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u (*Tstatx)(unsafe.Pointer(stx)).Fstx_nlink = (*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink (*Tstatx)(unsafe.Pointer(stx)).Fstx_uid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_uid (*Tstatx)(unsafe.Pointer(stx)).Fstx_gid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_gid - (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_btime = Tstatx_timestamp{} (*Tstatx)(unsafe.Pointer(stx)).Fstx_mask = uint32(0x7ff) return 0 @@ -30690,7 +30688,7 @@ func Xswapon(tls *TLS, path uintptr, flags int32) (r int32) { trc("tls=%v path=%v flags=%v, (%v:)", tls, path, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) } func Xswapoff(tls *TLS, path uintptr) (r int32) { @@ -30698,7 +30696,7 @@ func Xswapoff(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) } func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) (r int32) { @@ -30706,7 +30704,7 @@ func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) trc("tls=%v fd=%v pos=%v len1=%v flags=%v, (%v:)", tls, fd, pos, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, Int64FromUint32(flags))))) } func Xsyncfs(tls *TLS, fd int32) (r int32) { @@ -30714,7 +30712,7 @@ func Xsyncfs(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) } func X__lsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30722,7 +30720,7 @@ func X__lsysinfo(tls *TLS, info uintptr) (r int32) { trc("tls=%v info=%v, (%v:)", tls, info, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) } func Xsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30738,7 +30736,7 @@ func Xtee(tls *TLS, src int32, dest int32, len1 Tsize_t, flags uint32) (r Tssize trc("tls=%v src=%v dest=%v len1=%v flags=%v, (%v:)", tls, src, dest, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), Int64FromUint64(len1), Int64FromUint32(flags)))) } const TFD_CLOEXEC = 524288 @@ -30751,7 +30749,7 @@ func Xtimerfd_create(tls *TLS, clockid int32, flags int32) (r int32) { trc("tls=%v clockid=%v flags=%v, (%v:)", tls, clockid, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) } func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr) (r int32) { @@ -30759,7 +30757,7 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr trc("tls=%v fd=%v flags=%v new1=%v old=%v, (%v:)", tls, fd, flags, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) } func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { @@ -30767,7 +30765,7 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { trc("tls=%v fd=%v cur=%v, (%v:)", tls, fd, cur, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) } func Xunshare(tls *TLS, flags int32) (r int32) { @@ -30775,7 +30773,7 @@ func Xunshare(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) } func Xutimes(tls *TLS, path uintptr, times uintptr) (r int32) { @@ -30791,7 +30789,7 @@ func Xvhangup(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_vhangup))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_vhangup))))) } func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Tssize_t) { @@ -30799,7 +30797,7 @@ func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Ts trc("tls=%v fd=%v iov=%v cnt=%v flags=%v, (%v:)", tls, fd, iov, cnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), int64(cnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), Int64FromUint64(cnt), Int64FromUint32(flags)))) } const ESR_MAGIC = 1163088385 @@ -30913,7 +30911,7 @@ func Xwait4(tls *TLS, pid Tpid_t, status uintptr, options int32, ru uintptr) (r1 Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } const XATTR_CREATE = 1 @@ -30925,7 +30923,7 @@ func Xgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -30933,7 +30931,7 @@ func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -30941,7 +30939,7 @@ func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v, (%v:)", tls, filedes, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size)))) } func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -30949,7 +30947,7 @@ func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -30957,7 +30955,7 @@ func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_t) { @@ -30965,7 +30963,7 @@ func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_ trc("tls=%v filedes=%v list=%v size=%v, (%v:)", tls, filedes, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), Int64FromUint64(size)))) } func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -30973,7 +30971,7 @@ func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -30981,7 +30979,7 @@ func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -30989,7 +30987,7 @@ func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, filedes, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -30997,7 +30995,7 @@ func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) } func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31005,7 +31003,7 @@ func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) } func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { @@ -31013,7 +31011,7 @@ func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) } type Tucontext_t2 = struct { @@ -31065,7 +31063,7 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { var sign, sw int32 _, _, _, _, _, _, _, _, _, _, _ = b, mo, n, o, ol, os, sign, sw, t, tl, ts mo = p - sw = int32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) + sw = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) b = uint32(0) n = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 2*4)), sw) o = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 3*4)), sw) @@ -31122,9 +31120,9 @@ func Xbind_textdomain_codeset(tls *TLS, domainname uintptr, codeset uintptr) (r var _empty_mo = [5]Tuint32_t{ 0: uint32(0x950412de), - 2: uint32(-Int32FromInt32(1)), - 3: uint32(-Int32FromInt32(1)), - 4: uint32(-Int32FromInt32(1)), + 2: Uint32FromInt32(-Int32FromInt32(1)), + 3: Uint32FromInt32(-Int32FromInt32(1)), + 4: Uint32FromInt32(-Int32FromInt32(1)), } const NL_CAT_LOCALE = 1 @@ -31207,12 +31205,12 @@ _6: goto _9 _9: strings = map1 + uintptr(20) + uintptr(v8) - v10 = uint32(set_id) + v10 = Uint32FromInt32(set_id) v11 = v10>>int32(24) | v10>>int32(8)&uint32(0xff00) | v10<>int32(24) | v13>>int32(8)&uint32(0xff00) | v13< uint64(NAME_MAX) || dirlen >= uint64(PATH_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) @@ -31532,7 +31530,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r1 uintptr) return uintptr(0) } (*Tbinding)(unsafe.Pointer(p4)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) - (*Tbinding)(unsafe.Pointer(p4)).Fdirlen = int32(dirlen) + (*Tbinding)(unsafe.Pointer(p4)).Fdirlen = Int32FromUint64(dirlen) (*Tbinding)(unsafe.Pointer(p4)).Fdomainname = p4 + 32 (*Tbinding)(unsafe.Pointer(p4)).Fdirname = p4 + 32 + uintptr(domlen) + uintptr(1) Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p4)).Fdomainname, domainname, domlen+uint64(1)) @@ -31648,13 +31646,13 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n if !(msgid1 != 0) { goto notrans } - if uint32(category) >= uint32(LC_ALL) { + if Uint32FromInt32(category) >= uint32(LC_ALL) { goto notrans } if !(domainname != 0) { domainname = X__gettextdomain(tls) } - domlen = Xstrnlen(tls, domainname, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + domlen = Xstrnlen(tls, domainname, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if domlen > uint64(NAME_MAX) { goto notrans } @@ -31707,7 +31705,7 @@ _2: dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 16 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 - dirlen = uint64((*Tbinding)(unsafe.Pointer(q)).Fdirlen) + dirlen = Uint64FromInt32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) loclen = Xstrlen(tls, locname) catlen = uint64(_catlens[category]) /* Logically split @mod suffix from locale name. */ @@ -31715,19 +31713,19 @@ _2: if !(modname != 0) { modname = locname + uintptr(loclen) } - v5 = loclen - uint64(int64(modname)-int64(locname)) + v5 = loclen - Uint64FromInt64(int64(modname)-int64(locname)) modlen = v5 alt_modlen = v5 - loclen = uint64(int64(modname) - int64(locname)) + loclen = Uint64FromInt64(int64(modname) - int64(locname)) /* Drop .charset identifier; it is not used. */ csp = Xmemchr(tls, locname, int32('.'), loclen) if csp != 0 { - loclen = uint64(int64(csp) - int64(locname)) + loclen = Uint64FromInt64(int64(csp) - int64(locname)) } v6 = dirlen + uint64(1) + loclen + modlen + uint64(1) + catlen + uint64(1) + domlen + uint64(3) + uint64(1) name = Xrealloc(tls, name, v6) for { - Xsnprintf(tls, name, v6, __ccgo_ts+423, VaList(bp+24, dirname, int32(loclen), locname, int32(alt_modlen), modname, catname, domainname)) + Xsnprintf(tls, name, v6, __ccgo_ts+423, VaList(bp+24, dirname, Int32FromUint64(loclen), locname, Int32FromUint64(alt_modlen), modname, catname, domainname)) v8 = X__map_file(tls, name, bp) map1 = v8 if v8 != 0 { @@ -31740,7 +31738,7 @@ _2: v9 = Xmemchr(tls, locname, int32('_'), loclen) locp = v9 if v9 != 0 { - loclen = uint64(int64(locp) - int64(locname)) + loclen = Uint64FromInt64(int64(locp) - int64(locname)) alt_modlen = modlen } else { break @@ -31777,8 +31775,8 @@ _2: if r1 != 0 { r1 += uintptr(13) for { - v11 = int32(*(*uint8)(unsafe.Pointer(r1))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r1))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: if !(v12 != 0) { @@ -31790,14 +31788,14 @@ _2: np = Xstrtoul(tls, r1+uintptr(9), bp+8, int32(10)) r1 = *(*uintptr)(unsafe.Pointer(bp + 8)) } - for *(*uint8)(unsafe.Pointer(r1)) != 0 && int32(*(*uint8)(unsafe.Pointer(r1))) != int32(';') { + for *(*uint8)(unsafe.Pointer(r1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(r1))) != int32(';') { r1++ } if *(*uint8)(unsafe.Pointer(r1)) != 0 { r1++ for { - v14 = int32(*(*uint8)(unsafe.Pointer(r1))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r1))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: if !(v15 != 0) { @@ -31810,7 +31808,7 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals = Int32FromUint64(np) (*Tmsgcat)(unsafe.Pointer(p3)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) @@ -31861,7 +31859,7 @@ _2: * msgid2 to request that dcngettext suppress plural processing. */ if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals != 0 { plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p3)).Fplural_rule, n) - if plural > uint64((*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals) { + if plural > Uint64FromInt32((*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals) { goto notrans } for { @@ -31870,7 +31868,7 @@ _2: if !(v26 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size - uint64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p3)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size - Uint64FromInt64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p3)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint64(1) >= rem { goto notrans @@ -98099,7 +98097,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(a)) != 0 && *(*uint8)(unsafe.Pointer(b)) != 0) { break } - for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && uint32(int32(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { + for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { a++ } if uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32) != uint32(*(*uint8)(unsafe.Pointer(b))) { @@ -98111,7 +98109,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { a++ b++ } - return BoolInt32(int32(*(*uint8)(unsafe.Pointer(a))) != int32(*(*uint8)(unsafe.Pointer(b)))) + return BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(b)))) } func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { @@ -98135,11 +98133,11 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { ; s += uintptr(Xstrlen(tls, s) + uint64(1)) } - return uint64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) + return Uint64FromInt64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) } s += uintptr(Xstrlen(tls, s) + uint64(1)) if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - if int32(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { s += uintptr(2) } else { s += uintptr(uint32(2) + (uint32(64)-uint32(*(*uint8)(unsafe.Pointer(s + 1))))*uint32(5)) @@ -98148,7 +98146,7 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { goto _1 _1: } - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } type Tstateful_cd = struct { @@ -98180,16 +98178,16 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { _, _, _, _, _, _, _ = cd, f, scd, t, v1, v2, v3 v1 = _find_charmap(tls, to) t = v1 - if v3 = v1 == uint64(-Int32FromInt32(1)); !v3 { + if v3 = v1 == Uint64FromInt32(-Int32FromInt32(1)); !v3 { v2 = _find_charmap(tls, from) f = v2 } - if v3 || v2 == uint64(-Int32FromInt32(1)) || int32(_charmaps[t]) >= int32(0330) { + if v3 || v2 == Uint64FromInt32(-Int32FromInt32(1)) || Int32FromUint8(_charmaps[t]) >= int32(0330) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } cd = _combine_to_from(tls, t, f) - switch int32(_charmaps[f]) { + switch Int32FromUint8(_charmaps[f]) { case int32(UTF_16): fallthrough case int32(UTF_32): @@ -98210,7 +98208,7 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { func _get_16(tls *TLS, s uintptr, e int32) (r uint32) { e &= int32(1) - return uint32(int32(*(*uint8)(unsafe.Pointer(s + uintptr(e))))<>(uint32(2)*x%uint32(8)) | int32(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) + x = c - Uint32FromInt32(int32(4)*Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1)))))) + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)))))>>(uint32(2)*x%uint32(8)) | Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) if x < uint32(256) { v1 = x } else { @@ -98326,7 +98324,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } c = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) l = uint64(1) - switch int32(type1) { + switch Int32FromUint8(type1) { case int32(UTF_8): goto _2 case int32(US_ASCII): @@ -98377,10 +98375,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } l = Xmbrtowc(tls, bp+32, *(*uintptr)(unsafe.Pointer(in)), *(*Tsize_t)(unsafe.Pointer(inb)), bp+24) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { goto ilseq } - if l == uint64(-Int32FromInt32(2)) { + if l == Uint64FromInt32(-Int32FromInt32(2)) { goto starved } c = *(*Twchar_t)(unsafe.Pointer(bp + 32)) @@ -98409,7 +98407,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) _24: ; if c-uint32(0xd800) < uint32(0x800) || c >= uint32(0x110000) { @@ -98428,19 +98426,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(2) { goto starved } - c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) if c-Uint32FromInt32(0xdc00) < uint32(0x400) { goto ilseq } if c-Uint32FromInt32(0xd800) < uint32(0x400) { - if uint32(int32(type1)-int32(UCS2BE)) < uint32(2) { + if Uint32FromInt32(Int32FromUint8(type1)-int32(UCS2BE)) < uint32(2) { goto ilseq } l = uint64(4) if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), int32(type1)) + d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), Int32FromUint8(type1)) if d-Uint32FromInt32(0xdc00) >= uint32(0x400) { goto ilseq } @@ -98457,7 +98455,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), 0) - if int32(type1) == int32(UCS2) { + if Int32FromUint8(type1) == int32(UCS2) { if c == uint32(0xfffe) { v26 = int32(UCS2LE) } else { @@ -98472,7 +98470,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } v25 = v27 } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v25) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v25) if c == uint32(0xfffe) || c == uint32(0xfeff) { l = uint64(2) } @@ -98492,7 +98490,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v28 = int32(UTF_32BE) } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v28) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v28) if c == uint32(0xfffe0000) || c == uint32(0xfeff) { l = uint64(4) } @@ -98504,8 +98502,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto _23 } - if c-uint32(0xa1) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + if c-uint32(0xa1) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } l = uint64(2) @@ -98513,17 +98511,17 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if c-uint32(129) <= uint32(Int32FromInt32(159)-Int32FromInt32(129)) { + if c-uint32(129) <= Uint32FromInt32(Int32FromInt32(159)-Int32FromInt32(129)) { c -= uint32(129) } else { - if c-uint32(224) <= uint32(Int32FromInt32(239)-Int32FromInt32(224)) { + if c-uint32(224) <= Uint32FromInt32(Int32FromInt32(239)-Int32FromInt32(224)) { c -= uint32(193) } else { goto ilseq } } c *= uint32(2) - if d-uint32(64) <= uint32(Int32FromInt32(158)-Int32FromInt32(64)) { + if d-uint32(64) <= Uint32FromInt32(Int32FromInt32(158)-Int32FromInt32(64)) { if d == uint32(127) { goto ilseq } @@ -98532,7 +98530,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } d -= uint32(64) } else { - if d-uint32(159) <= uint32(Int32FromInt32(252)-Int32FromInt32(159)) { + if d-uint32(159) <= Uint32FromInt32(Int32FromInt32(252)-Int32FromInt32(159)) { c++ d -= uint32(159) } @@ -98557,10 +98555,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) if c == uint32(0x8e) { c = d - if c-uint32(0xa1) > uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + if c-uint32(0xa1) > Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { goto ilseq } - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } c -= uint32(0xa1) @@ -98588,7 +98586,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c != uint32('(') && c != uint32('$') { goto ilseq } - switch uint32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { + switch Uint32FromInt32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { case uint32('B'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(0) goto _1 @@ -98598,10 +98596,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui case uint32('I'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(4) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('@')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('@')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(2) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('B')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('B')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(3) goto _1 } @@ -98637,7 +98635,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto ilseq } if c-uint32(0x21) < uint32(0x5e) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) } break } @@ -98670,11 +98668,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d < uint32(0xa1) && int32(type1) == int32(GB2312) { + if d < uint32(0xa1) && Int32FromUint8(type1) == int32(GB2312) { goto ilseq } if d-uint32(0x40) >= uint32(191) || d == uint32(127) { - if d-uint32('0') > uint32(9) || int32(type1) != int32(GB18030) { + if d-uint32('0') > uint32(9) || Int32FromUint8(type1) != int32(GB18030) { goto ilseq } l = uint64(4) @@ -98745,23 +98743,23 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d-uint32(0x40) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < uint32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { + if d-uint32(0x40) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < Uint32FromInt32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { goto ilseq } d -= uint32(0x40) if d > uint32(0x3e) { d -= uint32(0x22) } - if c-uint32(0xa1) >= uint32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { - if c-uint32(0x87) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { + if c-uint32(0xa1) >= Uint32FromInt32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { + if c-uint32(0x87) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { goto ilseq } if c < uint32(0xa1) { c -= uint32(0x87) } else { - c -= uint32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) + c -= Uint32FromInt32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) } - c = uint32(int32(_hkscs[uint32(4867)+(c*uint32(157)+d)/uint32(16)])>>((c*uint32(157)+d)%uint32(16))%int32(2)<>((c*uint32(157)+d)%uint32(16))%int32(2)< *(*Tsize_t)(unsafe.Pointer(outb)) { goto toobig } @@ -98790,7 +98788,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } c -= uint32(0xa1) - c = uint32(int32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(&_big5)) + uintptr(c)*314 + uintptr(d)*2))) | BoolInt32(c == uint32(0x27) && (d == uint32(0x3a) || d == uint32(0x3c) || d == uint32(0x42)))<= uint32(93) || d >= uint32(94) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) d += uint32(0xa1) - if c >= uint32(93) || c >= uint32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { + if c >= uint32(93) || c >= Uint32FromInt32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { goto ilseq } if d-uint32('A') < uint32(26) { @@ -98819,7 +98817,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if d-uint32('a') < uint32(26) { d = d - uint32('a') + uint32(26) } else { - if d-uint32(0x81) < uint32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { + if d-uint32(0x81) < Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { d = d - uint32(0x81) + uint32(52) } else { goto ilseq @@ -98829,7 +98827,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(0x20) { c = uint32(178)*c + d } else { - c = uint32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d + c = Uint32FromInt32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d } c += uint32(0xac00) d = uint32(0xac00) @@ -98884,7 +98882,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } _23: ; - switch int32(totype) { + switch Int32FromUint8(totype) { case int32(WCHAR_T): goto _35 case int32(UTF_8): @@ -98931,13 +98929,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui _36: ; if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { - k = uint64(Xwctomb(tls, bp+56, c)) + k = Uint64FromInt32(Xwctomb(tls, bp+56, c)) if *(*Tsize_t)(unsafe.Pointer(outb)) < k { goto toobig } Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(out)), bp+56, k) } else { - k = uint64(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), c)) + k = Uint64FromInt32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), c)) } *(*uintptr)(unsafe.Pointer(out)) += uintptr(k) *(*Tsize_t)(unsafe.Pointer(outb)) -= k @@ -98977,7 +98975,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui _53: ; d = c - c = uint32(int32(4) * int32(totype)) + c = Uint32FromInt32(int32(4) * Int32FromUint8(totype)) for { if !(c < uint32(256)) { break @@ -99006,8 +99004,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui c = uint32('~') goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) goto revout } c = _uni_to_jis(tls, c) @@ -99027,7 +99025,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v59 = int32(176) } - *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + uint32(v59)) + *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + Uint32FromInt32(v59)) v61 = out v60 = *(*uintptr)(unsafe.Pointer(v61)) *(*uintptr)(unsafe.Pointer(v61))++ @@ -99044,8 +99042,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) } else { c = _uni_to_jis(tls, c) } @@ -99070,7 +99068,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(7) { goto toobig } @@ -99181,14 +99179,14 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ; _43: ; - if c < uint32(0x10000) || uint32(int32(totype)-int32(UCS2BE)) < uint32(2) { + if c < uint32(0x10000) || Uint32FromInt32(Int32FromUint8(totype)-int32(UCS2BE)) < uint32(2) { if c >= uint32(0x10000) { c = uint32(0xFFFD) } if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(2) { goto toobig } - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(2) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 @@ -99197,8 +99195,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto toobig } c -= uint32(0x10000) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), int32(totype)) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), Int32FromUint8(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99212,7 +99210,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99230,19 +99228,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ilseq: ; err = int32(EILSEQ) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto toobig toobig: ; err = int32(E2BIG) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto starved starved: ; err = int32(EINVAL) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end end: ; @@ -99431,7 +99429,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { /* Limit name length and forbid leading dot or any slashes. */ n = uint64(0) for { - if !(n < uint64(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && int32(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { + if !(n < uint64(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { break } goto _8 @@ -99439,12 +99437,12 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { ; n++ } - if int32(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { val = __ccgo_ts + 531 } - builtin = BoolInt32(int32(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+531) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+539) != 0)) + builtin = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+531) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+539) != 0)) if builtin != 0 { - if cat == LC_CTYPE && int32(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { + if cat == LC_CTYPE && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { return uintptr(unsafe.Pointer(&X__c_dot_utf8)) } return uintptr(0) @@ -99472,7 +99470,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { break } z = X__strchrnul(tls, path, int32(':')) - l = uint64(int64(z) - int64(path)) + l = Uint64FromInt64(int64(z) - int64(path)) if l >= uint64(256)-n-uint64(2) { goto _10 } @@ -99711,8 +99709,8 @@ func _skipspace(tls *TLS, s uintptr) (r uintptr) { var v1, v2 int32 _, _ = v1, v2 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -99737,23 +99735,23 @@ func _evalprim(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { s = _skipspace(tls, s) if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { (*Tst)(unsafe.Pointer(st)).Fr = Xstrtoul(tls, s, bp, int32(10)) - if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == uint64(-Int32FromInt32(1)) { + if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == Uint64FromInt32(-Int32FromInt32(1)) { return __ccgo_ts } return _skipspace(tls, *(*uintptr)(unsafe.Pointer(bp))) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('n') { (*Tst)(unsafe.Pointer(st)).Fr = (*Tst)(unsafe.Pointer(st)).Fn return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(')') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(')') { return __ccgo_ts } return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('!') { s = _evalprim(tls, st, s+uintptr(1), d) (*Tst)(unsafe.Pointer(st)).Fr = BoolUint64(!((*Tst)(unsafe.Pointer(st)).Fr != 0)) return s @@ -99824,9 +99822,9 @@ func _parseop(tls *TLS, st uintptr, s uintptr) (r uintptr) { if !(i < int32(11)) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(_opch[i]) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(_opch[i]) { /* note: >,< are accepted with or without = */ - if i < int32(6) && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(_opch2[i]) { + if i < int32(6) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == Int32FromUint8(_opch2[i]) { (*Tst)(unsafe.Pointer(st)).Fop = i return s + uintptr(2) } @@ -99863,11 +99861,11 @@ func _evalbinop(tls *TLS, st uintptr, s uintptr, minprec int32, d int32) (r uint if op was missing then prec[op]==0 */ op = (*Tst)(unsafe.Pointer(st)).Fop - if int32(_prec[op]) <= minprec { + if Int32FromUint8(_prec[op]) <= minprec { return s } left = (*Tst)(unsafe.Pointer(st)).Fr - s = _evalbinop(tls, st, s, int32(_prec[op]), d) + s = _evalbinop(tls, st, s, Int32FromUint8(_prec[op]), d) if _binop(tls, st, op, left) != 0 { return __ccgo_ts } @@ -99903,12 +99901,12 @@ func _evalexpr(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { return __ccgo_ts } s = _evalbinop(tls, st, s, 0, d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') { return s } a = (*Tst)(unsafe.Pointer(st)).Fr s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(':') { return __ccgo_ts } b = (*Tst)(unsafe.Pointer(st)).Fr @@ -99934,10 +99932,10 @@ func X__pleval(tls *TLS, s uintptr, n uint64) (r uint64) { _ = v1 (*(*Tst)(unsafe.Pointer(bp))).Fn = n s = _evalexpr(tls, bp, s, int32(100)) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(';') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(';') { v1 = (*(*Tst)(unsafe.Pointer(bp))).Fr } else { - v1 = uint64(-Int32FromInt32(1)) + v1 = Uint64FromInt32(-Int32FromInt32(1)) } return v1 } @@ -99957,7 +99955,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { var _ /* part at bp+48 */ [24]uint8 var _ /* tmp_locale at bp+0 */ t__locale_struct _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, l, lm, lm1, p, part1, ret, s, same, z, v3, v4, v5, v6 - if uint32(cat) > uint32(LC_ALL) { + if Uint32FromInt32(cat) > uint32(LC_ALL) { return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&X__locale_lock))) @@ -99977,7 +99975,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { } z = X__strchrnul(tls, p, int32(';')) if int64(z)-int64(p) <= int64(LOCALE_NAME_MAX) { - Xmemcpy(tls, bp+48, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, bp+48, p, Uint64FromInt64(int64(z)-int64(p))) (*(*[24]uint8)(unsafe.Pointer(bp + 48)))[int64(z)-int64(p)] = uint8(0) if *(*uint8)(unsafe.Pointer(z)) != 0 { p = z + uintptr(1) @@ -100091,7 +100089,7 @@ _3: if !(n != 0 && *(*uint8)(unsafe.Pointer(fmt)) != 0) { goto _1 } - if !(int32(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { goto _4 } goto literal @@ -100107,7 +100105,7 @@ literal: _4: ; fmt++ - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { goto literal } fill = int32(' ') @@ -100116,11 +100114,11 @@ _4: nosym = 0 left = 0 for { - switch int32(*(*uint8)(unsafe.Pointer(fmt))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) { case int32('='): fmt++ v8 = fmt - fill = int32(*(*uint8)(unsafe.Pointer(v8))) + fill = Int32FromUint8(*(*uint8)(unsafe.Pointer(v8))) goto _7 case int32('^'): nogrp = int32(1) @@ -100148,7 +100146,7 @@ _4: if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - fw = int32(10)*fw + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + fw = int32(10)*fw + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _9 _9: ; @@ -100156,28 +100154,28 @@ _4: } lp = 0 rp = int32(2) - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { lp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - lp = int32(10)*lp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + lp = int32(10)*lp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _10 _10: ; fmt++ } } - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { rp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - rp = int32(10)*rp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + rp = int32(10)*rp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _11 _11: ; @@ -100186,13 +100184,13 @@ _4: } v12 = fmt fmt++ - intl = BoolInt32(int32(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) + intl = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) w = lp + int32(1) + rp if !(left != 0) && fw > w { w = fw } x = VaFloat64(&ap) - l = uint64(Xsnprintf(tls, s, n, __ccgo_ts+560, VaList(bp+8, w, rp, x))) + l = Uint64FromInt32(Xsnprintf(tls, s, n, __ccgo_ts+560, VaList(bp+8, w, rp, x))) if l >= n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(E2BIG) return int64(-int32(1)) @@ -100363,7 +100361,7 @@ func Xtextdomain(tls *TLS, domainname uintptr) (r uintptr) { return uintptr(0) } if !(_current_domain != 0) { - _current_domain = Xmalloc(tls, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + _current_domain = Xmalloc(tls, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if !(_current_domain != 0) { return uintptr(0) } @@ -100499,7 +100497,7 @@ func Xreallocarray(tls *TLS, ptr uintptr, m Tsize_t, n Tsize_t) (r uintptr) { trc("tls=%v ptr=%v m=%v n=%v, (%v:)", tls, ptr, m, n, origin(2)) defer func() { trc("-> %v", r) }() } - if n != 0 && m > uint64(-Int32FromInt32(1))/n { + if n != 0 && m > Uint64FromInt32(-Int32FromInt32(1))/n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -100573,7 +100571,7 @@ func X__expo2(tls *TLS, x float64, sign float64) (r float64) { var v1 Tuint64_t _, _ = scale, v1 /* note that k is odd and scale*scale overflows */ - v1 = uint64(uint32(Int32FromInt32(0x3ff)+_k2/Int32FromInt32(2))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(e != 0) { if *(*Tuint64_t)(unsafe.Pointer(bp))<> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(e != 0) { if *(*Tuint32_t)(unsafe.Pointer(bp))<> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix <= uint32(0x400f6a7a) { /* |x| ~<= 5pi/4 */ if ix&uint32(0xfffff) == uint32(0x921fb) { /* |x| ~= pi/2 or 2pi/2 */ @@ -100976,8 +100974,8 @@ medium: } *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - ex = int32(ix >> int32(20)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ex = Int32FromUint32(ix >> int32(20)) if ex-ey > int32(16) { /* 2nd round, good to 118 bits */ t = r w = fn * _pio2_2 @@ -100985,7 +100983,7 @@ medium: w = fn*_pio2_2t - (t - r - w) *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if ex-ey > int32(49) { /* 3rd round, good to 151 bits, covers all cases */ t = r w = fn * _pio2_3 @@ -101009,8 +101007,8 @@ _1: } /* set z = scalbn(|x|,-ilogb(x)+23) */ *(*float64)(unsafe.Pointer(bp)) = x - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) >> Int32FromInt32(12) - *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) >> Int32FromInt32(12) + *(*Tuint64_t)(unsafe.Pointer(bp)) |= Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) z = *(*float64)(unsafe.Pointer(bp)) i = 0 for { @@ -101029,7 +101027,7 @@ _1: for (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] == float64(0) { i-- } - n = X__rem_pio2_large(tls, bp+8, bp+32, int32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) + n = X__rem_pio2_large(tls, bp+8, bp+32, Int32FromUint32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) if sign != 0 { *(*float64)(unsafe.Pointer(y)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[0] *(*float64)(unsafe.Pointer(y + 1*8)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[int32(1)] @@ -101601,9 +101599,9 @@ func X__rem_pio2f(tls *TLS, x float32, y uintptr) (r int32) { return 0 } /* scale x into [2^23, 2^24-1] */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) - e0 = int32(ix>>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ - *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - uint32(e0<> int32(31)) + e0 = Int32FromUint32(ix>>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - Uint32FromInt32(e0<> int32(63)) + return Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) } // C documentation @@ -101663,7 +101661,7 @@ func X__signbitf(tls *TLS, x float32) (r int32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - return int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + return Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) } func X__signbitl(tls *TLS, x float64) (r int32) { @@ -101756,7 +101754,7 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) big = BoolInt32(hx&uint32(0x7fffffff) >= uint32(0x3FE59428)) /* |x| >= 0.6744 */ if big != 0 { - sign = int32(hx >> int32(31)) + sign = Int32FromUint32(hx >> int32(31)) if sign != 0 { x = -x y = -y @@ -101791,13 +101789,13 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { } /* -1.0/(x+r) has up to 2ulp error, so compute it accurately */ w0 = w - v2 = *(*Tuint64_t)(unsafe.Pointer(&w0))>>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) /* x < 1 domain error is handled in the called functions */ - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| < 2, up to 2ulp error in [1,1.125] */ return Xlog1p(tls, x-Float64FromInt32(1)+Xsqrt(tls, (x-Float64FromInt32(1))*(x-Float64FromInt32(1))+Float64FromInt32(2)*(x-Float64FromInt32(1)))) } - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| < 0x1p26 */ return Xlog(tls, Float64FromInt32(2)*x-Float64FromInt32(1)/(x+Xsqrt(tls, x*x-Float64FromInt32(1)))) } @@ -102043,12 +102041,12 @@ func Xacoshf(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x a = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - if a < uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { - if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { @@ -102288,15 +102286,15 @@ func Xasinhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i x3 = *(*float32)(unsafe.Pointer(bp)) - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { - if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { @@ -102552,7 +102550,7 @@ _2: } } /* |y/x| > 0x1p64 */ - if ix+uint32(Int32FromInt32(64)< 0x1p26 */ - if ix+uint32(Int32FromInt32(26)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) y3 = *(*float64)(unsafe.Pointer(bp)) - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { /* handle underflow */ if e == uint32(0) { if uint64(4) == uint64(4) { @@ -102911,10 +102909,10 @@ func Xatanhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) y3 = *(*float32)(unsafe.Pointer(bp)) - if *(*Tuint32_t)(unsafe.Pointer(bp)) < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(1)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -103216,12 +103214,12 @@ func Xceilf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -103388,7 +103386,7 @@ func Xcos(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) @@ -103482,7 +103480,7 @@ func Xcosf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -103528,12 +103526,12 @@ func Xcosh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(2) */ if w < uint32(0x3fe62e42) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -103781,7 +103779,7 @@ func Xerfc(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -103926,7 +103924,7 @@ func Xerff(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -103966,7 +103964,7 @@ func Xerfcf(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104134,7 +104132,7 @@ _3: kd -= X__exp_data.Fshift r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<>int32(52)&uint64(0x7ff) < uint64(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { + if *(*Tuint64_t)(unsafe.Pointer(bp + 8))>>int32(52)&uint64(0x7ff) < Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { if !(y != 0) { return _p10[int32(*(*float64)(unsafe.Pointer(bp)))+int32(15)] } @@ -104261,7 +104259,7 @@ func Xexp10f(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp + 4)) = *(*float32)(unsafe.Pointer(bp)) /* fabsf(n) < 8 without raising invalid on nan */ - if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < uint32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { + if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { if !(y != 0) { return _p101[int32(*(*float32)(unsafe.Pointer(bp)))+int32(7)] } @@ -104428,7 +104426,7 @@ _5: kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4043687A) { /* if |x|>=56*ln2 */ *(*float64)(unsafe.Pointer(bp)) = x3 @@ -104763,7 +104761,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return float64(1) + float64(2)*(x3-e) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ twopk = *(*float64)(unsafe.Pointer(bp + 8)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + float64(1) @@ -104774,7 +104772,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return y3 - float64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { @@ -104820,7 +104818,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4195b844) { /* if |x|>=27*ln2 */ if hx > uint32(0x7f800000) { /* NaN */ @@ -104898,7 +104896,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return Float32FromFloat32(1) + Float32FromFloat32(2)*(x3-e) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) + k) << int32(23)) /* 2^k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) + k) << int32(23)) /* 2^k */ twopk = *(*float32)(unsafe.Pointer(bp)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + Float32FromFloat32(1) @@ -104909,7 +104907,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return y3 - Float32FromFloat32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { y3 = (x3 - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk } else { @@ -105131,7 +105129,7 @@ func Xfloor(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -105191,12 +105189,12 @@ func Xfloorf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -105258,13 +105256,13 @@ func _normalize(tls *TLS, x float64) (r Tnum) { var v1 float64 _, _, _, _, _ = e, ix, sign, v1, v2 ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - e = int32(ix >> int32(52)) + e = Int32FromUint64(ix >> int32(52)) sign = e & int32(0x800) e &= int32(0x7ff) if !(e != 0) { v1 = x * float64(9.223372036854776e+18) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) - e = int32(ix >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(ix >> int32(52) & uint64(0x7ff)) if e != 0 { v2 = e - int32(63) } else { @@ -105391,7 +105389,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { v1 = *(*Tuint64_t)(unsafe.Pointer(bp)) // __asm__("clz %0, %1" : "=r"(x) : "r"(x)); X__assert_fail(tls, __ccgo_ts+350, __ccgo_ts+385, 80, __ccgo_ts+566) - v2 = int32(v1) + v2 = Int32FromUint64(v1) goto _3 _3: d = v2 - int32(1) @@ -105402,7 +105400,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { v4 = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) // __asm__("clz %0, %1" : "=r"(x) : "r"(x)); X__assert_fail(tls, __ccgo_ts+350, __ccgo_ts+385, 80, __ccgo_ts+566) - v5 = int32(v4) + v5 = Int32FromUint64(v4) goto _6 _6: d = v5 - int32(1) @@ -105418,7 +105416,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { } e -= d /* convert to double */ - i = int64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ + i = Int64FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ if sign != 0 { i = -i } @@ -105440,7 +105438,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { /* one bit is lost when scaled, add another top bit to only round once at conversion if it is inexact */ if *(*Tuint64_t)(unsafe.Pointer(bp))<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) + i = Int64FromUint64((*(*Tuint64_t)(unsafe.Pointer(bp))>>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) if sign != 0 { i = -i } @@ -105512,12 +105510,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = y } else { v9 = x @@ -105569,12 +105567,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = y } else { v9 = x @@ -105634,12 +105632,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = x } else { v9 = y @@ -105691,12 +105689,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = x } else { v9 = y @@ -105760,9 +105758,9 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* in the followings uxi should be ux.i, but then gcc wrongly adds */ /* float load/store to inner loops ruining performance and code size */ uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) @@ -105794,7 +105792,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ex-- i <<= uint64(1) } - uxi <<= uint64(-ex + int32(1)) + uxi <<= Uint64FromInt32(-ex + int32(1)) } else { uxi = uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -105856,11 +105854,11 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { /* scale result */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } - uxi |= uint64(sx) << int32(63) + uxi |= Uint64FromInt32(sx) << int32(63) *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi return *(*float64)(unsafe.Pointer(bp + 8)) } @@ -105905,8 +105903,8 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) sx = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) & uint32(0x80000000) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -105954,7 +105952,7 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -105997,9 +105995,9 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { /* scale result up */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } uxi |= sx *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi @@ -106036,7 +106034,7 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { Fd float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ee = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(ee != 0) { if x != 0 { x = Xfrexp(tls, x*float64(1.8446744073709552e+19), e) @@ -106080,7 +106078,7 @@ func Xfrexpf(tls *TLS, x float32, e uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + ee = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(ee != 0) { if x != 0 { x = Xfrexpf(tls, float32(float64(x)*float64(1.8446744073709552e+19)), e) @@ -106188,8 +106186,8 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) { })(unsafe.Pointer(bp + 8)) = ut } /* special cases */ - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) x = *(*float64)(unsafe.Pointer(bp)) y = *(*float64)(unsafe.Pointer(bp + 8)) /* note: hypot(inf,nan) == inf */ @@ -106281,19 +106279,19 @@ func Xhypotf(tls *TLS, x float32, y float32) (r float32) { } x = *(*float32)(unsafe.Pointer(bp)) y = *(*float32)(unsafe.Pointer(bp + 4)) - if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(25)<= Uint32FromInt32(Int32FromInt32(0xff)<= Uint32FromInt32(Int32FromInt32(25)<= uint32((Int32FromInt32(0x7f)+Int32FromInt32(60))<= Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(60))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { i <<= uint64(12) if i == uint64(0) { @@ -106409,7 +106407,7 @@ func Xilogbf(tls *TLS, x3 float32) (r int32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) - e = int32(i >> int32(23) & uint32(0xff)) + e = Int32FromUint32(i >> int32(23) & uint32(0xff)) if !(e != 0) { i <<= uint32(9) if i == uint32(0) { @@ -107217,7 +107215,7 @@ func Xj1(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { return Float64FromInt32(1) / (x * x) @@ -107553,7 +107551,7 @@ func Xj1f(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return Float32FromInt32(1) / (x * x) @@ -107842,7 +107840,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108044,7 +108042,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108138,7 +108136,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { var ix Tuint32_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = a, b, h, i, ix, k, nf, nm1, q0, q1, sign, t, temp, tmp, w, z, v6 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108303,7 +108301,7 @@ func Xynf(tls *TLS, n int32, x float32) (r float32) { var ib, ix Tuint32_t _, _, _, _, _, _, _, _, _, _ = a, b, i, ib, ix, nm1, sign, temp, v1, v3 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108505,12 +108503,12 @@ func X__lgamma_r(tls *TLS, x float64, signgamp uintptr) (r1 float64) { *(*float64)(unsafe.Pointer(bp)) = x /* purge off +-inf, NaN, +-0, tiny and negative arguments */ *(*int32)(unsafe.Pointer(signgamp)) = int32(1) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix >= uint32(0x7ff00000) { return x * x } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(70))<> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) ix = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return x * x @@ -109029,7 +109027,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109050,8 +109048,8 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<>Int32FromInt32(20)) - int32(0x3ff) + hx += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k += Int32FromUint32(hx>>Int32FromInt32(20)) - int32(0x3ff) hx = hx&uint32(0x000fffff) + uint32(0x3fe6a09e) *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(hx)<>Int32FromInt32(23)) - int32(0x7f) + ix += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k += Int32FromUint32(ix>>Int32FromInt32(23)) - int32(0x7f) ix = ix&uint32(0x007fffff) + uint32(0x3f3504f3) *(*Tuint32_t)(unsafe.Pointer(bp)) = ix x = *(*float32)(unsafe.Pointer(bp)) @@ -109312,7 +109310,7 @@ func Xlog1p(tls *TLS, x3 float64) (r float64) { } /* log1p(-1) = -inf */ return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } - if hx<> int32(32)) - hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) - k = int32(hu>>Int32FromInt32(20)) - int32(0x3ff) + hu += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k = Int32FromUint32(hu>>Int32FromInt32(20)) - int32(0x3ff) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(54) { if k >= int32(2) { @@ -109412,7 +109410,7 @@ func Xlog1pf(tls *TLS, x3 float32) (r float32) { } /* log1p(-1)=+inf */ return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } - if ix<>Int32FromInt32(23)) - int32(0x7f) + iu += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k = Int32FromUint32(iu>>Int32FromInt32(23)) - int32(0x7f) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(25) { if k >= int32(2) { @@ -109533,7 +109531,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109554,8 +109552,8 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109645,16 +109643,16 @@ func Xlog2f(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + k = Int32FromUint32(tmp) >> int32(23) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -109821,7 +109819,7 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) } - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109835,14 +109833,14 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % uint32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + i = Int32FromUint32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ iz = ix - tmp&uint32(0xff800000) invc = (*(*struct { Finvc float64 @@ -109981,7 +109979,7 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) /* no fractional part */ if e >= int32(52) { *(*float64)(unsafe.Pointer(iptr)) = x @@ -110033,7 +110031,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) /* no fractional part */ if e >= int32(23) { *(*float32)(unsafe.Pointer(iptr)) = x @@ -110049,7 +110047,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { *(*float32)(unsafe.Pointer(iptr)) = *(*float32)(unsafe.Pointer(bp)) return x } - mask = uint32(int32(0x007fffff) >> e) + mask = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&mask == uint32(0) { *(*float32)(unsafe.Pointer(iptr)) = x *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x80000000) @@ -110172,7 +110170,7 @@ _2: *(*Tuint64_t)(unsafe.Pointer(bp + 8))++ } } - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) /* raise overflow if ux.f is infinite and x is finite */ if e == int32(0x7ff) { if uint64(8) == uint64(4) { @@ -110373,7 +110371,7 @@ _2: v6 = *(*uint64)(unsafe.Pointer(bp + 8)) goto _7 _7: - if int32(v6>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v6>>Int32FromInt32(63)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16)) |= uint32(0x80000000) } } else { @@ -110382,7 +110380,7 @@ _2: v8 = *(*uint32)(unsafe.Pointer(bp)) goto _9 _9: - if int32(v8>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v8>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ @@ -110392,7 +110390,7 @@ _2: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- @@ -110467,8 +110465,8 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF2) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(iy >> int32(52) & uint64(0x7ff)) if e < int32(0x3ff) { return 0 } @@ -110706,7 +110704,7 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) topx = _top124(tls, x1) topy = _top124(tls, y1) - if topx-uint32(0x001) >= uint32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topx-uint32(0x001) >= Uint32FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1. */ /* Special cases: (x < 0x1p-126 or inf or nan) or @@ -110762,12 +110760,12 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { return X__math_invalid(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) + sign_bias = Uint32FromInt32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) } ix &= uint64(0x7fffffffffffffff) topx &= uint32(0x7ff) } - if topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: sign_bias == 0 here because y is not odd. */ v10 = float64(1) if ix == *(*Tuint64_t)(unsafe.Pointer(&v10)) { @@ -110852,10 +110850,10 @@ func _log2_inline(tls *TLS, ix Tuint32_t) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF3) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ + k = Int32FromUint32(top) >> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -110901,7 +110899,7 @@ _2: kd -= X__exp2f_data.Fshift_scaled /* k/N */ r = xd - kd /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */ - t = *(*Tuint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + uintptr(ki%uint64(Int32FromInt32(1)<> int32(23) & uint32(0xff)) + e = Int32FromUint32(iy >> int32(23) & uint32(0xff)) if e < int32(0x7f) { return 0 } if e > Int32FromInt32(0x7f)+Int32FromInt32(23) { return int32(2) } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { return 0 } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { return int32(1) } return int32(2) @@ -110959,7 +110957,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { sign_bias = uint32(0) ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) iy = *(*Tuint32_t)(unsafe.Pointer(&y1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ if _zeroinfnan1(tls, iy) != 0 { if uint32(2)*iy == uint32(0) { @@ -110971,10 +110969,10 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { return x1 + y1 } - if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { + if uint32(2)*ix == Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) } - if BoolInt32(uint32(2)*ix < uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { + if BoolInt32(uint32(2)*ix < Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { return Float32FromFloat32(0) } /* |x|<1 && y==inf or |x|>1 && y==-inf. */ return y1 * y1 @@ -111005,7 +111003,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { return X__math_invalidf(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) + sign_bias = Uint32FromInt32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) } ix &= uint32(0x7fffffff) } @@ -111014,7 +111012,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } } logx = _log2_inline(tls, ix) @@ -111138,10 +111136,10 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) - sy = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sy = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint64_t)(unsafe.Pointer(bp + 16))<> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -111242,9 +111240,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi x = *(*float64)(unsafe.Pointer(bp + 8)) @@ -111257,9 +111255,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v10 = -int32(q) + v10 = -Int32FromUint32(q) } else { - v10 = int32(q) + v10 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v10 if sx != 0 { @@ -111311,10 +111309,10 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) - sx = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) - sy = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + sx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) + sy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111359,7 +111357,7 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111413,9 +111411,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi x = *(*float32)(unsafe.Pointer(bp + 4)) @@ -111428,9 +111426,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -111476,8 +111474,8 @@ func Xrint(tls *TLS, x float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - s = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + s = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x } @@ -111525,8 +111523,8 @@ func Xrintf(tls *TLS, x float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) - s = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + s = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x } @@ -111584,7 +111582,7 @@ func Xround(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x3 } @@ -111649,7 +111647,7 @@ func Xroundf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x3 } @@ -111873,7 +111871,7 @@ func Xscalbn(tls *TLS, x float64, n int32) (r float64) { } } } - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(Int32FromInt32(0x3ff)+n) << int32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) = Uint64FromInt32(Int32FromInt32(0x3ff)+n) << int32(52) x = y * *(*float64)(unsafe.Pointer(bp)) return x } @@ -111915,7 +111913,7 @@ func Xscalbnf(tls *TLS, x float32, n int32) (r float32) { } } } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32(Int32FromInt32(0x7f)+n) << int32(23) + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32(Int32FromInt32(0x7f)+n) << int32(23) x = y * *(*float32)(unsafe.Pointer(bp)) return x } @@ -111997,7 +111995,7 @@ func Xsin(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) @@ -112070,7 +112068,7 @@ func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) s = X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) c = X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) switch n & Uint32FromInt32(3) { @@ -112217,7 +112215,7 @@ func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) s = X__sindf(tls, *(*float64)(unsafe.Pointer(bp))) c = X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) switch n & Uint32FromInt32(3) { @@ -112279,7 +112277,7 @@ func Xsinf(tls *TLS, x3 float32) (r float32) { var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ @@ -112396,14 +112394,14 @@ func Xsinh(tls *TLS, x float64) (r float64) { h = -h } /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) absx = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(DBL_MAX) */ if w < uint32(0x40862e42) { t = Xexpm1(tls, absx) if w < uint32(0x3ff00000) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<> int32(52) - if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { + if top-uint64(0x001) >= Uint64FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return x1 @@ -112537,7 +112535,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { x = 4^e m; with integer e, and m in [1, 4) m: fixed point representation [2.62] 2^e is the exponent part of the result. */ - even = int32(top & uint64(1)) + even = Int32FromUint64(top & uint64(1)) m = ix<>= uint64(1) @@ -112581,7 +112579,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { /* handle rounding modes and inexact exception: only (s+1)^2 == 2^42 m case is exact otherwise add a tiny value to cause the fenv effects. */ - tiny = uint64(v2) + tiny = Uint64FromInt64(v2) tiny |= (d1 ^ d2) & uint64(0x8000000000000000) t = *(*float64)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112666,7 +112664,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { var v3 int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, t, tiny, u, y, y1, v1, v2, v3, v4 ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return x1 @@ -112680,7 +112678,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 4^e m; with int e and m in [1, 4). */ even = ix & uint32(0x00800000) @@ -112694,7 +112692,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { m = v2 /* 2^e is the exponent part of the return value. */ ey = ix >> int32(1) - ey += uint32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) + ey += Uint32FromInt32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) ey &= uint32(0x7f800000) i = ix >> Int32FromInt32(17) % uint32(128) r = uint32(X__rsqrt_tab[i]) << int32(16) @@ -112726,7 +112724,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { v3 = int32(0x01000000) } /* handle rounding and inexact exception. */ - tiny = uint32(v3) + tiny = Uint32FromInt32(v3) tiny |= (d1 ^ d2) & uint32(0x80000000) t = *(*float32)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112801,8 +112799,8 @@ func Xtan(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) - return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) + return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], Int32FromUint32(n&uint32(1))) } const M_PI_29 = 1.5707963267948966 @@ -112902,8 +112900,8 @@ func Xtanf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x3, bp)) - return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) + return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), Int32FromUint32(n&uint32(1))) } const M_PI_210 = 0 @@ -112940,8 +112938,8 @@ func Xtanh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { @@ -113013,7 +113011,7 @@ func Xtanhf(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) @@ -113238,13 +113236,13 @@ func Xtgamma(tls *TLS, x3 float64) (r1 float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ return x3 + float64(X__builtin_inff(tls)) } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { return x3 } @@ -113397,7 +113395,7 @@ func Xtruncf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { return x3 } @@ -113446,18 +113444,18 @@ func Xa64l(tls *TLS, s uintptr) (r int64) { if !(e < int32(36) && *(*uint8)(unsafe.Pointer(s)) != 0) { break } - d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), int32(*(*uint8)(unsafe.Pointer(s)))) + d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) if !(d != 0) { break } - x |= uint32(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e + x |= Uint32FromInt64(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e goto _1 _1: ; e += int32(6) s++ } - return int64(int32(x)) + return int64(Int32FromUint32(x)) } func Xl64a(tls *TLS, x0 int64) (r uintptr) { @@ -113468,7 +113466,7 @@ func Xl64a(tls *TLS, x0 int64) (r uintptr) { var p uintptr var x Tuint32_t _, _ = p, x - x = uint32(x0) + x = Uint32FromInt64(x0) p = uintptr(unsafe.Pointer(&_s)) for { if !(x != 0) { @@ -113499,7 +113497,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint64(1) for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) @@ -113509,7 +113507,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('/')) { break } goto _2 @@ -113540,7 +113538,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint64(1) for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -113552,7 +113550,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { break } if !(i != 0) { @@ -113564,7 +113562,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -113587,7 +113585,7 @@ func Xffs(tls *TLS, i int32) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_l(tls, uint64(i)) + int32(1) + v1 = _a_ctz_l(tls, Uint64FromInt32(i)) + int32(1) } else { v1 = 0 } @@ -113602,7 +113600,7 @@ func Xffsl(tls *TLS, i int64) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_l(tls, uint64(i)) + int32(1) + v1 = _a_ctz_l(tls, Uint64FromInt64(i)) + int32(1) } else { v1 = 0 } @@ -113618,13 +113616,13 @@ func Xffsll(tls *TLS, i int64) (r int32) { var v2 Tuint64_t _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint64(i) + v2 = Uint64FromInt64(i) // __asm__( // // " rbit %0, %1\n clz %0, %0\n" // : "=r"(x) : "r"(x)); X__assert_fail(tls, __ccgo_ts+350, __ccgo_ts+385, 70, __ccgo_ts+572) - v3 = int32(v2) + v3 = Int32FromUint64(v2) goto _4 _4: v1 = v3 + int32(1) @@ -113666,10 +113664,10 @@ func __strcolcmp(tls *TLS, lstr uintptr, bstr uintptr) (r int32) { var i Tsize_t _ = i i = uint64(0) - for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { + for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { i++ } - if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { + if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { return int32(1) } return 0 @@ -113954,7 +113952,7 @@ func Xgetentropy(tls *TLS, buffer uintptr, len1 Tsize_t) (r int32) { } } pos += uintptr(ret) - len1 -= uint64(ret) + len1 -= Uint64FromInt32(ret) ret = 0 } _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) @@ -114022,8 +114020,8 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if Xoptind >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) != int32('-') { - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { v1 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v1)*8)) @@ -114034,7 +114032,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { Xoptind++ return -Int32FromInt32(1) } @@ -114053,7 +114051,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { Xoptind++ X__optpos = 0 } - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { optstring++ } i = 0 @@ -114067,15 +114065,15 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { } } if *(*Twchar_t)(unsafe.Pointer(bp + 4)) != *(*Twchar_t)(unsafe.Pointer(bp)) || *(*Twchar_t)(unsafe.Pointer(bp)) == uint32(':') { - Xoptopt = int32(*(*Twchar_t)(unsafe.Pointer(bp))) - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+696, optchar, uint64(k)) + Xoptopt = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+696, optchar, Uint64FromInt32(k)) } return int32('?') } - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { Xoptarg = uintptr(0) - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { v3 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v3)*8)) @@ -114085,17 +114083,17 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { X__optpos = 0 } if Xoptind > argc { - Xoptopt = int32(*(*Twchar_t)(unsafe.Pointer(bp))) - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { + Xoptopt = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { return int32(':') } if Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+720, optchar, uint64(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+720, optchar, Uint64FromInt32(k)) } return int32('?') } } - return int32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) } func X__posix_getopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { @@ -114149,13 +114147,13 @@ func ___getopt_long(tls *TLS, argc int32, argv uintptr, optstring uintptr, longo return -int32(1) } skipped = Xoptind - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { i = Xoptind for { if i >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + 1)) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + 1)) != 0 { break } goto _1 @@ -114190,8 +114188,8 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, var cnt, colon, i, j, l, match, v2 int32 _, _, _, _, _, _, _, _, _, _, _, _, _ = arg, cnt, colon, i, j, l, match, name, opt, start, v2, v5, v6 Xoptarg = uintptr(0) - if longopts != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { - colon = BoolInt32(int32(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) + if longopts != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { + colon = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) start = *(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + uintptr(1) v2 = Int32FromInt32(0) i = v2 @@ -114202,14 +114200,14 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } name = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fname opt = start - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { opt++ } - for *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && int32(*(*uint8)(unsafe.Pointer(opt))) == int32(*(*uint8)(unsafe.Pointer(name))) { + for *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) { name++ opt++ } - if *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { + if *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { goto _1 } arg = opt @@ -114233,7 +114231,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } j = 0 for { - if !(j < l && int32(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { + if !(j < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { break } goto _4 @@ -114255,7 +114253,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, i = match opt = arg Xoptind++ - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { if !((*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fhas_arg != 0) { Xoptopt = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fval if colon != 0 || !(Xopterr != 0) { @@ -114292,7 +114290,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } return (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fval } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') { Xoptopt = 0 if !(colon != 0) && Xopterr != 0 { if cnt != 0 { @@ -114332,7 +114330,7 @@ func Xgetpriority(tls *TLS, which int32, who Tid_t) (r int32) { } var ret int32 _ = ret - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getpriority), int64(which), int64(who))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getpriority), int64(which), Int64FromUint32(who))))) if ret < 0 { return ret } @@ -114344,7 +114342,7 @@ func Xgetresgid(tls *TLS, rgid uintptr, egid uintptr, sgid uintptr) (r int32) { trc("tls=%v rgid=%v egid=%v sgid=%v, (%v:)", tls, rgid, egid, sgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) } func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { @@ -114352,7 +114350,7 @@ func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { trc("tls=%v ruid=%v euid=%v suid=%v, (%v:)", tls, ruid, euid, suid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) } func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { @@ -114366,7 +114364,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { var v1, v2 uint64 var _ /* k_rlim at bp+0 */ [2]uint64 _, _, _ = ret, v1, v2 - ret = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) if !(ret != 0) { if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur = ^Uint64FromUint64(0) @@ -114378,7 +114376,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { if !(ret != 0) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) { return ret } - if X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getrlimit), int64(resource), int64(bp)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getrlimit), int64(resource), int64(bp)))) < 0 { return -int32(1) } if (*(*[2]uint64)(unsafe.Pointer(bp)))[0] == -Uint64FromUint64(1) { @@ -114426,7 +114424,7 @@ func Xgetrusage(tls *TLS, who int32, ru uintptr) (r1 int32) { Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { @@ -114458,7 +114456,7 @@ func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { if Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(keys + uintptr(i)*8)), s, l) != 0 { goto _3 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { *(*uintptr)(unsafe.Pointer(val)) = s + uintptr(l) + uintptr(1) } else { if *(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0 { @@ -114522,8 +114520,8 @@ var _compat_map = [20]Tioctl_compat_map{ }, }, 2: { - Fnew_req: int32(uint64(Uint32FromUint32(2)< %v", r) }() } - return int32(X__libc.Fsecure) + return Int32FromUint8(X__libc.Fsecure) } func Xlockf(tls *TLS, fd int32, op int32, size Toff_t) (r int32) { @@ -114978,7 +114976,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { src = beg for *(*uint8)(unsafe.Pointer(src)) != 0 { cval = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { v1 = dest dest++ v2 = src @@ -114986,7 +114984,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { *(*uint8)(unsafe.Pointer(v1)) = *(*uint8)(unsafe.Pointer(v2)) continue } - if int32(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { src++ v3 = dest dest++ @@ -115001,11 +114999,11 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { if !(i < int32(3)) { break } - if int32(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && int32(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { cval = uint8(int32(cval) << Int32FromInt32(3)) v6 = val val++ - cval = uint8(int32(cval) + (int32(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) + cval = uint8(int32(cval) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) } else { break } @@ -115045,7 +115043,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 use_internal = BoolInt32(linebuf == uintptr(unsafe.Pointer(&_internal_buf))) (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_freq = 0 (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_passno = 0 - for cond := true; cond; cond = int32(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || uint64((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { + for cond := true; cond; cond = Int32FromUint8(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || Uint64FromInt32((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { if use_internal != 0 { Xgetline(tls, uintptr(unsafe.Pointer(&_internal_buf)), uintptr(unsafe.Pointer(&_internal_bufsize)), f) linebuf = _internal_buf @@ -115069,7 +115067,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 if !(i < Uint64FromInt64(32)/Uint64FromInt64(4)) { break } - (*(*[8]int32)(unsafe.Pointer(bp)))[i] = int32(len1) + (*(*[8]int32)(unsafe.Pointer(bp)))[i] = Int32FromUint64(len1) goto _1 _1: ; @@ -115141,7 +115139,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h var _ /* st at bp+0 */ Tstat _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, de, dfd, err, j, k, l, r, type1, v1, v10, v11, v12, v13, v2, v3, v4, v7, v8 l = Xstrlen(tls, path) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint64(1))))) == int32('/') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint64(1))))) == int32('/') { v1 = l - uint64(1) } else { v1 = l @@ -115196,14 +115194,14 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h v4 = 0 } (*(*Thistory)(unsafe.Pointer(bp + 128))).Flevel = v4 - (*(*Thistory)(unsafe.Pointer(bp + 128))).Fbase = int32(j + uint64(1)) + (*(*Thistory)(unsafe.Pointer(bp + 128))).Fbase = Int32FromUint64(j + uint64(1)) (*(*TFTW)(unsafe.Pointer(bp + 160))).Flevel = (*(*Thistory)(unsafe.Pointer(bp + 128))).Flevel if h != 0 { (*(*TFTW)(unsafe.Pointer(bp + 160))).Fbase = (*Thistory)(unsafe.Pointer(h)).Fbase } else { k = j for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { break } goto _5 @@ -115212,7 +115210,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h k-- } for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint64(1))))) != int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint64(1))))) != int32('/')) { break } goto _6 @@ -115220,7 +115218,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h ; k-- } - (*(*TFTW)(unsafe.Pointer(bp + 160))).Fbase = int32(k) + (*(*TFTW)(unsafe.Pointer(bp + 160))).Fbase = Int32FromUint64(k) } if type1 == int32(FTW_D) || type1 == int32(FTW_DP) { dfd = Xopen(tls, path, O_RDONLY, 0) @@ -115264,7 +115262,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h if !(v10 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { continue } if Xstrlen(tls, de+19) >= uint64(PATH_MAX)-l { @@ -115439,12 +115437,12 @@ func X__ptsname_r(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if !(buf != 0) { len1 = uint64(0) } - v1 = int32(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Uint32FromUint32(TIOCGPTN)), int64(bp))) + v1 = int32(X__syscall3(tls, int64(SYS_ioctl), int64(fd), Int64FromUint32(Uint32FromUint32(TIOCGPTN)), int64(bp))) err = v1 if v1 != 0 { return -err } - if uint64(Xsnprintf(tls, buf, len1, __ccgo_ts+909, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { + if Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+909, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { return int32(ERANGE) } return 0 @@ -115462,10 +115460,10 @@ func _slash_len(tls *TLS, s uintptr) (r Tsize_t) { var s0 uintptr _ = s0 s0 = s - for int32(*(*uint8)(unsafe.Pointer(s))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('/') { s++ } - return uint64(int64(s) - int64(s0)) + return Uint64FromInt64(int64(s) - int64(s0)) } func Xrealpath(tls *TLS, filename uintptr, resolved uintptr) (r uintptr) { @@ -115511,7 +115509,7 @@ _3: ; /* If stack starts with /, the whole component is / or // * and the output state must be reset. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { check_dir = 0 nup = uint64(0) q = uint64(0) @@ -115520,7 +115518,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v4] = uint8('/') p++ /* Initial // is special. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint64(1)]) != int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint64(1)]) != int32('/') { v5 = q q++ (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v5] = uint8('/') @@ -115528,21 +115526,21 @@ _3: goto _2 } z = X__strchrnul(tls, bp+uintptr(p), int32('/')) - v6 = uint64(int64(z) - int64(bp+uintptr(p))) + v6 = Uint64FromInt64(int64(z) - int64(bp+uintptr(p))) l = v6 l0 = v6 if !(l != 0) && !(check_dir != 0) { goto _1 } /* Skip any . component but preserve check_dir status. */ - if l == uint64(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { + if l == uint64(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { p += l goto _2 } /* Copy next component onto output at least temporarily, to * call readlink, but wait to advance output position until * determining it's not a link. */ - if q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { + if q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { if !(p != 0) { goto toolong } @@ -115558,7 +115556,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q+l] = uint8(0) p += l up = 0 - if l0 == uint64(2) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(2)]) == int32('.') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(1)]) == int32('.') { + if l0 == uint64(2) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(2)]) == int32('.') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(1)]) == int32('.') { up = int32(1) /* Any non-.. path components we could cancel start * after nup repetitions of the 3-byte string "../"; @@ -115576,7 +115574,7 @@ _3: } } k = Xreadlink(tls, bp+4097, bp, p) - if uint64(k) == p { + if Uint64FromInt64(k) == p { goto toolong } if !(k != 0) { @@ -115594,10 +115592,10 @@ skip_readlink: ; check_dir = 0 if up != 0 { - for q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { + for q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { q-- } - if q > uint64(1) && (q > uint64(2) || int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { + if q > uint64(1) && (q > uint64(2) || Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { q-- } goto _2 @@ -115605,7 +115603,7 @@ skip_readlink: if l0 != 0 { q += l } - check_dir = int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) + check_dir = Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) goto _2 _8: ; @@ -115617,13 +115615,13 @@ _8: } /* If link contents end in /, strip any slashes already on * stack to avoid /->// or //->/// or spurious toolong. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int64(1)]) == int32('/') { - for int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int64(1)]) == int32('/') { + for Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { p++ } } - p -= uint64(k) - Xmemmove(tls, bp+uintptr(p), bp, uint64(k)) + p -= Uint64FromInt64(k) + Xmemmove(tls, bp+uintptr(p), bp, Uint64FromInt64(k)) /* Skip the stack advancement in case we have a new * absolute base path. */ goto restart @@ -115636,7 +115634,7 @@ _2: _1: ; (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q] = uint8(0) - if int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { + if Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { if !(Xgetcwd(tls, bp, uint64(4097)) != 0) { return uintptr(0) } @@ -115649,7 +115647,7 @@ _1: if !(v10 != 0) { break } - for l > uint64(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { + for l > uint64(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { l-- } if l > uint64(1) { @@ -115660,7 +115658,7 @@ _1: p++ } } - if q-p != 0 && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { + if q-p != 0 && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { v11 = l l++ (*(*[4097]uint8)(unsafe.Pointer(bp)))[v11] = uint8('/') @@ -115689,7 +115687,7 @@ func Xsetdomainname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), Int64FromUint64(len1))))) } func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { @@ -115697,7 +115695,7 @@ func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { trc("tls=%v which=%v who=%v prio=%v, (%v:)", tls, which, who, prio, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setpriority), int64(which), int64(who), int64(prio))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setpriority), int64(which), Int64FromUint32(who), int64(prio))))) } type Tctx = struct { @@ -115740,7 +115738,7 @@ func Xsetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { } ret = int32(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(rlim), int64(Int32FromInt32(0)))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur < ^Uint64FromUint64(0) { v1 = (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur @@ -115786,7 +115784,7 @@ func Xsyscall(tls *TLS, n int64, va uintptr) (r int64) { e = VaInt64(&ap) f = VaInt64(&ap) _ = ap - return X__syscall_ret(tls, uint64(X__syscall6(tls, n, a, b, c, d, e, f))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, n, a, b, c, d, e, f))) } const AF_ALG = 38 @@ -116214,19 +116212,19 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { pid = v1 l = Xsnprintf(tls, bp+80, uint64(1024), __ccgo_ts+930, VaList(bp+1120, priority, bp, bp+1104, uintptr(unsafe.Pointer(&_log_ident)), __ccgo_ts+952+BoolUintptr(!(pid != 0)), pid, __ccgo_ts+954+BoolUintptr(!(pid != 0)))) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = errno_save - l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-uint64(l), message, ap) + l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-Uint64FromInt32(l), message, ap) if l2 >= 0 { - if uint64(l2) >= uint64(1024)-uint64(l) { - l = int32(Uint64FromInt64(1024) - Uint64FromInt32(1)) + if Uint64FromInt32(l2) >= uint64(1024)-Uint64FromInt32(l) { + l = Int32FromUint64(Uint64FromInt64(1024) - Uint64FromInt32(1)) } else { l += l2 } - if int32((*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[l-int32(1)]) != int32('\n') { + if Int32FromUint8((*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[l-int32(1)]) != int32('\n') { v2 = l l++ (*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[v2] = uint8('\n') } - if Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { + if Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { fd = Xopen(tls, __ccgo_ts+649, Int32FromInt32(O_WRONLY)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC), 0) if fd >= 0 { Xdprintf(tls, fd, __ccgo_ts+956, VaList(bp+1120, l-*(*int32)(unsafe.Pointer(bp + 1104)), bp+80+uintptr(*(*int32)(unsafe.Pointer(bp + 1104))))) @@ -116278,7 +116276,7 @@ func Xuname(tls *TLS, uts uintptr) (r int32) { trc("tls=%v uts=%v, (%v:)", tls, uts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) } func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116286,7 +116284,7 @@ func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { trc("tls=%v addr=%v len1=%v advice=%v, (%v:)", tls, addr, len1, advice, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))))) } func Xmadvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116302,7 +116300,7 @@ func Xmincore(tls *TLS, addr uintptr, len1 Tsize_t, vec uintptr) (r int32) { trc("tls=%v addr=%v len1=%v vec=%v, (%v:)", tls, addr, len1, vec, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mincore), int64(addr), int64(len1), int64(vec))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mincore), int64(addr), Int64FromUint64(len1), int64(vec))))) } func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116310,7 +116308,7 @@ func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_mlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_mlock), int64(addr), Int64FromUint64(len1))))) } func Xmlockall(tls *TLS, flags int32) (r int32) { @@ -116318,7 +116316,7 @@ func Xmlockall(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) } const OFF_MASK = 4095 @@ -116334,23 +116332,23 @@ func X__mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd } var ret int64 _ = ret - if uint64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { + if Uint64FromInt64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } - if len1 >= uint64(Int64FromInt64(INT64_MAX)) { + if len1 >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } if flags&int32(MAP_FIXED) != 0 { _dummy5(tls) } - ret = X__syscall6(tls, int64(SYS_mmap), int64(start), int64(len1), int64(prot), int64(flags), int64(fd), off) + ret = X__syscall6(tls, int64(SYS_mmap), int64(start), Int64FromUint64(len1), int64(prot), int64(flags), int64(fd), off) /* Fixup incorrect EPERM from kernel. */ if ret == int64(-int32(EPERM)) && !(start != 0) && flags&int32(MAP_ANON) != 0 && !(flags&Int32FromInt32(MAP_FIXED) != 0) { ret = int64(-int32(ENOMEM)) } - return uintptr(X__syscall_ret(tls, uint64(ret))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(ret))) } func Xmmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { @@ -116370,7 +116368,7 @@ func X__mprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { _, _ = end, start start = uint64(addr) & -X__libc.Fpage_size end = uint64(addr+uintptr(len1)+uintptr(X__libc.Fpage_size)-UintptrFromInt32(1)) & -X__libc.Fpage_size - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mprotect), int64(start), int64(end-start), int64(prot))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mprotect), Int64FromUint64(start), Int64FromUint64(end-start), int64(prot))))) } func Xmprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { @@ -116393,7 +116391,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla var new_addr uintptr _, _ = ap, new_addr new_addr = uintptr(0) - if new_len >= uint64(Int64FromInt64(INT64_MAX)) { + if new_len >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } @@ -116403,7 +116401,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla new_addr = VaUintptr(&ap) _ = ap } - return uintptr(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), int64(old_len), int64(new_len), int64(flags), int64(new_addr))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), Int64FromUint64(old_len), Int64FromUint64(new_len), int64(flags), int64(new_addr))))) } func Xmremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, flags int32, va uintptr) (r uintptr) { @@ -116419,7 +116417,7 @@ func Xmsync(tls *TLS, start uintptr, len1 Tsize_t, flags int32) (r int32) { trc("tls=%v start=%v len1=%v flags=%v, (%v:)", tls, start, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msync), int64(start), int64(len1), int64(flags), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msync), int64(start), Int64FromUint64(len1), int64(flags), 0, 0, 0)))) } func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116427,7 +116425,7 @@ func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munlock), int64(addr), Int64FromUint64(len1))))) } func Xmunlockall(tls *TLS) (r int32) { @@ -116435,7 +116433,7 @@ func Xmunlockall(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_munlockall))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_munlockall))))) } func _dummy7(tls *TLS) { @@ -116447,7 +116445,7 @@ func X__munmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { defer func() { trc("-> %v", r) }() } _dummy7(tls) - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munmap), int64(start), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munmap), int64(start), Int64FromUint64(len1))))) } func Xmunmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { @@ -116466,7 +116464,7 @@ func Xposix_madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32 if advice == int32(MADV_DONTNEED) { return 0 } - return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))) + return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))) } func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { @@ -116476,12 +116474,12 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { } var p, v1 uintptr _, _ = p, v1 - for int32(*(*uint8)(unsafe.Pointer(name))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('/') { name++ } v1 = X__strchrnul(tls, name, int32('/')) p = v1 - if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int64(p)-int64(name) <= int64(2) && int32(*(*uint8)(unsafe.Pointer(name))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { + if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int64(p)-int64(name) <= int64(2) && Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -116490,7 +116488,7 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { return uintptr(0) } Xmemcpy(tls, buf, __ccgo_ts+961, uint64(9)) - Xmemcpy(tls, buf+uintptr(9), name, uint64(int64(p)-int64(name)+int64(1))) + Xmemcpy(tls, buf+uintptr(9), name, Uint64FromInt64(int64(p)-int64(name)+int64(1))) return buf } @@ -116555,9 +116553,9 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { var b, v3 int32 var v1, v2 uint32 _, _, _, _ = b, v1, v2, v3 - b = int32(uint8(c)) - if uint32(b) < uint32(128) { - v1 = uint32(b) + b = Int32FromUint8(Uint8FromInt32(c)) + if Uint32FromInt32(b) < uint32(128) { + v1 = Uint32FromInt32(b) } else { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v3 = int32(4) @@ -116565,7 +116563,7 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { v3 = int32(1) } if v3 == int32(1) && c != -int32(1) { - v2 = uint32(Int32FromInt32(0xdfff) & int32(int8(c))) + v2 = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(int8(c))) } else { v2 = uint32(0xffffffff) } @@ -116597,7 +116595,7 @@ func Xc16rtomb(tls *TLS, s uintptr, c16 Tchar16_t, ps uintptr) (r Tsize_t) { return uint64(1) } if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(c16)-uint32(0xd800) < uint32(0x400) { - *(*uint32)(unsafe.Pointer(x)) = uint32((int32(c16) - int32(0xd7c0)) << int32(10)) + *(*uint32)(unsafe.Pointer(x)) = Uint32FromInt32((Int32FromUint16(c16) - int32(0xd7c0)) << int32(10)) return uint64(0) } if *(*uint32)(unsafe.Pointer(x)) != 0 { @@ -116616,7 +116614,7 @@ ilseq: ; *(*uint32)(unsafe.Pointer(x)) = uint32(0) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } var _internal_state uint32 @@ -116674,12 +116672,12 @@ func Xmbrtoc16(tls *TLS, pc16 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } /* mbrtowc states for partial UTF-8 characters have the high bit set; * we use nonzero states without high bit for pending surrogates. */ - if int32(*(*uint32)(unsafe.Pointer(pending))) > 0 { + if Int32FromUint32(*(*uint32)(unsafe.Pointer(pending))) > 0 { if pc16 != 0 { *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*uint32)(unsafe.Pointer(pending))) } *(*uint32)(unsafe.Pointer(pending)) = uint32(0) - return uint64(-Int32FromInt32(3)) + return Uint64FromInt32(-Int32FromInt32(3)) } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) { @@ -116752,10 +116750,10 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize } } if !(n != 0) { - return uint64(-Int32FromInt32(2)) + return Uint64FromInt32(-Int32FromInt32(2)) } if !(c != 0) { - if int32(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { v1 = uint32(*(*uint8)(unsafe.Pointer(s))) *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolUint64(!!(v1 != 0)) @@ -116766,7 +116764,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize v2 = int32(1) } if v2 == int32(1) { - *(*Twchar_t)(unsafe.Pointer(wc)) = uint32(Int32FromInt32(0xdfff) & int32(int8(*(*uint8)(unsafe.Pointer(s))))) + *(*Twchar_t)(unsafe.Pointer(wc)) = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(Int8FromUint8(*(*uint8)(unsafe.Pointer(s))))) return Uint64FromInt32(1) } if uint32(*(*uint8)(unsafe.Pointer(s)))-uint32(0xc2) > Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -116778,7 +116776,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize n-- } if n != 0 { - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } goto loop @@ -116786,7 +116784,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize ; v4 = s s++ - c = c<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _9 } @@ -117067,13 +117065,13 @@ _15: goto resume resume: ; - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _13 } v27 = s s++ - c = c<= uint32(0x40) { s -= uintptr(2) @@ -117081,7 +117079,7 @@ resume: } v28 = s s++ - c = c<= uint32(0x40) { s -= uintptr(3) @@ -117089,7 +117087,7 @@ resume: } v29 = s s++ - c = c< Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117180,12 +117178,12 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { if n < uint64(4) && c<<(uint64(6)*n-uint64(6))&(Uint32FromUint32(1)<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } v4 = s s++ - c = c<= uint32(0x80) { l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(ws2)), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } n += l } else { @@ -117375,7 +117373,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, s, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } s += uintptr(l) n -= l @@ -117396,7 +117394,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if l > n { return N - n @@ -117434,7 +117432,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { var v1 int32 _ = v1 if c < uint32(128) { - return int32(c) + return Int32FromUint32(c) } if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) @@ -117442,7 +117440,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { v1 = int32(1) } if v1 == int32(1) && c-uint32(0xdf80) < uint32(0x80) { - return int32(uint8(c)) + return Int32FromUint8(uint8(c)) } return -int32(1) } @@ -117455,7 +117453,7 @@ func Xwctomb(tls *TLS, s uintptr, wc Twchar_t) (r int32) { if !(s != 0) { return 0 } - return int32(Xwcrtomb(tls, s, wc, uintptr(0))) + return Int32FromUint64(Xwcrtomb(tls, s, wc, uintptr(0))) } func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { @@ -117487,7 +117485,7 @@ func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } type Tucred = struct { @@ -117533,7 +117531,7 @@ func Xaccept4(tls *TLS, fd int32, addr uintptr, len1 uintptr, flg int32) (r1 int v8 = r goto _9 _9: - ret = int32(X__syscall_ret(tls, uint64(v8))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(v8))) if ret >= 0 || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) && *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(EINVAL) { return ret } @@ -117567,7 +117565,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_bind) v2 = int64(fd) v3 = int64(addr) - v4 = int64(len1) + v4 = Int64FromUint32(len1) v5 = int64(Int32FromInt32(0)) v6 = int64(Int32FromInt32(0)) v7 = int64(Int32FromInt32(0)) @@ -117583,7 +117581,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { @@ -117599,7 +117597,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_connect) v2 = int64(fd) v3 = int64(addr) - v4 = int64(len1) + v4 = Int64FromUint32(len1) v5 = int64(Int32FromInt32(0)) v6 = int64(Int32FromInt32(0)) v7 = int64(Int32FromInt32(0)) @@ -117615,7 +117613,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } const ADD = 0 @@ -118525,11 +118523,11 @@ func _getoffs(tls *TLS, offs uintptr, base uintptr, s uintptr) (r int32) { _, _ = i, v2 i = 0 for { - for int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { - if int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { return 0 } - s = base + uintptr(int32(*(*uint8)(unsafe.Pointer(s)))&Int32FromInt32(0x3f)< uint32(62) { + if Uint32FromInt32(j-k)-uint32(1) > uint32(62) { return 0 } v3 = i i++ - *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = uint8(j - k) + *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = Uint8FromInt32(j - k) if j == l { return i } @@ -118601,12 +118599,12 @@ func _match(tls *TLS, offset uintptr, base uintptr, dn uintptr, end uintptr, len for { nlen-- v2 = nlen - l = int32(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) + l = Int32FromUint8(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) noff-- v3 = noff o = int32((*(*[128]int16)(unsafe.Pointer(bp)))[v3]) end -= uintptr(l) - if l != int32(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, uint64(l)) != 0 { + if l != Int32FromUint8(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, Uint64FromInt32(l)) != 0 { return m } *(*int32)(unsafe.Pointer(offset)) = o @@ -118640,7 +118638,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l m = 0 bestlen = 0 l = Xstrnlen(tls, src, uint64(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint64(1))))) == int32('.') { l-- } if l > uint64(253) || space <= 0 { @@ -118651,7 +118649,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l return int32(1) } end = src + uintptr(l) - n = _getlens(tls, bp+4, src, int32(l)) + n = _getlens(tls, bp+4, src, Int32FromUint64(l)) if !(n != 0) { return -int32(1) } @@ -118666,7 +118664,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l if m > bestlen { bestlen = m bestoff = *(*int32)(unsafe.Pointer(bp)) - if uint64(m) == l { + if Uint64FromInt32(m) == l { break } } @@ -118677,15 +118675,15 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l } } /* encode unmatched part */ - if uint64(space) < l-uint64(bestlen)+uint64(2)+BoolUint64(uint64(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { + if Uint64FromInt32(space) < l-Uint64FromInt32(bestlen)+uint64(2)+BoolUint64(Uint64FromInt32(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { return -int32(1) } - Xmemcpy(tls, dst+uintptr(1), src, l-uint64(bestlen)) + Xmemcpy(tls, dst+uintptr(1), src, l-Uint64FromInt32(bestlen)) v3 = Int32FromInt32(0) j = v3 i = v3 for { - if !(uint64(i) < l-uint64(bestlen)) { + if !(Uint64FromInt32(i) < l-Uint64FromInt32(bestlen)) { break } *(*uint8)(unsafe.Pointer(dst + uintptr(i))) = (*(*[127]uint8)(unsafe.Pointer(bp + 4)))[j] @@ -118694,16 +118692,16 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l ; v4 = j j++ - i += int32((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) + i += Int32FromUint8((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) } /* add tail */ if bestlen != 0 { v5 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = uint8(int32(0xc0) | bestoff>>int32(8)) + *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = Uint8FromInt32(int32(0xc0) | bestoff>>int32(8)) v6 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(bestoff) + *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = Uint8FromInt32(bestoff) } else { v7 = i i++ @@ -118751,11 +118749,11 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr break } /* loop invariants: p= int64(end)-int64(p) || int64(j) >= int64(dend)-int64(dest) { return -int32(1) } @@ -118824,17 +118822,17 @@ func Xdn_skipname(tls *TLS, s uintptr, end uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { return int32(int64(p) - int64(s) + int64(1)) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { if p+uintptr(1) < end { return int32(int64(p) - int64(s) + int64(2)) } else { break } } else { - if int64(end)-int64(p) < int64(int32(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { + if int64(end)-int64(p) < int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { break } else { - p += uintptr(int32(*(*uint8)(unsafe.Pointer(p))) + int32(1)) + p += uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + int32(1)) } } } @@ -118948,12 +118946,12 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if rlen < int32(12) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { return 0 } p = r + uintptr(12) - qdcount = int32(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 5))) - ancount = int32(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 7))) + qdcount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 5))) + ancount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 7))) for { v1 = qdcount qdcount-- @@ -118981,11 +118979,11 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr return -int32(1) } p += uintptr(int32(1) + BoolInt32(!!(*(*uint8)(unsafe.Pointer(p)) != 0))) - len1 = int32(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(p + 9))) + len1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 9))) if int64(len1+int32(10)) > int64(r+uintptr(rlen))-int64(p) { return -int32(1) } - if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, int32(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { + if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { return -int32(1) } p += uintptr(int32(10) + len1) @@ -119327,7 +119325,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { break } if ii != 0 { - if int32(*(*uint8)(unsafe.Pointer(x))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != int32(':') { return uintptr(0) } else { x++ @@ -119344,7 +119342,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { ; ii++ } - if int32(*(*uint8)(unsafe.Pointer(x))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != 0 { return uintptr(0) } /* bad format */ *(*Tether_addr)(unsafe.Pointer(p_a)) = *(*Tether_addr)(unsafe.Pointer(bp)) @@ -119382,7 +119380,7 @@ func Xether_ntoa_r(tls *TLS, p_a uintptr, x uintptr) (r uintptr) { } else { v2 = __ccgo_ts + 976 } - x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, int32(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) + x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) goto _1 _1: ; @@ -119604,14 +119602,14 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt return -int32(5) } nais = nservs * naddrs - canon_len = int32(Xstrlen(tls, bp+1352)) - out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(88)+uint64(canon_len)+uint64(1)) + canon_len = Int32FromUint64(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), Uint64FromInt32(nais)*uint64(88)+Uint64FromInt32(canon_len)+uint64(1)) if !(out != 0) { return -int32(10) } if canon_len != 0 { outcanon = out + uintptr(nais)*88 - Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+int32(1))) + Xmemcpy(tls, outcanon, bp+1352, Uint64FromInt32(canon_len+int32(1))) } else { outcanon = uintptr(0) } @@ -119635,8 +119633,8 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*88))).Fai = Taddrinfo{ Fai_family: (*(*[48]Taddress)(unsafe.Pointer(bp + 8)))[i].Ffamily, - Fai_socktype: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), - Fai_protocol: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), + Fai_socktype: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), + Fai_protocol: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), Fai_addrlen: uint32(v5), Fai_addr: out + uintptr(k)*88 + 48, Fai_canonname: outcanon, @@ -119834,7 +119832,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu Fsin Tsockaddr_in F__ccgo_pad2 [12]byte }{} - *(*uint16)(unsafe.Pointer(bp)) = uint16(af) + *(*uint16)(unsafe.Pointer(bp)) = Uint16FromInt32(af) if af == int32(PF_INET6) { v1 = uint64(28) } else { @@ -119854,15 +119852,15 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu } } /* Align buffer and check for space for pointers and ip address */ - i = int32(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) + i = Int32FromUint64(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) if !(i != 0) { i = int32(8) } - if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-uint64(i)+uint64(l) { + if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-Uint64FromInt32(i)+uint64(l) { return int32(ERANGE) } - buf += uintptr(uint64(8) - uint64(i)) - buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - uint64(i) + uint64(l) + buf += uintptr(uint64(8) - Uint64FromInt32(i)) + buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - Uint64FromInt32(i) + uint64(l) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(Uint64FromInt32(2) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf @@ -119891,7 +119889,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu break } (*Thostent)(unsafe.Pointer(h)).Fh_addrtype = af - (*Thostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*Thostent)(unsafe.Pointer(h)).Fh_length = Int32FromUint32(l) (*Thostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 @@ -119978,7 +119976,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, /* Align buffer */ align = -uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1)) need = Uint64FromInt32(4) * Uint64FromInt64(8) - need += uint64(cnt+Int32FromInt32(1)) * (uint64(8) + uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + need += Uint64FromInt32(cnt+Int32FromInt32(1)) * (uint64(8) + Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) need += Xstrlen(tls, name) + uint64(1) need += Xstrlen(tls, bp+1344) + uint64(1) need += align @@ -119989,7 +119987,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(Uint64FromInt32(3) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf - buf += uintptr(uint64(cnt+Int32FromInt32(1)) * uint64(8)) + buf += uintptr(Uint64FromInt32(cnt+Int32FromInt32(1)) * uint64(8)) i = 0 for { if !(i < cnt) { @@ -119997,7 +119995,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf buf += uintptr((*Thostent)(unsafe.Pointer(h)).Fh_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) goto _2 _2: ; @@ -120246,17 +120244,17 @@ func _copy_addr(tls *TLS, r uintptr, af int32, sa uintptr, addr uintptr, addrlen case int32(PF_INET6): dst = sa + 8 len1 = int32(16) - if int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { - (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = uint32(ifindex) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { + (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = Uint32FromInt32(ifindex) } default: return } - if addrlen < uint64(len1) { + if addrlen < Uint64FromInt32(len1) { return } - (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(af) - Xmemcpy(tls, dst, addr, uint64(len1)) + (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = Uint16FromInt32(af) + Xmemcpy(tls, dst, addr, Uint64FromInt32(len1)) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -120267,15 +120265,15 @@ func _gen_netmask(tls *TLS, r uintptr, af int32, sa uintptr, prefixlen int32) { var _ /* addr at bp+0 */ [16]Tuint8_t _, _ = i, v1 *(*[16]Tuint8_t)(unsafe.Pointer(bp)) = [16]Tuint8_t{} - if uint64(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { - prefixlen = int32(Uint64FromInt32(8) * Uint64FromInt64(16)) + if Uint64FromInt32(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { + prefixlen = Int32FromUint64(Uint64FromInt32(8) * Uint64FromInt64(16)) } i = prefixlen / int32(8) - Xmemset(tls, bp, int32(0xff), uint64(i)) - if uint64(i) < uint64(16) { + Xmemset(tls, bp, int32(0xff), Uint64FromInt32(i)) + if Uint64FromInt32(i) < uint64(16) { v1 = i i++ - (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = uint8(int32(0xff) << (int32(8) - prefixlen%int32(8))) + (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = Uint8FromInt32(int32(0xff) << (int32(8) - prefixlen%int32(8))) } _copy_addr(tls, r, af, sa, bp, uint64(16), 0) } @@ -120301,21 +120299,21 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { ifi = h + UintptrFromInt64(16) ifa = h + UintptrFromInt64(16) stats_len = 0 - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { goto _1 } - stats_len = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) + stats_len = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) break goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } } else { ifs0 = *(*uintptr)(unsafe.Pointer(ctx + 16 + uintptr((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index%uint32(IFADDRS_HASH_SIZE))*8)) @@ -120335,19 +120333,19 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { return 0 } } - ifs = Xcalloc(tls, uint64(1), uint64(200)+uint64(stats_len)) + ifs = Xcalloc(tls, uint64(1), uint64(200)+Uint64FromInt32(stats_len)) if ifs == uintptr(0) { return -int32(1) } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = uint32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = Uint32FromInt32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFLA_IFNAME): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120365,7 +120363,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _3 _3: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { bucket = (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex % uint32(IFADDRS_HASH_SIZE) @@ -120375,22 +120373,22 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { } else { (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_name (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFA_ADDRESS): /* If ifa_addr is already set we, received an IFA_LOCAL before * so treat this as destination address */ if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } else { - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } case int32(IFA_BROADCAST): - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LOCAL): /* If ifa_addr is set and we get IFA_LOCAL, assume we have * a point-to-point network. Move address to correct field. */ @@ -120399,7 +120397,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { *(*uintptr)(unsafe.Pointer(ifs + 40)) = ifs + 136 Xmemset(tls, ifs+64, 0, uint64(36)) } - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LABEL): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120410,10 +120408,10 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _4 _4: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _gen_netmask(tls, ifs+32, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) + _gen_netmask(tls, ifs+32, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) } } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { @@ -120473,7 +120471,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { func _mkptr4(tls *TLS, s uintptr, ip uintptr) { bp := tls.Alloc(48) defer tls.Free(48) - Xsprintf(tls, s, __ccgo_ts+982, VaList(bp+8, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) + Xsprintf(tls, s, __ccgo_ts+982, VaList(bp+8, Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 3))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip))))) } func _mkptr6(tls *TLS, s uintptr, ip uintptr) { @@ -120487,13 +120485,13 @@ func _mkptr6(tls *TLS, s uintptr, ip uintptr) { } v2 = s s++ - *(*uint8)(unsafe.Pointer(v2)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] + *(*uint8)(unsafe.Pointer(v2)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] v3 = s s++ *(*uint8)(unsafe.Pointer(v3)) = uint8('.') v4 = s s++ - *(*uint8)(unsafe.Pointer(v4)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] + *(*uint8)(unsafe.Pointer(v4)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] v5 = s s++ *(*uint8)(unsafe.Pointer(v5)) = uint8('.') @@ -120540,8 +120538,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120572,8 +120570,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } for { if v13 = *(*uint8)(unsafe.Pointer(p)) != 0; v13 { - v10 = int32(*(*uint8)(unsafe.Pointer(p))) - v11 = BoolInt32(v10 == int32(' ') || uint32(v10)-uint32('\t') < uint32(5)) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v11 = BoolInt32(v10 == int32(' ') || Uint32FromInt32(v10)-uint32('\t') < uint32(5)) goto _12 _12: } @@ -120588,8 +120586,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int z = p for { if v18 = *(*uint8)(unsafe.Pointer(z)) != 0; v18 { - v15 = int32(*(*uint8)(unsafe.Pointer(z))) - v16 = BoolInt32(v15 == int32(' ') || uint32(v15)-uint32('\t') < uint32(5)) + v15 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v16 = BoolInt32(v15 == int32(' ') || Uint32FromInt32(v15)-uint32('\t') < uint32(5)) goto _17 _17: } @@ -120603,7 +120601,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } *(*uint8)(unsafe.Pointer(z)) = uint8(0) if int64(z)-int64(p) < int64(256) { - Xmemcpy(tls, buf, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, buf, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) break } } @@ -120638,8 +120636,8 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120658,7 +120656,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) svport = Xstrtoul(tls, p, bp+128, int32(10)) - if svport != uint64(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { + if svport != Uint64FromInt32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { continue } if dgram != 0 && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+1054, uint64(4)) != 0 { @@ -120670,7 +120668,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { if int64(p)-t__predefined_ptrdiff_t(bp) > int64(32) { continue } - Xmemcpy(tls, buf, bp, uint64(int64(p)-t__predefined_ptrdiff_t(bp))) + Xmemcpy(tls, buf, bp, Uint64FromInt64(int64(p)-t__predefined_ptrdiff_t(bp))) break } X__fclose_ca(tls, f) @@ -120703,7 +120701,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso var _ /* reply at bp+443 */ [512]uint8 var _ /* tmp at bp+955 */ [17]uint8 _, _, _, _, _, _, _, _, _ = a, af, p, p1, port, qlen, rlen, scopeid, v1 - af = int32((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) + af = Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) switch af { case int32(PF_INET): a = sa + 4 @@ -120737,7 +120735,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso rlen = X__res_send(tls, bp+347, qlen, bp+443, int32(512)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if rlen > 0 { - if uint64(rlen) > uint64(512) { + if Uint64FromInt32(rlen) > uint64(512) { rlen = int32(512) } X__dns_parse(tls, bp+443, rlen, __ccgo_fp(_dns_parse_callback), bp+78) @@ -120750,7 +120748,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso Xinet_ntop(tls, af, a, bp+78, uint32(256)) if scopeid != 0 { p = uintptr(0) - if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { + if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { p = Xif_indextoname(tls, scopeid, bp+955+uintptr(1)) } if !(p != 0) { @@ -120769,13 +120767,13 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso } if serv != 0 && servlen != 0 { p1 = bp + 78 - port = int32(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) + port = Int32FromUint16(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if !(flags&Int32FromInt32(NI_NUMERICSERV) != 0) { _reverse_services(tls, bp+78, port, flags&int32(NI_DGRAM)) } if !(*(*uint8)(unsafe.Pointer(p1)) != 0) { - p1 = _itoa(tls, bp+334, uint32(port)) + p1 = _itoa(tls, bp+334, Uint32FromInt32(port)) } if Xstrlen(tls, p1) >= uint64(servlen) { return -int32(12) @@ -120814,7 +120812,7 @@ func Xgetpeername(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xgetservbyname(tls *TLS, name uintptr, prots uintptr) (r uintptr) { @@ -120857,8 +120855,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin return int32(ENOENT) } /* Align buffer */ - align = int32(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) - if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+uint64(align) { + align = Int32FromUint64(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) + if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+Uint64FromInt32(align) { return int32(ERANGE) } buf += uintptr(align) @@ -120890,8 +120888,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin (*Tservent)(unsafe.Pointer(se)).Fs_aliases = buf *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases)) = (*Tservent)(unsafe.Pointer(se)).Fs_name *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases + 1*8)) = uintptr(0) - (*Tservent)(unsafe.Pointer(se)).Fs_port = int32(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) - if int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { + (*Tservent)(unsafe.Pointer(se)).Fs_port = Int32FromUint16(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) + if Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { v1 = __ccgo_ts + 1064 } else { v1 = __ccgo_ts + 1068 @@ -120930,7 +120928,7 @@ func Xgetsockname(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xgetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, optlen uintptr) (r2 int32) { @@ -120978,7 +120976,7 @@ _9: break } if uint64(*(*Tsocklen_t)(unsafe.Pointer(optlen))) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -121054,7 +121052,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func X__h_errno_location(tls *TLS) (r uintptr) { @@ -121182,14 +121180,14 @@ func Xhtons(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } func Xif_freenameindex(tls *TLS, idx uintptr) { @@ -121214,7 +121212,7 @@ func Xif_indextoname(tls *TLS, index uint32, name uintptr) (r1 uintptr) { if v1 < 0 { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 16)) = int32(index) + *(*int32)(unsafe.Pointer(bp + 16)) = Int32FromUint32(index) r = Xioctl(tls, fd, int32(SIOCGIFNAME), VaList(bp+48, bp)) X__syscall1(tls, int64(SYS_close), int64(fd)) if r < 0 { @@ -121248,25 +121246,25 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { var i, v2 uint32 _, _, _, _, _, _, _, _, _, _, _, _ = a, bucket, ctx, i, ifa, ifi, index, map1, namelen, rta, type1, v2 ctx = pctx - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { ifi = h + UintptrFromInt64(16) index = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index type1 = int32(IFLA_IFNAME) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } else { ifa = h + UintptrFromInt64(16) - index = int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) + index = Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) type1 = int32(IFA_LABEL) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { goto _1 } - namelen = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) + namelen = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) if namelen > int32(IF_NAMESIZE) { return 0 } @@ -121275,7 +121273,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { i = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) for i != 0 { map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr(i-uint32(1))*28 - if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == uint32(index) && int32((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) == 0 { + if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == Uint32FromInt32(index) && Int32FromUint8((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) == 0 { return 0 } i = (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next @@ -121298,10 +121296,10 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fallocated = uint32(a) } map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*28 - (*Tifnamemap)(unsafe.Pointer(map1)).Findex = uint32(index) - (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = uint8(namelen) - Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) - *(*uint32)(unsafe.Pointer(ctx + 8)) += uint32(namelen + int32(1)) + (*Tifnamemap)(unsafe.Pointer(map1)).Findex = Uint32FromInt32(index) + (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = Uint8FromInt32(namelen) + Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) + *(*uint32)(unsafe.Pointer(ctx + 8)) += Uint32FromInt32(namelen + int32(1)) (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum++ (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum @@ -121309,7 +121307,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } return 0 } @@ -121338,7 +121336,7 @@ func Xif_nameindex(tls *TLS) (r uintptr) { goto err } p = ifs + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*16 + UintptrFromInt32(1)*16 - i = int32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) + i = Int32FromUint32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) d = ifs s = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist for { @@ -121393,7 +121391,7 @@ func Xif_nametoindex(tls *TLS, name uintptr) (r1 uint32) { } else { v2 = *(*int32)(unsafe.Pointer(bp + 16)) } - return uint32(v2) + return Uint32FromInt32(v2) } func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { @@ -121405,7 +121403,7 @@ func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { defer tls.Free(16) var _ /* a at bp+0 */ Tin_addr if !(X__inet_aton(tls, p, bp) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } return (*(*Tin_addr)(unsafe.Pointer(bp))).Fs_addr } @@ -121431,7 +121429,7 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) (r int32) { break } (*(*[4]uint64)(unsafe.Pointer(bp)))[i] = Xstrtoul(tls, s, bp+32, 0) - if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return 0 } if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0) { @@ -121556,7 +121554,7 @@ func Xinet_ntoa(tls *TLS, _in Tin_addr) (r uintptr) { var a uintptr _ = a a = bp - Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1080, VaList(bp+16, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3))))) + Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1080, VaList(bp+16, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))))) return uintptr(unsafe.Pointer(&_buf4)) } @@ -121577,14 +121575,14 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint a = a0 switch af { case int32(PF_INET): - if uint32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1080, VaList(bp+112, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + if Uint32FromInt32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1080, VaList(bp+112, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { return s } case int32(PF_INET6): if Xmemcmp(tls, a, __ccgo_ts+1027, uint64(12)) != 0 { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1092, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1092, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } else { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1116, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1116, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } /* Replace longest /(^0|:)[:0]{2,}/ with "::" */ v2 = Int32FromInt32(0) @@ -121595,10 +121593,10 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint if !((*(*[100]uint8)(unsafe.Pointer(bp)))[i] != 0) { break } - if i != 0 && int32((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { + if i != 0 && Int32FromUint8((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { goto _1 } - j = int32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1146)) + j = Int32FromUint64(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1146)) if j > max { best = i max = j @@ -121612,7 +121610,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint v3 = Uint8FromUint8(':') (*(*[100]uint8)(unsafe.Pointer(bp)))[best+int32(1)] = v3 (*(*[100]uint8)(unsafe.Pointer(bp)))[best] = v3 - Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), uint64(i-best-max+int32(1))) + Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), Uint64FromInt32(i-best-max+int32(1))) } if Xstrlen(tls, bp) < uint64(l) { Xstrcpy(tls, s, bp) @@ -121628,11 +121626,11 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint func _hexval(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -121665,20 +121663,20 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if !(j < int32(3) && BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { break } - v = int32(10)*v + int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') + v = int32(10)*v + Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') goto _2 _2: ; j++ } - if j == 0 || j > int32(1) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { + if j == 0 || j > int32(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { return 0 } - *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = Uint8FromInt32(v) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { return int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { return 0 } s += uintptr(j + int32(1)) @@ -121694,16 +121692,16 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { return -int32(1) } } - if v5 = int32(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { + if v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { s++ v4 = s } - if v5 && int32(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { + if v5 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { return 0 } i = 0 for { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { brk = i (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(0) s++ @@ -121736,15 +121734,15 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 { return 0 } - (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(v) + (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = Uint16FromInt32(v) if !(*(*uint8)(unsafe.Pointer(s + uintptr(j))) != 0) && (brk >= 0 || i == int32(7)) { break } if i == int32(7) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { return 0 } need_v4 = int32(1) @@ -121759,7 +121757,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { i++ } if brk >= 0 { - Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(int32(2)*(i+int32(1)-brk))) + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, Uint64FromInt32(int32(2)*(i+int32(1)-brk))) j = 0 for { if !(j < int32(7)-i) { @@ -121779,7 +121777,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { } v14 = a a++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint16((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) v15 = a a++ *(*uint8)(unsafe.Pointer(v15)) = uint8((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) @@ -121823,7 +121821,7 @@ func Xlisten(tls *TLS, fd int32, backlog int32) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r int32) { @@ -121852,7 +121850,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i p = Xstrchr(tls, name, int32('%')) scopeid = uint64(0) if p != 0 && int64(p)-int64(name) < int64(64) { - Xmemcpy(tls, bp+20, name, uint64(int64(p)-int64(name))) + Xmemcpy(tls, bp+20, name, Uint64FromInt64(int64(p)-int64(name))) (*(*[64]uint8)(unsafe.Pointer(bp + 20)))[int64(p)-int64(name)] = uint8(0) name = bp + 20 } @@ -121873,7 +121871,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i *(*uintptr)(unsafe.Pointer(bp + 88)) = p - uintptr(1) } if *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { - if !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { + if !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { return -int32(2) } scopeid = uint64(Xif_nametoindex(tls, p)) @@ -121904,12 +121902,12 @@ const RR_CNAME = 5 func _is_valid_hostname(tls *TLS, host uintptr) (r int32) { var s uintptr _ = s - if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == uint64(-Int32FromInt32(1)) { + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == Uint64FromInt32(-Int32FromInt32(1)) { return 0 } s = host for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || int32(*(*uint8)(unsafe.Pointer(s))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) != 0) { break } goto _1 @@ -122014,14 +122012,14 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family v4 = Xstrstr(tls, p, name) p = v4 if v12 = v4 != 0; v12 { - v5 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: ; if v11 = !(v6 != 0); !v11 { - v8 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -122041,8 +122039,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family p = bp for { if v17 = *(*uint8)(unsafe.Pointer(p)) != 0; v17 { - v14 = int32(*(*uint8)(unsafe.Pointer(p))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: } @@ -122072,8 +122070,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family /* Extract first name as canonical name */ for { if v23 = *(*uint8)(unsafe.Pointer(p)) != 0; v23 { - v20 = int32(*(*uint8)(unsafe.Pointer(p))) - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v20 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: } @@ -122088,8 +122086,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family z = p for { if v28 = *(*uint8)(unsafe.Pointer(z)) != 0; v28 { - v25 = int32(*(*uint8)(unsafe.Pointer(z))) - v26 = BoolInt32(v25 == int32(' ') || uint32(v25)-uint32('\t') < uint32(5)) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v26 = BoolInt32(v25 == int32(' ') || Uint32FromInt32(v25)-uint32('\t') < uint32(5)) goto _27 _27: } @@ -122104,7 +122102,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family *(*uint8)(unsafe.Pointer(z)) = uint8(0) if _is_valid_hostname(tls, p) != 0 { have_canon = int32(1) - Xmemcpy(tls, canon, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, canon, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) } } X__fclose_ca(tls, f) @@ -122161,7 +122159,7 @@ func _dns_parse_callback1(tls *TLS, c uintptr, rr int32, data uintptr, len1 int3 v2 = ctx + 16 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ - Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, uint64(len1)) + Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, Uint64FromInt32(len1)) return 0 } @@ -122204,7 +122202,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i qtypes[nq] = _afrr[i].Frr *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280 + 3)) = uint8(0) /* don't need AD flag */ /* Ensure query IDs are distinct. */ - if nq != 0 && int32(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == int32(*(*uint8)(unsafe.Pointer(bp))) { + if nq != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) { *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))++ } nq++ @@ -122222,13 +122220,13 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i if !(i < nq) { break } - if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { + if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { return -int32(4) } goto _2 @@ -122242,7 +122240,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i break } (*(*Tdpc_ctx)(unsafe.Pointer(bp + 10208))).Frrtype = qtypes[i] - if uint64((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { + if Uint64FromInt32((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] = int32(4800) } X__dns_parse(tls, bp+560+uintptr(i)*4800, (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i], __ccgo_fp(_dns_parse_callback1), bp+10208) @@ -122293,7 +122291,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { dots++ } goto _1 @@ -122301,14 +122299,14 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f ; l++ } - if dots >= uint64((*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots) || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if dots >= uint64((*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots) || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { *(*uint8)(unsafe.Pointer(bp)) = uint8(0) } /* Strip final dot for canon, fail if multiple trailing dots. */ - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { l-- } - if !(l != 0) || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if !(l != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { return -int32(2) } /* This can never happen; the caller already checked length. */ @@ -122327,8 +122325,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f break } for { - v5 = int32(*(*uint8)(unsafe.Pointer(p))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -122342,8 +122340,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f z = p for { if v12 = *(*uint8)(unsafe.Pointer(z)) != 0; v12 { - v9 = int32(*(*uint8)(unsafe.Pointer(z))) - v10 = BoolInt32(v9 == int32(' ') || uint32(v9)-uint32('\t') < uint32(5)) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v10 = BoolInt32(v9 == int32(' ') || Uint32FromInt32(v9)-uint32('\t') < uint32(5)) goto _11 _11: } @@ -122358,9 +122356,9 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if z == p { break } - if uint64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { - Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, uint64(int64(z)-int64(p))) - *(*uint8)(unsafe.Pointer(canon + uintptr(uint64(int64(z)-int64(p)+int64(1))+l))) = uint8(0) + if Uint64FromInt64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { + Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, Uint64FromInt64(int64(z)-int64(p))) + *(*uint8)(unsafe.Pointer(canon + uintptr(Uint64FromInt64(int64(z)-int64(p)+int64(1))+l))) = uint8(0) cnt = _name_from_dns(tls, buf, canon, canon, family, bp+256) if cnt != 0 { return cnt @@ -122432,7 +122430,7 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&_defpolicy))+uintptr(i)*20, uint64(_defpolicy[i].Flen1)) != 0 { goto _1 } - if int32(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&int32(_defpolicy[i].Fmask) != int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&Int32FromUint8(_defpolicy[i].Fmask) != Int32FromUint8(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { goto _1 } return uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 @@ -122445,20 +122443,20 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { } func _labelof(tls *TLS, a uintptr) (r int32) { - return int32((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) + return Int32FromUint8((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) } func _scopeof(tls *TLS, a uintptr) (r int32) { - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { - return int32(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { + return Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { return int32(2) } - if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { + if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { return int32(2) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { return int32(5) } return int32(14) @@ -122469,7 +122467,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(128) && !((int32(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^int32(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { + if !(i < uint32(128) && !((Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { break } goto _1 @@ -122477,7 +122475,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { ; i++ } - return int32(i) + return Int32FromUint32(i) } func _addrcmp(tls *TLS, _a uintptr, _b uintptr) (r int32) { @@ -122662,8 +122660,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } dpolicy = _policyof(tls, bp+32+8) dscope = _scopeof(tls, bp+32+8) - dlabel = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) - dprec = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) + dlabel = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) + dprec = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) prefixlen = 0 fd = Xsocket(tls, family1, Int32FromInt32(SOCK_DGRAM)|Int32FromInt32(SOCK_CLOEXEC), int32(IPPROTO_UDP)) if fd >= 0 { @@ -122694,7 +122692,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i ; i++ } - Xqsort(tls, buf, uint64(cnt), uint64(28), __ccgo_fp(_addrcmp)) + Xqsort(tls, buf, Uint64FromInt32(cnt), uint64(28), __ccgo_fp(_addrcmp)) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) return cnt } @@ -122745,8 +122743,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -int32(8) } (*(*Tservice)(unsafe.Pointer(buf))).Fport = uint16(0) - (*(*Tservice)(unsafe.Pointer(buf))).Fproto = uint8(proto) - (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(socktype) + (*(*Tservice)(unsafe.Pointer(buf))).Fproto = Uint8FromInt32(proto) + (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = Uint8FromInt32(socktype) return int32(1) } if name != 0 { @@ -122810,8 +122808,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i break } if v10 = p > bp; v10 { - v7 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v8 = BoolInt32(v7 == int32(' ') || uint32(v7)-uint32('\t') < uint32(5)) + v7 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v8 = BoolInt32(v7 == int32(' ') || Uint32FromInt32(v7)-uint32('\t') < uint32(5)) goto _9 _9: } @@ -122819,8 +122817,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i goto _5 } if v14 = *(*uint8)(unsafe.Pointer(p + uintptr(l))) != 0; v14 { - v11 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: } @@ -122840,8 +122838,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i p = bp for { if v19 = *(*uint8)(unsafe.Pointer(p)) != 0; v19 { - v16 = int32(*(*uint8)(unsafe.Pointer(p))) - v17 = BoolInt32(v16 == int32(' ') || uint32(v16)-uint32('\t') < uint32(5)) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v17 = BoolInt32(v16 == int32(' ') || Uint32FromInt32(v16)-uint32('\t') < uint32(5)) goto _18 _18: } @@ -122923,7 +122921,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = uint16(type1) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = Uint16FromInt32(type1) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -122934,7 +122932,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = uint16(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = Uint16FromInt32(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -122956,7 +122954,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fg.Frtgen_family = uint8(af) + })(unsafe.Pointer(bp))))).Fg.Frtgen_family = Uint8FromInt32(af) r = int32(Xsend(tls, fd, bp, uint64(20), 0)) if r < 0 { return r @@ -122968,13 +122966,13 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } h = bp for { - if !(uint64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { + if !(Uint64FromInt64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { break } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { return 0 } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { return -int32(1) } ret = (*(*func(*TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{cb})))(tls, ctx, h) @@ -122984,7 +122982,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, goto _1 _1: ; - h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } } return r1 @@ -123030,7 +123028,7 @@ func Xns_get16(tls *TLS, cp uintptr) (r uint32) { trc("tls=%v cp=%v, (%v:)", tls, cp, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(int32(*(*uint8)(unsafe.Pointer(cp)))< %v", r) }() } - return uint64(uint32(*(*uint8)(unsafe.Pointer(cp)))< int64(eom)-int64(p) { goto bad } @@ -123200,7 +123198,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin if rrnum == -int32(1) { rrnum = (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum } - if rrnum < 0 || rrnum >= int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if rrnum < 0 || rrnum >= Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { goto bad } if rrnum < (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum { @@ -123239,7 +123237,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin p4 = handle + 72 *(*uintptr)(unsafe.Pointer(p4)) += uintptr(2) (*Tns_rr)(unsafe.Pointer(rr)).Frdlength = uint16(Xns_get16(tls, *(*uintptr)(unsafe.Pointer(p4))-uintptr(2))) - if int64((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { + if Int64FromUint16((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { goto size } (*Tns_rr)(unsafe.Pointer(rr)).Frdata = (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr @@ -123250,7 +123248,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin (*Tns_rr)(unsafe.Pointer(rr)).Frdata = UintptrFromInt32(0) } (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum++ - if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { (*Tns_msg)(unsafe.Pointer(handle)).F_sect = section + int32(1) if (*Tns_msg)(unsafe.Pointer(handle)).F_sect == int32(_ns_s_max) { (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum = -int32(1) @@ -123279,7 +123277,7 @@ func Xns_name_uncompress(tls *TLS, msg uintptr, eom uintptr, src uintptr, dst ui } var r int32 _ = r - r = Xdn_expand(tls, msg, eom, src, dst, int32(dstsiz)) + r = Xdn_expand(tls, msg, eom, src, dst, Int32FromUint64(dstsiz)) if r < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) } @@ -123332,14 +123330,14 @@ func Xntohs(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } /* do we really need all these?? */ @@ -123366,10 +123364,10 @@ func Xgetprotoent(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(_idx) >= uint64(239) { + if Uint64FromInt32(_idx) >= uint64(239) { return UintptrFromInt32(0) } - _p.Fp_proto = int32(_protos[_idx]) + _p.Fp_proto = Int32FromUint8(_protos[_idx]) _p.Fp_name = uintptr(unsafe.Pointer(&_protos)) + uintptr(_idx+int32(1)) _p.Fp_aliases = uintptr(unsafe.Pointer(&_aliases)) _idx = int32(uint64(_idx) + (Xstrlen(tls, _p.Fp_name) + Uint64FromInt32(2))) @@ -123429,7 +123427,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr _ = int32(__SC_recvfrom) v2 = int64(fd) v3 = int64(buf) - v4 = int64(len1) + v4 = Int64FromUint64(len1) v5 = int64(flags) v6 = int64(addr) v7 = int64(alen) @@ -123445,7 +123443,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v8 = r goto _9 _9: - return X__syscall_ret(tls, uint64(v8)) + return X__syscall_ret(tls, Uint64FromInt64(v8)) } func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, timeout uintptr) (r int32) { @@ -123472,7 +123470,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti i-- mh += 64 } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), int64(vlen), int64(flags), int64(timeout), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), Int64FromUint32(vlen), Int64FromUint32(flags), int64(timeout), 0)))) } func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { @@ -123536,10 +123534,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { goto _1 _1: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { v6 = uintptr(0) } else { - v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v6 } @@ -123552,10 +123550,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { } p7 = msg + 40 *(*Tsocklen_t)(unsafe.Pointer(p7)) = Tsocklen_t(uint64(*(*Tsocklen_t)(unsafe.Pointer(p7))) + ((Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)) + (Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)))) - if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { v8 = uintptr(0) } else { - v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v8 (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_level = int32(SOL_SOCKET) @@ -123608,7 +123606,7 @@ func Xrecvmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r2 Tssize_t) { v9 = r goto _10 _10: - r1 = X__syscall_ret(tls, uint64(v9)) + r1 = X__syscall_ret(tls, Uint64FromInt64(v9)) if r1 >= 0 { X__convert_scm_timestamps(tls, msg, orig_controllen) } @@ -123639,19 +123637,19 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, var _ /* ts at bp+280 */ Ttimespec _, _, _, _, _ = i, id, j, l, n l = Xstrnlen(tls, dname, uint64(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { l-- } - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { return -int32(1) } - n = int32(uint64(17) + l + BoolUint64(!!(l != 0))) - if l > uint64(253) || buflen < n || uint32(op) > uint32(15) || uint32(class) > uint32(255) || uint32(type1) > uint32(255) { + n = Int32FromUint64(uint64(17) + l + BoolUint64(!!(l != 0))) + if l > uint64(253) || buflen < n || Uint32FromInt32(op) > uint32(15) || Uint32FromInt32(class) > uint32(255) || Uint32FromInt32(type1) > uint32(255) { return -int32(1) } /* Construct query template - ID will be filled later */ - Xmemset(tls, bp, 0, uint64(n)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(op*int32(8) + int32(1)) + Xmemset(tls, bp, 0, Uint64FromInt32(n)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = Uint8FromInt32(op*int32(8) + int32(1)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(32) /* AD */ (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(5)] = uint8(1) Xmemcpy(tls, bp+uintptr(13), dname, l) @@ -123662,7 +123660,7 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, } j = i for { - if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && int32((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { + if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && Int32FromUint8((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { break } goto _2 @@ -123670,23 +123668,23 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, ; j++ } - if uint32(j-i)-uint32(1) > uint32(62) { + if Uint32FromInt32(j-i)-uint32(1) > uint32(62) { return -int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = uint8(j - i) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = Uint8FromInt32(j - i) goto _1 _1: ; i = j + int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(type1) - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(class) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = Uint8FromInt32(type1) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = Uint8FromInt32(class) /* Make a reasonably unpredictable id */ Xclock_gettime(tls, CLOCK_REALTIME, bp+280) - id = int32((uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = uint8(id / int32(256)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(id) - Xmemcpy(tls, buf, bp, uint64(n)) + id = Int32FromUint64((Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = Uint8FromInt32(id / int32(256)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = Uint8FromInt32(id) + Xmemcpy(tls, buf, bp, Uint64FromInt32(n)) return n } @@ -123822,7 +123820,7 @@ func _mtime(tls *TLS) (r uint64) { if Xclock_gettime(tls, int32(CLOCK_MONOTONIC), bp) < 0 && *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOSYS) { Xclock_gettime(tls, CLOCK_REALTIME, bp) } - return uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) + return Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) } func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, q uintptr, ql int32) (r1 int32) { @@ -123832,8 +123830,8 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, var _ /* mh at bp+40 */ Tmsghdr _, _ = fd, r *(*[2]Tuint8_t)(unsafe.Pointer(bp + 32)) = [2]Tuint8_t{ - 0: uint8(ql >> int32(8)), - 1: uint8(ql), + 0: Uint8FromInt32(ql >> int32(8)), + 1: Uint8FromInt32(ql), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -123842,7 +123840,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, }, 1: { Fiov_base: q, - Fiov_len: uint64(ql), + Fiov_len: Uint64FromInt32(ql), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 40)) = Tmsghdr{ @@ -123951,20 +123949,20 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a sl = uint32(16) nns = 0 family = int32(PF_INET) - v1 = uint64(nqueries+int32(2)) * 8 + v1 = Uint64FromInt32(nqueries+int32(2)) * 8 pfd = Xrealloc(tls, pfd, v1) - v2 = uint64(nqueries) * 4 + v2 = Uint64FromInt32(nqueries) * 4 qpos = Xrealloc(tls, qpos, v2) - v3 = uint64(nqueries) * 4 + v3 = Uint64FromInt32(nqueries) * 4 apos = Xrealloc(tls, apos, v3) - v4 = uint64(nqueries) * 2 + v4 = Uint64FromInt32(nqueries) * 2 alen_buf = Xrealloc(tls, alen_buf, v4) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), bp+200) - timeout = int32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) - attempts = int32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) + timeout = Int32FromUint32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) + attempts = Int32FromUint32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) nns = 0 for { - if !(uint32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { + if !(Uint32FromInt32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { break } iplit = conf + uintptr(nns)*28 @@ -123987,7 +123985,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_scope_id = (*Taddress)(unsafe.Pointer(iplit)).Fscopeid v6 = Int32FromInt32(PF_INET6) family = v6 - (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = uint16(v6) + (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = Uint16FromInt32(v6) } goto _5 _5: @@ -124025,7 +124023,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(i < nns) { break } - if int32((*(*[3]struct { + if Int32FromUint16((*(*[3]struct { Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte @@ -124047,7 +124045,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte - })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = uint16(family) + })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = Uint16FromInt32(family) if fd < 0 || Xbind(tls, fd, bp+88, sl) < 0 { if fd >= 0 { Xclose(tls, fd) @@ -124074,15 +124072,15 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), (nqueries+int32(1))*8))).Ffd = -int32(2) __pthread_cleanup_push(tls, bp+208, __ccgo_fp(_cleanup), pfd) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp + 200)), uintptr(0)) - Xmemset(tls, alens, 0, uint64(4)*uint64(nqueries)) + Xmemset(tls, alens, 0, uint64(4)*Uint64FromInt32(nqueries)) retry_interval = timeout / attempts next = 0 v10 = _mtime(tls) t2 = v10 t0 = v10 - t1 = t2 - uint64(retry_interval) + t1 = t2 - Uint64FromInt32(retry_interval) for { - if !(t2-t0 < uint64(timeout)) { + if !(t2-t0 < Uint64FromInt32(timeout)) { break } /* This is the loop exit condition: that all queries @@ -124100,7 +124098,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if i == nqueries { break } - if t2-t1 >= uint64(retry_interval) { + if t2-t1 >= Uint64FromInt32(retry_interval) { /* Query all configured namservers in parallel */ i = 0 for { @@ -124113,7 +124111,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(j < nns) { break } - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) goto _14 _14: ; @@ -124129,14 +124127,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry = int32(2) * nqueries } /* Wait for a response, or until time to retry */ - if Xpoll(tls, pfd, uint64(nqueries+int32(1)), int32(t1+uint64(retry_interval)-t2)) <= 0 { + if Xpoll(tls, pfd, Uint64FromInt32(nqueries+int32(1)), Int32FromUint64(t1+Uint64FromInt32(retry_interval)-t2)) <= 0 { goto _11 } for next < nqueries { *(*[1]Tiovec)(unsafe.Pointer(bp + 8)) = [1]Tiovec{ 0: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 232)) = Tmsghdr{ @@ -124170,7 +124168,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Find which query this answer goes with, if any */ i = next for { - if !(i < nqueries && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { + if !(i < nqueries && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { break } goto _16 @@ -124187,7 +124185,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Only accept positive or negative responses; * retry immediately on server failure, and ignore * all other codes such as refusal. */ - switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { case 0: fallthrough case int32(3): @@ -124197,7 +124195,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry-- } if v18 && v17 != 0 { - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) } fallthrough default: @@ -124217,14 +124215,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a next++ } } else { - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), uint64(rlen)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), Uint64FromInt32(rlen)) } /* Ignore further UDP if all slots full or TCP-mode */ if next == nqueries { (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), nqueries*8))).Fevents = 0 } /* If answer is truncated (TC bit), fallback to TCP */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { *(*int32)(unsafe.Pointer(alens + uintptr(i)*4)) = -int32(1) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), uintptr(0)) r = _start_tcp(tls, pfd+uintptr(i)*8, family, bp+116+uintptr(j)*28, sl, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), *(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))) @@ -124243,8 +124241,8 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a } if int32((*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Frevents)&int32(POLLOUT) != 0 { *(*[2]Tuint8_t)(unsafe.Pointer(bp + 52)) = [2]Tuint8_t{ - 0: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), - 1: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + 0: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), + 1: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), } *(*[2]Tiovec)(unsafe.Pointer(bp + 24)) = [2]Tiovec{ 0: { @@ -124253,14 +124251,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), - Fiov_len: uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + Fiov_len: Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 288)) = Tmsghdr{ Fmsg_iov: bp + 24, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+288, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) + _step_mh(tls, bp+288, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) r = int32(Xsendmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+288, int32(MSG_NOSIGNAL))) if r < 0 { goto out @@ -124288,14 +124286,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 344)) = Tmsghdr{ Fmsg_iov: bp + 56, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+344, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) + _step_mh(tls, bp+344, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) r = int32(Xrecvmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+344, 0)) if r <= 0 { goto out @@ -124304,14 +124302,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < int32(2) { goto _21 } - alen = int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) + alen = Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) if alen < int32(13) { goto out } if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < alen+int32(2) && *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < asize+int32(2) { goto _21 } - rcode = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) + rcode = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) if rcode != 0 && rcode != int32(3) { goto out } @@ -124389,7 +124387,7 @@ func X__res_send(tls *TLS, _msg uintptr, _msglen int32, _answer uintptr, _anslen } else { v1 = *(*int32)(unsafe.Pointer(bp + 24)) } - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, uint64(v1)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, Uint64FromInt32(v1)) } return r } @@ -124467,8 +124465,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v4 = !(Xstrncmp(tls, bp, __ccgo_ts+1166, uint64(7)) != 0); v4 { - v1 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: } @@ -124500,7 +124498,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1191) - if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { + if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { p += uintptr(8) x2 = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -124515,8 +124513,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v11 = !(Xstrncmp(tls, bp, __ccgo_ts+1200, uint64(10)) != 0); v11 { - v8 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -124526,8 +124524,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(11) for { - v13 = int32(*(*uint8)(unsafe.Pointer(p))) - v14 = BoolInt32(v13 == int32(' ') || uint32(v13)-uint32('\t') < uint32(5)) + v13 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v14 = BoolInt32(v13 == int32(' ') || Uint32FromInt32(v13)-uint32('\t') < uint32(5)) goto _15 _15: if !(v14 != 0) { @@ -124541,8 +124539,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ *(*uintptr)(unsafe.Pointer(bp + 744)) = p for { if v20 = *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744)))) != 0; v20 { - v17 = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) - v18 = BoolInt32(v17 == int32(' ') || uint32(v17)-uint32('\t') < uint32(5)) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) + v18 = BoolInt32(v17 == int32(' ') || Uint32FromInt32(v17)-uint32('\t') < uint32(5)) goto _19 _19: } @@ -124564,8 +124562,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v24 = Xstrncmp(tls, bp, __ccgo_ts+1211, uint64(6)) != 0 && Xstrncmp(tls, bp, __ccgo_ts+1218, uint64(6)) != 0; !v24 { - v21 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) - v22 = BoolInt32(v21 == int32(' ') || uint32(v21)-uint32('\t') < uint32(5)) + v21 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) + v22 = BoolInt32(v21 == int32(' ') || Uint32FromInt32(v21)-uint32('\t') < uint32(5)) goto _23 _23: } @@ -124574,8 +124572,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(7) for { - v26 = int32(*(*uint8)(unsafe.Pointer(p))) - v27 = BoolInt32(v26 == int32(' ') || uint32(v26)-uint32('\t') < uint32(5)) + v26 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v27 = BoolInt32(v26 == int32(' ') || Uint32FromInt32(v26)-uint32('\t') < uint32(5)) goto _28 _28: if !(v27 != 0) { @@ -124601,7 +124599,7 @@ no_resolv_conf: X__lookup_ipliteral(tls, conf, __ccgo_ts+1225, PF_UNSPEC) nns = int32(1) } - (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(nns) + (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = Uint32FromInt32(nns) return 0 } @@ -124629,18 +124627,18 @@ func Xsendmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32) (r } i = 0 for { - if !(uint32(i) < vlen) { + if !(Uint32FromInt32(i) < vlen) { break } /* As an unfortunate inconsistency, the sendmmsg API uses * unsigned int for the resulting msg_len, despite sendmsg * returning ssize_t. However Linux limits the total bytes * sent by sendmsg to INT_MAX, so the assignment is safe. */ - r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, int32(flags)) + r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, Int32FromUint32(flags)) if r < 0 { goto error } - (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = uint32(r) + (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = Uint32FromInt64(r) goto _1 _1: ; @@ -124699,10 +124697,10 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { goto _2 _2: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_controllen))-int64(c1)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_controllen))-int64(c1)) { v4 = uintptr(0) } else { - v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } c1 = v4 } @@ -124728,7 +124726,7 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { v12 = r goto _13 _13: - return X__syscall_ret(tls, uint64(v12)) + return X__syscall_ret(tls, Uint64FromInt64(v12)) } func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr uintptr, alen Tsocklen_t) (r1 Tssize_t) { @@ -124744,10 +124742,10 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui _ = int32(__SC_sendto) v2 = int64(fd) v3 = int64(buf) - v4 = int64(len1) + v4 = Int64FromUint64(len1) v5 = int64(flags) v6 = int64(addr) - v7 = int64(alen) + v7 = Int64FromUint32(alen) if int32(1) != 0 { r = ___syscall_cp(tls, int64(v1), v2, v3, v4, v5, v6, v7) } else { @@ -124760,7 +124758,7 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v8 = r goto _9 _9: - return X__syscall_ret(tls, uint64(v8)) + return X__syscall_ret(tls, Uint64FromInt64(v8)) } func Xendservent(tls *TLS) { @@ -124804,7 +124802,7 @@ func Xsetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, v3 = int64(level) v4 = int64(optname) v5 = int64(optval) - v6 = int64(optlen) + v6 = Int64FromUint32(optlen) v7 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v1), v2, v3, v4, v5, v6, v7) @@ -124830,13 +124828,13 @@ _9: break } if uint64(optlen) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } tv = optval s = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec us = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -124844,14 +124842,14 @@ _9: if optname == int32(SO_SNDTIMEO) { optname = int32(SO_SNDTIMEO_OLD) } - if !((uint64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v10 = uint64(us) + if !((Uint64FromInt64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v10 = Uint64FromInt64(us) } else { - v10 = uint64(0x7fffffff) + (0+uint64(us))>>int32(63) + v10 = uint64(0x7fffffff) + (0+Uint64FromInt64(us))>>int32(63) } *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, - 1: int64(int32(v10)), + 1: int64(Int32FromUint64(v10)), } v11 = int32(SYS_setsockopt) _ = int32(__SC_setsockopt) @@ -124859,7 +124857,7 @@ _9: v13 = int64(level) v14 = int64(optname) v15 = int64(bp) - v16 = int64(Uint64FromInt32(2) * Uint64FromInt64(8)) + v16 = Int64FromUint64(Uint64FromInt32(2) * Uint64FromInt64(8)) v17 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v11), v12, v13, v14, v15, v16, v17) @@ -124892,7 +124890,7 @@ _9: v22 = int64(level) v23 = int64(optname) v24 = int64(optval) - v25 = int64(optlen) + v25 = Int64FromUint32(optlen) v26 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v20), v21, v22, v23, v24, v25, v26) @@ -124911,7 +124909,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { @@ -124943,7 +124941,7 @@ func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xsockatmark(tls *TLS, s int32) (r int32) { @@ -125013,7 +125011,7 @@ _9: _18: s = int32(v17) if s < 0 { - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } if type1&int32(SOCK_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) @@ -125022,7 +125020,7 @@ _9: X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFL)), int64(Int32FromInt32(O_NONBLOCK))) } } - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr) (r2 int32) { @@ -125054,7 +125052,7 @@ func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr v8 = r goto _9 _9: - r1 = int32(X__syscall_ret(tls, uint64(v8))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v8))) if r1 < 0 && (*(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EINVAL) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EPROTONOSUPPORT)) && type1&(Int32FromInt32(SOCK_CLOEXEC)|Int32FromInt32(SOCK_NONBLOCK)) != 0 { v10 = int32(SYS_socketpair) _ = int32(__SC_socketpair) @@ -125076,7 +125074,7 @@ _9: v17 = r goto _18 _18: - r1 = int32(X__syscall_ret(tls, uint64(v17))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v17))) if r1 < 0 { return r1 } @@ -125273,11 +125271,11 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) + len1 = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) i = 0 for { if !(i < (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]) { @@ -125328,18 +125326,18 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = v8 goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { rv = int32(ENOMEM) goto cleanup_f } - tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) + tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) if !(tmp1 != 0) { rv = *(*int32)(unsafe.Pointer(X__errno_location(tls))) goto cleanup_f } *(*uintptr)(unsafe.Pointer(mem)) = tmp1 - *(*Tsize_t)(unsafe.Pointer(nmem)) = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) + *(*Tsize_t)(unsafe.Pointer(nmem)) = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) } if (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] != 0 { *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(mem)))) = *(*uintptr)(unsafe.Pointer(buf)) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) @@ -125369,7 +125367,7 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz } (*Tgroup)(unsafe.Pointer(gr)).Fgr_name = *(*uintptr)(unsafe.Pointer(buf)) (*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd = (*Tgroup)(unsafe.Pointer(gr)).Fgr_name + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) - (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) + (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) (*Tgroup)(unsafe.Pointer(gr)).Fgr_mem = *(*uintptr)(unsafe.Pointer(mem)) if *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr(-Int32FromInt32(1)))) != 0 || *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]-int32(1)))) != 0 { rv = int32(EIO) @@ -125544,10 +125542,10 @@ func _atou(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -125610,7 +125608,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = _atou(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) @@ -125626,7 +125624,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { *(*Tsize_t)(unsafe.Pointer(nmem))++ } goto _10 @@ -125651,7 +125649,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { v12 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v12)) = uint8(0) @@ -125722,11 +125720,11 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u goto cleanup } if (*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRFOUND)] != 0 { - nscdbuf = Xcalloc(tls, uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) + nscdbuf = Xcalloc(tls, Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) if !(nscdbuf != 0) { goto cleanup } - nbytes = uint64(4) * uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) + nbytes = uint64(4) * Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) if nbytes != 0 && !(Xfread(tls, nscdbuf, nbytes, uint64(1), f) != 0) { if !(Xferror(tls, f) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EIO) @@ -125937,11 +125935,11 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { + if Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) + len1 = Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) if len1 > *(*Tsize_t)(unsafe.Pointer(size)) || !(*(*uintptr)(unsafe.Pointer(buf)) != 0) { tmp = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(buf)), len1) if !(tmp != 0) { @@ -125965,8 +125963,8 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_passwd + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_shell = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) /* Don't assume that nscd made sure to null terminate strings. * It's supposed to, but malicious nscd should be ignored * rather than causing a crash. @@ -126114,10 +126112,10 @@ func _atou1(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126179,14 +126177,14 @@ func X__getpwent_a(tls *TLS, f uintptr, pw uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v9)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v10 = *(*uintptr)(unsafe.Pointer(bp)) @@ -126285,7 +126283,7 @@ func X__nscd_query(tls *TLS, req Tint32_t, key uintptr, buf uintptr, len1 Tsize_ *(*[3]Tint32_t)(unsafe.Pointer(bp + 32)) = [3]Tint32_t{ 0: int32(NSCDVERSION), 1: req, - 2: int32(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), + 2: Int32FromUint64(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -126358,11 +126356,11 @@ retry: if !(i < Uint64FromInt64(12)/Uint64FromInt64(4)) { break } - v3 = uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) + v3 = Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) v4 = v3>>int32(24) | v3>>int32(8)&uint32(0xff00) | v3<>int32(24) | v7>>int32(8)&uint32(0xff00) | v7< %v", r) }() } - return int64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) + return Int64FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) } func Xlrand48(tls *TLS) (r int64) { @@ -126651,7 +126649,7 @@ func Xjrand48(tls *TLS, s uintptr) (r int64) { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) + return int64(Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) } func Xmrand48(tls *TLS) (r int64) { @@ -126677,7 +126675,7 @@ func Xrand(tls *TLS) (r int32) { defer func() { trc("-> %v", r) }() } _seed = uint64(6364136223846793005)*_seed + uint64(1) - return int32(_seed >> int32(33)) + return Int32FromUint64(_seed >> int32(33)) } func _temper(tls *TLS, x uint32) (r uint32) { @@ -126697,7 +126695,7 @@ func Xrand_r(tls *TLS, seed uintptr) (r int32) { _ = v1 v1 = *(*uint32)(unsafe.Pointer(seed))*Uint32FromInt32(1103515245) + Uint32FromInt32(12345) *(*uint32)(unsafe.Pointer(seed)) = v1 - return int32(_temper(tls, v1) / uint32(2)) + return Int32FromUint32(_temper(tls, v1) / uint32(2)) } /* @@ -126755,15 +126753,15 @@ func _lcg64(tls *TLS, x Tuint64_t) (r Tuint64_t) { } func _savestate(tls *TLS) (r uintptr) { - *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) = uint32(_n<> int32(16)) - _i = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) - _j = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) + _n = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> int32(16)) + _i = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) + _j = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) } func ___srandom(tls *TLS, seed uint32) { @@ -126870,11 +126868,11 @@ func Xrandom(tls *TLS) (r int64) { if _n == 0 { v1 = _lcg31(tls, *(*Tuint32_t)(unsafe.Pointer(_x1))) *(*Tuint32_t)(unsafe.Pointer(_x1)) = v1 - k = int64(v1) + k = Int64FromUint32(v1) goto end } *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) += *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_j)*4)) - k = int64(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) + k = Int64FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) _i++ v2 = _i if v2 == _n { @@ -126912,8 +126910,8 @@ func Xsrand48(tls *TLS, seed int64) { defer tls.Free(16) *(*[3]uint16)(unsafe.Pointer(bp)) = [3]uint16{ 0: uint16(0x330e), - 1: uint16(seed), - 2: uint16(seed >> int32(16)), + 1: Uint16FromInt64(seed), + 2: Uint16FromInt64(seed >> int32(16)), } Xseed48(tls, bp) } @@ -126941,7 +126939,7 @@ func Xexecl(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -126985,7 +126983,7 @@ func Xexecle(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127029,7 +127027,7 @@ func Xexeclp(tls *TLS, file uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127064,7 +127062,7 @@ func Xexecve(tls *TLS, path uintptr, argv uintptr, envp uintptr) (r int32) { defer func() { trc("-> %v", r) }() } /* do we need to use environ if envp is null? */ - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) } func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { @@ -127090,18 +127088,18 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { if !(path != 0) { path = __ccgo_ts + 1366 } - k = Xstrnlen(tls, file, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + k = Xstrnlen(tls, file, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if k > uint64(NAME_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENAMETOOLONG) return -int32(1) } - l = Xstrnlen(tls, path, uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) + l = Xstrnlen(tls, path, Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) p = path for { v2 = l + k + uint64(1) b = Xrealloc(tls, b, v2) z = X__strchrnul(tls, p, int32(':')) - if uint64(int64(z)-int64(p)) >= l { + if Uint64FromInt64(int64(z)-int64(p)) >= l { v3 = z z++ if !(*(*uint8)(unsafe.Pointer(v3)) != 0) { @@ -127109,7 +127107,7 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { } goto _1 } - Xmemcpy(tls, b, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, b, p, Uint64FromInt64(int64(z)-int64(p))) *(*uint8)(unsafe.Add(unsafe.Pointer(b), int64(z)-int64(p))) = uint8('/') Xmemcpy(tls, b+uintptr(int64(z)-int64(p))+BoolUintptr(z > p), file, k+uint64(1)) Xexecve(tls, b, argv, envp) @@ -127167,9 +127165,9 @@ func Xfexecve(tls *TLS, fd int32, argv uintptr, envp uintptr) (r1 int32) { _ = r r = int32(X__syscall5(tls, int64(SYS_execveat), int64(fd), int64(__ccgo_ts), int64(argv), int64(envp), int64(Int32FromInt32(AT_EMPTY_PATH)))) if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - X__procfdname(tls, bp, uint32(fd)) + X__procfdname(tls, bp, Uint32FromInt32(fd)) Xexecve(tls, bp, argv, envp) if *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EBADF) @@ -127488,8 +127486,8 @@ func Xposix_spawnattr_setflags(tls *TLS, attr uintptr, flags int16) (r int32) { } var all_flags uint32 _ = all_flags - all_flags = uint32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) - if uint32(flags) & ^all_flags != 0 { + all_flags = Uint32FromInt32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) + if Uint32FromInt16(flags) & ^all_flags != 0 { return int32(EINVAL) } (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(flags) @@ -127529,7 +127527,7 @@ func Xvfork(tls *TLS) (r Tpid_t) { defer func() { trc("-> %v", r) }() } /* vfork syscall cannot be made from C code */ - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clone), int64(Int32FromInt32(SIGCHLD)), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clone), int64(Int32FromInt32(SIGCHLD)), int64(Int32FromInt32(0)))))) } func Xwait(tls *TLS, status uintptr) (r Tpid_t) { if __ccgo_strace { @@ -127544,7 +127542,7 @@ func Xwaitid(tls *TLS, type1 Tidtype_t, id Tid_t, info uintptr, options int32) ( trc("tls=%v type1=%v id=%v info=%v options=%v, (%v:)", tls, type1, id, info, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), int64(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), Int64FromUint32(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) } func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { @@ -127552,7 +127550,7 @@ func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { trc("tls=%v pid=%v status=%v options=%v, (%v:)", tls, pid, status, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) } const BRACKET = -3 @@ -127585,11 +127583,11 @@ func _str_next(tls *TLS, str uintptr, n Tsize_t, step uintptr) (r int32) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) return -int32(1) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k) - return int32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k) + return Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) - return int32(*(*uint8)(unsafe.Pointer(str))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) } func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r int32) { @@ -127605,35 +127603,35 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i return END } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(2) pat++ esc = int32(1) goto escaped } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { k = uint64(1) if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { k++ } } if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { k++ } } for { - if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { break } - if k+uint64(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1)))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('=')) { - z = int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) + if k+uint64(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('=')) { + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) k += uint64(2) if k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 { k++ } - for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint64(1))))) != z || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint64(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { k++ } if k == m || !(*(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0) { @@ -127652,10 +127650,10 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i *(*Tsize_t)(unsafe.Pointer(step)) = k + uint64(1) return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { return -int32(5) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { return -int32(4) } goto escaped @@ -127667,23 +127665,23 @@ escaped: *(*Tsize_t)(unsafe.Pointer(step)) = uint64(0) return -int32(2) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k1 + esc) - return int32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k1 + esc) + return Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) } - return int32(*(*uint8)(unsafe.Pointer(pat))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) } func _casefold(tls *TLS, k int32) (r int32) { var c int32 var v1 uint32 _, _ = c, v1 - c = int32(Xtowupper(tls, uint32(k))) + c = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(k))) if c == k { - v1 = Xtowlower(tls, uint32(k)) + v1 = Xtowlower(tls, Uint32FromInt32(k)) } else { - v1 = uint32(c) + v1 = Uint32FromInt32(c) } - return int32(v1) + return Int32FromUint32(v1) } func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { @@ -127697,17 +127695,17 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { _, _, _, _, _ = inv, l, l1, p0, z inv = 0 p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(p))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('!') { inv = int32(1) p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { if k == int32(']') { return BoolInt32(!(inv != 0)) } p++ } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { if k == int32('-') { return BoolInt32(!(inv != 0)) } @@ -127716,33 +127714,33 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { } *(*Twchar_t)(unsafe.Pointer(bp)) = uint32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { l = Xmbtowc(tls, bp+4, p+uintptr(1), uint64(4)) if l < 0 { return 0 } if *(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4)) { - if uint32(k)-*(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp)) || uint32(kfold)-*(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp)) { + if Uint32FromInt32(k)-*(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp)) || Uint32FromInt32(kfold)-*(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp)) { return BoolInt32(!(inv != 0)) } } p += uintptr(l - int32(1)) goto _1 } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { p0 = p + uintptr(2) - z = int32(*(*uint8)(unsafe.Pointer(p + 1))) + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) p += uintptr(3) - for int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || int32(*(*uint8)(unsafe.Pointer(p))) != int32(']') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']') { p++ } if z == int32(':') && int64(p-uintptr(1))-int64(p0) < int64(16) { - Xmemcpy(tls, bp+8, p0, uint64(int64(p-uintptr(1))-int64(p0))) + Xmemcpy(tls, bp+8, p0, Uint64FromInt64(int64(p-uintptr(1))-int64(p0))) (*(*[16]uint8)(unsafe.Pointer(bp + 8)))[int64(p-uintptr(1))-int64(p0)] = uint8(0) - if Xiswctype(tls, uint32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, uint32(kfold), Xwctype(tls, bp+8)) != 0 { + if Xiswctype(tls, Uint32FromInt32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, Uint32FromInt32(kfold), Xwctype(tls, bp+8)) != 0 { return BoolInt32(!(inv != 0)) } } @@ -127757,7 +127755,7 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { } p += uintptr(l1 - int32(1)) } - if *(*Twchar_t)(unsafe.Pointer(bp)) == uint32(k) || *(*Twchar_t)(unsafe.Pointer(bp)) == uint32(kfold) { + if *(*Twchar_t)(unsafe.Pointer(bp)) == Uint32FromInt32(k) || *(*Twchar_t)(unsafe.Pointer(bp)) == Uint32FromInt32(kfold) { return BoolInt32(!(inv != 0)) } goto _1 @@ -127780,7 +127778,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, endpat, endstr, k, kfold, p, ptail, s, stail, tailcnt, v10, v12, v13, v15, v2, v3, v4, v6, v8, v9 tailcnt = uint64(0) if flags&int32(FNM_PERIOD) != 0 { - if int32(*(*uint8)(unsafe.Pointer(str))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { return int32(FNM_NOMATCH) } } @@ -127839,7 +127837,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(p < endpat) { break } - switch _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) { + switch _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) { case -int32(2): return int32(FNM_NOMATCH) case -int32(5): @@ -127900,9 +127898,9 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, /* Check that the pat and str tails match */ p = ptail for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) - v12 = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + v12 = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) k = v12 if v12 <= 0 { if c != END { @@ -127937,7 +127935,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, p = pat s = str for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) /* Encountering * completes/commits a component */ if c == -int32(5) { @@ -127945,7 +127943,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, str = s break } - k = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + k = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) if !(k != 0) { return int32(FNM_NOMATCH) } @@ -127973,13 +127971,13 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, } /* If we failed, advance str, by 1 char if it's a valid * char, or past all invalid bytes otherwise. */ - k = _str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) + k = _str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) if k > 0 { str += uintptr(*(*Tsize_t)(unsafe.Pointer(bp + 8))) } else { str++ for { - if !(_str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) < 0) { + if !(_str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) < 0) { break } goto _16 @@ -128007,7 +128005,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { for { s = str for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { break } goto _2 @@ -128017,7 +128015,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } p = pat for { - v4 = _pat_next(tls, p, uint64(-Int32FromInt32(1)), bp, flags) + v4 = _pat_next(tls, p, Uint64FromInt32(-Int32FromInt32(1)), bp, flags) c = v4 if !(v4 != END && c != int32('/')) { break @@ -128027,10 +128025,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { ; p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) } - if c != int32(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { return int32(FNM_NOMATCH) } - if _fnmatch_internal(tls, pat, uint64(int64(p)-int64(pat)), str, uint64(int64(s)-int64(str)), flags) != 0 { + if _fnmatch_internal(tls, pat, Uint64FromInt64(int64(p)-int64(pat)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0 { return int32(FNM_NOMATCH) } if !(c != 0) { @@ -128048,10 +128046,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if !(*(*uint8)(unsafe.Pointer(s)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/') { goto _5 } - if !(_fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(int64(s)-int64(str)), flags) != 0) { + if !(_fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0) { return 0 } goto _5 @@ -128061,7 +128059,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } } } - return _fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(-Int32FromInt32(1)), flags) + return _fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt32(-Int32FromInt32(1)), flags) } const GLOB_ABORTED = 2 @@ -128101,7 +128099,7 @@ func _append(tls *TLS, tail uintptr, name uintptr, len1 Tsize_t, mark int32) (r (*Tmatch)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tail)))).Fnext = new1 (*Tmatch)(unsafe.Pointer(new1)).Fnext = UintptrFromInt32(0) Xmemcpy(tls, new1+8, name, len1+uint64(1)) - if mark != 0 && len1 != 0 && int32(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint64(1))))) != int32('/') { + if mark != 0 && len1 != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint64(1))))) != int32('/') { *(*uint8)(unsafe.Pointer(new1 + 8 + uintptr(len1))) = uint8('/') *(*uint8)(unsafe.Pointer(new1 + 8 + uintptr(len1+uint64(1)))) = uint8(0) } @@ -128128,7 +128126,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if *(*uint8)(unsafe.Pointer(pat)) != 0 && type1 != int32(DT_DIR) { type1 = 0 } - for pos+uint64(1) < uint64(PATH_MAX) && int32(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { + for pos+uint64(1) < uint64(PATH_MAX) && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { v1 = pos pos++ v2 = pat @@ -128142,7 +128140,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag in_bracket = 0 overflow = 0 for { - if !(int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { break } if !(*(*uint8)(unsafe.Pointer(pat + uintptr(i))) != 0) { @@ -128150,20 +128148,20 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag return 0 } pat += uintptr(i) - pos += uint64(j) + pos += Uint64FromInt64(j) v4 = Int64FromInt32(0) j = v4 i = v4 break } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { in_bracket = int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { /* Backslashes inside a bracket are (at least by * our interpretation) non-special, so if next * char is ']' we have a complete expression. */ - if in_bracket != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int64(1))))) == int32(']') { + if in_bracket != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int64(1))))) == int32(']') { break } /* Unpaired final backslash never matches. */ @@ -128174,14 +128172,14 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } } } - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { if overflow != 0 { return 0 } in_bracket = 0 pat += uintptr(i + int64(1)) i = int64(-int32(1)) - pos += uint64(j + int64(1)) + pos += Uint64FromInt64(j + int64(1)) j = int64(-int32(1)) } /* Only store a character if it fits in the buffer, but if @@ -128189,10 +128187,10 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag * must be remembered and handled later only if the bracket * is unterminated (and thereby a literal), so as not to * disallow long bracket expressions with short matches. */ - if pos+uint64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { + if pos+Uint64FromInt64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { v5 = j j++ - *(*uint8)(unsafe.Pointer(buf + uintptr(pos+uint64(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) + *(*uint8)(unsafe.Pointer(buf + uintptr(pos+Uint64FromInt64(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) } else { if in_bracket != 0 { overflow = int32(1) @@ -128235,7 +128233,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if p2 != 0 && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { p = p2 for { - if !(p > pat && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { + if !(p > pat && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { break } goto _6 @@ -128269,7 +128267,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag break } /* Quickly skip non-directories when there's pattern left. */ - if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { + if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { continue } l = Xstrlen(tls, de+19) @@ -128295,7 +128293,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } /* With GLOB_PERIOD, don't allow matching . or .. unless * fnmatch would match them with FNM_PERIOD rules in effect. */ - if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { + if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { continue } Xmemcpy(tls, buf+uintptr(pos), de+19, l+uint64(1)) @@ -128307,7 +128305,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } else { v11 = __ccgo_ts } - r = _do_glob(tls, buf, pos+l, int32((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) + r = _do_glob(tls, buf, pos+l, Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) if r != 0 { Xclosedir(tls, dir) return r @@ -128409,7 +128407,7 @@ func _expand_tilde(tls *TLS, pat uintptr, buf uintptr, pos uintptr) (r int32) { ; home = (*(*Tpasswd)(unsafe.Pointer(bp))).Fpw_dir } - for i < uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { + for i < Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { v10 = i i++ v11 = home @@ -128474,7 +128472,7 @@ func Xglob(tls *TLS, pat uintptr, flags int32, errfunc uintptr, g uintptr) (r in (*(*[4096]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) *(*Tsize_t)(unsafe.Pointer(bp + 4112)) = uint64(0) *(*uintptr)(unsafe.Pointer(bp + 4120)) = p - if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && int32(*(*uint8)(unsafe.Pointer(p))) == int32('~') { + if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('~') { error1 = _expand_tilde(tls, bp+4120, bp+16, bp+4112) } if !(error1 != 0) { @@ -128872,7 +128870,7 @@ func _tre_ast_new_iter(tls *TLS, mem Ttre_mem_t, arg uintptr, min int32, max int (*Ttre_iteration_t)(unsafe.Pointer(iter)).Farg = arg (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmin = min (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmax = max - SetBitFieldPtr8Uint32(iter+16, uint32(minimal), 0, 0x1) + SetBitFieldPtr8Uint32(iter+16, Uint32FromInt32(minimal), 0, 0x1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnum_submatches = (*Ttre_ast_node_t)(unsafe.Pointer(arg)).Fnum_submatches return node } @@ -128941,7 +128939,7 @@ func _tre_stack_new(tls *TLS, size int32, max_size int32, increment int32) (r ui _ = s s = Xmalloc(tls, uint64(24)) if s != UintptrFromInt32(0) { - (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*uint64(size)) + (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*Uint64FromInt32(size)) if (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack == UintptrFromInt32(0) { Xfree(tls, s) return UintptrFromInt32(0) @@ -128978,7 +128976,7 @@ func _tre_stack_push(tls *TLS, s uintptr, value Ttre_stack_item) (r Treg_errcode if new_size > (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size { new_size = (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size } - new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*uint64(new_size)) + new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*Uint64FromInt32(new_size)) if new_buffer == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -129112,7 +129110,7 @@ func _tre_expand_macro(tls *TLS, s uintptr) (r uintptr) { _ = i i = 0 for { - if !(_tre_macros[i].Fc != 0 && int32(_tre_macros[i].Fc) != int32(*(*uint8)(unsafe.Pointer(s)))) { + if !(_tre_macros[i].Fc != 0 && Int32FromUint8(_tre_macros[i].Fc) != Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) { break } goto _1 @@ -129148,7 +129146,7 @@ func _tre_new_lit(tls *TLS, p uintptr) (r uintptr) { return uintptr(0) } *(*int32)(unsafe.Pointer(p + 20)) *= int32(2) - a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, uint64((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) + a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, Uint64FromInt32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) if !(a != 0) { return uintptr(0) } @@ -129174,8 +129172,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { /* assumes islower(c) and isupper(c) are exclusive and toupper(c)!=c if islower(c). multiple opposite case characters are not supported */ - if Xiswlower(tls, uint32(c)) != 0 { - v2 = int32(Xtowupper(tls, uint32(c))) + if Xiswlower(tls, Uint32FromInt32(c)) != 0 { + v2 = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(c))) e = v2 b = v2 c++ @@ -129184,7 +129182,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowupper(tls, uint32(c)) != uint32(e) { + if Xtowupper(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _3 @@ -129194,8 +129192,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { e++ } } else { - if Xiswupper(tls, uint32(c)) != 0 { - v4 = int32(Xtowlower(tls, uint32(c))) + if Xiswupper(tls, Uint32FromInt32(c)) != 0 { + v4 = Int32FromUint32(Xtowlower(tls, Uint32FromInt32(c))) e = v4 b = v4 c++ @@ -129204,7 +129202,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowlower(tls, uint32(c)) != uint32(e) { + if Xtowlower(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _5 @@ -129271,7 +129269,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint start = s for { class = uint64(0) - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 <= 0 { if *(*uint8)(unsafe.Pointer(s)) != 0 { v2 = int32(REG_BADPAT) @@ -129280,26 +129278,26 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint } return v2 } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fs = s + uintptr(1) return REG_OK } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { return int32(REG_ERANGE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { /* collating symbols and equivalence classes are not supported */ return int32(REG_ECOLLATE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { s += uintptr(2) len1 = 0 for { if !(len1 < int32(CHARCLASS_NAME_MAX) && *(*uint8)(unsafe.Pointer(s + uintptr(len1))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { - Xmemcpy(tls, bp+4, s, uint64(len1)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { + Xmemcpy(tls, bp+4, s, Uint64FromInt32(len1)) (*(*[15]uint8)(unsafe.Pointer(bp + 4)))[len1] = uint8(0) class = Xwctype(tls, bp+4) break @@ -129309,21 +129307,21 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint ; len1++ } - if !(class != 0) || int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { + if !(class != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { return int32(REG_ECTYPE) } min = 0 max = int32(TRE_CHAR_MAX) s += uintptr(len1 + int32(2)) } else { - v4 = int32(*(*Twchar_t)(unsafe.Pointer(bp))) + v4 = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) max = v4 min = v4 s += uintptr(len1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { s++ - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) - max = int32(*(*Twchar_t)(unsafe.Pointer(bp))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) + max = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))) /* XXX - Should use collation order instead of encoding values in character ranges. */ if len1 <= 0 || min > max { @@ -129382,12 +129380,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*(*Tliterals)(unsafe.Pointer(bp))).Fmem = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem (*(*Tliterals)(unsafe.Pointer(bp))).Flen1 = 0 (*(*Tliterals)(unsafe.Pointer(bp))).Fcap1 = int32(32) - (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) + (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) if !((*(*Tliterals)(unsafe.Pointer(bp))).Fa != 0) { return int32(REG_ESPACE) } (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 = 0 - (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate = BoolInt32(int32(*(*uint8)(unsafe.Pointer(s))) == int32('^')) + (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('^')) if (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate != 0 { s++ } @@ -129411,7 +129409,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) } /* Sort the array if we need to negate it. */ - Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) + Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) /* extra lit for the last negated range */ lit = _tre_new_lit(tls, bp) if !(lit != 0) { @@ -129423,12 +129421,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) /* negated classes */ if (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 != 0 { - nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) + nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) if !(nc != 0) { err = int32(REG_ESPACE) goto parse_bracket_done } - Xmemcpy(tls, nc, bp+24+8, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) + Xmemcpy(tls, nc, bp+24+8, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) *(*Ttre_ctype_t)(unsafe.Pointer(nc + uintptr((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*8)) = uint64(0) } } @@ -129489,7 +129487,7 @@ func _parse_dup_count(tls *TLS, s uintptr, n uintptr) (r uintptr) { } *(*int32)(unsafe.Pointer(n)) = 0 for { - *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (int32(*(*uint8)(unsafe.Pointer(s))) - int32('0')) + *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0')) s++ if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { break @@ -129509,7 +129507,7 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u var _ /* min at bp+0 */ int32 _, _, _, _, _ = v1, v2, v3, v4, v5 s = _parse_dup_count(tls, s, bp) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(',') { s = _parse_dup_count(tls, s+uintptr(1), bp+4) } else { *(*int32)(unsafe.Pointer(bp + 4)) = *(*int32)(unsafe.Pointer(bp)) @@ -129520,11 +129518,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u s++ } } - if v5 = v3 || v2 && int32(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { + if v5 = v3 || v2 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { v4 = s s++ } - if v5 || int32(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { + if v5 || Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { return uintptr(0) } *(*int32)(unsafe.Pointer(pmin)) = *(*int32)(unsafe.Pointer(bp)) @@ -129534,11 +129532,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u func _hexval1(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -129591,7 +129589,7 @@ func _parse_atom(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { var _ /* wc at bp+0 */ Twchar_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, ere, err, i, len1, node, p, tmp1, tmp11, tmp2, tmp21, v, val, v14, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26 ere = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags & int32(REG_EXTENDED) - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('['): goto _1 case int32('\\'): @@ -129633,7 +129631,7 @@ _2: /* extensions: \b, \B, \<, \>, \xHH \x{HHHH} */ s++ v14 = s - switch int32(*(*uint8)(unsafe.Pointer(v14))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v14))) { case 0: return int32(REG_EESCAPE) case int32('b'): @@ -129648,7 +129646,7 @@ _2: s++ v = 0 len1 = int32(2) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { len1 = int32(8) s++ } @@ -129669,7 +129667,7 @@ _2: } s += uintptr(i) if len1 == int32(8) { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('}') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('}') { return int32(REG_EBRACE) } s++ @@ -129702,7 +129700,7 @@ _2: default: if !(ere != 0) && uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { /* back reference */ - val = int32(*(*uint8)(unsafe.Pointer(s))) - int32('0') + val = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0') v19 = ctx + 44 v18 = *(*int32)(unsafe.Pointer(v19)) *(*int32)(unsafe.Pointer(v19))++ @@ -129757,7 +129755,7 @@ _4: _5: ; /* '$' is special everywhere in EREs, and at the end of a BRE subexpression. */ - if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { + if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { goto parse_literal } node = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(2), int32(ASSERT_AT_EOL), -int32(1)) @@ -129789,21 +129787,21 @@ _12: goto parse_literal parse_literal: ; - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 < 0 { return int32(REG_BADPAT) } if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, *(*Twchar_t)(unsafe.Pointer(bp))) != 0 || Xiswlower(tls, *(*Twchar_t)(unsafe.Pointer(bp))) != 0) { /* multiple opposite case characters are not supported */ - tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowupper(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), int32(Xtowupper(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) - tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), int32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowupper(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), Int32FromUint32(Xtowupper(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), Int32FromUint32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(bp)))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) if tmp11 != 0 && tmp21 != 0 { node = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, tmp11, tmp21) } else { node = uintptr(0) } } else { - node = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(*(*Twchar_t)(unsafe.Pointer(bp))), int32(*(*Twchar_t)(unsafe.Pointer(bp))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + node = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))), Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(bp))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) } (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition++ s += uintptr(len1) @@ -129845,7 +129843,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { return err } for { - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { v4 = _tre_stack_push_voidptr(tls, stack, nunion) err = v4 if v4 != REG_OK { @@ -129874,7 +129872,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s goto _3 } - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(1), -int32(1), -int32(1)) if !((*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn != 0) { return int32(REG_ESPACE) @@ -129890,33 +129888,33 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { parse_iter: ; for { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('*') { if !(ere != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('{') { break } } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { break } /* extension: treat \+, \? as repetitions in BRE */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { s++ } /* handle ^* at the start of a BRE. */ - if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && int32(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { + if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { break } /* extension: multiple consecutive *+?{,} is unspecified, but (a+)+ has to be supported so accepting a++ makes sense, note however that the RE_DUP_MAX limit can be circumvented: (a{255}){255} uses a lot of memory.. */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { s = _parse_dup(tls, s+uintptr(1), ere, bp, bp+4) if !(s != 0) { return int32(REG_BADBR) @@ -129924,10 +129922,10 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { } else { *(*int32)(unsafe.Pointer(bp)) = 0 *(*int32)(unsafe.Pointer(bp + 4)) = -int32(1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { *(*int32)(unsafe.Pointer(bp)) = int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('?') { *(*int32)(unsafe.Pointer(bp + 4)) = int32(1) } s++ @@ -129944,13 +129942,13 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { _9: } nbranch = _tre_ast_new_catenation(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nbranch, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn) - if ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { + if ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { /* extension: empty branch is unspecified (), (|a), (a|) here they are not rejected but match on empty string */ - c = int32(*(*uint8)(unsafe.Pointer(s))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) nunion = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nunion, nbranch) nbranch = uintptr(0) - if c == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { + if c == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { s += uintptr(2) (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s } else { @@ -130258,7 +130256,7 @@ func _tre_add_tags(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr, tnfa u } (*(*Ttre_submatch_data_t)(unsafe.Pointer((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fsubmatch_data + uintptr(id1)*16))).Fparents = UintptrFromInt32(0) if i2 > 0 { - p = Xmalloc(tls, uint64(4)*uint64(i2+Int32FromInt32(1))) + p = Xmalloc(tls, uint64(4)*Uint64FromInt32(i2+Int32FromInt32(1))) if p == UintptrFromInt32(0) { status = int32(REG_ESPACE) goto _10 @@ -131162,7 +131160,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; s2++ } - new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*uint64(s1+s2+Int32FromInt32(1))) + new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*Uint64FromInt32(s1+s2+Int32FromInt32(1))) if !(new_set != 0) { return UintptrFromInt32(0) } @@ -131191,7 +131189,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*uint64(i+num_tags+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*Uint64FromInt32(i+num_tags+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -131251,7 +131249,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*uint64(i+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*Uint64FromInt32(i+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -131569,7 +131567,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -131600,7 +131598,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -131658,8 +131656,8 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun } /* Use the character ranges, assertions, etc. from `p1' for the transition from `p1' to `p2'. */ - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition)*4)))*56 (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate_id = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition if (*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fclass != 0 { @@ -131690,7 +131688,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun ; i++ } - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*uint64(i+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*Uint64FromInt32(i+Int32FromInt32(1))) if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -131729,7 +131727,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = UintptrFromInt32(0) /* If there were any tags, allocate an array and fill it. */ if i+j > 0 { - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*uint64(i+j+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(i+j+Int32FromInt32(1))) if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags != 0) { return int32(REG_ESPACE) } @@ -131883,10 +131881,10 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) + (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) tree = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fn /* Referring to nonexistent subexpressions is illegal. */ - if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > int32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { + if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > Int32FromUint64((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { errcode = int32(REG_ESUBREG) if int32(1) != 0 { goto error_exit @@ -131902,7 +131900,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs = BoolInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref >= 0) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_approx = 0 - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) /* Set up tags for submatch addressing. If REG_NOSUB is set and the regexp does not have back references, this can be skipped. */ if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs != 0 || !(cflags&Int32FromInt32(REG_NOSUB) != 0) { @@ -131915,7 +131913,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 { - tag_directions = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + tag_directions = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) if tag_directions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -131923,16 +131921,16 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftag_directions = tag_directions - Xmemset(tls, tag_directions, -int32(1), uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + Xmemset(tls, tag_directions, -int32(1), uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) } - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - submatch_data = Xcalloc(tls, uint64(uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) + submatch_data = Xcalloc(tls, uint64(Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) if submatch_data == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -131985,14 +131983,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - counts = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + counts = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if counts == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - offs = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + offs = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if offs == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132025,7 +132023,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; i++ } - transitions = Xcalloc(tls, uint64(uint32(add)+uint32(1)), uint64(56)) + transitions = Xcalloc(tls, uint64(Uint32FromInt32(add)+uint32(1)), uint64(56)) if transitions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132033,7 +132031,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftransitions = transitions - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) errcode = _tre_ast_to_tnfa(tls, tree, transitions, counts, offs) if errcode != REG_OK { errcode = errcode @@ -132048,7 +132046,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { i++ p += 56 } - initial = Xcalloc(tls, uint64(uint32(i)+uint32(1)), uint64(56)) + initial = Xcalloc(tls, uint64(Uint32FromInt32(i)+uint32(1)), uint64(56)) if initial == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132078,14 +132076,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; j++ } - (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*uint64(j+Int32FromInt32(1))) + (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) if !((*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags != 0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*uint64(j+Int32FromInt32(1))) + Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fassertions = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Fassertions i++ @@ -132095,7 +132093,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { p += 56 } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fstate = UintptrFromInt32(0) - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ffinal = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*(*Ttre_pos_and_tags_t)(unsafe.Pointer((*Ttre_ast_node_t)(unsafe.Pointer(tree)).Flastpos))).Fposition)*4)))*56 (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags = cflags @@ -132232,7 +132230,7 @@ func Xregerror(tls *TLS, e int32, preg uintptr, buf uintptr, size Tsize_t) (r Ts s++ } s = X__lctrans_cur(tls, s) - return uint64(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) + return Uint64FromInt32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) } const tre_bt_mem_alloc = 0 @@ -132353,23 +132351,23 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags everything in a single large block with calloc(). */ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ - if uint64(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { + if Uint64FromInt32(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { return int32(REG_ESPACE) } /* Likewise check rbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Likewise check pbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Compute the length of the block we need. */ - tbytes = uint64(8) * uint64(num_tags) - rbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) - pbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) - xbytes = uint64(8) * uint64(num_tags) - total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes + tbytes = uint64(8) * Uint64FromInt32(num_tags) + rbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) + pbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) + xbytes = uint64(8) * Uint64FromInt32(num_tags) + total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes /* Allocate the memory. */ buf = Xcalloc(tls, total_bytes, uint64(1)) if buf == UintptrFromInt32(0) { @@ -132378,32 +132376,32 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = buf tmp_buf = buf + uintptr(tbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v1 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v1 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v1 = uint64(0) } tmp_buf += uintptr(v1) reach_next = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v2 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v2 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v2 = uint64(0) } tmp_buf += uintptr(v2) reach = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v3 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v3 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v3 = uint64(0) } tmp_buf += uintptr(v3) reach_pos = tmp_buf tmp_buf += uintptr(pbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v4 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v4 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v4 = uint64(0) } @@ -132778,7 +132776,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fprev = UintptrFromInt32(0) (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fnext = UintptrFromInt32(0) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags != 0 { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !(tags != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -132792,7 +132790,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states != 0 { - states_seen = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) + states_seen = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) if !(states_seen != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -132842,7 +132840,7 @@ retry: } str_byte += uintptr(pos_add_next) pos_start = pos - next_c_start = int32(*(*Ttre_char_t)(unsafe.Pointer(bp))) + next_c_start = Int32FromUint32(*(*Ttre_char_t)(unsafe.Pointer(bp))) str_byte_start = str_byte /* Handle initial states. */ next_tags = UintptrFromInt32(0) @@ -132877,7 +132875,7 @@ retry: } (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -132900,7 +132898,7 @@ retry: (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstr_byte = str_byte (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate = (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate_id = (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id - (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c = int32(*(*Ttre_char_t)(unsafe.Pointer(bp))) + (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c = Int32FromUint32(*(*Ttre_char_t)(unsafe.Pointer(bp))) i1 = 0 for { if !(i1 < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags) { @@ -132975,11 +132973,11 @@ _9: bt = *(*int32)(unsafe.Pointer(&(*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fu)) /* Get the substring we need to match against. Remember to turn off REG_NOSUB temporarily. */ - _tre_fill_pmatch(tls, uint64(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) + _tre_fill_pmatch(tls, Uint64FromInt32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) so = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_so eo = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_eo bt_len = eo - so - result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), uint64(bt_len)) + result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), Uint64FromInt64(bt_len)) if result == 0 { /* Back reference matched. Check for infinite loop. */ if bt_len == 0 { @@ -133065,7 +133063,7 @@ _9: } (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133088,7 +133086,7 @@ _9: (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstr_byte = str_byte (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate = (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate_id = (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id - (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c = int32(*(*Ttre_char_t)(unsafe.Pointer(bp))) + (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c = Int32FromUint32(*(*Ttre_char_t)(unsafe.Pointer(bp))) i3 = 0 for { if !(i3 < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags) { @@ -133145,7 +133143,7 @@ backtrack: pos = (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fpos str_byte = (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstr_byte state = (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fstate - *(*Ttre_char_t)(unsafe.Pointer(bp)) = uint32((*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c) + *(*Ttre_char_t)(unsafe.Pointer(bp)) = Uint32FromInt32((*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fitem.Fnext_c) i4 = 0 for { if !(i4 < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags) { @@ -133165,7 +133163,7 @@ backtrack: if *(*Ttre_char_t)(unsafe.Pointer(bp)) == uint32('\000') { goto _8 } - *(*Ttre_char_t)(unsafe.Pointer(bp)) = uint32(next_c_start) + *(*Ttre_char_t)(unsafe.Pointer(bp)) = Uint32FromInt32(next_c_start) str_byte = str_byte_start goto retry } else { @@ -133292,7 +133290,7 @@ func Xregexec(tls *TLS, preg uintptr, string1 uintptr, nmatch Tsize_t, pmatch ui nmatch = uint64(0) } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 && nmatch > uint64(0) { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if tags == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -133389,7 +133387,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(TRE_MEM_BLOCK_SIZE) } else { if size*uint64(8) > uint64(TRE_MEM_BLOCK_SIZE) { - block_size = int32(size * uint64(8)) + block_size = Int32FromUint64(size * uint64(8)) } else { block_size = int32(TRE_MEM_BLOCK_SIZE) } @@ -133398,7 +133396,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) return UintptrFromInt32(0) } - (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, uint64(block_size)) + (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, Uint64FromInt32(block_size)) if (*Ttre_list_t)(unsafe.Pointer(l)).Fdata == UintptrFromInt32(0) { Xfree(tls, l) (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) @@ -133413,12 +133411,12 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl } (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fcurrent = l (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr = (*Ttre_list_t)(unsafe.Pointer(l)).Fdata - (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(block_size) + (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = Uint64FromInt32(block_size) } } /* Make sure the next pointer will be aligned. */ - if (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { - v1 = uint64(8) - (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) + if (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { + v1 = uint64(8) - (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) } else { v1 = uint64(0) } @@ -133505,8 +133503,8 @@ func _resize(tls *TLS, nel Tsize_t, htab uintptr) (r int32) { _, _, _, _, _, _, _, _ = e, i, j, newe, newsize, oldsize, oldtab, v4 oldsize = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fmask + uint64(1) oldtab = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fentries - if nel > uint64(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { - nel = uint64(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) + if nel > Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { + nel = Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) } newsize = uint64(MINSIZE) for { @@ -133949,7 +133947,7 @@ func X__tsearch_balance(tls *TLS, p uintptr) (r int32) { n = *(*uintptr)(unsafe.Pointer(p)) h0 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8))) h1 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8 + 1*8))) - if uint32(h0-h1)+uint32(1) < uint32(3) { + if Uint32FromInt32(h0-h1)+uint32(1) < uint32(3) { old = (*Tnode1)(unsafe.Pointer(n)).Fh if h0 < h1 { v1 = h1 + int32(1) @@ -134060,7 +134058,7 @@ func Xpoll(tls *TLS, fds uintptr, n Tnfds_t, timeout int32) (r int32) { } else { v1 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), int64(n), int64(v1), int64(Int32FromInt32(0)), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), Int64FromUint64(n), int64(v1), int64(Int32FromInt32(0)), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) } type t__ucontext3 = Tucontext_t5 @@ -134097,7 +134095,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r int32 } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), int64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), Int64FromUint64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) } type t__ucontext4 = Tucontext_t4 @@ -134115,7 +134113,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui var _ /* data at bp+16 */ [2]Tsyscall_arg_t _, _, _, _, _ = ns, s, v1, v2, v3 *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 16)) = [2]Tsyscall_arg_t{ - 0: int64(uint64(mask)), + 0: Int64FromUint64(uint64(mask)), 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } if ts != 0 { @@ -134139,7 +134137,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) } type Tucontext_t6 = struct { @@ -134174,9 +134172,9 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin v2 = 0 } us = v2 - max_time = int64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) + max_time = Int64FromUint64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) if s < 0 || us < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if us/int64(1000000) > max_time-s { s = max_time @@ -134199,7 +134197,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 16)) = [2]Tsyscall_arg_t{ 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) } var _all_mask = [1]uint64{ @@ -134249,9 +134247,9 @@ func Xgetitimer(tls *TLS, which int32, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) } func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { @@ -134259,7 +134257,7 @@ func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { trc("tls=%v pid=%v sig=%v, (%v:)", tls, pid, sig, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) } func Xkillpg(tls *TLS, pgid Tpid_t, sig int32) (r int32) { @@ -134336,7 +134334,7 @@ func Xraise(tls *TLS, sig int32) (r int32) { var _ /* set at bp+0 */ Tsigset_t _ = ret X__block_app_sigs(tls, bp) - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) X__restore_sigs(tls, bp) return ret } @@ -134372,8 +134370,8 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { vs = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_sec ius = (*Titimerval)(unsafe.Pointer(new1)).Fit_interval.Ftv_usec vus = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_usec - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, @@ -134388,9 +134386,9 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) } type Tk_sigaction = struct { @@ -134429,8 +134427,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = old, r, r1, v, v1, v10, v11, v12, v15, v18, v19, v2, v22, v25, v26, v27, v3, v4, v7 if sa != 0 { if uint64(*(*uintptr)(unsafe.Pointer(sa))) > uint64(1) { - v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(uint64(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 - v2 = int64(uint64(1) << (uint64(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) + v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(Uint64FromInt32(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 + v2 = Int64FromUint64(uint64(1) << (Uint64FromInt32(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) if Uint64FromInt64(8) == Uint64FromInt64(4) { v3 = v1 for { @@ -134465,7 +134463,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) Fr [0][2]Tuint32_t Fv Tuint64_t }{} - *(*uint64)(unsafe.Pointer(bp + 8)) = uint64(v2) + *(*uint64)(unsafe.Pointer(bp + 8)) = Uint64FromInt64(v2) if *(*Tuint32_t)(unsafe.Pointer(bp + 8)) != 0 { v11 = v10 for { @@ -134543,7 +134541,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) } } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fhandler = *(*uintptr)(unsafe.Pointer(sa)) - (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = uint64((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) + (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = Uint64FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags |= uint64(SA_RESTORER) if (*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags&int32(SA_SIGINFO) != 0 { v25 = __ccgo_fp(X__restore_rt) @@ -134551,7 +134549,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) v25 = __ccgo_fp(X__restore) } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Frestorer = v25 - Xmemcpy(tls, bp+16+24, sa+8, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + Xmemcpy(tls, bp+16+24, sa+8, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } if sa != 0 { v26 = bp + 16 @@ -134566,10 +134564,10 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) r1 = int32(X__syscall4(tls, int64(SYS_rt_sigaction), int64(sig), int64(v26), int64(v27), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if old1 != 0 && !(r1 != 0) { *(*uintptr)(unsafe.Pointer(old1)) = (*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fhandler - (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = int32((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) - Xmemcpy(tls, old1+8, bp+48+24, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = Int32FromUint64((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) + Xmemcpy(tls, old1+8, bp+48+24, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { @@ -134582,7 +134580,7 @@ func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { var r int32 var _ /* set at bp+0 */ [1]uint64 _ = r - if uint32(sig)-uint32(32) < uint32(3) || uint32(sig)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(sig)-uint32(32) < uint32(3) || Uint32FromInt32(sig)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134616,8 +134614,8 @@ func Xsigaddset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134640,7 +134638,7 @@ func Xsigaltstack(tls *TLS, ss uintptr, old uintptr) (r int32) { return -int32(1) } } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) } const SST_SIZE = 8 @@ -134666,7 +134664,7 @@ func Xsigandset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) & *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -134684,8 +134682,8 @@ func Xsigdelset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134739,7 +134737,7 @@ func Xsigisemptyset(tls *TLS, set uintptr) (r int32) { _ = i i = uint64(0) for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } if *(*uint64)(unsafe.Pointer(set + uintptr(i)*8)) != 0 { @@ -134759,8 +134757,8 @@ func Xsigismember(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { return 0 } return BoolInt32(!!(*(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8))&(Uint64FromUint64(1)<<(uint64(s)&(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)))) != 0)) @@ -134779,7 +134777,7 @@ func Xsigorset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) { l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) | *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -134795,7 +134793,7 @@ func Xsigpending(tls *TLS, set uintptr) (r int32) { trc("tls=%v set=%v, (%v:)", tls, set, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) } func Xsigprocmask(tls *TLS, how int32, set uintptr, old uintptr) (r1 int32) { @@ -134831,7 +134829,7 @@ func Xsigqueue(tls *TLS, pid Tpid_t, sig int32, value Tsigval) (r1 int32) { *(*Tuid_t)(unsafe.Pointer(bp + 16 + 4)) = Xgetuid(tls) X__block_app_sigs(tls, bp+128) *(*Tpid_t)(unsafe.Pointer(bp + 16)) = Xgetpid(tls) - r = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) X__restore_sigs(tls, bp+128) return r } @@ -134891,7 +134889,7 @@ func Xsigsuspend(tls *TLS, mask uintptr) (r int32) { trc("tls=%v mask=%v, (%v:)", tls, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) } func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r int32) { @@ -134908,7 +134906,7 @@ func Xsigtimedwait(tls *TLS, mask uintptr, si uintptr, timeout uintptr) (r int32 for cond := true; cond; cond = ret == -int32(EINTR) { ret = _do_sigtimedwait(tls, mask, si, timeout) } - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsigwait(tls *TLS, mask uintptr, sig uintptr) (r int32) { @@ -134987,7 +134985,7 @@ func Xchmod(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(mode))))) } func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { @@ -135000,12 +134998,12 @@ func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), int64(mode))) + ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), Int64FromUint32(mode))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp), int64(mode))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp), Int64FromUint32(mode))))) } func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r int32) { @@ -135020,36 +135018,36 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in var _ /* st at bp+0 */ Tstat _, _, _ = fd2, ret, v1 if !(flag != 0) { - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), Int64FromUint32(mode))))) } - ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), int64(mode), int64(flag))) + ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), Int64FromUint32(mode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag != int32(AT_SYMLINK_NOFOLLOW) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if Xfstatat(tls, fd, path, bp, flag) != 0 { return -int32(1) } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } v1 = int32(X__syscall3(tls, int64(SYS_openat), int64(fd), int64(path), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_PATH)|Int32FromInt32(O_NOFOLLOW)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC)))) fd2 = v1 if v1 < 0 { if fd2 == -int32(ELOOP) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } - return int32(X__syscall_ret(tls, uint64(fd2))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd2))) } - X__procfdname(tls, bp+128, uint32(fd2)) + X__procfdname(tls, bp+128, Uint32FromInt32(fd2)) ret = Xstat(tls, bp+128, bp) if !(ret != 0) { if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - ret = int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + ret = int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } else { - ret = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+128), int64(mode))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+128), Int64FromUint32(mode))))) } } X__syscall1(tls, int64(SYS_close), int64(fd2)) @@ -135062,7 +135060,7 @@ func X__fstat(tls *TLS, fd int32, st uintptr) (r int32) { defer func() { trc("-> %v", r) }() } if fd < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EBADF)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EBADF)))) } return X__fstatat(tls, fd, __ccgo_ts, st, int32(AT_EMPTY_PATH)) } @@ -135134,20 +135132,20 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r Fst_uid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_uid, Fst_gid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_gid, Fst_rdev: uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<= 0 { ret = int32(X__syscall4(tls, int64(SYS_newfstatat), int64(fd), int64(path), int64(bp), int64(flag))) if ret == -int32(EINVAL) { - X__procfdname(tls, bp+128, uint32(fd)) + X__procfdname(tls, bp+128, Uint32FromInt32(fd)) ret = int32(X__syscall4(tls, int64(SYS_newfstatat), int64(-Int32FromInt32(100)), int64(bp+128), int64(bp), int64(Int32FromInt32(0)))) } } @@ -135234,11 +135232,11 @@ func X__fstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int if uint64(8) < uint64(8) { ret = _fstatat_statx(tls, fd, path, st, flag) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } ret = _fstatat_kstat(tls, fd, path, st, flag) - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xfstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int32) { @@ -135274,8 +135272,8 @@ func X__futimesat(tls *TLS, dirfd int32, pathname uintptr, times uintptr) (r int if !(i < int32(2)) { break } - if uint64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_sec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_nsec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec * int64(1000) @@ -135322,7 +135320,7 @@ func Xmkdir(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mkdirat), int64(-Int32FromInt32(100)), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mkdirat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(mode))))) } func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { @@ -135330,7 +135328,7 @@ func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v fd=%v path=%v mode=%v, (%v:)", tls, fd, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), Int64FromUint32(mode))))) } func Xmkfifo(tls *TLS, path uintptr, mode Tmode_t) (r int32) { @@ -135354,7 +135352,7 @@ func Xmknod(tls *TLS, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { trc("tls=%v path=%v mode=%v dev=%v, (%v:)", tls, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_mknodat), int64(-Int32FromInt32(100)), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_mknodat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { @@ -135362,7 +135360,7 @@ func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int trc("tls=%v fd=%v path=%v mode=%v dev=%v, (%v:)", tls, fd, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { @@ -135375,7 +135373,7 @@ func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { func ___statfs(tls *TLS, path uintptr, buf uintptr) (r int32) { *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_statfs), int64(path), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_statfs), int64(path), int64(buf))))) } func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { @@ -135384,7 +135382,7 @@ func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { defer func() { trc("-> %v", r) }() } *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fstatfs), int64(fd), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fstatfs), int64(fd), int64(buf))))) } func _fixup(tls *TLS, out uintptr, in uintptr) { @@ -135404,7 +135402,7 @@ func _fixup(tls *TLS, out uintptr, in uintptr) { (*Tstatvfs)(unsafe.Pointer(out)).Ff_files = (*Tstatfs)(unsafe.Pointer(in)).Ff_files (*Tstatvfs)(unsafe.Pointer(out)).Ff_ffree = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree (*Tstatvfs)(unsafe.Pointer(out)).Ff_favail = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree - (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = uint64(*(*int32)(unsafe.Pointer(in + 56))) + (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = Uint64FromInt32(*(*int32)(unsafe.Pointer(in + 56))) (*Tstatvfs)(unsafe.Pointer(out)).Ff_flag = (*Tstatfs)(unsafe.Pointer(in)).Ff_flags (*Tstatvfs)(unsafe.Pointer(out)).Ff_namemax = (*Tstatfs)(unsafe.Pointer(in)).Ff_namelen (*Tstatvfs)(unsafe.Pointer(out)).Ff_type = uint32((*Tstatfs)(unsafe.Pointer(in)).Ff_type) @@ -135445,7 +135443,7 @@ func Xumask(tls *TLS, mode Tmode_t) (r Tmode_t) { trc("tls=%v mode=%v, (%v:)", tls, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_umask), int64(mode))))) + return Uint32FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_umask), Int64FromUint32(mode))))) } func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r1 int32) { @@ -135459,7 +135457,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r times = uintptr(0) } r = int32(X__syscall4(tls, int64(SYS_utimensat), int64(fd), int64(path), int64(times), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__fclose_ca(tls *TLS, f uintptr) (r int32) { @@ -135482,7 +135480,7 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { var _ /* wsz at bp+0 */ Twinsize _, _, _, _ = f, flags, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1504, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1504, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -135496,19 +135494,19 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { Xmemset(tls, f, 0, uint64(232)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(v2) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(v2) } /* Apply close-on-exec flag */ if Xstrchr(tls, mode, int32('e')) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } /* Set append mode on fd if opened for append */ - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { flags = int32(X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFL)))) if !(flags&Int32FromInt32(O_APPEND) != 0) { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFL)), int64(flags|Int32FromInt32(O_APPEND))) @@ -135553,7 +135551,7 @@ func X__fmodeflags(tls *TLS, mode uintptr) (r int32) { if Xstrchr(tls, mode, int32('+')) != 0 { flags = int32(O_RDWR) } else { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { flags = O_RDONLY } else { flags = int32(O_WRONLY) @@ -135565,13 +135563,13 @@ func X__fmodeflags(tls *TLS, mode uintptr) (r int32) { if Xstrchr(tls, mode, int32('e')) != 0 { flags |= int32(O_CLOEXEC) } - if int32(*(*uint8)(unsafe.Pointer(mode))) != int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) != int32('r') { flags |= int32(O_CREAT) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('w') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('w') { flags |= int32(O_TRUNC) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { flags |= int32(O_APPEND) } return flags @@ -135583,12 +135581,12 @@ func X__fopen_rb_ca(tls *TLS, filename uintptr, f uintptr, buf uintptr, len1 Tsi defer func() { trc("-> %v", r) }() } Xmemset(tls, f, 0, uint64(232)) - (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) + (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) if (*TFILE)(unsafe.Pointer(f)).Ffd < 0 { return uintptr(0) } X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) (*TFILE)(unsafe.Pointer(f)).Fbuf = buf + uintptr(UNGET) (*TFILE)(unsafe.Pointer(f)).Fbuf_size = len1 - uint64(UNGET) (*TFILE)(unsafe.Pointer(f)).Fread = __ccgo_fp(X__stdio_read) @@ -135609,22 +135607,22 @@ func X__overflow(tls *TLS, f uintptr, _c int32) (r int32) { var v2, v3 uintptr var _ /* c at bp+0 */ uint8 _, _, _ = v1, v2, v3 - *(*uint8)(unsafe.Pointer(bp)) = uint8(_c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(_c) if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return -int32(1) } - if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && int32(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { + if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { v1 = *(*uint8)(unsafe.Pointer(bp)) v3 = f + 40 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ *(*uint8)(unsafe.Pointer(v2)) = v1 - return int32(v1) + return Int32FromUint8(v1) } if (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, bp, uint64(1)) != uint64(1) { return -int32(1) } - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } func _dummy9(tls *TLS, fd int32) (r int32) { @@ -135636,7 +135634,7 @@ func X__stdio_close(tls *TLS, f uintptr) (r int32) { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) } var _dummy_file = uintptr(0) @@ -135709,9 +135707,9 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { }, } if (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len != 0 { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) } else { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), Int64FromUint64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) } cnt = v1 if cnt <= 0 { @@ -135720,11 +135718,11 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32(F_EOF) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v2) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v2) return uint64(0) } - if uint64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { - return uint64(cnt) + if Uint64FromInt64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { + return Uint64FromInt64(cnt) } cnt = Tssize_t(uint64(cnt) - (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len) (*TFILE)(unsafe.Pointer(f)).Frpos = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -135763,7 +135761,7 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { Fiov_base: (*TFILE)(unsafe.Pointer(f)).Fwbase, - Fiov_len: uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), + Fiov_len: Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), }, 1: { Fiov_base: buf, @@ -135774,8 +135772,8 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) rem = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len + (*(*Tiovec)(unsafe.Pointer(iov + 1*16))).Fiov_len iovcnt = int32(2) for { - cnt = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) - if uint64(cnt) == rem { + cnt = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) + if Uint64FromInt64(cnt) == rem { (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v2 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fwbase = v2 @@ -135796,14 +135794,14 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) } return v5 } - rem -= uint64(cnt) - if uint64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { + rem -= Uint64FromInt64(cnt) + if Uint64FromInt64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { cnt = Tssize_t(uint64(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len) iov += 16 iovcnt-- } (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base + uintptr(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= uint64(cnt) + (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= Uint64FromInt64(cnt) goto _1 _1: } @@ -135907,7 +135905,7 @@ func X__uflow(tls *TLS, f uintptr) (r int32) { defer tls.Free(16) var _ /* c at bp+0 */ uint8 if !(X__toread(tls, f) != 0) && (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fread})))(tls, f, bp, uint64(1)) == uint64(1) { - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } return -int32(1) } @@ -135938,7 +135936,7 @@ func Xclearerr(tls *TLS, f uintptr) { v1 = 0 } __need_unlock = v1 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -136044,7 +136042,7 @@ func X__fpending(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__fpurge(tls *TLS, f uintptr) (r int32) { @@ -136088,7 +136086,7 @@ func X__freadahead(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { @@ -136099,7 +136097,7 @@ func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { if (*TFILE)(unsafe.Pointer(f)).Frpos == (*TFILE)(unsafe.Pointer(f)).Frend { return uintptr(0) } - *(*Tsize_t)(unsafe.Pointer(sizep)) = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + *(*Tsize_t)(unsafe.Pointer(sizep)) = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) return (*TFILE)(unsafe.Pointer(f)).Frpos } @@ -136367,7 +136365,7 @@ _8: v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__uflow(tls, f) } @@ -136426,7 +136424,7 @@ func Xfgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -136462,27 +136460,27 @@ func Xfgetln(tls *TLS, f uintptr, plen uintptr) (r uintptr) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } Xungetc(tls, v2, f) if v6 = (*TFILE)(unsafe.Pointer(f)).Frend != 0; v6 { - v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) z = v5 } if v6 && v5 != 0 { ret = (*TFILE)(unsafe.Pointer(f)).Frpos z++ v7 = z - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(int64(v7) - int64(ret)) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(int64(v7) - int64(ret)) (*TFILE)(unsafe.Pointer(f)).Frpos = z } else { *(*[1]Tsize_t)(unsafe.Pointer(bp)) = [1]Tsize_t{} v8 = Xgetline(tls, f+168, bp, f) l = v8 if v8 > 0 { - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(l) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(l) ret = (*TFILE)(unsafe.Pointer(f)).Fgetln_buf } } @@ -136540,17 +136538,17 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { n-- for n != 0 { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v2 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v2 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v2) - if k < uint64(n) { + k = Uint64FromInt64(v2) + if k < Uint64FromInt32(n) { v3 = k } else { - v3 = uint64(n) + v3 = Uint64FromInt32(n) } k = v3 Xmemcpy(tls, p, (*TFILE)(unsafe.Pointer(f)).Frpos, k) @@ -136565,7 +136563,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -136578,11 +136576,11 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { break } n-- - v8 = uint8(c) + v8 = Uint8FromInt32(c) v9 = p p++ *(*uint8)(unsafe.Pointer(v9)) = v8 - if int32(v8) == int32('\n') { + if Int32FromUint8(v8) == int32('\n') { break } } @@ -136615,7 +136613,7 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { _, _, _, _, _, _, _ = c, first, l, v1, v2, v3, v4 /* Convert character from buffer if possible */ if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - l = uint64(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) + l = Uint64FromInt32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) if l+uint64(1) >= uint64(1) { *(*uintptr)(unsafe.Pointer(f + 8)) += uintptr(l + BoolUint64(!(l != 0))) /* l==0 means 1 byte, null */ return *(*Twchar_t)(unsafe.Pointer(bp)) @@ -136624,18 +136622,18 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { /* Convert character byte-by-byte */ *(*Tmbstate_t)(unsafe.Pointer(bp + 8)) = Tmbstate_t{} first = int32(1) - for cond := true; cond; cond = l == uint64(-Int32FromInt32(2)) { + for cond := true; cond; cond = l == Uint64FromInt32(-Int32FromInt32(2)) { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } v1 = v2 c = v1 - *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(v1) + *(*uint8)(unsafe.Pointer(bp + 16)) = Uint8FromInt32(v1) if c < 0 { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) @@ -136644,10 +136642,10 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { return uint32(0xffffffff) } l = Xmbrtowc(tls, bp, bp+16, uint64(1), bp+8) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - Xungetc(tls, int32(*(*uint8)(unsafe.Pointer(bp + 16))), f) + Xungetc(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 16))), f) } return uint32(0xffffffff) } @@ -136841,7 +136839,7 @@ func _mseek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -136855,13 +136853,13 @@ _1: 1: (*Tcookie)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) - if off < -base || off > int64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + if off < -base || off > Int64FromUint64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _mread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -136895,7 +136893,7 @@ func _mwrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2, rem Tsize_t _, _, _ = c, len2, rem c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _mwrite(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwpos, len2) < len2 { @@ -136939,11 +136937,11 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { var v3 Tsize_t _, _, _, _, _ = f, plus, v1, v2, v3 plus = BoolInt32(!!(Xstrchr(tls, mode, int32('+')) != 0)) - if !(Xstrchr(tls, __ccgo_ts+1504, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1504, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } - if !(buf != 0) && size > uint64(Int64FromInt64(INT64_MAX)) { + if !(buf != 0) && size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -136968,19 +136966,19 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { } (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fbuf = buf (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fsize = size - (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = int32(*(*uint8)(unsafe.Pointer(mode))) + (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) if !(plus != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = size } else { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { v3 = Xstrnlen(tls, buf, size) (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fpos = v3 (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = v3 @@ -137009,13 +137007,13 @@ func Xfopen(tls *TLS, filename uintptr, mode uintptr) (r uintptr) { var fd, flags int32 _, _, _ = f, fd, flags /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1504, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1504, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } /* Compute the flags to pass to open() */ flags = X__fmodeflags(tls, mode) - fd = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) if fd < 0 { return uintptr(0) } @@ -137060,8 +137058,8 @@ func _cookieread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { if ret <= 0 { goto bail } - readlen += uint64(ret) - remain -= uint64(ret) + readlen += Uint64FromInt64(ret) + remain -= Uint64FromInt64(ret) } if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) || remain > BoolUint64(!!((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0)) { return readlen @@ -137087,7 +137085,7 @@ bail: } else { v4 = int32(F_ERR) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v4) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v4) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Frend = v5 (*TFILE)(unsafe.Pointer(f)).Frpos = v5 @@ -137100,7 +137098,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var ret Tssize_t _, _, _, _, _ = fc, len2, ret, v1, v2 fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if !((*Tfcookie)(unsafe.Pointer(fc)).Fiofuncs.Fwrite != 0) { return len1 } @@ -137120,7 +137118,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) return uint64(0) } - return uint64(ret) + return Uint64FromInt64(ret) } func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { @@ -137131,7 +137129,7 @@ func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { var res int32 _, _ = fc, res fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - if uint32(whence) > uint32(2) { + if Uint32FromInt32(whence) > uint32(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -137165,7 +137163,7 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun var v2 int32 _, _, _ = f, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1504, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1504, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -137179,12 +137177,12 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun Xmemset(tls, f, 0, uint64(232)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } /* Set up our fcookie */ (*Tcookie_FILE)(unsafe.Pointer(f)).Ffc.Fcookie = cookie @@ -137254,15 +137252,15 @@ _8: if v7 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v10 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v10 = Uint8FromInt32(c) v12 = f + 40 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ *(*uint8)(unsafe.Pointer(v11)) = v10 - v9 = int32(v10) + v9 = Int32FromUint8(v10) } else { - v9 = X__overflow(tls, f, int32(uint8(c))) + v9 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v9 v13 = f + 140 @@ -137317,15 +137315,15 @@ func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -137375,17 +137373,17 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale if BoolInt32(c < uint32(128)) != 0 { - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + if Int32FromUint8(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { v2 = uint8(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(uint8(c))) } - c = uint32(v1) + c = Uint32FromInt32(v1) } else { if (*TFILE)(unsafe.Pointer(f)).Fwpos+uintptr(MB_LEN_MAX) < (*TFILE)(unsafe.Pointer(f)).Fwend { l = Xwctomb(tls, (*TFILE)(unsafe.Pointer(f)).Fwpos, c) @@ -137396,7 +137394,7 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } } else { l = Xwctomb(tls, bp, c) - if l < 0 || X__fwritex(tls, bp, uint64(l), f) < uint64(l) { + if l < 0 || X__fwritex(tls, bp, Uint64FromInt32(l), f) < Uint64FromInt32(l) { c = uint32(0xffffffff) } } @@ -137490,7 +137488,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { ___unlockfile(tls, f) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return int32(l) /* 0 or -1 */ + return Int32FromUint64(l) /* 0 or -1 */ } func Xfputws_unlocked(tls *TLS, _ws uintptr, f uintptr) (r int32) { @@ -137526,8 +137524,8 @@ func Xfread(tls *TLS, destv uintptr, size Tsize_t, nmemb Tsize_t, f uintptr) (r *(*int32)(unsafe.Pointer(f + 136)) |= (*TFILE)(unsafe.Pointer(f)).Fmode - int32(1) if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { /* First exhaust the buffer. */ - if uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { - v2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + if Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { + v2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) } else { v2 = l } @@ -137603,7 +137601,7 @@ func Xfreopen(tls *TLS, filename uintptr, mode uintptr, f uintptr) (r uintptr) { X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } fl &= ^(Int32FromInt32(O_CREAT) | Int32FromInt32(O_EXCL) | Int32FromInt32(O_CLOEXEC)) - if X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { goto fail } } else { @@ -137701,7 +137699,7 @@ func X__fseeko_unlocked(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32) v3 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v3 (*TFILE)(unsafe.Pointer(f)).Frpos = v3 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) return 0 } @@ -138027,14 +138025,14 @@ func X__fwritex(tls *TLS, s uintptr, l Tsize_t, f uintptr) (r Tsize_t) { if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return uint64(0) } - if l > uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { + if l > Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { return (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, s, l) } if (*TFILE)(unsafe.Pointer(f)).Flbf >= 0 { /* Match /^(.*\n|)/ */ i = l for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { break } goto _1 @@ -138157,7 +138155,7 @@ _8: v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__uflow(tls, f) } @@ -138216,7 +138214,7 @@ func Xgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138249,7 +138247,7 @@ func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -138312,7 +138310,7 @@ _8: v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__uflow(tls, f) } @@ -138371,7 +138369,7 @@ func Xgetchar(tls *TLS) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138396,7 +138394,7 @@ func Xgetchar_unlocked(tls *TLS) (r int32) { v3 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -138435,13 +138433,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize } for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v3 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v3 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v3) + k = Uint64FromInt64(v3) } else { z = uintptr(0) k = uint64(0) @@ -138485,7 +138483,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -138506,13 +138504,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) - *(*uint8)(unsafe.Pointer(v8)) = uint8(c) + *(*uint8)(unsafe.Pointer(v8)) = Uint8FromInt32(c) } else { - v10 = uint8(c) + v10 = Uint8FromInt32(c) v11 = i i++ *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)) + uintptr(v11))) = v10 - if int32(v10) == delim { + if Int32FromUint8(v10) == delim { break } } @@ -138523,7 +138521,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize if __need_unlock != 0 { ___unlockfile(tls, f) } - return int64(i) + return Int64FromUint64(i) } func X__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t) { @@ -138563,7 +138561,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { v5 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -138574,7 +138572,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { } v6 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = Uint8FromInt32(c) } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) if c != int32('\n') && (!((*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdin_FILE)))).Fflags&Uint32FromInt32(F_EOF) != 0) || !(i != 0)) { @@ -138687,7 +138685,7 @@ func _ms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -138701,13 +138699,13 @@ _1: 1: (*Tcookie1)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie1)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > int64(0x7fffffffffffffff)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie1)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -138715,7 +138713,7 @@ func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _ms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -138821,7 +138819,7 @@ func _wms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -138835,14 +138833,14 @@ _1: 1: (*Tcookie2)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie2)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)-base { goto fail } Xmemset(tls, c+48, 0, uint64(8)) - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie2)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -138853,7 +138851,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _wms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -138862,7 +138860,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { } if len1+(*Tcookie2)(unsafe.Pointer(c)).Fpos >= (*Tcookie2)(unsafe.Pointer(c)).Fspace { len2 = uint64(2)*(*Tcookie2)(unsafe.Pointer(c)).Fspace + uint64(1) | ((*Tcookie2)(unsafe.Pointer(c)).Fpos + len1 + uint64(1)) - if len2 > uint64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { + if len2 > Uint64FromInt64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { return uint64(0) } newbuf = Xrealloc(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf, len2*uint64(4)) @@ -138876,7 +138874,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { (*Tcookie2)(unsafe.Pointer(c)).Fspace = len2 } len2 = Xmbsnrtowcs(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf+uintptr((*Tcookie2)(unsafe.Pointer(c)).Fpos)*4, bp, len1, (*Tcookie2)(unsafe.Pointer(c)).Fspace-(*Tcookie2)(unsafe.Pointer(c)).Fpos, c+48) - if len2 == uint64(-Int32FromInt32(1)) { + if len2 == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } *(*Tsize_t)(unsafe.Pointer(c + 16)) += len2 @@ -138962,7 +138960,7 @@ func Xpclose(tls *TLS, f uintptr) (r1 int32) { } } if r < 0 { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } return *(*int32)(unsafe.Pointer(bp)) } @@ -139051,15 +139049,15 @@ _8: if v7 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v10 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v10 = Uint8FromInt32(c) v12 = f + 40 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ *(*uint8)(unsafe.Pointer(v11)) = v10 - v9 = int32(v10) + v9 = Int32FromUint8(v10) } else { - v9 = X__overflow(tls, f, int32(uint8(c))) + v9 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v9 v13 = f + 140 @@ -139114,15 +139112,15 @@ func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139150,15 +139148,15 @@ func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139216,15 +139214,15 @@ _8: if v7 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v10 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v10 = Uint8FromInt32(c) v12 = f + 40 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ *(*uint8)(unsafe.Pointer(v11)) = v10 - v9 = int32(v10) + v9 = Int32FromUint8(v10) } else { - v9 = X__overflow(tls, f, int32(uint8(c))) + v9 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v9 v13 = f + 140 @@ -139279,15 +139277,15 @@ func Xputchar(tls *TLS, c1 int32) (r int32) { v2 = uintptr(unsafe.Pointer(&X__stdout_FILE)) l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139307,15 +139305,15 @@ func Xputchar_unlocked(tls *TLS, c int32) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v2 = Uint8FromInt32(c) v4 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(c))) + v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139337,15 +139335,15 @@ func Xputs(tls *TLS, s uintptr) (r1 int32) { } __need_unlock = v1 if v6 = Xfputs(tls, s, uintptr(unsafe.Pointer(&X__stdout_FILE))) < 0; !v6 { - if int32(uint8(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v3 = uint8(Int32FromUint8('\n')) + if Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v3 = Uint8FromInt32(Int32FromUint8('\n')) v5 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ *(*uint8)(unsafe.Pointer(v4)) = v3 - v2 = int32(v3) + v2 = Int32FromUint8(v3) } else { - v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(Int32FromUint8('\n')))) + v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n')))) } } r = -BoolInt32(v6 || v2 < 0) @@ -139363,7 +139361,7 @@ func Xputw(tls *TLS, _x int32, f uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) *(*int32)(unsafe.Pointer(bp)) = _x - return int32(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) + return Int32FromUint64(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) } func Xputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -139401,7 +139399,7 @@ func Xremove(tls *TLS, path uintptr) (r1 int32) { if r == -int32(EISDIR) { r = int32(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(AT_REMOVEDIR)))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { @@ -139409,7 +139407,7 @@ func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { trc("tls=%v old=%v new1=%v, (%v:)", tls, old, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_renameat), int64(-Int32FromInt32(100)), int64(old), int64(-Int32FromInt32(100)), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_renameat), int64(-Int32FromInt32(100)), int64(old), int64(-Int32FromInt32(100)), int64(new1))))) } func Xrewind(tls *TLS, f uintptr) { @@ -139425,7 +139423,7 @@ func Xrewind(tls *TLS, f uintptr) { } __need_unlock = v1 X__fseeko_unlocked(tls, f, 0, 0) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -139700,7 +139698,7 @@ func Xtmpfile(tls *TLS) (r uintptr) { break } ___randname(tls, bp+uintptr(13)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) if fd >= 0 { X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(bp), int64(Int32FromInt32(0))) f = X__fdopen(tls, fd, __ccgo_ts+1583) @@ -139784,12 +139782,12 @@ func Xungetc(tls *TLS, c int32, f uintptr) (r int32) { v3 = f + 8 *(*uintptr)(unsafe.Pointer(v3))-- v2 = *(*uintptr)(unsafe.Pointer(v3)) - *(*uint8)(unsafe.Pointer(v2)) = uint8(c) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(c) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(uint8(c)) + return Int32FromUint8(Uint8FromInt32(c)) } func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { @@ -139821,7 +139819,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { X__toread(tls, f) } if v3 = !((*TFILE)(unsafe.Pointer(f)).Frpos != 0) || c == uint32(0xffffffff); !v3 { - v2 = int32(Xwcrtomb(tls, bp, c, uintptr(0))) + v2 = Int32FromUint64(Xwcrtomb(tls, bp, c, uintptr(0))) l = v2 } if v3 || v2 < 0 || (*TFILE)(unsafe.Pointer(f)).Frpos < (*TFILE)(unsafe.Pointer(f)).Fbuf-uintptr(UNGET)+uintptr(l) { @@ -139839,9 +139837,9 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { } else { p6 = f + 8 *(*uintptr)(unsafe.Pointer(p6)) -= uintptr(l) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint64(l)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, Uint64FromInt32(l)) } - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -139863,13 +139861,13 @@ func Xvasprintf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32) { l = Xvsnprintf(tls, uintptr(0), uint64(0), fmt, ap2) _ = ap2 if v2 = l < 0; !v2 { - v1 = Xmalloc(tls, uint64(uint32(l)+uint32(1))) + v1 = Xmalloc(tls, uint64(Uint32FromInt32(l)+uint32(1))) *(*uintptr)(unsafe.Pointer(s)) = v1 } if v2 || !(v1 != 0) { return -int32(1) } - return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(uint32(l)+uint32(1)), fmt, ap) + return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(Uint32FromInt32(l)+uint32(1)), fmt, ap) } func Xvdprintf(tls *TLS, fd int32, fmt uintptr, ap Tva_list) (r int32) { @@ -140049,33 +140047,33 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -140097,18 +140095,18 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { var v1 uint64 var _ /* pad at bp+0 */ [256]uint8 _ = v1 - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { return } l = w - l - if uint64(l) > uint64(256) { + if Uint64FromInt32(l) > uint64(256) { v1 = uint64(256) } else { - v1 = uint64(l) + v1 = Uint64FromInt32(l) } - Xmemset(tls, bp, int32(c), v1) + Xmemset(tls, bp, Int32FromUint8(c), v1) for { - if !(uint64(l) >= uint64(256)) { + if !(Uint64FromInt32(l) >= uint64(256)) { break } _out(tls, f, bp, uint64(256)) @@ -140117,7 +140115,7 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { ; l = int32(uint64(l) - Uint64FromInt64(256)) } - _out(tls, f, bp, uint64(l)) + _out(tls, f, bp, Uint64FromInt32(l)) } var _xdigits1 = [16]uint8{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} @@ -140131,7 +140129,7 @@ func _fmt_x(tls *TLS, x Tuintmax_t, s uintptr, lower int32) (r uintptr) { } s-- v2 = s - *(*uint8)(unsafe.Pointer(v2)) = uint8(int32(_xdigits1[x&uint64(15)]) | lower) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x&uint64(15)]) | lower) goto _1 _1: ; @@ -140224,13 +140222,13 @@ func _fmt_fp(tls *TLS, f uintptr, y float64, w int32, p int32, fl int32, t int32 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: - if int32(v1>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v1>>Int32FromInt32(63)) != 0 { y = -y } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { prefix += uintptr(3) } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { prefix += uintptr(6) } else { prefix++ @@ -140257,10 +140255,10 @@ _4: } s1 = v6 } - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) - _out(tls, f, prefix, uint64(pl)) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) + _out(tls, f, prefix, Uint64FromInt32(pl)) _out(tls, f, s1, uint64(3)) - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > int32(3)+pl { v7 = w } else { @@ -140293,7 +140291,7 @@ _4: } round *= Float64FromInt32(16) } - if int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { y = -y y -= round y += round @@ -140308,7 +140306,7 @@ _4: } else { v9 = *(*int32)(unsafe.Pointer(bp + 512)) } - estr = _fmt_u(tls, uint64(v9), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v9), ebuf) if estr == ebuf { estr-- v10 = estr @@ -140321,18 +140319,18 @@ _4: } else { v12 = int32('+') } - *(*uint8)(unsafe.Pointer(v11)) = uint8(v12) + *(*uint8)(unsafe.Pointer(v11)) = Uint8FromInt32(v12) estr-- v13 = estr - *(*uint8)(unsafe.Pointer(v13)) = uint8(t + (Int32FromUint8('p') - Int32FromUint8('a'))) + *(*uint8)(unsafe.Pointer(v13)) = Uint8FromInt32(t + (Int32FromUint8('p') - Int32FromUint8('a'))) s = bp + 516 for cond := true; cond; cond = y != 0 { x = int32(y) v14 = s s++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32(_xdigits1[x]) | t&int32(32)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x]) | t&int32(32)) y = Float64FromInt32(16) * (y - float64(x)) - if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { v15 = s s++ *(*uint8)(unsafe.Pointer(v15)) = uint8('.') @@ -140347,12 +140345,12 @@ _4: l = int32(int64(s) - t__predefined_ptrdiff_t(bp+516) + (int64(ebuf) - int64(estr))) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) - _out(tls, f, bp+516, uint64(int64(s)-t__predefined_ptrdiff_t(bp+516))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, bp+516, Uint64FromInt64(int64(s)-t__predefined_ptrdiff_t(bp+516))) _pad3(tls, f, uint8('0'), int32(int64(l)-(int64(ebuf)-int64(estr))-(int64(s)-t__predefined_ptrdiff_t(bp+516))), 0, 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v16 = w } else { @@ -140425,15 +140423,15 @@ _4: v25 = -*(*int32)(unsafe.Pointer(bp + 512)) } sh1 = v25 - need = int32(uint32(1) + (uint32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) + need = Int32FromUint32(uint32(1) + (Uint32FromInt32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) d = a for { if !(d < z) { break } - rm = *(*Tuint32_t)(unsafe.Pointer(d)) & uint32(int32(1)<>sh1 + carry1 - carry1 = uint32(Int32FromInt32(1000000000)>>sh1) * rm + carry1 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh1) * rm goto _26 _26: ; @@ -140463,7 +140461,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _29 @@ -140494,30 +140492,30 @@ _4: i *= int32(10) j++ } - x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(i) + x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % Uint32FromInt32(i) /* Are there any significant digits past j? */ if x2 != 0 || d+uintptr(1)*4 != z { round1 = Float64FromInt32(2) / Float64FromFloat64(2.22044604925031308085e-16) - if *(*Tuint32_t)(unsafe.Pointer(d))/uint32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { + if *(*Tuint32_t)(unsafe.Pointer(d))/Uint32FromInt32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { round1 += Float64FromInt32(2) } - if x2 < uint32(i/int32(2)) { + if x2 < Uint32FromInt32(i/int32(2)) { small = Float64FromFloat64(0.5) } else { - if x2 == uint32(i/int32(2)) && d+uintptr(1)*4 == z { + if x2 == Uint32FromInt32(i/int32(2)) && d+uintptr(1)*4 == z { small = Float64FromFloat64(1) } else { small = Float64FromFloat64(1.5) } } - if pl != 0 && int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if pl != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { round1 *= float64(-Int32FromInt32(1)) small *= float64(-Int32FromInt32(1)) } *(*Tuint32_t)(unsafe.Pointer(d)) -= x2 /* Decide whether to round by probing round+small */ if round1+small != round1 { - *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + uint32(i) + *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + Uint32FromInt32(i) for *(*Tuint32_t)(unsafe.Pointer(d)) > uint32(999999999) { v31 = d d -= 4 @@ -140532,7 +140530,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _33 @@ -140567,13 +140565,13 @@ _4: t -= int32(2) p-- } - if !(uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if !(Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { /* Count trailing zeros in last place */ if z > a && *(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4)) != 0 { i = int32(10) j = Int32FromInt32(0) for { - if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%uint32(i) == uint32(0)) { + if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%Uint32FromInt32(i) == uint32(0)) { break } goto _35 @@ -140622,10 +140620,10 @@ _4: } } } - if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { return -int32(1) } - l = int32(1) + p + BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) + l = int32(1) + p + BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) if t|int32(32) == int32('f') { if e > int32(INT_MAX)-l { return -int32(1) @@ -140639,7 +140637,7 @@ _4: } else { v42 = e } - estr = _fmt_u(tls, uint64(v42), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v42), ebuf) for int64(ebuf)-int64(estr) < int64(2) { estr-- v43 = estr @@ -140652,10 +140650,10 @@ _4: } else { v45 = int32('+') } - *(*uint8)(unsafe.Pointer(v44)) = uint8(v45) + *(*uint8)(unsafe.Pointer(v44)) = Uint8FromInt32(v45) estr-- v46 = estr - *(*uint8)(unsafe.Pointer(v46)) = uint8(t) + *(*uint8)(unsafe.Pointer(v46)) = Uint8FromInt32(t) if int64(ebuf)-int64(estr) > int64(int32(INT_MAX)-l) { return -int32(1) } @@ -140665,8 +140663,8 @@ _4: return -int32(1) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) if t|int32(32) == int32('f') { if a > r { a = r @@ -140690,13 +140688,13 @@ _4: *(*uint8)(unsafe.Pointer(v49)) = uint8('0') } } - _out(tls, f, s2, uint64(int64(bp+516+uintptr(9))-int64(s2))) + _out(tls, f, s2, Uint64FromInt64(int64(bp+516+uintptr(9))-int64(s2))) goto _47 _47: ; d += 4 } - if p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+558, uint64(1)) } for { @@ -140714,7 +140712,7 @@ _4: } else { v52 = p } - _out(tls, f, s3, uint64(v52)) + _out(tls, f, s3, Uint64FromInt32(v52)) goto _50 _50: ; @@ -140747,7 +140745,7 @@ _4: v56 = s4 s4++ _out(tls, f, v56, uint64(1)) - if p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+558, uint64(1)) } } @@ -140756,7 +140754,7 @@ _4: } else { v57 = int64(p) } - _out(tls, f, s4, uint64(v57)) + _out(tls, f, s4, Uint64FromInt64(v57)) p = int32(int64(p) - (int64(bp+516+UintptrFromInt32(9)) - int64(s4))) goto _53 _53: @@ -140764,9 +140762,9 @@ _4: d += 4 } _pad3(tls, f, uint8('0'), p+int32(18), int32(18), 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) } - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v58 = w } else { @@ -140783,10 +140781,10 @@ func _getint(tls *TLS, s uintptr) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { - i = int32(10)*i + (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) + i = int32(10)*i + (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) } goto _1 _1: @@ -140831,7 +140829,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Handle literal text and %% format specifiers */ a = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { break } goto _2 @@ -140841,7 +140839,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } z = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { break } goto _3 @@ -140855,14 +140853,14 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32(int64(z) - int64(a)) if f != 0 { - _out(tls, f, a, uint64(l)) + _out(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) - argpos = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') + argpos = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { argpos = -int32(1) @@ -140871,24 +140869,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { + if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { break } - fl |= uint32(1) << (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) + fl |= uint32(1) << (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) goto _4 _4: ; *(*uintptr)(unsafe.Pointer(bp))++ } /* Read field width */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) w = Int32FromInt32(0) } else { - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { @@ -140916,13 +140914,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } /* Read precision */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) p = Int32FromInt32(0) } else { - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(4) } else { @@ -140940,7 +140938,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } xp = BoolInt32(p >= 0) } else { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { *(*uintptr)(unsafe.Pointer(bp))++ p = _getint(tls, bp) xp = int32(1) @@ -140952,13 +140950,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st v8 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ - st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(int32(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) + st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) } if !(st != 0) { goto inval @@ -140971,13 +140969,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { if argpos >= 0 { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) } else { *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } } else { if f != 0 { - _pop_arg(tls, bp+8, int32(st), ap) + _pop_arg(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -140993,7 +140991,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, z = bp + 16 + uintptr(24) prefix = __ccgo_ts + 1617 pl = 0 - t = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) /* Transform ls,lc -> S,C */ if ps != 0 && t&int32(15) == int32(3) { t &= ^Int32FromInt32(32) @@ -141057,24 +141055,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) break } goto _1 _10: ; - if uint64(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { - v31 = uint64(p) + if Uint64FromInt32(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { + v31 = Uint64FromInt32(p) } else { v31 = Uint64FromInt32(2) * Uint64FromInt64(8) } - p = int32(v31) + p = Int32FromUint64(v31) t = int32('x') fl |= Uint32FromUint32(1) << (Int32FromUint8('#') - Int32FromUint8(' ')) _12: @@ -141105,7 +141103,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, _14: ; pl = int32(1) - if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > uint64(Int64FromInt64(INT64_MAX)) { + if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) = -*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { if fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { @@ -141176,7 +141174,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v40 = p } - z = a + uintptr(Xstrnlen(tls, a, uint64(v40))) + z = a + uintptr(Xstrnlen(tls, a, Uint64FromInt32(v40))) if p < 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -141197,21 +141195,21 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, ws = *(*uintptr)(unsafe.Pointer(bp + 8)) v42 = Int32FromInt32(0) l = v42 - i = uint64(v42) + i = Uint64FromInt32(v42) for { - if v45 = i < uint64(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { + if v45 = i < Uint64FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { v44 = ws ws += 4 v43 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v44))) l = v43 } - if !(v45 && v43 >= 0 && uint64(l) <= uint64(p)-i) { + if !(v45 && v43 >= 0 && Uint64FromInt32(l) <= Uint64FromInt32(p)-i) { break } goto _41 _41: ; - i += uint64(l) + i += Uint64FromInt32(l) } if l < 0 { return -int32(1) @@ -141219,27 +141217,27 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if i > uint64(INT_MAX) { goto overflow } - p = int32(i) - _pad3(tls, f, uint8(' '), w, p, int32(fl)) + p = Int32FromUint64(i) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl)) ws = *(*uintptr)(unsafe.Pointer(bp + 8)) i = uint64(0) for { - if v49 = i < uint64(0+uint32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { + if v49 = i < uint64(0+Uint32FromInt32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { v48 = ws ws += 4 v47 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v48))) l = v47 } - if !(v49 && i+uint64(v47) <= uint64(p)) { + if !(v49 && i+Uint64FromInt32(v47) <= Uint64FromInt32(p)) { break } - _out(tls, f, bp+48, uint64(l)) + _out(tls, f, bp+48, Uint64FromInt32(l)) goto _46 _46: ; - i += uint64(l) + i += Uint64FromInt32(l) } - _pad3(tls, f, uint8(' '), w, p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > p { v50 = w } else { @@ -141266,7 +141264,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if xp != 0 && p < 0 { goto overflow } - l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, int32(fl), t) + l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, Int32FromUint32(fl), t) if l < 0 { goto overflow } @@ -141285,12 +141283,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w > int32(INT_MAX)-cnt { goto overflow } - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl)) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl)) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) _pad3(tls, f, uint8('0'), p, int32(int64(z)-int64(a)), 0) - _out(tls, f, a, uint64(int64(z)-int64(a))) - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, a, Uint64FromInt64(int64(z)-int64(a))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 _1: @@ -141365,8 +141363,8 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v1 = 0 } __need_unlock = v1 - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) { saved_buf = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fbuf = bp + 128 @@ -141398,7 +141396,7 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -141421,13 +141419,13 @@ func _store_int(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -141494,14 +141492,14 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - v3 = int32(*(*uint8)(unsafe.Pointer(p))) - v4 = BoolInt32(v3 == int32(' ') || uint32(v3)-uint32('\t') < uint32(5)) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v4 = BoolInt32(v3 == int32(' ') || Uint32FromInt32(v3)-uint32('\t') < uint32(5)) goto _5 _5: if v4 != 0 { for { - v6 = int32(*(*uint8)(unsafe.Pointer(p + 1))) - v7 = BoolInt32(v6 == int32(' ') || uint32(v6)-uint32('\t') < uint32(5)) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) + v7 = BoolInt32(v6 == int32(' ') || Uint32FromInt32(v6)-uint32('\t') < uint32(5)) goto _8 _8: if !(v7 != 0) { @@ -141515,12 +141513,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } v12 = v9 - v13 = BoolInt32(v12 == int32(' ') || uint32(v12)-uint32('\t') < uint32(5)) + v13 = BoolInt32(v12 == int32(' ') || Uint32FromInt32(v12)-uint32('\t') < uint32(5)) goto _14 _14: if !(v13 != 0) { @@ -141533,23 +141531,23 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { pos += (*TFILE)(unsafe.Pointer(f)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(f)).Frpos) - int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) goto _2 } - if int32(*(*uint8)(unsafe.Pointer(p))) != int32('%') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32('%') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { X__shlim(tls, f, int64(Int32FromInt32(0))) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('%') { p++ for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Fshend { v19 = f + 8 v18 = *(*uintptr)(unsafe.Pointer(v19)) *(*uintptr)(unsafe.Pointer(v19))++ - v17 = int32(*(*uint8)(unsafe.Pointer(v18))) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v18))) } else { v17 = X__shgetc(tls, f) } v16 = v17 c = v16 v20 = v16 - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: if !(v21 != 0) { @@ -141561,13 +141559,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ - v23 = int32(*(*uint8)(unsafe.Pointer(v24))) + v23 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v24))) } else { v23 = X__shgetc(tls, f) } c = v23 } - if c != int32(*(*uint8)(unsafe.Pointer(p))) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -141580,12 +141578,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto _2 } p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('*') { dest = uintptr(0) p++ } else { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { - dest = _arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { + dest = _arg_n(tls, ap, Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) p += uintptr(2) } else { dest = VaUintptr(&ap) @@ -141596,13 +141594,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } - width = int32(10)*width + int32(*(*uint8)(unsafe.Pointer(p))) - int32('0') + width = int32(10)*width + Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) - int32('0') goto _27 _27: ; p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('m') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('m') { wcs = uintptr(0) s = uintptr(0) alloc = BoolInt32(!!(dest != 0)) @@ -141613,16 +141611,16 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { size = SIZE_def v28 = p p++ - switch int32(*(*uint8)(unsafe.Pointer(v28))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) { case int32('h'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('h') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('h') { p++ size = -Int32FromInt32(2) } else { size = -int32(1) } case int32('l'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('l') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('l') { p++ size = Int32FromInt32(SIZE_ll) } else { @@ -141681,7 +141679,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*uint8)(unsafe.Pointer(p))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) /* C or S */ if t&int32(0x2f) == int32(3) { t |= int32(32) @@ -141695,7 +141693,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { fallthrough case int32('['): case int32('n'): - _store_int(tls, dest, size, uint64(pos)) + _store_int(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 default: @@ -141705,12 +141703,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } v32 = v29 - v33 = BoolInt32(v32 == int32(' ') || uint32(v32)-uint32('\t') < uint32(5)) + v33 = BoolInt32(v32 == int32(' ') || Uint32FromInt32(v32)-uint32('\t') < uint32(5)) goto _34 _34: if !(v33 != 0) { @@ -141727,7 +141725,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v38 = f + 8 v37 = *(*uintptr)(unsafe.Pointer(v38)) *(*uintptr)(unsafe.Pointer(v38))++ - v36 = int32(*(*uint8)(unsafe.Pointer(v37))) + v36 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v37))) } else { v36 = X__shgetc(tls, f) } @@ -141796,7 +141794,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { p++ v59 = p - if int32(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { p++ invert = Int32FromInt32(1) } else { @@ -141804,38 +141802,38 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } Xmemset(tls, bp+16, invert, uint64(257)) (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = Uint8FromInt32(Int32FromInt32(1) - invert) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = Uint8FromInt32(Int32FromInt32(1) - invert) } } for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } if !(*(*uint8)(unsafe.Pointer(p)) != 0) { goto fmt_fail } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { v62 = p p++ - c = int32(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) for { - if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + if !(c < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))) { break } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = Uint8FromInt32(int32(1) - invert) goto _61 _61: ; c++ } } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+int32(*(*uint8)(unsafe.Pointer(p)))] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))] = Uint8FromInt32(int32(1) - invert) goto _60 _60: ; @@ -141846,7 +141844,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { s = uintptr(0) i = uint64(0) if t == int32('c') { - v63 = uint32(width) + uint32(1) + v63 = Uint32FromInt32(width) + uint32(1) } else { v63 = uint32(31) } @@ -141866,7 +141864,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v67 = f + 8 v66 = *(*uintptr)(unsafe.Pointer(v67)) *(*uintptr)(unsafe.Pointer(v67))++ - v65 = int32(*(*uint8)(unsafe.Pointer(v66))) + v65 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v66))) } else { v65 = X__shgetc(tls, f) } @@ -141875,11 +141873,11 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !((*(*[257]uint8)(unsafe.Pointer(bp + 16)))[v64+int32(1)] != 0) { break } - *(*uint8)(unsafe.Pointer(bp)) = uint8(c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(c) switch Xmbrtowc(tls, bp+276, bp, uint64(1), bp+8) { - case uint64(-Int32FromInt32(1)): + case Uint64FromInt32(-Int32FromInt32(1)): goto input_fail - case uint64(-Int32FromInt32(2)): + case Uint64FromInt32(-Int32FromInt32(2)): continue } if wcs != 0 { @@ -141910,7 +141908,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v72 = f + 8 v71 = *(*uintptr)(unsafe.Pointer(v72)) *(*uintptr)(unsafe.Pointer(v72))++ - v70 = int32(*(*uint8)(unsafe.Pointer(v71))) + v70 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v71))) } else { v70 = X__shgetc(tls, f) } @@ -141921,7 +141919,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v73 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = Uint8FromInt32(c) if i == k { k += k + uint64(1) tmp1 = Xrealloc(tls, s, k) @@ -141940,7 +141938,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v78 = f + 8 v77 = *(*uintptr)(unsafe.Pointer(v78)) *(*uintptr)(unsafe.Pointer(v78))++ - v76 = int32(*(*uint8)(unsafe.Pointer(v77))) + v76 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v77))) } else { v76 = X__shgetc(tls, f) } @@ -141951,7 +141949,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v79 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = Uint8FromInt32(c) } } else { for { @@ -141959,7 +141957,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v83 = f + 8 v82 = *(*uintptr)(unsafe.Pointer(v83)) *(*uintptr)(unsafe.Pointer(v83))++ - v81 = int32(*(*uint8)(unsafe.Pointer(v82))) + v81 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v82))) } else { v81 = X__shgetc(tls, f) } @@ -142021,7 +142019,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto int_common int_common: ; - x = X__intscan(tls, f, uint32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) + x = X__intscan(tls, f, Uint32FromInt32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) if !((*TFILE)(unsafe.Pointer(f)).Fshcnt+(int64((*TFILE)(unsafe.Pointer(f)).Frpos)-int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) != 0) { goto match_fail } @@ -142226,33 +142224,33 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -142281,7 +142279,7 @@ func _out1(tls *TLS, f uintptr, s uintptr, l Tsize_t) { func _pad4(tls *TLS, f uintptr, n int32, fl int32) { bp := tls.Alloc(32) defer tls.Free(32) - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return } Xfprintf(tls, f, __ccgo_ts+1634, VaList(bp+8, n, __ccgo_ts)) @@ -142295,10 +142293,10 @@ func _getint1(tls *TLS, s uintptr) (r int32) { if !(BoolInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-uint32('0') > uint32(int32(INT_MAX)-int32(10)*i) { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-uint32('0') > Uint32FromInt32(int32(INT_MAX)-int32(10)*i) { i = -int32(1) } else { - i = int32(uint32(int32(10)*i) + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - uint32('0'))) + i = Int32FromUint32(Uint32FromInt32(int32(10)*i) + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - uint32('0'))) } goto _1 _1: @@ -142377,14 +142375,14 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32((int64(z) - int64(a)) / 4) if f != 0 { - _out1(tls, f, a, uint64(l)) + _out1(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } if BoolInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == uint32('$') { l10n = uint32(1) - argpos = int32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) - uint32('0')) + argpos = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) - uint32('0')) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 } else { argpos = -int32(1) @@ -142407,7 +142405,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if BoolInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == uint32('$') { l10n = uint32(1) *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-uint32('0'))*4)) = int32(_INT) - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-uint32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-uint32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 } else { if !(l10n != 0) { @@ -142437,7 +142435,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == uint32('.') && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) == uint32('*') { if BoolInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == uint32('$') { *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-uint32('0'))*4)) = int32(_INT) - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-uint32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-uint32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(4) * 4 } else { if !(l10n != 0) { @@ -142466,7 +142464,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -142484,11 +142482,11 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } else { if argpos >= 0 { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) *(*Targ)(unsafe.Pointer(bp + 16)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } else { if f != 0 { - _pop_arg1(tls, bp+16, int32(st), ap) + _pop_arg1(tls, bp+16, Int32FromUint32(st), ap) } else { return 0 } @@ -142501,7 +142499,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return -int32(1) } - t = int32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(-Int32FromInt32(1))*4))) + t = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(-Int32FromInt32(1))*4))) if ps != 0 && t&int32(15) == int32(3) { t &= ^Int32FromInt32(32) } @@ -142515,13 +142513,13 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) break } goto _1 @@ -142531,15 +142529,15 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < int32(1) { w = int32(1) } - _pad4(tls, f, w-int32(1), int32(fl)) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl)) if t == int32('C') { v9 = *(*Tuintmax_t)(unsafe.Pointer(bp + 16)) } else { - v9 = uint64(Xbtowc(tls, int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) + v9 = uint64(Xbtowc(tls, Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) } *(*Twchar_t)(unsafe.Pointer(bp)) = uint32(v9) _out1(tls, f, bp, uint64(1)) - _pad4(tls, f, w-int32(1), int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('S'): @@ -142549,7 +142547,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v10 = p } - z = a + uintptr(Xwcsnlen(tls, a, uint64(v10)))*4 + z = a + uintptr(Xwcsnlen(tls, a, Uint64FromInt32(v10)))*4 if p < 0 && *(*Twchar_t)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -142557,9 +142555,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) - _out1(tls, f, a, uint64(p)) - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl)) + _out1(tls, f, a, Uint64FromInt32(p)) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('m'): @@ -142602,7 +142600,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) + _pad4(tls, f, w-p, Int32FromUint32(fl)) bs = *(*uintptr)(unsafe.Pointer(bp + 16)) for { v16 = l @@ -142614,14 +142612,14 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, bs += uintptr(i) _out1(tls, f, bp+40, uint64(1)) } - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 } if xp != 0 && p < 0 { goto overflow } - Xsnprintf(tls, bp+24, uint64(16), __ccgo_ts+1638, VaList(bp+56, __ccgo_ts+1658+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1660+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1662+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+672+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1664+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), int32(_sizeprefix[t|int32(32)-int32('a')]), t)) + Xsnprintf(tls, bp+24, uint64(16), __ccgo_ts+1638, VaList(bp+56, __ccgo_ts+1658+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1660+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1662+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+672+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1664+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), Int32FromUint8(_sizeprefix[t|int32(32)-int32('a')]), t)) switch t | Int32FromInt32(32) { case int32('a'): fallthrough @@ -142716,13 +142714,13 @@ func Xvfwprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } __need_unlock = v1 Xfwide(tls, f, int32(1)) - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) ret = _wprintf_core(tls, f, fmt, bp, bp+48, bp+8) if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -142738,13 +142736,13 @@ func _store_int1(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -142796,9 +142794,9 @@ func _in_set(tls *TLS, set uintptr, c int32) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == uint32('-') && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) != uint32(']') { v3 = p p += 4 - j = int32(*(*Twchar_t)(unsafe.Pointer(v3 + uintptr(-Int32FromInt32(1))*4))) + j = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(v3 + uintptr(-Int32FromInt32(1))*4))) for { - if !(uint32(j) < *(*Twchar_t)(unsafe.Pointer(p))) { + if !(Uint32FromInt32(j) < *(*Twchar_t)(unsafe.Pointer(p))) { break } if c == j { @@ -142810,7 +142808,7 @@ func _in_set(tls *TLS, set uintptr, c int32) (r int32) { j++ } } - if uint32(c) == *(*Twchar_t)(unsafe.Pointer(p)) { + if Uint32FromInt32(c) == *(*Twchar_t)(unsafe.Pointer(p)) { return int32(1) } goto _1 @@ -142857,7 +142855,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { p += 4 } for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ @@ -142865,20 +142863,20 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v4 = Xgetwc(tls, f) } - v3 = int32(v4) + v3 = Int32FromUint32(v4) c = v3 - if !(Xiswspace(tls, uint32(v3)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v3)) != 0) { break } pos++ } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) _ = *(*uint8)(unsafe.Pointer(v8)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } goto _2 } @@ -142886,7 +142884,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == uint32('%') { p += 4 for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ @@ -142894,15 +142892,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v11 = Xgetwc(tls, f) } - v10 = int32(v11) + v10 = Int32FromUint32(v11) c = v10 - if !(Xiswspace(tls, uint32(v10)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v10)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ @@ -142910,16 +142908,16 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v14 = Xgetwc(tls, f) } - c = int32(v14) + c = Int32FromUint32(v14) } - if uint32(c) != *(*Twchar_t)(unsafe.Pointer(p)) { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if Uint32FromInt32(c) != *(*Twchar_t)(unsafe.Pointer(p)) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v19 = f + 8 *(*uintptr)(unsafe.Pointer(v19))-- v18 = *(*uintptr)(unsafe.Pointer(v19)) _ = *(*uint8)(unsafe.Pointer(v18)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if c < 0 { goto input_fail @@ -142946,7 +142944,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(*(*Twchar_t)(unsafe.Pointer(p))-uint32('0') < uint32(10)) != 0) { break } - width = int32(uint32(int32(10)*width) + *(*Twchar_t)(unsafe.Pointer(p)) - uint32('0')) + width = Int32FromUint32(Uint32FromInt32(int32(10)*width) + *(*Twchar_t)(unsafe.Pointer(p)) - uint32('0')) goto _20 _20: ; @@ -143031,7 +143029,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*Twchar_t)(unsafe.Pointer(p))) + t = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(p))) /* Transform S,C -> ls,lc */ if t&int32(0x2f) == int32(3) { size = int32(SIZE_l) @@ -143040,7 +143038,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if t != int32('n') { if t != int32('[') && t|int32(32) != int32('c') { for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ @@ -143048,15 +143046,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v23 = Xgetwc(tls, f) } - v22 = int32(v23) + v22 = Int32FromUint32(v23) c = v22 - if !(Xiswspace(tls, uint32(v22)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v22)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v28 = f + 8 v27 = *(*uintptr)(unsafe.Pointer(v28)) *(*uintptr)(unsafe.Pointer(v28))++ @@ -143064,23 +143062,23 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v26 = Xgetwc(tls, f) } - c = int32(v26) + c = Int32FromUint32(v26) } if c < 0 { goto input_fail } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v31 = f + 8 *(*uintptr)(unsafe.Pointer(v31))-- v30 = *(*uintptr)(unsafe.Pointer(v31)) _ = *(*uint8)(unsafe.Pointer(v30)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } } switch t { case int32('n'): - _store_int1(tls, dest, size, uint64(pos)) + _store_int1(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 case int32('s'): @@ -143138,7 +143136,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { i = uint64(0) if alloc != 0 { if t == int32('c') { - v35 = uint32(width) + uint32(1) + v35 = Uint32FromInt32(width) + uint32(1) } else { v35 = uint32(31) } @@ -143156,7 +143154,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } } for width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ @@ -143164,7 +143162,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v37 = Xgetwc(tls, f) } - v36 = int32(v37) + v36 = Int32FromUint32(v37) c = v36 if v36 < 0 { break @@ -143175,7 +143173,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if wcs != 0 { v40 = i i++ - *(*Twchar_t)(unsafe.Pointer(wcs + uintptr(v40)*4)) = uint32(c) + *(*Twchar_t)(unsafe.Pointer(wcs + uintptr(v40)*4)) = Uint32FromInt32(c) if alloc != 0 && i == k { k += k + uint64(1) tmp1 = Xrealloc(tls, wcs, k*uint64(4)) @@ -143191,11 +143189,11 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v41 = bp + 8 } - l = Xwctomb(tls, v41, uint32(c)) + l = Xwctomb(tls, v41, Uint32FromInt32(c)) if l < 0 { goto input_fail } - i += uint64(l) + i += Uint64FromInt32(l) if alloc != 0 && i > k-uint64(4) { k += k + uint64(1) tmp2 = Xrealloc(tls, s, k) @@ -143211,13 +143209,13 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { gotmatch = int32(1) } if width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v44 = f + 8 *(*uintptr)(unsafe.Pointer(v44))-- v43 = *(*uintptr)(unsafe.Pointer(v44)) _ = *(*uint8)(unsafe.Pointer(v43)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if t == int32('c') || !(gotmatch != 0) { goto match_fail @@ -143402,10 +143400,10 @@ func _sn_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { var v1, v2 uint64 _, _, _, _, _ = c, k, v1, v2, v3 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if (*Tcookie3)(unsafe.Pointer(c)).Fn < uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { + if (*Tcookie3)(unsafe.Pointer(c)).Fn < Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { v1 = (*Tcookie3)(unsafe.Pointer(c)).Fn } else { - v1 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + v1 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) } k = v1 if k != 0 { @@ -143496,7 +143494,7 @@ func _string_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { k = len1 + uint64(256) end = Xmemchr(tls, src, 0, k) if end != 0 { - k = uint64(int64(end) - int64(src)) + k = Uint64FromInt64(int64(end) - int64(src)) } if k < len1 { len1 = k @@ -143547,8 +143545,8 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { l0 = l i = 0 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == uint64(-Int32FromInt32(1)) { - return uint64(-Int32FromInt32(1)) + if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == Uint64FromInt32(-Int32FromInt32(1)) { + return Uint64FromInt32(-Int32FromInt32(1)) } for { if v2 = (*Tcookie4)(unsafe.Pointer(c)).Fl != 0 && l != 0; v2 { @@ -143562,7 +143560,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { i = int32(1) } s += uintptr(i) - l -= uint64(i) + l -= Uint64FromInt32(i) (*Tcookie4)(unsafe.Pointer(c)).Fl-- (*Tcookie4)(unsafe.Pointer(c)).Fws += 4 } @@ -143574,7 +143572,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { (*TFILE)(unsafe.Pointer(f)).Fwbase = v3 (*TFILE)(unsafe.Pointer(f)).Fwpos = v3 *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - return uint64(i) + return Uint64FromInt32(i) } (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -143612,7 +143610,7 @@ func Xvswprintf(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, ap Tva_list) (r1 in } r = Xvfwprintf(tls, bp+272, fmt, ap) _sw_write(tls, bp+272, uintptr(0), uint64(0)) - if uint64(r) >= n { + if Uint64FromInt32(r) >= n { v1 = -int32(1) } else { v1 = r @@ -143632,7 +143630,7 @@ func _wstring_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { return uint64(0) } k = Xwcsrtombs(tls, (*TFILE)(unsafe.Pointer(f)).Fbuf, bp, (*TFILE)(unsafe.Pointer(f)).Fbuf_size, uintptr(0)) - if k == uint64(-Int32FromInt32(1)) { + if k == Uint64FromInt32(-Int32FromInt32(1)) { v1 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v1 (*TFILE)(unsafe.Pointer(f)).Frpos = v1 @@ -143772,8 +143770,8 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143781,7 +143779,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -143792,7 +143790,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int32(10)*n - (int32(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) + n = int32(10)*n - (Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) } if neg != 0 { v5 = n @@ -143814,8 +143812,8 @@ func Xatol(tls *TLS, s uintptr) (r int64) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143823,7 +143821,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -143834,7 +143832,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int64(10)*n - int64(int32(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) + n = int64(10)*n - int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -143856,8 +143854,8 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143865,7 +143863,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -143876,7 +143874,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int64(10)*n - int64(int32(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) + n = int64(10)*n - int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -143932,16 +143930,16 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, j, v1, v3 int32 var _ /* tmp at bp+0 */ [32]uint8 _, _, _, _ = i, j, v1, v3 - if uint32(n)-uint32(1) > uint32(15) { + if Uint32FromInt32(n)-uint32(1) > uint32(15) { n = int32(15) } Xsprintf(tls, bp, __ccgo_ts+1691, VaList(bp+40, n-int32(1), x)) - v1 = BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) + v1 = BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) *(*int32)(unsafe.Pointer(sign)) = v1 i = v1 j = 0 for { - if !(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { + if !(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { break } _buf8[j] = (*(*[32]uint8)(unsafe.Pointer(bp)))[i] @@ -143950,7 +143948,7 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { ; v3 = i i++ - j += BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) + j += BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) } _buf8[j] = uint8(0) *(*int32)(unsafe.Pointer(dp)) = Xatoi(tls, bp+uintptr(i)+uintptr(1)) + int32(1) @@ -143969,20 +143967,20 @@ func Xfcvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, lz int32 var _ /* tmp at bp+0 */ [1500]uint8 _, _ = i, lz - if uint32(n) > uint32(1400) { + if Uint32FromInt32(n) > uint32(1400) { n = int32(1400) } Xsprintf(tls, bp, __ccgo_ts+1696, VaList(bp+1512, n, x)) - i = BoolInt32(int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) - if int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { - lz = int32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1664)) + i = BoolInt32(Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) + if Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { + lz = Int32FromUint64(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1664)) } else { - lz = -int32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+558)) + lz = -Int32FromUint64(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+558)) } if n <= lz { *(*int32)(unsafe.Pointer(sign)) = i *(*int32)(unsafe.Pointer(dp)) = int32(1) - if uint32(n) > uint32(14) { + if Uint32FromInt32(n) > uint32(14) { n = int32(14) } return __ccgo_ts + 1701 + UintptrFromInt32(14) - uintptr(n) @@ -144087,10 +144085,10 @@ func _pntz(tls *TLS, p uintptr) (r1 int32) { _, _, _ = r, v1, v2 r = _a_ctz_l(tls, *(*Tsize_t)(unsafe.Pointer(p))-uint64(1)) if v2 = r != 0; !v2 { - v1 = int32(Uint64FromInt32(8)*Uint64FromInt64(8) + uint64(_a_ctz_l(tls, *(*Tsize_t)(unsafe.Pointer(p + 1*8))))) + v1 = Int32FromUint64(Uint64FromInt32(8)*Uint64FromInt64(8) + Uint64FromInt32(_a_ctz_l(tls, *(*Tsize_t)(unsafe.Pointer(p + 1*8))))) r = v1 } - if v2 || uint64(v1) != Uint64FromInt32(8)*Uint64FromInt64(8) { + if v2 || Uint64FromInt32(v1) != Uint64FromInt32(8)*Uint64FromInt64(8) { return r } return 0 @@ -144136,25 +144134,25 @@ func _cycle(tls *TLS, width Tsize_t, ar uintptr, n int32) { // // /* shl() and shr() need n > 0 */ func _shl(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = *(*Tsize_t)(unsafe.Pointer(p)) *(*Tsize_t)(unsafe.Pointer(p)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p)) <<= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p)) <<= Uint64FromInt32(n) } func _shr(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p)) = *(*Tsize_t)(unsafe.Pointer(p + 1*8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p)) >>= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p)) >>= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= Uint64FromInt32(n) } func _sift(tls *TLS, head uintptr, width Tsize_t, cmp Tcmpfun, arg uintptr, pshift int32, lp uintptr) { @@ -144272,7 +144270,7 @@ func X__qsort_r(tls *TLS, base uintptr, nel Tsize_t, width Tsize_t, cmp Tcmpfun, _shr(tls, bp+768, int32(2)) pshift += int32(2) } else { - if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= uint64(int64(high)-int64(head)) { + if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= Uint64FromInt64(int64(high)-int64(head)) { _trinkle(tls, head, width, cmp, arg, bp+768, pshift, 0, bp) } else { _sift(tls, head, width, cmp, arg, pshift, bp) @@ -144389,9 +144387,9 @@ func _strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*TFILE)(unsafe.Pointer(bp)).Fbuf = v1 (*TFILE)(unsafe.Pointer(bp)).Frend = uintptr(-Int32FromInt32(1)) X__shlim(tls, bp, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp, uint32(base), int32(1), lim) + y = X__intscan(tls, bp, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -144410,7 +144408,7 @@ func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -144426,7 +144424,7 @@ func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144562,7 +144560,7 @@ func _wcstox(tls *TLS, s uintptr, p uintptr, prec int32) (r float64) { X__shlim(tls, bp+64, int64(Int32FromInt32(0))) y = X__floatscan(tls, bp+64, prec, int32(1)) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -144664,9 +144662,9 @@ func _wcstox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp+64, uint32(base), int32(1), lim) + y = X__intscan(tls, bp+64, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -144690,7 +144688,7 @@ func Xwcstoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -144706,7 +144704,7 @@ func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144787,14 +144785,14 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt _, _, _, _, _, _, _, _, _ = d, k, s, wd, ws, v2, v3, v6, v7 d = dest s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(d)&(Uint64FromInt64(8)-Uint64FromInt32(1)) { for { if v3 = uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v2 } - if !(v3 && int32(v2) != c) { + if !(v3 && Int32FromUint8(v2) != c) { break } goto _1 @@ -144807,11 +144805,11 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 { goto tail } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -144830,7 +144828,7 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt v6 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v6 } - if !(v7 && int32(v6) != c) { + if !(v7 && Int32FromUint8(v6) != c) { break } goto _5 @@ -144869,9 +144867,9 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { var s, w, v4 uintptr _, _, _, _ = k, s, w, v4 s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { - if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _1 @@ -144880,11 +144878,11 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s++ n-- } - if n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c { - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + if n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c { + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -144896,7 +144894,7 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s = w } for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -144924,7 +144922,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { l = vl r = vr for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _1 @@ -144935,7 +144933,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { r++ } if n != 0 { - v2 = int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } else { v2 = 0 } @@ -145297,15 +145295,15 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145440,13 +145438,13 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -145454,7 +145452,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145489,7 +145487,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Search loop */ for { /* If remainder of haystack is shorter than needle, done */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } /* Check last byte first; advance by shift on mismatch */ @@ -145516,7 +145514,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin } k = v11 for { - if !(k < l && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(k < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -145532,7 +145530,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -145569,11 +145567,11 @@ func Xmemmem(tls *TLS, h0 uintptr, k Tsize_t, n0 uintptr, l Tsize_t) (r uintptr) return uintptr(0) } /* Use faster algorithms for short needles */ - h = Xmemchr(tls, h0, int32(*(*uint8)(unsafe.Pointer(n))), k) + h = Xmemchr(tls, h0, Int32FromUint8(*(*uint8)(unsafe.Pointer(n))), k) if !(h != 0) || l == uint64(1) { return h } - k -= uint64(int64(h) - int64(h0)) + k -= Uint64FromInt64(int64(h) - int64(h0)) if k < l { return uintptr(0) } @@ -145606,7 +145604,7 @@ func Xmemmove(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { if d == s { return d } - if uint64(s)-uint64(d)-n <= uint64(-Int32FromInt32(2))*n { + if uint64(s)-uint64(d)-n <= Uint64FromInt32(-Int32FromInt32(2))*n { return Xmemcpy(tls, d, s, n) } if d < s { @@ -145690,14 +145688,14 @@ func X__memrchr(tls *TLS, m uintptr, c int32, n Tsize_t) (r uintptr) { var v1 Tsize_t _, _ = s, v1 s = m - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { v1 = n n-- if !(v1 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { return s + uintptr(n) } } @@ -145729,20 +145727,20 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { if !(n != 0) { return dest } - *(*uint8)(unsafe.Pointer(s)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = Uint8FromInt32(c) if n <= uint64(2) { return dest } - *(*uint8)(unsafe.Pointer(s + 1)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + 2)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 1)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + 2)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = Uint8FromInt32(c) if n <= uint64(6) { return dest } - *(*uint8)(unsafe.Pointer(s + 3)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 3)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = Uint8FromInt32(c) if n <= uint64(8) { return dest } @@ -145753,8 +145751,8 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { k = -uint64(s) & uint64(3) s += uintptr(k) n -= k - n &= uint64(-Int32FromInt32(4)) - c32 = uint32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(uint8(c)) + n &= Uint64FromInt32(-Int32FromInt32(4)) + c32 = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(Uint8FromInt32(c)) /* In preparation to copy 32 bytes at a time, aligned on * an 8-byte bounary, fill head/tail up to 28 bytes each. * As in the initial byte-based head/tail fill, each @@ -145853,7 +145851,7 @@ func X__stpcpy(tls *TLS, d uintptr, s uintptr) (r uintptr) { wd = d ws = s for { - if !!((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _3 @@ -145942,7 +145940,7 @@ func X__stpncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -146005,7 +146003,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l = _l r = _r for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _1 @@ -146014,7 +146012,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l++ r++ } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strcasecmp_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) { @@ -146073,7 +146071,7 @@ func Xstrchr(tls *TLS, s uintptr, c int32) (r1 uintptr) { var r, v1 uintptr _, _ = r, v1 r = X__strchrnul(tls, s, c) - if int32(*(*uint8)(unsafe.Pointer(r))) == int32(uint8(c)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) == Int32FromUint8(Uint8FromInt32(c)) { v1 = r } else { v1 = uintptr(0) @@ -146100,7 +146098,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { var k Tsize_t var w uintptr _, _ = k, w - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } @@ -146108,7 +146106,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { if !(uint64(s)%Uint64FromInt64(8) != 0) { break } - if !(*(*uint8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { + if !(*(*uint8)(unsafe.Pointer(s)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == c { return s } goto _1 @@ -146116,10 +146114,10 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { ; s++ } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -146129,7 +146127,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { } s = w for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -146163,7 +146161,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { defer func() { trc("-> %v", r1) }() } for { - if !(int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { break } goto _1 @@ -146172,7 +146170,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { l++ r++ } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrcpy(tls *TLS, dest uintptr, src uintptr) (r uintptr) { @@ -146197,7 +146195,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { _, _, _ = a, v3, p2 a = s if !(*(*uint8)(unsafe.Pointer(c)) != 0) || !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { - return uint64(int64(X__strchrnul(tls, s, int32(*(*uint8)(unsafe.Pointer(c))))) - int64(a)) + return Uint64FromInt64(int64(X__strchrnul(tls, s, Int32FromUint8(*(*uint8)(unsafe.Pointer(c))))) - int64(a)) } Xmemset(tls, bp, 0, uint64(32)) for { @@ -146222,7 +146220,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrdup(tls *TLS, s uintptr) (r uintptr) { @@ -146331,7 +146329,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*Tsize_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -146365,7 +146363,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { goto finish finish: ; - return uint64(int64(d)-int64(d0)) + Xstrlen(tls, s) + return Uint64FromInt64(int64(d)-int64(d0)) + Xstrlen(tls, s) return r } @@ -146393,7 +146391,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { break } if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } goto _1 _1: @@ -146402,7 +146400,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { } w = s for { - if !!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _2 @@ -146420,7 +146418,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { @@ -146439,7 +146437,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _2 @@ -146449,7 +146447,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, loc Tlocale_t) (r1 int32) { @@ -146507,7 +146505,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _2 @@ -146517,7 +146515,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { @@ -146557,7 +146555,7 @@ func Xstrnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _, _ = p, v1 p = Xmemchr(tls, s, 0, n) if p != 0 { - v1 = uint64(int64(p) - int64(s)) + v1 = Uint64FromInt64(int64(p) - int64(s)) } else { v1 = n } @@ -146623,7 +146621,7 @@ func Xstrsignal(tls *TLS, signum int32) (r uintptr) { _, _ = s, v2 s = uintptr(unsafe.Pointer(&_strings)) signum = signum - if uint32(signum)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(signum)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { signum = 0 } for { @@ -146667,7 +146665,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { } if !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(c)))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(c)))) { break } goto _1 @@ -146675,7 +146673,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } for { if v4 = *(*uint8)(unsafe.Pointer(c)) != 0; v4 { @@ -146699,18 +146697,18 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146838,13 +146836,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -146852,7 +146850,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146889,13 +146887,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { /* Fast estimate for MAX(l,63) */ grow = l | uint64(63) z2 = Xmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } } else { @@ -146926,7 +146924,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { } k = v11 for { - if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -146942,7 +146940,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -146971,7 +146969,7 @@ func Xstrstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return h } /* Use faster algorithms for short needles */ - h = Xstrchr(tls, h, int32(*(*uint8)(unsafe.Pointer(n)))) + h = Xstrchr(tls, h, Int32FromUint8(*(*uint8)(unsafe.Pointer(n)))) if !(h != 0) || !(*(*uint8)(unsafe.Pointer(n + 1)) != 0) { return h } @@ -147081,14 +147079,14 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { i = v2 dp = v2 for { - if !(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { break } - c = int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) if !(c != 0) { return 0 } - if !(BoolInt32(uint32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { dp = i + uint64(1) z = Int32FromInt32(1) } else { @@ -147101,7 +147099,7 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { ; i++ } - if uint32(int32(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && uint32(int32(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { + if Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { /* If we're looking at non-degenerate digit sequences starting * with nonzero digits, longest digit string is greater. */ j = i @@ -147124,10 +147122,10 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { if z != 0 && dp < i && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-uint32('0') < uint32(10)) != 0 || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-uint32('0') < uint32(10)) != 0) { /* Otherwise, if common prefix of digit sequence is * all zeros, digits order less than non-digits. */ - return int32(uint8(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - int32(uint8(int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) + return Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) } } - return int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - int32(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) } func Xswab(tls *TLS, _src uintptr, _dest uintptr, n Tssize_t) { @@ -147174,7 +147172,7 @@ func Xwcscasecmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2)) defer func() { trc("-> %v", r1) }() } - return Xwcsncasecmp(tls, l, r, uint64(-Int32FromInt32(1))) + return Xwcsncasecmp(tls, l, r, Uint64FromInt32(-Int32FromInt32(1))) } func Xwcscasecmp_l(tls *TLS, l uintptr, r uintptr, locale Tlocale_t) (r1 int32) { @@ -147286,7 +147284,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { v2 = Xwcschr(tls, v3, *(*Twchar_t)(unsafe.Pointer(c))) s = v2 if v2 != 0 { - v1 = uint64((int64(s) - int64(a)) / 4) + v1 = Uint64FromInt64((int64(s) - int64(a)) / 4) } else { v1 = Xwcslen(tls, a) } @@ -147302,7 +147300,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsdup(tls *TLS, s uintptr) (r uintptr) { @@ -147338,7 +147336,7 @@ func Xwcslen(tls *TLS, s uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { @@ -147364,7 +147362,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { r += 4 n-- } - return int32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(l))) - Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(r)))) + return Int32FromUint32(Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(l))) - Xtowlower(tls, *(*Twchar_t)(unsafe.Pointer(r)))) } func Xwcsncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, locale Tlocale_t) (r1 int32) { @@ -147458,7 +147456,7 @@ func Xwcsnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _ = z z = Xwmemchr(tls, s, uint32(0), n) if z != 0 { - n = uint64((int64(z) - int64(s)) / 4) + n = Uint64FromInt64((int64(z) - int64(s)) / 4) } return n } @@ -147521,7 +147519,7 @@ func Xwcsspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { @@ -147544,7 +147542,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return uintptr(0) } /* hit the end of h */ /* Compute maximal suffix */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v2 = Uint64FromInt32(1) p = v2 @@ -147575,7 +147573,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 @@ -147626,13 +147624,13 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { /* Fast estimate for MIN(l,63) */ grow = l | uint64(63) z2 = Xwmemchr(tls, z, uint32(0), grow) if z2 != 0 { z = z2 - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { return uintptr(0) } } else { @@ -147937,7 +147935,7 @@ func X__mkostemps(tls *TLS, template uintptr, len1 int32, flags int32) (r int32) var l Tsize_t _, _, _, _, _ = fd, l, retries, v1, v3 l = Xstrlen(tls, template) - if l < uint64(6) || uint64(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1730, uint64(6)) != 0 { + if l < uint64(6) || Uint64FromInt32(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1730, uint64(6)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -148047,10 +148045,10 @@ func Xcfmakeraw(tls *TLS, t uintptr) { if __ccgo_strace { trc("tls=%v t=%v, (%v:)", tls, t, origin(2)) } - *(*Ttcflag_t)(unsafe.Pointer(t)) &= uint32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) - *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= uint32(^Int32FromInt32(OPOST)) - *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) - *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= uint32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) + *(*Ttcflag_t)(unsafe.Pointer(t)) &= Uint32FromInt32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) + *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= Uint32FromInt32(^Int32FromInt32(OPOST)) + *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) + *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= Uint32FromInt32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) *(*Ttcflag_t)(unsafe.Pointer(t + 8)) |= uint32(CS8) *(*Tcc_t)(unsafe.Pointer(t + 17 + 6)) = uint8(1) *(*Tcc_t)(unsafe.Pointer(t + 17 + 5)) = uint8(0) @@ -148061,11 +148059,11 @@ func Xcfsetospeed(tls *TLS, tio uintptr, speed Tspeed_t) (r int32) { trc("tls=%v tio=%v speed=%v, (%v:)", tls, tio, speed, origin(2)) defer func() { trc("-> %v", r) }() } - if speed&uint32(^Int32FromInt32(CBAUD)) != 0 { + if speed&Uint32FromInt32(^Int32FromInt32(CBAUD)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= uint32(^Int32FromInt32(CBAUD)) + *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= Uint32FromInt32(^Int32FromInt32(CBAUD)) *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) |= speed return 0 } @@ -148098,7 +148096,7 @@ func Xtcdrain(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) } func Xtcflow(tls *TLS, fd int32, action int32) (r int32) { @@ -148153,7 +148151,7 @@ func Xtcgetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) } func Xtcsendbreak(tls *TLS, fd int32, dur int32) (r int32) { @@ -148186,7 +148184,7 @@ func Xtcsetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) } func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { @@ -148201,13 +148199,13 @@ func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { var _ /* st at bp+0 */ Tstat _, _, _ = fd, map1, v1 map1 = uintptr(-Int32FromInt32(1)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) if fd < 0 { return uintptr(0) } if !(X__fstat(tls, fd, bp) != 0) { - map1 = X__mmap(tls, uintptr(0), uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) - *(*Tsize_t)(unsafe.Pointer(size)) = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + map1 = X__mmap(tls, uintptr(0), Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) + *(*Tsize_t)(unsafe.Pointer(size)) = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) } X__syscall1(tls, int64(SYS_close), int64(fd)) if map1 == uintptr(-Int32FromInt32(1)) { @@ -148314,10 +148312,10 @@ func X__secs_to_tm(tls *TLS, t int64, tm uintptr) (r int32) { years = int64(remyears+int32(4)*q_cycles+int32(100)*c_cycles) + int64(400)*int64(qc_cycles) months = 0 for { - if !(int32(_days_in_month[months]) <= remdays) { + if !(Int32FromUint8(_days_in_month[months]) <= remdays) { break } - remdays -= int32(_days_in_month[months]) + remdays -= Int32FromUint8(_days_in_month[months]) goto _1 _1: ; @@ -148413,35 +148411,35 @@ func _getint2(tls *TLS, p uintptr) (r int32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { break } - x = uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x goto _1 _1: ; *(*uintptr)(unsafe.Pointer(p))++ } - return int32(x) + return Int32FromUint32(x) } func _getoff(tls *TLS, p uintptr) (r int32) { var neg, off, v1 int32 _, _, _ = neg, off, v1 neg = 0 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('-') { *(*uintptr)(unsafe.Pointer(p))++ neg = int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('+') { *(*uintptr)(unsafe.Pointer(p))++ } } off = int32(3600) * _getint2(tls, p) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { *(*uintptr)(unsafe.Pointer(p))++ off += int32(60) * _getint2(tls, p) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { *(*uintptr)(unsafe.Pointer(p))++ off += _getint2(tls, p) } @@ -148457,7 +148455,7 @@ func _getoff(tls *TLS, p uintptr) (r int32) { func _getrule(tls *TLS, p uintptr, rule uintptr) { var r, v1 int32 _, _ = r, v1 - v1 = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) *(*int32)(unsafe.Pointer(rule)) = v1 r = v1 if r != int32('M') { @@ -148475,7 +148473,7 @@ func _getrule(tls *TLS, p uintptr, rule uintptr) { *(*uintptr)(unsafe.Pointer(p))++ *(*int32)(unsafe.Pointer(rule + 3*4)) = _getint2(tls, p) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('/') { *(*uintptr)(unsafe.Pointer(p))++ *(*int32)(unsafe.Pointer(rule + 4*4)) = _getoff(tls, p) } else { @@ -148486,11 +148484,11 @@ func _getrule(tls *TLS, p uintptr, rule uintptr) { func _getname(tls *TLS, d uintptr, p uintptr) { var i, v3 int32 _, _ = i, v3 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('<') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('<') { *(*uintptr)(unsafe.Pointer(p))++ i = 0 for { - if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i)))) != int32('>')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i)))) != int32('>')) { break } if i < int32(TZNAME_MAX) { @@ -148507,7 +148505,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } else { i = 0 for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { break } if i < int32(TZNAME_MAX) { @@ -148529,7 +148527,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } func _zi_read32(tls *TLS, z uintptr) (r Tuint32_t) { - return uint32(*(*uint8)(unsafe.Pointer(z)))< uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { + if i > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { *(*uintptr)(unsafe.Pointer(bp + 288)) = uintptr(unsafe.Pointer(&X__utc)) i = Uint64FromInt32(3) } @@ -148606,8 +148604,8 @@ func _do_tzset(tls *TLS) { if i >= _old_tz_size { _old_tz_size = i + uint64(1) } - if _old_tz_size > uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { - _old_tz_size = uint64(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) + if _old_tz_size > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { + _old_tz_size = Uint64FromInt32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) } _old_tz = Xmalloc(tls, _old_tz_size) } @@ -148615,10 +148613,10 @@ func _do_tzset(tls *TLS) { Xmemcpy(tls, _old_tz, *(*uintptr)(unsafe.Pointer(bp + 288)), i+uint64(1)) } posix_form = 0 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { *(*uintptr)(unsafe.Pointer(bp + 296)) = *(*uintptr)(unsafe.Pointer(bp + 288)) _getname(tls, bp+308, bp+296) - if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1755) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1759) != 0)) { + if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1755) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1759) != 0)) { posix_form = int32(1) } } @@ -148626,10 +148624,10 @@ func _do_tzset(tls *TLS) { * pathame beginning with "."; in secure mode, only the * standard path will be searched. */ if !(posix_form != 0) { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { *(*uintptr)(unsafe.Pointer(bp + 288))++ } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { if !(X__libc.Fsecure != 0) || !(Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), __ccgo_ts+1740) != 0) { map1 = X__map_file(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), uintptr(unsafe.Pointer(&_map_size))) } @@ -148665,7 +148663,7 @@ func _do_tzset(tls *TLS) { _zi = map1 if map1 != 0 { scale = int32(2) - if int32(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { *(*[6]uint8)(unsafe.Pointer(bp)) = [6]uint8{ 0: uint8(1), 1: uint8(1), @@ -148684,10 +148682,10 @@ func _do_tzset(tls *TLS) { _types = _index + uintptr(_zi_read32(tls, _trans-uintptr(12))) _abbrevs = _types + uintptr(uint32(6)*_zi_read32(tls, _trans-uintptr(8))) _abbrevs_end = _abbrevs + uintptr(_zi_read32(tls, _trans-uintptr(4))) - if int32(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { *(*uintptr)(unsafe.Pointer(bp + 288)) = _zi + uintptr(_map_size) - uintptr(2) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { break } goto _4 @@ -148712,11 +148710,11 @@ func _do_tzset(tls *TLS) { } if !(*(*uint8)(unsafe.Pointer(p1 + 4)) != 0) && !(Xtzname[0] != 0) { Xtzname[0] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - Xtimezone = int64(-_zi_read32(tls, p1)) + Xtimezone = Int64FromUint32(-_zi_read32(tls, p1)) } if *(*uint8)(unsafe.Pointer(p1 + 4)) != 0 && !(Xtzname[int32(1)] != 0) { Xtzname[int32(1)] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - _dst_off = int32(-_zi_read32(tls, p1)) + _dst_off = Int32FromUint32(-_zi_read32(tls, p1)) Xdaylight = int32(1) } goto _8 @@ -148747,7 +148745,7 @@ func _do_tzset(tls *TLS) { Xtzname[int32(1)] = uintptr(unsafe.Pointer(&_dst_name)) if _dst_name[0] != 0 { Xdaylight = int32(1) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { _dst_off = _getoff(tls, bp+288) } else { _dst_off = int32(Xtimezone - int64(3600)) @@ -148756,11 +148754,11 @@ func _do_tzset(tls *TLS) { Xdaylight = 0 _dst_off = int32(Xtimezone) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r0))) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r12))) } @@ -148779,7 +148777,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { scale = int32(3) - BoolInt32(_trans == _zi+uintptr(44)) off = 0 a = uint64(0) - n = uint64((int64(_index) - int64(_trans)) >> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if !(n != 0) { if alt != 0 { *(*Tsize_t)(unsafe.Pointer(alt)) = uint64(0) @@ -148793,12 +148791,12 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if a == n-uint64(1) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if a == uint64(0) { x = uint64(_zi_read32(tls, _trans)) if scale == int32(3) { x = x<= uint64(int64(_abbrevs_end)-int64(_abbrevs))) { + if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint64(p)-uint64(_abbrevs) >= Uint64FromInt64(int64(_abbrevs_end)-int64(_abbrevs))) { p = __ccgo_ts } ___unlock(tls, uintptr(unsafe.Pointer(&_lock4))) @@ -149021,7 +149019,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { var centuries, cycles, leaps, leaps1, rem, y int32 var _ /* dummy at bp+0 */ int32 _, _, _, _, _, _ = centuries, cycles, leaps, leaps1, rem, y - if uint64(year)-uint64(2) <= uint64(136) { + if Uint64FromInt64(year)-uint64(2) <= uint64(136) { y = int32(year) leaps = (y - int32(68)) >> int32(2) if !((y-Int32FromInt32(68))&Int32FromInt32(3) != 0) { @@ -149070,7 +149068,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { *(*int32)(unsafe.Pointer(is_leap)) = 0 leaps1 = 0 } else { - leaps1 = int32(uint32(rem) / uint32(4)) + leaps1 = Int32FromUint32(Uint32FromInt32(rem) / uint32(4)) rem = int32(uint32(rem) % Uint32FromUint32(4)) *(*int32)(unsafe.Pointer(is_leap)) = BoolInt32(!(rem != 0)) } @@ -149154,7 +149152,7 @@ func Xclock_getcpuclockid(tls *TLS, pid Tpid_t, clk uintptr) (r int32) { var ret int32 var _ /* ts at bp+0 */ Ttimespec _, _ = id, ret - id = int32(uint32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) + id = Int32FromUint32(Uint32FromInt32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) ret = int32(X__syscall2(tls, int64(SYS_clock_getres), int64(id), int64(bp))) if ret == -int32(EINVAL) { ret = -int32(ESRCH) @@ -149173,7 +149171,7 @@ func Xclock_getres(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { } /* If reaching this point, it's a 64-bit arch or time64-only * 32-bit arch and we can get result directly into timespec. */ - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) } func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { @@ -149192,7 +149190,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { } r = -int32(EINVAL) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xclock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { @@ -149230,7 +149228,7 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { trc("tls=%v clk=%v ts=%v, (%v:)", tls, clk, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) } func Xctime(tls *TLS, t uintptr) (r uintptr) { @@ -149293,7 +149291,7 @@ func Xftime(tls *TLS, tp uintptr) (r int32) { _ = v1 Xclock_gettime(tls, CLOCK_REALTIME, bp) (*Ttimeb)(unsafe.Pointer(tp)).Ftime = (*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec - (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = uint16((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) + (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = Uint16FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) v1 = Int16FromInt32(0) (*Ttimeb)(unsafe.Pointer(tp)).Fdstflag = v1 (*Ttimeb)(unsafe.Pointer(tp)).Ftimezone = v1 @@ -149495,7 +149493,7 @@ func Xnanosleep(tls *TLS, req uintptr, rem uintptr) (r int32) { trc("tls=%v req=%v rem=%v, (%v:)", tls, req, rem, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) } func _is_leap(tls *TLS, y int32) (r int32) { @@ -149510,10 +149508,10 @@ func _is_leap(tls *TLS, y int32) (r int32) { func _week_num(tls *TLS, tm uintptr) (r int32) { var dec31, jan1, val int32 _, _, _ = dec31, jan1, val - val = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) /* If 1 Jan is just 1-3 days past Monday, * the previous week is also in this year. */ - if (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { + if (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { val++ } if !(val != 0) { @@ -149521,7 +149519,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 31 December of prev year a Thursday, * or Friday of a leap year, then the * prev year has 53 weeks. */ - dec31 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) + dec31 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) if dec31 == int32(4) || dec31 == int32(5) && _is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year%int32(400)-int32(1)) != 0 { val++ } @@ -149530,7 +149528,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 1 January is not a Thursday, and not * a Wednesday of a leap year, then this * year has only 52 weeks. */ - jan1 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) + jan1 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) if jan1 != int32(4) && (jan1 != int32(3) || !(_is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year) != 0)) { val = int32(1) } @@ -149556,13 +149554,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc def_pad = int32('0') switch f { case int32('a'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(ABDAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday goto nl_strcat case int32('A'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(DAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday @@ -149570,13 +149568,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('h'): fallthrough case int32('b'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(ABMON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon goto nl_strcat case int32('B'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(MON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon @@ -149675,7 +149673,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc d++ v5 = fmt fmt++ - *(*uint8)(unsafe.Pointer(v4)) = uint8(Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(v5))))) + *(*uint8)(unsafe.Pointer(v4)) = Uint8FromInt32(Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))))) goto _3 _3: ; @@ -149711,10 +149709,10 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc width = int32(1) goto number case int32('U'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) goto number case int32('W'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) goto number case int32('V'): val = int64(_week_num(tls, tm)) @@ -149738,7 +149736,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('Y'): val = int64((*Ttm)(unsafe.Pointer(tm)).Ftm_year) + int64(1900) if val >= int64(10000) { - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1841, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1841, VaList(bp+8, val))) return s } width = int32(4) @@ -149748,7 +149746,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc *(*Tsize_t)(unsafe.Pointer(l)) = uint64(0) return __ccgo_ts } - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1847, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1847, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) return s case int32('Z'): if (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst < 0 { @@ -149773,13 +149771,13 @@ number: } switch v7 { case int32('-'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1854, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1854, VaList(bp+8, val))) case int32('_'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1859, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1859, VaList(bp+8, width, val))) case int32('0'): fallthrough default: - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1865, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1865, VaList(bp+8, width, val))) break } return s @@ -149831,7 +149829,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl *(*uint8)(unsafe.Pointer(s + uintptr(l))) = uint8(0) return l } - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { v2 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v2))) = *(*uint8)(unsafe.Pointer(f)) @@ -149839,12 +149837,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } f++ pad = 0 - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('_') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('0') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('_') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('0') { v3 = f f++ - pad = int32(*(*uint8)(unsafe.Pointer(v3))) + pad = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } - v4 = BoolInt32(int32(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) + v4 = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) plus = v4 if v4 != 0 { f++ @@ -149855,7 +149853,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint64(0) *(*uintptr)(unsafe.Pointer(bp + 112)) = f } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('F') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('G') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('Y') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('F') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('G') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('Y') { if !(width != 0) && *(*uintptr)(unsafe.Pointer(bp + 112)) != f { width = uint64(1) } @@ -149863,10 +149861,10 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint64(0) } f = *(*uintptr)(unsafe.Pointer(bp + 112)) - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('E') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('O') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('E') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('O') { f++ } - t = X__strftime_fmt_1(tls, bp+8, bp, int32(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) + t = X__strftime_fmt_1(tls, bp+8, bp, Int32FromUint8(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) if !(t != 0) { break } @@ -149874,12 +149872,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl /* Trim off any sign and leading zeros, then * count remaining digits to determine behavior * for the + flag. */ - if int32(*(*uint8)(unsafe.Pointer(t))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(t))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('-') { t++ *(*Tsize_t)(unsafe.Pointer(bp))-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(t))) == int32('0') && uint32(int32(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('0') && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { break } goto _5 @@ -149893,7 +149891,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } d = uint64(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { break } goto _6 @@ -149908,13 +149906,13 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width-- } else { if v9 = plus != 0; v9 { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') { v8 = int32(3) } else { v8 = int32(5) } } - if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= uint64(v8) { + if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= Uint64FromInt32(v8) { v10 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v10))) = uint8('+') @@ -149989,16 +149987,16 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(bp + 4)) = 0 *(*int32)(unsafe.Pointer(bp + 8)) = 0 for *(*uint8)(unsafe.Pointer(f)) != 0 { - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { - v1 = int32(*(*uint8)(unsafe.Pointer(f))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if v2 != 0 { for { if v8 = *(*uint8)(unsafe.Pointer(s)) != 0; v8 { - v5 = int32(*(*uint8)(unsafe.Pointer(s))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: } @@ -150011,7 +150009,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { s++ } } else { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(*(*uint8)(unsafe.Pointer(f))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) { return uintptr(0) } else { s++ @@ -150021,11 +150019,11 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { continue } f++ - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('+') { f++ } if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { - w = int32(Xstrtoul(tls, f, bp+16, int32(10))) + w = Int32FromUint64(Xstrtoul(tls, f, bp+16, int32(10))) f = *(*uintptr)(unsafe.Pointer(bp + 16)) } else { w = -int32(1) @@ -150033,7 +150031,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { adj = 0 v9 = f f++ - switch int32(*(*uint8)(unsafe.Pointer(v9))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) { case int32('A'): goto _10 case int32('a'): @@ -150185,8 +150183,8 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { _44: ; if v48 = *(*uint8)(unsafe.Pointer(s)) != 0; v48 { - v45 = int32(*(*uint8)(unsafe.Pointer(s))) - v46 = BoolInt32(v45 == int32(' ') || uint32(v45)-uint32('\t') < uint32(5)) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v46 = BoolInt32(v45 == int32(' ') || Uint32FromInt32(v45)-uint32('\t') < uint32(5)) goto _47 _47: } @@ -150295,7 +150293,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; v49 = s s++ - if int32(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { return uintptr(0) } goto _41 @@ -150316,28 +150314,28 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v51 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v51))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v51))) - int32('0') goto _50 _50: ; i *= int32(10) } - if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(range1) { + if Uint32FromInt32(*(*int32)(unsafe.Pointer(dest))-min) >= Uint32FromInt32(range1) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) -= adj switch int64(dest) - int64(tm) { - case int64(uint64(UintptrFromInt32(0) + 28)): + case Int64FromUint64(uint64(UintptrFromInt32(0) + 28)): } goto update goto numeric_digits numeric_digits: ; neg = 0 - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { s++ } else { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') { neg = int32(1) s++ } @@ -150354,7 +150352,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v54 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v54))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v54))) - int32('0') goto _52 _52: ; @@ -150475,9 +150473,9 @@ func Xtimer_getoverrun(tls *TLS, t Ttimer_t) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) } func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { @@ -150489,9 +150487,9 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) } func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (r int32) { @@ -150503,9 +150501,9 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) } type Ttms = struct { @@ -150612,7 +150610,7 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl if *(*Twchar_t)(unsafe.Pointer(f)) == uint32('-') || *(*Twchar_t)(unsafe.Pointer(f)) == uint32('_') || *(*Twchar_t)(unsafe.Pointer(f)) == uint32('0') { v3 = f f += 4 - pad = int32(*(*Twchar_t)(unsafe.Pointer(v3))) + pad = Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(v3))) } v4 = BoolInt32(*(*Twchar_t)(unsafe.Pointer(f)) == Uint32FromUint8('+')) plus = v4 @@ -150631,12 +150629,12 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl if *(*Twchar_t)(unsafe.Pointer(f)) == uint32('E') || *(*Twchar_t)(unsafe.Pointer(f)) == uint32('O') { f += 4 } - t_mb = X__strftime_fmt_1(tls, bp+8, bp, int32(*(*Twchar_t)(unsafe.Pointer(f))), tm, loc, pad) + t_mb = X__strftime_fmt_1(tls, bp+8, bp, Int32FromUint32(*(*Twchar_t)(unsafe.Pointer(f))), tm, loc, pad) if !(t_mb != 0) { break } *(*Tsize_t)(unsafe.Pointer(bp)) = Xmbstowcs(tls, bp+108, t_mb, Uint64FromInt64(400)/Uint64FromInt64(4)) - if *(*Tsize_t)(unsafe.Pointer(bp)) == uint64(-Int32FromInt32(1)) { + if *(*Tsize_t)(unsafe.Pointer(bp)) == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } t = bp + 108 @@ -150725,7 +150723,7 @@ func Xaccess(tls *TLS, filename uintptr, amode int32) (r int32) { trc("tls=%v filename=%v amode=%v, (%v:)", tls, filename, amode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_faccessat), int64(-Int32FromInt32(100)), int64(filename), int64(amode), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_faccessat), int64(-Int32FromInt32(100)), int64(filename), int64(amode), int64(Int32FromInt32(0)))))) } func Xacct(tls *TLS, filename uintptr) (r int32) { @@ -150733,7 +150731,7 @@ func Xacct(tls *TLS, filename uintptr) (r int32) { trc("tls=%v filename=%v, (%v:)", tls, filename, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) } func Xalarm(tls *TLS, seconds uint32) (r uint32) { @@ -150747,12 +150745,12 @@ func Xalarm(tls *TLS, seconds uint32) (r uint32) { var _ /* old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_value: Ttimeval{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), }, } *(*Titimerval)(unsafe.Pointer(bp + 32)) = Titimerval{} Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) } func Xchdir(tls *TLS, path uintptr) (r int32) { @@ -150760,7 +150758,7 @@ func Xchdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) } func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { @@ -150768,7 +150766,7 @@ func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), int64(uid), int64(gid), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(Int32FromInt32(0)))))) } func _dummy12(tls *TLS, fd int32) (r int32) { @@ -150787,7 +150785,7 @@ func Xclose(tls *TLS, fd int32) (r1 int32) { if r == -int32(EINTR) { r = 0 } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xctermid(tls *TLS, s uintptr) (r uintptr) { @@ -150810,7 +150808,7 @@ func Xdup(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) } func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { @@ -150834,7 +150832,7 @@ func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { } } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { @@ -150851,7 +150849,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { break } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xdup3(tls *TLS, old int32, new1 int32, flags int32) (r int32) { @@ -150880,7 +150878,7 @@ func _checker(tls *TLS, p uintptr) (r int32) { X__syscall1(tls, int64(SYS_exit), int64(Int32FromInt32(1))) } *(*int32)(unsafe.Pointer(bp)) = int32(X__syscall4(tls, int64(SYS_faccessat), int64((*Tctx1)(unsafe.Pointer(c)).Ffd), int64((*Tctx1)(unsafe.Pointer(c)).Ffilename), int64((*Tctx1)(unsafe.Pointer(c)).Famode), int64(Int32FromInt32(0)))) - X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), int64(Uint64FromInt64(4))) + X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), Int64FromUint64(Uint64FromInt64(4))) return 0 } @@ -150894,13 +150892,13 @@ func Xfaccessat(tls *TLS, fd int32, filename uintptr, amode int32, flag int32) ( if flag != 0 { ret = int32(X__syscall4(tls, int64(SYS_faccessat2), int64(fd), int64(filename), int64(amode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } if flag & ^Int32FromInt32(AT_EACCESS) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) } func Xfchdir(tls *TLS, fd int32) (r int32) { @@ -150915,10 +150913,10 @@ func Xfchdir(tls *TLS, fd int32) (r int32) { _ = ret ret = int32(X__syscall1(tls, int64(SYS_fchdir), int64(fd))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) } func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { @@ -150931,12 +150929,12 @@ func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), int64(uid), int64(gid))) + ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), Int64FromUint32(uid), Int64FromUint32(gid))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(bp), int64(uid), int64(gid), int64(Int32FromInt32(0)))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(bp), Int64FromUint32(uid), Int64FromUint32(gid), int64(Int32FromInt32(0)))))) } func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag int32) (r int32) { @@ -150944,7 +150942,7 @@ func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag in trc("tls=%v fd=%v path=%v uid=%v gid=%v flag=%v, (%v:)", tls, fd, path, uid, gid, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), int64(uid), int64(gid), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(flag))))) } func Xfdatasync(tls *TLS, fd int32) (r int32) { @@ -150952,7 +150950,7 @@ func Xfdatasync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) } func Xfsync(tls *TLS, fd int32) (r int32) { @@ -150960,7 +150958,7 @@ func Xfsync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) } func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { @@ -150968,7 +150966,7 @@ func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { trc("tls=%v fd=%v length=%v, (%v:)", tls, fd, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) } func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { @@ -150987,7 +150985,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { } else { v2 = int32(PATH_MAX) } - v1 = uint64(v2) + v1 = Uint64FromInt32(v2) tmp = Xrealloc(tls, tmp, v1) if !(buf != 0) { buf = tmp @@ -150998,11 +150996,11 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { return uintptr(0) } } - ret = X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), int64(size)))) + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), Int64FromUint64(size)))) if ret < 0 { return uintptr(0) } - if ret == 0 || int32(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { + if ret == 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOENT) return uintptr(0) } @@ -151019,7 +151017,7 @@ func Xgetegid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getegid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getegid))) } func Xgeteuid(tls *TLS) (r Tuid_t) { @@ -151027,7 +151025,7 @@ func Xgeteuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_geteuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_geteuid))) } func Xgetgid(tls *TLS) (r Tgid_t) { @@ -151035,7 +151033,7 @@ func Xgetgid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getgid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getgid))) } func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { @@ -151043,7 +151041,7 @@ func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { trc("tls=%v count=%v list=%v, (%v:)", tls, count, list, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) } func Xgethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -151115,7 +151113,7 @@ func Xgetpgid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) } func Xgetpgrp(tls *TLS) (r Tpid_t) { @@ -151147,7 +151145,7 @@ func Xgetsid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) } func Xgetuid(tls *TLS) (r Tuid_t) { @@ -151155,7 +151153,7 @@ func Xgetuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getuid))) } func Xisatty(tls *TLS, fd int32) (r1 int32) { @@ -151168,7 +151166,7 @@ func Xisatty(tls *TLS, fd int32) (r1 int32) { var r uint64 var _ /* wsz at bp+0 */ Twinsize _ = r - r = uint64(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) + r = Uint64FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) if r == uint64(0) { return int32(1) } @@ -151183,7 +151181,7 @@ func Xlchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), int64(uid), int64(gid), int64(Int32FromInt32(AT_SYMLINK_NOFOLLOW)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(Int32FromInt32(AT_SYMLINK_NOFOLLOW)))))) } func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { @@ -151191,7 +151189,7 @@ func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_linkat), int64(-Int32FromInt32(100)), int64(existing), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_linkat), int64(-Int32FromInt32(100)), int64(existing), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) } func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, flag int32) (r int32) { @@ -151199,7 +151197,7 @@ func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, fla trc("tls=%v fd1=%v existing=%v fd2=%v new1=%v flag=%v, (%v:)", tls, fd1, existing, fd2, new1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) } func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151207,7 +151205,7 @@ func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { trc("tls=%v fd=%v offset=%v whence=%v, (%v:)", tls, fd, offset, whence, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_lseek), int64(fd), offset, int64(whence)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_lseek), int64(fd), offset, int64(whence)))) } func Xlseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151253,7 +151251,7 @@ func Xpause(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), 0, 0)))) } func Xpipe(tls *TLS, fd uintptr) (r int32) { @@ -151261,7 +151259,7 @@ func Xpipe(tls *TLS, fd uintptr) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(Int32FromInt32(0)))))) } func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { @@ -151276,10 +151274,10 @@ func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { } ret = int32(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag & ^(Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } ret = Xpipe(tls, fd) if ret != 0 { @@ -151309,7 +151307,7 @@ func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151317,7 +151315,7 @@ func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { @@ -151325,7 +151323,7 @@ func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151333,7 +151331,7 @@ func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { @@ -151341,7 +151339,7 @@ func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151358,11 +151356,11 @@ func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_ buf = bp bufsize = uint64(1) } - r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(-Int32FromInt32(100)), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(-Int32FromInt32(100)), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151379,11 +151377,11 @@ func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) buf = bp bufsize = uint64(1) } - r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151391,7 +151389,7 @@ func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r int32) { @@ -151399,7 +151397,7 @@ func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r trc("tls=%v oldfd=%v old=%v newfd=%v new1=%v, (%v:)", tls, oldfd, old, newfd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_renameat), int64(oldfd), int64(old), int64(newfd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_renameat), int64(oldfd), int64(old), int64(newfd), int64(new1))))) } func Xrmdir(tls *TLS, path uintptr) (r int32) { @@ -151407,7 +151405,7 @@ func Xrmdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(AT_REMOVEDIR)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(AT_REMOVEDIR)))))) } func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { @@ -151415,7 +151413,7 @@ func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setgid), int32(gid), 0, 0) + return X__setxid(tls, int32(SYS_setgid), Int32FromUint32(gid), 0, 0) } func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { @@ -151423,7 +151421,7 @@ func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { trc("tls=%v pid=%v pgid=%v, (%v:)", tls, pid, pgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) } func Xsetpgrp(tls *TLS) (r Tpid_t) { @@ -151439,7 +151437,7 @@ func Xsetsid(tls *TLS) (r Tpid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_setsid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_setsid))))) } func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { @@ -151447,7 +151445,7 @@ func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setuid), int32(uid), 0, 0) + return X__setxid(tls, int32(SYS_setuid), Int32FromUint32(uid), 0, 0) } type Tctx2 = struct { @@ -151503,7 +151501,7 @@ func X__setxid(tls *TLS, nr int32, id int32, eid int32, sid int32) (r int32) { } else { v1 = (*(*Tctx2)(unsafe.Pointer(bp))).Fret } - return int32(X__syscall_ret(tls, uint64(v1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(v1))) } func Xsleep(tls *TLS, seconds uint32) (r uint32) { @@ -151515,10 +151513,10 @@ func Xsleep(tls *TLS, seconds uint32) (r uint32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), } if Xnanosleep(tls, bp, bp) != 0 { - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) } return uint32(0) } @@ -151528,7 +151526,7 @@ func Xsymlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(-Int32FromInt32(100)), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(-Int32FromInt32(100)), int64(new1))))) } func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { @@ -151536,7 +151534,7 @@ func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { trc("tls=%v existing=%v fd=%v new1=%v, (%v:)", tls, existing, fd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) } func Xsync(tls *TLS) { @@ -151577,7 +151575,7 @@ func Xtruncate(tls *TLS, path uintptr, length Toff_t) (r int32) { trc("tls=%v path=%v length=%v, (%v:)", tls, path, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) } /* Support signed or unsigned plain-char */ @@ -151622,12 +151620,12 @@ func Xttyname_r(tls *TLS, fd int32, name uintptr, size Tsize_t) (r int32) { if !(Xisatty(tls, fd) != 0) { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } - X__procfdname(tls, bp+256, uint32(fd)) + X__procfdname(tls, bp+256, Uint32FromInt32(fd)) l = Xreadlink(tls, bp+256, name, size) if l < 0 { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } else { - if uint64(l) == size { + if Uint64FromInt64(l) == size { return int32(ERANGE) } } @@ -151652,14 +151650,14 @@ func Xualarm(tls *TLS, value uint32, interval uint32) (r uint32) { var _ /* it_old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_interval: Ttimeval{ - Ftv_usec: int64(interval), + Ftv_usec: Int64FromUint32(interval), }, Fit_value: Ttimeval{ - Ftv_usec: int64(value), + Ftv_usec: Int64FromUint32(value), }, } Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) } func Xunlink(tls *TLS, path uintptr) (r int32) { @@ -151667,7 +151665,7 @@ func Xunlink(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(0)))))) } func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { @@ -151675,7 +151673,7 @@ func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { trc("tls=%v fd=%v path=%v flag=%v, (%v:)", tls, fd, path, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) } func Xusleep(tls *TLS, useconds uint32) (r int32) { @@ -151687,8 +151685,8 @@ func Xusleep(tls *TLS, useconds uint32) (r int32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(useconds / uint32(1000000)), - Ftv_nsec: int64(useconds % uint32(1000000) * uint32(1000)), + Ftv_sec: Int64FromUint32(useconds / uint32(1000000)), + Ftv_nsec: Int64FromUint32(useconds % uint32(1000000) * uint32(1000)), } return Xnanosleep(tls, bp, bp) } @@ -151698,7 +151696,7 @@ func Xwrite(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151706,7 +151704,7 @@ func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func __ccgo_fp(f interface{}) uintptr { @@ -152081,22 +152079,22 @@ var X__fsmu8 = [51]Tuint32_t{ 11: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x0), 31: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x1), 32: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x2), @@ -154003,7 +154001,7 @@ var Xsigngam int32 var X__stack_chk_guard Tuintptr_t var X__stderr_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf5)) + uintptr(UNGET), Ffd: int32(2), Flock: -int32(1), @@ -154013,7 +154011,7 @@ var X__stderr_FILE = TFILE{ var X__stderr_used = uintptr(unsafe.Pointer(&X__stderr_FILE)) var X__stdin_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), Fbuf: uintptr(unsafe.Pointer(&_buf6)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Flock: -int32(1), @@ -154024,7 +154022,7 @@ var X__stdin_used = uintptr(unsafe.Pointer(&X__stdin_FILE)) var X__stdio_ofl_lockptr = uintptr(unsafe.Pointer(&_ofl_lock)) var X__stdout_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf7)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Ffd: int32(1), diff --git a/vendor/modernc.org/libc/ccgo_linux_loong64.go b/vendor/modernc.org/libc/ccgo_linux_loong64.go index 2c5572a2..aa58c300 100644 --- a/vendor/modernc.org/libc/ccgo_linux_loong64.go +++ b/vendor/modernc.org/libc/ccgo_linux_loong64.go @@ -9,10 +9,8 @@ import ( "unsafe" ) -var ( - _ reflect.Type - _ unsafe.Pointer -) +var _ reflect.Type +var _ unsafe.Pointer const BIG_ENDIAN = 4321 const BYTE_ORDER = 1234 @@ -664,8 +662,8 @@ func ___frexp_exp(tls *TLS, x float64, expt uintptr) (r float64) { */ exp_x = Xexp(tls, x-_kln2) hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&exp_x)) >> int32(32)) - *(*int32)(unsafe.Pointer(expt)) = int32(hx>>Int32FromInt32(20) - uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) - v1 = uint64(hx&Uint32FromInt32(0xfffff)|uint32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(20) - Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) + v1 = uint64(hx&Uint32FromInt32(0xfffff)|Uint32FromInt32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) - v1 = hx&uint32(0x7fffff) | uint32((Int32FromInt32(0x7f)+Int32FromInt32(127))<>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) + v1 = hx&uint32(0x7fffff) | Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(127))<> Int32FromInt32(63)) + zineg = Int32FromUint64(v1 >> Int32FromInt32(63)) z = Xcacos(tls, z) if zineg != 0 { v3 = [2]float64{ @@ -892,7 +890,7 @@ func Xcacoshf(tls *TLS, z complex64) (r complex64) { v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: - zineg = int32(v1 >> Int32FromInt32(31)) + zineg = Int32FromUint32(v1 >> Int32FromInt32(31)) z = Xcacosf(tls, z) if zineg != 0 { v3 = [2]float32{ @@ -1273,11 +1271,11 @@ func Xccosh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -1434,8 +1432,8 @@ func Xccoshf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -2029,11 +2027,11 @@ func Xcsinh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -2191,8 +2189,8 @@ func Xcsinhf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -2387,7 +2385,7 @@ _9: v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v12 = [2]float64{ 0: Xfabs(tls, b-b), 1: Xcopysign(tls, a, b), @@ -2507,7 +2505,7 @@ _9: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v12 = [2]float32{ 0: Xfabsf(tls, b-b), 1: Xcopysignf(tls, a, b), @@ -3269,14 +3267,14 @@ func Xconfstr(tls *TLS, name int32, buf uintptr, len1 Tsize_t) (r Tsize_t) { if !(name != 0) { s = __ccgo_ts + 1 } else { - if uint32(name) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { + if Uint32FromInt32(name) & ^Uint32FromUint32(4) != uint32(1) && Uint32FromInt32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uint64(0) } } // snprintf is overkill but avoid wasting code size to implement // this completely useless function and its truncation semantics - return uint64(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) + return Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) } const ARG_MAX = 131072 @@ -3394,7 +3392,7 @@ func Xfpathconf(tls *TLS, fd int32, name int32) (r int64) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { + if Uint64FromInt32(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -7443,7 +7441,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { var _ /* set at bp+16 */ [128]uint8 var _ /* si at bp+144 */ Tsysinfo _, _, _, _, _, _, _, _ = cnt, i, mem, val, v1, v3, v6, p5 - if uint64(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { + if Uint64FromInt32(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } else { @@ -7460,11 +7458,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v1 = (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur } - return int64(v1) + return Int64FromUint64(v1) } } } - switch int32(uint8(_values1[name])) { + switch Int32FromUint8(Uint8FromInt16(_values1[name])) { case (-Int32FromInt32(256) | Int32FromInt32(1)) & Int32FromInt32(255): return int64(200809) case (-Int32FromInt32(256) | Int32FromInt32(2)) & Int32FromInt32(255): @@ -7472,7 +7470,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { case (-Int32FromInt32(256) | Int32FromInt32(3)) & Int32FromInt32(255): return int64(MQ_PRIO_MAX) case (-Int32FromInt32(256) | Int32FromInt32(4)) & Int32FromInt32(255): - return int64(X__libc.Fpage_size) + return Int64FromUint64(X__libc.Fpage_size) case (-Int32FromInt32(256) | Int32FromInt32(5)) & Int32FromInt32(255): return int64(SEM_VALUE_MAX) case (-Int32FromInt32(256) | Int32FromInt32(11)) & Int32FromInt32(255): @@ -7483,12 +7481,12 @@ func Xsysconf(tls *TLS, name int32) (r int64) { *(*[128]uint8)(unsafe.Pointer(bp + 16)) = [128]uint8{ 0: uint8(1), } - X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), int64(Uint64FromInt64(128)), int64(bp+16)) + X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), Int64FromUint64(Uint64FromInt64(128)), int64(bp+16)) v3 = Int32FromInt32(0) cnt = v3 i = v3 for { - if !(uint64(i) < uint64(128)) { + if !(Uint64FromInt32(i) < uint64(128)) { break } for { @@ -7499,7 +7497,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { _4: ; p5 = bp + 16 + uintptr(i) - *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (int32((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (Int32FromUint8((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) cnt++ } goto _2 @@ -7527,11 +7525,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v6 = mem } - return int64(v6) + return Int64FromUint64(v6) case (-Int32FromInt32(256) | Int32FromInt32(12)) & Int32FromInt32(255): fallthrough case (-Int32FromInt32(256) | Int32FromInt32(13)) & Int32FromInt32(255): - val = int64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) + val = Int64FromUint64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) if val < int64(MINSIGSTKSZ) { val = int64(MINSIGSTKSZ) } @@ -9161,14 +9159,14 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags * Prefix "$2x$": bug = 1, safety = 0 * Prefix "$2y$": bug = 0, safety = 0 */ - bug = uint32(int32(flags) & int32(1)) + bug = Uint32FromInt32(Int32FromUint8(flags) & int32(1)) safety = uint32(flags) & uint32(2) << int32(15) v1 = Uint32FromInt32(0) diff = v1 sign = v1 i = uint32(0) for { - if !(i < uint32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { + if !(i < Uint32FromInt32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { break } v3 = Uint32FromInt32(0) @@ -9180,9 +9178,9 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags break } *(*TBF_word)(unsafe.Pointer(bp)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(uint8(*(*int8)(unsafe.Pointer(ptr)))) /* correct */ + *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(Uint8FromInt8(*(*int8)(unsafe.Pointer(ptr)))) /* correct */ *(*TBF_word)(unsafe.Pointer(bp + 1*4)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(*(*int8)(unsafe.Pointer(ptr))) /* bug */ + *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= Uint32FromInt8(*(*int8)(unsafe.Pointer(ptr))) /* bug */ /* * Sign extension in the first char has no effect - nothing to overwrite yet, * and those extra 24 bits will be fully shifted out of the 32-bit word. For @@ -9262,7 +9260,7 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w } } _, _, _, _, _, _, _, _, _, _, _, _, _ = L, L1, R, count, done, i, ptr, tmp1, tmp2, tmp3, tmp4, v1, v6 - if int32(*(*int8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*int8)(unsafe.Pointer(setting + 1))) != int32('2') || uint32(int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*int8)(unsafe.Pointer(setting + 3))) != int32('$') || uint32(int32(*(*int8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || uint32(int32(*(*int8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*int8)(unsafe.Pointer(setting + 6))) != int32('$') { + if int32(*(*int8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*int8)(unsafe.Pointer(setting + 1))) != int32('2') || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*int8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*int8)(unsafe.Pointer(setting + 3))) != int32('$') || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*int8)(unsafe.Pointer(setting + 6))) != int32('$') { return UintptrFromInt32(0) } count = Uint32FromInt32(1) << ((int32(*(*int8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (int32(*(*int8)(unsafe.Pointer(setting + 5))) - int32('0'))) @@ -9362,8 +9360,8 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w ; i += int32(2) } - Xmemcpy(tls, output, setting, uint64(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) - *(*int8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = int8(_BF_itoa64[int32(_BF_atoi64[int32(*(*int8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)]) + Xmemcpy(tls, output, setting, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) + *(*int8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = Int8FromUint8(_BF_itoa64[Int32FromUint8(_BF_atoi64[int32(*(*int8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)]) /* This has to be bug-compatible with the original implementation, so * only encode 23 of the 24 bytes. :-) */ _BF_swap(tls, bp+4240, int32(6)) @@ -9434,7 +9432,7 @@ func X__crypt_blowfish(tls *TLS, key uintptr, setting uintptr, output uintptr) ( Xmemset(tls, bp+30, int32(0x55), uint64(63)) *(*int8)(unsafe.Pointer(bp + 30 + uintptr(Uint64FromInt64(63)-Uint64FromInt32(1)))) = 0 p = _BF_crypt(tls, test_key, bp, bp+30, uint32(1)) - ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, uint64(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, uint64(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) + ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, Uint64FromInt32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) k = __ccgo_ts + 58 _BF_set_key(tls, k, bp+96, bp+168, uint8(2)) /* $2a$ */ _BF_set_key(tls, k, bp+240, bp+312, uint8(4)) /* $2y$ */ @@ -11244,7 +11242,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { } } retval &= int32(0x3f) - return uint32(retval) + return Uint32FromInt32(retval) } // C documentation @@ -11254,7 +11252,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { // * containing characters that would violate the passwd file format. // */ func _ascii_is_unsafe(tls *TLS, ch uint8) (r int32) { - return BoolInt32(!(ch != 0) || int32(ch) == int32('\n') || int32(ch) == int32(':')) + return BoolInt32(!(ch != 0) || Int32FromUint8(ch) == int32('\n') || Int32FromUint8(ch) == int32(':')) } func _setup_salt(tls *TLS, salt Tuint32_t) (r Tuint32_t) { @@ -11505,13 +11503,13 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin for q <= bp+128+uintptr(Uint64FromInt64(8)-Uint64FromInt32(1)) { v1 = q q++ - *(*uint8)(unsafe.Pointer(v1)) = uint8(int32(*(*uint8)(unsafe.Pointer(key))) << int32(1)) + *(*uint8)(unsafe.Pointer(v1)) = Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(key))) << int32(1)) if *(*uint8)(unsafe.Pointer(key)) != 0 { key++ } } X__des_setkey(tls, bp+128, bp) - if int32(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { /* * "new"-style: * setting - underscore, 4 chars of count, 4 chars of salt @@ -11523,8 +11521,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(5)) { break } - value = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } count |= value << ((i - uint32(1)) * uint32(6)) @@ -11542,8 +11540,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(9)) { break } - value1 = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value1]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value1 = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value1]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } salt |= value1 << ((i - uint32(5)) * uint32(6)) @@ -11567,7 +11565,7 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin p4 = v5 v6 = key key++ - *(*uint8)(unsafe.Pointer(p4)) = uint8(int32(*(*uint8)(unsafe.Pointer(p4))) ^ int32(*(*uint8)(unsafe.Pointer(v6)))< uint32(KEY_MAX) { return uintptr(0) } @@ -12085,7 +12083,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt if !(i < uint32(5)) { break } - p = _to64(tls, p, uint32(int32((*(*[16]uint8)(unsafe.Pointer(bp + 88)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm)) + uintptr(i)*3))])< uint32(KEY_MAX1) { return uintptr(0) } @@ -12510,7 +12508,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui * the host's value of ULONG_MAX. */ salt += uintptr(Uint64FromInt64(8) - Uint64FromInt32(1)) - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(salt)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(salt)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return uintptr(0) } u = Xstrtoul(tls, salt, bp+224, int32(10)) @@ -12590,7 +12588,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha256_init(tls, bp) i = uint32(0) for { - if !(i < uint32(int32(16)+int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { + if !(i < Uint32FromInt32(int32(16)+Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { break } _sha256_update(tls, bp, salt, uint64(slen)) @@ -12637,13 +12635,13 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(10)) { break } - p = _to641(tls, p, uint32(int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm1)) + uintptr(i)*3))])<= 0) { break } - *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= uint32(int32(*(*int8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j + *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j goto _2 _2: ; @@ -13453,7 +13451,7 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } v6 = p p++ - *(*int8)(unsafe.Pointer(v6)) = int8((*(*[2]Tuint32_t)(unsafe.Pointer(bp + 128)))[i] >> j & uint32(1)) + *(*int8)(unsafe.Pointer(v6)) = Int8FromUint32((*(*[2]Tuint32_t)(unsafe.Pointer(bp + 128)))[i] >> j & uint32(1)) goto _5 _5: ; @@ -13467,134 +13465,134 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } var _table = [384]uint16{ - 128: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 129: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 130: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 131: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 132: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 133: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 134: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 135: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 136: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 137: uint16((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 138: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 139: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 140: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 141: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 142: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 143: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 144: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 145: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 146: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 147: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 148: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 149: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 150: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 151: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 152: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 153: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 154: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 155: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 156: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 157: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 158: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 159: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 160: uint16((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 161: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 162: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 163: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 164: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 165: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 166: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 167: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 168: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 169: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 170: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 171: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 172: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 173: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 174: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 175: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 176: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 177: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 178: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 179: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 180: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 181: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 182: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 183: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 184: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 185: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 186: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 187: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 188: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 189: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 190: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 191: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 192: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 193: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 194: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 195: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 196: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 197: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 198: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 199: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 200: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 201: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 202: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 203: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 204: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 205: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 206: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 207: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 208: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 209: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 210: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 211: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 212: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 213: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 214: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 215: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 216: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 217: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 218: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 219: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 220: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 221: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 222: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 223: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 224: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 225: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 226: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 227: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 228: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 229: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 230: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 231: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 232: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 233: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 234: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 235: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 236: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 237: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 238: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 239: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 240: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 241: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 242: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 243: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 244: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 245: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 246: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 247: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 248: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 249: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 250: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 251: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 252: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 253: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 254: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 255: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 128: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 129: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 130: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 131: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 132: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 133: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 134: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 135: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 136: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 137: Uint16FromInt32((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 138: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 139: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 140: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 141: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 142: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 143: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 144: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 145: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 146: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 147: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 148: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 149: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 150: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 151: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 152: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 153: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 154: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 155: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 156: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 157: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 158: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 159: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 160: Uint16FromInt32((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 161: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 162: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 163: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 164: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 165: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 166: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 167: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 168: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 169: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 170: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 171: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 172: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 173: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 174: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 175: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 176: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 177: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 178: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 179: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 180: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 181: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 182: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 183: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 184: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 185: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 186: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 187: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 188: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 189: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 190: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 191: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 192: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 193: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 194: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 195: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 196: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 197: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 198: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 199: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 200: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 201: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 202: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 203: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 204: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 205: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 206: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 207: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 208: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 209: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 210: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 211: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 212: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 213: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 214: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 215: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 216: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 217: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 218: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 219: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 220: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 221: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 222: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 223: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 224: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 225: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 226: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 227: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 228: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 229: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 230: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 231: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 232: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 233: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 234: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 235: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 236: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 237: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 238: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 239: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 240: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 241: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 242: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 243: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 244: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 245: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 246: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 247: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 248: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 249: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 250: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 251: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 252: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 253: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 254: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 255: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), } var _ptable = uintptr(unsafe.Pointer(&_table)) + uintptr(128)*2 @@ -13937,7 +13935,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) { } else { v1 = int32(1) } - return uint64(v1) + return Uint64FromInt32(v1) } var _table1 = [384]Tint32_t{ @@ -14225,7 +14223,7 @@ func Xisalnum(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0) + return BoolInt32(BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0) } func X__isalnum_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14249,7 +14247,7 @@ func Xisalpha(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14305,7 +14303,7 @@ func Xiscntrl(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c) < uint32(0x20) || c == int32(0x7f)) + return BoolInt32(Uint32FromInt32(c) < uint32(0x20) || c == int32(0x7f)) } func X__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14329,7 +14327,7 @@ func Xisdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('0') < uint32(10)) + return BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14353,7 +14351,7 @@ func Xisgraph(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) } func X__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14377,7 +14375,7 @@ func Xislower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14401,7 +14399,7 @@ func Xisprint(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x20) < uint32(0x5f)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14425,7 +14423,7 @@ func Xispunct(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) } func X__ispunct_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14449,7 +14447,7 @@ func Xisspace(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(c == int32(' ') || uint32(c)-uint32('\t') < uint32(5)) + return BoolInt32(c == int32(' ') || Uint32FromInt32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14473,7 +14471,7 @@ func Xisupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('A') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -17366,7 +17364,7 @@ func Xiswalpha(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table3[uint32(int32(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table3[Uint32FromInt32(Int32FromUint8(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } if wc < uint32(0x2fffe) { return int32(1) @@ -17395,7 +17393,7 @@ func Xiswblank(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return Xisblank(tls, int32(wc)) + return Xisblank(tls, Int32FromUint32(wc)) } func X__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32) { @@ -17500,7 +17498,7 @@ func Xwctype(tls *TLS, s uintptr) (r Twctype_t) { break } if int32(*(*int8)(unsafe.Pointer(s))) == int32(*(*int8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { - return uint64(i) + return Uint64FromInt32(i) } goto _1 _1: @@ -17634,10 +17632,10 @@ func Xiswprint(tls *TLS, wc Twint_t) (r int32) { if wc < uint32(0xff) { return BoolInt32((wc+uint32(1))&uint32(0x7f) >= uint32(0x21)) } - if wc < uint32(0x2028) || wc-uint32(0x202a) < uint32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < uint32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { + if wc < uint32(0x2028) || wc-uint32(0x202a) < Uint32FromInt32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < Uint32FromInt32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { return int32(1) } - if wc-uint32(0xfffc) > uint32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { + if wc-uint32(0xfffc) > Uint32FromInt32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { return 0 } return int32(1) @@ -19217,7 +19215,7 @@ func Xiswpunct(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table4[uint32(int32(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table4[Uint32FromInt32(Int32FromUint8(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } return 0 } @@ -19254,7 +19252,7 @@ func Xiswspace(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), int32(wc)) != 0) + return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), Int32FromUint32(wc)) != 0) } var _spaces = [22]Twchar_t{ @@ -19350,7 +19348,7 @@ func Xisxdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0 || Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -19385,7 +19383,7 @@ func Xtolower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('A') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) != 0 { return c | int32(32) } return c @@ -19412,7 +19410,7 @@ func Xtoupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('a') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) != 0 { return c & int32(0x5f) } return c @@ -22218,40 +22216,40 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { var b, rt, try, v, x, xb, xn, y uint32 var c0, r, rd, v1 int32 _, _, _, _, _, _, _, _, _, _, _, _ = b, c0, r, rd, rt, try, v, x, xb, xn, y, v1 - c0 = int32(c) + c0 = Int32FromUint32(c) if c >= uint32(0x20000) { - return int32(c) + return Int32FromUint32(c) } b = c >> int32(8) c &= uint32(255) x = c / uint32(3) y = c % uint32(3) /* lookup entry in two-level base-6 table */ - v = uint32(_tab1[uint32(int32(_tab1[b])*int32(86))+x]) - v = v * uint32(_mt[y]) >> int32(11) % uint32(6) + v = uint32(_tab1[Uint32FromInt32(Int32FromUint8(_tab1[b])*int32(86))+x]) + v = v * Uint32FromInt32(_mt[y]) >> int32(11) % uint32(6) /* use the bit vector out of the tables as an index into * a block-specific set of rules and decode the rule into * a type and a case-mapping delta. */ r = _rules[uint32(_rulebases[b])+v] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) /* rules 0/1 are simple lower/upper case with a delta. * apply according to desired mapping direction. */ if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* binary search. endpoints of the binary search for * this block are stored in the rule delta field. */ - xn = uint32(rd & int32(0xff)) - xb = uint32(rd) >> int32(8) + xn = Uint32FromInt32(rd & int32(0xff)) + xb = Uint32FromInt32(rd) >> int32(8) for xn != 0 { try = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2))) if try == c { r = _rules[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2 + 1))] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* Hard-coded for the four exceptional titlecase */ if dir != 0 { @@ -22283,7 +22281,7 @@ func Xtowlower(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, 0)) + return Uint32FromInt32(_casemap(tls, wc, 0)) } func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { @@ -22291,7 +22289,7 @@ func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, int32(1))) + return Uint32FromInt32(_casemap(tls, wc, int32(1))) } func X__towupper_l(tls *TLS, c Twint_t, l Tlocale_t) (r Twint_t) { @@ -24490,7 +24488,7 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } var v1, v2 int32 _, _ = v1, v2 - if uint32(wc) < uint32(0xff) { + if Uint32FromInt32(wc) < uint32(0xff) { if (wc+int32(1))&int32(0x7f) >= int32(0x21) { v1 = int32(1) } else { @@ -24503,11 +24501,11 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } return v1 } - if uint32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { - if int32(_table5[int32(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Uint32FromInt32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { + if Int32FromUint8(_table5[Int32FromUint8(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return 0 } - if int32(_wtable[int32(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Int32FromUint8(_wtable[Int32FromUint8(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return int32(2) } return int32(1) @@ -24515,10 +24513,10 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { if wc&int32(0xfffe) == int32(0xfffe) { return -int32(1) } - if uint32(wc)-uint32(0x20000) < uint32(0x20000) { + if Uint32FromInt32(wc)-uint32(0x20000) < uint32(0x20000) { return int32(2) } - if wc == int32(0xe0001) || uint32(wc)-uint32(0xe0020) < uint32(0x5f) || uint32(wc)-uint32(0xe0100) < uint32(0xef) { + if wc == int32(0xe0001) || Uint32FromInt32(wc)-uint32(0xe0020) < uint32(0x5f) || Uint32FromInt32(wc)-uint32(0xe0100) < uint32(0xef) { return 0 } return int32(1) @@ -24846,7 +24844,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { var len1 int32 _, _ = de, len1 if (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos >= (*TDIR)(unsafe.Pointer(dir)).Fbuf_end { - len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), int64(Uint64FromInt64(2048)))) + len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), Int64FromUint64(Uint64FromInt64(2048)))) if len1 <= 0 { if len1 < 0 && len1 != -int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = -len1 @@ -24857,7 +24855,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos = 0 } de = dir + 24 + uintptr((*TDIR)(unsafe.Pointer(dir)).Fbuf_pos) - *(*int32)(unsafe.Pointer(dir + 12)) += int32((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) + *(*int32)(unsafe.Pointer(dir + 12)) += Int32FromUint16((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) (*TDIR)(unsafe.Pointer(dir)).Ftell = (*Tdirent)(unsafe.Pointer(de)).Fd_off return de } @@ -24972,7 +24970,7 @@ func Xscandir(tls *TLS, path uintptr, res uintptr, sel uintptr, cmp uintptr) (r Xqsort(tls, names, cnt, uint64(8), cmp) } *(*uintptr)(unsafe.Pointer(res)) = names - return int32(cnt) + return Int32FromUint64(cnt) } func Xseekdir(tls *TLS, dir uintptr, off int64) { @@ -25100,7 +25098,7 @@ func Xgetenv(tls *TLS, name uintptr) (r uintptr) { var e uintptr var l Tsize_t _, _ = e, l - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if l != 0 && !(*(*int8)(unsafe.Pointer(name + uintptr(l))) != 0) && Xenviron != 0 { e = Xenviron for { @@ -25190,7 +25188,7 @@ func Xputenv(tls *TLS, s uintptr) (r int32) { } var l Tsize_t _ = l - l = uint64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) + l = Uint64FromInt64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) if !(l != 0) || !(*(*int8)(unsafe.Pointer(s + uintptr(l))) != 0) { return Xunsetenv(tls, s) } @@ -25279,7 +25277,7 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) (r int32) { var v2 bool _, _, _, _, _ = l1, l2, s, v1, v2 if v2 = !(var1 != 0); !v2 { - v1 = uint64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) + v1 = Uint64FromInt64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) l1 = v1 } if v2 || !(v1 != 0) || *(*int8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { @@ -25311,7 +25309,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { var e, eo, v2 uintptr var l Tsize_t _, _, _, _ = e, eo, l, v2 - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) @@ -25646,7 +25644,7 @@ func X__strerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { } var s uintptr _ = s - if uint64(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { + if Uint64FromInt32(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { e = 0 } s = uintptr(unsafe.Pointer(&_errmsgstr)) + uintptr(_errmsgidx[e]) @@ -25775,7 +25773,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { arg |= uint64(O_LARGEFILE) } if cmd == int32(F_SETLKW) { - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(__NR3264_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(__NR3264_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) } if cmd == int32(F_GETOWN) { ret = int32(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_GETOWN_EX)), int64(bp))) @@ -25783,7 +25781,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return int32(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))) } if ret != 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*(*Tf_owner_ex)(unsafe.Pointer(bp))).Ftype1 == int32(F_OWNER_PGRP) { v1 = -(*(*Tf_owner_ex)(unsafe.Pointer(bp))).Fpid @@ -25793,25 +25791,25 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return v1 } if cmd == int32(F_DUPFD_CLOEXEC) { - ret1 = int32(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), Int64FromUint64(arg))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall3(tls, int64(__NR3264_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } ret1 = int32(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(Int32FromInt32(0)))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall1(tls, int64(SYS_close), int64(ret1)) } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - ret1 = int32(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), Int64FromUint64(arg))) if ret1 >= 0 { X__syscall3(tls, int64(__NR3264_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } switch cmd { case int32(F_SETLK): @@ -25821,9 +25819,9 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { case int32(F_GETOWN_EX): fallthrough case int32(F_SETOWN_EX): - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) default: - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(cmd), int64(arg))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(cmd), Int64FromUint64(arg))))) } return r } @@ -25843,11 +25841,11 @@ func Xopen(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) { mode = VaUint32(&ap) _ = ap } - fd = int32(___syscall_cp(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0)) + fd = int32(___syscall_cp(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0)) if fd >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(fd))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd))) } func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r int32) { @@ -25864,7 +25862,7 @@ func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r i mode = VaUint32(&ap) _ = ap } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0)))) } func Xposix_fadvise(tls *TLS, fd int32, base Toff_t, len1 Toff_t, advice int32) (r int32) { @@ -25960,7 +25958,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -25971,18 +25969,18 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__shgetc(tls, f) } c = v4 - if uint32(c-int32('0')) >= uint32(10) && pok != 0 { + if Uint32FromInt32(c-int32('0')) >= uint32(10) && pok != 0 { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } } } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -25990,7 +25988,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } x = 0 for { - if !(uint32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { break } x = int32(10)*x + c - int32('0') @@ -26001,7 +25999,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v12 = f + 8 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__shgetc(tls, f) } @@ -26009,7 +26007,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } y = int64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { break } y = int64(10)*y + int64(c) - int64('0') @@ -26020,14 +26018,14 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 } for { - if !(uint32(c-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10)) { break } goto _17 @@ -26037,7 +26035,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v20 = f + 8 v19 = *(*uintptr)(unsafe.Pointer(v20)) *(*uintptr)(unsafe.Pointer(v20))++ - v18 = int32(*(*uint8)(unsafe.Pointer(v19))) + v18 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) } else { v18 = X__shgetc(tls, f) } @@ -26090,7 +26088,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } @@ -26102,7 +26100,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v8 = f + 8 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ - v6 = int32(*(*uint8)(unsafe.Pointer(v7))) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v7))) } else { v6 = X__shgetc(tls, f) } @@ -26120,7 +26118,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } @@ -26129,7 +26127,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0] = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || c == int32('.')) { break } if c == int32('.') { @@ -26145,9 +26143,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, lnz = int32(dc) } if j != 0 { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(c) - uint32('0') + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + Uint32FromInt32(c) - uint32('0') } else { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(c - int32('0')) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = Uint32FromInt32(c - int32('0')) } j++ v13 = j @@ -26171,7 +26169,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } @@ -26279,9 +26277,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % uint32(p10) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/uint32(p10) + carry - carry = uint32(int32(1000000000)/p10) * tmp + tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % Uint32FromInt32(p10) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/Uint32FromInt32(p10) + carry + carry = Uint32FromInt32(int32(1000000000)/p10) * tmp if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) rp -= int32(9) @@ -26368,9 +26366,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp2 = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] & uint32(int32(1)<>sh + carry2 - carry2 = uint32(Int32FromInt32(1000000000)>>sh) * tmp2 + carry2 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh) * tmp2 if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) i-- @@ -26503,7 +26501,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26521,7 +26519,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__shgetc(tls, f) } @@ -26533,7 +26531,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26552,7 +26550,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26561,7 +26559,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } } for { - if !(uint32(c-int32('0')) < uint32(10) || uint32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { break } if c == int32('.') { @@ -26578,7 +26576,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 d = c - int32('0') } if dc < int64(8) { - x = x*uint32(16) + uint32(d) + x = x*uint32(16) + Uint32FromInt32(d) } else { if dc < int64(Int32FromInt32(LDBL_MANT_DIG)/Int32FromInt32(4)+Int32FromInt32(1)) { scale /= Float64FromInt32(16) @@ -26599,7 +26597,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v18 = f + 8 v17 = *(*uintptr)(unsafe.Pointer(v18)) *(*uintptr)(unsafe.Pointer(v18))++ - v16 = int32(*(*uint8)(unsafe.Pointer(v17))) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) } else { v16 = X__shgetc(tls, f) } @@ -26719,14 +26717,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -26739,7 +26737,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26755,7 +26753,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26799,7 +26797,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v21 = f + 8 v20 = *(*uintptr)(unsafe.Pointer(v21)) *(*uintptr)(unsafe.Pointer(v21))++ - v19 = int32(*(*uint8)(unsafe.Pointer(v20))) + v19 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v20))) } else { v19 = X__shgetc(tls, f) } @@ -26816,7 +26814,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v24 = f + 8 v23 = *(*uintptr)(unsafe.Pointer(v24)) *(*uintptr)(unsafe.Pointer(v24))++ - v22 = int32(*(*uint8)(unsafe.Pointer(v23))) + v22 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) } else { v22 = X__shgetc(tls, f) } @@ -26832,12 +26830,12 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v29 = f + 8 v28 = *(*uintptr)(unsafe.Pointer(v29)) *(*uintptr)(unsafe.Pointer(v29))++ - v27 = int32(*(*uint8)(unsafe.Pointer(v28))) + v27 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) } else { v27 = X__shgetc(tls, f) } c = v27 - if uint32(c-int32('0')) < uint32(10) || uint32(c-int32('A')) < uint32(26) || uint32(c-int32('a')) < uint32(26) || c == int32('_') { + if Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c-int32('A')) < uint32(26) || Uint32FromInt32(c-int32('a')) < uint32(26) || c == int32('_') { goto _26 } if c == int32(')') { @@ -26882,7 +26880,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v36 = f + 8 v35 = *(*uintptr)(unsafe.Pointer(v36)) *(*uintptr)(unsafe.Pointer(v36))++ - v34 = int32(*(*uint8)(unsafe.Pointer(v35))) + v34 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v35))) } else { v34 = X__shgetc(tls, f) } @@ -26902,55 +26900,55 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { // // /* Lookup table for digit values. -1==255>=36 -> invalid */ var _table6 = [257]uint8{ - 0: uint8(-Int32FromInt32(1)), - 1: uint8(-Int32FromInt32(1)), - 2: uint8(-Int32FromInt32(1)), - 3: uint8(-Int32FromInt32(1)), - 4: uint8(-Int32FromInt32(1)), - 5: uint8(-Int32FromInt32(1)), - 6: uint8(-Int32FromInt32(1)), - 7: uint8(-Int32FromInt32(1)), - 8: uint8(-Int32FromInt32(1)), - 9: uint8(-Int32FromInt32(1)), - 10: uint8(-Int32FromInt32(1)), - 11: uint8(-Int32FromInt32(1)), - 12: uint8(-Int32FromInt32(1)), - 13: uint8(-Int32FromInt32(1)), - 14: uint8(-Int32FromInt32(1)), - 15: uint8(-Int32FromInt32(1)), - 16: uint8(-Int32FromInt32(1)), - 17: uint8(-Int32FromInt32(1)), - 18: uint8(-Int32FromInt32(1)), - 19: uint8(-Int32FromInt32(1)), - 20: uint8(-Int32FromInt32(1)), - 21: uint8(-Int32FromInt32(1)), - 22: uint8(-Int32FromInt32(1)), - 23: uint8(-Int32FromInt32(1)), - 24: uint8(-Int32FromInt32(1)), - 25: uint8(-Int32FromInt32(1)), - 26: uint8(-Int32FromInt32(1)), - 27: uint8(-Int32FromInt32(1)), - 28: uint8(-Int32FromInt32(1)), - 29: uint8(-Int32FromInt32(1)), - 30: uint8(-Int32FromInt32(1)), - 31: uint8(-Int32FromInt32(1)), - 32: uint8(-Int32FromInt32(1)), - 33: uint8(-Int32FromInt32(1)), - 34: uint8(-Int32FromInt32(1)), - 35: uint8(-Int32FromInt32(1)), - 36: uint8(-Int32FromInt32(1)), - 37: uint8(-Int32FromInt32(1)), - 38: uint8(-Int32FromInt32(1)), - 39: uint8(-Int32FromInt32(1)), - 40: uint8(-Int32FromInt32(1)), - 41: uint8(-Int32FromInt32(1)), - 42: uint8(-Int32FromInt32(1)), - 43: uint8(-Int32FromInt32(1)), - 44: uint8(-Int32FromInt32(1)), - 45: uint8(-Int32FromInt32(1)), - 46: uint8(-Int32FromInt32(1)), - 47: uint8(-Int32FromInt32(1)), - 48: uint8(-Int32FromInt32(1)), + 0: Uint8FromInt32(-Int32FromInt32(1)), + 1: Uint8FromInt32(-Int32FromInt32(1)), + 2: Uint8FromInt32(-Int32FromInt32(1)), + 3: Uint8FromInt32(-Int32FromInt32(1)), + 4: Uint8FromInt32(-Int32FromInt32(1)), + 5: Uint8FromInt32(-Int32FromInt32(1)), + 6: Uint8FromInt32(-Int32FromInt32(1)), + 7: Uint8FromInt32(-Int32FromInt32(1)), + 8: Uint8FromInt32(-Int32FromInt32(1)), + 9: Uint8FromInt32(-Int32FromInt32(1)), + 10: Uint8FromInt32(-Int32FromInt32(1)), + 11: Uint8FromInt32(-Int32FromInt32(1)), + 12: Uint8FromInt32(-Int32FromInt32(1)), + 13: Uint8FromInt32(-Int32FromInt32(1)), + 14: Uint8FromInt32(-Int32FromInt32(1)), + 15: Uint8FromInt32(-Int32FromInt32(1)), + 16: Uint8FromInt32(-Int32FromInt32(1)), + 17: Uint8FromInt32(-Int32FromInt32(1)), + 18: Uint8FromInt32(-Int32FromInt32(1)), + 19: Uint8FromInt32(-Int32FromInt32(1)), + 20: Uint8FromInt32(-Int32FromInt32(1)), + 21: Uint8FromInt32(-Int32FromInt32(1)), + 22: Uint8FromInt32(-Int32FromInt32(1)), + 23: Uint8FromInt32(-Int32FromInt32(1)), + 24: Uint8FromInt32(-Int32FromInt32(1)), + 25: Uint8FromInt32(-Int32FromInt32(1)), + 26: Uint8FromInt32(-Int32FromInt32(1)), + 27: Uint8FromInt32(-Int32FromInt32(1)), + 28: Uint8FromInt32(-Int32FromInt32(1)), + 29: Uint8FromInt32(-Int32FromInt32(1)), + 30: Uint8FromInt32(-Int32FromInt32(1)), + 31: Uint8FromInt32(-Int32FromInt32(1)), + 32: Uint8FromInt32(-Int32FromInt32(1)), + 33: Uint8FromInt32(-Int32FromInt32(1)), + 34: Uint8FromInt32(-Int32FromInt32(1)), + 35: Uint8FromInt32(-Int32FromInt32(1)), + 36: Uint8FromInt32(-Int32FromInt32(1)), + 37: Uint8FromInt32(-Int32FromInt32(1)), + 38: Uint8FromInt32(-Int32FromInt32(1)), + 39: Uint8FromInt32(-Int32FromInt32(1)), + 40: Uint8FromInt32(-Int32FromInt32(1)), + 41: Uint8FromInt32(-Int32FromInt32(1)), + 42: Uint8FromInt32(-Int32FromInt32(1)), + 43: Uint8FromInt32(-Int32FromInt32(1)), + 44: Uint8FromInt32(-Int32FromInt32(1)), + 45: Uint8FromInt32(-Int32FromInt32(1)), + 46: Uint8FromInt32(-Int32FromInt32(1)), + 47: Uint8FromInt32(-Int32FromInt32(1)), + 48: Uint8FromInt32(-Int32FromInt32(1)), 50: uint8(1), 51: uint8(2), 52: uint8(3), @@ -26960,13 +26958,13 @@ var _table6 = [257]uint8{ 56: uint8(7), 57: uint8(8), 58: uint8(9), - 59: uint8(-Int32FromInt32(1)), - 60: uint8(-Int32FromInt32(1)), - 61: uint8(-Int32FromInt32(1)), - 62: uint8(-Int32FromInt32(1)), - 63: uint8(-Int32FromInt32(1)), - 64: uint8(-Int32FromInt32(1)), - 65: uint8(-Int32FromInt32(1)), + 59: Uint8FromInt32(-Int32FromInt32(1)), + 60: Uint8FromInt32(-Int32FromInt32(1)), + 61: Uint8FromInt32(-Int32FromInt32(1)), + 62: Uint8FromInt32(-Int32FromInt32(1)), + 63: Uint8FromInt32(-Int32FromInt32(1)), + 64: Uint8FromInt32(-Int32FromInt32(1)), + 65: Uint8FromInt32(-Int32FromInt32(1)), 66: uint8(10), 67: uint8(11), 68: uint8(12), @@ -26993,12 +26991,12 @@ var _table6 = [257]uint8{ 89: uint8(33), 90: uint8(34), 91: uint8(35), - 92: uint8(-Int32FromInt32(1)), - 93: uint8(-Int32FromInt32(1)), - 94: uint8(-Int32FromInt32(1)), - 95: uint8(-Int32FromInt32(1)), - 96: uint8(-Int32FromInt32(1)), - 97: uint8(-Int32FromInt32(1)), + 92: Uint8FromInt32(-Int32FromInt32(1)), + 93: Uint8FromInt32(-Int32FromInt32(1)), + 94: Uint8FromInt32(-Int32FromInt32(1)), + 95: Uint8FromInt32(-Int32FromInt32(1)), + 96: Uint8FromInt32(-Int32FromInt32(1)), + 97: Uint8FromInt32(-Int32FromInt32(1)), 98: uint8(10), 99: uint8(11), 100: uint8(12), @@ -27025,139 +27023,139 @@ var _table6 = [257]uint8{ 121: uint8(33), 122: uint8(34), 123: uint8(35), - 124: uint8(-Int32FromInt32(1)), - 125: uint8(-Int32FromInt32(1)), - 126: uint8(-Int32FromInt32(1)), - 127: uint8(-Int32FromInt32(1)), - 128: uint8(-Int32FromInt32(1)), - 129: uint8(-Int32FromInt32(1)), - 130: uint8(-Int32FromInt32(1)), - 131: uint8(-Int32FromInt32(1)), - 132: uint8(-Int32FromInt32(1)), - 133: uint8(-Int32FromInt32(1)), - 134: uint8(-Int32FromInt32(1)), - 135: uint8(-Int32FromInt32(1)), - 136: uint8(-Int32FromInt32(1)), - 137: uint8(-Int32FromInt32(1)), - 138: uint8(-Int32FromInt32(1)), - 139: uint8(-Int32FromInt32(1)), - 140: uint8(-Int32FromInt32(1)), - 141: uint8(-Int32FromInt32(1)), - 142: uint8(-Int32FromInt32(1)), - 143: uint8(-Int32FromInt32(1)), - 144: uint8(-Int32FromInt32(1)), - 145: uint8(-Int32FromInt32(1)), - 146: uint8(-Int32FromInt32(1)), - 147: uint8(-Int32FromInt32(1)), - 148: uint8(-Int32FromInt32(1)), - 149: uint8(-Int32FromInt32(1)), - 150: uint8(-Int32FromInt32(1)), - 151: uint8(-Int32FromInt32(1)), - 152: uint8(-Int32FromInt32(1)), - 153: uint8(-Int32FromInt32(1)), - 154: uint8(-Int32FromInt32(1)), - 155: uint8(-Int32FromInt32(1)), - 156: uint8(-Int32FromInt32(1)), - 157: uint8(-Int32FromInt32(1)), - 158: uint8(-Int32FromInt32(1)), - 159: uint8(-Int32FromInt32(1)), - 160: uint8(-Int32FromInt32(1)), - 161: uint8(-Int32FromInt32(1)), - 162: uint8(-Int32FromInt32(1)), - 163: uint8(-Int32FromInt32(1)), - 164: uint8(-Int32FromInt32(1)), - 165: uint8(-Int32FromInt32(1)), - 166: uint8(-Int32FromInt32(1)), - 167: uint8(-Int32FromInt32(1)), - 168: uint8(-Int32FromInt32(1)), - 169: uint8(-Int32FromInt32(1)), - 170: uint8(-Int32FromInt32(1)), - 171: uint8(-Int32FromInt32(1)), - 172: uint8(-Int32FromInt32(1)), - 173: uint8(-Int32FromInt32(1)), - 174: uint8(-Int32FromInt32(1)), - 175: uint8(-Int32FromInt32(1)), - 176: uint8(-Int32FromInt32(1)), - 177: uint8(-Int32FromInt32(1)), - 178: uint8(-Int32FromInt32(1)), - 179: uint8(-Int32FromInt32(1)), - 180: uint8(-Int32FromInt32(1)), - 181: uint8(-Int32FromInt32(1)), - 182: uint8(-Int32FromInt32(1)), - 183: uint8(-Int32FromInt32(1)), - 184: uint8(-Int32FromInt32(1)), - 185: uint8(-Int32FromInt32(1)), - 186: uint8(-Int32FromInt32(1)), - 187: uint8(-Int32FromInt32(1)), - 188: uint8(-Int32FromInt32(1)), - 189: uint8(-Int32FromInt32(1)), - 190: uint8(-Int32FromInt32(1)), - 191: uint8(-Int32FromInt32(1)), - 192: uint8(-Int32FromInt32(1)), - 193: uint8(-Int32FromInt32(1)), - 194: uint8(-Int32FromInt32(1)), - 195: uint8(-Int32FromInt32(1)), - 196: uint8(-Int32FromInt32(1)), - 197: uint8(-Int32FromInt32(1)), - 198: uint8(-Int32FromInt32(1)), - 199: uint8(-Int32FromInt32(1)), - 200: uint8(-Int32FromInt32(1)), - 201: uint8(-Int32FromInt32(1)), - 202: uint8(-Int32FromInt32(1)), - 203: uint8(-Int32FromInt32(1)), - 204: uint8(-Int32FromInt32(1)), - 205: uint8(-Int32FromInt32(1)), - 206: uint8(-Int32FromInt32(1)), - 207: uint8(-Int32FromInt32(1)), - 208: uint8(-Int32FromInt32(1)), - 209: uint8(-Int32FromInt32(1)), - 210: uint8(-Int32FromInt32(1)), - 211: uint8(-Int32FromInt32(1)), - 212: uint8(-Int32FromInt32(1)), - 213: uint8(-Int32FromInt32(1)), - 214: uint8(-Int32FromInt32(1)), - 215: uint8(-Int32FromInt32(1)), - 216: uint8(-Int32FromInt32(1)), - 217: uint8(-Int32FromInt32(1)), - 218: uint8(-Int32FromInt32(1)), - 219: uint8(-Int32FromInt32(1)), - 220: uint8(-Int32FromInt32(1)), - 221: uint8(-Int32FromInt32(1)), - 222: uint8(-Int32FromInt32(1)), - 223: uint8(-Int32FromInt32(1)), - 224: uint8(-Int32FromInt32(1)), - 225: uint8(-Int32FromInt32(1)), - 226: uint8(-Int32FromInt32(1)), - 227: uint8(-Int32FromInt32(1)), - 228: uint8(-Int32FromInt32(1)), - 229: uint8(-Int32FromInt32(1)), - 230: uint8(-Int32FromInt32(1)), - 231: uint8(-Int32FromInt32(1)), - 232: uint8(-Int32FromInt32(1)), - 233: uint8(-Int32FromInt32(1)), - 234: uint8(-Int32FromInt32(1)), - 235: uint8(-Int32FromInt32(1)), - 236: uint8(-Int32FromInt32(1)), - 237: uint8(-Int32FromInt32(1)), - 238: uint8(-Int32FromInt32(1)), - 239: uint8(-Int32FromInt32(1)), - 240: uint8(-Int32FromInt32(1)), - 241: uint8(-Int32FromInt32(1)), - 242: uint8(-Int32FromInt32(1)), - 243: uint8(-Int32FromInt32(1)), - 244: uint8(-Int32FromInt32(1)), - 245: uint8(-Int32FromInt32(1)), - 246: uint8(-Int32FromInt32(1)), - 247: uint8(-Int32FromInt32(1)), - 248: uint8(-Int32FromInt32(1)), - 249: uint8(-Int32FromInt32(1)), - 250: uint8(-Int32FromInt32(1)), - 251: uint8(-Int32FromInt32(1)), - 252: uint8(-Int32FromInt32(1)), - 253: uint8(-Int32FromInt32(1)), - 254: uint8(-Int32FromInt32(1)), - 255: uint8(-Int32FromInt32(1)), - 256: uint8(-Int32FromInt32(1)), + 124: Uint8FromInt32(-Int32FromInt32(1)), + 125: Uint8FromInt32(-Int32FromInt32(1)), + 126: Uint8FromInt32(-Int32FromInt32(1)), + 127: Uint8FromInt32(-Int32FromInt32(1)), + 128: Uint8FromInt32(-Int32FromInt32(1)), + 129: Uint8FromInt32(-Int32FromInt32(1)), + 130: Uint8FromInt32(-Int32FromInt32(1)), + 131: Uint8FromInt32(-Int32FromInt32(1)), + 132: Uint8FromInt32(-Int32FromInt32(1)), + 133: Uint8FromInt32(-Int32FromInt32(1)), + 134: Uint8FromInt32(-Int32FromInt32(1)), + 135: Uint8FromInt32(-Int32FromInt32(1)), + 136: Uint8FromInt32(-Int32FromInt32(1)), + 137: Uint8FromInt32(-Int32FromInt32(1)), + 138: Uint8FromInt32(-Int32FromInt32(1)), + 139: Uint8FromInt32(-Int32FromInt32(1)), + 140: Uint8FromInt32(-Int32FromInt32(1)), + 141: Uint8FromInt32(-Int32FromInt32(1)), + 142: Uint8FromInt32(-Int32FromInt32(1)), + 143: Uint8FromInt32(-Int32FromInt32(1)), + 144: Uint8FromInt32(-Int32FromInt32(1)), + 145: Uint8FromInt32(-Int32FromInt32(1)), + 146: Uint8FromInt32(-Int32FromInt32(1)), + 147: Uint8FromInt32(-Int32FromInt32(1)), + 148: Uint8FromInt32(-Int32FromInt32(1)), + 149: Uint8FromInt32(-Int32FromInt32(1)), + 150: Uint8FromInt32(-Int32FromInt32(1)), + 151: Uint8FromInt32(-Int32FromInt32(1)), + 152: Uint8FromInt32(-Int32FromInt32(1)), + 153: Uint8FromInt32(-Int32FromInt32(1)), + 154: Uint8FromInt32(-Int32FromInt32(1)), + 155: Uint8FromInt32(-Int32FromInt32(1)), + 156: Uint8FromInt32(-Int32FromInt32(1)), + 157: Uint8FromInt32(-Int32FromInt32(1)), + 158: Uint8FromInt32(-Int32FromInt32(1)), + 159: Uint8FromInt32(-Int32FromInt32(1)), + 160: Uint8FromInt32(-Int32FromInt32(1)), + 161: Uint8FromInt32(-Int32FromInt32(1)), + 162: Uint8FromInt32(-Int32FromInt32(1)), + 163: Uint8FromInt32(-Int32FromInt32(1)), + 164: Uint8FromInt32(-Int32FromInt32(1)), + 165: Uint8FromInt32(-Int32FromInt32(1)), + 166: Uint8FromInt32(-Int32FromInt32(1)), + 167: Uint8FromInt32(-Int32FromInt32(1)), + 168: Uint8FromInt32(-Int32FromInt32(1)), + 169: Uint8FromInt32(-Int32FromInt32(1)), + 170: Uint8FromInt32(-Int32FromInt32(1)), + 171: Uint8FromInt32(-Int32FromInt32(1)), + 172: Uint8FromInt32(-Int32FromInt32(1)), + 173: Uint8FromInt32(-Int32FromInt32(1)), + 174: Uint8FromInt32(-Int32FromInt32(1)), + 175: Uint8FromInt32(-Int32FromInt32(1)), + 176: Uint8FromInt32(-Int32FromInt32(1)), + 177: Uint8FromInt32(-Int32FromInt32(1)), + 178: Uint8FromInt32(-Int32FromInt32(1)), + 179: Uint8FromInt32(-Int32FromInt32(1)), + 180: Uint8FromInt32(-Int32FromInt32(1)), + 181: Uint8FromInt32(-Int32FromInt32(1)), + 182: Uint8FromInt32(-Int32FromInt32(1)), + 183: Uint8FromInt32(-Int32FromInt32(1)), + 184: Uint8FromInt32(-Int32FromInt32(1)), + 185: Uint8FromInt32(-Int32FromInt32(1)), + 186: Uint8FromInt32(-Int32FromInt32(1)), + 187: Uint8FromInt32(-Int32FromInt32(1)), + 188: Uint8FromInt32(-Int32FromInt32(1)), + 189: Uint8FromInt32(-Int32FromInt32(1)), + 190: Uint8FromInt32(-Int32FromInt32(1)), + 191: Uint8FromInt32(-Int32FromInt32(1)), + 192: Uint8FromInt32(-Int32FromInt32(1)), + 193: Uint8FromInt32(-Int32FromInt32(1)), + 194: Uint8FromInt32(-Int32FromInt32(1)), + 195: Uint8FromInt32(-Int32FromInt32(1)), + 196: Uint8FromInt32(-Int32FromInt32(1)), + 197: Uint8FromInt32(-Int32FromInt32(1)), + 198: Uint8FromInt32(-Int32FromInt32(1)), + 199: Uint8FromInt32(-Int32FromInt32(1)), + 200: Uint8FromInt32(-Int32FromInt32(1)), + 201: Uint8FromInt32(-Int32FromInt32(1)), + 202: Uint8FromInt32(-Int32FromInt32(1)), + 203: Uint8FromInt32(-Int32FromInt32(1)), + 204: Uint8FromInt32(-Int32FromInt32(1)), + 205: Uint8FromInt32(-Int32FromInt32(1)), + 206: Uint8FromInt32(-Int32FromInt32(1)), + 207: Uint8FromInt32(-Int32FromInt32(1)), + 208: Uint8FromInt32(-Int32FromInt32(1)), + 209: Uint8FromInt32(-Int32FromInt32(1)), + 210: Uint8FromInt32(-Int32FromInt32(1)), + 211: Uint8FromInt32(-Int32FromInt32(1)), + 212: Uint8FromInt32(-Int32FromInt32(1)), + 213: Uint8FromInt32(-Int32FromInt32(1)), + 214: Uint8FromInt32(-Int32FromInt32(1)), + 215: Uint8FromInt32(-Int32FromInt32(1)), + 216: Uint8FromInt32(-Int32FromInt32(1)), + 217: Uint8FromInt32(-Int32FromInt32(1)), + 218: Uint8FromInt32(-Int32FromInt32(1)), + 219: Uint8FromInt32(-Int32FromInt32(1)), + 220: Uint8FromInt32(-Int32FromInt32(1)), + 221: Uint8FromInt32(-Int32FromInt32(1)), + 222: Uint8FromInt32(-Int32FromInt32(1)), + 223: Uint8FromInt32(-Int32FromInt32(1)), + 224: Uint8FromInt32(-Int32FromInt32(1)), + 225: Uint8FromInt32(-Int32FromInt32(1)), + 226: Uint8FromInt32(-Int32FromInt32(1)), + 227: Uint8FromInt32(-Int32FromInt32(1)), + 228: Uint8FromInt32(-Int32FromInt32(1)), + 229: Uint8FromInt32(-Int32FromInt32(1)), + 230: Uint8FromInt32(-Int32FromInt32(1)), + 231: Uint8FromInt32(-Int32FromInt32(1)), + 232: Uint8FromInt32(-Int32FromInt32(1)), + 233: Uint8FromInt32(-Int32FromInt32(1)), + 234: Uint8FromInt32(-Int32FromInt32(1)), + 235: Uint8FromInt32(-Int32FromInt32(1)), + 236: Uint8FromInt32(-Int32FromInt32(1)), + 237: Uint8FromInt32(-Int32FromInt32(1)), + 238: Uint8FromInt32(-Int32FromInt32(1)), + 239: Uint8FromInt32(-Int32FromInt32(1)), + 240: Uint8FromInt32(-Int32FromInt32(1)), + 241: Uint8FromInt32(-Int32FromInt32(1)), + 242: Uint8FromInt32(-Int32FromInt32(1)), + 243: Uint8FromInt32(-Int32FromInt32(1)), + 244: Uint8FromInt32(-Int32FromInt32(1)), + 245: Uint8FromInt32(-Int32FromInt32(1)), + 246: Uint8FromInt32(-Int32FromInt32(1)), + 247: Uint8FromInt32(-Int32FromInt32(1)), + 248: Uint8FromInt32(-Int32FromInt32(1)), + 249: Uint8FromInt32(-Int32FromInt32(1)), + 250: Uint8FromInt32(-Int32FromInt32(1)), + 251: Uint8FromInt32(-Int32FromInt32(1)), + 252: Uint8FromInt32(-Int32FromInt32(1)), + 253: Uint8FromInt32(-Int32FromInt32(1)), + 254: Uint8FromInt32(-Int32FromInt32(1)), + 255: Uint8FromInt32(-Int32FromInt32(1)), + 256: Uint8FromInt32(-Int32FromInt32(1)), } func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint64) { @@ -27181,14 +27179,14 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -27201,7 +27199,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -27212,7 +27210,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ - v11 = int32(*(*uint8)(unsafe.Pointer(v12))) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) } else { v11 = X__shgetc(tls, f) } @@ -27222,12 +27220,12 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 - if int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -27262,10 +27260,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint if base == uint32(10) { x = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { break } - x = x*uint32(10) + uint32(c-Int32FromUint8('0')) + x = x*uint32(10) + Uint32FromInt32(c-Int32FromUint8('0')) goto _20 _20: ; @@ -27273,7 +27271,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v23 = f + 8 v22 = *(*uintptr)(unsafe.Pointer(v23)) *(*uintptr)(unsafe.Pointer(v23))++ - v21 = int32(*(*uint8)(unsafe.Pointer(v22))) + v21 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v22))) } else { v21 = X__shgetc(tls, f) } @@ -27281,10 +27279,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } y = uint64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(c-Int32FromUint8('0'))) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-Uint64FromInt32(c-Int32FromUint8('0'))) { break } - y = y*uint64(10) + uint64(c-Int32FromUint8('0')) + y = y*uint64(10) + Uint64FromInt32(c-Int32FromUint8('0')) goto _24 _24: ; @@ -27292,13 +27290,13 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v27 = f + 8 v26 = *(*uintptr)(unsafe.Pointer(v27)) *(*uintptr)(unsafe.Pointer(v27))++ - v25 = int32(*(*uint8)(unsafe.Pointer(v26))) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v26))) } else { v25 = X__shgetc(tls, f) } c = v25 } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { goto done } } else { @@ -27317,7 +27315,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } @@ -27336,7 +27334,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v35 = f + 8 v34 = *(*uintptr)(unsafe.Pointer(v35)) *(*uintptr)(unsafe.Pointer(v35))++ - v33 = int32(*(*uint8)(unsafe.Pointer(v34))) + v33 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v34))) } else { v33 = X__shgetc(tls, f) } @@ -27356,7 +27354,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ - v37 = int32(*(*uint8)(unsafe.Pointer(v38))) + v37 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v38))) } else { v37 = X__shgetc(tls, f) } @@ -27375,7 +27373,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v43 = f + 8 v42 = *(*uintptr)(unsafe.Pointer(v43)) *(*uintptr)(unsafe.Pointer(v43))++ - v41 = int32(*(*uint8)(unsafe.Pointer(v42))) + v41 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v42))) } else { v41 = X__shgetc(tls, f) } @@ -27395,7 +27393,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v47 = f + 8 v46 = *(*uintptr)(unsafe.Pointer(v47)) *(*uintptr)(unsafe.Pointer(v47))++ - v45 = int32(*(*uint8)(unsafe.Pointer(v46))) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v46))) } else { v45 = X__shgetc(tls, f) } @@ -27424,7 +27422,7 @@ done: } } } - return y ^ uint64(neg) - uint64(neg) + return y ^ Uint64FromInt32(neg) - Uint64FromInt32(neg) } func X__procfdname(tls *TLS, buf uintptr, fd uint32) { @@ -27469,7 +27467,7 @@ func X__procfdname(tls *TLS, buf uintptr, fd uint32) { } i-- v5 = i - *(*int8)(unsafe.Pointer(buf + uintptr(v5))) = int8(uint32('0') + fd%uint32(10)) + *(*int8)(unsafe.Pointer(buf + uintptr(v5))) = Int8FromUint32(uint32('0') + fd%uint32(10)) goto _4 _4: ; @@ -27524,7 +27522,7 @@ func X__shgetc(tls *TLS, f uintptr) (r int32) { } (*TFILE)(unsafe.Pointer(f)).Fshcnt = int64((*TFILE)(unsafe.Pointer(f)).Fbuf) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + cnt if (*TFILE)(unsafe.Pointer(f)).Frpos <= (*TFILE)(unsafe.Pointer(f)).Fbuf { - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = Uint8FromInt32(c) } return c } @@ -27535,10 +27533,10 @@ func X__syscall_ret(tls *TLS, r uint64) (r1 int64) { defer func() { trc("-> %v", r1) }() } if r > -Uint64FromUint64(4096) { - *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(-r) + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = Int32FromUint64(-r) return int64(-int32(1)) } - return int64(r) + return Int64FromUint64(r) } type TElf_Symndx = uint32 @@ -27610,7 +27608,7 @@ func Xftok(tls *TLS, path uintptr, id int32) (r Tkey_t) { if Xstat(tls, path, bp) < 0 { return -int32(1) } - return int32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ino&Uint64FromInt32(0xffff) | (*(*Tstat)(unsafe.Pointer(bp))).Fst_dev&Uint64FromInt32(0xff)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_msgget), int64(k), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_msgget), int64(k), int64(flag))))) } func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32) (r Tssize_t) { @@ -27685,7 +27683,7 @@ func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32 trc("tls=%v q=%v m=%v len1=%v type1=%v flag=%v, (%v:)", tls, q, m, len1, type1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msgrcv), int64(q), int64(m), int64(len1), type1, int64(flag), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msgrcv), int64(q), int64(m), Int64FromUint64(len1), type1, int64(flag), 0))) } func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { @@ -27693,7 +27691,7 @@ func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { trc("tls=%v q=%v m=%v len1=%v flag=%v, (%v:)", tls, q, m, len1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msgsnd), int64(q), int64(m), int64(len1), int64(flag), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msgsnd), int64(q), int64(m), Int64FromUint64(len1), int64(flag), 0, 0)))) } const GETALL = 13 @@ -27781,7 +27779,7 @@ func Xsemctl(tls *TLS, id int32, num int32, cmd int32, va uintptr) (r1 int32) { _ = ap } r = int32(X__syscall4(tls, int64(SYS_semctl), int64(id), int64(num), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(*(*uintptr)(unsafe.Pointer(bp))))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { @@ -27794,9 +27792,9 @@ func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { * n fits in the correct (per POSIX) userspace type, so * we have to check here. */ if n > int32(USHRT_MAX) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_semget), int64(key), int64(n), int64(fl))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_semget), int64(key), int64(n), int64(fl))))) } func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { @@ -27804,7 +27802,7 @@ func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { trc("tls=%v id=%v buf=%v n=%v, (%v:)", tls, id, buf, n, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_semop), int64(id), int64(buf), int64(n))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_semop), int64(id), int64(buf), Int64FromUint64(n))))) } const NO_TIME32 = 0 @@ -27838,7 +27836,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r int3 trc("tls=%v id=%v buf=%v n=%v ts=%v, (%v:)", tls, id, buf, n, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_semtimedop), int64(id), int64(buf), int64(n), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_semtimedop), int64(id), int64(buf), Int64FromUint64(n), int64(ts))))) } const SHMLBA = 4096 @@ -27910,7 +27908,7 @@ func Xshmat(tls *TLS, id int32, addr uintptr, flag int32) (r uintptr) { trc("tls=%v id=%v addr=%v flag=%v, (%v:)", tls, id, addr, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return uintptr(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_shmat), int64(id), int64(addr), int64(flag))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_shmat), int64(id), int64(addr), int64(flag))))) } func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { @@ -27921,7 +27919,7 @@ func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { var r int32 _ = r r = int32(X__syscall3(tls, int64(SYS_shmctl), int64(id), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(buf))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xshmdt(tls *TLS, addr uintptr) (r int32) { @@ -27929,7 +27927,7 @@ func Xshmdt(tls *TLS, addr uintptr) (r int32) { trc("tls=%v addr=%v, (%v:)", tls, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_shmdt), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_shmdt), int64(addr))))) } func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { @@ -27937,10 +27935,10 @@ func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { trc("tls=%v key=%v size=%v flag=%v, (%v:)", tls, key, size, flag, origin(2)) defer func() { trc("-> %v", r) }() } - if size > uint64(Int64FromInt64(INT64_MAX)) { + if size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { size = Uint64FromUint64(0xffffffffffffffff) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_shmget), int64(key), int64(size), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_shmget), int64(key), Int64FromUint64(size), int64(flag))))) } type Tpasswd = struct { @@ -28205,7 +28203,7 @@ func Xgetdtablesize(tls *TLS) (r int32) { } else { v1 = uint64(INT_MAX) } - return int32(v1) + return Int32FromUint64(v1) } func Xgetloadavg(tls *TLS, a uintptr, n int32) (r int32) { @@ -28249,7 +28247,7 @@ func Xgetpagesize(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__libc.Fpage_size) + return Int32FromUint64(X__libc.Fpage_size) } const B0 = 0 @@ -28436,16 +28434,16 @@ func Xgetpass(tls *TLS, prompt uintptr) (r uintptr) { } Xtcgetattr(tls, fd, bp+60) *(*Ttermios)(unsafe.Pointer(bp)) = *(*Ttermios)(unsafe.Pointer(bp + 60)) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag |= uint32(ICANON) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= uint32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= Uint32FromInt32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag |= uint32(ICRNL) Xtcsetattr(tls, fd, int32(TCSAFLUSH), bp+60) Xtcdrain(tls, fd) Xdprintf(tls, fd, __ccgo_ts+15, VaList(bp+128, prompt)) l = Xread(tls, fd, uintptr(unsafe.Pointer(&_password)), uint64(128)) if l >= 0 { - if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || uint64(l) == uint64(128) { + if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || Uint64FromInt64(l) == uint64(128) { l-- } _password[l] = 0 @@ -28685,12 +28683,12 @@ func Xulimit(tls *TLS, cmd int32, va uintptr) (r int64) { ap = va val = VaInt64(&ap) _ = ap - (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * uint64(val) + (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * Uint64FromInt64(val) if Xsetrlimit(tls, int32(RLIMIT_FSIZE), bp) != 0 { return int64(-int32(1)) } } - return int64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) + return Int64FromUint64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) } const BOOT_TIME = 2 @@ -28959,7 +28957,7 @@ func Xbrk(tls *TLS, end uintptr) (r int32) { trc("tls=%v end=%v, (%v:)", tls, end, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -28967,7 +28965,7 @@ func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) } func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -28975,7 +28973,7 @@ func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) } func Xchroot(tls *TLS, path uintptr) (r int32) { @@ -28983,7 +28981,7 @@ func Xchroot(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) } type Tktimex64 = struct { @@ -29102,12 +29100,12 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Fstbcnt = (*(*Tktimex)(unsafe.Pointer(bp))).Fstbcnt (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex)(unsafe.Pointer(bp))).Ftai } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } if clock_id == CLOCK_REALTIME { - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) } func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -29115,7 +29113,7 @@ func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_o trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } const EPOLLERR = 8 @@ -29168,7 +29166,7 @@ func Xepoll_create(tls *TLS, size int32) (r int32) { defer func() { trc("-> %v", r) }() } if size <= 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } return Xepoll_create1(tls, 0) } @@ -29181,7 +29179,7 @@ func Xepoll_create1(tls *TLS, flags int32) (r1 int32) { var r int32 _ = r r = int32(X__syscall1(tls, int64(SYS_epoll_create1), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { @@ -29189,7 +29187,7 @@ func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { trc("tls=%v fd=%v op=%v fd2=%v ev=%v, (%v:)", tls, fd, op, fd2, ev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) } func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uintptr) (r1 int32) { @@ -29200,7 +29198,7 @@ func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uint var r int32 _ = r r = int32(___syscall_cp(tls, int64(SYS_epoll_pwait), int64(fd), int64(ev), int64(cnt), int64(to), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_wait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32) (r int32) { @@ -29224,8 +29222,8 @@ func Xeventfd(tls *TLS, count uint32, flags int32) (r1 int32) { } var r int32 _ = r - r = int32(X__syscall2(tls, int64(SYS_eventfd2), int64(count), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + r = int32(X__syscall2(tls, int64(SYS_eventfd2), Int64FromUint32(count), int64(flags))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { @@ -29235,7 +29233,7 @@ func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { } var v1 int32 _ = v1 - if uint64(8) == uint64(Xread(tls, fd, value, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xread(tls, fd, value, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29253,7 +29251,7 @@ func Xeventfd_write(tls *TLS, fd int32, _value Teventfd_t) (r int32) { *(*Teventfd_t)(unsafe.Pointer(bp)) = _value var v1 int32 _ = v1 - if uint64(8) == uint64(Xwrite(tls, fd, bp, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xwrite(tls, fd, bp, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29266,7 +29264,7 @@ func Xfallocate(tls *TLS, fd int32, mode int32, base Toff_t, len1 Toff_t) (r int trc("tls=%v fd=%v mode=%v base=%v len1=%v, (%v:)", tls, fd, mode, base, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) } const FANOTIFY_METADATA_VERSION = 3 @@ -29411,7 +29409,7 @@ func Xfanotify_init(tls *TLS, flags uint32, event_f_flags uint32) (r int32) { trc("tls=%v flags=%v event_f_flags=%v, (%v:)", tls, flags, event_f_flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fanotify_init), int64(flags), int64(event_f_flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fanotify_init), Int64FromUint32(flags), Int64FromUint32(event_f_flags))))) } func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd int32, pathname uintptr) (r int32) { @@ -29419,7 +29417,7 @@ func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd trc("tls=%v fanotify_fd=%v flags=%v mask=%v dfd=%v pathname=%v, (%v:)", tls, fanotify_fd, flags, mask, dfd, pathname, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), int64(flags), int64(mask), int64(dfd), int64(pathname))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), Int64FromUint32(flags), Int64FromUint64(mask), int64(dfd), int64(pathname))))) } const LOCK_EX = 2 @@ -29432,7 +29430,7 @@ func Xflock(tls *TLS, fd int32, op int32) (r int32) { trc("tls=%v fd=%v op=%v, (%v:)", tls, fd, op, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) } func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { @@ -29443,7 +29441,7 @@ func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if len1 > uint64(INT_MAX) { len1 = uint64(INT_MAX) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), Int64FromUint64(len1))))) } const GRND_INSECURE = 4 @@ -29455,7 +29453,7 @@ func Xgetrandom(tls *TLS, buf uintptr, buflen Tsize_t, flags uint32) (r Tssize_t trc("tls=%v buf=%v buflen=%v flags=%v, (%v:)", tls, buf, buflen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), int64(buflen), int64(flags), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), Int64FromUint64(buflen), Int64FromUint32(flags), 0, 0, 0))) } const IN_ACCESS = 1 @@ -29509,7 +29507,7 @@ func Xinotify_init1(tls *TLS, flags int32) (r1 int32) { var r int32 _ = r r = int32(X__syscall1(tls, int64(SYS_inotify_init1), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r int32) { @@ -29517,7 +29515,7 @@ func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r trc("tls=%v fd=%v pathname=%v mask=%v, (%v:)", tls, fd, pathname, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), int64(mask))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), Int64FromUint32(mask))))) } func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { @@ -29525,7 +29523,7 @@ func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { trc("tls=%v fd=%v wd=%v, (%v:)", tls, fd, wd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) } func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { @@ -29533,7 +29531,7 @@ func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { trc("tls=%v type1=%v buf=%v len1=%v, (%v:)", tls, type1, buf, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) } const MADV_COLD = 20 @@ -29571,7 +29569,7 @@ func Xmemfd_create(tls *TLS, name uintptr, flags uint32) (r int32) { trc("tls=%v name=%v flags=%v, (%v:)", tls, name, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), Int64FromUint32(flags))))) } func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { @@ -29582,7 +29580,7 @@ func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { if flags == uint32(0) { return Xmlock(tls, addr, len1) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), int64(len1), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), Int64FromUint64(len1), Int64FromUint32(flags))))) } func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { @@ -29590,7 +29588,7 @@ func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { trc("tls=%v a=%v b=%v c=%v, (%v:)", tls, a, b, c, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_init_module), int64(a), int64(b), int64(c))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_init_module), int64(a), Int64FromUint64(b), int64(c))))) } func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { @@ -29598,7 +29596,7 @@ func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_delete_module), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_delete_module), int64(a), Int64FromUint32(b))))) } const BLKBSZGET = 2147488368 @@ -29847,7 +29845,7 @@ func Xmount(tls *TLS, special uintptr, dir uintptr, fstype uintptr, flags uint64 trc("tls=%v special=%v dir=%v fstype=%v flags=%v data=%v, (%v:)", tls, special, dir, fstype, flags, data, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), int64(flags), int64(data))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), Int64FromUint64(flags), int64(data))))) } func Xumount(tls *TLS, special uintptr) (r int32) { @@ -29855,7 +29853,7 @@ func Xumount(tls *TLS, special uintptr) (r int32) { trc("tls=%v special=%v, (%v:)", tls, special, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) } func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { @@ -29863,7 +29861,7 @@ func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { trc("tls=%v special=%v flags=%v, (%v:)", tls, special, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) } func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, mount_id uintptr, flags int32) (r int32) { @@ -29871,7 +29869,7 @@ func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, trc("tls=%v dirfd=%v pathname=%v handle=%v mount_id=%v flags=%v, (%v:)", tls, dirfd, pathname, handle, mount_id, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) } func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) (r int32) { @@ -29879,7 +29877,7 @@ func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) ( trc("tls=%v mount_fd=%v handle=%v flags=%v, (%v:)", tls, mount_fd, handle, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) } const ADDR_COMPAT_LAYOUT = 2097152 @@ -29922,7 +29920,7 @@ func Xpersonality(tls *TLS, persona uint64) (r int32) { trc("tls=%v persona=%v, (%v:)", tls, persona, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_personality), int64(persona))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_personality), Int64FromUint64(persona))))) } func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { @@ -29930,7 +29928,7 @@ func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { trc("tls=%v new1=%v old=%v, (%v:)", tls, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) } const PR_CAPBSET_DROP = 24 @@ -30107,7 +30105,7 @@ func Xprctl(tls *TLS, op int32, va uintptr) (r int32) { i++ } _ = ap - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_prctl), int64(op), int64(x[0]), int64(x[int32(1)]), int64(x[int32(2)]), int64(x[int32(3)]))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_prctl), int64(op), Int64FromUint64(x[0]), Int64FromUint64(x[int32(1)]), Int64FromUint64(x[int32(2)]), Int64FromUint64(x[int32(3)]))))) } const RWF_APPEND = 16 @@ -30126,9 +30124,9 @@ func Xpreadv2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags in if ofs == int64(-int32(1)) { return Xreadv(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit uintptr) (r1 int32) { @@ -30151,7 +30149,7 @@ func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit } new_limit = bp } - r = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) if !(r != 0) && old_limit != 0 && Bool(^Uint64FromUint64(0) != ^Uint64FromUint64(0)) { if (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur = ^Uint64FromUint64(0) @@ -30168,7 +30166,7 @@ func Xprocess_vm_writev(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec uintptr, riovcnt uint64, flags uint64) (r Tssize_t) { @@ -30176,7 +30174,7 @@ func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } const PTRACE_ATTACH = 16 @@ -30325,11 +30323,11 @@ func Xptrace(tls *TLS, req int32, va uintptr) (r int64) { data = VaUintptr(&ap) /* PTRACE_{READ,WRITE}{DATA,TEXT} (16...19) are specific to SPARC. */ _ = ap - if uint32(req)-uint32(1) < uint32(3) { + if Uint32FromInt32(req)-uint32(1) < uint32(3) { data = bp } - ret = X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) - if ret < 0 || uint32(req)-uint32(1) >= uint32(3) { + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) + if ret < 0 || Uint32FromInt32(req)-uint32(1) >= uint32(3) { return ret } return *(*int64)(unsafe.Pointer(bp)) @@ -30344,9 +30342,9 @@ func Xpwritev2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags i if ofs == int64(-int32(1)) { return Xwritev(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } const GRPQUOTA = 1 @@ -30412,7 +30410,7 @@ func Xquotactl(tls *TLS, cmd int32, special uintptr, id int32, addr uintptr) (r trc("tls=%v cmd=%v special=%v id=%v addr=%v, (%v:)", tls, cmd, special, id, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) } func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { @@ -30420,7 +30418,7 @@ func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v pos=%v len1=%v, (%v:)", tls, fd, pos, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, int64(len1)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, Int64FromUint64(len1)))) } const RB_AUTOBOOT = 19088743 @@ -30436,7 +30434,7 @@ func Xreboot(tls *TLS, type1 int32) (r int32) { trc("tls=%v type1=%v, (%v:)", tls, type1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_reboot), int64(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_reboot), Int64FromUint32(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) } func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff Tsize_t, flags int32) (r int32) { @@ -30444,7 +30442,7 @@ func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff T trc("tls=%v addr=%v size=%v prot=%v pgoff=%v flags=%v, (%v:)", tls, addr, size, prot, pgoff, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), int64(size), int64(prot), int64(pgoff), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), Int64FromUint64(size), int64(prot), Int64FromUint64(pgoff), int64(flags))))) } func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { @@ -30453,7 +30451,7 @@ func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { defer func() { trc("-> %v", r) }() } if inc != 0 { - return uintptr(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return uintptr(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } return uintptr(X__syscall1(tls, int64(SYS_brk), int64(Int32FromInt32(0)))) } @@ -30463,7 +30461,7 @@ func Xsendfile(tls *TLS, out_fd int32, in_fd int32, ofs uintptr, count Tsize_t) trc("tls=%v out_fd=%v in_fd=%v ofs=%v count=%v, (%v:)", tls, out_fd, in_fd, ofs, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(__NR3264_sendfile), int64(out_fd), int64(in_fd), int64(ofs), int64(count)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(__NR3264_sendfile), int64(out_fd), int64(in_fd), int64(ofs), Int64FromUint64(count)))) } func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { @@ -30471,7 +30469,7 @@ func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsgid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsgid), Int64FromUint32(gid))))) } func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { @@ -30479,7 +30477,7 @@ func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsuid), int64(uid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsuid), Int64FromUint32(uid))))) } func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -30487,7 +30485,7 @@ func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sethostname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sethostname), int64(name), Int64FromUint64(len1))))) } const CLONE_CHILD_CLEARTID = 2097152 @@ -30527,7 +30525,7 @@ func Xsetns(tls *TLS, fd int32, nstype int32) (r int32) { trc("tls=%v fd=%v nstype=%v, (%v:)", tls, fd, nstype, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) } const __tm_gmtoff = 0 @@ -30557,8 +30555,8 @@ func Xsettimeofday(tls *TLS, tv uintptr, tz uintptr) (r int32) { if !(tv != 0) { return 0 } - if uint64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ Ftv_sec: (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec, @@ -30603,7 +30601,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { var ret int32 _ = ret ret = int32(X__syscall4(tls, int64(SYS_signalfd4), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), int64(flags))) - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -30611,7 +30609,7 @@ func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintpt trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx uintptr) (r int32) { @@ -30624,10 +30622,10 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u var ret int32 var _ /* st at bp+0 */ Tstat _ = ret - ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), int64(mask), int64(stx))) - return int32(X__syscall_ret(tls, uint64(ret))) + ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), Int64FromUint32(mask), int64(stx))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } ret = Xfstatat(tls, dirfd, path, bp, flags) if ret != 0 { @@ -30640,15 +30638,15 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u (*Tstatx)(unsafe.Pointer(stx)).Fstx_nlink = (*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink (*Tstatx)(unsafe.Pointer(stx)).Fstx_uid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_uid (*Tstatx)(unsafe.Pointer(stx)).Fstx_gid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_gid - (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_btime = Tstatx_timestamp{} (*Tstatx)(unsafe.Pointer(stx)).Fstx_mask = uint32(0x7ff) return 0 @@ -30678,7 +30676,7 @@ func Xswapon(tls *TLS, path uintptr, flags int32) (r int32) { trc("tls=%v path=%v flags=%v, (%v:)", tls, path, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) } func Xswapoff(tls *TLS, path uintptr) (r int32) { @@ -30686,7 +30684,7 @@ func Xswapoff(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) } func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) (r int32) { @@ -30694,7 +30692,7 @@ func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) trc("tls=%v fd=%v pos=%v len1=%v flags=%v, (%v:)", tls, fd, pos, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, Int64FromUint32(flags))))) } func Xsyncfs(tls *TLS, fd int32) (r int32) { @@ -30702,7 +30700,7 @@ func Xsyncfs(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) } func X__lsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30710,7 +30708,7 @@ func X__lsysinfo(tls *TLS, info uintptr) (r int32) { trc("tls=%v info=%v, (%v:)", tls, info, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) } func Xsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30726,7 +30724,7 @@ func Xtee(tls *TLS, src int32, dest int32, len1 Tsize_t, flags uint32) (r Tssize trc("tls=%v src=%v dest=%v len1=%v flags=%v, (%v:)", tls, src, dest, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), Int64FromUint64(len1), Int64FromUint32(flags)))) } const TFD_CLOEXEC = 524288 @@ -30739,7 +30737,7 @@ func Xtimerfd_create(tls *TLS, clockid int32, flags int32) (r int32) { trc("tls=%v clockid=%v flags=%v, (%v:)", tls, clockid, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) } func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr) (r int32) { @@ -30747,7 +30745,7 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr trc("tls=%v fd=%v flags=%v new1=%v old=%v, (%v:)", tls, fd, flags, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) } func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { @@ -30755,7 +30753,7 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { trc("tls=%v fd=%v cur=%v, (%v:)", tls, fd, cur, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) } func Xunshare(tls *TLS, flags int32) (r int32) { @@ -30763,7 +30761,7 @@ func Xunshare(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) } func Xutimes(tls *TLS, path uintptr, times uintptr) (r int32) { @@ -30779,7 +30777,7 @@ func Xvhangup(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_vhangup))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_vhangup))))) } func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Tssize_t) { @@ -30787,7 +30785,7 @@ func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Ts trc("tls=%v fd=%v iov=%v cnt=%v flags=%v, (%v:)", tls, fd, iov, cnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), int64(cnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), Int64FromUint64(cnt), Int64FromUint32(flags)))) } const LARCH_NGREG = 32 @@ -30858,7 +30856,7 @@ func Xwait4(tls *TLS, pid Tpid_t, status uintptr, options int32, ru uintptr) (r1 Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } const XATTR_CREATE = 1 @@ -30870,7 +30868,7 @@ func Xgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -30878,7 +30876,7 @@ func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -30886,7 +30884,7 @@ func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v, (%v:)", tls, filedes, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size)))) } func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -30894,7 +30892,7 @@ func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -30902,7 +30900,7 @@ func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_t) { @@ -30910,7 +30908,7 @@ func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_ trc("tls=%v filedes=%v list=%v size=%v, (%v:)", tls, filedes, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), Int64FromUint64(size)))) } func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -30918,7 +30916,7 @@ func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -30926,7 +30924,7 @@ func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -30934,7 +30932,7 @@ func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, filedes, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -30942,7 +30940,7 @@ func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) } func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -30950,7 +30948,7 @@ func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) } func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { @@ -30958,7 +30956,7 @@ func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) } func _dummy4(tls *TLS, msg uintptr, lm uintptr) (r uintptr) { @@ -31002,7 +31000,7 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { var sign, sw int32 _, _, _, _, _, _, _, _, _, _, _ = b, mo, n, o, ol, os, sign, sw, t, tl, ts mo = p - sw = int32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) + sw = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) b = uint32(0) n = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 2*4)), sw) o = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 3*4)), sw) @@ -31059,9 +31057,9 @@ func Xbind_textdomain_codeset(tls *TLS, domainname uintptr, codeset uintptr) (r var _empty_mo = [5]Tuint32_t{ 0: uint32(0x950412de), - 2: uint32(-Int32FromInt32(1)), - 3: uint32(-Int32FromInt32(1)), - 4: uint32(-Int32FromInt32(1)), + 2: Uint32FromInt32(-Int32FromInt32(1)), + 3: Uint32FromInt32(-Int32FromInt32(1)), + 4: Uint32FromInt32(-Int32FromInt32(1)), } const NL_CAT_LOCALE = 1 @@ -31144,12 +31142,12 @@ _6: goto _9 _9: strings = map1 + uintptr(20) + uintptr(v8) - v10 = uint32(set_id) + v10 = Uint32FromInt32(set_id) v11 = v10>>int32(24) | v10>>int32(8)&uint32(0xff00) | v10<>int32(24) | v13>>int32(8)&uint32(0xff00) | v13< uint64(NAME_MAX) || dirlen >= uint64(PATH_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) @@ -31471,7 +31469,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r1 uintptr) return uintptr(0) } (*Tbinding)(unsafe.Pointer(p4)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) - (*Tbinding)(unsafe.Pointer(p4)).Fdirlen = int32(dirlen) + (*Tbinding)(unsafe.Pointer(p4)).Fdirlen = Int32FromUint64(dirlen) (*Tbinding)(unsafe.Pointer(p4)).Fdomainname = p4 + 32 (*Tbinding)(unsafe.Pointer(p4)).Fdirname = p4 + 32 + uintptr(domlen) + uintptr(1) Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p4)).Fdomainname, domainname, domlen+uint64(1)) @@ -31598,13 +31596,13 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n if !(msgid1 != 0) { goto notrans } - if uint32(category) >= uint32(LC_ALL) { + if Uint32FromInt32(category) >= uint32(LC_ALL) { goto notrans } if !(domainname != 0) { domainname = X__gettextdomain(tls) } - domlen = Xstrnlen(tls, domainname, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + domlen = Xstrnlen(tls, domainname, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if domlen > uint64(NAME_MAX) { goto notrans } @@ -31657,27 +31655,27 @@ _2: dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 16 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 - dirlen = uint64((*Tbinding)(unsafe.Pointer(q)).Fdirlen) + dirlen = Uint64FromInt32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) loclen = Xstrlen(tls, locname) - catlen = uint64(_catlens[category]) + catlen = Uint64FromInt8(_catlens[category]) /* Logically split @mod suffix from locale name. */ modname = Xmemchr(tls, locname, int32('@'), loclen) if !(modname != 0) { modname = locname + uintptr(loclen) } - v5 = loclen - uint64(int64(modname)-int64(locname)) + v5 = loclen - Uint64FromInt64(int64(modname)-int64(locname)) modlen = v5 alt_modlen = v5 - loclen = uint64(int64(modname) - int64(locname)) + loclen = Uint64FromInt64(int64(modname) - int64(locname)) /* Drop .charset identifier; it is not used. */ csp = Xmemchr(tls, locname, int32('.'), loclen) if csp != 0 { - loclen = uint64(int64(csp) - int64(locname)) + loclen = Uint64FromInt64(int64(csp) - int64(locname)) } v6 = dirlen + uint64(1) + loclen + modlen + uint64(1) + catlen + uint64(1) + domlen + uint64(3) + uint64(1) name = Xrealloc(tls, name, v6) for { - Xsnprintf(tls, name, v6, __ccgo_ts+423, VaList(bp+24, dirname, int32(loclen), locname, int32(alt_modlen), modname, catname, domainname)) + Xsnprintf(tls, name, v6, __ccgo_ts+423, VaList(bp+24, dirname, Int32FromUint64(loclen), locname, Int32FromUint64(alt_modlen), modname, catname, domainname)) v8 = X__map_file(tls, name, bp) map1 = v8 if v8 != 0 { @@ -31690,7 +31688,7 @@ _2: v9 = Xmemchr(tls, locname, int32('_'), loclen) locp = v9 if v9 != 0 { - loclen = uint64(int64(locp) - int64(locname)) + loclen = Uint64FromInt64(int64(locp) - int64(locname)) alt_modlen = modlen } else { break @@ -31728,7 +31726,7 @@ _2: r1 += uintptr(13) for { v11 = int32(*(*int8)(unsafe.Pointer(r1))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: if !(v12 != 0) { @@ -31747,7 +31745,7 @@ _2: r1++ for { v14 = int32(*(*int8)(unsafe.Pointer(r1))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: if !(v15 != 0) { @@ -31760,7 +31758,7 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals = Int32FromUint64(np) (*Tmsgcat)(unsafe.Pointer(p3)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) @@ -31820,7 +31818,7 @@ _2: * msgid2 to request that dcngettext suppress plural processing. */ if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals != 0 { plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p3)).Fplural_rule, n) - if plural > uint64((*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals) { + if plural > Uint64FromInt32((*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals) { goto notrans } for { @@ -31829,7 +31827,7 @@ _2: if !(v27 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size - uint64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p3)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size - Uint64FromInt64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p3)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint64(1) >= rem { goto notrans @@ -98058,7 +98056,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(a)) != 0 && *(*uint8)(unsafe.Pointer(b)) != 0) { break } - for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && uint32(int32(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { + for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { a++ } if uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32) != uint32(*(*uint8)(unsafe.Pointer(b))) { @@ -98070,7 +98068,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { a++ b++ } - return BoolInt32(int32(*(*uint8)(unsafe.Pointer(a))) != int32(*(*uint8)(unsafe.Pointer(b)))) + return BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(b)))) } func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { @@ -98094,11 +98092,11 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { ; s += uintptr(Xstrlen(tls, s) + uint64(1)) } - return uint64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) + return Uint64FromInt64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) } s += uintptr(Xstrlen(tls, s) + uint64(1)) if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - if int32(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { s += uintptr(2) } else { s += uintptr(uint32(2) + (uint32(64)-uint32(*(*uint8)(unsafe.Pointer(s + 1))))*uint32(5)) @@ -98107,7 +98105,7 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { goto _1 _1: } - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } type Tstateful_cd = struct { @@ -98139,16 +98137,16 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { _, _, _, _, _, _, _ = cd, f, scd, t, v1, v2, v3 v1 = _find_charmap(tls, to) t = v1 - if v3 = v1 == uint64(-Int32FromInt32(1)); !v3 { + if v3 = v1 == Uint64FromInt32(-Int32FromInt32(1)); !v3 { v2 = _find_charmap(tls, from) f = v2 } - if v3 || v2 == uint64(-Int32FromInt32(1)) || int32(_charmaps[t]) >= int32(0330) { + if v3 || v2 == Uint64FromInt32(-Int32FromInt32(1)) || Int32FromUint8(_charmaps[t]) >= int32(0330) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } cd = _combine_to_from(tls, t, f) - switch int32(_charmaps[f]) { + switch Int32FromUint8(_charmaps[f]) { case int32(UTF_16): fallthrough case int32(UTF_32): @@ -98169,7 +98167,7 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { func _get_16(tls *TLS, s uintptr, e int32) (r uint32) { e &= int32(1) - return uint32(int32(*(*uint8)(unsafe.Pointer(s + uintptr(e))))<>(uint32(2)*x%uint32(8)) | int32(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) + x = c - Uint32FromInt32(int32(4)*Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1)))))) + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)))))>>(uint32(2)*x%uint32(8)) | Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) if x < uint32(256) { v1 = x } else { @@ -98285,7 +98283,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } c = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) l = uint64(1) - switch int32(type1) { + switch Int32FromUint8(type1) { case int32(UTF_8): goto _2 case int32(US_ASCII): @@ -98336,13 +98334,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } l = Xmbrtowc(tls, bp+32, *(*uintptr)(unsafe.Pointer(in)), *(*Tsize_t)(unsafe.Pointer(inb)), bp+24) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { goto ilseq } - if l == uint64(-Int32FromInt32(2)) { + if l == Uint64FromInt32(-Int32FromInt32(2)) { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) goto _23 _3: ; @@ -98356,7 +98354,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < l { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) if !(0 != 0) { goto _24 } @@ -98368,7 +98366,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) _24: ; if c-uint32(0xd800) < uint32(0x800) || c >= uint32(0x110000) { @@ -98387,19 +98385,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(2) { goto starved } - c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) if c-Uint32FromInt32(0xdc00) < uint32(0x400) { goto ilseq } if c-Uint32FromInt32(0xd800) < uint32(0x400) { - if uint32(int32(type1)-int32(UCS2BE)) < uint32(2) { + if Uint32FromInt32(Int32FromUint8(type1)-int32(UCS2BE)) < uint32(2) { goto ilseq } l = uint64(4) if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), int32(type1)) + d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), Int32FromUint8(type1)) if d-Uint32FromInt32(0xdc00) >= uint32(0x400) { goto ilseq } @@ -98416,7 +98414,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), 0) - if int32(type1) == int32(UCS2) { + if Int32FromUint8(type1) == int32(UCS2) { if c == uint32(0xfffe) { v26 = int32(UCS2LE) } else { @@ -98431,7 +98429,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } v25 = v27 } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v25) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v25) if c == uint32(0xfffe) || c == uint32(0xfeff) { l = uint64(2) } @@ -98451,7 +98449,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v28 = int32(UTF_32BE) } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v28) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v28) if c == uint32(0xfffe0000) || c == uint32(0xfeff) { l = uint64(4) } @@ -98463,8 +98461,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto _23 } - if c-uint32(0xa1) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + if c-uint32(0xa1) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } l = uint64(2) @@ -98472,17 +98470,17 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if c-uint32(129) <= uint32(Int32FromInt32(159)-Int32FromInt32(129)) { + if c-uint32(129) <= Uint32FromInt32(Int32FromInt32(159)-Int32FromInt32(129)) { c -= uint32(129) } else { - if c-uint32(224) <= uint32(Int32FromInt32(239)-Int32FromInt32(224)) { + if c-uint32(224) <= Uint32FromInt32(Int32FromInt32(239)-Int32FromInt32(224)) { c -= uint32(193) } else { goto ilseq } } c *= uint32(2) - if d-uint32(64) <= uint32(Int32FromInt32(158)-Int32FromInt32(64)) { + if d-uint32(64) <= Uint32FromInt32(Int32FromInt32(158)-Int32FromInt32(64)) { if d == uint32(127) { goto ilseq } @@ -98491,7 +98489,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } d -= uint32(64) } else { - if d-uint32(159) <= uint32(Int32FromInt32(252)-Int32FromInt32(159)) { + if d-uint32(159) <= Uint32FromInt32(Int32FromInt32(252)-Int32FromInt32(159)) { c++ d -= uint32(159) } @@ -98516,10 +98514,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) if c == uint32(0x8e) { c = d - if c-uint32(0xa1) > uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + if c-uint32(0xa1) > Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { goto ilseq } - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } c -= uint32(0xa1) @@ -98547,7 +98545,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c != uint32('(') && c != uint32('$') { goto ilseq } - switch uint32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { + switch Uint32FromInt32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { case uint32('B'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(0) goto _1 @@ -98557,10 +98555,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui case uint32('I'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(4) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('@')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('@')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(2) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('B')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('B')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(3) goto _1 } @@ -98596,7 +98594,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto ilseq } if c-uint32(0x21) < uint32(0x5e) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) } break } @@ -98629,11 +98627,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d < uint32(0xa1) && int32(type1) == int32(GB2312) { + if d < uint32(0xa1) && Int32FromUint8(type1) == int32(GB2312) { goto ilseq } if d-uint32(0x40) >= uint32(191) || d == uint32(127) { - if d-uint32('0') > uint32(9) || int32(type1) != int32(GB18030) { + if d-uint32('0') > uint32(9) || Int32FromUint8(type1) != int32(GB18030) { goto ilseq } l = uint64(4) @@ -98704,23 +98702,23 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d-uint32(0x40) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < uint32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { + if d-uint32(0x40) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < Uint32FromInt32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { goto ilseq } d -= uint32(0x40) if d > uint32(0x3e) { d -= uint32(0x22) } - if c-uint32(0xa1) >= uint32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { - if c-uint32(0x87) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { + if c-uint32(0xa1) >= Uint32FromInt32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { + if c-uint32(0x87) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { goto ilseq } if c < uint32(0xa1) { c -= uint32(0x87) } else { - c -= uint32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) + c -= Uint32FromInt32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) } - c = uint32(int32(_hkscs[uint32(4867)+(c*uint32(157)+d)/uint32(16)])>>((c*uint32(157)+d)%uint32(16))%int32(2)<>((c*uint32(157)+d)%uint32(16))%int32(2)< *(*Tsize_t)(unsafe.Pointer(outb)) { goto toobig } @@ -98749,7 +98747,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } c -= uint32(0xa1) - c = uint32(int32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(&_big5)) + uintptr(c)*314 + uintptr(d)*2))) | BoolInt32(c == uint32(0x27) && (d == uint32(0x3a) || d == uint32(0x3c) || d == uint32(0x42)))<= uint32(93) || d >= uint32(94) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) d += uint32(0xa1) - if c >= uint32(93) || c >= uint32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { + if c >= uint32(93) || c >= Uint32FromInt32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { goto ilseq } if d-uint32('A') < uint32(26) { @@ -98778,7 +98776,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if d-uint32('a') < uint32(26) { d = d - uint32('a') + uint32(26) } else { - if d-uint32(0x81) < uint32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { + if d-uint32(0x81) < Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { d = d - uint32(0x81) + uint32(52) } else { goto ilseq @@ -98788,7 +98786,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(0x20) { c = uint32(178)*c + d } else { - c = uint32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d + c = Uint32FromInt32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d } c += uint32(0xac00) d = uint32(0xac00) @@ -98843,7 +98841,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } _23: ; - switch int32(totype) { + switch Int32FromUint8(totype) { case int32(WCHAR_T): goto _35 case int32(UTF_8): @@ -98883,20 +98881,20 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = int32(c) + *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = Int32FromUint32(c) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 _36: ; if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { - k = uint64(Xwctomb(tls, bp+56, int32(c))) + k = Uint64FromInt32(Xwctomb(tls, bp+56, Int32FromUint32(c))) if *(*Tsize_t)(unsafe.Pointer(outb)) < k { goto toobig } Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(out)), bp+56, k) } else { - k = uint64(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), int32(c))) + k = Uint64FromInt32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), Int32FromUint32(c))) } *(*uintptr)(unsafe.Pointer(out)) += uintptr(k) *(*Tsize_t)(unsafe.Pointer(outb)) -= k @@ -98930,13 +98928,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v55 = out v54 = *(*uintptr)(unsafe.Pointer(v55)) *(*uintptr)(unsafe.Pointer(v55))++ - *(*int8)(unsafe.Pointer(v54)) = int8(c) + *(*int8)(unsafe.Pointer(v54)) = Int8FromUint32(c) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(1) goto _51 _53: ; d = c - c = uint32(int32(4) * int32(totype)) + c = Uint32FromInt32(int32(4) * Int32FromUint8(totype)) for { if !(c < uint32(256)) { break @@ -98965,8 +98963,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui c = uint32('~') goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) goto revout } c = _uni_to_jis(tls, c) @@ -98986,7 +98984,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v59 = int32(176) } - *(*int8)(unsafe.Pointer(v57)) = int8((c+uint32(1))/uint32(2) + uint32(v59)) + *(*int8)(unsafe.Pointer(v57)) = Int8FromUint32((c+uint32(1))/uint32(2) + Uint32FromInt32(v59)) v61 = out v60 = *(*uintptr)(unsafe.Pointer(v61)) *(*uintptr)(unsafe.Pointer(v61))++ @@ -98995,7 +98993,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v62 = d + uint32(126) } - *(*int8)(unsafe.Pointer(v60)) = int8(v62) + *(*int8)(unsafe.Pointer(v60)) = Int8FromUint32(v62) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 _40: @@ -99003,8 +99001,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) } else { c = _uni_to_jis(tls, c) } @@ -99017,11 +99015,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v64 = out v63 = *(*uintptr)(unsafe.Pointer(v64)) *(*uintptr)(unsafe.Pointer(v64))++ - *(*int8)(unsafe.Pointer(v63)) = int8(c/uint32(256) + uint32(0x80)) + *(*int8)(unsafe.Pointer(v63)) = Int8FromUint32(c/uint32(256) + uint32(0x80)) v66 = out v65 = *(*uintptr)(unsafe.Pointer(v66)) *(*uintptr)(unsafe.Pointer(v66))++ - *(*int8)(unsafe.Pointer(v65)) = int8(c%uint32(256) + uint32(0x80)) + *(*int8)(unsafe.Pointer(v65)) = Int8FromUint32(c%uint32(256) + uint32(0x80)) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 _41: @@ -99029,7 +99027,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(7) { goto toobig } @@ -99068,7 +99066,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v82 = out v81 = *(*uintptr)(unsafe.Pointer(v82)) *(*uintptr)(unsafe.Pointer(v82))++ - *(*int8)(unsafe.Pointer(v81)) = int8(c - uint32(0xff61) + uint32(0x21)) + *(*int8)(unsafe.Pointer(v81)) = Int8FromUint32(c - uint32(0xff61) + uint32(0x21)) } } v84 = out @@ -99108,11 +99106,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui v96 = out v95 = *(*uintptr)(unsafe.Pointer(v96)) *(*uintptr)(unsafe.Pointer(v96))++ - *(*int8)(unsafe.Pointer(v95)) = int8(c / uint32(256)) + *(*int8)(unsafe.Pointer(v95)) = Int8FromUint32(c / uint32(256)) v98 = out v97 = *(*uintptr)(unsafe.Pointer(v98)) *(*uintptr)(unsafe.Pointer(v98))++ - *(*int8)(unsafe.Pointer(v97)) = int8(c % uint32(256)) + *(*int8)(unsafe.Pointer(v97)) = Int8FromUint32(c % uint32(256)) v100 = out v99 = *(*uintptr)(unsafe.Pointer(v100)) *(*uintptr)(unsafe.Pointer(v100))++ @@ -99140,14 +99138,14 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ; _43: ; - if c < uint32(0x10000) || uint32(int32(totype)-int32(UCS2BE)) < uint32(2) { + if c < uint32(0x10000) || Uint32FromInt32(Int32FromUint8(totype)-int32(UCS2BE)) < uint32(2) { if c >= uint32(0x10000) { c = uint32(0xFFFD) } if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(2) { goto toobig } - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(2) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 @@ -99156,8 +99154,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto toobig } c -= uint32(0x10000) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), int32(totype)) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), Int32FromUint8(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99171,7 +99169,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99189,19 +99187,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ilseq: ; err = int32(EILSEQ) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto toobig toobig: ; err = int32(E2BIG) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto starved starved: ; err = int32(EINVAL) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end end: ; @@ -99431,7 +99429,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { break } z = X__strchrnul(tls, path, int32(':')) - l = uint64(int64(z) - int64(path)) + l = Uint64FromInt64(int64(z) - int64(path)) if l >= uint64(256)-n-uint64(2) { goto _10 } @@ -99671,7 +99669,7 @@ func _skipspace(tls *TLS, s uintptr) (r uintptr) { _, _ = v1, v2 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -99694,9 +99692,9 @@ func _evalprim(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { return __ccgo_ts } s = _skipspace(tls, s) - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { (*Tst)(unsafe.Pointer(st)).Fr = Xstrtoul(tls, s, bp, int32(10)) - if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == uint64(-Int32FromInt32(1)) { + if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == Uint64FromInt32(-Int32FromInt32(1)) { return __ccgo_ts } return _skipspace(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -99896,7 +99894,7 @@ func X__pleval(tls *TLS, s uintptr, n uint64) (r uint64) { if int32(*(*int8)(unsafe.Pointer(s))) == int32(';') { v1 = (*(*Tst)(unsafe.Pointer(bp))).Fr } else { - v1 = uint64(-Int32FromInt32(1)) + v1 = Uint64FromInt32(-Int32FromInt32(1)) } return v1 } @@ -99916,7 +99914,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { var _ /* part at bp+48 */ [24]int8 var _ /* tmp_locale at bp+0 */ t__locale_struct _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, l, lm, lm1, p, part1, ret, s, same, z, v3, v4, v5, v6 - if uint32(cat) > uint32(LC_ALL) { + if Uint32FromInt32(cat) > uint32(LC_ALL) { return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&X__locale_lock))) @@ -99936,7 +99934,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { } z = X__strchrnul(tls, p, int32(';')) if int64(z)-int64(p) <= int64(LOCALE_NAME_MAX) { - Xmemcpy(tls, bp+48, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, bp+48, p, Uint64FromInt64(int64(z)-int64(p))) (*(*[24]int8)(unsafe.Pointer(bp + 48)))[int64(z)-int64(p)] = 0 if *(*int8)(unsafe.Pointer(z)) != 0 { p = z + uintptr(1) @@ -100104,7 +100102,7 @@ _4: } fw = 0 for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } fw = int32(10)*fw + (int32(*(*int8)(unsafe.Pointer(fmt))) - int32('0')) @@ -100119,7 +100117,7 @@ _4: lp = 0 fmt++ for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } lp = int32(10)*lp + (int32(*(*int8)(unsafe.Pointer(fmt))) - int32('0')) @@ -100133,7 +100131,7 @@ _4: rp = 0 fmt++ for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } rp = int32(10)*rp + (int32(*(*int8)(unsafe.Pointer(fmt))) - int32('0')) @@ -100151,7 +100149,7 @@ _4: w = fw } x = VaFloat64(&ap) - l = uint64(Xsnprintf(tls, s, n, __ccgo_ts+560, VaList(bp+8, w, rp, x))) + l = Uint64FromInt32(Xsnprintf(tls, s, n, __ccgo_ts+560, VaList(bp+8, w, rp, x))) if l >= n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(E2BIG) return int64(-int32(1)) @@ -100322,7 +100320,7 @@ func Xtextdomain(tls *TLS, domainname uintptr) (r uintptr) { return uintptr(0) } if !(_current_domain != 0) { - _current_domain = Xmalloc(tls, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + _current_domain = Xmalloc(tls, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if !(_current_domain != 0) { return uintptr(0) } @@ -100458,7 +100456,7 @@ func Xreallocarray(tls *TLS, ptr uintptr, m Tsize_t, n Tsize_t) (r uintptr) { trc("tls=%v ptr=%v m=%v n=%v, (%v:)", tls, ptr, m, n, origin(2)) defer func() { trc("-> %v", r) }() } - if n != 0 && m > uint64(-Int32FromInt32(1))/n { + if n != 0 && m > Uint64FromInt32(-Int32FromInt32(1))/n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -100532,7 +100530,7 @@ func X__expo2(tls *TLS, x float64, sign float64) (r float64) { var v1 Tuint64_t _, _ = scale, v1 /* note that k is odd and scale*scale overflows */ - v1 = uint64(uint32(Int32FromInt32(0x3ff)+_k2/Int32FromInt32(2))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(e != 0) { if *(*Tuint64_t)(unsafe.Pointer(bp))<> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(e != 0) { if *(*Tuint32_t)(unsafe.Pointer(bp))<> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix <= uint32(0x400f6a7a) { /* |x| ~<= 5pi/4 */ if ix&uint32(0xfffff) == uint32(0x921fb) { /* |x| ~= pi/2 or 2pi/2 */ @@ -100935,8 +100933,8 @@ medium: } *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - ex = int32(ix >> int32(20)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ex = Int32FromUint32(ix >> int32(20)) if ex-ey > int32(16) { /* 2nd round, good to 118 bits */ t = r w = fn * _pio2_2 @@ -100944,7 +100942,7 @@ medium: w = fn*_pio2_2t - (t - r - w) *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if ex-ey > int32(49) { /* 3rd round, good to 151 bits, covers all cases */ t = r w = fn * _pio2_3 @@ -100968,8 +100966,8 @@ _1: } /* set z = scalbn(|x|,-ilogb(x)+23) */ *(*float64)(unsafe.Pointer(bp)) = x - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) >> Int32FromInt32(12) - *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) >> Int32FromInt32(12) + *(*Tuint64_t)(unsafe.Pointer(bp)) |= Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) z = *(*float64)(unsafe.Pointer(bp)) i = 0 for { @@ -100988,7 +100986,7 @@ _1: for (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] == float64(0) { i-- } - n = X__rem_pio2_large(tls, bp+8, bp+32, int32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) + n = X__rem_pio2_large(tls, bp+8, bp+32, Int32FromUint32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) if sign != 0 { *(*float64)(unsafe.Pointer(y)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[0] *(*float64)(unsafe.Pointer(y + 1*8)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[int32(1)] @@ -101560,9 +101558,9 @@ func X__rem_pio2f(tls *TLS, x float32, y uintptr) (r int32) { return 0 } /* scale x into [2^23, 2^24-1] */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) - e0 = int32(ix>>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ - *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - uint32(e0<> int32(31)) + e0 = Int32FromUint32(ix>>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - Uint32FromInt32(e0<> int32(63)) + return Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) } // C documentation @@ -101622,7 +101620,7 @@ func X__signbitf(tls *TLS, x float32) (r int32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - return int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + return Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) } func X__signbitl(tls *TLS, x float64) (r int32) { @@ -101715,7 +101713,7 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) big = BoolInt32(hx&uint32(0x7fffffff) >= uint32(0x3FE59428)) /* |x| >= 0.6744 */ if big != 0 { - sign = int32(hx >> int32(31)) + sign = Int32FromUint32(hx >> int32(31)) if sign != 0 { x = -x y = -y @@ -101750,13 +101748,13 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { } /* -1.0/(x+r) has up to 2ulp error, so compute it accurately */ w0 = w - v2 = *(*Tuint64_t)(unsafe.Pointer(&w0))>>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) /* x < 1 domain error is handled in the called functions */ - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| < 2, up to 2ulp error in [1,1.125] */ return Xlog1p(tls, x-Float64FromInt32(1)+Xsqrt(tls, (x-Float64FromInt32(1))*(x-Float64FromInt32(1))+Float64FromInt32(2)*(x-Float64FromInt32(1)))) } - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| < 0x1p26 */ return Xlog(tls, Float64FromInt32(2)*x-Float64FromInt32(1)/(x+Xsqrt(tls, x*x-Float64FromInt32(1)))) } @@ -102002,12 +102000,12 @@ func Xacoshf(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x a = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - if a < uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { - if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { @@ -102247,15 +102245,15 @@ func Xasinhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i x3 = *(*float32)(unsafe.Pointer(bp)) - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { - if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { @@ -102511,7 +102509,7 @@ _2: } } /* |y/x| > 0x1p64 */ - if ix+uint32(Int32FromInt32(64)< 0x1p26 */ - if ix+uint32(Int32FromInt32(26)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) y3 = *(*float64)(unsafe.Pointer(bp)) - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { /* handle underflow */ if e == uint32(0) { if uint64(4) == uint64(4) { @@ -102870,10 +102868,10 @@ func Xatanhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) y3 = *(*float32)(unsafe.Pointer(bp)) - if *(*Tuint32_t)(unsafe.Pointer(bp)) < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(1)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -103175,12 +103173,12 @@ func Xceilf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -103347,7 +103345,7 @@ func Xcos(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) @@ -103441,7 +103439,7 @@ func Xcosf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -103487,12 +103485,12 @@ func Xcosh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(2) */ if w < uint32(0x3fe62e42) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -103740,7 +103738,7 @@ func Xerfc(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -103885,7 +103883,7 @@ func Xerff(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -103925,7 +103923,7 @@ func Xerfcf(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104093,7 +104091,7 @@ _3: kd -= X__exp_data.Fshift r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<>int32(52)&uint64(0x7ff) < uint64(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { + if *(*Tuint64_t)(unsafe.Pointer(bp + 8))>>int32(52)&uint64(0x7ff) < Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { if !(y != 0) { return _p10[int32(*(*float64)(unsafe.Pointer(bp)))+int32(15)] } @@ -104220,7 +104218,7 @@ func Xexp10f(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp + 4)) = *(*float32)(unsafe.Pointer(bp)) /* fabsf(n) < 8 without raising invalid on nan */ - if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < uint32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { + if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { if !(y != 0) { return _p101[int32(*(*float32)(unsafe.Pointer(bp)))+int32(7)] } @@ -104387,7 +104385,7 @@ _5: kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4043687A) { /* if |x|>=56*ln2 */ *(*float64)(unsafe.Pointer(bp)) = x3 @@ -104722,7 +104720,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return float64(1) + float64(2)*(x3-e) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ twopk = *(*float64)(unsafe.Pointer(bp + 8)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + float64(1) @@ -104733,7 +104731,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return y3 - float64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { @@ -104779,7 +104777,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4195b844) { /* if |x|>=27*ln2 */ if hx > uint32(0x7f800000) { /* NaN */ @@ -104857,7 +104855,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return Float32FromFloat32(1) + Float32FromFloat32(2)*(x3-e) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) + k) << int32(23)) /* 2^k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) + k) << int32(23)) /* 2^k */ twopk = *(*float32)(unsafe.Pointer(bp)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + Float32FromFloat32(1) @@ -104868,7 +104866,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return y3 - Float32FromFloat32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { y3 = (x3 - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk } else { @@ -105090,7 +105088,7 @@ func Xfloor(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -105150,12 +105148,12 @@ func Xfloorf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -105217,13 +105215,13 @@ func _normalize(tls *TLS, x float64) (r Tnum) { var v1 float64 _, _, _, _, _ = e, ix, sign, v1, v2 ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - e = int32(ix >> int32(52)) + e = Int32FromUint64(ix >> int32(52)) sign = e & int32(0x800) e &= int32(0x7ff) if !(e != 0) { v1 = x * float64(9.223372036854776e+18) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) - e = int32(ix >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(ix >> int32(52) & uint64(0x7ff)) if e != 0 { v2 = e - int32(63) } else { @@ -105428,7 +105426,7 @@ func Xfma(tls *TLS, x1 float64, y1 float64, z float64) (r2 float64) { } e -= d /* convert to double */ - i = int64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ + i = Int64FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ if sign != 0 { i = -i } @@ -105450,7 +105448,7 @@ func Xfma(tls *TLS, x1 float64, y1 float64, z float64) (r2 float64) { /* one bit is lost when scaled, add another top bit to only round once at conversion if it is inexact */ if *(*Tuint64_t)(unsafe.Pointer(bp))<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) + i = Int64FromUint64((*(*Tuint64_t)(unsafe.Pointer(bp))>>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) if sign != 0 { i = -i } @@ -105522,12 +105520,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = y } else { v9 = x @@ -105579,12 +105577,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = y } else { v9 = x @@ -105644,12 +105642,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = x } else { v9 = y @@ -105701,12 +105699,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = x } else { v9 = y @@ -105770,9 +105768,9 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* in the followings uxi should be ux.i, but then gcc wrongly adds */ /* float load/store to inner loops ruining performance and code size */ uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) @@ -105804,7 +105802,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ex-- i <<= uint64(1) } - uxi <<= uint64(-ex + int32(1)) + uxi <<= Uint64FromInt32(-ex + int32(1)) } else { uxi = uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -105866,11 +105864,11 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { /* scale result */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } - uxi |= uint64(sx) << int32(63) + uxi |= Uint64FromInt32(sx) << int32(63) *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi return *(*float64)(unsafe.Pointer(bp + 8)) } @@ -105915,8 +105913,8 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) sx = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) & uint32(0x80000000) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -105964,7 +105962,7 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106007,9 +106005,9 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { /* scale result up */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } uxi |= sx *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi @@ -106046,7 +106044,7 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { Fd float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ee = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(ee != 0) { if x != 0 { x = Xfrexp(tls, x*float64(1.8446744073709552e+19), e) @@ -106090,7 +106088,7 @@ func Xfrexpf(tls *TLS, x float32, e uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + ee = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(ee != 0) { if x != 0 { x = Xfrexpf(tls, float32(float64(x)*float64(1.8446744073709552e+19)), e) @@ -106198,8 +106196,8 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) { })(unsafe.Pointer(bp + 8)) = ut } /* special cases */ - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) x = *(*float64)(unsafe.Pointer(bp)) y = *(*float64)(unsafe.Pointer(bp + 8)) /* note: hypot(inf,nan) == inf */ @@ -106291,19 +106289,19 @@ func Xhypotf(tls *TLS, x float32, y float32) (r float32) { } x = *(*float32)(unsafe.Pointer(bp)) y = *(*float32)(unsafe.Pointer(bp + 4)) - if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(25)<= Uint32FromInt32(Int32FromInt32(0xff)<= Uint32FromInt32(Int32FromInt32(25)<= uint32((Int32FromInt32(0x7f)+Int32FromInt32(60))<= Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(60))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { i <<= uint64(12) if i == uint64(0) { @@ -106419,7 +106417,7 @@ func Xilogbf(tls *TLS, x3 float32) (r int32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) - e = int32(i >> int32(23) & uint32(0xff)) + e = Int32FromUint32(i >> int32(23) & uint32(0xff)) if !(e != 0) { i <<= uint32(9) if i == uint32(0) { @@ -107227,7 +107225,7 @@ func Xj1(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { return Float64FromInt32(1) / (x * x) @@ -107563,7 +107561,7 @@ func Xj1f(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return Float32FromInt32(1) / (x * x) @@ -107852,7 +107850,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108054,7 +108052,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108148,7 +108146,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { var ix Tuint32_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = a, b, h, i, ix, k, nf, nm1, q0, q1, sign, t, temp, tmp, w, z, v6 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108313,7 +108311,7 @@ func Xynf(tls *TLS, n int32, x float32) (r float32) { var ib, ix Tuint32_t _, _, _, _, _, _, _, _, _, _ = a, b, i, ib, ix, nm1, sign, temp, v1, v3 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108515,12 +108513,12 @@ func X__lgamma_r(tls *TLS, x float64, signgamp uintptr) (r1 float64) { *(*float64)(unsafe.Pointer(bp)) = x /* purge off +-inf, NaN, +-0, tiny and negative arguments */ *(*int32)(unsafe.Pointer(signgamp)) = int32(1) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix >= uint32(0x7ff00000) { return x * x } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(70))<> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) ix = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return x * x @@ -109056,7 +109054,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109077,8 +109075,8 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<>Int32FromInt32(20)) - int32(0x3ff) + hx += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k += Int32FromUint32(hx>>Int32FromInt32(20)) - int32(0x3ff) hx = hx&uint32(0x000fffff) + uint32(0x3fe6a09e) *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(hx)<>Int32FromInt32(23)) - int32(0x7f) + ix += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k += Int32FromUint32(ix>>Int32FromInt32(23)) - int32(0x7f) ix = ix&uint32(0x007fffff) + uint32(0x3f3504f3) *(*Tuint32_t)(unsafe.Pointer(bp)) = ix x = *(*float32)(unsafe.Pointer(bp)) @@ -109339,7 +109337,7 @@ func Xlog1p(tls *TLS, x3 float64) (r float64) { } /* log1p(-1) = -inf */ return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } - if hx<> int32(32)) - hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) - k = int32(hu>>Int32FromInt32(20)) - int32(0x3ff) + hu += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k = Int32FromUint32(hu>>Int32FromInt32(20)) - int32(0x3ff) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(54) { if k >= int32(2) { @@ -109439,7 +109437,7 @@ func Xlog1pf(tls *TLS, x3 float32) (r float32) { } /* log1p(-1)=+inf */ return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } - if ix<>Int32FromInt32(23)) - int32(0x7f) + iu += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k = Int32FromUint32(iu>>Int32FromInt32(23)) - int32(0x7f) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(25) { if k >= int32(2) { @@ -109560,7 +109558,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109581,8 +109579,8 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109672,16 +109670,16 @@ func Xlog2f(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + k = Int32FromUint32(tmp) >> int32(23) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -109848,7 +109846,7 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) } - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109862,14 +109860,14 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % uint32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + i = Int32FromUint32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ iz = ix - tmp&uint32(0xff800000) invc = (*(*struct { Finvc float64 @@ -110008,7 +110006,7 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) /* no fractional part */ if e >= int32(52) { *(*float64)(unsafe.Pointer(iptr)) = x @@ -110060,7 +110058,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) /* no fractional part */ if e >= int32(23) { *(*float32)(unsafe.Pointer(iptr)) = x @@ -110076,7 +110074,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { *(*float32)(unsafe.Pointer(iptr)) = *(*float32)(unsafe.Pointer(bp)) return x } - mask = uint32(int32(0x007fffff) >> e) + mask = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&mask == uint32(0) { *(*float32)(unsafe.Pointer(iptr)) = x *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x80000000) @@ -110199,7 +110197,7 @@ _2: *(*Tuint64_t)(unsafe.Pointer(bp + 8))++ } } - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) /* raise overflow if ux.f is infinite and x is finite */ if e == int32(0x7ff) { if uint64(8) == uint64(4) { @@ -110400,7 +110398,7 @@ _2: v6 = *(*uint64)(unsafe.Pointer(bp + 8)) goto _7 _7: - if int32(v6>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v6>>Int32FromInt32(63)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16)) |= uint32(0x80000000) } } else { @@ -110409,7 +110407,7 @@ _2: v8 = *(*uint32)(unsafe.Pointer(bp)) goto _9 _9: - if int32(v8>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v8>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ @@ -110419,7 +110417,7 @@ _2: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- @@ -110494,8 +110492,8 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF2) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(iy >> int32(52) & uint64(0x7ff)) if e < int32(0x3ff) { return 0 } @@ -110733,7 +110731,7 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) topx = _top124(tls, x1) topy = _top124(tls, y1) - if topx-uint32(0x001) >= uint32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topx-uint32(0x001) >= Uint32FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1. */ /* Special cases: (x < 0x1p-126 or inf or nan) or @@ -110789,12 +110787,12 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { return X__math_invalid(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) + sign_bias = Uint32FromInt32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) } ix &= uint64(0x7fffffffffffffff) topx &= uint32(0x7ff) } - if topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: sign_bias == 0 here because y is not odd. */ v10 = float64(1) if ix == *(*Tuint64_t)(unsafe.Pointer(&v10)) { @@ -110879,10 +110877,10 @@ func _log2_inline(tls *TLS, ix Tuint32_t) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF3) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ + k = Int32FromUint32(top) >> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -110928,7 +110926,7 @@ _2: kd -= X__exp2f_data.Fshift_scaled /* k/N */ r = xd - kd /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */ - t = *(*Tuint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + uintptr(ki%uint64(Int32FromInt32(1)<> int32(23) & uint32(0xff)) + e = Int32FromUint32(iy >> int32(23) & uint32(0xff)) if e < int32(0x7f) { return 0 } if e > Int32FromInt32(0x7f)+Int32FromInt32(23) { return int32(2) } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { return 0 } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { return int32(1) } return int32(2) @@ -110986,7 +110984,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { sign_bias = uint32(0) ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) iy = *(*Tuint32_t)(unsafe.Pointer(&y1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ if _zeroinfnan1(tls, iy) != 0 { if uint32(2)*iy == uint32(0) { @@ -110998,10 +110996,10 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { return x1 + y1 } - if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { + if uint32(2)*ix == Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) } - if BoolInt32(uint32(2)*ix < uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { + if BoolInt32(uint32(2)*ix < Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { return Float32FromFloat32(0) } /* |x|<1 && y==inf or |x|>1 && y==-inf. */ return y1 * y1 @@ -111032,7 +111030,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { return X__math_invalidf(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) + sign_bias = Uint32FromInt32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) } ix &= uint32(0x7fffffff) } @@ -111041,7 +111039,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } } logx = _log2_inline(tls, ix) @@ -111165,10 +111163,10 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) - sy = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sy = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint64_t)(unsafe.Pointer(bp + 16))<> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -111269,9 +111267,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi x = *(*float64)(unsafe.Pointer(bp + 8)) @@ -111284,9 +111282,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v10 = -int32(q) + v10 = -Int32FromUint32(q) } else { - v10 = int32(q) + v10 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v10 if sx != 0 { @@ -111338,10 +111336,10 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) - sx = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) - sy = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + sx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) + sy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111386,7 +111384,7 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111440,9 +111438,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi x = *(*float32)(unsafe.Pointer(bp + 4)) @@ -111455,9 +111453,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -111503,8 +111501,8 @@ func Xrint(tls *TLS, x float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - s = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + s = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x } @@ -111552,8 +111550,8 @@ func Xrintf(tls *TLS, x float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) - s = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + s = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x } @@ -111611,7 +111609,7 @@ func Xround(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x3 } @@ -111676,7 +111674,7 @@ func Xroundf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x3 } @@ -111900,7 +111898,7 @@ func Xscalbn(tls *TLS, x float64, n int32) (r float64) { } } } - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(Int32FromInt32(0x3ff)+n) << int32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) = Uint64FromInt32(Int32FromInt32(0x3ff)+n) << int32(52) x = y * *(*float64)(unsafe.Pointer(bp)) return x } @@ -111942,7 +111940,7 @@ func Xscalbnf(tls *TLS, x float32, n int32) (r float32) { } } } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32(Int32FromInt32(0x7f)+n) << int32(23) + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32(Int32FromInt32(0x7f)+n) << int32(23) x = y * *(*float32)(unsafe.Pointer(bp)) return x } @@ -112024,7 +112022,7 @@ func Xsin(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) @@ -112097,7 +112095,7 @@ func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) s = X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) c = X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) switch n & Uint32FromInt32(3) { @@ -112244,7 +112242,7 @@ func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) s = X__sindf(tls, *(*float64)(unsafe.Pointer(bp))) c = X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) switch n & Uint32FromInt32(3) { @@ -112306,7 +112304,7 @@ func Xsinf(tls *TLS, x3 float32) (r float32) { var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ @@ -112423,14 +112421,14 @@ func Xsinh(tls *TLS, x float64) (r float64) { h = -h } /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) absx = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(DBL_MAX) */ if w < uint32(0x40862e42) { t = Xexpm1(tls, absx) if w < uint32(0x3ff00000) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<> int32(52) - if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { + if top-uint64(0x001) >= Uint64FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return x1 @@ -112564,7 +112562,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { x = 4^e m; with integer e, and m in [1, 4) m: fixed point representation [2.62] 2^e is the exponent part of the result. */ - even = int32(top & uint64(1)) + even = Int32FromUint64(top & uint64(1)) m = ix<>= uint64(1) @@ -112608,7 +112606,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { /* handle rounding modes and inexact exception: only (s+1)^2 == 2^42 m case is exact otherwise add a tiny value to cause the fenv effects. */ - tiny = uint64(v2) + tiny = Uint64FromInt64(v2) tiny |= (d1 ^ d2) & uint64(0x8000000000000000) t = *(*float64)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112693,7 +112691,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { var v3 int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, t, tiny, u, y, y1, v1, v2, v3, v4 ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return x1 @@ -112707,7 +112705,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 4^e m; with int e and m in [1, 4). */ even = ix & uint32(0x00800000) @@ -112721,7 +112719,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { m = v2 /* 2^e is the exponent part of the return value. */ ey = ix >> int32(1) - ey += uint32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) + ey += Uint32FromInt32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) ey &= uint32(0x7f800000) i = ix >> Int32FromInt32(17) % uint32(128) r = uint32(X__rsqrt_tab[i]) << int32(16) @@ -112753,7 +112751,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { v3 = int32(0x01000000) } /* handle rounding and inexact exception. */ - tiny = uint32(v3) + tiny = Uint32FromInt32(v3) tiny |= (d1 ^ d2) & uint32(0x80000000) t = *(*float32)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112828,8 +112826,8 @@ func Xtan(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) - return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) + return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], Int32FromUint32(n&uint32(1))) } const M_PI_29 = 1.5707963267948966 @@ -112929,8 +112927,8 @@ func Xtanf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x3, bp)) - return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) + return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), Int32FromUint32(n&uint32(1))) } const M_PI_210 = 0 @@ -112967,8 +112965,8 @@ func Xtanh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { @@ -113040,7 +113038,7 @@ func Xtanhf(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) @@ -113265,13 +113263,13 @@ func Xtgamma(tls *TLS, x3 float64) (r1 float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ return x3 + float64(X__builtin_inff(tls)) } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { return x3 } @@ -113424,7 +113422,7 @@ func Xtruncf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { return x3 } @@ -113477,14 +113475,14 @@ func Xa64l(tls *TLS, s uintptr) (r int64) { if !(d != 0) { break } - x |= uint32(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e + x |= Uint32FromInt64(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e goto _1 _1: ; e += int32(6) s++ } - return int64(int32(x)) + return int64(Int32FromUint32(x)) } func Xl64a(tls *TLS, x0 int64) (r uintptr) { @@ -113495,7 +113493,7 @@ func Xl64a(tls *TLS, x0 int64) (r uintptr) { var p uintptr var x Tuint32_t _, _ = p, x - x = uint32(x0) + x = Uint32FromInt64(x0) p = uintptr(unsafe.Pointer(&_s)) for { if !(x != 0) { @@ -113615,7 +113613,7 @@ func Xffs(tls *TLS, i int32) (r int32) { var v2 uint64 _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint64(i) + v2 = Uint64FromInt32(i) v3 = _a_ctz_64(tls, v2) goto _4 _4: @@ -113635,7 +113633,7 @@ func Xffsl(tls *TLS, i int64) (r int32) { var v2 uint64 _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint64(i) + v2 = Uint64FromInt64(i) v3 = _a_ctz_64(tls, v2) goto _4 _4: @@ -113654,7 +113652,7 @@ func Xffsll(tls *TLS, i int64) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_64(tls, uint64(i)) + int32(1) + v1 = _a_ctz_64(tls, Uint64FromInt64(i)) + int32(1) } else { v1 = 0 } @@ -113901,7 +113899,7 @@ func X__getauxval(tls *TLS, item uint64) (r uint64) { _ = auxv auxv = X__libc.Fauxv if item == uint64(AT_SECURE) { - return uint64(X__libc.Fsecure) + return Uint64FromInt8(X__libc.Fsecure) } for { if !(*(*Tsize_t)(unsafe.Pointer(auxv)) != 0) { @@ -113981,7 +113979,7 @@ func Xgetentropy(tls *TLS, buffer uintptr, len1 Tsize_t) (r int32) { } } pos += uintptr(ret) - len1 -= uint64(ret) + len1 -= Uint64FromInt32(ret) ret = 0 } _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) @@ -114086,7 +114084,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if *(*Twchar_t)(unsafe.Pointer(bp + 4)) != *(*Twchar_t)(unsafe.Pointer(bp)) || *(*Twchar_t)(unsafe.Pointer(bp)) == int32(':') { Xoptopt = *(*Twchar_t)(unsafe.Pointer(bp)) if int32(*(*int8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+686, optchar, uint64(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+686, optchar, Uint64FromInt32(k)) } return int32('?') } @@ -114107,7 +114105,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { return int32(':') } if Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+710, optchar, uint64(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+710, optchar, Uint64FromInt32(k)) } return int32('?') } @@ -114349,7 +114347,7 @@ func Xgetpriority(tls *TLS, which int32, who Tid_t) (r int32) { } var ret int32 _ = ret - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getpriority), int64(which), int64(who))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getpriority), int64(which), Int64FromUint32(who))))) if ret < 0 { return ret } @@ -114361,7 +114359,7 @@ func Xgetresgid(tls *TLS, rgid uintptr, egid uintptr, sgid uintptr) (r int32) { trc("tls=%v rgid=%v egid=%v sgid=%v, (%v:)", tls, rgid, egid, sgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) } func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { @@ -114369,7 +114367,7 @@ func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { trc("tls=%v ruid=%v euid=%v suid=%v, (%v:)", tls, ruid, euid, suid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) } func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { @@ -114379,7 +114377,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { } var ret int32 _ = ret - ret = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) if !(ret != 0) { if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur = ^Uint64FromUint64(0) @@ -114415,7 +114413,7 @@ func Xgetrusage(tls *TLS, who int32, ru uintptr) (r1 int32) { Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { @@ -114511,8 +114509,8 @@ var _compat_map = [20]Tioctl_compat_map{ }, }, 2: { - Fnew_req: int32(uint64(Uint32FromUint32(2)<= len1 { + if Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+899, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { return int32(ERANGE) } return 0 @@ -115454,7 +115452,7 @@ func _slash_len(tls *TLS, s uintptr) (r Tsize_t) { for int32(*(*int8)(unsafe.Pointer(s))) == int32('/') { s++ } - return uint64(int64(s) - int64(s0)) + return Uint64FromInt64(int64(s) - int64(s0)) } func Xrealpath(tls *TLS, filename uintptr, resolved uintptr) (r uintptr) { @@ -115517,7 +115515,7 @@ _3: goto _2 } z = X__strchrnul(tls, bp+uintptr(p), int32('/')) - v6 = uint64(int64(z) - int64(bp+uintptr(p))) + v6 = Uint64FromInt64(int64(z) - int64(bp+uintptr(p))) l = v6 l0 = v6 if !(l != 0) && !(check_dir != 0) { @@ -115565,7 +115563,7 @@ _3: } } k = Xreadlink(tls, bp+4097, bp, p) - if uint64(k) == p { + if Uint64FromInt64(k) == p { goto toolong } if !(k != 0) { @@ -115611,8 +115609,8 @@ _8: p++ } } - p -= uint64(k) - Xmemmove(tls, bp+uintptr(p), bp, uint64(k)) + p -= Uint64FromInt64(k) + Xmemmove(tls, bp+uintptr(p), bp, Uint64FromInt64(k)) /* Skip the stack advancement in case we have a new * absolute base path. */ goto restart @@ -115678,7 +115676,7 @@ func Xsetdomainname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), Int64FromUint64(len1))))) } func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { @@ -115686,7 +115684,7 @@ func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { trc("tls=%v which=%v who=%v prio=%v, (%v:)", tls, which, who, prio, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setpriority), int64(which), int64(who), int64(prio))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setpriority), int64(which), Int64FromUint32(who), int64(prio))))) } type Tctx = struct { @@ -115716,7 +115714,7 @@ func Xsetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { rlim = bp } ret = int32(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(rlim), int64(Int32FromInt32(0)))) - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsyscall(tls *TLS, n int64, va uintptr) (r int64) { @@ -115735,7 +115733,7 @@ func Xsyscall(tls *TLS, n int64, va uintptr) (r int64) { e = VaInt64(&ap) f = VaInt64(&ap) _ = ap - return X__syscall_ret(tls, uint64(X__syscall6(tls, n, a, b, c, d, e, f))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, n, a, b, c, d, e, f))) } const AF_ALG = 38 @@ -116161,10 +116159,10 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { pid = v1 l = Xsnprintf(tls, bp+80, uint64(1024), __ccgo_ts+920, VaList(bp+1120, priority, bp, bp+1104, uintptr(unsafe.Pointer(&_log_ident)), __ccgo_ts+942+BoolUintptr(!(pid != 0)), pid, __ccgo_ts+944+BoolUintptr(!(pid != 0)))) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = errno_save - l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-uint64(l), message, ap) + l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-Uint64FromInt32(l), message, ap) if l2 >= 0 { - if uint64(l2) >= uint64(1024)-uint64(l) { - l = int32(Uint64FromInt64(1024) - Uint64FromInt32(1)) + if Uint64FromInt32(l2) >= uint64(1024)-Uint64FromInt32(l) { + l = Int32FromUint64(Uint64FromInt64(1024) - Uint64FromInt32(1)) } else { l += l2 } @@ -116173,7 +116171,7 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { l++ (*(*[1024]int8)(unsafe.Pointer(bp + 80)))[v2] = int8('\n') } - if Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { + if Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { fd = Xopen(tls, __ccgo_ts+639, Int32FromInt32(O_WRONLY)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC), 0) if fd >= 0 { Xdprintf(tls, fd, __ccgo_ts+946, VaList(bp+1120, l-*(*int32)(unsafe.Pointer(bp + 1104)), bp+80+uintptr(*(*int32)(unsafe.Pointer(bp + 1104))))) @@ -116225,7 +116223,7 @@ func Xuname(tls *TLS, uts uintptr) (r int32) { trc("tls=%v uts=%v, (%v:)", tls, uts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) } func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116233,7 +116231,7 @@ func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { trc("tls=%v addr=%v len1=%v advice=%v, (%v:)", tls, addr, len1, advice, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))))) } func Xmadvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116249,7 +116247,7 @@ func Xmincore(tls *TLS, addr uintptr, len1 Tsize_t, vec uintptr) (r int32) { trc("tls=%v addr=%v len1=%v vec=%v, (%v:)", tls, addr, len1, vec, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mincore), int64(addr), int64(len1), int64(vec))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mincore), int64(addr), Int64FromUint64(len1), int64(vec))))) } func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116257,7 +116255,7 @@ func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_mlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_mlock), int64(addr), Int64FromUint64(len1))))) } func Xmlockall(tls *TLS, flags int32) (r int32) { @@ -116265,7 +116263,7 @@ func Xmlockall(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) } const OFF_MASK = 4095 @@ -116281,23 +116279,23 @@ func X__mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd } var ret int64 _ = ret - if uint64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { + if Uint64FromInt64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } - if len1 >= uint64(Int64FromInt64(INT64_MAX)) { + if len1 >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } if flags&int32(MAP_FIXED) != 0 { _dummy5(tls) } - ret = X__syscall6(tls, int64(__NR3264_mmap), int64(start), int64(len1), int64(prot), int64(flags), int64(fd), off) + ret = X__syscall6(tls, int64(__NR3264_mmap), int64(start), Int64FromUint64(len1), int64(prot), int64(flags), int64(fd), off) /* Fixup incorrect EPERM from kernel. */ if ret == int64(-int32(EPERM)) && !(start != 0) && flags&int32(MAP_ANON) != 0 && !(flags&Int32FromInt32(MAP_FIXED) != 0) { ret = int64(-int32(ENOMEM)) } - return uintptr(X__syscall_ret(tls, uint64(ret))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(ret))) } func Xmmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { @@ -116317,7 +116315,7 @@ func X__mprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { _, _ = end, start start = uint64(addr) & -X__libc.Fpage_size end = uint64(addr+uintptr(len1)+uintptr(X__libc.Fpage_size)-UintptrFromInt32(1)) & -X__libc.Fpage_size - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mprotect), int64(start), int64(end-start), int64(prot))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mprotect), Int64FromUint64(start), Int64FromUint64(end-start), int64(prot))))) } func Xmprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { @@ -116340,7 +116338,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla var new_addr uintptr _, _ = ap, new_addr new_addr = uintptr(0) - if new_len >= uint64(Int64FromInt64(INT64_MAX)) { + if new_len >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } @@ -116350,7 +116348,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla new_addr = VaUintptr(&ap) _ = ap } - return uintptr(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), int64(old_len), int64(new_len), int64(flags), int64(new_addr))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), Int64FromUint64(old_len), Int64FromUint64(new_len), int64(flags), int64(new_addr))))) } func Xmremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, flags int32, va uintptr) (r uintptr) { @@ -116366,7 +116364,7 @@ func Xmsync(tls *TLS, start uintptr, len1 Tsize_t, flags int32) (r int32) { trc("tls=%v start=%v len1=%v flags=%v, (%v:)", tls, start, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msync), int64(start), int64(len1), int64(flags), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msync), int64(start), Int64FromUint64(len1), int64(flags), 0, 0, 0)))) } func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116374,7 +116372,7 @@ func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munlock), int64(addr), Int64FromUint64(len1))))) } func Xmunlockall(tls *TLS) (r int32) { @@ -116382,7 +116380,7 @@ func Xmunlockall(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_munlockall))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_munlockall))))) } func _dummy7(tls *TLS) { @@ -116394,7 +116392,7 @@ func X__munmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { defer func() { trc("-> %v", r) }() } _dummy7(tls) - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munmap), int64(start), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munmap), int64(start), Int64FromUint64(len1))))) } func Xmunmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { @@ -116413,7 +116411,7 @@ func Xposix_madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32 if advice == int32(MADV_DONTNEED) { return 0 } - return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))) + return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))) } func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { @@ -116437,7 +116435,7 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { return uintptr(0) } Xmemcpy(tls, buf, __ccgo_ts+951, uint64(9)) - Xmemcpy(tls, buf+uintptr(9), name, uint64(int64(p)-int64(name)+int64(1))) + Xmemcpy(tls, buf+uintptr(9), name, Uint64FromInt64(int64(p)-int64(name)+int64(1))) return buf } @@ -116494,9 +116492,9 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { var b, v3 int32 var v1, v2 uint32 _, _, _, _ = b, v1, v2, v3 - b = int32(uint8(c)) - if uint32(b) < uint32(128) { - v1 = uint32(b) + b = Int32FromUint8(Uint8FromInt32(c)) + if Uint32FromInt32(b) < uint32(128) { + v1 = Uint32FromInt32(b) } else { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v3 = int32(4) @@ -116504,7 +116502,7 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { v3 = int32(1) } if v3 == int32(1) && c != -int32(1) { - v2 = uint32(Int32FromInt32(0xdfff) & int32(int8(c))) + v2 = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(int8(c))) } else { v2 = uint32(0xffffffff) } @@ -116536,18 +116534,18 @@ func Xc16rtomb(tls *TLS, s uintptr, c16 Tchar16_t, ps uintptr) (r Tsize_t) { return uint64(1) } if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(c16)-uint32(0xd800) < uint32(0x400) { - *(*uint32)(unsafe.Pointer(x)) = uint32((int32(c16) - int32(0xd7c0)) << int32(10)) + *(*uint32)(unsafe.Pointer(x)) = Uint32FromInt32((Int32FromUint16(c16) - int32(0xd7c0)) << int32(10)) return uint64(0) } if *(*uint32)(unsafe.Pointer(x)) != 0 { if uint32(c16)-uint32(0xdc00) >= uint32(0x400) { goto ilseq } else { - wc = int32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) + wc = Int32FromUint32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) } *(*uint32)(unsafe.Pointer(x)) = uint32(0) } else { - wc = int32(c16) + wc = Int32FromUint16(c16) } return Xwcrtomb(tls, s, wc, uintptr(0)) goto ilseq @@ -116555,7 +116553,7 @@ ilseq: ; *(*uint32)(unsafe.Pointer(x)) = uint32(0) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } var _internal_state uint32 @@ -116565,7 +116563,7 @@ func Xc32rtomb(tls *TLS, s uintptr, c32 Tchar32_t, ps uintptr) (r Tsize_t) { trc("tls=%v s=%v c32=%v ps=%v, (%v:)", tls, s, c32, ps, origin(2)) defer func() { trc("-> %v", r) }() } - return Xwcrtomb(tls, s, int32(c32), ps) + return Xwcrtomb(tls, s, Int32FromUint32(c32), ps) } func Xmblen(tls *TLS, s uintptr, n Tsize_t) (r int32) { @@ -116613,21 +116611,21 @@ func Xmbrtoc16(tls *TLS, pc16 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } /* mbrtowc states for partial UTF-8 characters have the high bit set; * we use nonzero states without high bit for pending surrogates. */ - if int32(*(*uint32)(unsafe.Pointer(pending))) > 0 { + if Int32FromUint32(*(*uint32)(unsafe.Pointer(pending))) > 0 { if pc16 != 0 { *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*uint32)(unsafe.Pointer(pending))) } *(*uint32)(unsafe.Pointer(pending)) = uint32(0) - return uint64(-Int32FromInt32(3)) + return Uint64FromInt32(-Int32FromInt32(3)) } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) { if *(*Twchar_t)(unsafe.Pointer(bp)) >= int32(0x10000) { - *(*uint32)(unsafe.Pointer(pending)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) + *(*uint32)(unsafe.Pointer(pending)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) *(*Twchar_t)(unsafe.Pointer(bp)) = int32(0xd7c0) + *(*Twchar_t)(unsafe.Pointer(bp))>>Int32FromInt32(10) } if pc16 != 0 { - *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar16_t)(unsafe.Pointer(pc16)) = Uint16FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } return ret @@ -116653,7 +116651,7 @@ func Xmbrtoc32(tls *TLS, pc32 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) && pc32 != 0 { - *(*Tchar32_t)(unsafe.Pointer(pc32)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar32_t)(unsafe.Pointer(pc32)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } return ret } @@ -116691,11 +116689,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize } } if !(n != 0) { - return uint64(-Int32FromInt32(2)) + return Uint64FromInt32(-Int32FromInt32(2)) } if !(c != 0) { - if int32(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolUint64(!!(v1 != 0)) } @@ -116705,7 +116703,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize v2 = int32(1) } if v2 == int32(1) { - *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(int8(*(*uint8)(unsafe.Pointer(s)))) + *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(Int8FromUint8(*(*uint8)(unsafe.Pointer(s)))) return Uint64FromInt32(1) } if uint32(*(*uint8)(unsafe.Pointer(s)))-uint32(0xc2) > Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -116717,7 +116715,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize n-- } if n != 0 { - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } goto loop @@ -116725,11 +116723,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize ; v4 = s s++ - c = c<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _9 } @@ -116969,22 +116967,22 @@ _15: ws += 4 v17 = s s++ - *(*Twchar_t)(unsafe.Pointer(v16)) = int32(*(*uint8)(unsafe.Pointer(v17))) + *(*Twchar_t)(unsafe.Pointer(v16)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) v18 = ws ws += 4 v19 = s s++ - *(*Twchar_t)(unsafe.Pointer(v18)) = int32(*(*uint8)(unsafe.Pointer(v19))) + *(*Twchar_t)(unsafe.Pointer(v18)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) v20 = ws ws += 4 v21 = s s++ - *(*Twchar_t)(unsafe.Pointer(v20)) = int32(*(*uint8)(unsafe.Pointer(v21))) + *(*Twchar_t)(unsafe.Pointer(v20)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v21))) v22 = ws ws += 4 v23 = s s++ - *(*Twchar_t)(unsafe.Pointer(v22)) = int32(*(*uint8)(unsafe.Pointer(v23))) + *(*Twchar_t)(unsafe.Pointer(v22)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) wn -= uint64(4) } } @@ -116993,7 +116991,7 @@ _15: ws += 4 v25 = s s++ - *(*Twchar_t)(unsafe.Pointer(v24)) = int32(*(*uint8)(unsafe.Pointer(v25))) + *(*Twchar_t)(unsafe.Pointer(v24)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v25))) wn-- goto _14 } @@ -117006,13 +117004,13 @@ _15: goto resume resume: ; - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _13 } v27 = s s++ - c = c<= uint32(0x40) { s -= uintptr(2) @@ -117020,7 +117018,7 @@ resume: } v28 = s s++ - c = c<= uint32(0x40) { s -= uintptr(3) @@ -117028,12 +117026,12 @@ resume: } v29 = s s++ - c = c< Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117119,14 +117117,14 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { if n < uint64(4) && c<<(uint64(6)*n-uint64(6))&(Uint32FromUint32(1)<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } v4 = s s++ - c = c<= uint32(0x40) { @@ -117134,9 +117132,9 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v5 = s s++ - c = c<= uint32(0x40) { @@ -117144,7 +117142,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v6 = s s++ - *(*Twchar_t)(unsafe.Pointer(wc)) = int32(c<>Int32FromInt32(6)) *(*int8)(unsafe.Pointer(s)) = int8(int32(0x80) | wc&int32(0x3f)) return uint64(2) } else { - if uint32(wc) < uint32(0xd800) || uint32(wc)-uint32(0xe000) < uint32(0x2000) { + if Uint32FromInt32(wc) < uint32(0xd800) || Uint32FromInt32(wc)-uint32(0xe000) < uint32(0x2000) { v3 = s s++ *(*int8)(unsafe.Pointer(v3)) = int8(int32(0xe0) | wc>>Int32FromInt32(12)) @@ -117198,7 +117196,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { *(*int8)(unsafe.Pointer(s)) = int8(int32(0x80) | wc&int32(0x3f)) return uint64(3) } else { - if uint32(wc)-uint32(0x10000) < uint32(0x100000) { + if Uint32FromInt32(wc)-uint32(0x10000) < uint32(0x100000) { v5 = s s++ *(*int8)(unsafe.Pointer(v5)) = int8(int32(0xf0) | wc>>Int32FromInt32(18)) @@ -117216,7 +117214,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { } } *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st uintptr) (r Tsize_t) { @@ -117242,8 +117240,8 @@ func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st u v1 = dst } l = Xwcrtomb(tls, v1, *(*Twchar_t)(unsafe.Pointer(ws)), uintptr(0)) - if l == uint64(-Int32FromInt32(1)) { - cnt = uint64(-Int32FromInt32(1)) + if l == Uint64FromInt32(-Int32FromInt32(1)) { + cnt = Uint64FromInt32(-Int32FromInt32(1)) break } if dst != 0 { @@ -117289,10 +117287,10 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize if !(*(*Twchar_t)(unsafe.Pointer(ws2)) != 0) { break } - if uint32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(ws2)), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } n += l } else { @@ -117306,7 +117304,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize return n } for n >= uint64(4) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*int8)(unsafe.Pointer(s)) = 0 *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117314,7 +117312,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, s, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } s += uintptr(l) n -= l @@ -117327,7 +117325,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize *(*uintptr)(unsafe.Pointer(ws)) += 4 } for n != 0 { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*int8)(unsafe.Pointer(s)) = 0 *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117335,7 +117333,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if l > n { return N - n @@ -117373,7 +117371,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { var v1 int32 _ = v1 if c < uint32(128) { - return int32(c) + return Int32FromUint32(c) } if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) @@ -117381,7 +117379,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { v1 = int32(1) } if v1 == int32(1) && c-uint32(0xdf80) < uint32(0x80) { - return int32(uint8(c)) + return Int32FromUint8(uint8(c)) } return -int32(1) } @@ -117394,7 +117392,7 @@ func Xwctomb(tls *TLS, s uintptr, wc Twchar_t) (r int32) { if !(s != 0) { return 0 } - return int32(Xwcrtomb(tls, s, wc, uintptr(0))) + return Int32FromUint64(Xwcrtomb(tls, s, wc, uintptr(0))) } func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { @@ -117426,7 +117424,7 @@ func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } type Tucred = struct { @@ -117472,7 +117470,7 @@ func Xaccept4(tls *TLS, fd int32, addr uintptr, len1 uintptr, flg int32) (r1 int v8 = r goto _9 _9: - ret = int32(X__syscall_ret(tls, uint64(v8))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(v8))) if ret >= 0 || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) && *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(EINVAL) { return ret } @@ -117506,7 +117504,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_bind) v2 = int64(fd) v3 = int64(addr) - v4 = int64(len1) + v4 = Int64FromUint32(len1) v5 = int64(Int32FromInt32(0)) v6 = int64(Int32FromInt32(0)) v7 = int64(Int32FromInt32(0)) @@ -117522,7 +117520,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { @@ -117538,7 +117536,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_connect) v2 = int64(fd) v3 = int64(addr) - v4 = int64(len1) + v4 = Int64FromUint32(len1) v5 = int64(Int32FromInt32(0)) v6 = int64(Int32FromInt32(0)) v7 = int64(Int32FromInt32(0)) @@ -117554,7 +117552,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } const ADD = 0 @@ -118464,11 +118462,11 @@ func _getoffs(tls *TLS, offs uintptr, base uintptr, s uintptr) (r int32) { _, _ = i, v2 i = 0 for { - for int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { - if int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { return 0 } - s = base + uintptr(int32(*(*uint8)(unsafe.Pointer(s)))&Int32FromInt32(0x3f)< uint32(62) { + if Uint32FromInt32(j-k)-uint32(1) > uint32(62) { return 0 } v3 = i i++ - *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = uint8(j - k) + *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = Uint8FromInt32(j - k) if j == l { return i } @@ -118540,12 +118538,12 @@ func _match(tls *TLS, offset uintptr, base uintptr, dn uintptr, end uintptr, len for { nlen-- v2 = nlen - l = int32(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) + l = Int32FromUint8(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) noff-- v3 = noff o = int32((*(*[128]int16)(unsafe.Pointer(bp)))[v3]) end -= uintptr(l) - if l != int32(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, uint64(l)) != 0 { + if l != Int32FromUint8(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, Uint64FromInt32(l)) != 0 { return m } *(*int32)(unsafe.Pointer(offset)) = o @@ -118590,7 +118588,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l return int32(1) } end = src + uintptr(l) - n = _getlens(tls, bp+4, src, int32(l)) + n = _getlens(tls, bp+4, src, Int32FromUint64(l)) if !(n != 0) { return -int32(1) } @@ -118605,7 +118603,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l if m > bestlen { bestlen = m bestoff = *(*int32)(unsafe.Pointer(bp)) - if uint64(m) == l { + if Uint64FromInt32(m) == l { break } } @@ -118616,15 +118614,15 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l } } /* encode unmatched part */ - if uint64(space) < l-uint64(bestlen)+uint64(2)+BoolUint64(uint64(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { + if Uint64FromInt32(space) < l-Uint64FromInt32(bestlen)+uint64(2)+BoolUint64(Uint64FromInt32(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { return -int32(1) } - Xmemcpy(tls, dst+uintptr(1), src, l-uint64(bestlen)) + Xmemcpy(tls, dst+uintptr(1), src, l-Uint64FromInt32(bestlen)) v3 = Int32FromInt32(0) j = v3 i = v3 for { - if !(uint64(i) < l-uint64(bestlen)) { + if !(Uint64FromInt32(i) < l-Uint64FromInt32(bestlen)) { break } *(*uint8)(unsafe.Pointer(dst + uintptr(i))) = (*(*[127]uint8)(unsafe.Pointer(bp + 4)))[j] @@ -118633,16 +118631,16 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l ; v4 = j j++ - i += int32((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) + i += Int32FromUint8((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) } /* add tail */ if bestlen != 0 { v5 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = uint8(int32(0xc0) | bestoff>>int32(8)) + *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = Uint8FromInt32(int32(0xc0) | bestoff>>int32(8)) v6 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(bestoff) + *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = Uint8FromInt32(bestoff) } else { v7 = i i++ @@ -118690,11 +118688,11 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr break } /* loop invariants: p= int64(end)-int64(p) || int64(j) >= int64(dend)-int64(dest) { return -int32(1) } @@ -118725,7 +118723,7 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr dest++ v7 = p p++ - *(*int8)(unsafe.Pointer(v6)) = int8(*(*uint8)(unsafe.Pointer(v7))) + *(*int8)(unsafe.Pointer(v6)) = Int8FromUint8(*(*uint8)(unsafe.Pointer(v7))) } } else { *(*int8)(unsafe.Pointer(dest)) = 0 @@ -118763,17 +118761,17 @@ func Xdn_skipname(tls *TLS, s uintptr, end uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { return int32(int64(p) - int64(s) + int64(1)) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { if p+uintptr(1) < end { return int32(int64(p) - int64(s) + int64(2)) } else { break } } else { - if int64(end)-int64(p) < int64(int32(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { + if int64(end)-int64(p) < int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { break } else { - p += uintptr(int32(*(*uint8)(unsafe.Pointer(p))) + int32(1)) + p += uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + int32(1)) } } } @@ -118887,12 +118885,12 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if rlen < int32(12) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { return 0 } p = r + uintptr(12) - qdcount = int32(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 5))) - ancount = int32(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 7))) + qdcount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 5))) + ancount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 7))) for { v1 = qdcount qdcount-- @@ -118920,11 +118918,11 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr return -int32(1) } p += uintptr(int32(1) + BoolInt32(!!(*(*uint8)(unsafe.Pointer(p)) != 0))) - len1 = int32(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(p + 9))) + len1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 9))) if int64(len1+int32(10)) > int64(r+uintptr(rlen))-int64(p) { return -int32(1) } - if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, int32(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { + if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { return -int32(1) } p += uintptr(int32(10) + len1) @@ -119321,7 +119319,7 @@ func Xether_ntoa_r(tls *TLS, p_a uintptr, x uintptr) (r uintptr) { } else { v2 = __ccgo_ts + 966 } - x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, int32(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) + x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) goto _1 _1: ; @@ -119543,14 +119541,14 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt return -int32(5) } nais = nservs * naddrs - canon_len = int32(Xstrlen(tls, bp+1352)) - out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(88)+uint64(canon_len)+uint64(1)) + canon_len = Int32FromUint64(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), Uint64FromInt32(nais)*uint64(88)+Uint64FromInt32(canon_len)+uint64(1)) if !(out != 0) { return -int32(10) } if canon_len != 0 { outcanon = out + uintptr(nais)*88 - Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+int32(1))) + Xmemcpy(tls, outcanon, bp+1352, Uint64FromInt32(canon_len+int32(1))) } else { outcanon = uintptr(0) } @@ -119574,8 +119572,8 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*88))).Fai = Taddrinfo{ Fai_family: (*(*[48]Taddress)(unsafe.Pointer(bp + 8)))[i].Ffamily, - Fai_socktype: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), - Fai_protocol: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), + Fai_socktype: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), + Fai_protocol: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), Fai_addrlen: uint32(v5), Fai_addr: out + uintptr(k)*88 + 48, Fai_canonname: outcanon, @@ -119773,7 +119771,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu Fsin Tsockaddr_in F__ccgo_pad2 [12]byte }{} - *(*uint16)(unsafe.Pointer(bp)) = uint16(af) + *(*uint16)(unsafe.Pointer(bp)) = Uint16FromInt32(af) if af == int32(PF_INET6) { v1 = uint64(28) } else { @@ -119793,15 +119791,15 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu } } /* Align buffer and check for space for pointers and ip address */ - i = int32(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) + i = Int32FromUint64(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) if !(i != 0) { i = int32(8) } - if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-uint64(i)+uint64(l) { + if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-Uint64FromInt32(i)+uint64(l) { return int32(ERANGE) } - buf += uintptr(uint64(8) - uint64(i)) - buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - uint64(i) + uint64(l) + buf += uintptr(uint64(8) - Uint64FromInt32(i)) + buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - Uint64FromInt32(i) + uint64(l) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(Uint64FromInt32(2) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf @@ -119830,7 +119828,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu break } (*Thostent)(unsafe.Pointer(h)).Fh_addrtype = af - (*Thostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*Thostent)(unsafe.Pointer(h)).Fh_length = Int32FromUint32(l) (*Thostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 @@ -119917,7 +119915,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, /* Align buffer */ align = -uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1)) need = Uint64FromInt32(4) * Uint64FromInt64(8) - need += uint64(cnt+Int32FromInt32(1)) * (uint64(8) + uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + need += Uint64FromInt32(cnt+Int32FromInt32(1)) * (uint64(8) + Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) need += Xstrlen(tls, name) + uint64(1) need += Xstrlen(tls, bp+1344) + uint64(1) need += align @@ -119928,7 +119926,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(Uint64FromInt32(3) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf - buf += uintptr(uint64(cnt+Int32FromInt32(1)) * uint64(8)) + buf += uintptr(Uint64FromInt32(cnt+Int32FromInt32(1)) * uint64(8)) i = 0 for { if !(i < cnt) { @@ -119936,7 +119934,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf buf += uintptr((*Thostent)(unsafe.Pointer(h)).Fh_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) goto _2 _2: ; @@ -120185,17 +120183,17 @@ func _copy_addr(tls *TLS, r uintptr, af int32, sa uintptr, addr uintptr, addrlen case int32(PF_INET6): dst = sa + 8 len1 = int32(16) - if int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { - (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = uint32(ifindex) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { + (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = Uint32FromInt32(ifindex) } default: return } - if addrlen < uint64(len1) { + if addrlen < Uint64FromInt32(len1) { return } - (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(af) - Xmemcpy(tls, dst, addr, uint64(len1)) + (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = Uint16FromInt32(af) + Xmemcpy(tls, dst, addr, Uint64FromInt32(len1)) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -120206,15 +120204,15 @@ func _gen_netmask(tls *TLS, r uintptr, af int32, sa uintptr, prefixlen int32) { var _ /* addr at bp+0 */ [16]Tuint8_t _, _ = i, v1 *(*[16]Tuint8_t)(unsafe.Pointer(bp)) = [16]Tuint8_t{} - if uint64(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { - prefixlen = int32(Uint64FromInt32(8) * Uint64FromInt64(16)) + if Uint64FromInt32(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { + prefixlen = Int32FromUint64(Uint64FromInt32(8) * Uint64FromInt64(16)) } i = prefixlen / int32(8) - Xmemset(tls, bp, int32(0xff), uint64(i)) - if uint64(i) < uint64(16) { + Xmemset(tls, bp, int32(0xff), Uint64FromInt32(i)) + if Uint64FromInt32(i) < uint64(16) { v1 = i i++ - (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = uint8(int32(0xff) << (int32(8) - prefixlen%int32(8))) + (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = Uint8FromInt32(int32(0xff) << (int32(8) - prefixlen%int32(8))) } _copy_addr(tls, r, af, sa, bp, uint64(16), 0) } @@ -120240,21 +120238,21 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { ifi = h + UintptrFromInt64(16) ifa = h + UintptrFromInt64(16) stats_len = 0 - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { goto _1 } - stats_len = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) + stats_len = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) break goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } } else { ifs0 = *(*uintptr)(unsafe.Pointer(ctx + 16 + uintptr((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index%uint32(IFADDRS_HASH_SIZE))*8)) @@ -120274,19 +120272,19 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { return 0 } } - ifs = Xcalloc(tls, uint64(1), uint64(200)+uint64(stats_len)) + ifs = Xcalloc(tls, uint64(1), uint64(200)+Uint64FromInt32(stats_len)) if ifs == uintptr(0) { return -int32(1) } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = uint32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = Uint32FromInt32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFLA_IFNAME): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120304,7 +120302,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _3 _3: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { bucket = (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex % uint32(IFADDRS_HASH_SIZE) @@ -120314,22 +120312,22 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { } else { (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_name (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFA_ADDRESS): /* If ifa_addr is already set we, received an IFA_LOCAL before * so treat this as destination address */ if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } else { - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } case int32(IFA_BROADCAST): - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LOCAL): /* If ifa_addr is set and we get IFA_LOCAL, assume we have * a point-to-point network. Move address to correct field. */ @@ -120338,7 +120336,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { *(*uintptr)(unsafe.Pointer(ifs + 40)) = ifs + 136 Xmemset(tls, ifs+64, 0, uint64(36)) } - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LABEL): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120349,10 +120347,10 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _4 _4: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _gen_netmask(tls, ifs+32, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) + _gen_netmask(tls, ifs+32, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) } } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { @@ -120403,7 +120401,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { for cond := true; cond; cond = x != 0 { p-- v2 = p - *(*int8)(unsafe.Pointer(v2)) = int8(uint32('0') + x%uint32(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint32(uint32('0') + x%uint32(10)) x /= uint32(10) } return p @@ -120412,7 +120410,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { func _mkptr4(tls *TLS, s uintptr, ip uintptr) { bp := tls.Alloc(48) defer tls.Free(48) - Xsprintf(tls, s, __ccgo_ts+972, VaList(bp+8, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) + Xsprintf(tls, s, __ccgo_ts+972, VaList(bp+8, Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 3))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip))))) } func _mkptr6(tls *TLS, s uintptr, ip uintptr) { @@ -120426,13 +120424,13 @@ func _mkptr6(tls *TLS, s uintptr, ip uintptr) { } v2 = s s++ - *(*int8)(unsafe.Pointer(v2)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] + *(*int8)(unsafe.Pointer(v2)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] v3 = s s++ *(*int8)(unsafe.Pointer(v3)) = int8('.') v4 = s s++ - *(*int8)(unsafe.Pointer(v4)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] + *(*int8)(unsafe.Pointer(v4)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] v5 = s s++ *(*int8)(unsafe.Pointer(v5)) = int8('.') @@ -120480,7 +120478,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int for { if v7 = *(*int8)(unsafe.Pointer(p)) != 0; v7 { v4 = int32(*(*int8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120512,7 +120510,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int for { if v13 = *(*int8)(unsafe.Pointer(p)) != 0; v13 { v10 = int32(*(*int8)(unsafe.Pointer(p))) - v11 = BoolInt32(v10 == int32(' ') || uint32(v10)-uint32('\t') < uint32(5)) + v11 = BoolInt32(v10 == int32(' ') || Uint32FromInt32(v10)-uint32('\t') < uint32(5)) goto _12 _12: } @@ -120528,7 +120526,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int for { if v18 = *(*int8)(unsafe.Pointer(z)) != 0; v18 { v15 = int32(*(*int8)(unsafe.Pointer(z))) - v16 = BoolInt32(v15 == int32(' ') || uint32(v15)-uint32('\t') < uint32(5)) + v16 = BoolInt32(v15 == int32(' ') || Uint32FromInt32(v15)-uint32('\t') < uint32(5)) goto _17 _17: } @@ -120542,7 +120540,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } *(*int8)(unsafe.Pointer(z)) = 0 if int64(z)-int64(p) < int64(256) { - Xmemcpy(tls, buf, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, buf, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) break } } @@ -120578,7 +120576,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { for { if v7 = *(*int8)(unsafe.Pointer(p)) != 0; v7 { v4 = int32(*(*int8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120597,7 +120595,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p++ *(*int8)(unsafe.Pointer(v8)) = 0 svport = Xstrtoul(tls, p, bp+128, int32(10)) - if svport != uint64(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { + if svport != Uint64FromInt32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { continue } if dgram != 0 && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+1044, uint64(4)) != 0 { @@ -120609,7 +120607,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { if int64(p)-t__predefined_ptrdiff_t(bp) > int64(32) { continue } - Xmemcpy(tls, buf, bp, uint64(int64(p)-t__predefined_ptrdiff_t(bp))) + Xmemcpy(tls, buf, bp, Uint64FromInt64(int64(p)-t__predefined_ptrdiff_t(bp))) break } X__fclose_ca(tls, f) @@ -120642,7 +120640,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso var _ /* reply at bp+443 */ [512]uint8 var _ /* tmp at bp+955 */ [17]int8 _, _, _, _, _, _, _, _, _ = a, af, p, p1, port, qlen, rlen, scopeid, v1 - af = int32((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) + af = Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) switch af { case int32(PF_INET): a = sa + 4 @@ -120676,7 +120674,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso rlen = X__res_send(tls, bp+347, qlen, bp+443, int32(512)) (*(*[256]int8)(unsafe.Pointer(bp + 78)))[0] = 0 if rlen > 0 { - if uint64(rlen) > uint64(512) { + if Uint64FromInt32(rlen) > uint64(512) { rlen = int32(512) } X__dns_parse(tls, bp+443, rlen, __ccgo_fp(_dns_parse_callback), bp+78) @@ -120689,7 +120687,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso Xinet_ntop(tls, af, a, bp+78, uint32(256)) if scopeid != 0 { p = uintptr(0) - if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { + if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { p = Xif_indextoname(tls, scopeid, bp+955+uintptr(1)) } if !(p != 0) { @@ -120708,13 +120706,13 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso } if serv != 0 && servlen != 0 { p1 = bp + 78 - port = int32(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) + port = Int32FromUint16(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) (*(*[256]int8)(unsafe.Pointer(bp + 78)))[0] = 0 if !(flags&Int32FromInt32(NI_NUMERICSERV) != 0) { _reverse_services(tls, bp+78, port, flags&int32(NI_DGRAM)) } if !(*(*int8)(unsafe.Pointer(p1)) != 0) { - p1 = _itoa(tls, bp+334, uint32(port)) + p1 = _itoa(tls, bp+334, Uint32FromInt32(port)) } if Xstrlen(tls, p1) >= uint64(servlen) { return -int32(12) @@ -120753,7 +120751,7 @@ func Xgetpeername(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xgetservbyname(tls *TLS, name uintptr, prots uintptr) (r uintptr) { @@ -120796,8 +120794,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin return int32(ENOENT) } /* Align buffer */ - align = int32(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) - if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+uint64(align) { + align = Int32FromUint64(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) + if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+Uint64FromInt32(align) { return int32(ERANGE) } buf += uintptr(align) @@ -120829,8 +120827,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin (*Tservent)(unsafe.Pointer(se)).Fs_aliases = buf *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases)) = (*Tservent)(unsafe.Pointer(se)).Fs_name *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases + 1*8)) = uintptr(0) - (*Tservent)(unsafe.Pointer(se)).Fs_port = int32(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) - if int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { + (*Tservent)(unsafe.Pointer(se)).Fs_port = Int32FromUint16(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) + if Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { v1 = __ccgo_ts + 1054 } else { v1 = __ccgo_ts + 1058 @@ -120869,7 +120867,7 @@ func Xgetsockname(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xgetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, optlen uintptr) (r2 int32) { @@ -120917,7 +120915,7 @@ _9: break } if uint64(*(*Tsocklen_t)(unsafe.Pointer(optlen))) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -120993,7 +120991,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func X__h_errno_location(tls *TLS) (r uintptr) { @@ -121114,14 +121112,14 @@ func Xhtons(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*int8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } func Xif_freenameindex(tls *TLS, idx uintptr) { @@ -121146,7 +121144,7 @@ func Xif_indextoname(tls *TLS, index uint32, name uintptr) (r1 uintptr) { if v1 < 0 { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 16)) = int32(index) + *(*int32)(unsafe.Pointer(bp + 16)) = Int32FromUint32(index) r = Xioctl(tls, fd, int32(SIOCGIFNAME), VaList(bp+48, bp)) X__syscall1(tls, int64(SYS_close), int64(fd)) if r < 0 { @@ -121180,25 +121178,25 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { var i, v2 uint32 _, _, _, _, _, _, _, _, _, _, _, _ = a, bucket, ctx, i, ifa, ifi, index, map1, namelen, rta, type1, v2 ctx = pctx - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { ifi = h + UintptrFromInt64(16) index = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index type1 = int32(IFLA_IFNAME) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } else { ifa = h + UintptrFromInt64(16) - index = int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) + index = Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) type1 = int32(IFA_LABEL) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { goto _1 } - namelen = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) + namelen = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) if namelen > int32(IF_NAMESIZE) { return 0 } @@ -121207,7 +121205,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { i = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) for i != 0 { map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr(i-uint32(1))*28 - if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == uint32(index) && int32((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) == 0 { + if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == Uint32FromInt32(index) && Int32FromUint8((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) == 0 { return 0 } i = (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next @@ -121230,10 +121228,10 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fallocated = uint32(a) } map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*28 - (*Tifnamemap)(unsafe.Pointer(map1)).Findex = uint32(index) - (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = uint8(namelen) - Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) - *(*uint32)(unsafe.Pointer(ctx + 8)) += uint32(namelen + int32(1)) + (*Tifnamemap)(unsafe.Pointer(map1)).Findex = Uint32FromInt32(index) + (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = Uint8FromInt32(namelen) + Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) + *(*uint32)(unsafe.Pointer(ctx + 8)) += Uint32FromInt32(namelen + int32(1)) (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum++ (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum @@ -121241,7 +121239,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } return 0 } @@ -121270,7 +121268,7 @@ func Xif_nameindex(tls *TLS) (r uintptr) { goto err } p = ifs + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*16 + UintptrFromInt32(1)*16 - i = int32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) + i = Int32FromUint32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) d = ifs s = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist for { @@ -121325,7 +121323,7 @@ func Xif_nametoindex(tls *TLS, name uintptr) (r1 uint32) { } else { v2 = *(*int32)(unsafe.Pointer(bp + 16)) } - return uint32(v2) + return Uint32FromInt32(v2) } func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { @@ -121337,7 +121335,7 @@ func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { defer tls.Free(16) var _ /* a at bp+0 */ Tin_addr if !(X__inet_aton(tls, p, bp) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } return (*(*Tin_addr)(unsafe.Pointer(bp))).Fs_addr } @@ -121363,7 +121361,7 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) (r int32) { break } (*(*[4]uint64)(unsafe.Pointer(bp)))[i] = Xstrtoul(tls, s, bp+32, 0) - if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return 0 } if !(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0) { @@ -121488,7 +121486,7 @@ func Xinet_ntoa(tls *TLS, _in Tin_addr) (r uintptr) { var a uintptr _ = a a = bp - Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1070, VaList(bp+16, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3))))) + Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1070, VaList(bp+16, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))))) return uintptr(unsafe.Pointer(&_buf4)) } @@ -121509,14 +121507,14 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint a = a0 switch af { case int32(PF_INET): - if uint32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1070, VaList(bp+112, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + if Uint32FromInt32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1070, VaList(bp+112, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { return s } case int32(PF_INET6): if Xmemcmp(tls, a, __ccgo_ts+1017, uint64(12)) != 0 { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1082, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1082, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } else { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1106, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1106, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } /* Replace longest /(^0|:)[:0]{2,}/ with "::" */ v2 = Int32FromInt32(0) @@ -121530,7 +121528,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint if i != 0 && int32((*(*[100]int8)(unsafe.Pointer(bp)))[i]) != int32(':') { goto _1 } - j = int32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1136)) + j = Int32FromUint64(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1136)) if j > max { best = i max = j @@ -121544,7 +121542,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint v3 = Int8FromUint8(':') (*(*[100]int8)(unsafe.Pointer(bp)))[best+int32(1)] = v3 (*(*[100]int8)(unsafe.Pointer(bp)))[best] = v3 - Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), uint64(i-best-max+int32(1))) + Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), Uint64FromInt32(i-best-max+int32(1))) } if Xstrlen(tls, bp) < uint64(l) { Xstrcpy(tls, s, bp) @@ -121560,11 +121558,11 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint func _hexval(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -121594,7 +121592,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { j = v3 v = v3 for { - if !(j < int32(3) && BoolInt32(uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { + if !(j < int32(3) && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { break } v = int32(10)*v + int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') @@ -121606,7 +121604,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 || j > int32(1) && int32(*(*int8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { return 0 } - *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = Uint8FromInt32(v) if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { return int32(1) } @@ -121653,7 +121651,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { v = v9 for { if v11 = j < int32(4); v11 { - v10 = _hexval(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))) + v10 = _hexval(tls, Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(j))))) d = v10 } if !(v11 && v10 >= 0) { @@ -121668,7 +121666,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 { return 0 } - (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(v) + (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = Uint16FromInt32(v) if !(*(*int8)(unsafe.Pointer(s + uintptr(j))) != 0) && (brk >= 0 || i == int32(7)) { break } @@ -121691,7 +121689,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { i++ } if brk >= 0 { - Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(int32(2)*(i+int32(1)-brk))) + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, Uint64FromInt32(int32(2)*(i+int32(1)-brk))) j = 0 for { if !(j < int32(7)-i) { @@ -121711,7 +121709,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { } v14 = a a++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint16((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) v15 = a a++ *(*uint8)(unsafe.Pointer(v15)) = uint8((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) @@ -121755,7 +121753,7 @@ func Xlisten(tls *TLS, fd int32, backlog int32) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r int32) { @@ -121784,7 +121782,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i p = Xstrchr(tls, name, int32('%')) scopeid = uint64(0) if p != 0 && int64(p)-int64(name) < int64(64) { - Xmemcpy(tls, bp+20, name, uint64(int64(p)-int64(name))) + Xmemcpy(tls, bp+20, name, Uint64FromInt64(int64(p)-int64(name))) (*(*[64]int8)(unsafe.Pointer(bp + 20)))[int64(p)-int64(name)] = 0 name = bp + 20 } @@ -121799,13 +121797,13 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i if p != 0 { p++ v1 = p - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(v1)))-uint32('0') < uint32(10)) != 0 { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(v1)))-uint32('0') < uint32(10)) != 0 { scopeid = Xstrtoull(tls, p, bp+88, int32(10)) } else { *(*uintptr)(unsafe.Pointer(bp + 88)) = p - uintptr(1) } if *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { - if !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { + if !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { return -int32(2) } scopeid = uint64(Xif_nametoindex(tls, p)) @@ -121836,12 +121834,12 @@ const RR_CNAME = 5 func _is_valid_hostname(tls *TLS, host uintptr) (r int32) { var s uintptr _ = s - if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == uint64(-Int32FromInt32(1)) { + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == Uint64FromInt32(-Int32FromInt32(1)) { return 0 } s = host for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || int32(*(*uint8)(unsafe.Pointer(s))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) != 0) { break } goto _1 @@ -121947,13 +121945,13 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family p = v4 if v12 = v4 != 0; v12 { v5 = int32(*(*int8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: ; if v11 = !(v6 != 0); !v11 { v8 = int32(*(*int8)(unsafe.Pointer(p + uintptr(l)))) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -121974,7 +121972,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family for { if v17 = *(*int8)(unsafe.Pointer(p)) != 0; v17 { v14 = int32(*(*int8)(unsafe.Pointer(p))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: } @@ -122005,7 +122003,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family for { if v23 = *(*int8)(unsafe.Pointer(p)) != 0; v23 { v20 = int32(*(*int8)(unsafe.Pointer(p))) - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: } @@ -122021,7 +122019,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family for { if v28 = *(*int8)(unsafe.Pointer(z)) != 0; v28 { v25 = int32(*(*int8)(unsafe.Pointer(z))) - v26 = BoolInt32(v25 == int32(' ') || uint32(v25)-uint32('\t') < uint32(5)) + v26 = BoolInt32(v25 == int32(' ') || Uint32FromInt32(v25)-uint32('\t') < uint32(5)) goto _27 _27: } @@ -122036,7 +122034,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family *(*int8)(unsafe.Pointer(z)) = 0 if _is_valid_hostname(tls, p) != 0 { have_canon = int32(1) - Xmemcpy(tls, canon, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, canon, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) } } X__fclose_ca(tls, f) @@ -122093,7 +122091,7 @@ func _dns_parse_callback1(tls *TLS, c uintptr, rr int32, data uintptr, len1 int3 v2 = ctx + 16 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ - Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, uint64(len1)) + Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, Uint64FromInt32(len1)) return 0 } @@ -122136,7 +122134,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i qtypes[nq] = _afrr[i].Frr *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280 + 3)) = uint8(0) /* don't need AD flag */ /* Ensure query IDs are distinct. */ - if nq != 0 && int32(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == int32(*(*uint8)(unsafe.Pointer(bp))) { + if nq != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) { *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))++ } nq++ @@ -122154,13 +122152,13 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i if !(i < nq) { break } - if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { + if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { return -int32(4) } goto _2 @@ -122174,7 +122172,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i break } (*(*Tdpc_ctx)(unsafe.Pointer(bp + 10208))).Frrtype = qtypes[i] - if uint64((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { + if Uint64FromInt32((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] = int32(4800) } X__dns_parse(tls, bp+560+uintptr(i)*4800, (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i], __ccgo_fp(_dns_parse_callback1), bp+10208) @@ -122260,7 +122258,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f } for { v5 = int32(*(*int8)(unsafe.Pointer(p))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -122275,7 +122273,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f for { if v12 = *(*int8)(unsafe.Pointer(z)) != 0; v12 { v9 = int32(*(*int8)(unsafe.Pointer(z))) - v10 = BoolInt32(v9 == int32(' ') || uint32(v9)-uint32('\t') < uint32(5)) + v10 = BoolInt32(v9 == int32(' ') || Uint32FromInt32(v9)-uint32('\t') < uint32(5)) goto _11 _11: } @@ -122290,9 +122288,9 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if z == p { break } - if uint64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { - Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, uint64(int64(z)-int64(p))) - *(*int8)(unsafe.Pointer(canon + uintptr(uint64(int64(z)-int64(p)+int64(1))+l))) = 0 + if Uint64FromInt64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { + Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, Uint64FromInt64(int64(z)-int64(p))) + *(*int8)(unsafe.Pointer(canon + uintptr(Uint64FromInt64(int64(z)-int64(p)+int64(1))+l))) = 0 cnt = _name_from_dns(tls, buf, canon, canon, family, bp+256) if cnt != 0 { return cnt @@ -122364,7 +122362,7 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&_defpolicy))+uintptr(i)*20, uint64(_defpolicy[i].Flen1)) != 0 { goto _1 } - if int32(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&int32(_defpolicy[i].Fmask) != int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&Int32FromUint8(_defpolicy[i].Fmask) != Int32FromUint8(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { goto _1 } return uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 @@ -122377,20 +122375,20 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { } func _labelof(tls *TLS, a uintptr) (r int32) { - return int32((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) + return Int32FromUint8((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) } func _scopeof(tls *TLS, a uintptr) (r int32) { - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { - return int32(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { + return Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { return int32(2) } - if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { + if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { return int32(2) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { return int32(5) } return int32(14) @@ -122401,7 +122399,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(128) && !((int32(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^int32(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { + if !(i < uint32(128) && !((Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { break } goto _1 @@ -122409,7 +122407,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { ; i++ } - return int32(i) + return Int32FromUint32(i) } func _addrcmp(tls *TLS, _a uintptr, _b uintptr) (r int32) { @@ -122594,8 +122592,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } dpolicy = _policyof(tls, bp+32+8) dscope = _scopeof(tls, bp+32+8) - dlabel = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) - dprec = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) + dlabel = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) + dprec = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) prefixlen = 0 fd = Xsocket(tls, family1, Int32FromInt32(SOCK_DGRAM)|Int32FromInt32(SOCK_CLOEXEC), int32(IPPROTO_UDP)) if fd >= 0 { @@ -122626,7 +122624,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i ; i++ } - Xqsort(tls, buf, uint64(cnt), uint64(28), __ccgo_fp(_addrcmp)) + Xqsort(tls, buf, Uint64FromInt32(cnt), uint64(28), __ccgo_fp(_addrcmp)) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) return cnt } @@ -122677,8 +122675,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -int32(8) } (*(*Tservice)(unsafe.Pointer(buf))).Fport = uint16(0) - (*(*Tservice)(unsafe.Pointer(buf))).Fproto = uint8(proto) - (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(socktype) + (*(*Tservice)(unsafe.Pointer(buf))).Fproto = Uint8FromInt32(proto) + (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = Uint8FromInt32(socktype) return int32(1) } if name != 0 { @@ -122743,7 +122741,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } if v10 = p > bp; v10 { v7 = int32(*(*int8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v8 = BoolInt32(v7 == int32(' ') || uint32(v7)-uint32('\t') < uint32(5)) + v8 = BoolInt32(v7 == int32(' ') || Uint32FromInt32(v7)-uint32('\t') < uint32(5)) goto _9 _9: } @@ -122752,7 +122750,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } if v14 = *(*int8)(unsafe.Pointer(p + uintptr(l))) != 0; v14 { v11 = int32(*(*int8)(unsafe.Pointer(p + uintptr(l)))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: } @@ -122773,7 +122771,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i for { if v19 = *(*int8)(unsafe.Pointer(p)) != 0; v19 { v16 = int32(*(*int8)(unsafe.Pointer(p))) - v17 = BoolInt32(v16 == int32(' ') || uint32(v16)-uint32('\t') < uint32(5)) + v17 = BoolInt32(v16 == int32(' ') || Uint32FromInt32(v16)-uint32('\t') < uint32(5)) goto _18 _18: } @@ -122855,7 +122853,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = uint16(type1) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = Uint16FromInt32(type1) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -122866,7 +122864,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = uint16(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = Uint16FromInt32(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -122888,7 +122886,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fg.Frtgen_family = uint8(af) + })(unsafe.Pointer(bp))))).Fg.Frtgen_family = Uint8FromInt32(af) r = int32(Xsend(tls, fd, bp, uint64(20), 0)) if r < 0 { return r @@ -122900,13 +122898,13 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } h = bp for { - if !(uint64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { + if !(Uint64FromInt64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { break } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { return 0 } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { return -int32(1) } ret = (*(*func(*TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{cb})))(tls, ctx, h) @@ -122916,7 +122914,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, goto _1 _1: ; - h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } } return r1 @@ -122962,7 +122960,7 @@ func Xns_get16(tls *TLS, cp uintptr) (r uint32) { trc("tls=%v cp=%v, (%v:)", tls, cp, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(int32(*(*uint8)(unsafe.Pointer(cp)))< %v", r) }() } - return uint64(uint32(*(*uint8)(unsafe.Pointer(cp)))< int64(eom)-int64(p) { goto bad } @@ -123132,7 +123130,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin if rrnum == -int32(1) { rrnum = (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum } - if rrnum < 0 || rrnum >= int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if rrnum < 0 || rrnum >= Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { goto bad } if rrnum < (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum { @@ -123171,7 +123169,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin p4 = handle + 72 *(*uintptr)(unsafe.Pointer(p4)) += uintptr(2) (*Tns_rr)(unsafe.Pointer(rr)).Frdlength = uint16(Xns_get16(tls, *(*uintptr)(unsafe.Pointer(p4))-uintptr(2))) - if int64((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { + if Int64FromUint16((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { goto size } (*Tns_rr)(unsafe.Pointer(rr)).Frdata = (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr @@ -123182,7 +123180,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin (*Tns_rr)(unsafe.Pointer(rr)).Frdata = UintptrFromInt32(0) } (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum++ - if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { (*Tns_msg)(unsafe.Pointer(handle)).F_sect = section + int32(1) if (*Tns_msg)(unsafe.Pointer(handle)).F_sect == int32(_ns_s_max) { (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum = -int32(1) @@ -123211,7 +123209,7 @@ func Xns_name_uncompress(tls *TLS, msg uintptr, eom uintptr, src uintptr, dst ui } var r int32 _ = r - r = Xdn_expand(tls, msg, eom, src, dst, int32(dstsiz)) + r = Xdn_expand(tls, msg, eom, src, dst, Int32FromUint64(dstsiz)) if r < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) } @@ -123264,14 +123262,14 @@ func Xntohs(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*int8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } /* do we really need all these?? */ @@ -123298,10 +123296,10 @@ func Xgetprotoent(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(_idx) >= uint64(239) { + if Uint64FromInt32(_idx) >= uint64(239) { return UintptrFromInt32(0) } - _p.Fp_proto = int32(_protos[_idx]) + _p.Fp_proto = Int32FromUint8(_protos[_idx]) _p.Fp_name = uintptr(unsafe.Pointer(&_protos)) + uintptr(_idx+int32(1)) _p.Fp_aliases = uintptr(unsafe.Pointer(&_aliases)) _idx = int32(uint64(_idx) + (Xstrlen(tls, _p.Fp_name) + Uint64FromInt32(2))) @@ -123361,7 +123359,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr _ = int32(__SC_recvfrom) v2 = int64(fd) v3 = int64(buf) - v4 = int64(len1) + v4 = Int64FromUint64(len1) v5 = int64(flags) v6 = int64(addr) v7 = int64(alen) @@ -123377,7 +123375,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v8 = r goto _9 _9: - return X__syscall_ret(tls, uint64(v8)) + return X__syscall_ret(tls, Uint64FromInt64(v8)) } func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, timeout uintptr) (r int32) { @@ -123404,7 +123402,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti i-- mh += 64 } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), int64(vlen), int64(flags), int64(timeout), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), Int64FromUint32(vlen), Int64FromUint32(flags), int64(timeout), 0)))) } func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { @@ -123468,10 +123466,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { goto _1 _1: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { v6 = uintptr(0) } else { - v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v6 } @@ -123484,10 +123482,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { } p7 = msg + 40 *(*Tsocklen_t)(unsafe.Pointer(p7)) = Tsocklen_t(uint64(*(*Tsocklen_t)(unsafe.Pointer(p7))) + ((Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)) + (Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)))) - if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { v8 = uintptr(0) } else { - v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v8 (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_level = int32(SOL_SOCKET) @@ -123540,7 +123538,7 @@ func Xrecvmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r2 Tssize_t) { v9 = r goto _10 _10: - r1 = X__syscall_ret(tls, uint64(v9)) + r1 = X__syscall_ret(tls, Uint64FromInt64(v9)) if r1 >= 0 { X__convert_scm_timestamps(tls, msg, orig_controllen) } @@ -123577,13 +123575,13 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, if l != 0 && int32(*(*int8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { return -int32(1) } - n = int32(uint64(17) + l + BoolUint64(!!(l != 0))) - if l > uint64(253) || buflen < n || uint32(op) > uint32(15) || uint32(class) > uint32(255) || uint32(type1) > uint32(255) { + n = Int32FromUint64(uint64(17) + l + BoolUint64(!!(l != 0))) + if l > uint64(253) || buflen < n || Uint32FromInt32(op) > uint32(15) || Uint32FromInt32(class) > uint32(255) || Uint32FromInt32(type1) > uint32(255) { return -int32(1) } /* Construct query template - ID will be filled later */ - Xmemset(tls, bp, 0, uint64(n)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(op*int32(8) + int32(1)) + Xmemset(tls, bp, 0, Uint64FromInt32(n)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = Uint8FromInt32(op*int32(8) + int32(1)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(32) /* AD */ (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(5)] = uint8(1) Xmemcpy(tls, bp+uintptr(13), dname, l) @@ -123594,7 +123592,7 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, } j = i for { - if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && int32((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { + if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && Int32FromUint8((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { break } goto _2 @@ -123602,23 +123600,23 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, ; j++ } - if uint32(j-i)-uint32(1) > uint32(62) { + if Uint32FromInt32(j-i)-uint32(1) > uint32(62) { return -int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = uint8(j - i) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = Uint8FromInt32(j - i) goto _1 _1: ; i = j + int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(type1) - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(class) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = Uint8FromInt32(type1) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = Uint8FromInt32(class) /* Make a reasonably unpredictable id */ Xclock_gettime(tls, CLOCK_REALTIME, bp+280) - id = int32((uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = uint8(id / int32(256)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(id) - Xmemcpy(tls, buf, bp, uint64(n)) + id = Int32FromUint64((Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = Uint8FromInt32(id / int32(256)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = Uint8FromInt32(id) + Xmemcpy(tls, buf, bp, Uint64FromInt32(n)) return n } @@ -123754,7 +123752,7 @@ func _mtime(tls *TLS) (r uint64) { if Xclock_gettime(tls, int32(CLOCK_MONOTONIC), bp) < 0 && *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOSYS) { Xclock_gettime(tls, CLOCK_REALTIME, bp) } - return uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) + return Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) } func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, q uintptr, ql int32) (r1 int32) { @@ -123764,8 +123762,8 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, var _ /* mh at bp+40 */ Tmsghdr _, _ = fd, r *(*[2]Tuint8_t)(unsafe.Pointer(bp + 32)) = [2]Tuint8_t{ - 0: uint8(ql >> int32(8)), - 1: uint8(ql), + 0: Uint8FromInt32(ql >> int32(8)), + 1: Uint8FromInt32(ql), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -123774,7 +123772,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, }, 1: { Fiov_base: q, - Fiov_len: uint64(ql), + Fiov_len: Uint64FromInt32(ql), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 40)) = Tmsghdr{ @@ -123883,20 +123881,20 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a sl = uint32(16) nns = 0 family = int32(PF_INET) - v1 = uint64(nqueries+int32(2)) * 8 + v1 = Uint64FromInt32(nqueries+int32(2)) * 8 pfd = Xrealloc(tls, pfd, v1) - v2 = uint64(nqueries) * 4 + v2 = Uint64FromInt32(nqueries) * 4 qpos = Xrealloc(tls, qpos, v2) - v3 = uint64(nqueries) * 4 + v3 = Uint64FromInt32(nqueries) * 4 apos = Xrealloc(tls, apos, v3) - v4 = uint64(nqueries) * 2 + v4 = Uint64FromInt32(nqueries) * 2 alen_buf = Xrealloc(tls, alen_buf, v4) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), bp+200) - timeout = int32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) - attempts = int32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) + timeout = Int32FromUint32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) + attempts = Int32FromUint32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) nns = 0 for { - if !(uint32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { + if !(Uint32FromInt32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { break } iplit = conf + uintptr(nns)*28 @@ -123919,7 +123917,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_scope_id = (*Taddress)(unsafe.Pointer(iplit)).Fscopeid v6 = Int32FromInt32(PF_INET6) family = v6 - (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = uint16(v6) + (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = Uint16FromInt32(v6) } goto _5 _5: @@ -123957,7 +123955,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(i < nns) { break } - if int32((*(*[3]struct { + if Int32FromUint16((*(*[3]struct { Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte @@ -123979,7 +123977,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte - })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = uint16(family) + })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = Uint16FromInt32(family) if fd < 0 || Xbind(tls, fd, bp+88, sl) < 0 { if fd >= 0 { Xclose(tls, fd) @@ -124006,15 +124004,15 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), (nqueries+int32(1))*8))).Ffd = -int32(2) __pthread_cleanup_push(tls, bp+208, __ccgo_fp(_cleanup), pfd) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp + 200)), uintptr(0)) - Xmemset(tls, alens, 0, uint64(4)*uint64(nqueries)) + Xmemset(tls, alens, 0, uint64(4)*Uint64FromInt32(nqueries)) retry_interval = timeout / attempts next = 0 v10 = _mtime(tls) t2 = v10 t0 = v10 - t1 = t2 - uint64(retry_interval) + t1 = t2 - Uint64FromInt32(retry_interval) for { - if !(t2-t0 < uint64(timeout)) { + if !(t2-t0 < Uint64FromInt32(timeout)) { break } /* This is the loop exit condition: that all queries @@ -124032,7 +124030,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if i == nqueries { break } - if t2-t1 >= uint64(retry_interval) { + if t2-t1 >= Uint64FromInt32(retry_interval) { /* Query all configured namservers in parallel */ i = 0 for { @@ -124045,7 +124043,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(j < nns) { break } - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) goto _14 _14: ; @@ -124061,14 +124059,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry = int32(2) * nqueries } /* Wait for a response, or until time to retry */ - if Xpoll(tls, pfd, uint64(nqueries+int32(1)), int32(t1+uint64(retry_interval)-t2)) <= 0 { + if Xpoll(tls, pfd, Uint64FromInt32(nqueries+int32(1)), Int32FromUint64(t1+Uint64FromInt32(retry_interval)-t2)) <= 0 { goto _11 } for next < nqueries { *(*[1]Tiovec)(unsafe.Pointer(bp + 8)) = [1]Tiovec{ 0: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 232)) = Tmsghdr{ @@ -124102,7 +124100,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Find which query this answer goes with, if any */ i = next for { - if !(i < nqueries && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { + if !(i < nqueries && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { break } goto _16 @@ -124119,7 +124117,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Only accept positive or negative responses; * retry immediately on server failure, and ignore * all other codes such as refusal. */ - switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { case 0: fallthrough case int32(3): @@ -124129,7 +124127,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry-- } if v18 && v17 != 0 { - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) } fallthrough default: @@ -124149,14 +124147,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a next++ } } else { - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), uint64(rlen)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), Uint64FromInt32(rlen)) } /* Ignore further UDP if all slots full or TCP-mode */ if next == nqueries { (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), nqueries*8))).Fevents = 0 } /* If answer is truncated (TC bit), fallback to TCP */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { *(*int32)(unsafe.Pointer(alens + uintptr(i)*4)) = -int32(1) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), uintptr(0)) r = _start_tcp(tls, pfd+uintptr(i)*8, family, bp+116+uintptr(j)*28, sl, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), *(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))) @@ -124175,8 +124173,8 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a } if int32((*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Frevents)&int32(POLLOUT) != 0 { *(*[2]Tuint8_t)(unsafe.Pointer(bp + 52)) = [2]Tuint8_t{ - 0: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), - 1: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + 0: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), + 1: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), } *(*[2]Tiovec)(unsafe.Pointer(bp + 24)) = [2]Tiovec{ 0: { @@ -124185,14 +124183,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), - Fiov_len: uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + Fiov_len: Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 288)) = Tmsghdr{ Fmsg_iov: bp + 24, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+288, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) + _step_mh(tls, bp+288, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) r = int32(Xsendmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+288, int32(MSG_NOSIGNAL))) if r < 0 { goto out @@ -124220,14 +124218,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 344)) = Tmsghdr{ Fmsg_iov: bp + 56, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+344, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) + _step_mh(tls, bp+344, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) r = int32(Xrecvmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+344, 0)) if r <= 0 { goto out @@ -124236,14 +124234,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < int32(2) { goto _21 } - alen = int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) + alen = Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) if alen < int32(13) { goto out } if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < alen+int32(2) && *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < asize+int32(2) { goto _21 } - rcode = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) + rcode = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) if rcode != 0 && rcode != int32(3) { goto out } @@ -124321,7 +124319,7 @@ func X__res_send(tls *TLS, _msg uintptr, _msglen int32, _answer uintptr, _anslen } else { v1 = *(*int32)(unsafe.Pointer(bp + 24)) } - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, uint64(v1)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, Uint64FromInt32(v1)) } return r } @@ -124400,13 +124398,13 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } if v4 = !(Xstrncmp(tls, bp, __ccgo_ts+1156, uint64(7)) != 0); v4 { v1 = int32((*(*[256]int8)(unsafe.Pointer(bp)))[int32(7)]) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: } if v4 && v2 != 0 { p = Xstrstr(tls, bp, __ccgo_ts+1164) - if p != 0 && BoolInt32(uint32(*(*int8)(unsafe.Pointer(p + 6)))-uint32('0') < uint32(10)) != 0 { + if p != 0 && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(p + 6)))-uint32('0') < uint32(10)) != 0 { p += uintptr(6) x = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -124419,7 +124417,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1171) - if p != 0 && BoolInt32(uint32(*(*int8)(unsafe.Pointer(p + 9)))-uint32('0') < uint32(10)) != 0 { + if p != 0 && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(p + 9)))-uint32('0') < uint32(10)) != 0 { p += uintptr(9) x1 = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -124432,7 +124430,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1181) - if p != 0 && (BoolInt32(uint32(*(*int8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*int8)(unsafe.Pointer(p + 8))) == int32('.')) { + if p != 0 && (BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*int8)(unsafe.Pointer(p + 8))) == int32('.')) { p += uintptr(8) x2 = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -124448,7 +124446,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } if v11 = !(Xstrncmp(tls, bp, __ccgo_ts+1190, uint64(10)) != 0); v11 { v8 = int32((*(*[256]int8)(unsafe.Pointer(bp)))[int32(10)]) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -124459,7 +124457,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ p = bp + uintptr(11) for { v13 = int32(*(*int8)(unsafe.Pointer(p))) - v14 = BoolInt32(v13 == int32(' ') || uint32(v13)-uint32('\t') < uint32(5)) + v14 = BoolInt32(v13 == int32(' ') || Uint32FromInt32(v13)-uint32('\t') < uint32(5)) goto _15 _15: if !(v14 != 0) { @@ -124474,7 +124472,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ for { if v20 = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744)))) != 0; v20 { v17 = int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) - v18 = BoolInt32(v17 == int32(' ') || uint32(v17)-uint32('\t') < uint32(5)) + v18 = BoolInt32(v17 == int32(' ') || Uint32FromInt32(v17)-uint32('\t') < uint32(5)) goto _19 _19: } @@ -124497,7 +124495,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } if v24 = Xstrncmp(tls, bp, __ccgo_ts+1201, uint64(6)) != 0 && Xstrncmp(tls, bp, __ccgo_ts+1208, uint64(6)) != 0; !v24 { v21 = int32((*(*[256]int8)(unsafe.Pointer(bp)))[int32(6)]) - v22 = BoolInt32(v21 == int32(' ') || uint32(v21)-uint32('\t') < uint32(5)) + v22 = BoolInt32(v21 == int32(' ') || Uint32FromInt32(v21)-uint32('\t') < uint32(5)) goto _23 _23: } @@ -124507,7 +124505,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ p = bp + uintptr(7) for { v26 = int32(*(*int8)(unsafe.Pointer(p))) - v27 = BoolInt32(v26 == int32(' ') || uint32(v26)-uint32('\t') < uint32(5)) + v27 = BoolInt32(v26 == int32(' ') || Uint32FromInt32(v26)-uint32('\t') < uint32(5)) goto _28 _28: if !(v27 != 0) { @@ -124533,7 +124531,7 @@ no_resolv_conf: X__lookup_ipliteral(tls, conf, __ccgo_ts+1215, PF_UNSPEC) nns = int32(1) } - (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(nns) + (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = Uint32FromInt32(nns) return 0 } @@ -124561,18 +124559,18 @@ func Xsendmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32) (r } i = 0 for { - if !(uint32(i) < vlen) { + if !(Uint32FromInt32(i) < vlen) { break } /* As an unfortunate inconsistency, the sendmmsg API uses * unsigned int for the resulting msg_len, despite sendmsg * returning ssize_t. However Linux limits the total bytes * sent by sendmsg to INT_MAX, so the assignment is safe. */ - r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, int32(flags)) + r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, Int32FromUint32(flags)) if r < 0 { goto error } - (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = uint32(r) + (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = Uint32FromInt64(r) goto _1 _1: ; @@ -124631,10 +124629,10 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { goto _2 _2: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_controllen))-int64(c1)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_controllen))-int64(c1)) { v4 = uintptr(0) } else { - v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } c1 = v4 } @@ -124660,7 +124658,7 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { v12 = r goto _13 _13: - return X__syscall_ret(tls, uint64(v12)) + return X__syscall_ret(tls, Uint64FromInt64(v12)) } func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr uintptr, alen Tsocklen_t) (r1 Tssize_t) { @@ -124676,10 +124674,10 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui _ = int32(__SC_sendto) v2 = int64(fd) v3 = int64(buf) - v4 = int64(len1) + v4 = Int64FromUint64(len1) v5 = int64(flags) v6 = int64(addr) - v7 = int64(alen) + v7 = Int64FromUint32(alen) if int32(1) != 0 { r = ___syscall_cp(tls, int64(v1), v2, v3, v4, v5, v6, v7) } else { @@ -124692,7 +124690,7 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v8 = r goto _9 _9: - return X__syscall_ret(tls, uint64(v8)) + return X__syscall_ret(tls, Uint64FromInt64(v8)) } func Xendservent(tls *TLS) { @@ -124736,7 +124734,7 @@ func Xsetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, v3 = int64(level) v4 = int64(optname) v5 = int64(optval) - v6 = int64(optlen) + v6 = Int64FromUint32(optlen) v7 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v1), v2, v3, v4, v5, v6, v7) @@ -124762,13 +124760,13 @@ _9: break } if uint64(optlen) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } tv = optval s = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec us = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -124776,14 +124774,14 @@ _9: if optname == int32(SO_SNDTIMEO) { optname = int32(SO_SNDTIMEO_OLD) } - if !((uint64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v10 = uint64(us) + if !((Uint64FromInt64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v10 = Uint64FromInt64(us) } else { - v10 = uint64(0x7fffffff) + (0+uint64(us))>>int32(63) + v10 = uint64(0x7fffffff) + (0+Uint64FromInt64(us))>>int32(63) } *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, - 1: int64(int32(v10)), + 1: int64(Int32FromUint64(v10)), } v11 = int32(SYS_setsockopt) _ = int32(__SC_setsockopt) @@ -124791,7 +124789,7 @@ _9: v13 = int64(level) v14 = int64(optname) v15 = int64(bp) - v16 = int64(Uint64FromInt32(2) * Uint64FromInt64(8)) + v16 = Int64FromUint64(Uint64FromInt32(2) * Uint64FromInt64(8)) v17 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v11), v12, v13, v14, v15, v16, v17) @@ -124824,7 +124822,7 @@ _9: v22 = int64(level) v23 = int64(optname) v24 = int64(optval) - v25 = int64(optlen) + v25 = Int64FromUint32(optlen) v26 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v20), v21, v22, v23, v24, v25, v26) @@ -124843,7 +124841,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { @@ -124875,7 +124873,7 @@ func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xsockatmark(tls *TLS, s int32) (r int32) { @@ -124945,7 +124943,7 @@ _9: _18: s = int32(v17) if s < 0 { - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } if type1&int32(SOCK_CLOEXEC) != 0 { X__syscall3(tls, int64(__NR3264_fcntl), int64(s), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) @@ -124954,7 +124952,7 @@ _9: X__syscall3(tls, int64(__NR3264_fcntl), int64(s), int64(Int32FromInt32(F_SETFL)), int64(Int32FromInt32(O_NONBLOCK))) } } - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr) (r2 int32) { @@ -124986,7 +124984,7 @@ func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr v8 = r goto _9 _9: - r1 = int32(X__syscall_ret(tls, uint64(v8))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v8))) if r1 < 0 && (*(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EINVAL) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EPROTONOSUPPORT)) && type1&(Int32FromInt32(SOCK_CLOEXEC)|Int32FromInt32(SOCK_NONBLOCK)) != 0 { v10 = int32(SYS_socketpair) _ = int32(__SC_socketpair) @@ -125008,7 +125006,7 @@ _9: v17 = r goto _18 _18: - r1 = int32(X__syscall_ret(tls, uint64(v17))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v17))) if r1 < 0 { return r1 } @@ -125128,7 +125126,7 @@ func _itoa1(tls *TLS, p uintptr, x Tuint32_t) (r uintptr) { for cond := true; cond; cond = x != 0 { p-- v2 = p - *(*int8)(unsafe.Pointer(v2)) = int8(uint32('0') + x%uint32(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint32(uint32('0') + x%uint32(10)) x /= uint32(10) } return p @@ -125205,11 +125203,11 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) + len1 = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) i = 0 for { if !(i < (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]) { @@ -125260,18 +125258,18 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = v8 goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { rv = int32(ENOMEM) goto cleanup_f } - tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) + tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) if !(tmp1 != 0) { rv = *(*int32)(unsafe.Pointer(X__errno_location(tls))) goto cleanup_f } *(*uintptr)(unsafe.Pointer(mem)) = tmp1 - *(*Tsize_t)(unsafe.Pointer(nmem)) = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) + *(*Tsize_t)(unsafe.Pointer(nmem)) = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) } if (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] != 0 { *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(mem)))) = *(*uintptr)(unsafe.Pointer(buf)) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) @@ -125301,7 +125299,7 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz } (*Tgroup)(unsafe.Pointer(gr)).Fgr_name = *(*uintptr)(unsafe.Pointer(buf)) (*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd = (*Tgroup)(unsafe.Pointer(gr)).Fgr_name + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) - (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) + (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) (*Tgroup)(unsafe.Pointer(gr)).Fgr_mem = *(*uintptr)(unsafe.Pointer(mem)) if *(*int8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr(-Int32FromInt32(1)))) != 0 || *(*int8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]-int32(1)))) != 0 { rv = int32(EIO) @@ -125476,10 +125474,10 @@ func _atou(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -125654,11 +125652,11 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u goto cleanup } if (*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRFOUND)] != 0 { - nscdbuf = Xcalloc(tls, uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) + nscdbuf = Xcalloc(tls, Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) if !(nscdbuf != 0) { goto cleanup } - nbytes = uint64(4) * uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) + nbytes = uint64(4) * Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) if nbytes != 0 && !(Xfread(tls, nscdbuf, nbytes, uint64(1), f) != 0) { if !(Xferror(tls, f) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EIO) @@ -125787,7 +125785,7 @@ func _itoa2(tls *TLS, p uintptr, x Tuint32_t) (r uintptr) { for cond := true; cond; cond = x != 0 { p-- v2 = p - *(*int8)(unsafe.Pointer(v2)) = int8(uint32('0') + x%uint32(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint32(uint32('0') + x%uint32(10)) x /= uint32(10) } return p @@ -125869,11 +125867,11 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { + if Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) + len1 = Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) if len1 > *(*Tsize_t)(unsafe.Pointer(size)) || !(*(*uintptr)(unsafe.Pointer(buf)) != 0) { tmp = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(buf)), len1) if !(tmp != 0) { @@ -125897,8 +125895,8 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_passwd + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_shell = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) /* Don't assume that nscd made sure to null terminate strings. * It's supposed to, but malicious nscd should be ignored * rather than causing a crash. @@ -126046,10 +126044,10 @@ func _atou1(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126217,7 +126215,7 @@ func X__nscd_query(tls *TLS, req Tint32_t, key uintptr, buf uintptr, len1 Tsize_ *(*[3]Tint32_t)(unsafe.Pointer(bp + 32)) = [3]Tint32_t{ 0: int32(NSCDVERSION), 1: req, - 2: int32(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), + 2: Int32FromUint64(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -126290,11 +126288,11 @@ retry: if !(i < Uint64FromInt64(12)/Uint64FromInt64(4)) { break } - v3 = uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) + v3 = Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) v4 = v3>>int32(24) | v3>>int32(8)&uint32(0xff00) | v3<>int32(24) | v7>>int32(8)&uint32(0xff00) | v7< %v", r) }() } - return int64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) + return Int64FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) } func Xlrand48(tls *TLS) (r int64) { @@ -126583,7 +126581,7 @@ func Xjrand48(tls *TLS, s uintptr) (r int64) { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) + return int64(Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) } func Xmrand48(tls *TLS) (r int64) { @@ -126609,7 +126607,7 @@ func Xrand(tls *TLS) (r int32) { defer func() { trc("-> %v", r) }() } _seed = uint64(6364136223846793005)*_seed + uint64(1) - return int32(_seed >> int32(33)) + return Int32FromUint64(_seed >> int32(33)) } func _temper(tls *TLS, x uint32) (r uint32) { @@ -126629,7 +126627,7 @@ func Xrand_r(tls *TLS, seed uintptr) (r int32) { _ = v1 v1 = *(*uint32)(unsafe.Pointer(seed))*Uint32FromInt32(1103515245) + Uint32FromInt32(12345) *(*uint32)(unsafe.Pointer(seed)) = v1 - return int32(_temper(tls, v1) / uint32(2)) + return Int32FromUint32(_temper(tls, v1) / uint32(2)) } /* @@ -126687,15 +126685,15 @@ func _lcg64(tls *TLS, x Tuint64_t) (r Tuint64_t) { } func _savestate(tls *TLS) (r uintptr) { - *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) = uint32(_n<> int32(16)) - _i = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) - _j = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) + _n = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> int32(16)) + _i = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) + _j = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) } func ___srandom(tls *TLS, seed uint32) { @@ -126802,11 +126800,11 @@ func Xrandom(tls *TLS) (r int64) { if _n == 0 { v1 = _lcg31(tls, *(*Tuint32_t)(unsafe.Pointer(_x1))) *(*Tuint32_t)(unsafe.Pointer(_x1)) = v1 - k = int64(v1) + k = Int64FromUint32(v1) goto end } *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) += *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_j)*4)) - k = int64(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) + k = Int64FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) _i++ v2 = _i if v2 == _n { @@ -126844,8 +126842,8 @@ func Xsrand48(tls *TLS, seed int64) { defer tls.Free(16) *(*[3]uint16)(unsafe.Pointer(bp)) = [3]uint16{ 0: uint16(0x330e), - 1: uint16(seed), - 2: uint16(seed >> int32(16)), + 1: Uint16FromInt64(seed), + 2: Uint16FromInt64(seed >> int32(16)), } Xseed48(tls, bp) } @@ -126873,7 +126871,7 @@ func Xexecl(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -126917,7 +126915,7 @@ func Xexecle(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -126961,7 +126959,7 @@ func Xexeclp(tls *TLS, file uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -126996,7 +126994,7 @@ func Xexecve(tls *TLS, path uintptr, argv uintptr, envp uintptr) (r int32) { defer func() { trc("-> %v", r) }() } /* do we need to use environ if envp is null? */ - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) } func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { @@ -127022,18 +127020,18 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { if !(path != 0) { path = __ccgo_ts + 1356 } - k = Xstrnlen(tls, file, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + k = Xstrnlen(tls, file, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if k > uint64(NAME_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENAMETOOLONG) return -int32(1) } - l = Xstrnlen(tls, path, uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) + l = Xstrnlen(tls, path, Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) p = path for { v2 = l + k + uint64(1) b = Xrealloc(tls, b, v2) z = X__strchrnul(tls, p, int32(':')) - if uint64(int64(z)-int64(p)) >= l { + if Uint64FromInt64(int64(z)-int64(p)) >= l { v3 = z z++ if !(*(*int8)(unsafe.Pointer(v3)) != 0) { @@ -127041,7 +127039,7 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { } goto _1 } - Xmemcpy(tls, b, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, b, p, Uint64FromInt64(int64(z)-int64(p))) *(*int8)(unsafe.Add(unsafe.Pointer(b), int64(z)-int64(p))) = int8('/') Xmemcpy(tls, b+uintptr(int64(z)-int64(p))+BoolUintptr(z > p), file, k+uint64(1)) Xexecve(tls, b, argv, envp) @@ -127099,9 +127097,9 @@ func Xfexecve(tls *TLS, fd int32, argv uintptr, envp uintptr) (r1 int32) { _ = r r = int32(X__syscall5(tls, int64(SYS_execveat), int64(fd), int64(__ccgo_ts), int64(argv), int64(envp), int64(Int32FromInt32(AT_EMPTY_PATH)))) if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - X__procfdname(tls, bp, uint32(fd)) + X__procfdname(tls, bp, Uint32FromInt32(fd)) Xexecve(tls, bp, argv, envp) if *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EBADF) @@ -127420,8 +127418,8 @@ func Xposix_spawnattr_setflags(tls *TLS, attr uintptr, flags int16) (r int32) { } var all_flags uint32 _ = all_flags - all_flags = uint32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) - if uint32(flags) & ^all_flags != 0 { + all_flags = Uint32FromInt32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) + if Uint32FromInt16(flags) & ^all_flags != 0 { return int32(EINVAL) } (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(flags) @@ -127461,7 +127459,7 @@ func Xvfork(tls *TLS) (r Tpid_t) { defer func() { trc("-> %v", r) }() } /* vfork syscall cannot be made from C code */ - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clone), int64(Int32FromInt32(SIGCHLD)), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clone), int64(Int32FromInt32(SIGCHLD)), int64(Int32FromInt32(0)))))) } func Xwait(tls *TLS, status uintptr) (r Tpid_t) { @@ -127477,7 +127475,7 @@ func Xwaitid(tls *TLS, type1 Tidtype_t, id Tid_t, info uintptr, options int32) ( trc("tls=%v type1=%v id=%v info=%v options=%v, (%v:)", tls, type1, id, info, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), int64(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), Int64FromUint32(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) } func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { @@ -127485,7 +127483,7 @@ func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { trc("tls=%v pid=%v status=%v options=%v, (%v:)", tls, pid, status, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) } const BRACKET = -3 @@ -127512,13 +127510,13 @@ func _str_next(tls *TLS, str uintptr, n Tsize_t, step uintptr) (r int32) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(0) return 0 } - if uint32(*(*int8)(unsafe.Pointer(str))) >= uint32(128) { + if Uint32FromInt8(*(*int8)(unsafe.Pointer(str))) >= uint32(128) { k = Xmbtowc(tls, bp, str, n) if k < 0 { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) return -int32(1) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k) return *(*Twchar_t)(unsafe.Pointer(bp)) } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) @@ -127594,13 +127592,13 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i goto escaped escaped: ; - if uint32(*(*int8)(unsafe.Pointer(pat))) >= uint32(128) { + if Uint32FromInt8(*(*int8)(unsafe.Pointer(pat))) >= uint32(128) { k1 = Xmbtowc(tls, bp, pat, m) if k1 < 0 { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(0) return -int32(2) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k1 + esc) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k1 + esc) return *(*Twchar_t)(unsafe.Pointer(bp)) } return int32(*(*int8)(unsafe.Pointer(pat))) @@ -127610,13 +127608,13 @@ func _casefold(tls *TLS, k int32) (r int32) { var c int32 var v1 uint32 _, _ = c, v1 - c = int32(Xtowupper(tls, uint32(k))) + c = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(k))) if c == k { - v1 = Xtowlower(tls, uint32(k)) + v1 = Xtowlower(tls, Uint32FromInt32(k)) } else { - v1 = uint32(c) + v1 = Uint32FromInt32(c) } - return int32(v1) + return Int32FromUint32(v1) } func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { @@ -127658,7 +127656,7 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { return 0 } if *(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4)) { - if uint32(k)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || uint32(kfold)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { + if Uint32FromInt32(k)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || Uint32FromInt32(kfold)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { return BoolInt32(!(inv != 0)) } } @@ -127673,16 +127671,16 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { p++ } if z == int32(':') && int64(p-uintptr(1))-int64(p0) < int64(16) { - Xmemcpy(tls, bp+8, p0, uint64(int64(p-uintptr(1))-int64(p0))) + Xmemcpy(tls, bp+8, p0, Uint64FromInt64(int64(p-uintptr(1))-int64(p0))) (*(*[16]int8)(unsafe.Pointer(bp + 8)))[int64(p-uintptr(1))-int64(p0)] = 0 - if Xiswctype(tls, uint32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, uint32(kfold), Xwctype(tls, bp+8)) != 0 { + if Xiswctype(tls, Uint32FromInt32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, Uint32FromInt32(kfold), Xwctype(tls, bp+8)) != 0 { return BoolInt32(!(inv != 0)) } } goto _1 } - if uint32(*(*int8)(unsafe.Pointer(p))) < uint32(128) { - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(uint8(*(*int8)(unsafe.Pointer(p)))) + if Uint32FromInt8(*(*int8)(unsafe.Pointer(p))) < uint32(128) { + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint8(Uint8FromInt8(*(*int8)(unsafe.Pointer(p)))) } else { l1 = Xmbtowc(tls, bp, p, uint64(4)) if l1 < 0 { @@ -127772,7 +127770,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(p < endpat) { break } - switch _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) { + switch _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) { case -int32(2): return int32(FNM_NOMATCH) case -int32(5): @@ -127803,7 +127801,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(s > str && tailcnt != 0) { break } - if v9 = uint32(*(*int8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) < uint32(128); !v9 { + if v9 = Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) < uint32(128); !v9 { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v8 = int32(4) } else { @@ -127816,7 +127814,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, for { s-- v10 = s - if !(uint32(uint8(*(*int8)(unsafe.Pointer(v10))))-uint32(0x80) < uint32(0x40) && s > str) { + if !(uint32(Uint8FromInt8(*(*int8)(unsafe.Pointer(v10))))-uint32(0x80) < uint32(0x40) && s > str) { break } } @@ -127833,9 +127831,9 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, /* Check that the pat and str tails match */ p = ptail for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) - v12 = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + v12 = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) k = v12 if v12 <= 0 { if c != END { @@ -127870,7 +127868,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, p = pat s = str for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) /* Encountering * completes/commits a component */ if c == -int32(5) { @@ -127878,7 +127876,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, str = s break } - k = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + k = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) if !(k != 0) { return int32(FNM_NOMATCH) } @@ -127906,13 +127904,13 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, } /* If we failed, advance str, by 1 char if it's a valid * char, or past all invalid bytes otherwise. */ - k = _str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) + k = _str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) if k > 0 { str += uintptr(*(*Tsize_t)(unsafe.Pointer(bp + 8))) } else { str++ for { - if !(_str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) < 0) { + if !(_str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) < 0) { break } goto _16 @@ -127950,7 +127948,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } p = pat for { - v4 = _pat_next(tls, p, uint64(-Int32FromInt32(1)), bp, flags) + v4 = _pat_next(tls, p, Uint64FromInt32(-Int32FromInt32(1)), bp, flags) c = v4 if !(v4 != END && c != int32('/')) { break @@ -127963,7 +127961,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if c != int32(*(*int8)(unsafe.Pointer(s))) && (!(*(*int8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { return int32(FNM_NOMATCH) } - if _fnmatch_internal(tls, pat, uint64(int64(p)-int64(pat)), str, uint64(int64(s)-int64(str)), flags) != 0 { + if _fnmatch_internal(tls, pat, Uint64FromInt64(int64(p)-int64(pat)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0 { return int32(FNM_NOMATCH) } if !(c != 0) { @@ -127984,7 +127982,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if int32(*(*int8)(unsafe.Pointer(s))) != int32('/') { goto _5 } - if !(_fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(int64(s)-int64(str)), flags) != 0) { + if !(_fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0) { return 0 } goto _5 @@ -127994,7 +127992,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } } } - return _fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(-Int32FromInt32(1)), flags) + return _fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt32(-Int32FromInt32(1)), flags) } const GLOB_ABORTED = 2 @@ -128083,7 +128081,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag return 0 } pat += uintptr(i) - pos += uint64(j) + pos += Uint64FromInt64(j) v4 = Int64FromInt32(0) j = v4 i = v4 @@ -128114,7 +128112,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag in_bracket = 0 pat += uintptr(i + int64(1)) i = int64(-int32(1)) - pos += uint64(j + int64(1)) + pos += Uint64FromInt64(j + int64(1)) j = int64(-int32(1)) } /* Only store a character if it fits in the buffer, but if @@ -128122,10 +128120,10 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag * must be remembered and handled later only if the bracket * is unterminated (and thereby a literal), so as not to * disallow long bracket expressions with short matches. */ - if pos+uint64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { + if pos+Uint64FromInt64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { v5 = j j++ - *(*int8)(unsafe.Pointer(buf + uintptr(pos+uint64(v5)))) = *(*int8)(unsafe.Pointer(pat + uintptr(i))) + *(*int8)(unsafe.Pointer(buf + uintptr(pos+Uint64FromInt64(v5)))) = *(*int8)(unsafe.Pointer(pat + uintptr(i))) } else { if in_bracket != 0 { overflow = int32(1) @@ -128202,7 +128200,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag break } /* Quickly skip non-directories when there's pattern left. */ - if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { + if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { continue } l = Xstrlen(tls, de+19) @@ -128240,7 +128238,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } else { v11 = __ccgo_ts } - r = _do_glob(tls, buf, pos+l, int32((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) + r = _do_glob(tls, buf, pos+l, Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) if r != 0 { Xclosedir(tls, dir) return r @@ -128342,7 +128340,7 @@ func _expand_tilde(tls *TLS, pat uintptr, buf uintptr, pos uintptr) (r int32) { ; home = (*(*Tpasswd)(unsafe.Pointer(bp))).Fpw_dir } - for i < uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*int8)(unsafe.Pointer(home)) != 0 { + for i < Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*int8)(unsafe.Pointer(home)) != 0 { v10 = i i++ v11 = home @@ -128805,7 +128803,7 @@ func _tre_ast_new_iter(tls *TLS, mem Ttre_mem_t, arg uintptr, min int32, max int (*Ttre_iteration_t)(unsafe.Pointer(iter)).Farg = arg (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmin = min (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmax = max - SetBitFieldPtr8Uint32(iter+16, uint32(minimal), 0, 0x1) + SetBitFieldPtr8Uint32(iter+16, Uint32FromInt32(minimal), 0, 0x1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnum_submatches = (*Ttre_ast_node_t)(unsafe.Pointer(arg)).Fnum_submatches return node } @@ -128874,7 +128872,7 @@ func _tre_stack_new(tls *TLS, size int32, max_size int32, increment int32) (r ui _ = s s = Xmalloc(tls, uint64(24)) if s != UintptrFromInt32(0) { - (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*uint64(size)) + (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*Uint64FromInt32(size)) if (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack == UintptrFromInt32(0) { Xfree(tls, s) return UintptrFromInt32(0) @@ -128911,7 +128909,7 @@ func _tre_stack_push(tls *TLS, s uintptr, value Ttre_stack_item) (r Treg_errcode if new_size > (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size { new_size = (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size } - new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*uint64(new_size)) + new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*Uint64FromInt32(new_size)) if new_buffer == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -129081,7 +129079,7 @@ func _tre_new_lit(tls *TLS, p uintptr) (r uintptr) { return uintptr(0) } *(*int32)(unsafe.Pointer(p + 20)) *= int32(2) - a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, uint64((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) + a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, Uint64FromInt32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) if !(a != 0) { return uintptr(0) } @@ -129107,8 +129105,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { /* assumes islower(c) and isupper(c) are exclusive and toupper(c)!=c if islower(c). multiple opposite case characters are not supported */ - if Xiswlower(tls, uint32(c)) != 0 { - v2 = int32(Xtowupper(tls, uint32(c))) + if Xiswlower(tls, Uint32FromInt32(c)) != 0 { + v2 = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(c))) e = v2 b = v2 c++ @@ -129117,7 +129115,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowupper(tls, uint32(c)) != uint32(e) { + if Xtowupper(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _3 @@ -129127,8 +129125,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { e++ } } else { - if Xiswupper(tls, uint32(c)) != 0 { - v4 = int32(Xtowlower(tls, uint32(c))) + if Xiswupper(tls, Uint32FromInt32(c)) != 0 { + v4 = Int32FromUint32(Xtowlower(tls, Uint32FromInt32(c))) e = v4 b = v4 c++ @@ -129137,7 +129135,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowlower(tls, uint32(c)) != uint32(e) { + if Xtowlower(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _5 @@ -129204,7 +129202,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint start = s for { class = uint64(0) - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 <= 0 { if *(*int8)(unsafe.Pointer(s)) != 0 { v2 = int32(REG_BADPAT) @@ -129232,7 +129230,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint break } if int32(*(*int8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { - Xmemcpy(tls, bp+4, s, uint64(len1)) + Xmemcpy(tls, bp+4, s, Uint64FromInt32(len1)) (*(*[15]int8)(unsafe.Pointer(bp + 4)))[len1] = 0 class = Xwctype(tls, bp+4) break @@ -129255,7 +129253,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint s += uintptr(len1) if int32(*(*int8)(unsafe.Pointer(s))) == int32('-') && int32(*(*int8)(unsafe.Pointer(s + 1))) != int32(']') { s++ - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) max = *(*Twchar_t)(unsafe.Pointer(bp)) /* XXX - Should use collation order instead of encoding values in character ranges. */ @@ -129315,7 +129313,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*(*Tliterals)(unsafe.Pointer(bp))).Fmem = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem (*(*Tliterals)(unsafe.Pointer(bp))).Flen1 = 0 (*(*Tliterals)(unsafe.Pointer(bp))).Fcap1 = int32(32) - (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) + (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) if !((*(*Tliterals)(unsafe.Pointer(bp))).Fa != 0) { return int32(REG_ESPACE) } @@ -129344,7 +129342,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) } /* Sort the array if we need to negate it. */ - Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) + Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) /* extra lit for the last negated range */ lit = _tre_new_lit(tls, bp) if !(lit != 0) { @@ -129356,12 +129354,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) /* negated classes */ if (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 != 0 { - nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) + nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) if !(nc != 0) { err = int32(REG_ESPACE) goto parse_bracket_done } - Xmemcpy(tls, nc, bp+24+8, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) + Xmemcpy(tls, nc, bp+24+8, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) *(*Ttre_ctype_t)(unsafe.Pointer(nc + uintptr((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*8)) = uint64(0) } } @@ -129417,14 +129415,14 @@ parse_bracket_done: func _parse_dup_count(tls *TLS, s uintptr, n uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(n)) = -int32(1) - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return s } *(*int32)(unsafe.Pointer(n)) = 0 for { *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (int32(*(*int8)(unsafe.Pointer(s))) - int32('0')) s++ - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { break } goto _1 @@ -129467,11 +129465,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u func _hexval1(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -129590,7 +129588,7 @@ _2: if !(i < len1 && v < int32(0x110000)) { break } - c = _hexval1(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(i))))) + c = _hexval1(tls, Uint32FromInt8(*(*int8)(unsafe.Pointer(s + uintptr(i))))) if c < 0 { break } @@ -129633,7 +129631,7 @@ _2: /* fallthrough */ fallthrough default: - if !(ere != 0) && uint32(*(*int8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { + if !(ere != 0) && Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { /* back reference */ val = int32(*(*int8)(unsafe.Pointer(s))) - int32('0') v19 = ctx + 44 @@ -129722,14 +129720,14 @@ _12: goto parse_literal parse_literal: ; - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 < 0 { return int32(REG_BADPAT) } - if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { + if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { /* multiple opposite case characters are not supported */ - tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) - tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) if tmp11 != 0 && tmp21 != 0 { node = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, tmp11, tmp21) } else { @@ -130191,7 +130189,7 @@ func _tre_add_tags(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr, tnfa u } (*(*Ttre_submatch_data_t)(unsafe.Pointer((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fsubmatch_data + uintptr(id1)*16))).Fparents = UintptrFromInt32(0) if i2 > 0 { - p = Xmalloc(tls, uint64(4)*uint64(i2+Int32FromInt32(1))) + p = Xmalloc(tls, uint64(4)*Uint64FromInt32(i2+Int32FromInt32(1))) if p == UintptrFromInt32(0) { status = int32(REG_ESPACE) goto _10 @@ -131095,7 +131093,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; s2++ } - new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*uint64(s1+s2+Int32FromInt32(1))) + new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*Uint64FromInt32(s1+s2+Int32FromInt32(1))) if !(new_set != 0) { return UintptrFromInt32(0) } @@ -131124,7 +131122,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*uint64(i+num_tags+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*Uint64FromInt32(i+num_tags+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -131184,7 +131182,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*uint64(i+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*Uint64FromInt32(i+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -131502,7 +131500,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -131533,7 +131531,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -131591,8 +131589,8 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun } /* Use the character ranges, assertions, etc. from `p1' for the transition from `p1' to `p2'. */ - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition)*4)))*56 (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate_id = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition if (*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fclass != 0 { @@ -131623,7 +131621,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun ; i++ } - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*uint64(i+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*Uint64FromInt32(i+Int32FromInt32(1))) if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -131662,7 +131660,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = UintptrFromInt32(0) /* If there were any tags, allocate an array and fill it. */ if i+j > 0 { - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*uint64(i+j+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(i+j+Int32FromInt32(1))) if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags != 0) { return int32(REG_ESPACE) } @@ -131816,10 +131814,10 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) + (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) tree = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fn /* Referring to nonexistent subexpressions is illegal. */ - if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > int32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { + if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > Int32FromUint64((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { errcode = int32(REG_ESUBREG) if int32(1) != 0 { goto error_exit @@ -131835,7 +131833,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs = BoolInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref >= 0) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_approx = 0 - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) /* Set up tags for submatch addressing. If REG_NOSUB is set and the regexp does not have back references, this can be skipped. */ if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs != 0 || !(cflags&Int32FromInt32(REG_NOSUB) != 0) { @@ -131848,7 +131846,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 { - tag_directions = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + tag_directions = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) if tag_directions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -131856,16 +131854,16 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftag_directions = tag_directions - Xmemset(tls, tag_directions, -int32(1), uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + Xmemset(tls, tag_directions, -int32(1), uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) } - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - submatch_data = Xcalloc(tls, uint64(uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) + submatch_data = Xcalloc(tls, uint64(Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) if submatch_data == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -131918,14 +131916,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - counts = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + counts = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if counts == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - offs = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + offs = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if offs == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -131958,7 +131956,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; i++ } - transitions = Xcalloc(tls, uint64(uint32(add)+uint32(1)), uint64(56)) + transitions = Xcalloc(tls, uint64(Uint32FromInt32(add)+uint32(1)), uint64(56)) if transitions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -131966,7 +131964,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftransitions = transitions - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) errcode = _tre_ast_to_tnfa(tls, tree, transitions, counts, offs) if errcode != REG_OK { errcode = errcode @@ -131981,7 +131979,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { i++ p += 56 } - initial = Xcalloc(tls, uint64(uint32(i)+uint32(1)), uint64(56)) + initial = Xcalloc(tls, uint64(Uint32FromInt32(i)+uint32(1)), uint64(56)) if initial == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132011,14 +132009,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; j++ } - (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*uint64(j+Int32FromInt32(1))) + (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) if !((*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags != 0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*uint64(j+Int32FromInt32(1))) + Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fassertions = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Fassertions i++ @@ -132028,7 +132026,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { p += 56 } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fstate = UintptrFromInt32(0) - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ffinal = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*(*Ttre_pos_and_tags_t)(unsafe.Pointer((*Ttre_ast_node_t)(unsafe.Pointer(tree)).Flastpos))).Fposition)*4)))*56 (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags = cflags @@ -132165,7 +132163,7 @@ func Xregerror(tls *TLS, e int32, preg uintptr, buf uintptr, size Tsize_t) (r Ts s++ } s = X__lctrans_cur(tls, s) - return uint64(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) + return Uint64FromInt32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) } const tre_bt_mem_alloc = 0 @@ -132286,23 +132284,23 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags everything in a single large block with calloc(). */ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ - if uint64(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { + if Uint64FromInt32(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { return int32(REG_ESPACE) } /* Likewise check rbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Likewise check pbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Compute the length of the block we need. */ - tbytes = uint64(8) * uint64(num_tags) - rbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) - pbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) - xbytes = uint64(8) * uint64(num_tags) - total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes + tbytes = uint64(8) * Uint64FromInt32(num_tags) + rbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) + pbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) + xbytes = uint64(8) * Uint64FromInt32(num_tags) + total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes /* Allocate the memory. */ buf = Xcalloc(tls, total_bytes, uint64(1)) if buf == UintptrFromInt32(0) { @@ -132311,32 +132309,32 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = buf tmp_buf = buf + uintptr(tbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v1 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v1 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v1 = uint64(0) } tmp_buf += uintptr(v1) reach_next = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v2 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v2 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v2 = uint64(0) } tmp_buf += uintptr(v2) reach = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v3 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v3 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v3 = uint64(0) } tmp_buf += uintptr(v3) reach_pos = tmp_buf tmp_buf += uintptr(pbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v4 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v4 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v4 = uint64(0) } @@ -132387,7 +132385,7 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags trans_i = (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Finitial for (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != UintptrFromInt32(0) { if (*(*Ttre_reach_pos_t)(unsafe.Pointer(reach_pos + uintptr((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id)*16))).Fpos < pos { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { trans_i += 56 continue } @@ -132526,8 +132524,8 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags break } /* Does this transition match the input symbol? */ - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _14 } /* Compute the tags after this transition. */ @@ -132711,7 +132709,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fprev = UintptrFromInt32(0) (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fnext = UintptrFromInt32(0) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags != 0 { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !(tags != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -132725,7 +132723,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states != 0 { - states_seen = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) + states_seen = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) if !(states_seen != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -132784,7 +132782,7 @@ retry: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { goto _4 } if state == UintptrFromInt32(0) { @@ -132810,7 +132808,7 @@ retry: } (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -132908,11 +132906,11 @@ _9: bt = *(*int32)(unsafe.Pointer(&(*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fu)) /* Get the substring we need to match against. Remember to turn off REG_NOSUB temporarily. */ - _tre_fill_pmatch(tls, uint64(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) + _tre_fill_pmatch(tls, Uint64FromInt32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) so = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_so eo = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_eo bt_len = eo - so - result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), uint64(bt_len)) + result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), Uint64FromInt64(bt_len)) if result == 0 { /* Back reference matched. Check for infinite loop. */ if bt_len == 0 { @@ -132968,8 +132966,8 @@ _9: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _13 } if next_state == UintptrFromInt32(0) { @@ -132998,7 +132996,7 @@ _9: } (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133225,7 +133223,7 @@ func Xregexec(tls *TLS, preg uintptr, string1 uintptr, nmatch Tsize_t, pmatch ui nmatch = uint64(0) } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 && nmatch > uint64(0) { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if tags == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -133322,7 +133320,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(TRE_MEM_BLOCK_SIZE) } else { if size*uint64(8) > uint64(TRE_MEM_BLOCK_SIZE) { - block_size = int32(size * uint64(8)) + block_size = Int32FromUint64(size * uint64(8)) } else { block_size = int32(TRE_MEM_BLOCK_SIZE) } @@ -133331,7 +133329,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) return UintptrFromInt32(0) } - (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, uint64(block_size)) + (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, Uint64FromInt32(block_size)) if (*Ttre_list_t)(unsafe.Pointer(l)).Fdata == UintptrFromInt32(0) { Xfree(tls, l) (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) @@ -133346,12 +133344,12 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl } (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fcurrent = l (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr = (*Ttre_list_t)(unsafe.Pointer(l)).Fdata - (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(block_size) + (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = Uint64FromInt32(block_size) } } /* Make sure the next pointer will be aligned. */ - if (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { - v1 = uint64(8) - (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) + if (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { + v1 = uint64(8) - (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) } else { v1 = uint64(0) } @@ -133438,8 +133436,8 @@ func _resize(tls *TLS, nel Tsize_t, htab uintptr) (r int32) { _, _, _, _, _, _, _, _ = e, i, j, newe, newsize, oldsize, oldtab, v4 oldsize = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fmask + uint64(1) oldtab = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fentries - if nel > uint64(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { - nel = uint64(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) + if nel > Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { + nel = Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) } newsize = uint64(MINSIZE) for { @@ -133882,7 +133880,7 @@ func X__tsearch_balance(tls *TLS, p uintptr) (r int32) { n = *(*uintptr)(unsafe.Pointer(p)) h0 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8))) h1 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8 + 1*8))) - if uint32(h0-h1)+uint32(1) < uint32(3) { + if Uint32FromInt32(h0-h1)+uint32(1) < uint32(3) { old = (*Tnode1)(unsafe.Pointer(n)).Fh if h0 < h1 { v1 = h1 + int32(1) @@ -133993,7 +133991,7 @@ func Xpoll(tls *TLS, fds uintptr, n Tnfds_t, timeout int32) (r int32) { } else { v1 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), int64(n), int64(v1), int64(Int32FromInt32(0)), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), Int64FromUint64(n), int64(v1), int64(Int32FromInt32(0)), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) } func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r int32) { @@ -134028,7 +134026,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r int32 } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), int64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), Int64FromUint64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) } func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts uintptr, mask uintptr) (r int32) { @@ -134044,7 +134042,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui var _ /* data at bp+16 */ [2]Tsyscall_arg_t _, _, _, _, _ = ns, s, v1, v2, v3 *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 16)) = [2]Tsyscall_arg_t{ - 0: int64(uint64(mask)), + 0: Int64FromUint64(uint64(mask)), 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } if ts != 0 { @@ -134068,7 +134066,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) } func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uintptr) (r int32) { @@ -134095,9 +134093,9 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin v2 = 0 } us = v2 - max_time = int64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) + max_time = Int64FromUint64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) if s < 0 || us < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if us/int64(1000000) > max_time-s { s = max_time @@ -134120,7 +134118,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 16)) = [2]Tsyscall_arg_t{ 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) } var _all_mask = [1]uint64{ @@ -134170,9 +134168,9 @@ func Xgetitimer(tls *TLS, which int32, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) } func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { @@ -134180,7 +134178,7 @@ func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { trc("tls=%v pid=%v sig=%v, (%v:)", tls, pid, sig, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) } func Xkillpg(tls *TLS, pgid Tpid_t, sig int32) (r int32) { @@ -134257,7 +134255,7 @@ func Xraise(tls *TLS, sig int32) (r int32) { var _ /* set at bp+0 */ Tsigset_t _ = ret X__block_app_sigs(tls, bp) - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) X__restore_sigs(tls, bp) return ret } @@ -134293,8 +134291,8 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { vs = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_sec ius = (*Titimerval)(unsafe.Pointer(new1)).Fit_interval.Ftv_usec vus = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_usec - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, @@ -134309,9 +134307,9 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) } type Tk_sigaction = struct { @@ -134350,8 +134348,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = old, r, r1, v, v1, v10, v11, v12, v15, v18, v19, v2, v22, v25, v26, v3, v4, v7 if sa != 0 { if uint64(*(*uintptr)(unsafe.Pointer(sa))) > uint64(1) { - v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(uint64(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 - v2 = int64(uint64(1) << (uint64(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) + v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(Uint64FromInt32(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 + v2 = Int64FromUint64(uint64(1) << (Uint64FromInt32(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) if Uint64FromInt64(8) == Uint64FromInt64(4) { v3 = v1 // __asm__ __volatile__ ("dbar 0" : : : "memory"); @@ -134398,7 +134396,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) Fr [0][2]Tuint32_t Fv Tuint64_t }{} - *(*uint64)(unsafe.Pointer(bp + 8)) = uint64(v2) + *(*uint64)(unsafe.Pointer(bp + 8)) = Uint64FromInt64(v2) if *(*Tuint32_t)(unsafe.Pointer(bp + 8)) != 0 { v11 = v10 // __asm__ __volatile__ ("dbar 0" : : : "memory"); @@ -134500,8 +134498,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) } } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fhandler = *(*uintptr)(unsafe.Pointer(sa)) - (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = uint64((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) - Xmemcpy(tls, bp+16+16, sa+8, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = Uint64FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) + Xmemcpy(tls, bp+16+16, sa+8, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } if sa != 0 { v25 = bp + 16 @@ -134516,10 +134514,10 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) r1 = int32(X__syscall4(tls, int64(SYS_rt_sigaction), int64(sig), int64(v25), int64(v26), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if old1 != 0 && !(r1 != 0) { *(*uintptr)(unsafe.Pointer(old1)) = (*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fhandler - (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = int32((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) - Xmemcpy(tls, old1+8, bp+48+16, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = Int32FromUint64((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) + Xmemcpy(tls, old1+8, bp+48+16, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { @@ -134532,7 +134530,7 @@ func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { var r int32 var _ /* set at bp+0 */ [1]uint64 _ = r - if uint32(sig)-uint32(32) < uint32(3) || uint32(sig)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(sig)-uint32(32) < uint32(3) || Uint32FromInt32(sig)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134566,8 +134564,8 @@ func Xsigaddset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134590,7 +134588,7 @@ func Xsigaltstack(tls *TLS, ss uintptr, old uintptr) (r int32) { return -int32(1) } } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) } const SST_SIZE = 8 @@ -134608,7 +134606,7 @@ func Xsigandset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) & *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -134627,8 +134625,8 @@ func Xsigdelset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134682,7 +134680,7 @@ func Xsigisemptyset(tls *TLS, set uintptr) (r int32) { _ = i i = uint64(0) for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } if *(*uint64)(unsafe.Pointer(set + uintptr(i)*8)) != 0 { @@ -134703,8 +134701,8 @@ func Xsigismember(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { return 0 } return BoolInt32(!!(*(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8))&(Uint64FromUint64(1)<<(uint64(s)&(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)))) != 0)) @@ -134723,7 +134721,7 @@ func Xsigorset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) { l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) | *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -134740,7 +134738,7 @@ func Xsigpending(tls *TLS, set uintptr) (r int32) { trc("tls=%v set=%v, (%v:)", tls, set, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) } func Xsigprocmask(tls *TLS, how int32, set uintptr, old uintptr) (r1 int32) { @@ -134776,7 +134774,7 @@ func Xsigqueue(tls *TLS, pid Tpid_t, sig int32, value Tsigval) (r1 int32) { *(*Tuid_t)(unsafe.Pointer(bp + 16 + 4)) = Xgetuid(tls) X__block_app_sigs(tls, bp+128) *(*Tpid_t)(unsafe.Pointer(bp + 16)) = Xgetpid(tls) - r = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) X__restore_sigs(tls, bp+128) return r } @@ -134836,7 +134834,7 @@ func Xsigsuspend(tls *TLS, mask uintptr) (r int32) { trc("tls=%v mask=%v, (%v:)", tls, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) } func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r int32) { @@ -134853,7 +134851,7 @@ func Xsigtimedwait(tls *TLS, mask uintptr, si uintptr, timeout uintptr) (r int32 for cond := true; cond; cond = ret == -int32(EINTR) { ret = _do_sigtimedwait(tls, mask, si, timeout) } - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsigwait(tls *TLS, mask uintptr, sig uintptr) (r int32) { @@ -134932,7 +134930,7 @@ func Xchmod(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(mode))))) } func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { @@ -134945,12 +134943,12 @@ func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]int8 _ = ret - ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), int64(mode))) + ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), Int64FromUint32(mode))) if ret != -int32(EBADF) || X__syscall2(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp), int64(mode))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp), Int64FromUint32(mode))))) } func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r int32) { @@ -134965,36 +134963,36 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in var _ /* st at bp+0 */ Tstat _, _, _ = fd2, ret, v1 if !(flag != 0) { - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), Int64FromUint32(mode))))) } - ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), int64(mode), int64(flag))) + ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), Int64FromUint32(mode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag != int32(AT_SYMLINK_NOFOLLOW) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if Xfstatat(tls, fd, path, bp, flag) != 0 { return -int32(1) } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } v1 = int32(X__syscall3(tls, int64(SYS_openat), int64(fd), int64(path), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_PATH)|Int32FromInt32(O_NOFOLLOW)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC)))) fd2 = v1 if v1 < 0 { if fd2 == -int32(ELOOP) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } - return int32(X__syscall_ret(tls, uint64(fd2))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd2))) } - X__procfdname(tls, bp+128, uint32(fd2)) + X__procfdname(tls, bp+128, Uint32FromInt32(fd2)) ret = Xstat(tls, bp+128, bp) if !(ret != 0) { if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - ret = int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + ret = int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } else { - ret = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+128), int64(mode))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+128), Int64FromUint32(mode))))) } } X__syscall1(tls, int64(SYS_close), int64(fd2)) @@ -135007,7 +135005,7 @@ func X__fstat(tls *TLS, fd int32, st uintptr) (r int32) { defer func() { trc("-> %v", r) }() } if fd < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EBADF)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EBADF)))) } return X__fstatat(tls, fd, __ccgo_ts, st, int32(AT_EMPTY_PATH)) } @@ -135079,20 +135077,20 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r Fst_uid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_uid, Fst_gid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_gid, Fst_rdev: uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_sec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_nsec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec * int64(1000) @@ -135190,7 +135188,7 @@ func Xmkdir(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mkdirat), int64(-Int32FromInt32(100)), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mkdirat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(mode))))) } func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { @@ -135198,7 +135196,7 @@ func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v fd=%v path=%v mode=%v, (%v:)", tls, fd, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), Int64FromUint32(mode))))) } func Xmkfifo(tls *TLS, path uintptr, mode Tmode_t) (r int32) { @@ -135222,7 +135220,7 @@ func Xmknod(tls *TLS, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { trc("tls=%v path=%v mode=%v dev=%v, (%v:)", tls, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_mknodat), int64(-Int32FromInt32(100)), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_mknodat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { @@ -135230,7 +135228,7 @@ func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int trc("tls=%v fd=%v path=%v mode=%v dev=%v, (%v:)", tls, fd, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { @@ -135243,7 +135241,7 @@ func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { func ___statfs(tls *TLS, path uintptr, buf uintptr) (r int32) { *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(__NR3264_statfs), int64(path), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(__NR3264_statfs), int64(path), int64(buf))))) } func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { @@ -135252,7 +135250,7 @@ func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { defer func() { trc("-> %v", r) }() } *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(__NR3264_fstatfs), int64(fd), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(__NR3264_fstatfs), int64(fd), int64(buf))))) } func _fixup(tls *TLS, out uintptr, in uintptr) { @@ -135272,7 +135270,7 @@ func _fixup(tls *TLS, out uintptr, in uintptr) { (*Tstatvfs)(unsafe.Pointer(out)).Ff_files = (*Tstatfs)(unsafe.Pointer(in)).Ff_files (*Tstatvfs)(unsafe.Pointer(out)).Ff_ffree = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree (*Tstatvfs)(unsafe.Pointer(out)).Ff_favail = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree - (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = uint64(*(*int32)(unsafe.Pointer(in + 56))) + (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = Uint64FromInt32(*(*int32)(unsafe.Pointer(in + 56))) (*Tstatvfs)(unsafe.Pointer(out)).Ff_flag = (*Tstatfs)(unsafe.Pointer(in)).Ff_flags (*Tstatvfs)(unsafe.Pointer(out)).Ff_namemax = (*Tstatfs)(unsafe.Pointer(in)).Ff_namelen (*Tstatvfs)(unsafe.Pointer(out)).Ff_type = uint32((*Tstatfs)(unsafe.Pointer(in)).Ff_type) @@ -135313,7 +135311,7 @@ func Xumask(tls *TLS, mode Tmode_t) (r Tmode_t) { trc("tls=%v mode=%v, (%v:)", tls, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_umask), int64(mode))))) + return Uint32FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_umask), Int64FromUint32(mode))))) } func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r1 int32) { @@ -135327,7 +135325,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r times = uintptr(0) } r = int32(X__syscall4(tls, int64(SYS_utimensat), int64(fd), int64(path), int64(times), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__fclose_ca(tls *TLS, f uintptr) (r int32) { @@ -135369,7 +135367,7 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { } else { v2 = int32(F_NORD) } - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(v2) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(v2) } /* Apply close-on-exec flag */ if Xstrchr(tls, mode, int32('e')) != 0 { @@ -135451,12 +135449,12 @@ func X__fopen_rb_ca(tls *TLS, filename uintptr, f uintptr, buf uintptr, len1 Tsi defer func() { trc("-> %v", r) }() } Xmemset(tls, f, 0, uint64(232)) - (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) + (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) if (*TFILE)(unsafe.Pointer(f)).Ffd < 0 { return uintptr(0) } X__syscall3(tls, int64(__NR3264_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) (*TFILE)(unsafe.Pointer(f)).Fbuf = buf + uintptr(UNGET) (*TFILE)(unsafe.Pointer(f)).Fbuf_size = len1 - uint64(UNGET) (*TFILE)(unsafe.Pointer(f)).Fread = __ccgo_fp(X__stdio_read) @@ -135477,22 +135475,22 @@ func X__overflow(tls *TLS, f uintptr, _c int32) (r int32) { var v2, v3 uintptr var _ /* c at bp+0 */ uint8 _, _, _ = v1, v2, v3 - *(*uint8)(unsafe.Pointer(bp)) = uint8(_c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(_c) if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return -int32(1) } - if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && int32(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { + if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { v1 = *(*uint8)(unsafe.Pointer(bp)) v3 = f + 40 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ *(*uint8)(unsafe.Pointer(v2)) = v1 - return int32(v1) + return Int32FromUint8(v1) } if (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, bp, uint64(1)) != uint64(1) { return -int32(1) } - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } func _dummy9(tls *TLS, fd int32) (r int32) { @@ -135504,7 +135502,7 @@ func X__stdio_close(tls *TLS, f uintptr) (r int32) { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) } var _dummy_file = uintptr(0) @@ -135577,9 +135575,9 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { }, } if (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len != 0 { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) } else { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), Int64FromUint64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) } cnt = v1 if cnt <= 0 { @@ -135588,11 +135586,11 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32(F_EOF) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v2) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v2) return uint64(0) } - if uint64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { - return uint64(cnt) + if Uint64FromInt64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { + return Uint64FromInt64(cnt) } cnt = Tssize_t(uint64(cnt) - (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len) (*TFILE)(unsafe.Pointer(f)).Frpos = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -135631,7 +135629,7 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { Fiov_base: (*TFILE)(unsafe.Pointer(f)).Fwbase, - Fiov_len: uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), + Fiov_len: Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), }, 1: { Fiov_base: buf, @@ -135642,8 +135640,8 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) rem = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len + (*(*Tiovec)(unsafe.Pointer(iov + 1*16))).Fiov_len iovcnt = int32(2) for { - cnt = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) - if uint64(cnt) == rem { + cnt = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) + if Uint64FromInt64(cnt) == rem { (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v2 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fwbase = v2 @@ -135664,14 +135662,14 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) } return v5 } - rem -= uint64(cnt) - if uint64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { + rem -= Uint64FromInt64(cnt) + if Uint64FromInt64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { cnt = Tssize_t(uint64(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len) iov += 16 iovcnt-- } (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base + uintptr(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= uint64(cnt) + (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= Uint64FromInt64(cnt) goto _1 _1: } @@ -135775,7 +135773,7 @@ func X__uflow(tls *TLS, f uintptr) (r int32) { defer tls.Free(16) var _ /* c at bp+0 */ uint8 if !(X__toread(tls, f) != 0) && (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fread})))(tls, f, bp, uint64(1)) == uint64(1) { - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } return -int32(1) } @@ -135806,7 +135804,7 @@ func Xclearerr(tls *TLS, f uintptr) { v1 = 0 } __need_unlock = v1 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -135912,7 +135910,7 @@ func X__fpending(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__fpurge(tls *TLS, f uintptr) (r int32) { @@ -135956,7 +135954,7 @@ func X__freadahead(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { @@ -135967,7 +135965,7 @@ func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { if (*TFILE)(unsafe.Pointer(f)).Frpos == (*TFILE)(unsafe.Pointer(f)).Frend { return uintptr(0) } - *(*Tsize_t)(unsafe.Pointer(sizep)) = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + *(*Tsize_t)(unsafe.Pointer(sizep)) = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) return (*TFILE)(unsafe.Pointer(f)).Frpos } @@ -136244,7 +136242,7 @@ _9: v12 = f + 8 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__uflow(tls, f) } @@ -136315,7 +136313,7 @@ func Xfgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -136351,27 +136349,27 @@ func Xfgetln(tls *TLS, f uintptr, plen uintptr) (r uintptr) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } Xungetc(tls, v2, f) if v6 = (*TFILE)(unsafe.Pointer(f)).Frend != 0; v6 { - v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) z = v5 } if v6 && v5 != 0 { ret = (*TFILE)(unsafe.Pointer(f)).Frpos z++ v7 = z - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(int64(v7) - int64(ret)) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(int64(v7) - int64(ret)) (*TFILE)(unsafe.Pointer(f)).Frpos = z } else { *(*[1]Tsize_t)(unsafe.Pointer(bp)) = [1]Tsize_t{} v8 = Xgetline(tls, f+168, bp, f) l = v8 if v8 > 0 { - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(l) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(l) ret = (*TFILE)(unsafe.Pointer(f)).Fgetln_buf } } @@ -136429,17 +136427,17 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { n-- for n != 0 { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v2 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v2 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v2) - if k < uint64(n) { + k = Uint64FromInt64(v2) + if k < Uint64FromInt32(n) { v3 = k } else { - v3 = uint64(n) + v3 = Uint64FromInt32(n) } k = v3 Xmemcpy(tls, p, (*TFILE)(unsafe.Pointer(f)).Frpos, k) @@ -136454,7 +136452,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -136504,27 +136502,27 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { _, _, _, _, _, _, _ = c, first, l, v1, v2, v3, v4 /* Convert character from buffer if possible */ if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - l = uint64(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) + l = Uint64FromInt32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) if l+uint64(1) >= uint64(1) { *(*uintptr)(unsafe.Pointer(f + 8)) += uintptr(l + BoolUint64(!(l != 0))) /* l==0 means 1 byte, null */ - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } /* Convert character byte-by-byte */ *(*Tmbstate_t)(unsafe.Pointer(bp + 8)) = Tmbstate_t{} first = int32(1) - for cond := true; cond; cond = l == uint64(-Int32FromInt32(2)) { + for cond := true; cond; cond = l == Uint64FromInt32(-Int32FromInt32(2)) { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } v1 = v2 c = v1 - *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(v1) + *(*uint8)(unsafe.Pointer(bp + 16)) = Uint8FromInt32(v1) if c < 0 { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) @@ -136533,16 +136531,16 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { return uint32(0xffffffff) } l = Xmbrtowc(tls, bp, bp+16, uint64(1), bp+8) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - Xungetc(tls, int32(*(*uint8)(unsafe.Pointer(bp + 16))), f) + Xungetc(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 16))), f) } return uint32(0xffffffff) } first = 0 } - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { @@ -136560,9 +136558,9 @@ func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - wc = int32(___fgetwc_unlocked_internal(tls, f)) + wc = Int32FromUint32(___fgetwc_unlocked_internal(tls, f)) *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(wc) + return Uint32FromInt32(wc) } func Xfgetwc(tls *TLS, f uintptr) (r Twint_t) { @@ -136633,7 +136631,7 @@ func Xfgetws(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { } v4 = p p += 4 - *(*Twchar_t)(unsafe.Pointer(v4)) = int32(c) + *(*Twchar_t)(unsafe.Pointer(v4)) = Int32FromUint32(c) if c == uint32('\n') { break } @@ -136730,7 +136728,7 @@ func _mseek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -136744,13 +136742,13 @@ _1: 1: (*Tcookie)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) - if off < -base || off > int64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + if off < -base || off > Int64FromUint64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _mread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -136784,7 +136782,7 @@ func _mwrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2, rem Tsize_t _, _, _ = c, len2, rem c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _mwrite(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwpos, len2) < len2 { @@ -136832,7 +136830,7 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } - if !(buf != 0) && size > uint64(Int64FromInt64(INT64_MAX)) { + if !(buf != 0) && size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -136864,7 +136862,7 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { } else { v2 = int32(F_NORD) } - (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } if int32(*(*int8)(unsafe.Pointer(mode))) == int32('r') { (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = size @@ -136904,7 +136902,7 @@ func Xfopen(tls *TLS, filename uintptr, mode uintptr) (r uintptr) { } /* Compute the flags to pass to open() */ flags = X__fmodeflags(tls, mode) - fd = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) if fd < 0 { return uintptr(0) } @@ -136949,8 +136947,8 @@ func _cookieread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { if ret <= 0 { goto bail } - readlen += uint64(ret) - remain -= uint64(ret) + readlen += Uint64FromInt64(ret) + remain -= Uint64FromInt64(ret) } if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) || remain > BoolUint64(!!((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0)) { return readlen @@ -136976,7 +136974,7 @@ bail: } else { v4 = int32(F_ERR) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v4) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v4) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Frend = v5 (*TFILE)(unsafe.Pointer(f)).Frpos = v5 @@ -136989,7 +136987,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var ret Tssize_t _, _, _, _, _ = fc, len2, ret, v1, v2 fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if !((*Tfcookie)(unsafe.Pointer(fc)).Fiofuncs.Fwrite != 0) { return len1 } @@ -137009,7 +137007,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) return uint64(0) } - return uint64(ret) + return Uint64FromInt64(ret) } func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { @@ -137020,7 +137018,7 @@ func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { var res int32 _, _ = fc, res fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - if uint32(whence) > uint32(2) { + if Uint32FromInt32(whence) > uint32(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -137073,7 +137071,7 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun } else { v2 = int32(F_NORD) } - (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } /* Set up our fcookie */ (*Tcookie_FILE)(unsafe.Pointer(f)).Ffc.Fcookie = cookie @@ -137152,15 +137150,15 @@ _9: if v8 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v11 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v11 = Uint8FromInt32(c) v13 = f + 40 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ *(*uint8)(unsafe.Pointer(v12)) = v11 - v10 = int32(v11) + v10 = Int32FromUint8(v11) } else { - v10 = X__overflow(tls, f, int32(uint8(c))) + v10 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v10 v14 = f + 140 @@ -137227,15 +137225,15 @@ func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -137284,16 +137282,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - if BoolInt32(uint32(c) < uint32(128)) != 0 { - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if BoolInt32(Uint32FromInt32(c) < uint32(128)) != 0 { + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v1 } else { @@ -137306,16 +137304,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } } else { l = Xwctomb(tls, bp, c) - if l < 0 || X__fwritex(tls, bp, uint64(l), f) < uint64(l) { + if l < 0 || X__fwritex(tls, bp, Uint64FromInt32(l), f) < Uint64FromInt32(l) { c = Int32FromUint32(0xffffffff) } } } - if uint32(c) == uint32(0xffffffff) { + if Uint32FromInt32(c) == uint32(0xffffffff) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137331,11 +137329,11 @@ func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { v1 = 0 } __need_unlock = v1 - c = int32(X__fputwc_unlocked(tls, c, f)) + c = Int32FromUint32(X__fputwc_unlocked(tls, c, f)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137400,7 +137398,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { ___unlockfile(tls, f) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return int32(l) /* 0 or -1 */ + return Int32FromUint64(l) /* 0 or -1 */ } func Xfputws_unlocked(tls *TLS, _ws uintptr, f uintptr) (r int32) { @@ -137436,8 +137434,8 @@ func Xfread(tls *TLS, destv uintptr, size Tsize_t, nmemb Tsize_t, f uintptr) (r *(*int32)(unsafe.Pointer(f + 136)) |= (*TFILE)(unsafe.Pointer(f)).Fmode - int32(1) if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { /* First exhaust the buffer. */ - if uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { - v2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + if Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { + v2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) } else { v2 = l } @@ -137513,7 +137511,7 @@ func Xfreopen(tls *TLS, filename uintptr, mode uintptr, f uintptr) (r uintptr) { X__syscall3(tls, int64(__NR3264_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } fl &= ^(Int32FromInt32(O_CREAT) | Int32FromInt32(O_EXCL) | Int32FromInt32(O_CLOEXEC)) - if X__syscall_ret(tls, uint64(X__syscall3(tls, int64(__NR3264_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(__NR3264_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { goto fail } } else { @@ -137611,7 +137609,7 @@ func X__fseeko_unlocked(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32) v3 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v3 (*TFILE)(unsafe.Pointer(f)).Frpos = v3 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) return 0 } @@ -137945,14 +137943,14 @@ func X__fwritex(tls *TLS, s uintptr, l Tsize_t, f uintptr) (r Tsize_t) { if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return uint64(0) } - if l > uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { + if l > Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { return (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, s, l) } if (*TFILE)(unsafe.Pointer(f)).Flbf >= 0 { /* Match /^(.*\n|)/ */ i = l for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { break } goto _1 @@ -138084,7 +138082,7 @@ _9: v12 = f + 8 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__uflow(tls, f) } @@ -138155,7 +138153,7 @@ func Xgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138188,7 +138186,7 @@ func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -138260,7 +138258,7 @@ _9: v12 = f + 8 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__uflow(tls, f) } @@ -138331,7 +138329,7 @@ func Xgetchar(tls *TLS) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138356,7 +138354,7 @@ func Xgetchar_unlocked(tls *TLS) (r int32) { v3 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -138395,13 +138393,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize } for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v3 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v3 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v3) + k = Uint64FromInt64(v3) } else { z = uintptr(0) k = uint64(0) @@ -138445,7 +138443,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -138466,7 +138464,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) - *(*uint8)(unsafe.Pointer(v8)) = uint8(c) + *(*uint8)(unsafe.Pointer(v8)) = Uint8FromInt32(c) } else { v10 = int8(c) v11 = i @@ -138483,7 +138481,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize if __need_unlock != 0 { ___unlockfile(tls, f) } - return int64(i) + return Int64FromUint64(i) } func X__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t) { @@ -138523,7 +138521,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { v5 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -138647,7 +138645,7 @@ func _ms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -138661,13 +138659,13 @@ _1: 1: (*Tcookie1)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie1)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > int64(0x7fffffffffffffff)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie1)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -138675,7 +138673,7 @@ func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _ms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -138781,7 +138779,7 @@ func _wms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -138795,14 +138793,14 @@ _1: 1: (*Tcookie2)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie2)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)-base { goto fail } Xmemset(tls, c+48, 0, uint64(8)) - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie2)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -138813,7 +138811,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _wms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -138822,7 +138820,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { } if len1+(*Tcookie2)(unsafe.Pointer(c)).Fpos >= (*Tcookie2)(unsafe.Pointer(c)).Fspace { len2 = uint64(2)*(*Tcookie2)(unsafe.Pointer(c)).Fspace + uint64(1) | ((*Tcookie2)(unsafe.Pointer(c)).Fpos + len1 + uint64(1)) - if len2 > uint64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { + if len2 > Uint64FromInt64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { return uint64(0) } newbuf = Xrealloc(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf, len2*uint64(4)) @@ -138836,7 +138834,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { (*Tcookie2)(unsafe.Pointer(c)).Fspace = len2 } len2 = Xmbsnrtowcs(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf+uintptr((*Tcookie2)(unsafe.Pointer(c)).Fpos)*4, bp, len1, (*Tcookie2)(unsafe.Pointer(c)).Fspace-(*Tcookie2)(unsafe.Pointer(c)).Fpos, c+48) - if len2 == uint64(-Int32FromInt32(1)) { + if len2 == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } *(*Tsize_t)(unsafe.Pointer(c + 16)) += len2 @@ -138922,7 +138920,7 @@ func Xpclose(tls *TLS, f uintptr) (r1 int32) { } } if r < 0 { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } return *(*int32)(unsafe.Pointer(bp)) } @@ -139020,15 +139018,15 @@ _9: if v8 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v11 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v11 = Uint8FromInt32(c) v13 = f + 40 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ *(*uint8)(unsafe.Pointer(v12)) = v11 - v10 = int32(v11) + v10 = Int32FromUint8(v11) } else { - v10 = X__overflow(tls, f, int32(uint8(c))) + v10 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v10 v14 = f + 140 @@ -139095,15 +139093,15 @@ func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139131,15 +139129,15 @@ func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139206,15 +139204,15 @@ _9: if v8 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v11 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v11 = Uint8FromInt32(c) v13 = f + 40 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ *(*uint8)(unsafe.Pointer(v12)) = v11 - v10 = int32(v11) + v10 = Int32FromUint8(v11) } else { - v10 = X__overflow(tls, f, int32(uint8(c))) + v10 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v10 v14 = f + 140 @@ -139281,15 +139279,15 @@ func Xputchar(tls *TLS, c1 int32) (r int32) { v2 = uintptr(unsafe.Pointer(&X__stdout_FILE)) l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139309,15 +139307,15 @@ func Xputchar_unlocked(tls *TLS, c int32) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v2 = Uint8FromInt32(c) v4 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(c))) + v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139339,15 +139337,15 @@ func Xputs(tls *TLS, s uintptr) (r1 int32) { } __need_unlock = v1 if v6 = Xfputs(tls, s, uintptr(unsafe.Pointer(&X__stdout_FILE))) < 0; !v6 { - if int32(uint8(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v3 = uint8(Int32FromUint8('\n')) + if Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v3 = Uint8FromInt32(Int32FromUint8('\n')) v5 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ *(*uint8)(unsafe.Pointer(v4)) = v3 - v2 = int32(v3) + v2 = Int32FromUint8(v3) } else { - v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(Int32FromUint8('\n')))) + v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n')))) } } r = -BoolInt32(v6 || v2 < 0) @@ -139365,7 +139363,7 @@ func Xputw(tls *TLS, _x int32, f uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) *(*int32)(unsafe.Pointer(bp)) = _x - return int32(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) + return Int32FromUint64(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) } func Xputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -139403,7 +139401,7 @@ func Xremove(tls *TLS, path uintptr) (r1 int32) { if r == -int32(EISDIR) { r = int32(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(AT_REMOVEDIR)))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { @@ -139411,7 +139409,7 @@ func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { trc("tls=%v old=%v new1=%v, (%v:)", tls, old, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_renameat2), int64(-Int32FromInt32(100)), int64(old), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_renameat2), int64(-Int32FromInt32(100)), int64(old), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) } func Xrewind(tls *TLS, f uintptr) { @@ -139427,7 +139425,7 @@ func Xrewind(tls *TLS, f uintptr) { } __need_unlock = v1 X__fseeko_unlocked(tls, f, 0, 0) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -139702,7 +139700,7 @@ func Xtmpfile(tls *TLS) (r uintptr) { break } ___randname(tls, bp+uintptr(13)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) if fd >= 0 { X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(bp), int64(Int32FromInt32(0))) f = X__fdopen(tls, fd, __ccgo_ts+1573) @@ -139786,12 +139784,12 @@ func Xungetc(tls *TLS, c int32, f uintptr) (r int32) { v3 = f + 8 *(*uintptr)(unsafe.Pointer(v3))-- v2 = *(*uintptr)(unsafe.Pointer(v3)) - *(*uint8)(unsafe.Pointer(v2)) = uint8(c) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(c) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(uint8(c)) + return Int32FromUint8(Uint8FromInt32(c)) } func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { @@ -139823,7 +139821,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { X__toread(tls, f) } if v3 = !((*TFILE)(unsafe.Pointer(f)).Frpos != 0) || c == uint32(0xffffffff); !v3 { - v2 = int32(Xwcrtomb(tls, bp, int32(c), uintptr(0))) + v2 = Int32FromUint64(Xwcrtomb(tls, bp, Int32FromUint32(c), uintptr(0))) l = v2 } if v3 || v2 < 0 || (*TFILE)(unsafe.Pointer(f)).Frpos < (*TFILE)(unsafe.Pointer(f)).Fbuf-uintptr(UNGET)+uintptr(l) { @@ -139841,9 +139839,9 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { } else { p6 = f + 8 *(*uintptr)(unsafe.Pointer(p6)) -= uintptr(l) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint64(l)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, Uint64FromInt32(l)) } - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -139865,13 +139863,13 @@ func Xvasprintf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32) { l = Xvsnprintf(tls, uintptr(0), uint64(0), fmt, ap2) _ = ap2 if v2 = l < 0; !v2 { - v1 = Xmalloc(tls, uint64(uint32(l)+uint32(1))) + v1 = Xmalloc(tls, uint64(Uint32FromInt32(l)+uint32(1))) *(*uintptr)(unsafe.Pointer(s)) = v1 } if v2 || !(v1 != 0) { return -int32(1) } - return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(uint32(l)+uint32(1)), fmt, ap) + return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(Uint32FromInt32(l)+uint32(1)), fmt, ap) } func Xvdprintf(tls *TLS, fd int32, fmt uintptr, ap Tva_list) (r int32) { @@ -140051,33 +140049,33 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -140099,18 +140097,18 @@ func _pad3(tls *TLS, f uintptr, c int8, w int32, l int32, fl int32) { var v1 uint64 var _ /* pad at bp+0 */ [256]int8 _ = v1 - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { return } l = w - l - if uint64(l) > uint64(256) { + if Uint64FromInt32(l) > uint64(256) { v1 = uint64(256) } else { - v1 = uint64(l) + v1 = Uint64FromInt32(l) } Xmemset(tls, bp, int32(c), v1) for { - if !(uint64(l) >= uint64(256)) { + if !(Uint64FromInt32(l) >= uint64(256)) { break } _out(tls, f, bp, uint64(256)) @@ -140119,7 +140117,7 @@ func _pad3(tls *TLS, f uintptr, c int8, w int32, l int32, fl int32) { ; l = int32(uint64(l) - Uint64FromInt64(256)) } - _out(tls, f, bp, uint64(l)) + _out(tls, f, bp, Uint64FromInt32(l)) } var _xdigits1 = [16]int8{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} @@ -140151,7 +140149,7 @@ func _fmt_o(tls *TLS, x Tuintmax_t, s uintptr) (r uintptr) { } s-- v2 = s - *(*int8)(unsafe.Pointer(v2)) = int8(uint64('0') + x&uint64(7)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint64(uint64('0') + x&uint64(7)) goto _1 _1: ; @@ -140170,7 +140168,7 @@ func _fmt_u(tls *TLS, x Tuintmax_t, s uintptr) (r uintptr) { } s-- v2 = s - *(*int8)(unsafe.Pointer(v2)) = int8(uint64('0') + x%uint64(10)) + *(*int8)(unsafe.Pointer(v2)) = Int8FromUint64(uint64('0') + x%uint64(10)) goto _1 _1: ; @@ -140183,7 +140181,7 @@ func _fmt_u(tls *TLS, x Tuintmax_t, s uintptr) (r uintptr) { } s-- v4 = s - *(*int8)(unsafe.Pointer(v4)) = int8(uint64('0') + y%uint64(10)) + *(*int8)(unsafe.Pointer(v4)) = Int8FromUint64(uint64('0') + y%uint64(10)) goto _3 _3: ; @@ -140226,13 +140224,13 @@ func _fmt_fp(tls *TLS, f uintptr, y float64, w int32, p int32, fl int32, t int32 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: - if int32(v1>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v1>>Int32FromInt32(63)) != 0 { y = -y } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { prefix += uintptr(3) } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { prefix += uintptr(6) } else { prefix++ @@ -140259,10 +140257,10 @@ _4: } s1 = v6 } - _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) - _out(tls, f, prefix, uint64(pl)) + _pad3(tls, f, int8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) + _out(tls, f, prefix, Uint64FromInt32(pl)) _out(tls, f, s1, uint64(3)) - _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > int32(3)+pl { v7 = w } else { @@ -140310,7 +140308,7 @@ _4: } else { v9 = *(*int32)(unsafe.Pointer(bp + 512)) } - estr = _fmt_u(tls, uint64(v9), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v9), ebuf) if estr == ebuf { estr-- v10 = estr @@ -140334,7 +140332,7 @@ _4: s++ *(*int8)(unsafe.Pointer(v14)) = int8(int32(_xdigits1[x]) | t&int32(32)) y = Float64FromInt32(16) * (y - float64(x)) - if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { v15 = s s++ *(*int8)(unsafe.Pointer(v15)) = int8('.') @@ -140349,12 +140347,12 @@ _4: l = int32(int64(s) - t__predefined_ptrdiff_t(bp+516) + (int64(ebuf) - int64(estr))) } _pad3(tls, f, int8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, int8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) - _out(tls, f, bp+516, uint64(int64(s)-t__predefined_ptrdiff_t(bp+516))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, int8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, bp+516, Uint64FromInt64(int64(s)-t__predefined_ptrdiff_t(bp+516))) _pad3(tls, f, int8('0'), int32(int64(l)-(int64(ebuf)-int64(estr))-(int64(s)-t__predefined_ptrdiff_t(bp+516))), 0, 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) - _pad3(tls, f, int8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) + _pad3(tls, f, int8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v16 = w } else { @@ -140427,15 +140425,15 @@ _4: v25 = -*(*int32)(unsafe.Pointer(bp + 512)) } sh1 = v25 - need = int32(uint32(1) + (uint32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) + need = Int32FromUint32(uint32(1) + (Uint32FromInt32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) d = a for { if !(d < z) { break } - rm = *(*Tuint32_t)(unsafe.Pointer(d)) & uint32(int32(1)<>sh1 + carry1 - carry1 = uint32(Int32FromInt32(1000000000)>>sh1) * rm + carry1 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh1) * rm goto _26 _26: ; @@ -140465,7 +140463,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _29 @@ -140496,17 +140494,17 @@ _4: i *= int32(10) j++ } - x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(i) + x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % Uint32FromInt32(i) /* Are there any significant digits past j? */ if x2 != 0 || d+uintptr(1)*4 != z { round1 = Float64FromInt32(2) / Float64FromFloat64(2.22044604925031308085e-16) - if *(*Tuint32_t)(unsafe.Pointer(d))/uint32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { + if *(*Tuint32_t)(unsafe.Pointer(d))/Uint32FromInt32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { round1 += Float64FromInt32(2) } - if x2 < uint32(i/int32(2)) { + if x2 < Uint32FromInt32(i/int32(2)) { small = Float64FromFloat64(0.5) } else { - if x2 == uint32(i/int32(2)) && d+uintptr(1)*4 == z { + if x2 == Uint32FromInt32(i/int32(2)) && d+uintptr(1)*4 == z { small = Float64FromFloat64(1) } else { small = Float64FromFloat64(1.5) @@ -140519,7 +140517,7 @@ _4: *(*Tuint32_t)(unsafe.Pointer(d)) -= x2 /* Decide whether to round by probing round+small */ if round1+small != round1 { - *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + uint32(i) + *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + Uint32FromInt32(i) for *(*Tuint32_t)(unsafe.Pointer(d)) > uint32(999999999) { v31 = d d -= 4 @@ -140534,7 +140532,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _33 @@ -140569,13 +140567,13 @@ _4: t -= int32(2) p-- } - if !(uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if !(Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { /* Count trailing zeros in last place */ if z > a && *(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4)) != 0 { i = int32(10) j = Int32FromInt32(0) for { - if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%uint32(i) == uint32(0)) { + if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%Uint32FromInt32(i) == uint32(0)) { break } goto _35 @@ -140624,10 +140622,10 @@ _4: } } } - if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { return -int32(1) } - l = int32(1) + p + BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) + l = int32(1) + p + BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) if t|int32(32) == int32('f') { if e > int32(INT_MAX)-l { return -int32(1) @@ -140641,7 +140639,7 @@ _4: } else { v42 = e } - estr = _fmt_u(tls, uint64(v42), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v42), ebuf) for int64(ebuf)-int64(estr) < int64(2) { estr-- v43 = estr @@ -140667,8 +140665,8 @@ _4: return -int32(1) } _pad3(tls, f, int8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, int8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, int8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) if t|int32(32) == int32('f') { if a > r { a = r @@ -140692,13 +140690,13 @@ _4: *(*int8)(unsafe.Pointer(v49)) = int8('0') } } - _out(tls, f, s2, uint64(int64(bp+516+uintptr(9))-int64(s2))) + _out(tls, f, s2, Uint64FromInt64(int64(bp+516+uintptr(9))-int64(s2))) goto _47 _47: ; d += 4 } - if p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+558, uint64(1)) } for { @@ -140716,7 +140714,7 @@ _4: } else { v52 = p } - _out(tls, f, s3, uint64(v52)) + _out(tls, f, s3, Uint64FromInt32(v52)) goto _50 _50: ; @@ -140749,7 +140747,7 @@ _4: v56 = s4 s4++ _out(tls, f, v56, uint64(1)) - if p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+558, uint64(1)) } } @@ -140758,7 +140756,7 @@ _4: } else { v57 = int64(p) } - _out(tls, f, s4, uint64(v57)) + _out(tls, f, s4, Uint64FromInt64(v57)) p = int32(int64(p) - (int64(bp+516+UintptrFromInt32(9)) - int64(s4))) goto _53 _53: @@ -140766,9 +140764,9 @@ _4: d += 4 } _pad3(tls, f, int8('0'), p+int32(18), int32(18), 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) } - _pad3(tls, f, int8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v58 = w } else { @@ -140782,10 +140780,10 @@ func _getint(tls *TLS, s uintptr) (r int32) { _ = i i = 0 for { - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { i = int32(10)*i + (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) @@ -140857,12 +140855,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32(int64(z) - int64(a)) if f != 0 { - _out(tls, f, a, uint64(l)) + _out(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) argpos = int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) @@ -140873,7 +140871,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { + if !(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { break } fl |= uint32(1) << (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) @@ -140884,13 +140882,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read field width */ if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) if !(f != 0) { *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) w = Int32FromInt32(0) } else { - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { @@ -140919,12 +140917,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read precision */ if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { if !(f != 0) { *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) p = Int32FromInt32(0) } else { - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(4) } else { @@ -140954,7 +140952,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -140973,13 +140971,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { if argpos >= 0 { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) } else { *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } } else { if f != 0 { - _pop_arg(tls, bp+8, int32(st), ap) + _pop_arg(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -141059,24 +141057,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) break } goto _1 _10: ; - if uint64(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { - v31 = uint64(p) + if Uint64FromInt32(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { + v31 = Uint64FromInt32(p) } else { v31 = Uint64FromInt32(2) * Uint64FromInt64(8) } - p = int32(v31) + p = Int32FromUint64(v31) t = int32('x') fl |= Uint32FromUint32(1) << (Int32FromUint8('#') - Int32FromUint8(' ')) _12: @@ -141107,7 +141105,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, _14: ; pl = int32(1) - if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > uint64(Int64FromInt64(INT64_MAX)) { + if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) = -*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { if fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { @@ -141151,7 +141149,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, p = v36 v35 = z - uintptr(v36) a = v35 - *(*int8)(unsafe.Pointer(v35)) = int8(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) + *(*int8)(unsafe.Pointer(v35)) = Int8FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) fl &= ^(Uint32FromUint32(1) << (Int32FromUint8('0') - Int32FromUint8(' '))) goto _30 _19: @@ -141178,7 +141176,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v40 = p } - z = a + uintptr(Xstrnlen(tls, a, uint64(v40))) + z = a + uintptr(Xstrnlen(tls, a, Uint64FromInt32(v40))) if p < 0 && *(*int8)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -141190,7 +141188,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if !(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0) { goto narrow_c } - (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) + (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[int32(1)] = 0 *(*uintptr)(unsafe.Pointer(bp + 8)) = bp + 40 p = -int32(1) @@ -141199,21 +141197,21 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, ws = *(*uintptr)(unsafe.Pointer(bp + 8)) v42 = Int32FromInt32(0) l = v42 - i = uint64(v42) + i = Uint64FromInt32(v42) for { - if v45 = i < uint64(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { + if v45 = i < Uint64FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { v44 = ws ws += 4 v43 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v44))) l = v43 } - if !(v45 && v43 >= 0 && uint64(l) <= uint64(p)-i) { + if !(v45 && v43 >= 0 && Uint64FromInt32(l) <= Uint64FromInt32(p)-i) { break } goto _41 _41: ; - i += uint64(l) + i += Uint64FromInt32(l) } if l < 0 { return -int32(1) @@ -141221,27 +141219,27 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if i > uint64(INT_MAX) { goto overflow } - p = int32(i) - _pad3(tls, f, int8(' '), w, p, int32(fl)) + p = Int32FromUint64(i) + _pad3(tls, f, int8(' '), w, p, Int32FromUint32(fl)) ws = *(*uintptr)(unsafe.Pointer(bp + 8)) i = uint64(0) for { - if v49 = i < uint64(0+uint32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { + if v49 = i < uint64(0+Uint32FromInt32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { v48 = ws ws += 4 v47 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v48))) l = v47 } - if !(v49 && i+uint64(v47) <= uint64(p)) { + if !(v49 && i+Uint64FromInt32(v47) <= Uint64FromInt32(p)) { break } - _out(tls, f, bp+48, uint64(l)) + _out(tls, f, bp+48, Uint64FromInt32(l)) goto _46 _46: ; - i += uint64(l) + i += Uint64FromInt32(l) } - _pad3(tls, f, int8(' '), w, p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > p { v50 = w } else { @@ -141268,7 +141266,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if xp != 0 && p < 0 { goto overflow } - l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, int32(fl), t) + l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, Int32FromUint32(fl), t) if l < 0 { goto overflow } @@ -141287,12 +141285,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w > int32(INT_MAX)-cnt { goto overflow } - _pad3(tls, f, int8(' '), w, pl+p, int32(fl)) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, int8('0'), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, pl+p, Int32FromUint32(fl)) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, int8('0'), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) _pad3(tls, f, int8('0'), p, int32(int64(z)-int64(a)), 0) - _out(tls, f, a, uint64(int64(z)-int64(a))) - _pad3(tls, f, int8(' '), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, a, Uint64FromInt64(int64(z)-int64(a))) + _pad3(tls, f, int8(' '), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 _1: @@ -141367,8 +141365,8 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v1 = 0 } __need_unlock = v1 - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) { saved_buf = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fbuf = bp + 128 @@ -141400,7 +141398,7 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -141421,15 +141419,15 @@ func _store_int(tls *TLS, dest uintptr, size int32, i uint64) { } switch size { case -int32(2): - *(*int8)(unsafe.Pointer(dest)) = int8(i) + *(*int8)(unsafe.Pointer(dest)) = Int8FromUint64(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -141496,14 +141494,14 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - v3 = int32(*(*uint8)(unsafe.Pointer(p))) - v4 = BoolInt32(v3 == int32(' ') || uint32(v3)-uint32('\t') < uint32(5)) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v4 = BoolInt32(v3 == int32(' ') || Uint32FromInt32(v3)-uint32('\t') < uint32(5)) goto _5 _5: if v4 != 0 { for { - v6 = int32(*(*uint8)(unsafe.Pointer(p + 1))) - v7 = BoolInt32(v6 == int32(' ') || uint32(v6)-uint32('\t') < uint32(5)) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) + v7 = BoolInt32(v6 == int32(' ') || Uint32FromInt32(v6)-uint32('\t') < uint32(5)) goto _8 _8: if !(v7 != 0) { @@ -141517,12 +141515,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } v12 = v9 - v13 = BoolInt32(v12 == int32(' ') || uint32(v12)-uint32('\t') < uint32(5)) + v13 = BoolInt32(v12 == int32(' ') || Uint32FromInt32(v12)-uint32('\t') < uint32(5)) goto _14 _14: if !(v13 != 0) { @@ -141535,23 +141533,23 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { pos += (*TFILE)(unsafe.Pointer(f)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(f)).Frpos) - int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) goto _2 } - if int32(*(*uint8)(unsafe.Pointer(p))) != int32('%') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32('%') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { X__shlim(tls, f, int64(Int32FromInt32(0))) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('%') { p++ for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Fshend { v19 = f + 8 v18 = *(*uintptr)(unsafe.Pointer(v19)) *(*uintptr)(unsafe.Pointer(v19))++ - v17 = int32(*(*uint8)(unsafe.Pointer(v18))) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v18))) } else { v17 = X__shgetc(tls, f) } v16 = v17 c = v16 v20 = v16 - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: if !(v21 != 0) { @@ -141563,13 +141561,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ - v23 = int32(*(*uint8)(unsafe.Pointer(v24))) + v23 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v24))) } else { v23 = X__shgetc(tls, f) } c = v23 } - if c != int32(*(*uint8)(unsafe.Pointer(p))) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -141582,12 +141580,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto _2 } p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('*') { dest = uintptr(0) p++ } else { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { - dest = _arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { + dest = _arg_n(tls, ap, Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) p += uintptr(2) } else { dest = VaUintptr(&ap) @@ -141598,13 +141596,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } - width = int32(10)*width + int32(*(*uint8)(unsafe.Pointer(p))) - int32('0') + width = int32(10)*width + Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) - int32('0') goto _27 _27: ; p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('m') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('m') { wcs = uintptr(0) s = uintptr(0) alloc = BoolInt32(!!(dest != 0)) @@ -141615,16 +141613,16 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { size = SIZE_def v28 = p p++ - switch int32(*(*uint8)(unsafe.Pointer(v28))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) { case int32('h'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('h') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('h') { p++ size = -Int32FromInt32(2) } else { size = -int32(1) } case int32('l'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('l') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('l') { p++ size = Int32FromInt32(SIZE_ll) } else { @@ -141683,7 +141681,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*uint8)(unsafe.Pointer(p))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) /* C or S */ if t&int32(0x2f) == int32(3) { t |= int32(32) @@ -141697,7 +141695,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { fallthrough case int32('['): case int32('n'): - _store_int(tls, dest, size, uint64(pos)) + _store_int(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 default: @@ -141707,12 +141705,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } v32 = v29 - v33 = BoolInt32(v32 == int32(' ') || uint32(v32)-uint32('\t') < uint32(5)) + v33 = BoolInt32(v32 == int32(' ') || Uint32FromInt32(v32)-uint32('\t') < uint32(5)) goto _34 _34: if !(v33 != 0) { @@ -141729,7 +141727,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v38 = f + 8 v37 = *(*uintptr)(unsafe.Pointer(v38)) *(*uintptr)(unsafe.Pointer(v38))++ - v36 = int32(*(*uint8)(unsafe.Pointer(v37))) + v36 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v37))) } else { v36 = X__shgetc(tls, f) } @@ -141798,7 +141796,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { p++ v59 = p - if int32(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { p++ invert = Int32FromInt32(1) } else { @@ -141806,38 +141804,38 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } Xmemset(tls, bp+16, invert, uint64(257)) (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = Uint8FromInt32(Int32FromInt32(1) - invert) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = Uint8FromInt32(Int32FromInt32(1) - invert) } } for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } if !(*(*uint8)(unsafe.Pointer(p)) != 0) { goto fmt_fail } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { v62 = p p++ - c = int32(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) for { - if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + if !(c < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))) { break } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = Uint8FromInt32(int32(1) - invert) goto _61 _61: ; c++ } } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+int32(*(*uint8)(unsafe.Pointer(p)))] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))] = Uint8FromInt32(int32(1) - invert) goto _60 _60: ; @@ -141848,7 +141846,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { s = uintptr(0) i = uint64(0) if t == int32('c') { - v63 = uint32(width) + uint32(1) + v63 = Uint32FromInt32(width) + uint32(1) } else { v63 = uint32(31) } @@ -141868,7 +141866,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v67 = f + 8 v66 = *(*uintptr)(unsafe.Pointer(v67)) *(*uintptr)(unsafe.Pointer(v67))++ - v65 = int32(*(*uint8)(unsafe.Pointer(v66))) + v65 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v66))) } else { v65 = X__shgetc(tls, f) } @@ -141879,9 +141877,9 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } *(*int8)(unsafe.Pointer(bp)) = int8(c) switch Xmbrtowc(tls, bp+276, bp, uint64(1), bp+8) { - case uint64(-Int32FromInt32(1)): + case Uint64FromInt32(-Int32FromInt32(1)): goto input_fail - case uint64(-Int32FromInt32(2)): + case Uint64FromInt32(-Int32FromInt32(2)): continue } if wcs != 0 { @@ -141912,7 +141910,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v72 = f + 8 v71 = *(*uintptr)(unsafe.Pointer(v72)) *(*uintptr)(unsafe.Pointer(v72))++ - v70 = int32(*(*uint8)(unsafe.Pointer(v71))) + v70 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v71))) } else { v70 = X__shgetc(tls, f) } @@ -141942,7 +141940,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v78 = f + 8 v77 = *(*uintptr)(unsafe.Pointer(v78)) *(*uintptr)(unsafe.Pointer(v78))++ - v76 = int32(*(*uint8)(unsafe.Pointer(v77))) + v76 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v77))) } else { v76 = X__shgetc(tls, f) } @@ -141961,7 +141959,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v83 = f + 8 v82 = *(*uintptr)(unsafe.Pointer(v83)) *(*uintptr)(unsafe.Pointer(v83))++ - v81 = int32(*(*uint8)(unsafe.Pointer(v82))) + v81 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v82))) } else { v81 = X__shgetc(tls, f) } @@ -142023,7 +142021,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto int_common int_common: ; - x = X__intscan(tls, f, uint32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) + x = X__intscan(tls, f, Uint32FromInt32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) if !((*TFILE)(unsafe.Pointer(f)).Fshcnt+(int64((*TFILE)(unsafe.Pointer(f)).Frpos)-int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) != 0) { goto match_fail } @@ -142228,33 +142226,33 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -142283,7 +142281,7 @@ func _out1(tls *TLS, f uintptr, s uintptr, l Tsize_t) { func _pad4(tls *TLS, f uintptr, n int32, fl int32) { bp := tls.Alloc(32) defer tls.Free(32) - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return } Xfprintf(tls, f, __ccgo_ts+1624, VaList(bp+8, n, __ccgo_ts)) @@ -142294,10 +142292,10 @@ func _getint1(tls *TLS, s uintptr) (r int32) { _ = i i = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { i = int32(10)*i + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - int32('0')) @@ -142379,12 +142377,12 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32((int64(z) - int64(a)) / 4) if f != 0 { - _out1(tls, f, a, uint64(l)) + _out1(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) argpos = *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) - int32('0') *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 @@ -142395,7 +142393,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { + if !(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { break } fl |= uint32(1) << (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) - int32(' ')) @@ -142406,10 +142404,10 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read field width */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*4)) = int32(_INT) - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 } else { if !(l10n != 0) { @@ -142437,9 +142435,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read precision */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('.') && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*4)) = int32(_INT) - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(4) * 4 } else { if !(l10n != 0) { @@ -142468,7 +142466,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -142486,11 +142484,11 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } else { if argpos >= 0 { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) *(*Targ)(unsafe.Pointer(bp + 16)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } else { if f != 0 { - _pop_arg1(tls, bp+16, int32(st), ap) + _pop_arg1(tls, bp+16, Int32FromUint32(st), ap) } else { return 0 } @@ -142517,13 +142515,13 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) break } goto _1 @@ -142533,15 +142531,15 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < int32(1) { w = int32(1) } - _pad4(tls, f, w-int32(1), int32(fl)) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl)) if t == int32('C') { v9 = *(*Tuintmax_t)(unsafe.Pointer(bp + 16)) } else { - v9 = uint64(Xbtowc(tls, int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) + v9 = uint64(Xbtowc(tls, Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) } - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(v9) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint64(v9) _out1(tls, f, bp, uint64(1)) - _pad4(tls, f, w-int32(1), int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('S'): @@ -142551,7 +142549,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v10 = p } - z = a + uintptr(Xwcsnlen(tls, a, uint64(v10)))*4 + z = a + uintptr(Xwcsnlen(tls, a, Uint64FromInt32(v10)))*4 if p < 0 && *(*Twchar_t)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -142559,9 +142557,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) - _out1(tls, f, a, uint64(p)) - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl)) + _out1(tls, f, a, Uint64FromInt32(p)) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('m'): @@ -142604,7 +142602,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) + _pad4(tls, f, w-p, Int32FromUint32(fl)) bs = *(*uintptr)(unsafe.Pointer(bp + 16)) for { v16 = l @@ -142616,7 +142614,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, bs += uintptr(i) _out1(tls, f, bp+40, uint64(1)) } - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 } @@ -142718,13 +142716,13 @@ func Xvfwprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } __need_unlock = v1 Xfwide(tls, f, int32(1)) - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) ret = _wprintf_core(tls, f, fmt, bp, bp+48, bp+8) if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -142738,15 +142736,15 @@ func _store_int1(tls *TLS, dest uintptr, size int32, i uint64) { } switch size { case -int32(2): - *(*int8)(unsafe.Pointer(dest)) = int8(i) + *(*int8)(unsafe.Pointer(dest)) = Int8FromUint64(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -142854,12 +142852,12 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - if Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { + if Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { p += 4 } for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ @@ -142867,20 +142865,20 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v4 = Xgetwc(tls, f) } - v3 = int32(v4) + v3 = Int32FromUint32(v4) c = v3 - if !(Xiswspace(tls, uint32(v3)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v3)) != 0) { break } pos++ } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) _ = *(*uint8)(unsafe.Pointer(v8)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } goto _2 } @@ -142888,7 +142886,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == int32('%') { p += 4 for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ @@ -142896,15 +142894,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v11 = Xgetwc(tls, f) } - v10 = int32(v11) + v10 = Int32FromUint32(v11) c = v10 - if !(Xiswspace(tls, uint32(v10)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v10)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ @@ -142912,16 +142910,16 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v14 = Xgetwc(tls, f) } - c = int32(v14) + c = Int32FromUint32(v14) } if c != *(*Twchar_t)(unsafe.Pointer(p)) { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v19 = f + 8 *(*uintptr)(unsafe.Pointer(v19))-- v18 = *(*uintptr)(unsafe.Pointer(v19)) _ = *(*uint8)(unsafe.Pointer(v18)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if c < 0 { goto input_fail @@ -142936,8 +142934,8 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { dest = uintptr(0) p += 4 } else { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { - dest = _arg_n1(tls, ap, uint32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { + dest = _arg_n1(tls, ap, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) p += uintptr(2) * 4 } else { dest = VaUintptr(&ap) @@ -142945,7 +142943,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } width = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } width = int32(10)*width + *(*Twchar_t)(unsafe.Pointer(p)) - int32('0') @@ -143042,7 +143040,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if t != int32('n') { if t != int32('[') && t|int32(32) != int32('c') { for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ @@ -143050,15 +143048,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v23 = Xgetwc(tls, f) } - v22 = int32(v23) + v22 = Int32FromUint32(v23) c = v22 - if !(Xiswspace(tls, uint32(v22)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v22)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v28 = f + 8 v27 = *(*uintptr)(unsafe.Pointer(v28)) *(*uintptr)(unsafe.Pointer(v28))++ @@ -143066,23 +143064,23 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v26 = Xgetwc(tls, f) } - c = int32(v26) + c = Int32FromUint32(v26) } if c < 0 { goto input_fail } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v31 = f + 8 *(*uintptr)(unsafe.Pointer(v31))-- v30 = *(*uintptr)(unsafe.Pointer(v31)) _ = *(*uint8)(unsafe.Pointer(v30)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } } switch t { case int32('n'): - _store_int1(tls, dest, size, uint64(pos)) + _store_int1(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 case int32('s'): @@ -143140,7 +143138,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { i = uint64(0) if alloc != 0 { if t == int32('c') { - v35 = uint32(width) + uint32(1) + v35 = Uint32FromInt32(width) + uint32(1) } else { v35 = uint32(31) } @@ -143158,7 +143156,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } } for width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ @@ -143166,7 +143164,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v37 = Xgetwc(tls, f) } - v36 = int32(v37) + v36 = Int32FromUint32(v37) c = v36 if v36 < 0 { break @@ -143197,7 +143195,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if l < 0 { goto input_fail } - i += uint64(l) + i += Uint64FromInt32(l) if alloc != 0 && i > k-uint64(4) { k += k + uint64(1) tmp2 = Xrealloc(tls, s, k) @@ -143213,13 +143211,13 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { gotmatch = int32(1) } if width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v44 = f + 8 *(*uintptr)(unsafe.Pointer(v44))-- v43 = *(*uintptr)(unsafe.Pointer(v44)) _ = *(*uint8)(unsafe.Pointer(v43)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if t == int32('c') || !(gotmatch != 0) { goto match_fail @@ -143404,10 +143402,10 @@ func _sn_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { var v1, v2 uint64 _, _, _, _, _ = c, k, v1, v2, v3 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if (*Tcookie3)(unsafe.Pointer(c)).Fn < uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { + if (*Tcookie3)(unsafe.Pointer(c)).Fn < Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { v1 = (*Tcookie3)(unsafe.Pointer(c)).Fn } else { - v1 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + v1 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) } k = v1 if k != 0 { @@ -143498,7 +143496,7 @@ func _string_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { k = len1 + uint64(256) end = Xmemchr(tls, src, 0, k) if end != 0 { - k = uint64(int64(end) - int64(src)) + k = Uint64FromInt64(int64(end) - int64(src)) } if k < len1 { len1 = k @@ -143549,8 +143547,8 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { l0 = l i = 0 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == uint64(-Int32FromInt32(1)) { - return uint64(-Int32FromInt32(1)) + if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == Uint64FromInt32(-Int32FromInt32(1)) { + return Uint64FromInt32(-Int32FromInt32(1)) } for { if v2 = (*Tcookie4)(unsafe.Pointer(c)).Fl != 0 && l != 0; v2 { @@ -143564,7 +143562,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { i = int32(1) } s += uintptr(i) - l -= uint64(i) + l -= Uint64FromInt32(i) (*Tcookie4)(unsafe.Pointer(c)).Fl-- (*Tcookie4)(unsafe.Pointer(c)).Fws += 4 } @@ -143576,7 +143574,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { (*TFILE)(unsafe.Pointer(f)).Fwbase = v3 (*TFILE)(unsafe.Pointer(f)).Fwpos = v3 *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - return uint64(i) + return Uint64FromInt32(i) } (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -143614,7 +143612,7 @@ func Xvswprintf(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, ap Tva_list) (r1 in } r = Xvfwprintf(tls, bp+272, fmt, ap) _sw_write(tls, bp+272, uintptr(0), uint64(0)) - if uint64(r) >= n { + if Uint64FromInt32(r) >= n { v1 = -int32(1) } else { v1 = r @@ -143634,7 +143632,7 @@ func _wstring_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { return uint64(0) } k = Xwcsrtombs(tls, (*TFILE)(unsafe.Pointer(f)).Fbuf, bp, (*TFILE)(unsafe.Pointer(f)).Fbuf_size, uintptr(0)) - if k == uint64(-Int32FromInt32(1)) { + if k == Uint64FromInt32(-Int32FromInt32(1)) { v1 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v1 (*TFILE)(unsafe.Pointer(f)).Frpos = v1 @@ -143775,7 +143773,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { neg = 0 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143791,7 +143789,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { s++ } /* Compute n as a negative number to avoid overflow on INT_MIN */ - for BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + for BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ n = int32(10)*n - (int32(*(*int8)(unsafe.Pointer(v4))) - int32('0')) @@ -143817,7 +143815,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { neg = 0 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143833,7 +143831,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { s++ } /* Compute n as a negative number to avoid overflow on LONG_MIN */ - for BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + for BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ n = int64(10)*n - int64(int32(*(*int8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) @@ -143859,7 +143857,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { neg = 0 for { v1 = int32(*(*int8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143875,7 +143873,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { s++ } /* Compute n as a negative number to avoid overflow on LLONG_MIN */ - for BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { + for BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ n = int64(10)*n - int64(int32(*(*int8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) @@ -143934,7 +143932,7 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, j, v1, v3 int32 var _ /* tmp at bp+0 */ [32]int8 _, _, _, _ = i, j, v1, v3 - if uint32(n)-uint32(1) > uint32(15) { + if Uint32FromInt32(n)-uint32(1) > uint32(15) { n = int32(15) } Xsprintf(tls, bp, __ccgo_ts+1681, VaList(bp+40, n-int32(1), x)) @@ -143971,20 +143969,20 @@ func Xfcvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, lz int32 var _ /* tmp at bp+0 */ [1500]int8 _, _ = i, lz - if uint32(n) > uint32(1400) { + if Uint32FromInt32(n) > uint32(1400) { n = int32(1400) } Xsprintf(tls, bp, __ccgo_ts+1686, VaList(bp+1512, n, x)) i = BoolInt32(int32((*(*[1500]int8)(unsafe.Pointer(bp)))[0]) == int32('-')) if int32((*(*[1500]int8)(unsafe.Pointer(bp)))[i]) == int32('0') { - lz = int32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1654)) + lz = Int32FromUint64(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1654)) } else { - lz = -int32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+558)) + lz = -Int32FromUint64(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+558)) } if n <= lz { *(*int32)(unsafe.Pointer(sign)) = i *(*int32)(unsafe.Pointer(dp)) = int32(1) - if uint32(n) > uint32(14) { + if Uint32FromInt32(n) > uint32(14) { n = int32(14) } return __ccgo_ts + 1691 + UintptrFromInt32(14) - uintptr(n) @@ -144098,10 +144096,10 @@ _3: v6 = _a_ctz_64(tls, v5) goto _7 _7: - v4 = int32(Uint64FromInt32(8)*Uint64FromInt64(8) + uint64(v6)) + v4 = Int32FromUint64(Uint64FromInt32(8)*Uint64FromInt64(8) + Uint64FromInt32(v6)) r = v4 } - if v8 || uint64(v4) != Uint64FromInt32(8)*Uint64FromInt64(8) { + if v8 || Uint64FromInt32(v4) != Uint64FromInt32(8)*Uint64FromInt64(8) { return r } return 0 @@ -144147,25 +144145,25 @@ func _cycle(tls *TLS, width Tsize_t, ar uintptr, n int32) { // // /* shl() and shr() need n > 0 */ func _shl(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = *(*Tsize_t)(unsafe.Pointer(p)) *(*Tsize_t)(unsafe.Pointer(p)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p)) <<= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p)) <<= Uint64FromInt32(n) } func _shr(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p)) = *(*Tsize_t)(unsafe.Pointer(p + 1*8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p)) >>= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p)) >>= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= Uint64FromInt32(n) } func _sift(tls *TLS, head uintptr, width Tsize_t, cmp Tcmpfun, arg uintptr, pshift int32, lp uintptr) { @@ -144283,7 +144281,7 @@ func X__qsort_r(tls *TLS, base uintptr, nel Tsize_t, width Tsize_t, cmp Tcmpfun, _shr(tls, bp+768, int32(2)) pshift += int32(2) } else { - if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= uint64(int64(high)-int64(head)) { + if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= Uint64FromInt64(int64(high)-int64(head)) { _trinkle(tls, head, width, cmp, arg, bp+768, pshift, 0, bp) } else { _sift(tls, head, width, cmp, arg, pshift, bp) @@ -144400,9 +144398,9 @@ func _strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*TFILE)(unsafe.Pointer(bp)).Fbuf = v1 (*TFILE)(unsafe.Pointer(bp)).Frend = uintptr(-Int32FromInt32(1)) X__shlim(tls, bp, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp, uint32(base), int32(1), lim) + y = X__intscan(tls, bp, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -144421,7 +144419,7 @@ func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -144437,7 +144435,7 @@ func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144527,7 +144525,7 @@ func _do_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -144566,14 +144564,14 @@ func _wcstox(tls *TLS, s uintptr, p uintptr, prec int32) (r float64) { (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) y = X__floatscan(tls, bp+64, prec, int32(1)) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -144631,7 +144629,7 @@ func _do_read1(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -144670,14 +144668,14 @@ func _wcstox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read1) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp+64, uint32(base), int32(1), lim) + y = X__intscan(tls, bp+64, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -144701,7 +144699,7 @@ func Xwcstoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -144717,7 +144715,7 @@ func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144798,14 +144796,14 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt _, _, _, _, _, _, _, _, _ = d, k, s, wd, ws, v2, v3, v6, v7 d = dest s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(d)&(Uint64FromInt64(8)-Uint64FromInt32(1)) { for { if v3 = uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v2 } - if !(v3 && int32(v2) != c) { + if !(v3 && Int32FromUint8(v2) != c) { break } goto _1 @@ -144818,11 +144816,11 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 { goto tail } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -144841,7 +144839,7 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt v6 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v6 } - if !(v7 && int32(v6) != c) { + if !(v7 && Int32FromUint8(v6) != c) { break } goto _5 @@ -144880,9 +144878,9 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { var s, w, v4 uintptr _, _, _, _ = k, s, w, v4 s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { - if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _1 @@ -144891,11 +144889,11 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s++ n-- } - if n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c { - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + if n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c { + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -144907,7 +144905,7 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s = w } for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -144935,7 +144933,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { l = vl r = vr for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _1 @@ -144946,7 +144944,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { r++ } if n != 0 { - v2 = int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } else { v2 = 0 } @@ -145308,15 +145306,15 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145451,13 +145449,13 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -145465,7 +145463,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145500,7 +145498,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Search loop */ for { /* If remainder of haystack is shorter than needle, done */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } /* Check last byte first; advance by shift on mismatch */ @@ -145527,7 +145525,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin } k = v11 for { - if !(k < l && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(k < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -145543,7 +145541,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -145580,11 +145578,11 @@ func Xmemmem(tls *TLS, h0 uintptr, k Tsize_t, n0 uintptr, l Tsize_t) (r uintptr) return uintptr(0) } /* Use faster algorithms for short needles */ - h = Xmemchr(tls, h0, int32(*(*uint8)(unsafe.Pointer(n))), k) + h = Xmemchr(tls, h0, Int32FromUint8(*(*uint8)(unsafe.Pointer(n))), k) if !(h != 0) || l == uint64(1) { return h } - k -= uint64(int64(h) - int64(h0)) + k -= Uint64FromInt64(int64(h) - int64(h0)) if k < l { return uintptr(0) } @@ -145617,7 +145615,7 @@ func Xmemmove(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { if d == s { return d } - if uint64(s)-uint64(d)-n <= uint64(-Int32FromInt32(2))*n { + if uint64(s)-uint64(d)-n <= Uint64FromInt32(-Int32FromInt32(2))*n { return Xmemcpy(tls, d, s, n) } if d < s { @@ -145701,14 +145699,14 @@ func X__memrchr(tls *TLS, m uintptr, c int32, n Tsize_t) (r uintptr) { var v1 Tsize_t _, _ = s, v1 s = m - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { v1 = n n-- if !(v1 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { return s + uintptr(n) } } @@ -145740,20 +145738,20 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { if !(n != 0) { return dest } - *(*uint8)(unsafe.Pointer(s)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = Uint8FromInt32(c) if n <= uint64(2) { return dest } - *(*uint8)(unsafe.Pointer(s + 1)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + 2)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 1)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + 2)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = Uint8FromInt32(c) if n <= uint64(6) { return dest } - *(*uint8)(unsafe.Pointer(s + 3)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 3)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = Uint8FromInt32(c) if n <= uint64(8) { return dest } @@ -145764,8 +145762,8 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { k = -uint64(s) & uint64(3) s += uintptr(k) n -= k - n &= uint64(-Int32FromInt32(4)) - c32 = uint32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(uint8(c)) + n &= Uint64FromInt32(-Int32FromInt32(4)) + c32 = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(Uint8FromInt32(c)) /* In preparation to copy 32 bytes at a time, aligned on * an 8-byte bounary, fill head/tail up to 28 bytes each. * As in the initial byte-based head/tail fill, each @@ -145864,7 +145862,7 @@ func X__stpcpy(tls *TLS, d uintptr, s uintptr) (r uintptr) { wd = d ws = s for { - if !!((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _3 @@ -145953,7 +145951,7 @@ func X__stpncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -146016,7 +146014,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l = _l r = _r for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _1 @@ -146025,7 +146023,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l++ r++ } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strcasecmp_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) { @@ -146084,7 +146082,7 @@ func Xstrchr(tls *TLS, s uintptr, c int32) (r1 uintptr) { var r, v1 uintptr _, _ = r, v1 r = X__strchrnul(tls, s, c) - if int32(*(*uint8)(unsafe.Pointer(r))) == int32(uint8(c)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) == Int32FromUint8(Uint8FromInt32(c)) { v1 = r } else { v1 = uintptr(0) @@ -146111,7 +146109,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { var k Tsize_t var w uintptr _, _ = k, w - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } @@ -146119,7 +146117,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { if !(uint64(s)%Uint64FromInt64(8) != 0) { break } - if !(*(*int8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { + if !(*(*int8)(unsafe.Pointer(s)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == c { return s } goto _1 @@ -146127,10 +146125,10 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { ; s++ } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -146140,7 +146138,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { } s = w for { - if !(*(*int8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(*(*int8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -146183,7 +146181,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { l++ r++ } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrcpy(tls *TLS, dest uintptr, src uintptr) (r uintptr) { @@ -146208,7 +146206,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { _, _, _ = a, v3, p2 a = s if !(*(*int8)(unsafe.Pointer(c)) != 0) || !(*(*int8)(unsafe.Pointer(c + 1)) != 0) { - return uint64(int64(X__strchrnul(tls, s, int32(*(*int8)(unsafe.Pointer(c))))) - int64(a)) + return Uint64FromInt64(int64(X__strchrnul(tls, s, int32(*(*int8)(unsafe.Pointer(c))))) - int64(a)) } Xmemset(tls, bp, 0, uint64(32)) for { @@ -146233,7 +146231,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrdup(tls *TLS, s uintptr) (r uintptr) { @@ -146342,7 +146340,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*Tsize_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -146376,7 +146374,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { goto finish finish: ; - return uint64(int64(d)-int64(d0)) + Xstrlen(tls, s) + return Uint64FromInt64(int64(d)-int64(d0)) + Xstrlen(tls, s) return r } @@ -146404,7 +146402,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { break } if !(*(*int8)(unsafe.Pointer(s)) != 0) { - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } goto _1 _1: @@ -146413,7 +146411,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { } w = s for { - if !!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _2 @@ -146431,7 +146429,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { @@ -146450,7 +146448,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _2 @@ -146460,7 +146458,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, loc Tlocale_t) (r1 int32) { @@ -146518,7 +146516,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _2 @@ -146528,7 +146526,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { @@ -146568,7 +146566,7 @@ func Xstrnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _, _ = p, v1 p = Xmemchr(tls, s, 0, n) if p != 0 { - v1 = uint64(int64(p) - int64(s)) + v1 = Uint64FromInt64(int64(p) - int64(s)) } else { v1 = n } @@ -146634,7 +146632,7 @@ func Xstrsignal(tls *TLS, signum int32) (r uintptr) { _, _ = s, v2 s = uintptr(unsafe.Pointer(&_strings)) signum = signum - if uint32(signum)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(signum)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { signum = 0 } for { @@ -146686,7 +146684,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } for { if v4 = *(*int8)(unsafe.Pointer(c)) != 0; v4 { @@ -146710,18 +146708,18 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146849,13 +146847,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -146863,7 +146861,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146900,13 +146898,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { /* Fast estimate for MAX(l,63) */ grow = l | uint64(63) z2 = Xmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } } else { @@ -146937,7 +146935,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { } k = v11 for { - if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -146953,7 +146951,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -147092,14 +147090,14 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { i = v2 dp = v2 for { - if !(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { break } - c = int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) if !(c != 0) { return 0 } - if !(BoolInt32(uint32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { dp = i + uint64(1) z = Int32FromInt32(1) } else { @@ -147112,7 +147110,7 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { ; i++ } - if uint32(int32(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && uint32(int32(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { + if Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { /* If we're looking at non-degenerate digit sequences starting * with nonzero digits, longest digit string is greater. */ j = i @@ -147135,10 +147133,10 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { if z != 0 && dp < i && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-uint32('0') < uint32(10)) != 0 || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-uint32('0') < uint32(10)) != 0) { /* Otherwise, if common prefix of digit sequence is * all zeros, digits order less than non-digits. */ - return int32(uint8(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - int32(uint8(int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) + return Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) } } - return int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - int32(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) } func Xswab(tls *TLS, _src uintptr, _dest uintptr, n Tssize_t) { @@ -147185,7 +147183,7 @@ func Xwcscasecmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2)) defer func() { trc("-> %v", r1) }() } - return Xwcsncasecmp(tls, l, r, uint64(-Int32FromInt32(1))) + return Xwcsncasecmp(tls, l, r, Uint64FromInt32(-Int32FromInt32(1))) } func Xwcscasecmp_l(tls *TLS, l uintptr, r uintptr, locale Tlocale_t) (r1 int32) { @@ -147297,7 +147295,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { v2 = Xwcschr(tls, v3, *(*Twchar_t)(unsafe.Pointer(c))) s = v2 if v2 != 0 { - v1 = uint64((int64(s) - int64(a)) / 4) + v1 = Uint64FromInt64((int64(s) - int64(a)) / 4) } else { v1 = Xwcslen(tls, a) } @@ -147313,7 +147311,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsdup(tls *TLS, s uintptr) (r uintptr) { @@ -147349,7 +147347,7 @@ func Xwcslen(tls *TLS, s uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { @@ -147365,7 +147363,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r)))))) { + if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r)))))) { break } goto _2 @@ -147375,7 +147373,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { r += 4 n-- } - return int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r))))) + return Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r))))) } func Xwcsncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, locale Tlocale_t) (r1 int32) { @@ -147469,7 +147467,7 @@ func Xwcsnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _ = z z = Xwmemchr(tls, s, 0, n) if z != 0 { - n = uint64((int64(z) - int64(s)) / 4) + n = Uint64FromInt64((int64(z) - int64(s)) / 4) } return n } @@ -147532,7 +147530,7 @@ func Xwcsspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { @@ -147555,7 +147553,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return uintptr(0) } /* hit the end of h */ /* Compute maximal suffix */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v2 = Uint64FromInt32(1) p = v2 @@ -147586,7 +147584,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 @@ -147637,13 +147635,13 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { /* Fast estimate for MIN(l,63) */ grow = l | uint64(63) z2 = Xwmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { return uintptr(0) } } else { @@ -147948,7 +147946,7 @@ func X__mkostemps(tls *TLS, template uintptr, len1 int32, flags int32) (r int32) var l Tsize_t _, _, _, _, _ = fd, l, retries, v1, v3 l = Xstrlen(tls, template) - if l < uint64(6) || uint64(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1720, uint64(6)) != 0 { + if l < uint64(6) || Uint64FromInt32(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1720, uint64(6)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -148058,10 +148056,10 @@ func Xcfmakeraw(tls *TLS, t uintptr) { if __ccgo_strace { trc("tls=%v t=%v, (%v:)", tls, t, origin(2)) } - *(*Ttcflag_t)(unsafe.Pointer(t)) &= uint32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) - *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= uint32(^Int32FromInt32(OPOST)) - *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) - *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= uint32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) + *(*Ttcflag_t)(unsafe.Pointer(t)) &= Uint32FromInt32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) + *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= Uint32FromInt32(^Int32FromInt32(OPOST)) + *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) + *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= Uint32FromInt32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) *(*Ttcflag_t)(unsafe.Pointer(t + 8)) |= uint32(CS8) *(*Tcc_t)(unsafe.Pointer(t + 17 + 6)) = uint8(1) *(*Tcc_t)(unsafe.Pointer(t + 17 + 5)) = uint8(0) @@ -148072,11 +148070,11 @@ func Xcfsetospeed(tls *TLS, tio uintptr, speed Tspeed_t) (r int32) { trc("tls=%v tio=%v speed=%v, (%v:)", tls, tio, speed, origin(2)) defer func() { trc("-> %v", r) }() } - if speed&uint32(^Int32FromInt32(CBAUD)) != 0 { + if speed&Uint32FromInt32(^Int32FromInt32(CBAUD)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= uint32(^Int32FromInt32(CBAUD)) + *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= Uint32FromInt32(^Int32FromInt32(CBAUD)) *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) |= speed return 0 } @@ -148109,7 +148107,7 @@ func Xtcdrain(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) } func Xtcflow(tls *TLS, fd int32, action int32) (r int32) { @@ -148164,7 +148162,7 @@ func Xtcgetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) } func Xtcsendbreak(tls *TLS, fd int32, dur int32) (r int32) { @@ -148197,7 +148195,7 @@ func Xtcsetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) } func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { @@ -148212,13 +148210,13 @@ func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { var _ /* st at bp+0 */ Tstat _, _, _ = fd, map1, v1 map1 = uintptr(-Int32FromInt32(1)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) if fd < 0 { return uintptr(0) } if !(X__fstat(tls, fd, bp) != 0) { - map1 = X__mmap(tls, uintptr(0), uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) - *(*Tsize_t)(unsafe.Pointer(size)) = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + map1 = X__mmap(tls, uintptr(0), Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) + *(*Tsize_t)(unsafe.Pointer(size)) = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) } X__syscall1(tls, int64(SYS_close), int64(fd)) if map1 == uintptr(-Int32FromInt32(1)) { @@ -148424,16 +148422,16 @@ func _getint2(tls *TLS, p uintptr) (r int32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { break } - x = uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x + x = Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x goto _1 _1: ; *(*uintptr)(unsafe.Pointer(p))++ } - return int32(x) + return Int32FromUint32(x) } func _getoff(tls *TLS, p uintptr) (r int32) { @@ -148518,7 +148516,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } else { i = 0 for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { break } if i < int32(TZNAME_MAX) { @@ -148540,7 +148538,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } func _zi_read32(tls *TLS, z uintptr) (r Tuint32_t) { - return uint32(*(*uint8)(unsafe.Pointer(z)))< uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { + if i > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { *(*uintptr)(unsafe.Pointer(bp + 288)) = uintptr(unsafe.Pointer(&X__utc)) i = Uint64FromInt32(3) } @@ -148617,8 +148615,8 @@ func _do_tzset(tls *TLS) { if i >= _old_tz_size { _old_tz_size = i + uint64(1) } - if _old_tz_size > uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { - _old_tz_size = uint64(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) + if _old_tz_size > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { + _old_tz_size = Uint64FromInt32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) } _old_tz = Xmalloc(tls, _old_tz_size) } @@ -148629,7 +148627,7 @@ func _do_tzset(tls *TLS) { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { *(*uintptr)(unsafe.Pointer(bp + 296)) = *(*uintptr)(unsafe.Pointer(bp + 288)) _getname(tls, bp+308, bp+296) - if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1745) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1749) != 0)) { + if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1745) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1749) != 0)) { posix_form = int32(1) } } @@ -148676,7 +148674,7 @@ func _do_tzset(tls *TLS) { _zi = map1 if map1 != 0 { scale = int32(2) - if int32(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { *(*[6]uint8)(unsafe.Pointer(bp)) = [6]uint8{ 0: uint8(1), 1: uint8(1), @@ -148695,7 +148693,7 @@ func _do_tzset(tls *TLS) { _types = _index + uintptr(_zi_read32(tls, _trans-uintptr(12))) _abbrevs = _types + uintptr(uint32(6)*_zi_read32(tls, _trans-uintptr(8))) _abbrevs_end = _abbrevs + uintptr(_zi_read32(tls, _trans-uintptr(4))) - if int32(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { *(*uintptr)(unsafe.Pointer(bp + 288)) = _zi + uintptr(_map_size) - uintptr(2) for { if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { @@ -148723,11 +148721,11 @@ func _do_tzset(tls *TLS) { } if !(*(*uint8)(unsafe.Pointer(p1 + 4)) != 0) && !(Xtzname[0] != 0) { Xtzname[0] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - Xtimezone = int64(-_zi_read32(tls, p1)) + Xtimezone = Int64FromUint32(-_zi_read32(tls, p1)) } if *(*uint8)(unsafe.Pointer(p1 + 4)) != 0 && !(Xtzname[int32(1)] != 0) { Xtzname[int32(1)] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - _dst_off = int32(-_zi_read32(tls, p1)) + _dst_off = Int32FromUint32(-_zi_read32(tls, p1)) Xdaylight = int32(1) } goto _8 @@ -148758,7 +148756,7 @@ func _do_tzset(tls *TLS) { Xtzname[int32(1)] = uintptr(unsafe.Pointer(&_dst_name)) if _dst_name[0] != 0 { Xdaylight = int32(1) - if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || uint32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { + if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { _dst_off = _getoff(tls, bp+288) } else { _dst_off = int32(Xtimezone - int64(3600)) @@ -148790,7 +148788,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { scale = int32(3) - BoolInt32(_trans == _zi+uintptr(44)) off = 0 a = uint64(0) - n = uint64((int64(_index) - int64(_trans)) >> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if !(n != 0) { if alt != 0 { *(*Tsize_t)(unsafe.Pointer(alt)) = uint64(0) @@ -148804,12 +148802,12 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if a == n-uint64(1) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if a == uint64(0) { x = uint64(_zi_read32(tls, _trans)) if scale == int32(3) { x = x<= uint64(int64(_abbrevs_end)-int64(_abbrevs))) { + if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint64(p)-uint64(_abbrevs) >= Uint64FromInt64(int64(_abbrevs_end)-int64(_abbrevs))) { p = __ccgo_ts } ___unlock(tls, uintptr(unsafe.Pointer(&_lock4))) @@ -149032,7 +149030,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { var centuries, cycles, leaps, leaps1, rem, y int32 var _ /* dummy at bp+0 */ int32 _, _, _, _, _, _ = centuries, cycles, leaps, leaps1, rem, y - if uint64(year)-uint64(2) <= uint64(136) { + if Uint64FromInt64(year)-uint64(2) <= uint64(136) { y = int32(year) leaps = (y - int32(68)) >> int32(2) if !((y-Int32FromInt32(68))&Int32FromInt32(3) != 0) { @@ -149081,7 +149079,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { *(*int32)(unsafe.Pointer(is_leap)) = 0 leaps1 = 0 } else { - leaps1 = int32(uint32(rem) / uint32(4)) + leaps1 = Int32FromUint32(Uint32FromInt32(rem) / uint32(4)) rem = int32(uint32(rem) % Uint32FromUint32(4)) *(*int32)(unsafe.Pointer(is_leap)) = BoolInt32(!(rem != 0)) } @@ -149165,7 +149163,7 @@ func Xclock_getcpuclockid(tls *TLS, pid Tpid_t, clk uintptr) (r int32) { var ret int32 var _ /* ts at bp+0 */ Ttimespec _, _ = id, ret - id = int32(uint32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) + id = Int32FromUint32(Uint32FromInt32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) ret = int32(X__syscall2(tls, int64(SYS_clock_getres), int64(id), int64(bp))) if ret == -int32(EINVAL) { ret = -int32(ESRCH) @@ -149184,7 +149182,7 @@ func Xclock_getres(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { } /* If reaching this point, it's a 64-bit arch or time64-only * 32-bit arch and we can get result directly into timespec. */ - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) } func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { @@ -149203,7 +149201,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { } r = -int32(EINVAL) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xclock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { @@ -149241,7 +149239,7 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { trc("tls=%v clk=%v ts=%v, (%v:)", tls, clk, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) } func Xctime(tls *TLS, t uintptr) (r uintptr) { @@ -149304,7 +149302,7 @@ func Xftime(tls *TLS, tp uintptr) (r int32) { _ = v1 Xclock_gettime(tls, CLOCK_REALTIME, bp) (*Ttimeb)(unsafe.Pointer(tp)).Ftime = (*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec - (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = uint16((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) + (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = Uint16FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) v1 = Int16FromInt32(0) (*Ttimeb)(unsafe.Pointer(tp)).Fdstflag = v1 (*Ttimeb)(unsafe.Pointer(tp)).Ftimezone = v1 @@ -149506,7 +149504,7 @@ func Xnanosleep(tls *TLS, req uintptr, rem uintptr) (r int32) { trc("tls=%v req=%v rem=%v, (%v:)", tls, req, rem, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) } func _is_leap(tls *TLS, y int32) (r int32) { @@ -149521,10 +149519,10 @@ func _is_leap(tls *TLS, y int32) (r int32) { func _week_num(tls *TLS, tm uintptr) (r int32) { var dec31, jan1, val int32 _, _, _ = dec31, jan1, val - val = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) /* If 1 Jan is just 1-3 days past Monday, * the previous week is also in this year. */ - if (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { + if (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { val++ } if !(val != 0) { @@ -149532,7 +149530,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 31 December of prev year a Thursday, * or Friday of a leap year, then the * prev year has 53 weeks. */ - dec31 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) + dec31 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) if dec31 == int32(4) || dec31 == int32(5) && _is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year%int32(400)-int32(1)) != 0 { val++ } @@ -149541,7 +149539,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 1 January is not a Thursday, and not * a Wednesday of a leap year, then this * year has only 52 weeks. */ - jan1 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) + jan1 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) if jan1 != int32(4) && (jan1 != int32(3) || !(_is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year) != 0)) { val = int32(1) } @@ -149567,13 +149565,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc def_pad = int32('0') switch f { case int32('a'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(ABDAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday goto nl_strcat case int32('A'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(DAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday @@ -149581,13 +149579,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('h'): fallthrough case int32('b'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(ABMON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon goto nl_strcat case int32('B'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(MON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon @@ -149722,10 +149720,10 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc width = int32(1) goto number case int32('U'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) goto number case int32('W'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) goto number case int32('V'): val = int64(_week_num(tls, tm)) @@ -149749,7 +149747,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('Y'): val = int64((*Ttm)(unsafe.Pointer(tm)).Ftm_year) + int64(1900) if val >= int64(10000) { - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1831, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1831, VaList(bp+8, val))) return s } width = int32(4) @@ -149759,7 +149757,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc *(*Tsize_t)(unsafe.Pointer(l)) = uint64(0) return __ccgo_ts } - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1837, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1837, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) return s case int32('Z'): if (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst < 0 { @@ -149784,13 +149782,13 @@ number: } switch v7 { case int32('-'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1844, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1844, VaList(bp+8, val))) case int32('_'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1849, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1849, VaList(bp+8, width, val))) case int32('0'): fallthrough default: - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1855, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1855, VaList(bp+8, width, val))) break } return s @@ -149860,7 +149858,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl if v4 != 0 { f++ } - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { width = Xstrtoul(tls, f, bp+112, int32(10)) } else { width = uint64(0) @@ -149890,7 +149888,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl *(*Tsize_t)(unsafe.Pointer(bp))-- } for { - if !(int32(*(*int8)(unsafe.Pointer(t))) == int32('0') && uint32(int32(*(*int8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { + if !(int32(*(*int8)(unsafe.Pointer(t))) == int32('0') && Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { break } goto _5 @@ -149904,7 +149902,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } d = uint64(0) for { - if !(uint32(int32(*(*int8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(int32(*(*int8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { break } goto _6 @@ -149925,7 +149923,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl v8 = int32(5) } } - if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= uint64(v8) { + if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= Uint64FromInt32(v8) { v10 = l l++ *(*int8)(unsafe.Pointer(s + uintptr(v10))) = int8('+') @@ -150002,14 +150000,14 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { for *(*int8)(unsafe.Pointer(f)) != 0 { if int32(*(*int8)(unsafe.Pointer(f))) != int32('%') { v1 = int32(*(*int8)(unsafe.Pointer(f))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if v2 != 0 { for { if v8 = *(*int8)(unsafe.Pointer(s)) != 0; v8 { v5 = int32(*(*int8)(unsafe.Pointer(s))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: } @@ -150035,8 +150033,8 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { if int32(*(*int8)(unsafe.Pointer(f))) == int32('+') { f++ } - if BoolInt32(uint32(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { - w = int32(Xstrtoul(tls, f, bp+16, int32(10))) + if BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { + w = Int32FromUint64(Xstrtoul(tls, f, bp+16, int32(10))) f = *(*uintptr)(unsafe.Pointer(bp + 16)) } else { w = -int32(1) @@ -150197,7 +150195,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; if v48 = *(*int8)(unsafe.Pointer(s)) != 0; v48 { v45 = int32(*(*int8)(unsafe.Pointer(s))) - v46 = BoolInt32(v45 == int32(' ') || uint32(v45)-uint32('\t') < uint32(5)) + v46 = BoolInt32(v45 == int32(' ') || Uint32FromInt32(v45)-uint32('\t') < uint32(5)) goto _47 _47: } @@ -150316,13 +150314,13 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { goto numeric_range numeric_range: ; - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) = 0 i = int32(1) for { - if !(i <= min+range1 && BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { + if !(i <= min+range1 && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { break } v51 = s @@ -150333,12 +150331,12 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; i *= int32(10) } - if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(range1) { + if Uint32FromInt32(*(*int32)(unsafe.Pointer(dest))-min) >= Uint32FromInt32(range1) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) -= adj switch int64(dest) - int64(tm) { - case int64(uint64(UintptrFromInt32(0) + 28)): + case Int64FromUint64(uint64(UintptrFromInt32(0) + 28)): } goto update goto numeric_digits @@ -150353,14 +150351,14 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { s++ } } - if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return uintptr(0) } v53 = Int32FromInt32(0) i = v53 *(*int32)(unsafe.Pointer(dest)) = v53 for { - if !(i < w && BoolInt32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { + if !(i < w && BoolInt32(Uint32FromInt8(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0) { break } v54 = s @@ -150486,9 +150484,9 @@ func Xtimer_getoverrun(tls *TLS, t Ttimer_t) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) } func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { @@ -150500,9 +150498,9 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) } func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (r int32) { @@ -150514,9 +150512,9 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) } type Ttms = struct { @@ -150647,7 +150645,7 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl break } *(*Tsize_t)(unsafe.Pointer(bp)) = Xmbstowcs(tls, bp+108, t_mb, Uint64FromInt64(400)/Uint64FromInt64(4)) - if *(*Tsize_t)(unsafe.Pointer(bp)) == uint64(-Int32FromInt32(1)) { + if *(*Tsize_t)(unsafe.Pointer(bp)) == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } t = bp + 108 @@ -150736,7 +150734,7 @@ func Xaccess(tls *TLS, filename uintptr, amode int32) (r int32) { trc("tls=%v filename=%v amode=%v, (%v:)", tls, filename, amode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_faccessat), int64(-Int32FromInt32(100)), int64(filename), int64(amode), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_faccessat), int64(-Int32FromInt32(100)), int64(filename), int64(amode), int64(Int32FromInt32(0)))))) } func Xacct(tls *TLS, filename uintptr) (r int32) { @@ -150744,7 +150742,7 @@ func Xacct(tls *TLS, filename uintptr) (r int32) { trc("tls=%v filename=%v, (%v:)", tls, filename, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) } func Xalarm(tls *TLS, seconds uint32) (r uint32) { @@ -150758,12 +150756,12 @@ func Xalarm(tls *TLS, seconds uint32) (r uint32) { var _ /* old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_value: Ttimeval{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), }, } *(*Titimerval)(unsafe.Pointer(bp + 32)) = Titimerval{} Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) } func Xchdir(tls *TLS, path uintptr) (r int32) { @@ -150771,7 +150769,7 @@ func Xchdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) } func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { @@ -150779,7 +150777,7 @@ func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), int64(uid), int64(gid), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(Int32FromInt32(0)))))) } func _dummy12(tls *TLS, fd int32) (r int32) { @@ -150798,7 +150796,7 @@ func Xclose(tls *TLS, fd int32) (r1 int32) { if r == -int32(EINTR) { r = 0 } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xctermid(tls *TLS, s uintptr) (r uintptr) { @@ -150821,7 +150819,7 @@ func Xdup(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) } func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { @@ -150845,7 +150843,7 @@ func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { } } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { @@ -150862,7 +150860,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { break } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xdup3(tls *TLS, old int32, new1 int32, flags int32) (r int32) { @@ -150891,7 +150889,7 @@ func _checker(tls *TLS, p uintptr) (r int32) { X__syscall1(tls, int64(SYS_exit), int64(Int32FromInt32(1))) } *(*int32)(unsafe.Pointer(bp)) = int32(X__syscall4(tls, int64(SYS_faccessat), int64((*Tctx1)(unsafe.Pointer(c)).Ffd), int64((*Tctx1)(unsafe.Pointer(c)).Ffilename), int64((*Tctx1)(unsafe.Pointer(c)).Famode), int64(Int32FromInt32(0)))) - X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), int64(Uint64FromInt64(4))) + X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), Int64FromUint64(Uint64FromInt64(4))) return 0 } @@ -150905,13 +150903,13 @@ func Xfaccessat(tls *TLS, fd int32, filename uintptr, amode int32, flag int32) ( if flag != 0 { ret = int32(X__syscall4(tls, int64(SYS_faccessat2), int64(fd), int64(filename), int64(amode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } if flag & ^Int32FromInt32(AT_EACCESS) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) } func Xfchdir(tls *TLS, fd int32) (r int32) { @@ -150926,10 +150924,10 @@ func Xfchdir(tls *TLS, fd int32) (r int32) { _ = ret ret = int32(X__syscall1(tls, int64(SYS_fchdir), int64(fd))) if ret != -int32(EBADF) || X__syscall2(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) } func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { @@ -150942,12 +150940,12 @@ func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]int8 _ = ret - ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), int64(uid), int64(gid))) + ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), Int64FromUint32(uid), Int64FromUint32(gid))) if ret != -int32(EBADF) || X__syscall2(tls, int64(__NR3264_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(bp), int64(uid), int64(gid), int64(Int32FromInt32(0)))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(bp), Int64FromUint32(uid), Int64FromUint32(gid), int64(Int32FromInt32(0)))))) } func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag int32) (r int32) { @@ -150955,7 +150953,7 @@ func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag in trc("tls=%v fd=%v path=%v uid=%v gid=%v flag=%v, (%v:)", tls, fd, path, uid, gid, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), int64(uid), int64(gid), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(flag))))) } func Xfdatasync(tls *TLS, fd int32) (r int32) { @@ -150963,7 +150961,7 @@ func Xfdatasync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) } func Xfsync(tls *TLS, fd int32) (r int32) { @@ -150971,7 +150969,7 @@ func Xfsync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) } func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { @@ -150979,7 +150977,7 @@ func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { trc("tls=%v fd=%v length=%v, (%v:)", tls, fd, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(__NR3264_ftruncate), int64(fd), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(__NR3264_ftruncate), int64(fd), length)))) } func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { @@ -150998,7 +150996,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { } else { v2 = int32(PATH_MAX) } - v1 = uint64(v2) + v1 = Uint64FromInt32(v2) tmp = Xrealloc(tls, tmp, v1) if !(buf != 0) { buf = tmp @@ -151009,7 +151007,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { return uintptr(0) } } - ret = X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), int64(size)))) + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), Int64FromUint64(size)))) if ret < 0 { return uintptr(0) } @@ -151030,7 +151028,7 @@ func Xgetegid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getegid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getegid))) } func Xgeteuid(tls *TLS) (r Tuid_t) { @@ -151038,7 +151036,7 @@ func Xgeteuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_geteuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_geteuid))) } func Xgetgid(tls *TLS) (r Tgid_t) { @@ -151046,7 +151044,7 @@ func Xgetgid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getgid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getgid))) } func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { @@ -151054,7 +151052,7 @@ func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { trc("tls=%v count=%v list=%v, (%v:)", tls, count, list, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) } func Xgethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -151126,7 +151124,7 @@ func Xgetpgid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) } func Xgetpgrp(tls *TLS) (r Tpid_t) { @@ -151158,7 +151156,7 @@ func Xgetsid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) } func Xgetuid(tls *TLS) (r Tuid_t) { @@ -151166,7 +151164,7 @@ func Xgetuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getuid))) } func Xisatty(tls *TLS, fd int32) (r1 int32) { @@ -151179,7 +151177,7 @@ func Xisatty(tls *TLS, fd int32) (r1 int32) { var r uint64 var _ /* wsz at bp+0 */ Twinsize _ = r - r = uint64(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) + r = Uint64FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) if r == uint64(0) { return int32(1) } @@ -151194,7 +151192,7 @@ func Xlchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), int64(uid), int64(gid), int64(Int32FromInt32(AT_SYMLINK_NOFOLLOW)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(Int32FromInt32(AT_SYMLINK_NOFOLLOW)))))) } func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { @@ -151202,7 +151200,7 @@ func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_linkat), int64(-Int32FromInt32(100)), int64(existing), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_linkat), int64(-Int32FromInt32(100)), int64(existing), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) } func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, flag int32) (r int32) { @@ -151210,7 +151208,7 @@ func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, fla trc("tls=%v fd1=%v existing=%v fd2=%v new1=%v flag=%v, (%v:)", tls, fd1, existing, fd2, new1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) } func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151218,7 +151216,7 @@ func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { trc("tls=%v fd=%v offset=%v whence=%v, (%v:)", tls, fd, offset, whence, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(__NR3264_lseek), int64(fd), offset, int64(whence)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(__NR3264_lseek), int64(fd), offset, int64(whence)))) } func Xlseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151264,7 +151262,7 @@ func Xpause(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), 0, 0)))) } func Xpipe(tls *TLS, fd uintptr) (r int32) { @@ -151272,7 +151270,7 @@ func Xpipe(tls *TLS, fd uintptr) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(Int32FromInt32(0)))))) } func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { @@ -151287,10 +151285,10 @@ func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { } ret = int32(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag & ^(Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } ret = Xpipe(tls, fd) if ret != 0 { @@ -151320,7 +151318,7 @@ func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151328,7 +151326,7 @@ func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { @@ -151336,7 +151334,7 @@ func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151344,7 +151342,7 @@ func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { @@ -151352,7 +151350,7 @@ func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151369,11 +151367,11 @@ func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_ buf = bp bufsize = uint64(1) } - r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(-Int32FromInt32(100)), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(-Int32FromInt32(100)), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151390,11 +151388,11 @@ func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) buf = bp bufsize = uint64(1) } - r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151402,7 +151400,7 @@ func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r int32) { @@ -151410,7 +151408,7 @@ func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r trc("tls=%v oldfd=%v old=%v newfd=%v new1=%v, (%v:)", tls, oldfd, old, newfd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_renameat2), int64(oldfd), int64(old), int64(newfd), int64(new1), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_renameat2), int64(oldfd), int64(old), int64(newfd), int64(new1), int64(Int32FromInt32(0)))))) } func Xrmdir(tls *TLS, path uintptr) (r int32) { @@ -151418,7 +151416,7 @@ func Xrmdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(AT_REMOVEDIR)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(AT_REMOVEDIR)))))) } func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { @@ -151426,7 +151424,7 @@ func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setgid), int32(gid), 0, 0) + return X__setxid(tls, int32(SYS_setgid), Int32FromUint32(gid), 0, 0) } func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { @@ -151434,7 +151432,7 @@ func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { trc("tls=%v pid=%v pgid=%v, (%v:)", tls, pid, pgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) } func Xsetpgrp(tls *TLS) (r Tpid_t) { @@ -151450,7 +151448,7 @@ func Xsetsid(tls *TLS) (r Tpid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_setsid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_setsid))))) } func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { @@ -151458,7 +151456,7 @@ func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setuid), int32(uid), 0, 0) + return X__setxid(tls, int32(SYS_setuid), Int32FromUint32(uid), 0, 0) } type Tctx2 = struct { @@ -151514,7 +151512,7 @@ func X__setxid(tls *TLS, nr int32, id int32, eid int32, sid int32) (r int32) { } else { v1 = (*(*Tctx2)(unsafe.Pointer(bp))).Fret } - return int32(X__syscall_ret(tls, uint64(v1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(v1))) } func Xsleep(tls *TLS, seconds uint32) (r uint32) { @@ -151526,10 +151524,10 @@ func Xsleep(tls *TLS, seconds uint32) (r uint32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), } if Xnanosleep(tls, bp, bp) != 0 { - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) } return uint32(0) } @@ -151539,7 +151537,7 @@ func Xsymlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(-Int32FromInt32(100)), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(-Int32FromInt32(100)), int64(new1))))) } func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { @@ -151547,7 +151545,7 @@ func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { trc("tls=%v existing=%v fd=%v new1=%v, (%v:)", tls, existing, fd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) } func Xsync(tls *TLS) { @@ -151588,7 +151586,7 @@ func Xtruncate(tls *TLS, path uintptr, length Toff_t) (r int32) { trc("tls=%v path=%v length=%v, (%v:)", tls, path, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(__NR3264_truncate), int64(path), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(__NR3264_truncate), int64(path), length)))) } /* Support signed or unsigned plain-char */ @@ -151633,12 +151631,12 @@ func Xttyname_r(tls *TLS, fd int32, name uintptr, size Tsize_t) (r int32) { if !(Xisatty(tls, fd) != 0) { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } - X__procfdname(tls, bp+256, uint32(fd)) + X__procfdname(tls, bp+256, Uint32FromInt32(fd)) l = Xreadlink(tls, bp+256, name, size) if l < 0 { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } else { - if uint64(l) == size { + if Uint64FromInt64(l) == size { return int32(ERANGE) } } @@ -151663,14 +151661,14 @@ func Xualarm(tls *TLS, value uint32, interval uint32) (r uint32) { var _ /* it_old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_interval: Ttimeval{ - Ftv_usec: int64(interval), + Ftv_usec: Int64FromUint32(interval), }, Fit_value: Ttimeval{ - Ftv_usec: int64(value), + Ftv_usec: Int64FromUint32(value), }, } Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) } func Xunlink(tls *TLS, path uintptr) (r int32) { @@ -151678,7 +151676,7 @@ func Xunlink(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(0)))))) } func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { @@ -151686,7 +151684,7 @@ func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { trc("tls=%v fd=%v path=%v flag=%v, (%v:)", tls, fd, path, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) } func Xusleep(tls *TLS, useconds uint32) (r int32) { @@ -151698,8 +151696,8 @@ func Xusleep(tls *TLS, useconds uint32) (r int32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(useconds / uint32(1000000)), - Ftv_nsec: int64(useconds % uint32(1000000) * uint32(1000)), + Ftv_sec: Int64FromUint32(useconds / uint32(1000000)), + Ftv_nsec: Int64FromUint32(useconds % uint32(1000000) * uint32(1000)), } return Xnanosleep(tls, bp, bp) } @@ -151709,7 +151707,7 @@ func Xwrite(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151717,7 +151715,7 @@ func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func __ccgo_fp(f interface{}) uintptr { @@ -152092,22 +152090,22 @@ var X__fsmu8 = [51]Tuint32_t{ 11: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x0), 31: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x1), 32: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x2), @@ -154014,7 +154012,7 @@ var Xsigngam int32 var X__stack_chk_guard Tuintptr_t var X__stderr_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf5)) + uintptr(UNGET), Ffd: int32(2), Flock: -int32(1), @@ -154024,7 +154022,7 @@ var X__stderr_FILE = TFILE{ var X__stderr_used = uintptr(unsafe.Pointer(&X__stderr_FILE)) var X__stdin_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), Fbuf: uintptr(unsafe.Pointer(&_buf6)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Flock: -int32(1), @@ -154035,7 +154033,7 @@ var X__stdin_used = uintptr(unsafe.Pointer(&X__stdin_FILE)) var X__stdio_ofl_lockptr = uintptr(unsafe.Pointer(&_ofl_lock)) var X__stdout_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf7)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Ffd: int32(1), diff --git a/vendor/modernc.org/libc/ccgo_linux_ppc64le.go b/vendor/modernc.org/libc/ccgo_linux_ppc64le.go index b020d1fd..c4a576db 100644 --- a/vendor/modernc.org/libc/ccgo_linux_ppc64le.go +++ b/vendor/modernc.org/libc/ccgo_linux_ppc64le.go @@ -9,10 +9,8 @@ import ( "unsafe" ) -var ( - _ reflect.Type - _ unsafe.Pointer -) +var _ reflect.Type +var _ unsafe.Pointer const BIG_ENDIAN = 4321 const BYTE_ORDER = 1234 @@ -604,8 +602,8 @@ func ___frexp_exp(tls *TLS, x float64, expt uintptr) (r float64) { */ exp_x = Xexp(tls, x-_kln2) hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&exp_x)) >> int32(32)) - *(*int32)(unsafe.Pointer(expt)) = int32(hx>>Int32FromInt32(20) - uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) - v1 = uint64(hx&Uint32FromInt32(0xfffff)|uint32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(20) - Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) + v1 = uint64(hx&Uint32FromInt32(0xfffff)|Uint32FromInt32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) - v1 = hx&uint32(0x7fffff) | uint32((Int32FromInt32(0x7f)+Int32FromInt32(127))<>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) + v1 = hx&uint32(0x7fffff) | Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(127))<> Int32FromInt32(63)) + zineg = Int32FromUint64(v1 >> Int32FromInt32(63)) z = Xcacos(tls, z) if zineg != 0 { v3 = [2]float64{ @@ -832,7 +830,7 @@ func Xcacoshf(tls *TLS, z complex64) (r complex64) { v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: - zineg = int32(v1 >> Int32FromInt32(31)) + zineg = Int32FromUint32(v1 >> Int32FromInt32(31)) z = Xcacosf(tls, z) if zineg != 0 { v3 = [2]float32{ @@ -1213,11 +1211,11 @@ func Xccosh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -1374,8 +1372,8 @@ func Xccoshf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -1969,11 +1967,11 @@ func Xcsinh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -2131,8 +2129,8 @@ func Xcsinhf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -2327,7 +2325,7 @@ _9: v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v12 = [2]float64{ 0: Xfabs(tls, b-b), 1: Xcopysign(tls, a, b), @@ -2447,7 +2445,7 @@ _9: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v12 = [2]float32{ 0: Xfabsf(tls, b-b), 1: Xcopysignf(tls, a, b), @@ -3209,14 +3207,14 @@ func Xconfstr(tls *TLS, name int32, buf uintptr, len1 Tsize_t) (r Tsize_t) { if !(name != 0) { s = __ccgo_ts + 1 } else { - if uint32(name) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { + if Uint32FromInt32(name) & ^Uint32FromUint32(4) != uint32(1) && Uint32FromInt32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uint64(0) } } // snprintf is overkill but avoid wasting code size to implement // this completely useless function and its truncation semantics - return uint64(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) + return Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) } const ARG_MAX = 131072 @@ -3334,7 +3332,7 @@ func Xfpathconf(tls *TLS, fd int32, name int32) (r int64) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { + if Uint64FromInt32(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -7600,7 +7598,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { var _ /* set at bp+16 */ [128]uint8 var _ /* si at bp+144 */ Tsysinfo _, _, _, _, _, _, _, _ = cnt, i, mem, val, v1, v3, v6, p5 - if uint64(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { + if Uint64FromInt32(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } else { @@ -7617,11 +7615,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v1 = (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur } - return int64(v1) + return Int64FromUint64(v1) } } } - switch int32(uint8(_values1[name])) { + switch Int32FromUint8(Uint8FromInt16(_values1[name])) { case (-Int32FromInt32(256) | Int32FromInt32(1)) & Int32FromInt32(255): return int64(200809) case (-Int32FromInt32(256) | Int32FromInt32(2)) & Int32FromInt32(255): @@ -7629,7 +7627,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { case (-Int32FromInt32(256) | Int32FromInt32(3)) & Int32FromInt32(255): return int64(MQ_PRIO_MAX) case (-Int32FromInt32(256) | Int32FromInt32(4)) & Int32FromInt32(255): - return int64(X__libc.Fpage_size) + return Int64FromUint64(X__libc.Fpage_size) case (-Int32FromInt32(256) | Int32FromInt32(5)) & Int32FromInt32(255): return int64(SEM_VALUE_MAX) case (-Int32FromInt32(256) | Int32FromInt32(11)) & Int32FromInt32(255): @@ -7640,12 +7638,12 @@ func Xsysconf(tls *TLS, name int32) (r int64) { *(*[128]uint8)(unsafe.Pointer(bp + 16)) = [128]uint8{ 0: uint8(1), } - X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), int64(Uint64FromInt64(128)), int64(bp+16)) + X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), Int64FromUint64(Uint64FromInt64(128)), int64(bp+16)) v3 = Int32FromInt32(0) cnt = v3 i = v3 for { - if !(uint64(i) < uint64(128)) { + if !(Uint64FromInt32(i) < uint64(128)) { break } for { @@ -7656,7 +7654,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { _4: ; p5 = bp + 16 + uintptr(i) - *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (int32((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (Int32FromUint8((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) cnt++ } goto _2 @@ -7684,11 +7682,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v6 = mem } - return int64(v6) + return Int64FromUint64(v6) case (-Int32FromInt32(256) | Int32FromInt32(12)) & Int32FromInt32(255): fallthrough case (-Int32FromInt32(256) | Int32FromInt32(13)) & Int32FromInt32(255): - val = int64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) + val = Int64FromUint64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) if val < int64(MINSIGSTKSZ) { val = int64(MINSIGSTKSZ) } @@ -9318,14 +9316,14 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags * Prefix "$2x$": bug = 1, safety = 0 * Prefix "$2y$": bug = 0, safety = 0 */ - bug = uint32(int32(flags) & int32(1)) + bug = Uint32FromInt32(Int32FromUint8(flags) & int32(1)) safety = uint32(flags) & uint32(2) << int32(15) v1 = Uint32FromInt32(0) diff = v1 sign = v1 i = uint32(0) for { - if !(i < uint32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { + if !(i < Uint32FromInt32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { break } v3 = Uint32FromInt32(0) @@ -9339,7 +9337,7 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags *(*TBF_word)(unsafe.Pointer(bp)) <<= uint32(8) *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(*(*uint8)(unsafe.Pointer(ptr))) /* correct */ *(*TBF_word)(unsafe.Pointer(bp + 1*4)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(int8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ + *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= Uint32FromInt8(Int8FromUint8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ /* * Sign extension in the first char has no effect - nothing to overwrite yet, * and those extra 24 bits will be fully shifted out of the 32-bit word. For @@ -9419,15 +9417,15 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w } } _, _, _, _, _, _, _, _, _, _, _, _, _ = L, L1, R, count, done, i, ptr, tmp1, tmp2, tmp3, tmp4, v1, v6 - if int32(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { return UintptrFromInt32(0) } - count = Uint32FromInt32(1) << ((int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (int32(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) + count = Uint32FromInt32(1) << ((Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) if count < min || _BF_decode(tls, bp+4240, setting+7, int32(16)) != 0 { return UintptrFromInt32(0) } _BF_swap(tls, bp+4240, int32(4)) - _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) Xmemcpy(tls, bp+72, uintptr(unsafe.Pointer(&_BF_init_state))+72, uint64(4096)) L = uint32(0) R = uint32(0) @@ -9519,8 +9517,8 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w ; i += int32(2) } - Xmemcpy(tls, output, setting, uint64(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) - *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[int32(_BF_atoi64[int32(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] + Xmemcpy(tls, output, setting, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[Int32FromUint8(_BF_atoi64[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] /* This has to be bug-compatible with the original implementation, so * only encode 23 of the 24 bytes. :-) */ _BF_swap(tls, bp+4240, int32(6)) @@ -9584,14 +9582,14 @@ func X__crypt_blowfish(tls *TLS, key uintptr, setting uintptr, output uintptr) ( */ Xmemcpy(tls, bp, test_setting, uint64(30)) if retval != 0 { - flags = uint32(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + flags = uint32(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) test_hash = uintptr(unsafe.Pointer(&_test_hashes)) + uintptr(flags&uint32(1))*34 *(*uint8)(unsafe.Pointer(bp + 2)) = *(*uint8)(unsafe.Pointer(setting + 2)) } Xmemset(tls, bp+30, int32(0x55), uint64(63)) *(*uint8)(unsafe.Pointer(bp + 30 + uintptr(Uint64FromInt64(63)-Uint64FromInt32(1)))) = uint8(0) p = _BF_crypt(tls, test_key, bp, bp+30, uint32(1)) - ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, uint64(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, uint64(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) + ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, Uint64FromInt32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) k = __ccgo_ts + 58 _BF_set_key(tls, k, bp+96, bp+168, uint8(2)) /* $2a$ */ _BF_set_key(tls, k, bp+240, bp+312, uint8(4)) /* $2y$ */ @@ -11401,7 +11399,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { } } retval &= int32(0x3f) - return uint32(retval) + return Uint32FromInt32(retval) } // C documentation @@ -11411,7 +11409,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { // * containing characters that would violate the passwd file format. // */ func _ascii_is_unsafe(tls *TLS, ch uint8) (r int32) { - return BoolInt32(!(ch != 0) || int32(ch) == int32('\n') || int32(ch) == int32(':')) + return BoolInt32(!(ch != 0) || Int32FromUint8(ch) == int32('\n') || Int32FromUint8(ch) == int32(':')) } func _setup_salt(tls *TLS, salt Tuint32_t) (r Tuint32_t) { @@ -11662,13 +11660,13 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin for q <= bp+128+uintptr(Uint64FromInt64(8)-Uint64FromInt32(1)) { v1 = q q++ - *(*uint8)(unsafe.Pointer(v1)) = uint8(int32(*(*uint8)(unsafe.Pointer(key))) << int32(1)) + *(*uint8)(unsafe.Pointer(v1)) = Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(key))) << int32(1)) if *(*uint8)(unsafe.Pointer(key)) != 0 { key++ } } X__des_setkey(tls, bp+128, bp) - if int32(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { /* * "new"-style: * setting - underscore, 4 chars of count, 4 chars of salt @@ -11680,8 +11678,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(5)) { break } - value = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } count |= value << ((i - uint32(1)) * uint32(6)) @@ -11699,8 +11697,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(9)) { break } - value1 = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value1]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value1 = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value1]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } salt |= value1 << ((i - uint32(5)) * uint32(6)) @@ -11724,7 +11722,7 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin p4 = v5 v6 = key key++ - *(*uint8)(unsafe.Pointer(p4)) = uint8(int32(*(*uint8)(unsafe.Pointer(p4))) ^ int32(*(*uint8)(unsafe.Pointer(v6)))< uint32(KEY_MAX) { return uintptr(0) } @@ -12154,7 +12152,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt salt = setting + uintptr(3) i = uint32(0) for { - if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } goto _1 @@ -12242,7 +12240,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt if !(i < uint32(5)) { break } - p = _to64(tls, p, uint32(int32((*(*[16]uint8)(unsafe.Pointer(bp + 88)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm)) + uintptr(i)*3))])< uint32(KEY_MAX1) { return uintptr(0) } @@ -12671,7 +12669,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui return uintptr(0) } u = Xstrtoul(tls, salt, bp+224, int32(10)) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224))))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224))))) != int32('$') { return uintptr(0) } salt = *(*uintptr)(unsafe.Pointer(bp + 224)) + uintptr(1) @@ -12689,11 +12687,11 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui } i = uint32(0) for { - if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } /* reject characters that interfere with /etc/shadow parsing */ - if int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { return uintptr(0) } goto _1 @@ -12747,7 +12745,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha256_init(tls, bp) i = uint32(0) for { - if !(i < uint32(int32(16)+int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { + if !(i < Uint32FromInt32(int32(16)+Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { break } _sha256_update(tls, bp, salt, uint64(slen)) @@ -12794,13 +12792,13 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(10)) { break } - p = _to641(tls, p, uint32(int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm1)) + uintptr(i)*3))])<= 0) { break } - *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= uint32(int32(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j + *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j goto _2 _2: ; @@ -13624,134 +13622,134 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } var _table = [384]uint16{ - 128: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 129: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 130: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 131: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 132: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 133: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 134: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 135: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 136: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 137: uint16((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 138: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 139: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 140: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 141: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 142: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 143: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 144: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 145: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 146: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 147: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 148: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 149: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 150: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 151: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 152: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 153: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 154: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 155: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 156: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 157: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 158: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 159: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 160: uint16((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 161: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 162: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 163: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 164: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 165: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 166: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 167: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 168: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 169: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 170: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 171: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 172: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 173: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 174: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 175: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 176: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 177: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 178: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 179: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 180: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 181: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 182: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 183: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 184: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 185: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 186: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 187: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 188: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 189: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 190: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 191: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 192: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 193: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 194: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 195: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 196: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 197: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 198: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 199: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 200: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 201: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 202: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 203: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 204: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 205: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 206: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 207: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 208: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 209: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 210: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 211: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 212: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 213: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 214: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 215: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 216: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 217: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 218: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 219: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 220: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 221: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 222: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 223: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 224: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 225: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 226: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 227: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 228: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 229: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 230: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 231: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 232: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 233: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 234: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 235: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 236: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 237: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 238: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 239: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 240: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 241: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 242: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 243: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 244: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 245: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 246: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 247: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 248: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 249: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 250: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 251: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 252: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 253: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 254: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 255: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 128: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 129: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 130: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 131: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 132: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 133: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 134: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 135: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 136: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 137: Uint16FromInt32((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 138: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 139: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 140: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 141: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 142: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 143: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 144: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 145: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 146: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 147: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 148: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 149: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 150: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 151: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 152: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 153: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 154: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 155: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 156: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 157: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 158: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 159: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 160: Uint16FromInt32((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 161: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 162: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 163: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 164: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 165: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 166: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 167: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 168: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 169: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 170: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 171: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 172: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 173: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 174: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 175: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 176: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 177: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 178: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 179: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 180: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 181: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 182: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 183: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 184: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 185: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 186: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 187: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 188: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 189: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 190: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 191: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 192: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 193: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 194: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 195: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 196: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 197: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 198: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 199: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 200: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 201: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 202: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 203: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 204: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 205: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 206: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 207: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 208: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 209: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 210: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 211: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 212: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 213: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 214: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 215: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 216: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 217: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 218: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 219: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 220: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 221: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 222: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 223: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 224: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 225: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 226: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 227: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 228: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 229: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 230: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 231: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 232: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 233: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 234: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 235: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 236: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 237: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 238: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 239: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 240: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 241: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 242: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 243: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 244: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 245: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 246: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 247: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 248: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 249: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 250: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 251: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 252: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 253: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 254: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 255: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), } var _ptable = uintptr(unsafe.Pointer(&_table)) + uintptr(128)*2 @@ -14088,7 +14086,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) { } else { v1 = int32(1) } - return uint64(v1) + return Uint64FromInt32(v1) } var _table1 = [384]Tint32_t{ @@ -14376,7 +14374,7 @@ func Xisalnum(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0) + return BoolInt32(BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0) } func X__isalnum_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14400,7 +14398,7 @@ func Xisalpha(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14456,7 +14454,7 @@ func Xiscntrl(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c) < uint32(0x20) || c == int32(0x7f)) + return BoolInt32(Uint32FromInt32(c) < uint32(0x20) || c == int32(0x7f)) } func X__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14480,7 +14478,7 @@ func Xisdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('0') < uint32(10)) + return BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14504,7 +14502,7 @@ func Xisgraph(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) } func X__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14528,7 +14526,7 @@ func Xislower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14552,7 +14550,7 @@ func Xisprint(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x20) < uint32(0x5f)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14576,7 +14574,7 @@ func Xispunct(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) } func X__ispunct_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14600,7 +14598,7 @@ func Xisspace(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(c == int32(' ') || uint32(c)-uint32('\t') < uint32(5)) + return BoolInt32(c == int32(' ') || Uint32FromInt32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14624,7 +14622,7 @@ func Xisupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('A') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -17517,7 +17515,7 @@ func Xiswalpha(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table3[uint32(int32(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table3[Uint32FromInt32(Int32FromUint8(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } if wc < uint32(0x2fffe) { return int32(1) @@ -17546,7 +17544,7 @@ func Xiswblank(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return Xisblank(tls, int32(wc)) + return Xisblank(tls, Int32FromUint32(wc)) } func X__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32) { @@ -17650,8 +17648,8 @@ func Xwctype(tls *TLS, s uintptr) (r Twctype_t) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { - return uint64(i) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { + return Uint64FromInt32(i) } goto _1 _1: @@ -17785,10 +17783,10 @@ func Xiswprint(tls *TLS, wc Twint_t) (r int32) { if wc < uint32(0xff) { return BoolInt32((wc+uint32(1))&uint32(0x7f) >= uint32(0x21)) } - if wc < uint32(0x2028) || wc-uint32(0x202a) < uint32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < uint32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { + if wc < uint32(0x2028) || wc-uint32(0x202a) < Uint32FromInt32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < Uint32FromInt32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { return int32(1) } - if wc-uint32(0xfffc) > uint32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { + if wc-uint32(0xfffc) > Uint32FromInt32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { return 0 } return int32(1) @@ -19368,7 +19366,7 @@ func Xiswpunct(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table4[uint32(int32(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table4[Uint32FromInt32(Int32FromUint8(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } return 0 } @@ -19405,7 +19403,7 @@ func Xiswspace(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), int32(wc)) != 0) + return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), Int32FromUint32(wc)) != 0) } var _spaces = [22]Twchar_t{ @@ -19501,7 +19499,7 @@ func Xisxdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0 || Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -19536,7 +19534,7 @@ func Xtolower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('A') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) != 0 { return c | int32(32) } return c @@ -19563,7 +19561,7 @@ func Xtoupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('a') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) != 0 { return c & int32(0x5f) } return c @@ -22369,40 +22367,40 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { var b, rt, try, v, x, xb, xn, y uint32 var c0, r, rd, v1 int32 _, _, _, _, _, _, _, _, _, _, _, _ = b, c0, r, rd, rt, try, v, x, xb, xn, y, v1 - c0 = int32(c) + c0 = Int32FromUint32(c) if c >= uint32(0x20000) { - return int32(c) + return Int32FromUint32(c) } b = c >> int32(8) c &= uint32(255) x = c / uint32(3) y = c % uint32(3) /* lookup entry in two-level base-6 table */ - v = uint32(_tab1[uint32(int32(_tab1[b])*int32(86))+x]) - v = v * uint32(_mt[y]) >> int32(11) % uint32(6) + v = uint32(_tab1[Uint32FromInt32(Int32FromUint8(_tab1[b])*int32(86))+x]) + v = v * Uint32FromInt32(_mt[y]) >> int32(11) % uint32(6) /* use the bit vector out of the tables as an index into * a block-specific set of rules and decode the rule into * a type and a case-mapping delta. */ r = _rules[uint32(_rulebases[b])+v] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) /* rules 0/1 are simple lower/upper case with a delta. * apply according to desired mapping direction. */ if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* binary search. endpoints of the binary search for * this block are stored in the rule delta field. */ - xn = uint32(rd & int32(0xff)) - xb = uint32(rd) >> int32(8) + xn = Uint32FromInt32(rd & int32(0xff)) + xb = Uint32FromInt32(rd) >> int32(8) for xn != 0 { try = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2))) if try == c { r = _rules[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2 + 1))] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* Hard-coded for the four exceptional titlecase */ if dir != 0 { @@ -22434,7 +22432,7 @@ func Xtowlower(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, 0)) + return Uint32FromInt32(_casemap(tls, wc, 0)) } func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { @@ -22442,7 +22440,7 @@ func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, int32(1))) + return Uint32FromInt32(_casemap(tls, wc, int32(1))) } func X__towupper_l(tls *TLS, c Twint_t, l Tlocale_t) (r Twint_t) { @@ -24641,7 +24639,7 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } var v1, v2 int32 _, _ = v1, v2 - if uint32(wc) < uint32(0xff) { + if Uint32FromInt32(wc) < uint32(0xff) { if (wc+int32(1))&int32(0x7f) >= int32(0x21) { v1 = int32(1) } else { @@ -24654,11 +24652,11 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } return v1 } - if uint32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { - if int32(_table5[int32(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Uint32FromInt32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { + if Int32FromUint8(_table5[Int32FromUint8(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return 0 } - if int32(_wtable[int32(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Int32FromUint8(_wtable[Int32FromUint8(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return int32(2) } return int32(1) @@ -24666,10 +24664,10 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { if wc&int32(0xfffe) == int32(0xfffe) { return -int32(1) } - if uint32(wc)-uint32(0x20000) < uint32(0x20000) { + if Uint32FromInt32(wc)-uint32(0x20000) < uint32(0x20000) { return int32(2) } - if wc == int32(0xe0001) || uint32(wc)-uint32(0xe0020) < uint32(0x5f) || uint32(wc)-uint32(0xe0100) < uint32(0xef) { + if wc == int32(0xe0001) || Uint32FromInt32(wc)-uint32(0xe0020) < uint32(0x5f) || Uint32FromInt32(wc)-uint32(0xe0100) < uint32(0xef) { return 0 } return int32(1) @@ -24995,7 +24993,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { var len1 int32 _, _ = de, len1 if (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos >= (*TDIR)(unsafe.Pointer(dir)).Fbuf_end { - len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), int64(Uint64FromInt64(2048)))) + len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), Int64FromUint64(Uint64FromInt64(2048)))) if len1 <= 0 { if len1 < 0 && len1 != -int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = -len1 @@ -25006,7 +25004,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos = 0 } de = dir + 24 + uintptr((*TDIR)(unsafe.Pointer(dir)).Fbuf_pos) - *(*int32)(unsafe.Pointer(dir + 12)) += int32((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) + *(*int32)(unsafe.Pointer(dir + 12)) += Int32FromUint16((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) (*TDIR)(unsafe.Pointer(dir)).Ftell = (*Tdirent)(unsafe.Pointer(de)).Fd_off return de } @@ -25121,7 +25119,7 @@ func Xscandir(tls *TLS, path uintptr, res uintptr, sel uintptr, cmp uintptr) (r Xqsort(tls, names, cnt, uint64(8), cmp) } *(*uintptr)(unsafe.Pointer(res)) = names - return int32(cnt) + return Int32FromUint64(cnt) } func Xseekdir(tls *TLS, dir uintptr, off int64) { @@ -25250,14 +25248,14 @@ func Xgetenv(tls *TLS, name uintptr) (r uintptr) { var e uintptr var l Tsize_t _, _ = e, l - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if l != 0 && !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) && Xenviron != 0 { e = Xenviron for { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { return *(*uintptr)(unsafe.Pointer(e)) + uintptr(l) + uintptr(1) } goto _1 @@ -25340,7 +25338,7 @@ func Xputenv(tls *TLS, s uintptr) (r int32) { } var l Tsize_t _ = l - l = uint64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) + l = Uint64FromInt64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) if !(l != 0) || !(*(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0) { return Xunsetenv(tls, s) } @@ -25429,7 +25427,7 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) (r int32) { var v2 bool _, _, _, _, _ = l1, l2, s, v1, v2 if v2 = !(var1 != 0); !v2 { - v1 = uint64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) + v1 = Uint64FromInt64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) l1 = v1 } if v2 || !(v1 != 0) || *(*uint8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { @@ -25461,7 +25459,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { var e, eo, v2 uintptr var l Tsize_t _, _, _, _ = e, eo, l, v2 - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if !(l != 0) || *(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) @@ -25473,7 +25471,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { X__env_rm_add(tls, *(*uintptr)(unsafe.Pointer(e)), uintptr(0)) } else { if eo != e { @@ -25796,7 +25794,7 @@ func X__strerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { } var s uintptr _ = s - if uint64(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { + if Uint64FromInt32(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { e = 0 } s = uintptr(unsafe.Pointer(&_errmsgstr)) + uintptr(_errmsgidx[e]) @@ -25925,7 +25923,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { arg |= uint64(O_LARGEFILE) } if cmd == int32(F_SETLKW) { - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) } if cmd == int32(F_GETOWN) { ret = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETOWN_EX)), int64(bp))) @@ -25933,7 +25931,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))) } if ret != 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*(*Tf_owner_ex)(unsafe.Pointer(bp))).Ftype1 == int32(F_OWNER_PGRP) { v1 = -(*(*Tf_owner_ex)(unsafe.Pointer(bp))).Fpid @@ -25943,25 +25941,25 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return v1 } if cmd == int32(F_DUPFD_CLOEXEC) { - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), Int64FromUint64(arg))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(Int32FromInt32(0)))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall1(tls, int64(SYS_close), int64(ret1)) } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), Int64FromUint64(arg))) if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } switch cmd { case int32(F_SETLK): @@ -25971,9 +25969,9 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { case int32(F_GETOWN_EX): fallthrough case int32(F_SETOWN_EX): - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) default: - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(arg))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), Int64FromUint64(arg))))) } return r } @@ -25993,11 +25991,11 @@ func Xopen(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) { mode = VaUint32(&ap) _ = ap } - fd = int32(___syscall_cp(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0, 0)) + fd = int32(___syscall_cp(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0, 0)) if fd >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(fd))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd))) } func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r int32) { @@ -26014,7 +26012,7 @@ func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r i mode = VaUint32(&ap) _ = ap } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0)))) } func Xposix_fadvise(tls *TLS, fd int32, base Toff_t, len1 Toff_t, advice int32) (r int32) { @@ -26235,7 +26233,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26246,18 +26244,18 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__shgetc(tls, f) } c = v4 - if uint32(c-int32('0')) >= uint32(10) && pok != 0 { + if Uint32FromInt32(c-int32('0')) >= uint32(10) && pok != 0 { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } } } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -26265,7 +26263,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } x = 0 for { - if !(uint32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { break } x = int32(10)*x + c - int32('0') @@ -26276,7 +26274,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v12 = f + 8 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__shgetc(tls, f) } @@ -26284,7 +26282,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } y = int64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { break } y = int64(10)*y + int64(c) - int64('0') @@ -26295,14 +26293,14 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 } for { - if !(uint32(c-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10)) { break } goto _17 @@ -26312,7 +26310,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v20 = f + 8 v19 = *(*uintptr)(unsafe.Pointer(v20)) *(*uintptr)(unsafe.Pointer(v20))++ - v18 = int32(*(*uint8)(unsafe.Pointer(v19))) + v18 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) } else { v18 = X__shgetc(tls, f) } @@ -26365,7 +26363,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } @@ -26377,7 +26375,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v8 = f + 8 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ - v6 = int32(*(*uint8)(unsafe.Pointer(v7))) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v7))) } else { v6 = X__shgetc(tls, f) } @@ -26395,7 +26393,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } @@ -26404,7 +26402,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0] = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || c == int32('.')) { break } if c == int32('.') { @@ -26420,9 +26418,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, lnz = int32(dc) } if j != 0 { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(c) - uint32('0') + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + Uint32FromInt32(c) - uint32('0') } else { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(c - int32('0')) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = Uint32FromInt32(c - int32('0')) } j++ v13 = j @@ -26446,7 +26444,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } @@ -26554,9 +26552,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % uint32(p10) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/uint32(p10) + carry - carry = uint32(int32(1000000000)/p10) * tmp + tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % Uint32FromInt32(p10) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/Uint32FromInt32(p10) + carry + carry = Uint32FromInt32(int32(1000000000)/p10) * tmp if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) rp -= int32(9) @@ -26643,9 +26641,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp2 = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] & uint32(int32(1)<>sh + carry2 - carry2 = uint32(Int32FromInt32(1000000000)>>sh) * tmp2 + carry2 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh) * tmp2 if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) i-- @@ -26778,7 +26776,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26796,7 +26794,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__shgetc(tls, f) } @@ -26808,7 +26806,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26827,7 +26825,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26836,7 +26834,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } } for { - if !(uint32(c-int32('0')) < uint32(10) || uint32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { break } if c == int32('.') { @@ -26853,7 +26851,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 d = c - int32('0') } if dc < int64(8) { - x = x*uint32(16) + uint32(d) + x = x*uint32(16) + Uint32FromInt32(d) } else { if dc < int64(Int32FromInt32(LDBL_MANT_DIG)/Int32FromInt32(4)+Int32FromInt32(1)) { scale /= Float64FromInt32(16) @@ -26874,7 +26872,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v18 = f + 8 v17 = *(*uintptr)(unsafe.Pointer(v18)) *(*uintptr)(unsafe.Pointer(v18))++ - v16 = int32(*(*uint8)(unsafe.Pointer(v17))) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) } else { v16 = X__shgetc(tls, f) } @@ -26994,14 +26992,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -27014,7 +27012,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -27022,7 +27020,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { } i = uint64(0) for { - if !(i < uint64(8) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 344 + uintptr(i))))) { + if !(i < uint64(8) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 344 + uintptr(i))))) { break } if i < uint64(7) { @@ -27030,7 +27028,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -27066,7 +27064,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { if !(i != 0) { i = uint64(0) for { - if !(i < uint64(3) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 353 + uintptr(i))))) { + if !(i < uint64(3) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 353 + uintptr(i))))) { break } if i < uint64(2) { @@ -27074,7 +27072,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v21 = f + 8 v20 = *(*uintptr)(unsafe.Pointer(v21)) *(*uintptr)(unsafe.Pointer(v21))++ - v19 = int32(*(*uint8)(unsafe.Pointer(v20))) + v19 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v20))) } else { v19 = X__shgetc(tls, f) } @@ -27091,7 +27089,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v24 = f + 8 v23 = *(*uintptr)(unsafe.Pointer(v24)) *(*uintptr)(unsafe.Pointer(v24))++ - v22 = int32(*(*uint8)(unsafe.Pointer(v23))) + v22 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) } else { v22 = X__shgetc(tls, f) } @@ -27107,12 +27105,12 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v29 = f + 8 v28 = *(*uintptr)(unsafe.Pointer(v29)) *(*uintptr)(unsafe.Pointer(v29))++ - v27 = int32(*(*uint8)(unsafe.Pointer(v28))) + v27 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) } else { v27 = X__shgetc(tls, f) } c = v27 - if uint32(c-int32('0')) < uint32(10) || uint32(c-int32('A')) < uint32(26) || uint32(c-int32('a')) < uint32(26) || c == int32('_') { + if Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c-int32('A')) < uint32(26) || Uint32FromInt32(c-int32('a')) < uint32(26) || c == int32('_') { goto _26 } if c == int32(')') { @@ -27157,7 +27155,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v36 = f + 8 v35 = *(*uintptr)(unsafe.Pointer(v36)) *(*uintptr)(unsafe.Pointer(v36))++ - v34 = int32(*(*uint8)(unsafe.Pointer(v35))) + v34 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v35))) } else { v34 = X__shgetc(tls, f) } @@ -27177,55 +27175,55 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { // // /* Lookup table for digit values. -1==255>=36 -> invalid */ var _table6 = [257]uint8{ - 0: uint8(-Int32FromInt32(1)), - 1: uint8(-Int32FromInt32(1)), - 2: uint8(-Int32FromInt32(1)), - 3: uint8(-Int32FromInt32(1)), - 4: uint8(-Int32FromInt32(1)), - 5: uint8(-Int32FromInt32(1)), - 6: uint8(-Int32FromInt32(1)), - 7: uint8(-Int32FromInt32(1)), - 8: uint8(-Int32FromInt32(1)), - 9: uint8(-Int32FromInt32(1)), - 10: uint8(-Int32FromInt32(1)), - 11: uint8(-Int32FromInt32(1)), - 12: uint8(-Int32FromInt32(1)), - 13: uint8(-Int32FromInt32(1)), - 14: uint8(-Int32FromInt32(1)), - 15: uint8(-Int32FromInt32(1)), - 16: uint8(-Int32FromInt32(1)), - 17: uint8(-Int32FromInt32(1)), - 18: uint8(-Int32FromInt32(1)), - 19: uint8(-Int32FromInt32(1)), - 20: uint8(-Int32FromInt32(1)), - 21: uint8(-Int32FromInt32(1)), - 22: uint8(-Int32FromInt32(1)), - 23: uint8(-Int32FromInt32(1)), - 24: uint8(-Int32FromInt32(1)), - 25: uint8(-Int32FromInt32(1)), - 26: uint8(-Int32FromInt32(1)), - 27: uint8(-Int32FromInt32(1)), - 28: uint8(-Int32FromInt32(1)), - 29: uint8(-Int32FromInt32(1)), - 30: uint8(-Int32FromInt32(1)), - 31: uint8(-Int32FromInt32(1)), - 32: uint8(-Int32FromInt32(1)), - 33: uint8(-Int32FromInt32(1)), - 34: uint8(-Int32FromInt32(1)), - 35: uint8(-Int32FromInt32(1)), - 36: uint8(-Int32FromInt32(1)), - 37: uint8(-Int32FromInt32(1)), - 38: uint8(-Int32FromInt32(1)), - 39: uint8(-Int32FromInt32(1)), - 40: uint8(-Int32FromInt32(1)), - 41: uint8(-Int32FromInt32(1)), - 42: uint8(-Int32FromInt32(1)), - 43: uint8(-Int32FromInt32(1)), - 44: uint8(-Int32FromInt32(1)), - 45: uint8(-Int32FromInt32(1)), - 46: uint8(-Int32FromInt32(1)), - 47: uint8(-Int32FromInt32(1)), - 48: uint8(-Int32FromInt32(1)), + 0: Uint8FromInt32(-Int32FromInt32(1)), + 1: Uint8FromInt32(-Int32FromInt32(1)), + 2: Uint8FromInt32(-Int32FromInt32(1)), + 3: Uint8FromInt32(-Int32FromInt32(1)), + 4: Uint8FromInt32(-Int32FromInt32(1)), + 5: Uint8FromInt32(-Int32FromInt32(1)), + 6: Uint8FromInt32(-Int32FromInt32(1)), + 7: Uint8FromInt32(-Int32FromInt32(1)), + 8: Uint8FromInt32(-Int32FromInt32(1)), + 9: Uint8FromInt32(-Int32FromInt32(1)), + 10: Uint8FromInt32(-Int32FromInt32(1)), + 11: Uint8FromInt32(-Int32FromInt32(1)), + 12: Uint8FromInt32(-Int32FromInt32(1)), + 13: Uint8FromInt32(-Int32FromInt32(1)), + 14: Uint8FromInt32(-Int32FromInt32(1)), + 15: Uint8FromInt32(-Int32FromInt32(1)), + 16: Uint8FromInt32(-Int32FromInt32(1)), + 17: Uint8FromInt32(-Int32FromInt32(1)), + 18: Uint8FromInt32(-Int32FromInt32(1)), + 19: Uint8FromInt32(-Int32FromInt32(1)), + 20: Uint8FromInt32(-Int32FromInt32(1)), + 21: Uint8FromInt32(-Int32FromInt32(1)), + 22: Uint8FromInt32(-Int32FromInt32(1)), + 23: Uint8FromInt32(-Int32FromInt32(1)), + 24: Uint8FromInt32(-Int32FromInt32(1)), + 25: Uint8FromInt32(-Int32FromInt32(1)), + 26: Uint8FromInt32(-Int32FromInt32(1)), + 27: Uint8FromInt32(-Int32FromInt32(1)), + 28: Uint8FromInt32(-Int32FromInt32(1)), + 29: Uint8FromInt32(-Int32FromInt32(1)), + 30: Uint8FromInt32(-Int32FromInt32(1)), + 31: Uint8FromInt32(-Int32FromInt32(1)), + 32: Uint8FromInt32(-Int32FromInt32(1)), + 33: Uint8FromInt32(-Int32FromInt32(1)), + 34: Uint8FromInt32(-Int32FromInt32(1)), + 35: Uint8FromInt32(-Int32FromInt32(1)), + 36: Uint8FromInt32(-Int32FromInt32(1)), + 37: Uint8FromInt32(-Int32FromInt32(1)), + 38: Uint8FromInt32(-Int32FromInt32(1)), + 39: Uint8FromInt32(-Int32FromInt32(1)), + 40: Uint8FromInt32(-Int32FromInt32(1)), + 41: Uint8FromInt32(-Int32FromInt32(1)), + 42: Uint8FromInt32(-Int32FromInt32(1)), + 43: Uint8FromInt32(-Int32FromInt32(1)), + 44: Uint8FromInt32(-Int32FromInt32(1)), + 45: Uint8FromInt32(-Int32FromInt32(1)), + 46: Uint8FromInt32(-Int32FromInt32(1)), + 47: Uint8FromInt32(-Int32FromInt32(1)), + 48: Uint8FromInt32(-Int32FromInt32(1)), 50: uint8(1), 51: uint8(2), 52: uint8(3), @@ -27235,13 +27233,13 @@ var _table6 = [257]uint8{ 56: uint8(7), 57: uint8(8), 58: uint8(9), - 59: uint8(-Int32FromInt32(1)), - 60: uint8(-Int32FromInt32(1)), - 61: uint8(-Int32FromInt32(1)), - 62: uint8(-Int32FromInt32(1)), - 63: uint8(-Int32FromInt32(1)), - 64: uint8(-Int32FromInt32(1)), - 65: uint8(-Int32FromInt32(1)), + 59: Uint8FromInt32(-Int32FromInt32(1)), + 60: Uint8FromInt32(-Int32FromInt32(1)), + 61: Uint8FromInt32(-Int32FromInt32(1)), + 62: Uint8FromInt32(-Int32FromInt32(1)), + 63: Uint8FromInt32(-Int32FromInt32(1)), + 64: Uint8FromInt32(-Int32FromInt32(1)), + 65: Uint8FromInt32(-Int32FromInt32(1)), 66: uint8(10), 67: uint8(11), 68: uint8(12), @@ -27268,12 +27266,12 @@ var _table6 = [257]uint8{ 89: uint8(33), 90: uint8(34), 91: uint8(35), - 92: uint8(-Int32FromInt32(1)), - 93: uint8(-Int32FromInt32(1)), - 94: uint8(-Int32FromInt32(1)), - 95: uint8(-Int32FromInt32(1)), - 96: uint8(-Int32FromInt32(1)), - 97: uint8(-Int32FromInt32(1)), + 92: Uint8FromInt32(-Int32FromInt32(1)), + 93: Uint8FromInt32(-Int32FromInt32(1)), + 94: Uint8FromInt32(-Int32FromInt32(1)), + 95: Uint8FromInt32(-Int32FromInt32(1)), + 96: Uint8FromInt32(-Int32FromInt32(1)), + 97: Uint8FromInt32(-Int32FromInt32(1)), 98: uint8(10), 99: uint8(11), 100: uint8(12), @@ -27300,139 +27298,139 @@ var _table6 = [257]uint8{ 121: uint8(33), 122: uint8(34), 123: uint8(35), - 124: uint8(-Int32FromInt32(1)), - 125: uint8(-Int32FromInt32(1)), - 126: uint8(-Int32FromInt32(1)), - 127: uint8(-Int32FromInt32(1)), - 128: uint8(-Int32FromInt32(1)), - 129: uint8(-Int32FromInt32(1)), - 130: uint8(-Int32FromInt32(1)), - 131: uint8(-Int32FromInt32(1)), - 132: uint8(-Int32FromInt32(1)), - 133: uint8(-Int32FromInt32(1)), - 134: uint8(-Int32FromInt32(1)), - 135: uint8(-Int32FromInt32(1)), - 136: uint8(-Int32FromInt32(1)), - 137: uint8(-Int32FromInt32(1)), - 138: uint8(-Int32FromInt32(1)), - 139: uint8(-Int32FromInt32(1)), - 140: uint8(-Int32FromInt32(1)), - 141: uint8(-Int32FromInt32(1)), - 142: uint8(-Int32FromInt32(1)), - 143: uint8(-Int32FromInt32(1)), - 144: uint8(-Int32FromInt32(1)), - 145: uint8(-Int32FromInt32(1)), - 146: uint8(-Int32FromInt32(1)), - 147: uint8(-Int32FromInt32(1)), - 148: uint8(-Int32FromInt32(1)), - 149: uint8(-Int32FromInt32(1)), - 150: uint8(-Int32FromInt32(1)), - 151: uint8(-Int32FromInt32(1)), - 152: uint8(-Int32FromInt32(1)), - 153: uint8(-Int32FromInt32(1)), - 154: uint8(-Int32FromInt32(1)), - 155: uint8(-Int32FromInt32(1)), - 156: uint8(-Int32FromInt32(1)), - 157: uint8(-Int32FromInt32(1)), - 158: uint8(-Int32FromInt32(1)), - 159: uint8(-Int32FromInt32(1)), - 160: uint8(-Int32FromInt32(1)), - 161: uint8(-Int32FromInt32(1)), - 162: uint8(-Int32FromInt32(1)), - 163: uint8(-Int32FromInt32(1)), - 164: uint8(-Int32FromInt32(1)), - 165: uint8(-Int32FromInt32(1)), - 166: uint8(-Int32FromInt32(1)), - 167: uint8(-Int32FromInt32(1)), - 168: uint8(-Int32FromInt32(1)), - 169: uint8(-Int32FromInt32(1)), - 170: uint8(-Int32FromInt32(1)), - 171: uint8(-Int32FromInt32(1)), - 172: uint8(-Int32FromInt32(1)), - 173: uint8(-Int32FromInt32(1)), - 174: uint8(-Int32FromInt32(1)), - 175: uint8(-Int32FromInt32(1)), - 176: uint8(-Int32FromInt32(1)), - 177: uint8(-Int32FromInt32(1)), - 178: uint8(-Int32FromInt32(1)), - 179: uint8(-Int32FromInt32(1)), - 180: uint8(-Int32FromInt32(1)), - 181: uint8(-Int32FromInt32(1)), - 182: uint8(-Int32FromInt32(1)), - 183: uint8(-Int32FromInt32(1)), - 184: uint8(-Int32FromInt32(1)), - 185: uint8(-Int32FromInt32(1)), - 186: uint8(-Int32FromInt32(1)), - 187: uint8(-Int32FromInt32(1)), - 188: uint8(-Int32FromInt32(1)), - 189: uint8(-Int32FromInt32(1)), - 190: uint8(-Int32FromInt32(1)), - 191: uint8(-Int32FromInt32(1)), - 192: uint8(-Int32FromInt32(1)), - 193: uint8(-Int32FromInt32(1)), - 194: uint8(-Int32FromInt32(1)), - 195: uint8(-Int32FromInt32(1)), - 196: uint8(-Int32FromInt32(1)), - 197: uint8(-Int32FromInt32(1)), - 198: uint8(-Int32FromInt32(1)), - 199: uint8(-Int32FromInt32(1)), - 200: uint8(-Int32FromInt32(1)), - 201: uint8(-Int32FromInt32(1)), - 202: uint8(-Int32FromInt32(1)), - 203: uint8(-Int32FromInt32(1)), - 204: uint8(-Int32FromInt32(1)), - 205: uint8(-Int32FromInt32(1)), - 206: uint8(-Int32FromInt32(1)), - 207: uint8(-Int32FromInt32(1)), - 208: uint8(-Int32FromInt32(1)), - 209: uint8(-Int32FromInt32(1)), - 210: uint8(-Int32FromInt32(1)), - 211: uint8(-Int32FromInt32(1)), - 212: uint8(-Int32FromInt32(1)), - 213: uint8(-Int32FromInt32(1)), - 214: uint8(-Int32FromInt32(1)), - 215: uint8(-Int32FromInt32(1)), - 216: uint8(-Int32FromInt32(1)), - 217: uint8(-Int32FromInt32(1)), - 218: uint8(-Int32FromInt32(1)), - 219: uint8(-Int32FromInt32(1)), - 220: uint8(-Int32FromInt32(1)), - 221: uint8(-Int32FromInt32(1)), - 222: uint8(-Int32FromInt32(1)), - 223: uint8(-Int32FromInt32(1)), - 224: uint8(-Int32FromInt32(1)), - 225: uint8(-Int32FromInt32(1)), - 226: uint8(-Int32FromInt32(1)), - 227: uint8(-Int32FromInt32(1)), - 228: uint8(-Int32FromInt32(1)), - 229: uint8(-Int32FromInt32(1)), - 230: uint8(-Int32FromInt32(1)), - 231: uint8(-Int32FromInt32(1)), - 232: uint8(-Int32FromInt32(1)), - 233: uint8(-Int32FromInt32(1)), - 234: uint8(-Int32FromInt32(1)), - 235: uint8(-Int32FromInt32(1)), - 236: uint8(-Int32FromInt32(1)), - 237: uint8(-Int32FromInt32(1)), - 238: uint8(-Int32FromInt32(1)), - 239: uint8(-Int32FromInt32(1)), - 240: uint8(-Int32FromInt32(1)), - 241: uint8(-Int32FromInt32(1)), - 242: uint8(-Int32FromInt32(1)), - 243: uint8(-Int32FromInt32(1)), - 244: uint8(-Int32FromInt32(1)), - 245: uint8(-Int32FromInt32(1)), - 246: uint8(-Int32FromInt32(1)), - 247: uint8(-Int32FromInt32(1)), - 248: uint8(-Int32FromInt32(1)), - 249: uint8(-Int32FromInt32(1)), - 250: uint8(-Int32FromInt32(1)), - 251: uint8(-Int32FromInt32(1)), - 252: uint8(-Int32FromInt32(1)), - 253: uint8(-Int32FromInt32(1)), - 254: uint8(-Int32FromInt32(1)), - 255: uint8(-Int32FromInt32(1)), - 256: uint8(-Int32FromInt32(1)), + 124: Uint8FromInt32(-Int32FromInt32(1)), + 125: Uint8FromInt32(-Int32FromInt32(1)), + 126: Uint8FromInt32(-Int32FromInt32(1)), + 127: Uint8FromInt32(-Int32FromInt32(1)), + 128: Uint8FromInt32(-Int32FromInt32(1)), + 129: Uint8FromInt32(-Int32FromInt32(1)), + 130: Uint8FromInt32(-Int32FromInt32(1)), + 131: Uint8FromInt32(-Int32FromInt32(1)), + 132: Uint8FromInt32(-Int32FromInt32(1)), + 133: Uint8FromInt32(-Int32FromInt32(1)), + 134: Uint8FromInt32(-Int32FromInt32(1)), + 135: Uint8FromInt32(-Int32FromInt32(1)), + 136: Uint8FromInt32(-Int32FromInt32(1)), + 137: Uint8FromInt32(-Int32FromInt32(1)), + 138: Uint8FromInt32(-Int32FromInt32(1)), + 139: Uint8FromInt32(-Int32FromInt32(1)), + 140: Uint8FromInt32(-Int32FromInt32(1)), + 141: Uint8FromInt32(-Int32FromInt32(1)), + 142: Uint8FromInt32(-Int32FromInt32(1)), + 143: Uint8FromInt32(-Int32FromInt32(1)), + 144: Uint8FromInt32(-Int32FromInt32(1)), + 145: Uint8FromInt32(-Int32FromInt32(1)), + 146: Uint8FromInt32(-Int32FromInt32(1)), + 147: Uint8FromInt32(-Int32FromInt32(1)), + 148: Uint8FromInt32(-Int32FromInt32(1)), + 149: Uint8FromInt32(-Int32FromInt32(1)), + 150: Uint8FromInt32(-Int32FromInt32(1)), + 151: Uint8FromInt32(-Int32FromInt32(1)), + 152: Uint8FromInt32(-Int32FromInt32(1)), + 153: Uint8FromInt32(-Int32FromInt32(1)), + 154: Uint8FromInt32(-Int32FromInt32(1)), + 155: Uint8FromInt32(-Int32FromInt32(1)), + 156: Uint8FromInt32(-Int32FromInt32(1)), + 157: Uint8FromInt32(-Int32FromInt32(1)), + 158: Uint8FromInt32(-Int32FromInt32(1)), + 159: Uint8FromInt32(-Int32FromInt32(1)), + 160: Uint8FromInt32(-Int32FromInt32(1)), + 161: Uint8FromInt32(-Int32FromInt32(1)), + 162: Uint8FromInt32(-Int32FromInt32(1)), + 163: Uint8FromInt32(-Int32FromInt32(1)), + 164: Uint8FromInt32(-Int32FromInt32(1)), + 165: Uint8FromInt32(-Int32FromInt32(1)), + 166: Uint8FromInt32(-Int32FromInt32(1)), + 167: Uint8FromInt32(-Int32FromInt32(1)), + 168: Uint8FromInt32(-Int32FromInt32(1)), + 169: Uint8FromInt32(-Int32FromInt32(1)), + 170: Uint8FromInt32(-Int32FromInt32(1)), + 171: Uint8FromInt32(-Int32FromInt32(1)), + 172: Uint8FromInt32(-Int32FromInt32(1)), + 173: Uint8FromInt32(-Int32FromInt32(1)), + 174: Uint8FromInt32(-Int32FromInt32(1)), + 175: Uint8FromInt32(-Int32FromInt32(1)), + 176: Uint8FromInt32(-Int32FromInt32(1)), + 177: Uint8FromInt32(-Int32FromInt32(1)), + 178: Uint8FromInt32(-Int32FromInt32(1)), + 179: Uint8FromInt32(-Int32FromInt32(1)), + 180: Uint8FromInt32(-Int32FromInt32(1)), + 181: Uint8FromInt32(-Int32FromInt32(1)), + 182: Uint8FromInt32(-Int32FromInt32(1)), + 183: Uint8FromInt32(-Int32FromInt32(1)), + 184: Uint8FromInt32(-Int32FromInt32(1)), + 185: Uint8FromInt32(-Int32FromInt32(1)), + 186: Uint8FromInt32(-Int32FromInt32(1)), + 187: Uint8FromInt32(-Int32FromInt32(1)), + 188: Uint8FromInt32(-Int32FromInt32(1)), + 189: Uint8FromInt32(-Int32FromInt32(1)), + 190: Uint8FromInt32(-Int32FromInt32(1)), + 191: Uint8FromInt32(-Int32FromInt32(1)), + 192: Uint8FromInt32(-Int32FromInt32(1)), + 193: Uint8FromInt32(-Int32FromInt32(1)), + 194: Uint8FromInt32(-Int32FromInt32(1)), + 195: Uint8FromInt32(-Int32FromInt32(1)), + 196: Uint8FromInt32(-Int32FromInt32(1)), + 197: Uint8FromInt32(-Int32FromInt32(1)), + 198: Uint8FromInt32(-Int32FromInt32(1)), + 199: Uint8FromInt32(-Int32FromInt32(1)), + 200: Uint8FromInt32(-Int32FromInt32(1)), + 201: Uint8FromInt32(-Int32FromInt32(1)), + 202: Uint8FromInt32(-Int32FromInt32(1)), + 203: Uint8FromInt32(-Int32FromInt32(1)), + 204: Uint8FromInt32(-Int32FromInt32(1)), + 205: Uint8FromInt32(-Int32FromInt32(1)), + 206: Uint8FromInt32(-Int32FromInt32(1)), + 207: Uint8FromInt32(-Int32FromInt32(1)), + 208: Uint8FromInt32(-Int32FromInt32(1)), + 209: Uint8FromInt32(-Int32FromInt32(1)), + 210: Uint8FromInt32(-Int32FromInt32(1)), + 211: Uint8FromInt32(-Int32FromInt32(1)), + 212: Uint8FromInt32(-Int32FromInt32(1)), + 213: Uint8FromInt32(-Int32FromInt32(1)), + 214: Uint8FromInt32(-Int32FromInt32(1)), + 215: Uint8FromInt32(-Int32FromInt32(1)), + 216: Uint8FromInt32(-Int32FromInt32(1)), + 217: Uint8FromInt32(-Int32FromInt32(1)), + 218: Uint8FromInt32(-Int32FromInt32(1)), + 219: Uint8FromInt32(-Int32FromInt32(1)), + 220: Uint8FromInt32(-Int32FromInt32(1)), + 221: Uint8FromInt32(-Int32FromInt32(1)), + 222: Uint8FromInt32(-Int32FromInt32(1)), + 223: Uint8FromInt32(-Int32FromInt32(1)), + 224: Uint8FromInt32(-Int32FromInt32(1)), + 225: Uint8FromInt32(-Int32FromInt32(1)), + 226: Uint8FromInt32(-Int32FromInt32(1)), + 227: Uint8FromInt32(-Int32FromInt32(1)), + 228: Uint8FromInt32(-Int32FromInt32(1)), + 229: Uint8FromInt32(-Int32FromInt32(1)), + 230: Uint8FromInt32(-Int32FromInt32(1)), + 231: Uint8FromInt32(-Int32FromInt32(1)), + 232: Uint8FromInt32(-Int32FromInt32(1)), + 233: Uint8FromInt32(-Int32FromInt32(1)), + 234: Uint8FromInt32(-Int32FromInt32(1)), + 235: Uint8FromInt32(-Int32FromInt32(1)), + 236: Uint8FromInt32(-Int32FromInt32(1)), + 237: Uint8FromInt32(-Int32FromInt32(1)), + 238: Uint8FromInt32(-Int32FromInt32(1)), + 239: Uint8FromInt32(-Int32FromInt32(1)), + 240: Uint8FromInt32(-Int32FromInt32(1)), + 241: Uint8FromInt32(-Int32FromInt32(1)), + 242: Uint8FromInt32(-Int32FromInt32(1)), + 243: Uint8FromInt32(-Int32FromInt32(1)), + 244: Uint8FromInt32(-Int32FromInt32(1)), + 245: Uint8FromInt32(-Int32FromInt32(1)), + 246: Uint8FromInt32(-Int32FromInt32(1)), + 247: Uint8FromInt32(-Int32FromInt32(1)), + 248: Uint8FromInt32(-Int32FromInt32(1)), + 249: Uint8FromInt32(-Int32FromInt32(1)), + 250: Uint8FromInt32(-Int32FromInt32(1)), + 251: Uint8FromInt32(-Int32FromInt32(1)), + 252: Uint8FromInt32(-Int32FromInt32(1)), + 253: Uint8FromInt32(-Int32FromInt32(1)), + 254: Uint8FromInt32(-Int32FromInt32(1)), + 255: Uint8FromInt32(-Int32FromInt32(1)), + 256: Uint8FromInt32(-Int32FromInt32(1)), } func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint64) { @@ -27456,14 +27454,14 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -27476,7 +27474,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -27487,7 +27485,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ - v11 = int32(*(*uint8)(unsafe.Pointer(v12))) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) } else { v11 = X__shgetc(tls, f) } @@ -27497,12 +27495,12 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 - if int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -27537,10 +27535,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint if base == uint32(10) { x = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { break } - x = x*uint32(10) + uint32(c-Int32FromUint8('0')) + x = x*uint32(10) + Uint32FromInt32(c-Int32FromUint8('0')) goto _20 _20: ; @@ -27548,7 +27546,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v23 = f + 8 v22 = *(*uintptr)(unsafe.Pointer(v23)) *(*uintptr)(unsafe.Pointer(v23))++ - v21 = int32(*(*uint8)(unsafe.Pointer(v22))) + v21 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v22))) } else { v21 = X__shgetc(tls, f) } @@ -27556,10 +27554,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } y = uint64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(c-Int32FromUint8('0'))) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-Uint64FromInt32(c-Int32FromUint8('0'))) { break } - y = y*uint64(10) + uint64(c-Int32FromUint8('0')) + y = y*uint64(10) + Uint64FromInt32(c-Int32FromUint8('0')) goto _24 _24: ; @@ -27567,18 +27565,18 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v27 = f + 8 v26 = *(*uintptr)(unsafe.Pointer(v27)) *(*uintptr)(unsafe.Pointer(v27))++ - v25 = int32(*(*uint8)(unsafe.Pointer(v26))) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v26))) } else { v25 = X__shgetc(tls, f) } c = v25 } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { goto done } } else { if !(base&(base-Uint32FromInt32(1)) != 0) { - bs = int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 357 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) + bs = Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 357 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) x = uint32(0) for { if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(32)) { @@ -27592,7 +27590,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } @@ -27611,7 +27609,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v35 = f + 8 v34 = *(*uintptr)(unsafe.Pointer(v35)) *(*uintptr)(unsafe.Pointer(v35))++ - v33 = int32(*(*uint8)(unsafe.Pointer(v34))) + v33 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v34))) } else { v33 = X__shgetc(tls, f) } @@ -27631,7 +27629,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ - v37 = int32(*(*uint8)(unsafe.Pointer(v38))) + v37 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v38))) } else { v37 = X__shgetc(tls, f) } @@ -27650,7 +27648,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v43 = f + 8 v42 = *(*uintptr)(unsafe.Pointer(v43)) *(*uintptr)(unsafe.Pointer(v43))++ - v41 = int32(*(*uint8)(unsafe.Pointer(v42))) + v41 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v42))) } else { v41 = X__shgetc(tls, f) } @@ -27670,7 +27668,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v47 = f + 8 v46 = *(*uintptr)(unsafe.Pointer(v47)) *(*uintptr)(unsafe.Pointer(v47))++ - v45 = int32(*(*uint8)(unsafe.Pointer(v46))) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v46))) } else { v45 = X__shgetc(tls, f) } @@ -27699,7 +27697,7 @@ done: } } } - return y ^ uint64(neg) - uint64(neg) + return y ^ Uint64FromInt32(neg) - Uint64FromInt32(neg) } func X__procfdname(tls *TLS, buf uintptr, fd uint32) { @@ -27799,7 +27797,7 @@ func X__shgetc(tls *TLS, f uintptr) (r int32) { } (*TFILE)(unsafe.Pointer(f)).Fshcnt = int64((*TFILE)(unsafe.Pointer(f)).Fbuf) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + cnt if (*TFILE)(unsafe.Pointer(f)).Frpos <= (*TFILE)(unsafe.Pointer(f)).Fbuf { - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = Uint8FromInt32(c) } return c } @@ -27810,10 +27808,10 @@ func X__syscall_ret(tls *TLS, r uint64) (r1 int64) { defer func() { trc("-> %v", r1) }() } if r > -Uint64FromUint64(4096) { - *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(-r) + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = Int32FromUint64(-r) return int64(-int32(1)) } - return int64(r) + return Int64FromUint64(r) } type TElf_Symndx = uint32 @@ -27886,7 +27884,7 @@ func Xftok(tls *TLS, path uintptr, id int32) (r Tkey_t) { if Xstat(tls, path, bp) < 0 { return -int32(1) } - return int32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ino&Uint64FromInt32(0xffff) | (*(*Tstat)(unsafe.Pointer(bp))).Fst_dev&Uint64FromInt32(0xff)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgget)), int64(k), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgget)), int64(k), int64(flag))))) } func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32) (r Tssize_t) { @@ -27968,7 +27966,7 @@ func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32 0: int64(m), 1: type1, } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgrcv)), int64(q), int64(len1), int64(flag), int64(bp), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgrcv)), int64(q), Int64FromUint64(len1), int64(flag), int64(bp), 0))) } func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { @@ -27976,7 +27974,7 @@ func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { trc("tls=%v q=%v m=%v len1=%v flag=%v, (%v:)", tls, q, m, len1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgsnd)), int64(q), int64(len1), int64(flag), int64(m), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgsnd)), int64(q), Int64FromUint64(len1), int64(flag), int64(m), 0)))) } const GETALL = 13 @@ -28064,7 +28062,7 @@ func Xsemctl(tls *TLS, id int32, num int32, cmd int32, va uintptr) (r1 int32) { _ = ap } r = int32(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semctl)), int64(id), int64(num), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(bp))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { @@ -28077,9 +28075,9 @@ func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { * n fits in the correct (per POSIX) userspace type, so * we have to check here. */ if n > int32(USHRT_MAX) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semget)), int64(key), int64(n), int64(fl))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semget)), int64(key), int64(n), int64(fl))))) } func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { @@ -28087,7 +28085,7 @@ func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { trc("tls=%v id=%v buf=%v n=%v, (%v:)", tls, id, buf, n, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semop)), int64(id), int64(n), int64(Int32FromInt32(0)), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semop)), int64(id), Int64FromUint64(n), int64(Int32FromInt32(0)), int64(buf))))) } const NO_TIME32 = 0 @@ -28122,7 +28120,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r int3 trc("tls=%v id=%v buf=%v n=%v ts=%v, (%v:)", tls, id, buf, n, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semtimedop)), int64(id), int64(n), int64(Int32FromInt32(0)), int64(buf), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semtimedop)), int64(id), Int64FromUint64(n), int64(Int32FromInt32(0)), int64(buf), int64(ts))))) } const SHMLBA = 4096 @@ -28199,7 +28197,7 @@ func Xshmat(tls *TLS, id int32, _addr uintptr, flag int32) (r uintptr) { var ret uint64 var v1 uintptr _, _ = ret, v1 - ret = uint64(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmat)), int64(id), int64(flag), int64(bp), int64(*(*uintptr)(unsafe.Pointer(bp))))))) + ret = Uint64FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmat)), int64(id), int64(flag), int64(bp), int64(*(*uintptr)(unsafe.Pointer(bp))))))) if ret > -Uint64FromInt32(SHMLBA) { v1 = uintptr(ret) } else { @@ -28216,7 +28214,7 @@ func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { var r int32 _ = r r = int32(X__syscall6(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmctl)), int64(id), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(Int32FromInt32(0)), int64(buf), int64(Int32FromInt32(0)))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xshmdt(tls *TLS, addr uintptr) (r int32) { @@ -28224,7 +28222,7 @@ func Xshmdt(tls *TLS, addr uintptr) (r int32) { trc("tls=%v addr=%v, (%v:)", tls, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmdt)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmdt)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(addr))))) } func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { @@ -28232,10 +28230,10 @@ func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { trc("tls=%v key=%v size=%v flag=%v, (%v:)", tls, key, size, flag, origin(2)) defer func() { trc("-> %v", r) }() } - if size > uint64(Int64FromInt64(INT64_MAX)) { + if size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { size = Uint64FromUint64(0xffffffffffffffff) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmget)), int64(key), int64(size), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmget)), int64(key), Int64FromUint64(size), int64(flag))))) } type Tpasswd = struct { @@ -28500,7 +28498,7 @@ func Xgetdtablesize(tls *TLS) (r int32) { } else { v1 = uint64(INT_MAX) } - return int32(v1) + return Int32FromUint64(v1) } func Xgetloadavg(tls *TLS, a uintptr, n int32) (r int32) { @@ -28544,7 +28542,7 @@ func Xgetpagesize(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__libc.Fpage_size) + return Int32FromUint64(X__libc.Fpage_size) } const B0 = 0 @@ -28733,16 +28731,16 @@ func Xgetpass(tls *TLS, prompt uintptr) (r uintptr) { } Xtcgetattr(tls, fd, bp+44) *(*Ttermios)(unsafe.Pointer(bp)) = *(*Ttermios)(unsafe.Pointer(bp + 44)) - (*(*Ttermios)(unsafe.Pointer(bp + 44))).Fc_lflag &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) + (*(*Ttermios)(unsafe.Pointer(bp + 44))).Fc_lflag &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) (*(*Ttermios)(unsafe.Pointer(bp + 44))).Fc_lflag |= uint32(ICANON) - (*(*Ttermios)(unsafe.Pointer(bp + 44))).Fc_iflag &= uint32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) + (*(*Ttermios)(unsafe.Pointer(bp + 44))).Fc_iflag &= Uint32FromInt32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) (*(*Ttermios)(unsafe.Pointer(bp + 44))).Fc_iflag |= uint32(ICRNL) Xtcsetattr(tls, fd, int32(TCSAFLUSH), bp+44) Xtcdrain(tls, fd) Xdprintf(tls, fd, __ccgo_ts+15, VaList(bp+96, prompt)) l = Xread(tls, fd, uintptr(unsafe.Pointer(&_password)), uint64(128)) if l >= 0 { - if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || uint64(l) == uint64(128) { + if l > 0 && Int32FromUint8(_password[l-int64(1)]) == int32('\n') || Uint64FromInt64(l) == uint64(128) { l-- } _password[l] = uint8(0) @@ -28805,7 +28803,7 @@ func Xgetusershell(tls *TLS) (r uintptr) { if l <= 0 { return uintptr(0) } - if int32(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1))))) == int32('\n') { *(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1)))) = uint8(0) } return _line @@ -28982,12 +28980,12 @@ func Xulimit(tls *TLS, cmd int32, va uintptr) (r int64) { ap = va val = VaInt64(&ap) _ = ap - (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * uint64(val) + (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * Uint64FromInt64(val) if Xsetrlimit(tls, int32(RLIMIT_FSIZE), bp) != 0 { return int64(-int32(1)) } } - return int64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) + return Int64FromUint64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) } const BOOT_TIME = 2 @@ -29256,7 +29254,7 @@ func Xbrk(tls *TLS, end uintptr) (r int32) { trc("tls=%v end=%v, (%v:)", tls, end, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29264,7 +29262,7 @@ func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) } func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29272,7 +29270,7 @@ func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) } func Xchroot(tls *TLS, path uintptr) (r int32) { @@ -29280,7 +29278,7 @@ func Xchroot(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) } type Tktimex64 = struct { @@ -29399,12 +29397,12 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Fstbcnt = (*(*Tktimex)(unsafe.Pointer(bp))).Fstbcnt (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex)(unsafe.Pointer(bp))).Ftai } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } if clock_id == CLOCK_REALTIME { - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) } func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -29412,7 +29410,7 @@ func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_o trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } const EPOLLERR = 8 @@ -29465,7 +29463,7 @@ func Xepoll_create(tls *TLS, size int32) (r int32) { defer func() { trc("-> %v", r) }() } if size <= 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } return Xepoll_create1(tls, 0) } @@ -29481,7 +29479,7 @@ func Xepoll_create1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = int32(X__syscall1(tls, int64(SYS_epoll_create), int64(Int32FromInt32(1)))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { @@ -29489,7 +29487,7 @@ func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { trc("tls=%v fd=%v op=%v fd2=%v ev=%v, (%v:)", tls, fd, op, fd2, ev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) } func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uintptr) (r1 int32) { @@ -29503,7 +29501,7 @@ func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uint if r == -int32(ENOSYS) && !(sigs != 0) { r = int32(___syscall_cp(tls, int64(SYS_epoll_wait), int64(fd), int64(ev), int64(cnt), int64(to), 0, 0)) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_wait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32) (r int32) { @@ -29527,11 +29525,11 @@ func Xeventfd(tls *TLS, count uint32, flags int32) (r1 int32) { } var r int32 _ = r - r = int32(X__syscall2(tls, int64(SYS_eventfd2), int64(count), int64(flags))) + r = int32(X__syscall2(tls, int64(SYS_eventfd2), Int64FromUint32(count), int64(flags))) if r == -int32(ENOSYS) && !(flags != 0) { - r = int32(X__syscall1(tls, int64(SYS_eventfd), int64(count))) + r = int32(X__syscall1(tls, int64(SYS_eventfd), Int64FromUint32(count))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { @@ -29541,7 +29539,7 @@ func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { } var v1 int32 _ = v1 - if uint64(8) == uint64(Xread(tls, fd, value, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xread(tls, fd, value, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29559,7 +29557,7 @@ func Xeventfd_write(tls *TLS, fd int32, _value Teventfd_t) (r int32) { *(*Teventfd_t)(unsafe.Pointer(bp)) = _value var v1 int32 _ = v1 - if uint64(8) == uint64(Xwrite(tls, fd, bp, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xwrite(tls, fd, bp, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29572,7 +29570,7 @@ func Xfallocate(tls *TLS, fd int32, mode int32, base Toff_t, len1 Toff_t) (r int trc("tls=%v fd=%v mode=%v base=%v len1=%v, (%v:)", tls, fd, mode, base, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) } const FANOTIFY_METADATA_VERSION = 3 @@ -29717,7 +29715,7 @@ func Xfanotify_init(tls *TLS, flags uint32, event_f_flags uint32) (r int32) { trc("tls=%v flags=%v event_f_flags=%v, (%v:)", tls, flags, event_f_flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fanotify_init), int64(flags), int64(event_f_flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fanotify_init), Int64FromUint32(flags), Int64FromUint32(event_f_flags))))) } func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd int32, pathname uintptr) (r int32) { @@ -29725,7 +29723,7 @@ func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd trc("tls=%v fanotify_fd=%v flags=%v mask=%v dfd=%v pathname=%v, (%v:)", tls, fanotify_fd, flags, mask, dfd, pathname, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), int64(flags), int64(mask), int64(dfd), int64(pathname))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), Int64FromUint32(flags), Int64FromUint64(mask), int64(dfd), int64(pathname))))) } const LOCK_EX = 2 @@ -29738,7 +29736,7 @@ func Xflock(tls *TLS, fd int32, op int32) (r int32) { trc("tls=%v fd=%v op=%v, (%v:)", tls, fd, op, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) } func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { @@ -29749,7 +29747,7 @@ func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if len1 > uint64(INT_MAX) { len1 = uint64(INT_MAX) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), Int64FromUint64(len1))))) } const GRND_INSECURE = 4 @@ -29761,7 +29759,7 @@ func Xgetrandom(tls *TLS, buf uintptr, buflen Tsize_t, flags uint32) (r Tssize_t trc("tls=%v buf=%v buflen=%v flags=%v, (%v:)", tls, buf, buflen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), int64(buflen), int64(flags), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), Int64FromUint64(buflen), Int64FromUint32(flags), 0, 0, 0))) } const IN_ACCESS = 1 @@ -29818,7 +29816,7 @@ func Xinotify_init1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = int32(X__syscall0(tls, int64(SYS_inotify_init))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r int32) { @@ -29826,7 +29824,7 @@ func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r trc("tls=%v fd=%v pathname=%v mask=%v, (%v:)", tls, fd, pathname, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), int64(mask))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), Int64FromUint32(mask))))) } func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { @@ -29834,7 +29832,7 @@ func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { trc("tls=%v fd=%v wd=%v, (%v:)", tls, fd, wd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) } func Xioperm(tls *TLS, from uint64, num uint64, turn_on int32) (r int32) { @@ -29842,7 +29840,7 @@ func Xioperm(tls *TLS, from uint64, num uint64, turn_on int32) (r int32) { trc("tls=%v from=%v num=%v turn_on=%v, (%v:)", tls, from, num, turn_on, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioperm), int64(from), int64(num), int64(turn_on))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioperm), Int64FromUint64(from), Int64FromUint64(num), int64(turn_on))))) } func Xiopl(tls *TLS, level int32) (r int32) { @@ -29850,7 +29848,7 @@ func Xiopl(tls *TLS, level int32) (r int32) { trc("tls=%v level=%v, (%v:)", tls, level, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_iopl), int64(level))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_iopl), int64(level))))) } func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { @@ -29858,7 +29856,7 @@ func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { trc("tls=%v type1=%v buf=%v len1=%v, (%v:)", tls, type1, buf, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) } const MADV_COLD = 20 @@ -29896,7 +29894,7 @@ func Xmemfd_create(tls *TLS, name uintptr, flags uint32) (r int32) { trc("tls=%v name=%v flags=%v, (%v:)", tls, name, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), Int64FromUint32(flags))))) } func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { @@ -29907,7 +29905,7 @@ func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { if flags == uint32(0) { return Xmlock(tls, addr, len1) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), int64(len1), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), Int64FromUint64(len1), Int64FromUint32(flags))))) } func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { @@ -29915,7 +29913,7 @@ func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { trc("tls=%v a=%v b=%v c=%v, (%v:)", tls, a, b, c, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_init_module), int64(a), int64(b), int64(c))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_init_module), int64(a), Int64FromUint64(b), int64(c))))) } func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { @@ -29923,7 +29921,7 @@ func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_delete_module), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_delete_module), int64(a), Int64FromUint32(b))))) } const BLKBSZGET = 1073746544 @@ -30174,7 +30172,7 @@ func Xmount(tls *TLS, special uintptr, dir uintptr, fstype uintptr, flags uint64 trc("tls=%v special=%v dir=%v fstype=%v flags=%v data=%v, (%v:)", tls, special, dir, fstype, flags, data, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), int64(flags), int64(data))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), Int64FromUint64(flags), int64(data))))) } func Xumount(tls *TLS, special uintptr) (r int32) { @@ -30182,7 +30180,7 @@ func Xumount(tls *TLS, special uintptr) (r int32) { trc("tls=%v special=%v, (%v:)", tls, special, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) } func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { @@ -30190,7 +30188,7 @@ func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { trc("tls=%v special=%v flags=%v, (%v:)", tls, special, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) } func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, mount_id uintptr, flags int32) (r int32) { @@ -30198,7 +30196,7 @@ func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, trc("tls=%v dirfd=%v pathname=%v handle=%v mount_id=%v flags=%v, (%v:)", tls, dirfd, pathname, handle, mount_id, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) } func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) (r int32) { @@ -30206,7 +30204,7 @@ func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) ( trc("tls=%v mount_fd=%v handle=%v flags=%v, (%v:)", tls, mount_fd, handle, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) } const ADDR_COMPAT_LAYOUT = 2097152 @@ -30249,7 +30247,7 @@ func Xpersonality(tls *TLS, persona uint64) (r int32) { trc("tls=%v persona=%v, (%v:)", tls, persona, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_personality), int64(persona))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_personality), Int64FromUint64(persona))))) } func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { @@ -30257,7 +30255,7 @@ func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { trc("tls=%v new1=%v old=%v, (%v:)", tls, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) } const PR_CAPBSET_DROP = 24 @@ -30434,7 +30432,7 @@ func Xprctl(tls *TLS, op int32, va uintptr) (r int32) { i++ } _ = ap - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_prctl), int64(op), int64(x[0]), int64(x[int32(1)]), int64(x[int32(2)]), int64(x[int32(3)]))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_prctl), int64(op), Int64FromUint64(x[0]), Int64FromUint64(x[int32(1)]), Int64FromUint64(x[int32(2)]), Int64FromUint64(x[int32(3)]))))) } const RWF_APPEND = 16 @@ -30453,9 +30451,9 @@ func Xpreadv2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags in if ofs == int64(-int32(1)) { return Xreadv(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit uintptr) (r1 int32) { @@ -30478,7 +30476,7 @@ func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit } new_limit = bp } - r = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) if !(r != 0) && old_limit != 0 && Bool(^Uint64FromUint64(0) != ^Uint64FromUint64(0)) { if (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur = ^Uint64FromUint64(0) @@ -30495,7 +30493,7 @@ func Xprocess_vm_writev(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec uintptr, riovcnt uint64, flags uint64) (r Tssize_t) { @@ -30503,7 +30501,7 @@ func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } const PTRACE_ATTACH = 16 @@ -30676,11 +30674,11 @@ func Xptrace(tls *TLS, req int32, va uintptr) (r int64) { data = VaUintptr(&ap) /* PTRACE_{READ,WRITE}{DATA,TEXT} (16...19) are specific to SPARC. */ _ = ap - if uint32(req)-uint32(1) < uint32(3) { + if Uint32FromInt32(req)-uint32(1) < uint32(3) { data = bp } - ret = X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) - if ret < 0 || uint32(req)-uint32(1) >= uint32(3) { + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) + if ret < 0 || Uint32FromInt32(req)-uint32(1) >= uint32(3) { return ret } return *(*int64)(unsafe.Pointer(bp)) @@ -30695,9 +30693,9 @@ func Xpwritev2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags i if ofs == int64(-int32(1)) { return Xwritev(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } const GRPQUOTA = 1 @@ -30763,7 +30761,7 @@ func Xquotactl(tls *TLS, cmd int32, special uintptr, id int32, addr uintptr) (r trc("tls=%v cmd=%v special=%v id=%v addr=%v, (%v:)", tls, cmd, special, id, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) } func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { @@ -30771,7 +30769,7 @@ func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v pos=%v len1=%v, (%v:)", tls, fd, pos, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, int64(len1)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, Int64FromUint64(len1)))) } const RB_AUTOBOOT = 19088743 @@ -30787,7 +30785,7 @@ func Xreboot(tls *TLS, type1 int32) (r int32) { trc("tls=%v type1=%v, (%v:)", tls, type1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_reboot), int64(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_reboot), Int64FromUint32(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) } func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff Tsize_t, flags int32) (r int32) { @@ -30795,7 +30793,7 @@ func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff T trc("tls=%v addr=%v size=%v prot=%v pgoff=%v flags=%v, (%v:)", tls, addr, size, prot, pgoff, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), int64(size), int64(prot), int64(pgoff), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), Int64FromUint64(size), int64(prot), Int64FromUint64(pgoff), int64(flags))))) } func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { @@ -30804,7 +30802,7 @@ func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { defer func() { trc("-> %v", r) }() } if inc != 0 { - return uintptr(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return uintptr(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } return uintptr(X__syscall1(tls, int64(SYS_brk), int64(Int32FromInt32(0)))) } @@ -30814,7 +30812,7 @@ func Xsendfile(tls *TLS, out_fd int32, in_fd int32, ofs uintptr, count Tsize_t) trc("tls=%v out_fd=%v in_fd=%v ofs=%v count=%v, (%v:)", tls, out_fd, in_fd, ofs, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), int64(count)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), Int64FromUint64(count)))) } func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { @@ -30822,7 +30820,7 @@ func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsgid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsgid), Int64FromUint32(gid))))) } func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { @@ -30830,7 +30828,7 @@ func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsuid), int64(uid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsuid), Int64FromUint32(uid))))) } func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -30838,7 +30836,7 @@ func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sethostname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sethostname), int64(name), Int64FromUint64(len1))))) } const CLONE_CHILD_CLEARTID = 2097152 @@ -30878,7 +30876,7 @@ func Xsetns(tls *TLS, fd int32, nstype int32) (r int32) { trc("tls=%v fd=%v nstype=%v, (%v:)", tls, fd, nstype, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) } const __tm_gmtoff = 0 @@ -30908,8 +30906,8 @@ func Xsettimeofday(tls *TLS, tv uintptr, tz uintptr) (r int32) { if !(tv != 0) { return 0 } - if uint64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ Ftv_sec: (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec, @@ -30955,7 +30953,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { _ = ret ret = int32(X__syscall4(tls, int64(SYS_signalfd4), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), int64(flags))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } ret = int32(X__syscall3(tls, int64(SYS_signalfd), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if ret >= 0 { @@ -30966,7 +30964,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { X__syscall3(tls, int64(SYS_fcntl), int64(ret), int64(Int32FromInt32(F_SETFL)), int64(Int32FromInt32(O_NONBLOCK))) } } - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -30974,7 +30972,7 @@ func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintpt trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx uintptr) (r int32) { @@ -30987,9 +30985,9 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u var ret int32 var _ /* st at bp+0 */ Tstat _ = ret - ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), int64(mask), int64(stx))) + ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), Int64FromUint32(mask), int64(stx))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } ret = Xfstatat(tls, dirfd, path, bp, flags) if ret != 0 { @@ -31002,15 +31000,15 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u (*Tstatx)(unsafe.Pointer(stx)).Fstx_nlink = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink) (*Tstatx)(unsafe.Pointer(stx)).Fstx_uid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_uid (*Tstatx)(unsafe.Pointer(stx)).Fstx_gid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_gid - (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_btime = Tstatx_timestamp{} (*Tstatx)(unsafe.Pointer(stx)).Fstx_mask = uint32(0x7ff) return 0 @@ -31040,7 +31038,7 @@ func Xswapon(tls *TLS, path uintptr, flags int32) (r int32) { trc("tls=%v path=%v flags=%v, (%v:)", tls, path, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) } func Xswapoff(tls *TLS, path uintptr) (r int32) { @@ -31048,7 +31046,7 @@ func Xswapoff(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) } func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) (r int32) { @@ -31056,7 +31054,7 @@ func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) trc("tls=%v fd=%v pos=%v len1=%v flags=%v, (%v:)", tls, fd, pos, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sync_file_range2), int64(fd), int64(flags), pos, len1)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sync_file_range2), int64(fd), Int64FromUint32(flags), pos, len1)))) } func Xsyncfs(tls *TLS, fd int32) (r int32) { @@ -31064,7 +31062,7 @@ func Xsyncfs(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) } func X__lsysinfo(tls *TLS, info uintptr) (r int32) { @@ -31072,7 +31070,7 @@ func X__lsysinfo(tls *TLS, info uintptr) (r int32) { trc("tls=%v info=%v, (%v:)", tls, info, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) } func Xsysinfo(tls *TLS, info uintptr) (r int32) { @@ -31088,7 +31086,7 @@ func Xtee(tls *TLS, src int32, dest int32, len1 Tsize_t, flags uint32) (r Tssize trc("tls=%v src=%v dest=%v len1=%v flags=%v, (%v:)", tls, src, dest, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), Int64FromUint64(len1), Int64FromUint32(flags)))) } const TFD_CLOEXEC = 524288 @@ -31101,7 +31099,7 @@ func Xtimerfd_create(tls *TLS, clockid int32, flags int32) (r int32) { trc("tls=%v clockid=%v flags=%v, (%v:)", tls, clockid, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) } func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr) (r int32) { @@ -31109,7 +31107,7 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr trc("tls=%v fd=%v flags=%v new1=%v old=%v, (%v:)", tls, fd, flags, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) } func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { @@ -31117,7 +31115,7 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { trc("tls=%v fd=%v cur=%v, (%v:)", tls, fd, cur, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) } func Xunshare(tls *TLS, flags int32) (r int32) { @@ -31125,7 +31123,7 @@ func Xunshare(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) } func Xutimes(tls *TLS, path uintptr, times uintptr) (r int32) { @@ -31141,7 +31139,7 @@ func Xvhangup(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_vhangup))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_vhangup))))) } func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Tssize_t) { @@ -31149,7 +31147,7 @@ func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Ts trc("tls=%v fd=%v iov=%v cnt=%v flags=%v, (%v:)", tls, fd, iov, cnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), int64(cnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), Int64FromUint64(cnt), Int64FromUint32(flags)))) } const NSIG = 65 @@ -31231,7 +31229,7 @@ func Xwait4(tls *TLS, pid Tpid_t, status uintptr, options int32, ru uintptr) (r1 Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } const XATTR_CREATE = 1 @@ -31243,7 +31241,7 @@ func Xgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31251,7 +31249,7 @@ func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31259,7 +31257,7 @@ func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v, (%v:)", tls, filedes, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size)))) } func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31267,7 +31265,7 @@ func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31275,7 +31273,7 @@ func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31283,7 +31281,7 @@ func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_ trc("tls=%v filedes=%v list=%v size=%v, (%v:)", tls, filedes, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), Int64FromUint64(size)))) } func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31291,7 +31289,7 @@ func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31299,7 +31297,7 @@ func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31307,7 +31305,7 @@ func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, filedes, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31315,7 +31313,7 @@ func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) } func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31323,7 +31321,7 @@ func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) } func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { @@ -31331,7 +31329,7 @@ func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) } type Tucontext_t2 = struct { @@ -31383,7 +31381,7 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { var sign, sw int32 _, _, _, _, _, _, _, _, _, _, _ = b, mo, n, o, ol, os, sign, sw, t, tl, ts mo = p - sw = int32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) + sw = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) b = uint32(0) n = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 2*4)), sw) o = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 3*4)), sw) @@ -31440,9 +31438,9 @@ func Xbind_textdomain_codeset(tls *TLS, domainname uintptr, codeset uintptr) (r var _empty_mo = [5]Tuint32_t{ 0: uint32(0x950412de), - 2: uint32(-Int32FromInt32(1)), - 3: uint32(-Int32FromInt32(1)), - 4: uint32(-Int32FromInt32(1)), + 2: Uint32FromInt32(-Int32FromInt32(1)), + 3: Uint32FromInt32(-Int32FromInt32(1)), + 4: Uint32FromInt32(-Int32FromInt32(1)), } const NL_CAT_LOCALE = 1 @@ -31525,12 +31523,12 @@ _6: goto _9 _9: strings = map1 + uintptr(20) + uintptr(v8) - v10 = uint32(set_id) + v10 = Uint32FromInt32(set_id) v11 = v10>>int32(24) | v10>>int32(8)&uint32(0xff00) | v10<>int32(24) | v13>>int32(8)&uint32(0xff00) | v13< uint64(NAME_MAX) || dirlen >= uint64(PATH_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) @@ -31851,7 +31849,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r1 uintptr) return uintptr(0) } (*Tbinding)(unsafe.Pointer(p4)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) - (*Tbinding)(unsafe.Pointer(p4)).Fdirlen = int32(dirlen) + (*Tbinding)(unsafe.Pointer(p4)).Fdirlen = Int32FromUint64(dirlen) (*Tbinding)(unsafe.Pointer(p4)).Fdomainname = p4 + 32 (*Tbinding)(unsafe.Pointer(p4)).Fdirname = p4 + 32 + uintptr(domlen) + uintptr(1) Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p4)).Fdomainname, domainname, domlen+uint64(1)) @@ -31973,13 +31971,13 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n if !(msgid1 != 0) { goto notrans } - if uint32(category) >= uint32(LC_ALL) { + if Uint32FromInt32(category) >= uint32(LC_ALL) { goto notrans } if !(domainname != 0) { domainname = X__gettextdomain(tls) } - domlen = Xstrnlen(tls, domainname, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + domlen = Xstrnlen(tls, domainname, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if domlen > uint64(NAME_MAX) { goto notrans } @@ -32032,7 +32030,7 @@ _2: dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 16 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 - dirlen = uint64((*Tbinding)(unsafe.Pointer(q)).Fdirlen) + dirlen = Uint64FromInt32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) loclen = Xstrlen(tls, locname) catlen = uint64(_catlens[category]) /* Logically split @mod suffix from locale name. */ @@ -32040,19 +32038,19 @@ _2: if !(modname != 0) { modname = locname + uintptr(loclen) } - v5 = loclen - uint64(int64(modname)-int64(locname)) + v5 = loclen - Uint64FromInt64(int64(modname)-int64(locname)) modlen = v5 alt_modlen = v5 - loclen = uint64(int64(modname) - int64(locname)) + loclen = Uint64FromInt64(int64(modname) - int64(locname)) /* Drop .charset identifier; it is not used. */ csp = Xmemchr(tls, locname, int32('.'), loclen) if csp != 0 { - loclen = uint64(int64(csp) - int64(locname)) + loclen = Uint64FromInt64(int64(csp) - int64(locname)) } v6 = dirlen + uint64(1) + loclen + modlen + uint64(1) + catlen + uint64(1) + domlen + uint64(3) + uint64(1) name = Xrealloc(tls, name, v6) for { - Xsnprintf(tls, name, v6, __ccgo_ts+471, VaList(bp+24, dirname, int32(loclen), locname, int32(alt_modlen), modname, catname, domainname)) + Xsnprintf(tls, name, v6, __ccgo_ts+471, VaList(bp+24, dirname, Int32FromUint64(loclen), locname, Int32FromUint64(alt_modlen), modname, catname, domainname)) v8 = X__map_file(tls, name, bp) map1 = v8 if v8 != 0 { @@ -32065,7 +32063,7 @@ _2: v9 = Xmemchr(tls, locname, int32('_'), loclen) locp = v9 if v9 != 0 { - loclen = uint64(int64(locp) - int64(locname)) + loclen = Uint64FromInt64(int64(locp) - int64(locname)) alt_modlen = modlen } else { break @@ -32102,8 +32100,8 @@ _2: if r1 != 0 { r1 += uintptr(13) for { - v11 = int32(*(*uint8)(unsafe.Pointer(r1))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r1))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: if !(v12 != 0) { @@ -32115,14 +32113,14 @@ _2: np = Xstrtoul(tls, r1+uintptr(9), bp+8, int32(10)) r1 = *(*uintptr)(unsafe.Pointer(bp + 8)) } - for *(*uint8)(unsafe.Pointer(r1)) != 0 && int32(*(*uint8)(unsafe.Pointer(r1))) != int32(';') { + for *(*uint8)(unsafe.Pointer(r1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(r1))) != int32(';') { r1++ } if *(*uint8)(unsafe.Pointer(r1)) != 0 { r1++ for { - v14 = int32(*(*uint8)(unsafe.Pointer(r1))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r1))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: if !(v15 != 0) { @@ -32135,7 +32133,7 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals = Int32FromUint64(np) (*Tmsgcat)(unsafe.Pointer(p3)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) @@ -32191,7 +32189,7 @@ _2: * msgid2 to request that dcngettext suppress plural processing. */ if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals != 0 { plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p3)).Fplural_rule, n) - if plural > uint64((*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals) { + if plural > Uint64FromInt32((*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals) { goto notrans } for { @@ -32200,7 +32198,7 @@ _2: if !(v29 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size - uint64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p3)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size - Uint64FromInt64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p3)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint64(1) >= rem { goto notrans @@ -98429,7 +98427,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(a)) != 0 && *(*uint8)(unsafe.Pointer(b)) != 0) { break } - for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && uint32(int32(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { + for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { a++ } if uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32) != uint32(*(*uint8)(unsafe.Pointer(b))) { @@ -98441,7 +98439,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { a++ b++ } - return BoolInt32(int32(*(*uint8)(unsafe.Pointer(a))) != int32(*(*uint8)(unsafe.Pointer(b)))) + return BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(b)))) } func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { @@ -98465,11 +98463,11 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { ; s += uintptr(Xstrlen(tls, s) + uint64(1)) } - return uint64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) + return Uint64FromInt64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) } s += uintptr(Xstrlen(tls, s) + uint64(1)) if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - if int32(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { s += uintptr(2) } else { s += uintptr(uint32(2) + (uint32(64)-uint32(*(*uint8)(unsafe.Pointer(s + 1))))*uint32(5)) @@ -98478,7 +98476,7 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { goto _1 _1: } - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } type Tstateful_cd = struct { @@ -98510,16 +98508,16 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { _, _, _, _, _, _, _ = cd, f, scd, t, v1, v2, v3 v1 = _find_charmap(tls, to) t = v1 - if v3 = v1 == uint64(-Int32FromInt32(1)); !v3 { + if v3 = v1 == Uint64FromInt32(-Int32FromInt32(1)); !v3 { v2 = _find_charmap(tls, from) f = v2 } - if v3 || v2 == uint64(-Int32FromInt32(1)) || int32(_charmaps[t]) >= int32(0330) { + if v3 || v2 == Uint64FromInt32(-Int32FromInt32(1)) || Int32FromUint8(_charmaps[t]) >= int32(0330) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } cd = _combine_to_from(tls, t, f) - switch int32(_charmaps[f]) { + switch Int32FromUint8(_charmaps[f]) { case int32(UTF_16): fallthrough case int32(UTF_32): @@ -98540,7 +98538,7 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { func _get_16(tls *TLS, s uintptr, e int32) (r uint32) { e &= int32(1) - return uint32(int32(*(*uint8)(unsafe.Pointer(s + uintptr(e))))<>(uint32(2)*x%uint32(8)) | int32(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) + x = c - Uint32FromInt32(int32(4)*Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1)))))) + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)))))>>(uint32(2)*x%uint32(8)) | Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) if x < uint32(256) { v1 = x } else { @@ -98656,7 +98654,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } c = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) l = uint64(1) - switch int32(type1) { + switch Int32FromUint8(type1) { case int32(UTF_8): goto _2 case int32(US_ASCII): @@ -98707,13 +98705,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } l = Xmbrtowc(tls, bp+32, *(*uintptr)(unsafe.Pointer(in)), *(*Tsize_t)(unsafe.Pointer(inb)), bp+24) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { goto ilseq } - if l == uint64(-Int32FromInt32(2)) { + if l == Uint64FromInt32(-Int32FromInt32(2)) { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) goto _23 _3: ; @@ -98727,7 +98725,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < l { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) if !(0 != 0) { goto _24 } @@ -98739,7 +98737,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) _24: ; if c-uint32(0xd800) < uint32(0x800) || c >= uint32(0x110000) { @@ -98758,19 +98756,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(2) { goto starved } - c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) if c-Uint32FromInt32(0xdc00) < uint32(0x400) { goto ilseq } if c-Uint32FromInt32(0xd800) < uint32(0x400) { - if uint32(int32(type1)-int32(UCS2BE)) < uint32(2) { + if Uint32FromInt32(Int32FromUint8(type1)-int32(UCS2BE)) < uint32(2) { goto ilseq } l = uint64(4) if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), int32(type1)) + d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), Int32FromUint8(type1)) if d-Uint32FromInt32(0xdc00) >= uint32(0x400) { goto ilseq } @@ -98787,7 +98785,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), 0) - if int32(type1) == int32(UCS2) { + if Int32FromUint8(type1) == int32(UCS2) { if c == uint32(0xfffe) { v26 = int32(UCS2LE) } else { @@ -98802,7 +98800,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } v25 = v27 } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v25) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v25) if c == uint32(0xfffe) || c == uint32(0xfeff) { l = uint64(2) } @@ -98822,7 +98820,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v28 = int32(UTF_32BE) } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v28) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v28) if c == uint32(0xfffe0000) || c == uint32(0xfeff) { l = uint64(4) } @@ -98834,8 +98832,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto _23 } - if c-uint32(0xa1) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + if c-uint32(0xa1) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } l = uint64(2) @@ -98843,17 +98841,17 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if c-uint32(129) <= uint32(Int32FromInt32(159)-Int32FromInt32(129)) { + if c-uint32(129) <= Uint32FromInt32(Int32FromInt32(159)-Int32FromInt32(129)) { c -= uint32(129) } else { - if c-uint32(224) <= uint32(Int32FromInt32(239)-Int32FromInt32(224)) { + if c-uint32(224) <= Uint32FromInt32(Int32FromInt32(239)-Int32FromInt32(224)) { c -= uint32(193) } else { goto ilseq } } c *= uint32(2) - if d-uint32(64) <= uint32(Int32FromInt32(158)-Int32FromInt32(64)) { + if d-uint32(64) <= Uint32FromInt32(Int32FromInt32(158)-Int32FromInt32(64)) { if d == uint32(127) { goto ilseq } @@ -98862,7 +98860,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } d -= uint32(64) } else { - if d-uint32(159) <= uint32(Int32FromInt32(252)-Int32FromInt32(159)) { + if d-uint32(159) <= Uint32FromInt32(Int32FromInt32(252)-Int32FromInt32(159)) { c++ d -= uint32(159) } @@ -98887,10 +98885,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) if c == uint32(0x8e) { c = d - if c-uint32(0xa1) > uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + if c-uint32(0xa1) > Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { goto ilseq } - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } c -= uint32(0xa1) @@ -98918,7 +98916,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c != uint32('(') && c != uint32('$') { goto ilseq } - switch uint32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { + switch Uint32FromInt32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { case uint32('B'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(0) goto _1 @@ -98928,10 +98926,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui case uint32('I'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(4) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('@')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('@')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(2) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('B')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('B')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(3) goto _1 } @@ -98967,7 +98965,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto ilseq } if c-uint32(0x21) < uint32(0x5e) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) } break } @@ -99000,11 +98998,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d < uint32(0xa1) && int32(type1) == int32(GB2312) { + if d < uint32(0xa1) && Int32FromUint8(type1) == int32(GB2312) { goto ilseq } if d-uint32(0x40) >= uint32(191) || d == uint32(127) { - if d-uint32('0') > uint32(9) || int32(type1) != int32(GB18030) { + if d-uint32('0') > uint32(9) || Int32FromUint8(type1) != int32(GB18030) { goto ilseq } l = uint64(4) @@ -99075,23 +99073,23 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d-uint32(0x40) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < uint32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { + if d-uint32(0x40) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < Uint32FromInt32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { goto ilseq } d -= uint32(0x40) if d > uint32(0x3e) { d -= uint32(0x22) } - if c-uint32(0xa1) >= uint32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { - if c-uint32(0x87) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { + if c-uint32(0xa1) >= Uint32FromInt32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { + if c-uint32(0x87) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { goto ilseq } if c < uint32(0xa1) { c -= uint32(0x87) } else { - c -= uint32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) + c -= Uint32FromInt32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) } - c = uint32(int32(_hkscs[uint32(4867)+(c*uint32(157)+d)/uint32(16)])>>((c*uint32(157)+d)%uint32(16))%int32(2)<>((c*uint32(157)+d)%uint32(16))%int32(2)< *(*Tsize_t)(unsafe.Pointer(outb)) { goto toobig } @@ -99120,7 +99118,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } c -= uint32(0xa1) - c = uint32(int32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(&_big5)) + uintptr(c)*314 + uintptr(d)*2))) | BoolInt32(c == uint32(0x27) && (d == uint32(0x3a) || d == uint32(0x3c) || d == uint32(0x42)))<= uint32(93) || d >= uint32(94) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) d += uint32(0xa1) - if c >= uint32(93) || c >= uint32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { + if c >= uint32(93) || c >= Uint32FromInt32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { goto ilseq } if d-uint32('A') < uint32(26) { @@ -99149,7 +99147,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if d-uint32('a') < uint32(26) { d = d - uint32('a') + uint32(26) } else { - if d-uint32(0x81) < uint32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { + if d-uint32(0x81) < Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { d = d - uint32(0x81) + uint32(52) } else { goto ilseq @@ -99159,7 +99157,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(0x20) { c = uint32(178)*c + d } else { - c = uint32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d + c = Uint32FromInt32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d } c += uint32(0xac00) d = uint32(0xac00) @@ -99214,7 +99212,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } _23: ; - switch int32(totype) { + switch Int32FromUint8(totype) { case int32(WCHAR_T): goto _35 case int32(UTF_8): @@ -99254,20 +99252,20 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = int32(c) + *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = Int32FromUint32(c) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 _36: ; if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { - k = uint64(Xwctomb(tls, bp+56, int32(c))) + k = Uint64FromInt32(Xwctomb(tls, bp+56, Int32FromUint32(c))) if *(*Tsize_t)(unsafe.Pointer(outb)) < k { goto toobig } Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(out)), bp+56, k) } else { - k = uint64(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), int32(c))) + k = Uint64FromInt32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), Int32FromUint32(c))) } *(*uintptr)(unsafe.Pointer(out)) += uintptr(k) *(*Tsize_t)(unsafe.Pointer(outb)) -= k @@ -99307,7 +99305,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui _53: ; d = c - c = uint32(int32(4) * int32(totype)) + c = Uint32FromInt32(int32(4) * Int32FromUint8(totype)) for { if !(c < uint32(256)) { break @@ -99336,8 +99334,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui c = uint32('~') goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) goto revout } c = _uni_to_jis(tls, c) @@ -99357,7 +99355,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v59 = int32(176) } - *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + uint32(v59)) + *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + Uint32FromInt32(v59)) v61 = out v60 = *(*uintptr)(unsafe.Pointer(v61)) *(*uintptr)(unsafe.Pointer(v61))++ @@ -99374,8 +99372,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) } else { c = _uni_to_jis(tls, c) } @@ -99400,7 +99398,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(7) { goto toobig } @@ -99511,14 +99509,14 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ; _43: ; - if c < uint32(0x10000) || uint32(int32(totype)-int32(UCS2BE)) < uint32(2) { + if c < uint32(0x10000) || Uint32FromInt32(Int32FromUint8(totype)-int32(UCS2BE)) < uint32(2) { if c >= uint32(0x10000) { c = uint32(0xFFFD) } if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(2) { goto toobig } - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(2) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 @@ -99527,8 +99525,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto toobig } c -= uint32(0x10000) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), int32(totype)) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), Int32FromUint8(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99542,7 +99540,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99560,19 +99558,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ilseq: ; err = int32(EILSEQ) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto toobig toobig: ; err = int32(E2BIG) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto starved starved: ; err = int32(EINVAL) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end end: ; @@ -99761,7 +99759,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { /* Limit name length and forbid leading dot or any slashes. */ n = uint64(0) for { - if !(n < uint64(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && int32(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { + if !(n < uint64(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { break } goto _8 @@ -99769,12 +99767,12 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { ; n++ } - if int32(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { val = __ccgo_ts + 579 } - builtin = BoolInt32(int32(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+579) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+587) != 0)) + builtin = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+579) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+587) != 0)) if builtin != 0 { - if cat == LC_CTYPE && int32(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { + if cat == LC_CTYPE && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { return uintptr(unsafe.Pointer(&X__c_dot_utf8)) } return uintptr(0) @@ -99802,7 +99800,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { break } z = X__strchrnul(tls, path, int32(':')) - l = uint64(int64(z) - int64(path)) + l = Uint64FromInt64(int64(z) - int64(path)) if l >= uint64(256)-n-uint64(2) { goto _10 } @@ -100041,8 +100039,8 @@ func _skipspace(tls *TLS, s uintptr) (r uintptr) { var v1, v2 int32 _, _ = v1, v2 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -100067,23 +100065,23 @@ func _evalprim(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { s = _skipspace(tls, s) if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { (*Tst)(unsafe.Pointer(st)).Fr = Xstrtoul(tls, s, bp, int32(10)) - if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == uint64(-Int32FromInt32(1)) { + if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == Uint64FromInt32(-Int32FromInt32(1)) { return __ccgo_ts } return _skipspace(tls, *(*uintptr)(unsafe.Pointer(bp))) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('n') { (*Tst)(unsafe.Pointer(st)).Fr = (*Tst)(unsafe.Pointer(st)).Fn return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(')') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(')') { return __ccgo_ts } return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('!') { s = _evalprim(tls, st, s+uintptr(1), d) (*Tst)(unsafe.Pointer(st)).Fr = BoolUint64(!((*Tst)(unsafe.Pointer(st)).Fr != 0)) return s @@ -100154,9 +100152,9 @@ func _parseop(tls *TLS, st uintptr, s uintptr) (r uintptr) { if !(i < int32(11)) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(_opch[i]) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(_opch[i]) { /* note: >,< are accepted with or without = */ - if i < int32(6) && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(_opch2[i]) { + if i < int32(6) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == Int32FromUint8(_opch2[i]) { (*Tst)(unsafe.Pointer(st)).Fop = i return s + uintptr(2) } @@ -100193,11 +100191,11 @@ func _evalbinop(tls *TLS, st uintptr, s uintptr, minprec int32, d int32) (r uint if op was missing then prec[op]==0 */ op = (*Tst)(unsafe.Pointer(st)).Fop - if int32(_prec[op]) <= minprec { + if Int32FromUint8(_prec[op]) <= minprec { return s } left = (*Tst)(unsafe.Pointer(st)).Fr - s = _evalbinop(tls, st, s, int32(_prec[op]), d) + s = _evalbinop(tls, st, s, Int32FromUint8(_prec[op]), d) if _binop(tls, st, op, left) != 0 { return __ccgo_ts } @@ -100233,12 +100231,12 @@ func _evalexpr(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { return __ccgo_ts } s = _evalbinop(tls, st, s, 0, d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') { return s } a = (*Tst)(unsafe.Pointer(st)).Fr s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(':') { return __ccgo_ts } b = (*Tst)(unsafe.Pointer(st)).Fr @@ -100264,10 +100262,10 @@ func X__pleval(tls *TLS, s uintptr, n uint64) (r uint64) { _ = v1 (*(*Tst)(unsafe.Pointer(bp))).Fn = n s = _evalexpr(tls, bp, s, int32(100)) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(';') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(';') { v1 = (*(*Tst)(unsafe.Pointer(bp))).Fr } else { - v1 = uint64(-Int32FromInt32(1)) + v1 = Uint64FromInt32(-Int32FromInt32(1)) } return v1 } @@ -100287,7 +100285,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { var _ /* part at bp+48 */ [24]uint8 var _ /* tmp_locale at bp+0 */ t__locale_struct _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, l, lm, lm1, p, part1, ret, s, same, z, v3, v4, v5, v6 - if uint32(cat) > uint32(LC_ALL) { + if Uint32FromInt32(cat) > uint32(LC_ALL) { return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&X__locale_lock))) @@ -100307,7 +100305,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { } z = X__strchrnul(tls, p, int32(';')) if int64(z)-int64(p) <= int64(LOCALE_NAME_MAX) { - Xmemcpy(tls, bp+48, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, bp+48, p, Uint64FromInt64(int64(z)-int64(p))) (*(*[24]uint8)(unsafe.Pointer(bp + 48)))[int64(z)-int64(p)] = uint8(0) if *(*uint8)(unsafe.Pointer(z)) != 0 { p = z + uintptr(1) @@ -100421,7 +100419,7 @@ _3: if !(n != 0 && *(*uint8)(unsafe.Pointer(fmt)) != 0) { goto _1 } - if !(int32(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { goto _4 } goto literal @@ -100437,7 +100435,7 @@ literal: _4: ; fmt++ - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { goto literal } fill = int32(' ') @@ -100446,11 +100444,11 @@ _4: nosym = 0 left = 0 for { - switch int32(*(*uint8)(unsafe.Pointer(fmt))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) { case int32('='): fmt++ v8 = fmt - fill = int32(*(*uint8)(unsafe.Pointer(v8))) + fill = Int32FromUint8(*(*uint8)(unsafe.Pointer(v8))) goto _7 case int32('^'): nogrp = int32(1) @@ -100478,7 +100476,7 @@ _4: if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - fw = int32(10)*fw + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + fw = int32(10)*fw + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _9 _9: ; @@ -100486,28 +100484,28 @@ _4: } lp = 0 rp = int32(2) - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { lp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - lp = int32(10)*lp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + lp = int32(10)*lp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _10 _10: ; fmt++ } } - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { rp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - rp = int32(10)*rp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + rp = int32(10)*rp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _11 _11: ; @@ -100516,13 +100514,13 @@ _4: } v12 = fmt fmt++ - intl = BoolInt32(int32(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) + intl = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) w = lp + int32(1) + rp if !(left != 0) && fw > w { w = fw } x = VaFloat64(&ap) - l = uint64(Xsnprintf(tls, s, n, __ccgo_ts+608, VaList(bp+8, w, rp, x))) + l = Uint64FromInt32(Xsnprintf(tls, s, n, __ccgo_ts+608, VaList(bp+8, w, rp, x))) if l >= n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(E2BIG) return int64(-int32(1)) @@ -100693,7 +100691,7 @@ func Xtextdomain(tls *TLS, domainname uintptr) (r uintptr) { return uintptr(0) } if !(_current_domain != 0) { - _current_domain = Xmalloc(tls, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + _current_domain = Xmalloc(tls, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if !(_current_domain != 0) { return uintptr(0) } @@ -100829,7 +100827,7 @@ func Xreallocarray(tls *TLS, ptr uintptr, m Tsize_t, n Tsize_t) (r uintptr) { trc("tls=%v ptr=%v m=%v n=%v, (%v:)", tls, ptr, m, n, origin(2)) defer func() { trc("-> %v", r) }() } - if n != 0 && m > uint64(-Int32FromInt32(1))/n { + if n != 0 && m > Uint64FromInt32(-Int32FromInt32(1))/n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -100903,7 +100901,7 @@ func X__expo2(tls *TLS, x float64, sign float64) (r float64) { var v1 Tuint64_t _, _ = scale, v1 /* note that k is odd and scale*scale overflows */ - v1 = uint64(uint32(Int32FromInt32(0x3ff)+_k2/Int32FromInt32(2))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(e != 0) { if *(*Tuint64_t)(unsafe.Pointer(bp))<> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(e != 0) { if *(*Tuint32_t)(unsafe.Pointer(bp))<> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix <= uint32(0x400f6a7a) { /* |x| ~<= 5pi/4 */ if ix&uint32(0xfffff) == uint32(0x921fb) { /* |x| ~= pi/2 or 2pi/2 */ @@ -101306,8 +101304,8 @@ medium: } *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - ex = int32(ix >> int32(20)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ex = Int32FromUint32(ix >> int32(20)) if ex-ey > int32(16) { /* 2nd round, good to 118 bits */ t = r w = fn * _pio2_2 @@ -101315,7 +101313,7 @@ medium: w = fn*_pio2_2t - (t - r - w) *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if ex-ey > int32(49) { /* 3rd round, good to 151 bits, covers all cases */ t = r w = fn * _pio2_3 @@ -101339,8 +101337,8 @@ _1: } /* set z = scalbn(|x|,-ilogb(x)+23) */ *(*float64)(unsafe.Pointer(bp)) = x - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) >> Int32FromInt32(12) - *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) >> Int32FromInt32(12) + *(*Tuint64_t)(unsafe.Pointer(bp)) |= Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) z = *(*float64)(unsafe.Pointer(bp)) i = 0 for { @@ -101359,7 +101357,7 @@ _1: for (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] == float64(0) { i-- } - n = X__rem_pio2_large(tls, bp+8, bp+32, int32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) + n = X__rem_pio2_large(tls, bp+8, bp+32, Int32FromUint32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) if sign != 0 { *(*float64)(unsafe.Pointer(y)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[0] *(*float64)(unsafe.Pointer(y + 1*8)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[int32(1)] @@ -101931,9 +101929,9 @@ func X__rem_pio2f(tls *TLS, x float32, y uintptr) (r int32) { return 0 } /* scale x into [2^23, 2^24-1] */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) - e0 = int32(ix>>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ - *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - uint32(e0<> int32(31)) + e0 = Int32FromUint32(ix>>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - Uint32FromInt32(e0<> int32(63)) + return Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) } // C documentation @@ -101993,7 +101991,7 @@ func X__signbitf(tls *TLS, x float32) (r int32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - return int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + return Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) } func X__signbitl(tls *TLS, x float64) (r int32) { @@ -102086,7 +102084,7 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) big = BoolInt32(hx&uint32(0x7fffffff) >= uint32(0x3FE59428)) /* |x| >= 0.6744 */ if big != 0 { - sign = int32(hx >> int32(31)) + sign = Int32FromUint32(hx >> int32(31)) if sign != 0 { x = -x y = -y @@ -102121,13 +102119,13 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { } /* -1.0/(x+r) has up to 2ulp error, so compute it accurately */ w0 = w - v2 = *(*Tuint64_t)(unsafe.Pointer(&w0))>>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) /* x < 1 domain error is handled in the called functions */ - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| < 2, up to 2ulp error in [1,1.125] */ return Xlog1p(tls, x-Float64FromInt32(1)+Xsqrt(tls, (x-Float64FromInt32(1))*(x-Float64FromInt32(1))+Float64FromInt32(2)*(x-Float64FromInt32(1)))) } - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| < 0x1p26 */ return Xlog(tls, Float64FromInt32(2)*x-Float64FromInt32(1)/(x+Xsqrt(tls, x*x-Float64FromInt32(1)))) } @@ -102373,12 +102371,12 @@ func Xacoshf(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x a = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - if a < uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { - if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { @@ -102618,15 +102616,15 @@ func Xasinhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i x3 = *(*float32)(unsafe.Pointer(bp)) - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { - if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { @@ -102882,7 +102880,7 @@ _2: } } /* |y/x| > 0x1p64 */ - if ix+uint32(Int32FromInt32(64)< 0x1p26 */ - if ix+uint32(Int32FromInt32(26)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) y3 = *(*float64)(unsafe.Pointer(bp)) - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { /* handle underflow */ if e == uint32(0) { if uint64(4) == uint64(4) { @@ -103241,10 +103239,10 @@ func Xatanhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) y3 = *(*float32)(unsafe.Pointer(bp)) - if *(*Tuint32_t)(unsafe.Pointer(bp)) < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(1)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -103546,12 +103544,12 @@ func Xceilf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -103718,7 +103716,7 @@ func Xcos(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) @@ -103812,7 +103810,7 @@ func Xcosf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -103858,12 +103856,12 @@ func Xcosh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(2) */ if w < uint32(0x3fe62e42) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -104111,7 +104109,7 @@ func Xerfc(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104256,7 +104254,7 @@ func Xerff(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -104296,7 +104294,7 @@ func Xerfcf(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104464,7 +104462,7 @@ _3: kd -= X__exp_data.Fshift r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<>int32(52)&uint64(0x7ff) < uint64(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { + if *(*Tuint64_t)(unsafe.Pointer(bp + 8))>>int32(52)&uint64(0x7ff) < Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { if !(y != 0) { return _p10[int32(*(*float64)(unsafe.Pointer(bp)))+int32(15)] } @@ -104591,7 +104589,7 @@ func Xexp10f(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp + 4)) = *(*float32)(unsafe.Pointer(bp)) /* fabsf(n) < 8 without raising invalid on nan */ - if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < uint32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { + if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { if !(y != 0) { return _p101[int32(*(*float32)(unsafe.Pointer(bp)))+int32(7)] } @@ -104758,7 +104756,7 @@ _5: kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4043687A) { /* if |x|>=56*ln2 */ *(*float64)(unsafe.Pointer(bp)) = x3 @@ -105093,7 +105091,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return float64(1) + float64(2)*(x3-e) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ twopk = *(*float64)(unsafe.Pointer(bp + 8)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + float64(1) @@ -105104,7 +105102,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return y3 - float64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { @@ -105150,7 +105148,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4195b844) { /* if |x|>=27*ln2 */ if hx > uint32(0x7f800000) { /* NaN */ @@ -105228,7 +105226,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return Float32FromFloat32(1) + Float32FromFloat32(2)*(x3-e) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) + k) << int32(23)) /* 2^k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) + k) << int32(23)) /* 2^k */ twopk = *(*float32)(unsafe.Pointer(bp)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + Float32FromFloat32(1) @@ -105239,7 +105237,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return y3 - Float32FromFloat32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { y3 = (x3 - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk } else { @@ -105461,7 +105459,7 @@ func Xfloor(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -105521,12 +105519,12 @@ func Xfloorf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -105588,13 +105586,13 @@ func _normalize(tls *TLS, x float64) (r Tnum) { var v1 float64 _, _, _, _, _ = e, ix, sign, v1, v2 ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - e = int32(ix >> int32(52)) + e = Int32FromUint64(ix >> int32(52)) sign = e & int32(0x800) e &= int32(0x7ff) if !(e != 0) { v1 = x * float64(9.223372036854776e+18) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) - e = int32(ix >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(ix >> int32(52) & uint64(0x7ff)) if e != 0 { v2 = e - int32(63) } else { @@ -105721,7 +105719,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { v1 = *(*Tuint64_t)(unsafe.Pointer(bp)) // __asm__ ("cntlzd %0, %1" : "=r"(x) : "r"(x)); X__assert_fail(tls, __ccgo_ts+212, __ccgo_ts+247, 60, __ccgo_ts+614) - v2 = int32(v1) + v2 = Int32FromUint64(v1) goto _3 _3: d = v2 - int32(1) @@ -105732,7 +105730,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { v4 = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) // __asm__ ("cntlzd %0, %1" : "=r"(x) : "r"(x)); X__assert_fail(tls, __ccgo_ts+212, __ccgo_ts+247, 60, __ccgo_ts+614) - v5 = int32(v4) + v5 = Int32FromUint64(v4) goto _6 _6: d = v5 - int32(1) @@ -105748,7 +105746,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { } e -= d /* convert to double */ - i = int64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ + i = Int64FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ if sign != 0 { i = -i } @@ -105770,7 +105768,7 @@ func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { /* one bit is lost when scaled, add another top bit to only round once at conversion if it is inexact */ if *(*Tuint64_t)(unsafe.Pointer(bp))<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) + i = Int64FromUint64((*(*Tuint64_t)(unsafe.Pointer(bp))>>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) if sign != 0 { i = -i } @@ -105842,12 +105840,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = y } else { v9 = x @@ -105899,12 +105897,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = y } else { v9 = x @@ -105964,12 +105962,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = x } else { v9 = y @@ -106021,12 +106019,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = x } else { v9 = y @@ -106090,9 +106088,9 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* in the followings uxi should be ux.i, but then gcc wrongly adds */ /* float load/store to inner loops ruining performance and code size */ uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) @@ -106124,7 +106122,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ex-- i <<= uint64(1) } - uxi <<= uint64(-ex + int32(1)) + uxi <<= Uint64FromInt32(-ex + int32(1)) } else { uxi = uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -106186,11 +106184,11 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { /* scale result */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } - uxi |= uint64(sx) << int32(63) + uxi |= Uint64FromInt32(sx) << int32(63) *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi return *(*float64)(unsafe.Pointer(bp + 8)) } @@ -106235,8 +106233,8 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) sx = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) & uint32(0x80000000) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106284,7 +106282,7 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106327,9 +106325,9 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { /* scale result up */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } uxi |= sx *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi @@ -106366,7 +106364,7 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { Fd float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ee = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(ee != 0) { if x != 0 { x = Xfrexp(tls, x*float64(1.8446744073709552e+19), e) @@ -106410,7 +106408,7 @@ func Xfrexpf(tls *TLS, x float32, e uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + ee = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(ee != 0) { if x != 0 { x = Xfrexpf(tls, float32(float64(x)*float64(1.8446744073709552e+19)), e) @@ -106518,8 +106516,8 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) { })(unsafe.Pointer(bp + 8)) = ut } /* special cases */ - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) x = *(*float64)(unsafe.Pointer(bp)) y = *(*float64)(unsafe.Pointer(bp + 8)) /* note: hypot(inf,nan) == inf */ @@ -106611,19 +106609,19 @@ func Xhypotf(tls *TLS, x float32, y float32) (r float32) { } x = *(*float32)(unsafe.Pointer(bp)) y = *(*float32)(unsafe.Pointer(bp + 4)) - if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(25)<= Uint32FromInt32(Int32FromInt32(0xff)<= Uint32FromInt32(Int32FromInt32(25)<= uint32((Int32FromInt32(0x7f)+Int32FromInt32(60))<= Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(60))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { i <<= uint64(12) if i == uint64(0) { @@ -106739,7 +106737,7 @@ func Xilogbf(tls *TLS, x3 float32) (r int32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) - e = int32(i >> int32(23) & uint32(0xff)) + e = Int32FromUint32(i >> int32(23) & uint32(0xff)) if !(e != 0) { i <<= uint32(9) if i == uint32(0) { @@ -107547,7 +107545,7 @@ func Xj1(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { return Float64FromInt32(1) / (x * x) @@ -107883,7 +107881,7 @@ func Xj1f(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return Float32FromInt32(1) / (x * x) @@ -108172,7 +108170,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108374,7 +108372,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108468,7 +108466,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { var ix Tuint32_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = a, b, h, i, ix, k, nf, nm1, q0, q1, sign, t, temp, tmp, w, z, v6 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108633,7 +108631,7 @@ func Xynf(tls *TLS, n int32, x float32) (r float32) { var ib, ix Tuint32_t _, _, _, _, _, _, _, _, _, _ = a, b, i, ib, ix, nm1, sign, temp, v1, v3 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108835,12 +108833,12 @@ func X__lgamma_r(tls *TLS, x float64, signgamp uintptr) (r1 float64) { *(*float64)(unsafe.Pointer(bp)) = x /* purge off +-inf, NaN, +-0, tiny and negative arguments */ *(*int32)(unsafe.Pointer(signgamp)) = int32(1) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix >= uint32(0x7ff00000) { return x * x } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(70))<> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) ix = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return x * x @@ -109359,7 +109357,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109380,8 +109378,8 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<>Int32FromInt32(20)) - int32(0x3ff) + hx += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k += Int32FromUint32(hx>>Int32FromInt32(20)) - int32(0x3ff) hx = hx&uint32(0x000fffff) + uint32(0x3fe6a09e) *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(hx)<>Int32FromInt32(23)) - int32(0x7f) + ix += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k += Int32FromUint32(ix>>Int32FromInt32(23)) - int32(0x7f) ix = ix&uint32(0x007fffff) + uint32(0x3f3504f3) *(*Tuint32_t)(unsafe.Pointer(bp)) = ix x = *(*float32)(unsafe.Pointer(bp)) @@ -109642,7 +109640,7 @@ func Xlog1p(tls *TLS, x3 float64) (r float64) { } /* log1p(-1) = -inf */ return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } - if hx<> int32(32)) - hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) - k = int32(hu>>Int32FromInt32(20)) - int32(0x3ff) + hu += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k = Int32FromUint32(hu>>Int32FromInt32(20)) - int32(0x3ff) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(54) { if k >= int32(2) { @@ -109742,7 +109740,7 @@ func Xlog1pf(tls *TLS, x3 float32) (r float32) { } /* log1p(-1)=+inf */ return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } - if ix<>Int32FromInt32(23)) - int32(0x7f) + iu += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k = Int32FromUint32(iu>>Int32FromInt32(23)) - int32(0x7f) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(25) { if k >= int32(2) { @@ -109863,7 +109861,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109884,8 +109882,8 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109975,16 +109973,16 @@ func Xlog2f(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + k = Int32FromUint32(tmp) >> int32(23) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -110151,7 +110149,7 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) } - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -110165,14 +110163,14 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % uint32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + i = Int32FromUint32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ iz = ix - tmp&uint32(0xff800000) invc = (*(*struct { Finvc float64 @@ -110311,7 +110309,7 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) /* no fractional part */ if e >= int32(52) { *(*float64)(unsafe.Pointer(iptr)) = x @@ -110363,7 +110361,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) /* no fractional part */ if e >= int32(23) { *(*float32)(unsafe.Pointer(iptr)) = x @@ -110379,7 +110377,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { *(*float32)(unsafe.Pointer(iptr)) = *(*float32)(unsafe.Pointer(bp)) return x } - mask = uint32(int32(0x007fffff) >> e) + mask = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&mask == uint32(0) { *(*float32)(unsafe.Pointer(iptr)) = x *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x80000000) @@ -110502,7 +110500,7 @@ _2: *(*Tuint64_t)(unsafe.Pointer(bp + 8))++ } } - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) /* raise overflow if ux.f is infinite and x is finite */ if e == int32(0x7ff) { if uint64(8) == uint64(4) { @@ -110703,7 +110701,7 @@ _2: v6 = *(*uint64)(unsafe.Pointer(bp + 8)) goto _7 _7: - if int32(v6>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v6>>Int32FromInt32(63)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16)) |= uint32(0x80000000) } } else { @@ -110712,7 +110710,7 @@ _2: v8 = *(*uint32)(unsafe.Pointer(bp)) goto _9 _9: - if int32(v8>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v8>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ @@ -110722,7 +110720,7 @@ _2: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- @@ -110797,8 +110795,8 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF2) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(iy >> int32(52) & uint64(0x7ff)) if e < int32(0x3ff) { return 0 } @@ -111036,7 +111034,7 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) topx = _top124(tls, x1) topy = _top124(tls, y1) - if topx-uint32(0x001) >= uint32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topx-uint32(0x001) >= Uint32FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1. */ /* Special cases: (x < 0x1p-126 or inf or nan) or @@ -111092,12 +111090,12 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { return X__math_invalid(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) + sign_bias = Uint32FromInt32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) } ix &= uint64(0x7fffffffffffffff) topx &= uint32(0x7ff) } - if topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: sign_bias == 0 here because y is not odd. */ v10 = float64(1) if ix == *(*Tuint64_t)(unsafe.Pointer(&v10)) { @@ -111182,10 +111180,10 @@ func _log2_inline(tls *TLS, ix Tuint32_t) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF3) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ + k = Int32FromUint32(top) >> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -111231,7 +111229,7 @@ _2: kd -= X__exp2f_data.Fshift_scaled /* k/N */ r = xd - kd /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */ - t = *(*Tuint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + uintptr(ki%uint64(Int32FromInt32(1)<> int32(23) & uint32(0xff)) + e = Int32FromUint32(iy >> int32(23) & uint32(0xff)) if e < int32(0x7f) { return 0 } if e > Int32FromInt32(0x7f)+Int32FromInt32(23) { return int32(2) } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { return 0 } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { return int32(1) } return int32(2) @@ -111289,7 +111287,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { sign_bias = uint32(0) ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) iy = *(*Tuint32_t)(unsafe.Pointer(&y1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ if _zeroinfnan1(tls, iy) != 0 { if uint32(2)*iy == uint32(0) { @@ -111301,10 +111299,10 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { return x1 + y1 } - if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { + if uint32(2)*ix == Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) } - if BoolInt32(uint32(2)*ix < uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { + if BoolInt32(uint32(2)*ix < Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { return Float32FromFloat32(0) } /* |x|<1 && y==inf or |x|>1 && y==-inf. */ return y1 * y1 @@ -111335,7 +111333,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { return X__math_invalidf(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) + sign_bias = Uint32FromInt32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) } ix &= uint32(0x7fffffff) } @@ -111344,7 +111342,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } } logx = _log2_inline(tls, ix) @@ -111468,10 +111466,10 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) - sy = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sy = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint64_t)(unsafe.Pointer(bp + 16))<> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -111572,9 +111570,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi x = *(*float64)(unsafe.Pointer(bp + 8)) @@ -111587,9 +111585,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v10 = -int32(q) + v10 = -Int32FromUint32(q) } else { - v10 = int32(q) + v10 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v10 if sx != 0 { @@ -111641,10 +111639,10 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) - sx = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) - sy = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + sx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) + sy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111689,7 +111687,7 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111743,9 +111741,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi x = *(*float32)(unsafe.Pointer(bp + 4)) @@ -111758,9 +111756,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -111806,8 +111804,8 @@ func Xrint(tls *TLS, x float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - s = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + s = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x } @@ -111855,8 +111853,8 @@ func Xrintf(tls *TLS, x float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) - s = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + s = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x } @@ -111914,7 +111912,7 @@ func Xround(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x3 } @@ -111979,7 +111977,7 @@ func Xroundf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x3 } @@ -112203,7 +112201,7 @@ func Xscalbn(tls *TLS, x float64, n int32) (r float64) { } } } - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(Int32FromInt32(0x3ff)+n) << int32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) = Uint64FromInt32(Int32FromInt32(0x3ff)+n) << int32(52) x = y * *(*float64)(unsafe.Pointer(bp)) return x } @@ -112245,7 +112243,7 @@ func Xscalbnf(tls *TLS, x float32, n int32) (r float32) { } } } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32(Int32FromInt32(0x7f)+n) << int32(23) + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32(Int32FromInt32(0x7f)+n) << int32(23) x = y * *(*float32)(unsafe.Pointer(bp)) return x } @@ -112327,7 +112325,7 @@ func Xsin(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) @@ -112400,7 +112398,7 @@ func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) s = X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) c = X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) switch n & Uint32FromInt32(3) { @@ -112547,7 +112545,7 @@ func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) s = X__sindf(tls, *(*float64)(unsafe.Pointer(bp))) c = X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) switch n & Uint32FromInt32(3) { @@ -112609,7 +112607,7 @@ func Xsinf(tls *TLS, x3 float32) (r float32) { var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ @@ -112726,14 +112724,14 @@ func Xsinh(tls *TLS, x float64) (r float64) { h = -h } /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) absx = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(DBL_MAX) */ if w < uint32(0x40862e42) { t = Xexpm1(tls, absx) if w < uint32(0x3ff00000) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<> int32(52) - if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { + if top-uint64(0x001) >= Uint64FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return x1 @@ -112867,7 +112865,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { x = 4^e m; with integer e, and m in [1, 4) m: fixed point representation [2.62] 2^e is the exponent part of the result. */ - even = int32(top & uint64(1)) + even = Int32FromUint64(top & uint64(1)) m = ix<>= uint64(1) @@ -112911,7 +112909,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { /* handle rounding modes and inexact exception: only (s+1)^2 == 2^42 m case is exact otherwise add a tiny value to cause the fenv effects. */ - tiny = uint64(v2) + tiny = Uint64FromInt64(v2) tiny |= (d1 ^ d2) & uint64(0x8000000000000000) t = *(*float64)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112996,7 +112994,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { var v3 int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, t, tiny, u, y, y1, v1, v2, v3, v4 ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return x1 @@ -113010,7 +113008,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 4^e m; with int e and m in [1, 4). */ even = ix & uint32(0x00800000) @@ -113024,7 +113022,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { m = v2 /* 2^e is the exponent part of the return value. */ ey = ix >> int32(1) - ey += uint32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) + ey += Uint32FromInt32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) ey &= uint32(0x7f800000) i = ix >> Int32FromInt32(17) % uint32(128) r = uint32(X__rsqrt_tab[i]) << int32(16) @@ -113056,7 +113054,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { v3 = int32(0x01000000) } /* handle rounding and inexact exception. */ - tiny = uint32(v3) + tiny = Uint32FromInt32(v3) tiny |= (d1 ^ d2) & uint32(0x80000000) t = *(*float32)(unsafe.Pointer(&tiny)) y = y1 + t @@ -113131,8 +113129,8 @@ func Xtan(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) - return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) + return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], Int32FromUint32(n&uint32(1))) } const M_PI_29 = 1.5707963267948966 @@ -113232,8 +113230,8 @@ func Xtanf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x3, bp)) - return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) + return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), Int32FromUint32(n&uint32(1))) } const M_PI_210 = 0 @@ -113270,8 +113268,8 @@ func Xtanh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { @@ -113343,7 +113341,7 @@ func Xtanhf(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) @@ -113568,13 +113566,13 @@ func Xtgamma(tls *TLS, x3 float64) (r1 float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ return x3 + float64(X__builtin_inff(tls)) } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { return x3 } @@ -113727,7 +113725,7 @@ func Xtruncf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { return x3 } @@ -113776,18 +113774,18 @@ func Xa64l(tls *TLS, s uintptr) (r int64) { if !(e < int32(36) && *(*uint8)(unsafe.Pointer(s)) != 0) { break } - d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), int32(*(*uint8)(unsafe.Pointer(s)))) + d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) if !(d != 0) { break } - x |= uint32(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e + x |= Uint32FromInt64(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e goto _1 _1: ; e += int32(6) s++ } - return int64(int32(x)) + return int64(Int32FromUint32(x)) } func Xl64a(tls *TLS, x0 int64) (r uintptr) { @@ -113798,7 +113796,7 @@ func Xl64a(tls *TLS, x0 int64) (r uintptr) { var p uintptr var x Tuint32_t _, _ = p, x - x = uint32(x0) + x = Uint32FromInt64(x0) p = uintptr(unsafe.Pointer(&_s)) for { if !(x != 0) { @@ -113829,7 +113827,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint64(1) for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) @@ -113839,7 +113837,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('/')) { break } goto _2 @@ -113870,7 +113868,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint64(1) for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -113882,7 +113880,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { break } if !(i != 0) { @@ -113894,7 +113892,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -113918,7 +113916,7 @@ func Xffs(tls *TLS, i int32) (r int32) { var v2 uint64 _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint64(i) + v2 = Uint64FromInt32(i) v3 = _a_ctz_64(tls, v2) goto _4 _4: @@ -113938,7 +113936,7 @@ func Xffsl(tls *TLS, i int64) (r int32) { var v2 uint64 _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint64(i) + v2 = Uint64FromInt64(i) v3 = _a_ctz_64(tls, v2) goto _4 _4: @@ -113957,7 +113955,7 @@ func Xffsll(tls *TLS, i int64) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_64(tls, uint64(i)) + int32(1) + v1 = _a_ctz_64(tls, Uint64FromInt64(i)) + int32(1) } else { v1 = 0 } @@ -113996,10 +113994,10 @@ func __strcolcmp(tls *TLS, lstr uintptr, bstr uintptr) (r int32) { var i Tsize_t _ = i i = uint64(0) - for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { + for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { i++ } - if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { + if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { return int32(1) } return 0 @@ -114284,7 +114282,7 @@ func Xgetentropy(tls *TLS, buffer uintptr, len1 Tsize_t) (r int32) { } } pos += uintptr(ret) - len1 -= uint64(ret) + len1 -= Uint64FromInt32(ret) ret = 0 } _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) @@ -114352,8 +114350,8 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if Xoptind >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) != int32('-') { - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { v1 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v1)*8)) @@ -114364,7 +114362,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { Xoptind++ return -Int32FromInt32(1) } @@ -114383,7 +114381,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { Xoptind++ X__optpos = 0 } - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { optstring++ } i = 0 @@ -114398,14 +114396,14 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { } if *(*Twchar_t)(unsafe.Pointer(bp + 4)) != *(*Twchar_t)(unsafe.Pointer(bp)) || *(*Twchar_t)(unsafe.Pointer(bp)) == int32(':') { Xoptopt = *(*Twchar_t)(unsafe.Pointer(bp)) - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+738, optchar, uint64(k)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+738, optchar, Uint64FromInt32(k)) } return int32('?') } - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { Xoptarg = uintptr(0) - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { v3 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v3)*8)) @@ -114416,11 +114414,11 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { } if Xoptind > argc { Xoptopt = *(*Twchar_t)(unsafe.Pointer(bp)) - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { return int32(':') } if Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+762, optchar, uint64(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+762, optchar, Uint64FromInt32(k)) } return int32('?') } @@ -114479,13 +114477,13 @@ func ___getopt_long(tls *TLS, argc int32, argv uintptr, optstring uintptr, longo return -int32(1) } skipped = Xoptind - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { i = Xoptind for { if i >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + 1)) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + 1)) != 0 { break } goto _1 @@ -114520,8 +114518,8 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, var cnt, colon, i, j, l, match, v2 int32 _, _, _, _, _, _, _, _, _, _, _, _, _ = arg, cnt, colon, i, j, l, match, name, opt, start, v2, v5, v6 Xoptarg = uintptr(0) - if longopts != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { - colon = BoolInt32(int32(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) + if longopts != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { + colon = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) start = *(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + uintptr(1) v2 = Int32FromInt32(0) i = v2 @@ -114532,14 +114530,14 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } name = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fname opt = start - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { opt++ } - for *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && int32(*(*uint8)(unsafe.Pointer(opt))) == int32(*(*uint8)(unsafe.Pointer(name))) { + for *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) { name++ opt++ } - if *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { + if *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { goto _1 } arg = opt @@ -114563,7 +114561,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } j = 0 for { - if !(j < l && int32(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { + if !(j < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { break } goto _4 @@ -114585,7 +114583,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, i = match opt = arg Xoptind++ - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { if !((*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fhas_arg != 0) { Xoptopt = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fval if colon != 0 || !(Xopterr != 0) { @@ -114622,7 +114620,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } return (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fval } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') { Xoptopt = 0 if !(colon != 0) && Xopterr != 0 { if cnt != 0 { @@ -114662,7 +114660,7 @@ func Xgetpriority(tls *TLS, which int32, who Tid_t) (r int32) { } var ret int32 _ = ret - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getpriority), int64(which), int64(who))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getpriority), int64(which), Int64FromUint32(who))))) if ret < 0 { return ret } @@ -114674,7 +114672,7 @@ func Xgetresgid(tls *TLS, rgid uintptr, egid uintptr, sgid uintptr) (r int32) { trc("tls=%v rgid=%v egid=%v sgid=%v, (%v:)", tls, rgid, egid, sgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) } func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { @@ -114682,7 +114680,7 @@ func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { trc("tls=%v ruid=%v euid=%v suid=%v, (%v:)", tls, ruid, euid, suid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) } func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { @@ -114696,7 +114694,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { var v1, v2 uint64 var _ /* k_rlim at bp+0 */ [2]uint64 _, _, _ = ret, v1, v2 - ret = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) if !(ret != 0) { if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur = ^Uint64FromUint64(0) @@ -114708,7 +114706,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { if !(ret != 0) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) { return ret } - if X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_ugetrlimit), int64(resource), int64(bp)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_ugetrlimit), int64(resource), int64(bp)))) < 0 { return -int32(1) } if (*(*[2]uint64)(unsafe.Pointer(bp)))[0] == -Uint64FromUint64(1) { @@ -114756,7 +114754,7 @@ func Xgetrusage(tls *TLS, who int32, ru uintptr) (r1 int32) { Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { @@ -114788,7 +114786,7 @@ func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { if Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(keys + uintptr(i)*8)), s, l) != 0 { goto _3 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { *(*uintptr)(unsafe.Pointer(val)) = s + uintptr(l) + uintptr(1) } else { if *(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0 { @@ -114852,8 +114850,8 @@ var _compat_map = [20]Tioctl_compat_map{ }, }, 2: { - Fnew_req: int32(uint64(Uint32FromUint32(2)< %v", r) }() } - return int32(X__libc.Fsecure) + return Int32FromUint8(X__libc.Fsecure) } func Xlockf(tls *TLS, fd int32, op int32, size Toff_t) (r int32) { @@ -115308,7 +115306,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { src = beg for *(*uint8)(unsafe.Pointer(src)) != 0 { cval = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { v1 = dest dest++ v2 = src @@ -115316,7 +115314,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { *(*uint8)(unsafe.Pointer(v1)) = *(*uint8)(unsafe.Pointer(v2)) continue } - if int32(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { src++ v3 = dest dest++ @@ -115331,11 +115329,11 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { if !(i < int32(3)) { break } - if int32(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && int32(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { cval = uint8(int32(cval) << Int32FromInt32(3)) v6 = val val++ - cval = uint8(int32(cval) + (int32(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) + cval = uint8(int32(cval) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) } else { break } @@ -115375,7 +115373,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 use_internal = BoolInt32(linebuf == uintptr(unsafe.Pointer(&_internal_buf))) (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_freq = 0 (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_passno = 0 - for cond := true; cond; cond = int32(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || uint64((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { + for cond := true; cond; cond = Int32FromUint8(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || Uint64FromInt32((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { if use_internal != 0 { Xgetline(tls, uintptr(unsafe.Pointer(&_internal_buf)), uintptr(unsafe.Pointer(&_internal_bufsize)), f) linebuf = _internal_buf @@ -115399,7 +115397,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 if !(i < Uint64FromInt64(32)/Uint64FromInt64(4)) { break } - (*(*[8]int32)(unsafe.Pointer(bp)))[i] = int32(len1) + (*(*[8]int32)(unsafe.Pointer(bp)))[i] = Int32FromUint64(len1) goto _1 _1: ; @@ -115471,7 +115469,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h var _ /* st at bp+0 */ Tstat _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, de, dfd, err, j, k, l, r, type1, v1, v10, v11, v12, v13, v2, v3, v4, v7, v8 l = Xstrlen(tls, path) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint64(1))))) == int32('/') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint64(1))))) == int32('/') { v1 = l - uint64(1) } else { v1 = l @@ -115526,14 +115524,14 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h v4 = 0 } (*(*Thistory)(unsafe.Pointer(bp + 144))).Flevel = v4 - (*(*Thistory)(unsafe.Pointer(bp + 144))).Fbase = int32(j + uint64(1)) + (*(*Thistory)(unsafe.Pointer(bp + 144))).Fbase = Int32FromUint64(j + uint64(1)) (*(*TFTW)(unsafe.Pointer(bp + 176))).Flevel = (*(*Thistory)(unsafe.Pointer(bp + 144))).Flevel if h != 0 { (*(*TFTW)(unsafe.Pointer(bp + 176))).Fbase = (*Thistory)(unsafe.Pointer(h)).Fbase } else { k = j for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { break } goto _5 @@ -115542,7 +115540,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h k-- } for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint64(1))))) != int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint64(1))))) != int32('/')) { break } goto _6 @@ -115550,7 +115548,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h ; k-- } - (*(*TFTW)(unsafe.Pointer(bp + 176))).Fbase = int32(k) + (*(*TFTW)(unsafe.Pointer(bp + 176))).Fbase = Int32FromUint64(k) } if type1 == int32(FTW_D) || type1 == int32(FTW_DP) { dfd = Xopen(tls, path, O_RDONLY, 0) @@ -115594,7 +115592,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h if !(v10 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { continue } if Xstrlen(tls, de+19) >= uint64(PATH_MAX)-l { @@ -115675,7 +115673,7 @@ func Xopenpty(tls *TLS, pm uintptr, ps uintptr, name uintptr, tio uintptr, ws ui return -int32(1) } _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), bp+4) - if Xioctl(tls, m, int32(uint64(Uint32FromUint32(4)<= len1 { + if Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+951, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { return int32(ERANGE) } return 0 @@ -115792,10 +115790,10 @@ func _slash_len(tls *TLS, s uintptr) (r Tsize_t) { var s0 uintptr _ = s0 s0 = s - for int32(*(*uint8)(unsafe.Pointer(s))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('/') { s++ } - return uint64(int64(s) - int64(s0)) + return Uint64FromInt64(int64(s) - int64(s0)) } func Xrealpath(tls *TLS, filename uintptr, resolved uintptr) (r uintptr) { @@ -115841,7 +115839,7 @@ _3: ; /* If stack starts with /, the whole component is / or // * and the output state must be reset. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { check_dir = 0 nup = uint64(0) q = uint64(0) @@ -115850,7 +115848,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v4] = uint8('/') p++ /* Initial // is special. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint64(1)]) != int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint64(1)]) != int32('/') { v5 = q q++ (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v5] = uint8('/') @@ -115858,21 +115856,21 @@ _3: goto _2 } z = X__strchrnul(tls, bp+uintptr(p), int32('/')) - v6 = uint64(int64(z) - int64(bp+uintptr(p))) + v6 = Uint64FromInt64(int64(z) - int64(bp+uintptr(p))) l = v6 l0 = v6 if !(l != 0) && !(check_dir != 0) { goto _1 } /* Skip any . component but preserve check_dir status. */ - if l == uint64(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { + if l == uint64(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { p += l goto _2 } /* Copy next component onto output at least temporarily, to * call readlink, but wait to advance output position until * determining it's not a link. */ - if q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { + if q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { if !(p != 0) { goto toolong } @@ -115888,7 +115886,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q+l] = uint8(0) p += l up = 0 - if l0 == uint64(2) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(2)]) == int32('.') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(1)]) == int32('.') { + if l0 == uint64(2) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(2)]) == int32('.') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(1)]) == int32('.') { up = int32(1) /* Any non-.. path components we could cancel start * after nup repetitions of the 3-byte string "../"; @@ -115906,7 +115904,7 @@ _3: } } k = Xreadlink(tls, bp+4097, bp, p) - if uint64(k) == p { + if Uint64FromInt64(k) == p { goto toolong } if !(k != 0) { @@ -115924,10 +115922,10 @@ skip_readlink: ; check_dir = 0 if up != 0 { - for q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { + for q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { q-- } - if q > uint64(1) && (q > uint64(2) || int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { + if q > uint64(1) && (q > uint64(2) || Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { q-- } goto _2 @@ -115935,7 +115933,7 @@ skip_readlink: if l0 != 0 { q += l } - check_dir = int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) + check_dir = Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) goto _2 _8: ; @@ -115947,13 +115945,13 @@ _8: } /* If link contents end in /, strip any slashes already on * stack to avoid /->// or //->/// or spurious toolong. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int64(1)]) == int32('/') { - for int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int64(1)]) == int32('/') { + for Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { p++ } } - p -= uint64(k) - Xmemmove(tls, bp+uintptr(p), bp, uint64(k)) + p -= Uint64FromInt64(k) + Xmemmove(tls, bp+uintptr(p), bp, Uint64FromInt64(k)) /* Skip the stack advancement in case we have a new * absolute base path. */ goto restart @@ -115966,7 +115964,7 @@ _2: _1: ; (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q] = uint8(0) - if int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { + if Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { if !(Xgetcwd(tls, bp, uint64(4097)) != 0) { return uintptr(0) } @@ -115979,7 +115977,7 @@ _1: if !(v10 != 0) { break } - for l > uint64(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { + for l > uint64(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { l-- } if l > uint64(1) { @@ -115990,7 +115988,7 @@ _1: p++ } } - if q-p != 0 && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { + if q-p != 0 && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { v11 = l l++ (*(*[4097]uint8)(unsafe.Pointer(bp)))[v11] = uint8('/') @@ -116019,7 +116017,7 @@ func Xsetdomainname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), Int64FromUint64(len1))))) } func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { @@ -116027,7 +116025,7 @@ func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { trc("tls=%v which=%v who=%v prio=%v, (%v:)", tls, which, who, prio, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setpriority), int64(which), int64(who), int64(prio))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setpriority), int64(which), Int64FromUint32(who), int64(prio))))) } type Tctx = struct { @@ -116070,7 +116068,7 @@ func Xsetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { } ret = int32(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(rlim), int64(Int32FromInt32(0)))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur < ^Uint64FromUint64(0) { v1 = (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur @@ -116116,7 +116114,7 @@ func Xsyscall(tls *TLS, n int64, va uintptr) (r int64) { e = VaInt64(&ap) f = VaInt64(&ap) _ = ap - return X__syscall_ret(tls, uint64(X__syscall6(tls, n, a, b, c, d, e, f))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, n, a, b, c, d, e, f))) } const AF_ALG = 38 @@ -116544,19 +116542,19 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { pid = v1 l = Xsnprintf(tls, bp+80, uint64(1024), __ccgo_ts+972, VaList(bp+1120, priority, bp, bp+1104, uintptr(unsafe.Pointer(&_log_ident)), __ccgo_ts+994+BoolUintptr(!(pid != 0)), pid, __ccgo_ts+996+BoolUintptr(!(pid != 0)))) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = errno_save - l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-uint64(l), message, ap) + l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-Uint64FromInt32(l), message, ap) if l2 >= 0 { - if uint64(l2) >= uint64(1024)-uint64(l) { - l = int32(Uint64FromInt64(1024) - Uint64FromInt32(1)) + if Uint64FromInt32(l2) >= uint64(1024)-Uint64FromInt32(l) { + l = Int32FromUint64(Uint64FromInt64(1024) - Uint64FromInt32(1)) } else { l += l2 } - if int32((*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[l-int32(1)]) != int32('\n') { + if Int32FromUint8((*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[l-int32(1)]) != int32('\n') { v2 = l l++ (*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[v2] = uint8('\n') } - if Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { + if Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { fd = Xopen(tls, __ccgo_ts+691, Int32FromInt32(O_WRONLY)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC), 0) if fd >= 0 { Xdprintf(tls, fd, __ccgo_ts+998, VaList(bp+1120, l-*(*int32)(unsafe.Pointer(bp + 1104)), bp+80+uintptr(*(*int32)(unsafe.Pointer(bp + 1104))))) @@ -116608,7 +116606,7 @@ func Xuname(tls *TLS, uts uintptr) (r int32) { trc("tls=%v uts=%v, (%v:)", tls, uts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) } func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116616,7 +116614,7 @@ func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { trc("tls=%v addr=%v len1=%v advice=%v, (%v:)", tls, addr, len1, advice, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))))) } func Xmadvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116632,7 +116630,7 @@ func Xmincore(tls *TLS, addr uintptr, len1 Tsize_t, vec uintptr) (r int32) { trc("tls=%v addr=%v len1=%v vec=%v, (%v:)", tls, addr, len1, vec, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mincore), int64(addr), int64(len1), int64(vec))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mincore), int64(addr), Int64FromUint64(len1), int64(vec))))) } func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116640,7 +116638,7 @@ func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_mlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_mlock), int64(addr), Int64FromUint64(len1))))) } func Xmlockall(tls *TLS, flags int32) (r int32) { @@ -116648,7 +116646,7 @@ func Xmlockall(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) } const OFF_MASK = 4095 @@ -116664,23 +116662,23 @@ func X__mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd } var ret int64 _ = ret - if uint64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { + if Uint64FromInt64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } - if len1 >= uint64(Int64FromInt64(INT64_MAX)) { + if len1 >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } if flags&int32(MAP_FIXED) != 0 { _dummy5(tls) } - ret = X__syscall6(tls, int64(SYS_mmap), int64(start), int64(len1), int64(prot), int64(flags), int64(fd), off) + ret = X__syscall6(tls, int64(SYS_mmap), int64(start), Int64FromUint64(len1), int64(prot), int64(flags), int64(fd), off) /* Fixup incorrect EPERM from kernel. */ if ret == int64(-int32(EPERM)) && !(start != 0) && flags&int32(MAP_ANON) != 0 && !(flags&Int32FromInt32(MAP_FIXED) != 0) { ret = int64(-int32(ENOMEM)) } - return uintptr(X__syscall_ret(tls, uint64(ret))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(ret))) } func Xmmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { @@ -116700,7 +116698,7 @@ func X__mprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { _, _ = end, start start = uint64(addr) & -X__libc.Fpage_size end = uint64(addr+uintptr(len1)+uintptr(X__libc.Fpage_size)-UintptrFromInt32(1)) & -X__libc.Fpage_size - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mprotect), int64(start), int64(end-start), int64(prot))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mprotect), Int64FromUint64(start), Int64FromUint64(end-start), int64(prot))))) } func Xmprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { @@ -116723,7 +116721,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla var new_addr uintptr _, _ = ap, new_addr new_addr = uintptr(0) - if new_len >= uint64(Int64FromInt64(INT64_MAX)) { + if new_len >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } @@ -116733,7 +116731,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla new_addr = VaUintptr(&ap) _ = ap } - return uintptr(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), int64(old_len), int64(new_len), int64(flags), int64(new_addr))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), Int64FromUint64(old_len), Int64FromUint64(new_len), int64(flags), int64(new_addr))))) } func Xmremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, flags int32, va uintptr) (r uintptr) { @@ -116749,7 +116747,7 @@ func Xmsync(tls *TLS, start uintptr, len1 Tsize_t, flags int32) (r int32) { trc("tls=%v start=%v len1=%v flags=%v, (%v:)", tls, start, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msync), int64(start), int64(len1), int64(flags), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msync), int64(start), Int64FromUint64(len1), int64(flags), 0, 0, 0)))) } func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116757,7 +116755,7 @@ func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munlock), int64(addr), Int64FromUint64(len1))))) } func Xmunlockall(tls *TLS) (r int32) { @@ -116765,7 +116763,7 @@ func Xmunlockall(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_munlockall))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_munlockall))))) } func _dummy7(tls *TLS) { @@ -116777,7 +116775,7 @@ func X__munmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { defer func() { trc("-> %v", r) }() } _dummy7(tls) - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munmap), int64(start), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munmap), int64(start), Int64FromUint64(len1))))) } func Xmunmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { @@ -116796,7 +116794,7 @@ func Xposix_madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32 if advice == int32(MADV_DONTNEED) { return 0 } - return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))) + return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))) } func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { @@ -116806,12 +116804,12 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { } var p, v1 uintptr _, _ = p, v1 - for int32(*(*uint8)(unsafe.Pointer(name))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('/') { name++ } v1 = X__strchrnul(tls, name, int32('/')) p = v1 - if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int64(p)-int64(name) <= int64(2) && int32(*(*uint8)(unsafe.Pointer(name))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { + if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int64(p)-int64(name) <= int64(2) && Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -116820,7 +116818,7 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { return uintptr(0) } Xmemcpy(tls, buf, __ccgo_ts+1003, uint64(9)) - Xmemcpy(tls, buf+uintptr(9), name, uint64(int64(p)-int64(name)+int64(1))) + Xmemcpy(tls, buf+uintptr(9), name, Uint64FromInt64(int64(p)-int64(name)+int64(1))) return buf } @@ -116885,9 +116883,9 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { var b, v3 int32 var v1, v2 uint32 _, _, _, _ = b, v1, v2, v3 - b = int32(uint8(c)) - if uint32(b) < uint32(128) { - v1 = uint32(b) + b = Int32FromUint8(Uint8FromInt32(c)) + if Uint32FromInt32(b) < uint32(128) { + v1 = Uint32FromInt32(b) } else { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v3 = int32(4) @@ -116895,7 +116893,7 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { v3 = int32(1) } if v3 == int32(1) && c != -int32(1) { - v2 = uint32(Int32FromInt32(0xdfff) & int32(int8(c))) + v2 = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(int8(c))) } else { v2 = uint32(0xffffffff) } @@ -116927,18 +116925,18 @@ func Xc16rtomb(tls *TLS, s uintptr, c16 Tchar16_t, ps uintptr) (r Tsize_t) { return uint64(1) } if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(c16)-uint32(0xd800) < uint32(0x400) { - *(*uint32)(unsafe.Pointer(x)) = uint32((int32(c16) - int32(0xd7c0)) << int32(10)) + *(*uint32)(unsafe.Pointer(x)) = Uint32FromInt32((Int32FromUint16(c16) - int32(0xd7c0)) << int32(10)) return uint64(0) } if *(*uint32)(unsafe.Pointer(x)) != 0 { if uint32(c16)-uint32(0xdc00) >= uint32(0x400) { goto ilseq } else { - wc = int32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) + wc = Int32FromUint32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) } *(*uint32)(unsafe.Pointer(x)) = uint32(0) } else { - wc = int32(c16) + wc = Int32FromUint16(c16) } return Xwcrtomb(tls, s, wc, uintptr(0)) goto ilseq @@ -116946,7 +116944,7 @@ ilseq: ; *(*uint32)(unsafe.Pointer(x)) = uint32(0) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } var _internal_state uint32 @@ -116956,7 +116954,7 @@ func Xc32rtomb(tls *TLS, s uintptr, c32 Tchar32_t, ps uintptr) (r Tsize_t) { trc("tls=%v s=%v c32=%v ps=%v, (%v:)", tls, s, c32, ps, origin(2)) defer func() { trc("-> %v", r) }() } - return Xwcrtomb(tls, s, int32(c32), ps) + return Xwcrtomb(tls, s, Int32FromUint32(c32), ps) } func Xmblen(tls *TLS, s uintptr, n Tsize_t) (r int32) { @@ -117004,21 +117002,21 @@ func Xmbrtoc16(tls *TLS, pc16 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } /* mbrtowc states for partial UTF-8 characters have the high bit set; * we use nonzero states without high bit for pending surrogates. */ - if int32(*(*uint32)(unsafe.Pointer(pending))) > 0 { + if Int32FromUint32(*(*uint32)(unsafe.Pointer(pending))) > 0 { if pc16 != 0 { *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*uint32)(unsafe.Pointer(pending))) } *(*uint32)(unsafe.Pointer(pending)) = uint32(0) - return uint64(-Int32FromInt32(3)) + return Uint64FromInt32(-Int32FromInt32(3)) } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) { if *(*Twchar_t)(unsafe.Pointer(bp)) >= int32(0x10000) { - *(*uint32)(unsafe.Pointer(pending)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) + *(*uint32)(unsafe.Pointer(pending)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) *(*Twchar_t)(unsafe.Pointer(bp)) = int32(0xd7c0) + *(*Twchar_t)(unsafe.Pointer(bp))>>Int32FromInt32(10) } if pc16 != 0 { - *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar16_t)(unsafe.Pointer(pc16)) = Uint16FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } return ret @@ -117044,7 +117042,7 @@ func Xmbrtoc32(tls *TLS, pc32 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) && pc32 != 0 { - *(*Tchar32_t)(unsafe.Pointer(pc32)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar32_t)(unsafe.Pointer(pc32)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } return ret } @@ -117082,11 +117080,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize } } if !(n != 0) { - return uint64(-Int32FromInt32(2)) + return Uint64FromInt32(-Int32FromInt32(2)) } if !(c != 0) { - if int32(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolUint64(!!(v1 != 0)) } @@ -117096,7 +117094,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize v2 = int32(1) } if v2 == int32(1) { - *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(int8(*(*uint8)(unsafe.Pointer(s)))) + *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(Int8FromUint8(*(*uint8)(unsafe.Pointer(s)))) return Uint64FromInt32(1) } if uint32(*(*uint8)(unsafe.Pointer(s)))-uint32(0xc2) > Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117108,7 +117106,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize n-- } if n != 0 { - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } goto loop @@ -117116,11 +117114,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize ; v4 = s s++ - c = c<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _9 } @@ -117360,22 +117358,22 @@ _15: ws += 4 v17 = s s++ - *(*Twchar_t)(unsafe.Pointer(v16)) = int32(*(*uint8)(unsafe.Pointer(v17))) + *(*Twchar_t)(unsafe.Pointer(v16)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) v18 = ws ws += 4 v19 = s s++ - *(*Twchar_t)(unsafe.Pointer(v18)) = int32(*(*uint8)(unsafe.Pointer(v19))) + *(*Twchar_t)(unsafe.Pointer(v18)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) v20 = ws ws += 4 v21 = s s++ - *(*Twchar_t)(unsafe.Pointer(v20)) = int32(*(*uint8)(unsafe.Pointer(v21))) + *(*Twchar_t)(unsafe.Pointer(v20)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v21))) v22 = ws ws += 4 v23 = s s++ - *(*Twchar_t)(unsafe.Pointer(v22)) = int32(*(*uint8)(unsafe.Pointer(v23))) + *(*Twchar_t)(unsafe.Pointer(v22)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) wn -= uint64(4) } } @@ -117384,7 +117382,7 @@ _15: ws += 4 v25 = s s++ - *(*Twchar_t)(unsafe.Pointer(v24)) = int32(*(*uint8)(unsafe.Pointer(v25))) + *(*Twchar_t)(unsafe.Pointer(v24)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v25))) wn-- goto _14 } @@ -117397,13 +117395,13 @@ _15: goto resume resume: ; - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _13 } v27 = s s++ - c = c<= uint32(0x40) { s -= uintptr(2) @@ -117411,7 +117409,7 @@ resume: } v28 = s s++ - c = c<= uint32(0x40) { s -= uintptr(3) @@ -117419,12 +117417,12 @@ resume: } v29 = s s++ - c = c< Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117510,14 +117508,14 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { if n < uint64(4) && c<<(uint64(6)*n-uint64(6))&(Uint32FromUint32(1)<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } v4 = s s++ - c = c<= uint32(0x40) { @@ -117525,9 +117523,9 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v5 = s s++ - c = c<= uint32(0x40) { @@ -117535,7 +117533,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v6 = s s++ - *(*Twchar_t)(unsafe.Pointer(wc)) = int32(c<>Int32FromInt32(6)) - *(*uint8)(unsafe.Pointer(s)) = uint8(int32(0x80) | wc&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(int32(0xc0) | wc>>Int32FromInt32(6)) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(int32(0x80) | wc&int32(0x3f)) return uint64(2) } else { - if uint32(wc) < uint32(0xd800) || uint32(wc)-uint32(0xe000) < uint32(0x2000) { + if Uint32FromInt32(wc) < uint32(0xd800) || Uint32FromInt32(wc)-uint32(0xe000) < uint32(0x2000) { v3 = s s++ - *(*uint8)(unsafe.Pointer(v3)) = uint8(int32(0xe0) | wc>>Int32FromInt32(12)) + *(*uint8)(unsafe.Pointer(v3)) = Uint8FromInt32(int32(0xe0) | wc>>Int32FromInt32(12)) v4 = s s++ - *(*uint8)(unsafe.Pointer(v4)) = uint8(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) - *(*uint8)(unsafe.Pointer(s)) = uint8(int32(0x80) | wc&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v4)) = Uint8FromInt32(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(int32(0x80) | wc&int32(0x3f)) return uint64(3) } else { - if uint32(wc)-uint32(0x10000) < uint32(0x100000) { + if Uint32FromInt32(wc)-uint32(0x10000) < uint32(0x100000) { v5 = s s++ - *(*uint8)(unsafe.Pointer(v5)) = uint8(int32(0xf0) | wc>>Int32FromInt32(18)) + *(*uint8)(unsafe.Pointer(v5)) = Uint8FromInt32(int32(0xf0) | wc>>Int32FromInt32(18)) v6 = s s++ - *(*uint8)(unsafe.Pointer(v6)) = uint8(int32(0x80) | wc>>Int32FromInt32(12)&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v6)) = Uint8FromInt32(int32(0x80) | wc>>Int32FromInt32(12)&int32(0x3f)) v7 = s s++ - *(*uint8)(unsafe.Pointer(v7)) = uint8(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) - *(*uint8)(unsafe.Pointer(s)) = uint8(int32(0x80) | wc&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v7)) = Uint8FromInt32(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(int32(0x80) | wc&int32(0x3f)) return uint64(4) } } @@ -117607,7 +117605,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { } } *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st uintptr) (r Tsize_t) { @@ -117633,8 +117631,8 @@ func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st u v1 = dst } l = Xwcrtomb(tls, v1, *(*Twchar_t)(unsafe.Pointer(ws)), uintptr(0)) - if l == uint64(-Int32FromInt32(1)) { - cnt = uint64(-Int32FromInt32(1)) + if l == Uint64FromInt32(-Int32FromInt32(1)) { + cnt = Uint64FromInt32(-Int32FromInt32(1)) break } if dst != 0 { @@ -117680,10 +117678,10 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize if !(*(*Twchar_t)(unsafe.Pointer(ws2)) != 0) { break } - if uint32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(ws2)), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } n += l } else { @@ -117697,7 +117695,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize return n } for n >= uint64(4) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*uint8)(unsafe.Pointer(s)) = uint8(0) *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117705,20 +117703,20 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, s, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } s += uintptr(l) n -= l } else { v2 = s s++ - *(*uint8)(unsafe.Pointer(v2)) = uint8(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) n-- } *(*uintptr)(unsafe.Pointer(ws)) += 4 } for n != 0 { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*uint8)(unsafe.Pointer(s)) = uint8(0) *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117726,7 +117724,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if l > n { return N - n @@ -117737,7 +117735,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } else { v3 = s s++ - *(*uint8)(unsafe.Pointer(v3)) = uint8(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) + *(*uint8)(unsafe.Pointer(v3)) = Uint8FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) n-- } *(*uintptr)(unsafe.Pointer(ws)) += 4 @@ -117764,7 +117762,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { var v1 int32 _ = v1 if c < uint32(128) { - return int32(c) + return Int32FromUint32(c) } if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) @@ -117772,7 +117770,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { v1 = int32(1) } if v1 == int32(1) && c-uint32(0xdf80) < uint32(0x80) { - return int32(uint8(c)) + return Int32FromUint8(uint8(c)) } return -int32(1) } @@ -117785,7 +117783,7 @@ func Xwctomb(tls *TLS, s uintptr, wc Twchar_t) (r int32) { if !(s != 0) { return 0 } - return int32(Xwcrtomb(tls, s, wc, uintptr(0))) + return Int32FromUint64(Xwcrtomb(tls, s, wc, uintptr(0))) } func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { @@ -117841,7 +117839,7 @@ func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } type Tucred = struct { @@ -117911,7 +117909,7 @@ func Xaccept4(tls *TLS, fd int32, addr uintptr, len1 uintptr, flg int32) (r1 int v10 = r goto _11 _11: - ret = int32(X__syscall_ret(tls, uint64(v10))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(v10))) if ret >= 0 || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) && *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(EINVAL) { return ret } @@ -117948,7 +117946,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v3 = 0 v4 = int64(fd) v5 = int64(addr) - v6 = int64(len1) + v6 = Int64FromUint32(len1) v7 = int64(Int32FromInt32(0)) v8 = int64(Int32FromInt32(0)) v9 = int64(Int32FromInt32(0)) @@ -117985,7 +117983,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { @@ -118004,7 +118002,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v3 = int32(1) v4 = int64(fd) v5 = int64(addr) - v6 = int64(len1) + v6 = Int64FromUint32(len1) v7 = int64(Int32FromInt32(0)) v8 = int64(Int32FromInt32(0)) v9 = int64(Int32FromInt32(0)) @@ -118041,7 +118039,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } const ADD = 0 @@ -118951,11 +118949,11 @@ func _getoffs(tls *TLS, offs uintptr, base uintptr, s uintptr) (r int32) { _, _ = i, v2 i = 0 for { - for int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { - if int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { return 0 } - s = base + uintptr(int32(*(*uint8)(unsafe.Pointer(s)))&Int32FromInt32(0x3f)< uint32(62) { + if Uint32FromInt32(j-k)-uint32(1) > uint32(62) { return 0 } v3 = i i++ - *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = uint8(j - k) + *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = Uint8FromInt32(j - k) if j == l { return i } @@ -119027,12 +119025,12 @@ func _match(tls *TLS, offset uintptr, base uintptr, dn uintptr, end uintptr, len for { nlen-- v2 = nlen - l = int32(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) + l = Int32FromUint8(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) noff-- v3 = noff o = int32((*(*[128]int16)(unsafe.Pointer(bp)))[v3]) end -= uintptr(l) - if l != int32(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, uint64(l)) != 0 { + if l != Int32FromUint8(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, Uint64FromInt32(l)) != 0 { return m } *(*int32)(unsafe.Pointer(offset)) = o @@ -119066,7 +119064,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l m = 0 bestlen = 0 l = Xstrnlen(tls, src, uint64(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint64(1))))) == int32('.') { l-- } if l > uint64(253) || space <= 0 { @@ -119077,7 +119075,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l return int32(1) } end = src + uintptr(l) - n = _getlens(tls, bp+4, src, int32(l)) + n = _getlens(tls, bp+4, src, Int32FromUint64(l)) if !(n != 0) { return -int32(1) } @@ -119092,7 +119090,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l if m > bestlen { bestlen = m bestoff = *(*int32)(unsafe.Pointer(bp)) - if uint64(m) == l { + if Uint64FromInt32(m) == l { break } } @@ -119103,15 +119101,15 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l } } /* encode unmatched part */ - if uint64(space) < l-uint64(bestlen)+uint64(2)+BoolUint64(uint64(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { + if Uint64FromInt32(space) < l-Uint64FromInt32(bestlen)+uint64(2)+BoolUint64(Uint64FromInt32(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { return -int32(1) } - Xmemcpy(tls, dst+uintptr(1), src, l-uint64(bestlen)) + Xmemcpy(tls, dst+uintptr(1), src, l-Uint64FromInt32(bestlen)) v3 = Int32FromInt32(0) j = v3 i = v3 for { - if !(uint64(i) < l-uint64(bestlen)) { + if !(Uint64FromInt32(i) < l-Uint64FromInt32(bestlen)) { break } *(*uint8)(unsafe.Pointer(dst + uintptr(i))) = (*(*[127]uint8)(unsafe.Pointer(bp + 4)))[j] @@ -119120,16 +119118,16 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l ; v4 = j j++ - i += int32((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) + i += Int32FromUint8((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) } /* add tail */ if bestlen != 0 { v5 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = uint8(int32(0xc0) | bestoff>>int32(8)) + *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = Uint8FromInt32(int32(0xc0) | bestoff>>int32(8)) v6 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(bestoff) + *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = Uint8FromInt32(bestoff) } else { v7 = i i++ @@ -119177,11 +119175,11 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr break } /* loop invariants: p= int64(end)-int64(p) || int64(j) >= int64(dend)-int64(dest) { return -int32(1) } @@ -119250,17 +119248,17 @@ func Xdn_skipname(tls *TLS, s uintptr, end uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { return int32(int64(p) - int64(s) + int64(1)) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { if p+uintptr(1) < end { return int32(int64(p) - int64(s) + int64(2)) } else { break } } else { - if int64(end)-int64(p) < int64(int32(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { + if int64(end)-int64(p) < int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { break } else { - p += uintptr(int32(*(*uint8)(unsafe.Pointer(p))) + int32(1)) + p += uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + int32(1)) } } } @@ -119374,12 +119372,12 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if rlen < int32(12) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { return 0 } p = r + uintptr(12) - qdcount = int32(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 5))) - ancount = int32(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 7))) + qdcount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 5))) + ancount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 7))) for { v1 = qdcount qdcount-- @@ -119407,11 +119405,11 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr return -int32(1) } p += uintptr(int32(1) + BoolInt32(!!(*(*uint8)(unsafe.Pointer(p)) != 0))) - len1 = int32(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(p + 9))) + len1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 9))) if int64(len1+int32(10)) > int64(r+uintptr(rlen))-int64(p) { return -int32(1) } - if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, int32(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { + if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { return -int32(1) } p += uintptr(int32(10) + len1) @@ -119753,7 +119751,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { break } if ii != 0 { - if int32(*(*uint8)(unsafe.Pointer(x))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != int32(':') { return uintptr(0) } else { x++ @@ -119770,7 +119768,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { ; ii++ } - if int32(*(*uint8)(unsafe.Pointer(x))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != 0 { return uintptr(0) } /* bad format */ *(*Tether_addr)(unsafe.Pointer(p_a)) = *(*Tether_addr)(unsafe.Pointer(bp)) @@ -119808,7 +119806,7 @@ func Xether_ntoa_r(tls *TLS, p_a uintptr, x uintptr) (r uintptr) { } else { v2 = __ccgo_ts + 1018 } - x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, int32(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) + x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) goto _1 _1: ; @@ -120030,14 +120028,14 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt return -int32(5) } nais = nservs * naddrs - canon_len = int32(Xstrlen(tls, bp+1352)) - out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(88)+uint64(canon_len)+uint64(1)) + canon_len = Int32FromUint64(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), Uint64FromInt32(nais)*uint64(88)+Uint64FromInt32(canon_len)+uint64(1)) if !(out != 0) { return -int32(10) } if canon_len != 0 { outcanon = out + uintptr(nais)*88 - Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+int32(1))) + Xmemcpy(tls, outcanon, bp+1352, Uint64FromInt32(canon_len+int32(1))) } else { outcanon = uintptr(0) } @@ -120061,8 +120059,8 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*88))).Fai = Taddrinfo{ Fai_family: (*(*[48]Taddress)(unsafe.Pointer(bp + 8)))[i].Ffamily, - Fai_socktype: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), - Fai_protocol: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), + Fai_socktype: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), + Fai_protocol: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), Fai_addrlen: uint32(v5), Fai_addr: out + uintptr(k)*88 + 48, Fai_canonname: outcanon, @@ -120260,7 +120258,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu Fsin Tsockaddr_in F__ccgo_pad2 [12]byte }{} - *(*uint16)(unsafe.Pointer(bp)) = uint16(af) + *(*uint16)(unsafe.Pointer(bp)) = Uint16FromInt32(af) if af == int32(PF_INET6) { v1 = uint64(28) } else { @@ -120280,15 +120278,15 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu } } /* Align buffer and check for space for pointers and ip address */ - i = int32(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) + i = Int32FromUint64(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) if !(i != 0) { i = int32(8) } - if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-uint64(i)+uint64(l) { + if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-Uint64FromInt32(i)+uint64(l) { return int32(ERANGE) } - buf += uintptr(uint64(8) - uint64(i)) - buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - uint64(i) + uint64(l) + buf += uintptr(uint64(8) - Uint64FromInt32(i)) + buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - Uint64FromInt32(i) + uint64(l) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(Uint64FromInt32(2) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf @@ -120317,7 +120315,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu break } (*Thostent)(unsafe.Pointer(h)).Fh_addrtype = af - (*Thostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*Thostent)(unsafe.Pointer(h)).Fh_length = Int32FromUint32(l) (*Thostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 @@ -120404,7 +120402,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, /* Align buffer */ align = -uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1)) need = Uint64FromInt32(4) * Uint64FromInt64(8) - need += uint64(cnt+Int32FromInt32(1)) * (uint64(8) + uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + need += Uint64FromInt32(cnt+Int32FromInt32(1)) * (uint64(8) + Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) need += Xstrlen(tls, name) + uint64(1) need += Xstrlen(tls, bp+1344) + uint64(1) need += align @@ -120415,7 +120413,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(Uint64FromInt32(3) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf - buf += uintptr(uint64(cnt+Int32FromInt32(1)) * uint64(8)) + buf += uintptr(Uint64FromInt32(cnt+Int32FromInt32(1)) * uint64(8)) i = 0 for { if !(i < cnt) { @@ -120423,7 +120421,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf buf += uintptr((*Thostent)(unsafe.Pointer(h)).Fh_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) goto _2 _2: ; @@ -120672,17 +120670,17 @@ func _copy_addr(tls *TLS, r uintptr, af int32, sa uintptr, addr uintptr, addrlen case int32(PF_INET6): dst = sa + 8 len1 = int32(16) - if int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { - (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = uint32(ifindex) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { + (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = Uint32FromInt32(ifindex) } default: return } - if addrlen < uint64(len1) { + if addrlen < Uint64FromInt32(len1) { return } - (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(af) - Xmemcpy(tls, dst, addr, uint64(len1)) + (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = Uint16FromInt32(af) + Xmemcpy(tls, dst, addr, Uint64FromInt32(len1)) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -120693,15 +120691,15 @@ func _gen_netmask(tls *TLS, r uintptr, af int32, sa uintptr, prefixlen int32) { var _ /* addr at bp+0 */ [16]Tuint8_t _, _ = i, v1 *(*[16]Tuint8_t)(unsafe.Pointer(bp)) = [16]Tuint8_t{} - if uint64(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { - prefixlen = int32(Uint64FromInt32(8) * Uint64FromInt64(16)) + if Uint64FromInt32(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { + prefixlen = Int32FromUint64(Uint64FromInt32(8) * Uint64FromInt64(16)) } i = prefixlen / int32(8) - Xmemset(tls, bp, int32(0xff), uint64(i)) - if uint64(i) < uint64(16) { + Xmemset(tls, bp, int32(0xff), Uint64FromInt32(i)) + if Uint64FromInt32(i) < uint64(16) { v1 = i i++ - (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = uint8(int32(0xff) << (int32(8) - prefixlen%int32(8))) + (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = Uint8FromInt32(int32(0xff) << (int32(8) - prefixlen%int32(8))) } _copy_addr(tls, r, af, sa, bp, uint64(16), 0) } @@ -120727,21 +120725,21 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { ifi = h + UintptrFromInt64(16) ifa = h + UintptrFromInt64(16) stats_len = 0 - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { goto _1 } - stats_len = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) + stats_len = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) break goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } } else { ifs0 = *(*uintptr)(unsafe.Pointer(ctx + 16 + uintptr((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index%uint32(IFADDRS_HASH_SIZE))*8)) @@ -120761,19 +120759,19 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { return 0 } } - ifs = Xcalloc(tls, uint64(1), uint64(200)+uint64(stats_len)) + ifs = Xcalloc(tls, uint64(1), uint64(200)+Uint64FromInt32(stats_len)) if ifs == uintptr(0) { return -int32(1) } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = uint32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = Uint32FromInt32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFLA_IFNAME): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120791,7 +120789,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _3 _3: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { bucket = (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex % uint32(IFADDRS_HASH_SIZE) @@ -120801,22 +120799,22 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { } else { (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_name (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFA_ADDRESS): /* If ifa_addr is already set we, received an IFA_LOCAL before * so treat this as destination address */ if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } else { - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } case int32(IFA_BROADCAST): - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LOCAL): /* If ifa_addr is set and we get IFA_LOCAL, assume we have * a point-to-point network. Move address to correct field. */ @@ -120825,7 +120823,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { *(*uintptr)(unsafe.Pointer(ifs + 40)) = ifs + 136 Xmemset(tls, ifs+64, 0, uint64(36)) } - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LABEL): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120836,10 +120834,10 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _4 _4: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _gen_netmask(tls, ifs+32, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) + _gen_netmask(tls, ifs+32, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) } } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { @@ -120899,7 +120897,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { func _mkptr4(tls *TLS, s uintptr, ip uintptr) { bp := tls.Alloc(48) defer tls.Free(48) - Xsprintf(tls, s, __ccgo_ts+1024, VaList(bp+8, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) + Xsprintf(tls, s, __ccgo_ts+1024, VaList(bp+8, Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 3))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip))))) } func _mkptr6(tls *TLS, s uintptr, ip uintptr) { @@ -120913,13 +120911,13 @@ func _mkptr6(tls *TLS, s uintptr, ip uintptr) { } v2 = s s++ - *(*uint8)(unsafe.Pointer(v2)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] + *(*uint8)(unsafe.Pointer(v2)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] v3 = s s++ *(*uint8)(unsafe.Pointer(v3)) = uint8('.') v4 = s s++ - *(*uint8)(unsafe.Pointer(v4)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] + *(*uint8)(unsafe.Pointer(v4)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] v5 = s s++ *(*uint8)(unsafe.Pointer(v5)) = uint8('.') @@ -120966,8 +120964,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120998,8 +120996,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } for { if v13 = *(*uint8)(unsafe.Pointer(p)) != 0; v13 { - v10 = int32(*(*uint8)(unsafe.Pointer(p))) - v11 = BoolInt32(v10 == int32(' ') || uint32(v10)-uint32('\t') < uint32(5)) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v11 = BoolInt32(v10 == int32(' ') || Uint32FromInt32(v10)-uint32('\t') < uint32(5)) goto _12 _12: } @@ -121014,8 +121012,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int z = p for { if v18 = *(*uint8)(unsafe.Pointer(z)) != 0; v18 { - v15 = int32(*(*uint8)(unsafe.Pointer(z))) - v16 = BoolInt32(v15 == int32(' ') || uint32(v15)-uint32('\t') < uint32(5)) + v15 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v16 = BoolInt32(v15 == int32(' ') || Uint32FromInt32(v15)-uint32('\t') < uint32(5)) goto _17 _17: } @@ -121029,7 +121027,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } *(*uint8)(unsafe.Pointer(z)) = uint8(0) if int64(z)-int64(p) < int64(256) { - Xmemcpy(tls, buf, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, buf, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) break } } @@ -121064,8 +121062,8 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -121084,7 +121082,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) svport = Xstrtoul(tls, p, bp+128, int32(10)) - if svport != uint64(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { + if svport != Uint64FromInt32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { continue } if dgram != 0 && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+1096, uint64(4)) != 0 { @@ -121096,7 +121094,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { if int64(p)-t__predefined_ptrdiff_t(bp) > int64(32) { continue } - Xmemcpy(tls, buf, bp, uint64(int64(p)-t__predefined_ptrdiff_t(bp))) + Xmemcpy(tls, buf, bp, Uint64FromInt64(int64(p)-t__predefined_ptrdiff_t(bp))) break } X__fclose_ca(tls, f) @@ -121129,7 +121127,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso var _ /* reply at bp+443 */ [512]uint8 var _ /* tmp at bp+955 */ [17]uint8 _, _, _, _, _, _, _, _, _ = a, af, p, p1, port, qlen, rlen, scopeid, v1 - af = int32((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) + af = Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) switch af { case int32(PF_INET): a = sa + 4 @@ -121163,7 +121161,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso rlen = X__res_send(tls, bp+347, qlen, bp+443, int32(512)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if rlen > 0 { - if uint64(rlen) > uint64(512) { + if Uint64FromInt32(rlen) > uint64(512) { rlen = int32(512) } X__dns_parse(tls, bp+443, rlen, __ccgo_fp(_dns_parse_callback), bp+78) @@ -121176,7 +121174,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso Xinet_ntop(tls, af, a, bp+78, uint32(256)) if scopeid != 0 { p = uintptr(0) - if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { + if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { p = Xif_indextoname(tls, scopeid, bp+955+uintptr(1)) } if !(p != 0) { @@ -121195,13 +121193,13 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso } if serv != 0 && servlen != 0 { p1 = bp + 78 - port = int32(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) + port = Int32FromUint16(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if !(flags&Int32FromInt32(NI_NUMERICSERV) != 0) { _reverse_services(tls, bp+78, port, flags&int32(NI_DGRAM)) } if !(*(*uint8)(unsafe.Pointer(p1)) != 0) { - p1 = _itoa(tls, bp+334, uint32(port)) + p1 = _itoa(tls, bp+334, Uint32FromInt32(port)) } if Xstrlen(tls, p1) >= uint64(servlen) { return -int32(12) @@ -121264,7 +121262,7 @@ func Xgetpeername(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func Xgetservbyname(tls *TLS, name uintptr, prots uintptr) (r uintptr) { @@ -121307,8 +121305,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin return int32(ENOENT) } /* Align buffer */ - align = int32(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) - if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+uint64(align) { + align = Int32FromUint64(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) + if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+Uint64FromInt32(align) { return int32(ERANGE) } buf += uintptr(align) @@ -121340,8 +121338,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin (*Tservent)(unsafe.Pointer(se)).Fs_aliases = buf *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases)) = (*Tservent)(unsafe.Pointer(se)).Fs_name *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases + 1*8)) = uintptr(0) - (*Tservent)(unsafe.Pointer(se)).Fs_port = int32(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) - if int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { + (*Tservent)(unsafe.Pointer(se)).Fs_port = Int32FromUint16(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) + if Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { v1 = __ccgo_ts + 1106 } else { v1 = __ccgo_ts + 1110 @@ -121404,7 +121402,7 @@ func Xgetsockname(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func Xgetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, optlen uintptr) (r2 int32) { @@ -121474,7 +121472,7 @@ _11: break } if uint64(*(*Tsocklen_t)(unsafe.Pointer(optlen))) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -121594,7 +121592,7 @@ _11: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func X__h_errno_location(tls *TLS) (r uintptr) { @@ -121723,14 +121721,14 @@ func Xhtons(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } func Xif_freenameindex(tls *TLS, idx uintptr) { @@ -121755,7 +121753,7 @@ func Xif_indextoname(tls *TLS, index uint32, name uintptr) (r1 uintptr) { if v1 < 0 { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 16)) = int32(index) + *(*int32)(unsafe.Pointer(bp + 16)) = Int32FromUint32(index) r = Xioctl(tls, fd, int32(SIOCGIFNAME), VaList(bp+48, bp)) X__syscall1(tls, int64(SYS_close), int64(fd)) if r < 0 { @@ -121789,25 +121787,25 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { var i, v2 uint32 _, _, _, _, _, _, _, _, _, _, _, _ = a, bucket, ctx, i, ifa, ifi, index, map1, namelen, rta, type1, v2 ctx = pctx - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { ifi = h + UintptrFromInt64(16) index = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index type1 = int32(IFLA_IFNAME) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } else { ifa = h + UintptrFromInt64(16) - index = int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) + index = Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) type1 = int32(IFA_LABEL) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { goto _1 } - namelen = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) + namelen = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) if namelen > int32(IF_NAMESIZE) { return 0 } @@ -121816,7 +121814,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { i = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) for i != 0 { map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr(i-uint32(1))*28 - if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == uint32(index) && int32((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) == 0 { + if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == Uint32FromInt32(index) && Int32FromUint8((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) == 0 { return 0 } i = (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next @@ -121839,10 +121837,10 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fallocated = uint32(a) } map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*28 - (*Tifnamemap)(unsafe.Pointer(map1)).Findex = uint32(index) - (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = uint8(namelen) - Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) - *(*uint32)(unsafe.Pointer(ctx + 8)) += uint32(namelen + int32(1)) + (*Tifnamemap)(unsafe.Pointer(map1)).Findex = Uint32FromInt32(index) + (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = Uint8FromInt32(namelen) + Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) + *(*uint32)(unsafe.Pointer(ctx + 8)) += Uint32FromInt32(namelen + int32(1)) (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum++ (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum @@ -121850,7 +121848,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } return 0 } @@ -121879,7 +121877,7 @@ func Xif_nameindex(tls *TLS) (r uintptr) { goto err } p = ifs + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*16 + UintptrFromInt32(1)*16 - i = int32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) + i = Int32FromUint32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) d = ifs s = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist for { @@ -121934,7 +121932,7 @@ func Xif_nametoindex(tls *TLS, name uintptr) (r1 uint32) { } else { v2 = *(*int32)(unsafe.Pointer(bp + 16)) } - return uint32(v2) + return Uint32FromInt32(v2) } func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { @@ -121946,7 +121944,7 @@ func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { defer tls.Free(16) var _ /* a at bp+0 */ Tin_addr if !(X__inet_aton(tls, p, bp) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } return (*(*Tin_addr)(unsafe.Pointer(bp))).Fs_addr } @@ -121972,7 +121970,7 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) (r int32) { break } (*(*[4]uint64)(unsafe.Pointer(bp)))[i] = Xstrtoul(tls, s, bp+32, 0) - if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return 0 } if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0) { @@ -122097,7 +122095,7 @@ func Xinet_ntoa(tls *TLS, _in Tin_addr) (r uintptr) { var a uintptr _ = a a = bp - Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1122, VaList(bp+16, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3))))) + Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1122, VaList(bp+16, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))))) return uintptr(unsafe.Pointer(&_buf4)) } @@ -122118,14 +122116,14 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint a = a0 switch af { case int32(PF_INET): - if uint32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1122, VaList(bp+112, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + if Uint32FromInt32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1122, VaList(bp+112, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { return s } case int32(PF_INET6): if Xmemcmp(tls, a, __ccgo_ts+1069, uint64(12)) != 0 { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1134, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1134, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } else { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1158, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1158, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } /* Replace longest /(^0|:)[:0]{2,}/ with "::" */ v2 = Int32FromInt32(0) @@ -122136,10 +122134,10 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint if !((*(*[100]uint8)(unsafe.Pointer(bp)))[i] != 0) { break } - if i != 0 && int32((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { + if i != 0 && Int32FromUint8((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { goto _1 } - j = int32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1188)) + j = Int32FromUint64(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1188)) if j > max { best = i max = j @@ -122153,7 +122151,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint v3 = Uint8FromUint8(':') (*(*[100]uint8)(unsafe.Pointer(bp)))[best+int32(1)] = v3 (*(*[100]uint8)(unsafe.Pointer(bp)))[best] = v3 - Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), uint64(i-best-max+int32(1))) + Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), Uint64FromInt32(i-best-max+int32(1))) } if Xstrlen(tls, bp) < uint64(l) { Xstrcpy(tls, s, bp) @@ -122169,11 +122167,11 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint func _hexval(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -122206,20 +122204,20 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if !(j < int32(3) && BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { break } - v = int32(10)*v + int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') + v = int32(10)*v + Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') goto _2 _2: ; j++ } - if j == 0 || j > int32(1) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { + if j == 0 || j > int32(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { return 0 } - *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = Uint8FromInt32(v) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { return int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { return 0 } s += uintptr(j + int32(1)) @@ -122235,16 +122233,16 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { return -int32(1) } } - if v5 = int32(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { + if v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { s++ v4 = s } - if v5 && int32(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { + if v5 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { return 0 } i = 0 for { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { brk = i (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(0) s++ @@ -122277,15 +122275,15 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 { return 0 } - (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(v) + (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = Uint16FromInt32(v) if !(*(*uint8)(unsafe.Pointer(s + uintptr(j))) != 0) && (brk >= 0 || i == int32(7)) { break } if i == int32(7) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { return 0 } need_v4 = int32(1) @@ -122300,7 +122298,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { i++ } if brk >= 0 { - Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(int32(2)*(i+int32(1)-brk))) + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, Uint64FromInt32(int32(2)*(i+int32(1)-brk))) j = 0 for { if !(j < int32(7)-i) { @@ -122320,7 +122318,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { } v14 = a a++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint16((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) v15 = a a++ *(*uint8)(unsafe.Pointer(v15)) = uint8((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) @@ -122388,7 +122386,7 @@ func Xlisten(tls *TLS, fd int32, backlog int32) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r int32) { @@ -122417,7 +122415,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i p = Xstrchr(tls, name, int32('%')) scopeid = uint64(0) if p != 0 && int64(p)-int64(name) < int64(64) { - Xmemcpy(tls, bp+20, name, uint64(int64(p)-int64(name))) + Xmemcpy(tls, bp+20, name, Uint64FromInt64(int64(p)-int64(name))) (*(*[64]uint8)(unsafe.Pointer(bp + 20)))[int64(p)-int64(name)] = uint8(0) name = bp + 20 } @@ -122438,7 +122436,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i *(*uintptr)(unsafe.Pointer(bp + 88)) = p - uintptr(1) } if *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { - if !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { + if !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { return -int32(2) } scopeid = uint64(Xif_nametoindex(tls, p)) @@ -122469,12 +122467,12 @@ const RR_CNAME = 5 func _is_valid_hostname(tls *TLS, host uintptr) (r int32) { var s uintptr _ = s - if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == uint64(-Int32FromInt32(1)) { + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == Uint64FromInt32(-Int32FromInt32(1)) { return 0 } s = host for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || int32(*(*uint8)(unsafe.Pointer(s))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) != 0) { break } goto _1 @@ -122579,14 +122577,14 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family v4 = Xstrstr(tls, p, name) p = v4 if v12 = v4 != 0; v12 { - v5 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: ; if v11 = !(v6 != 0); !v11 { - v8 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -122606,8 +122604,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family p = bp for { if v17 = *(*uint8)(unsafe.Pointer(p)) != 0; v17 { - v14 = int32(*(*uint8)(unsafe.Pointer(p))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: } @@ -122637,8 +122635,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family /* Extract first name as canonical name */ for { if v23 = *(*uint8)(unsafe.Pointer(p)) != 0; v23 { - v20 = int32(*(*uint8)(unsafe.Pointer(p))) - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v20 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: } @@ -122653,8 +122651,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family z = p for { if v28 = *(*uint8)(unsafe.Pointer(z)) != 0; v28 { - v25 = int32(*(*uint8)(unsafe.Pointer(z))) - v26 = BoolInt32(v25 == int32(' ') || uint32(v25)-uint32('\t') < uint32(5)) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v26 = BoolInt32(v25 == int32(' ') || Uint32FromInt32(v25)-uint32('\t') < uint32(5)) goto _27 _27: } @@ -122669,7 +122667,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family *(*uint8)(unsafe.Pointer(z)) = uint8(0) if _is_valid_hostname(tls, p) != 0 { have_canon = int32(1) - Xmemcpy(tls, canon, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, canon, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) } } X__fclose_ca(tls, f) @@ -122726,7 +122724,7 @@ func _dns_parse_callback1(tls *TLS, c uintptr, rr int32, data uintptr, len1 int3 v2 = ctx + 16 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ - Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, uint64(len1)) + Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, Uint64FromInt32(len1)) return 0 } @@ -122769,7 +122767,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i qtypes[nq] = _afrr[i].Frr *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280 + 3)) = uint8(0) /* don't need AD flag */ /* Ensure query IDs are distinct. */ - if nq != 0 && int32(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == int32(*(*uint8)(unsafe.Pointer(bp))) { + if nq != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) { *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))++ } nq++ @@ -122787,13 +122785,13 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i if !(i < nq) { break } - if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { + if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { return -int32(4) } goto _2 @@ -122807,7 +122805,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i break } (*(*Tdpc_ctx)(unsafe.Pointer(bp + 10208))).Frrtype = qtypes[i] - if uint64((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { + if Uint64FromInt32((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] = int32(4800) } X__dns_parse(tls, bp+560+uintptr(i)*4800, (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i], __ccgo_fp(_dns_parse_callback1), bp+10208) @@ -122858,7 +122856,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { dots++ } goto _1 @@ -122866,14 +122864,14 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f ; l++ } - if dots >= uint64((*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots) || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if dots >= uint64((*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots) || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { *(*uint8)(unsafe.Pointer(bp)) = uint8(0) } /* Strip final dot for canon, fail if multiple trailing dots. */ - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { l-- } - if !(l != 0) || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if !(l != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { return -int32(2) } /* This can never happen; the caller already checked length. */ @@ -122892,8 +122890,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f break } for { - v5 = int32(*(*uint8)(unsafe.Pointer(p))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -122907,8 +122905,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f z = p for { if v12 = *(*uint8)(unsafe.Pointer(z)) != 0; v12 { - v9 = int32(*(*uint8)(unsafe.Pointer(z))) - v10 = BoolInt32(v9 == int32(' ') || uint32(v9)-uint32('\t') < uint32(5)) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v10 = BoolInt32(v9 == int32(' ') || Uint32FromInt32(v9)-uint32('\t') < uint32(5)) goto _11 _11: } @@ -122923,9 +122921,9 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if z == p { break } - if uint64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { - Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, uint64(int64(z)-int64(p))) - *(*uint8)(unsafe.Pointer(canon + uintptr(uint64(int64(z)-int64(p)+int64(1))+l))) = uint8(0) + if Uint64FromInt64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { + Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, Uint64FromInt64(int64(z)-int64(p))) + *(*uint8)(unsafe.Pointer(canon + uintptr(Uint64FromInt64(int64(z)-int64(p)+int64(1))+l))) = uint8(0) cnt = _name_from_dns(tls, buf, canon, canon, family, bp+256) if cnt != 0 { return cnt @@ -122997,7 +122995,7 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&_defpolicy))+uintptr(i)*20, uint64(_defpolicy[i].Flen1)) != 0 { goto _1 } - if int32(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&int32(_defpolicy[i].Fmask) != int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&Int32FromUint8(_defpolicy[i].Fmask) != Int32FromUint8(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { goto _1 } return uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 @@ -123010,20 +123008,20 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { } func _labelof(tls *TLS, a uintptr) (r int32) { - return int32((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) + return Int32FromUint8((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) } func _scopeof(tls *TLS, a uintptr) (r int32) { - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { - return int32(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { + return Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { return int32(2) } - if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { + if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { return int32(2) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { return int32(5) } return int32(14) @@ -123034,7 +123032,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(128) && !((int32(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^int32(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { + if !(i < uint32(128) && !((Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { break } goto _1 @@ -123042,7 +123040,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { ; i++ } - return int32(i) + return Int32FromUint32(i) } func _addrcmp(tls *TLS, _a uintptr, _b uintptr) (r int32) { @@ -123227,8 +123225,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } dpolicy = _policyof(tls, bp+32+8) dscope = _scopeof(tls, bp+32+8) - dlabel = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) - dprec = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) + dlabel = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) + dprec = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) prefixlen = 0 fd = Xsocket(tls, family1, Int32FromInt32(SOCK_DGRAM)|Int32FromInt32(SOCK_CLOEXEC), int32(IPPROTO_UDP)) if fd >= 0 { @@ -123259,7 +123257,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i ; i++ } - Xqsort(tls, buf, uint64(cnt), uint64(28), __ccgo_fp(_addrcmp)) + Xqsort(tls, buf, Uint64FromInt32(cnt), uint64(28), __ccgo_fp(_addrcmp)) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) return cnt } @@ -123310,8 +123308,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -int32(8) } (*(*Tservice)(unsafe.Pointer(buf))).Fport = uint16(0) - (*(*Tservice)(unsafe.Pointer(buf))).Fproto = uint8(proto) - (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(socktype) + (*(*Tservice)(unsafe.Pointer(buf))).Fproto = Uint8FromInt32(proto) + (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = Uint8FromInt32(socktype) return int32(1) } if name != 0 { @@ -123375,8 +123373,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i break } if v10 = p > bp; v10 { - v7 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v8 = BoolInt32(v7 == int32(' ') || uint32(v7)-uint32('\t') < uint32(5)) + v7 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v8 = BoolInt32(v7 == int32(' ') || Uint32FromInt32(v7)-uint32('\t') < uint32(5)) goto _9 _9: } @@ -123384,8 +123382,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i goto _5 } if v14 = *(*uint8)(unsafe.Pointer(p + uintptr(l))) != 0; v14 { - v11 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: } @@ -123405,8 +123403,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i p = bp for { if v19 = *(*uint8)(unsafe.Pointer(p)) != 0; v19 { - v16 = int32(*(*uint8)(unsafe.Pointer(p))) - v17 = BoolInt32(v16 == int32(' ') || uint32(v16)-uint32('\t') < uint32(5)) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v17 = BoolInt32(v16 == int32(' ') || Uint32FromInt32(v16)-uint32('\t') < uint32(5)) goto _18 _18: } @@ -123488,7 +123486,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = uint16(type1) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = Uint16FromInt32(type1) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123499,7 +123497,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = uint16(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = Uint16FromInt32(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123521,7 +123519,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fg.Frtgen_family = uint8(af) + })(unsafe.Pointer(bp))))).Fg.Frtgen_family = Uint8FromInt32(af) r = int32(Xsend(tls, fd, bp, uint64(20), 0)) if r < 0 { return r @@ -123533,13 +123531,13 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } h = bp for { - if !(uint64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { + if !(Uint64FromInt64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { break } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { return 0 } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { return -int32(1) } ret = (*(*func(*TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{cb})))(tls, ctx, h) @@ -123549,7 +123547,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, goto _1 _1: ; - h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } } return r1 @@ -123595,7 +123593,7 @@ func Xns_get16(tls *TLS, cp uintptr) (r uint32) { trc("tls=%v cp=%v, (%v:)", tls, cp, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(int32(*(*uint8)(unsafe.Pointer(cp)))< %v", r) }() } - return uint64(uint32(*(*uint8)(unsafe.Pointer(cp)))< int64(eom)-int64(p) { goto bad } @@ -123765,7 +123763,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin if rrnum == -int32(1) { rrnum = (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum } - if rrnum < 0 || rrnum >= int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if rrnum < 0 || rrnum >= Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { goto bad } if rrnum < (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum { @@ -123804,7 +123802,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin p4 = handle + 72 *(*uintptr)(unsafe.Pointer(p4)) += uintptr(2) (*Tns_rr)(unsafe.Pointer(rr)).Frdlength = uint16(Xns_get16(tls, *(*uintptr)(unsafe.Pointer(p4))-uintptr(2))) - if int64((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { + if Int64FromUint16((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { goto size } (*Tns_rr)(unsafe.Pointer(rr)).Frdata = (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr @@ -123815,7 +123813,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin (*Tns_rr)(unsafe.Pointer(rr)).Frdata = UintptrFromInt32(0) } (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum++ - if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { (*Tns_msg)(unsafe.Pointer(handle)).F_sect = section + int32(1) if (*Tns_msg)(unsafe.Pointer(handle)).F_sect == int32(_ns_s_max) { (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum = -int32(1) @@ -123844,7 +123842,7 @@ func Xns_name_uncompress(tls *TLS, msg uintptr, eom uintptr, src uintptr, dst ui } var r int32 _ = r - r = Xdn_expand(tls, msg, eom, src, dst, int32(dstsiz)) + r = Xdn_expand(tls, msg, eom, src, dst, Int32FromUint64(dstsiz)) if r < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) } @@ -123897,14 +123895,14 @@ func Xntohs(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } /* do we really need all these?? */ @@ -123931,10 +123929,10 @@ func Xgetprotoent(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(_idx) >= uint64(239) { + if Uint64FromInt32(_idx) >= uint64(239) { return UintptrFromInt32(0) } - _p.Fp_proto = int32(_protos[_idx]) + _p.Fp_proto = Int32FromUint8(_protos[_idx]) _p.Fp_name = uintptr(unsafe.Pointer(&_protos)) + uintptr(_idx+int32(1)) _p.Fp_aliases = uintptr(unsafe.Pointer(&_aliases)) _idx = int32(uint64(_idx) + (Xstrlen(tls, _p.Fp_name) + Uint64FromInt32(2))) @@ -123997,7 +123995,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v3 = int32(1) v4 = int64(fd) v5 = int64(buf) - v6 = int64(len1) + v6 = Int64FromUint64(len1) v7 = int64(flags) v8 = int64(addr) v9 = int64(alen) @@ -124034,7 +124032,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v10 = r goto _11 _11: - return X__syscall_ret(tls, uint64(v10)) + return X__syscall_ret(tls, Uint64FromInt64(v10)) } func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, timeout uintptr) (r int32) { @@ -124061,7 +124059,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti i-- mh += 64 } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), int64(vlen), int64(flags), int64(timeout), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), Int64FromUint32(vlen), Int64FromUint32(flags), int64(timeout), 0)))) } func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { @@ -124125,10 +124123,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { goto _1 _1: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { v6 = uintptr(0) } else { - v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v6 } @@ -124141,10 +124139,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { } p7 = msg + 40 *(*Tsocklen_t)(unsafe.Pointer(p7)) = Tsocklen_t(uint64(*(*Tsocklen_t)(unsafe.Pointer(p7))) + ((Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)) + (Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)))) - if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { v8 = uintptr(0) } else { - v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v8 (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_level = int32(SOL_SOCKET) @@ -124219,7 +124217,7 @@ func Xrecvmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r2 Tssize_t) { v11 = r goto _12 _12: - r1 = X__syscall_ret(tls, uint64(v11)) + r1 = X__syscall_ret(tls, Uint64FromInt64(v11)) if r1 >= 0 { X__convert_scm_timestamps(tls, msg, orig_controllen) } @@ -124250,19 +124248,19 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, var _ /* ts at bp+280 */ Ttimespec _, _, _, _, _ = i, id, j, l, n l = Xstrnlen(tls, dname, uint64(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { l-- } - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { return -int32(1) } - n = int32(uint64(17) + l + BoolUint64(!!(l != 0))) - if l > uint64(253) || buflen < n || uint32(op) > uint32(15) || uint32(class) > uint32(255) || uint32(type1) > uint32(255) { + n = Int32FromUint64(uint64(17) + l + BoolUint64(!!(l != 0))) + if l > uint64(253) || buflen < n || Uint32FromInt32(op) > uint32(15) || Uint32FromInt32(class) > uint32(255) || Uint32FromInt32(type1) > uint32(255) { return -int32(1) } /* Construct query template - ID will be filled later */ - Xmemset(tls, bp, 0, uint64(n)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(op*int32(8) + int32(1)) + Xmemset(tls, bp, 0, Uint64FromInt32(n)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = Uint8FromInt32(op*int32(8) + int32(1)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(32) /* AD */ (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(5)] = uint8(1) Xmemcpy(tls, bp+uintptr(13), dname, l) @@ -124273,7 +124271,7 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, } j = i for { - if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && int32((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { + if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && Int32FromUint8((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { break } goto _2 @@ -124281,23 +124279,23 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, ; j++ } - if uint32(j-i)-uint32(1) > uint32(62) { + if Uint32FromInt32(j-i)-uint32(1) > uint32(62) { return -int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = uint8(j - i) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = Uint8FromInt32(j - i) goto _1 _1: ; i = j + int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(type1) - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(class) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = Uint8FromInt32(type1) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = Uint8FromInt32(class) /* Make a reasonably unpredictable id */ Xclock_gettime(tls, CLOCK_REALTIME, bp+280) - id = int32((uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = uint8(id / int32(256)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(id) - Xmemcpy(tls, buf, bp, uint64(n)) + id = Int32FromUint64((Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = Uint8FromInt32(id / int32(256)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = Uint8FromInt32(id) + Xmemcpy(tls, buf, bp, Uint64FromInt32(n)) return n } @@ -124433,7 +124431,7 @@ func _mtime(tls *TLS) (r uint64) { if Xclock_gettime(tls, int32(CLOCK_MONOTONIC), bp) < 0 && *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOSYS) { Xclock_gettime(tls, CLOCK_REALTIME, bp) } - return uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) + return Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) } func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, q uintptr, ql int32) (r1 int32) { @@ -124443,8 +124441,8 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, var _ /* mh at bp+40 */ Tmsghdr _, _ = fd, r *(*[2]Tuint8_t)(unsafe.Pointer(bp + 32)) = [2]Tuint8_t{ - 0: uint8(ql >> int32(8)), - 1: uint8(ql), + 0: Uint8FromInt32(ql >> int32(8)), + 1: Uint8FromInt32(ql), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -124453,7 +124451,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, }, 1: { Fiov_base: q, - Fiov_len: uint64(ql), + Fiov_len: Uint64FromInt32(ql), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 40)) = Tmsghdr{ @@ -124562,20 +124560,20 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a sl = uint32(16) nns = 0 family = int32(PF_INET) - v1 = uint64(nqueries+int32(2)) * 8 + v1 = Uint64FromInt32(nqueries+int32(2)) * 8 pfd = Xrealloc(tls, pfd, v1) - v2 = uint64(nqueries) * 4 + v2 = Uint64FromInt32(nqueries) * 4 qpos = Xrealloc(tls, qpos, v2) - v3 = uint64(nqueries) * 4 + v3 = Uint64FromInt32(nqueries) * 4 apos = Xrealloc(tls, apos, v3) - v4 = uint64(nqueries) * 2 + v4 = Uint64FromInt32(nqueries) * 2 alen_buf = Xrealloc(tls, alen_buf, v4) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), bp+200) - timeout = int32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) - attempts = int32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) + timeout = Int32FromUint32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) + attempts = Int32FromUint32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) nns = 0 for { - if !(uint32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { + if !(Uint32FromInt32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { break } iplit = conf + uintptr(nns)*28 @@ -124598,7 +124596,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_scope_id = (*Taddress)(unsafe.Pointer(iplit)).Fscopeid v6 = Int32FromInt32(PF_INET6) family = v6 - (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = uint16(v6) + (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = Uint16FromInt32(v6) } goto _5 _5: @@ -124636,7 +124634,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(i < nns) { break } - if int32((*(*[3]struct { + if Int32FromUint16((*(*[3]struct { Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte @@ -124658,7 +124656,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte - })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = uint16(family) + })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = Uint16FromInt32(family) if fd < 0 || Xbind(tls, fd, bp+88, sl) < 0 { if fd >= 0 { Xclose(tls, fd) @@ -124685,15 +124683,15 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), (nqueries+int32(1))*8))).Ffd = -int32(2) __pthread_cleanup_push(tls, bp+208, __ccgo_fp(_cleanup), pfd) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp + 200)), uintptr(0)) - Xmemset(tls, alens, 0, uint64(4)*uint64(nqueries)) + Xmemset(tls, alens, 0, uint64(4)*Uint64FromInt32(nqueries)) retry_interval = timeout / attempts next = 0 v10 = _mtime(tls) t2 = v10 t0 = v10 - t1 = t2 - uint64(retry_interval) + t1 = t2 - Uint64FromInt32(retry_interval) for { - if !(t2-t0 < uint64(timeout)) { + if !(t2-t0 < Uint64FromInt32(timeout)) { break } /* This is the loop exit condition: that all queries @@ -124711,7 +124709,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if i == nqueries { break } - if t2-t1 >= uint64(retry_interval) { + if t2-t1 >= Uint64FromInt32(retry_interval) { /* Query all configured namservers in parallel */ i = 0 for { @@ -124724,7 +124722,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(j < nns) { break } - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) goto _14 _14: ; @@ -124740,14 +124738,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry = int32(2) * nqueries } /* Wait for a response, or until time to retry */ - if Xpoll(tls, pfd, uint64(nqueries+int32(1)), int32(t1+uint64(retry_interval)-t2)) <= 0 { + if Xpoll(tls, pfd, Uint64FromInt32(nqueries+int32(1)), Int32FromUint64(t1+Uint64FromInt32(retry_interval)-t2)) <= 0 { goto _11 } for next < nqueries { *(*[1]Tiovec)(unsafe.Pointer(bp + 8)) = [1]Tiovec{ 0: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 232)) = Tmsghdr{ @@ -124781,7 +124779,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Find which query this answer goes with, if any */ i = next for { - if !(i < nqueries && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { + if !(i < nqueries && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { break } goto _16 @@ -124798,7 +124796,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Only accept positive or negative responses; * retry immediately on server failure, and ignore * all other codes such as refusal. */ - switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { case 0: fallthrough case int32(3): @@ -124808,7 +124806,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry-- } if v18 && v17 != 0 { - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) } fallthrough default: @@ -124828,14 +124826,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a next++ } } else { - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), uint64(rlen)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), Uint64FromInt32(rlen)) } /* Ignore further UDP if all slots full or TCP-mode */ if next == nqueries { (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), nqueries*8))).Fevents = 0 } /* If answer is truncated (TC bit), fallback to TCP */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { *(*int32)(unsafe.Pointer(alens + uintptr(i)*4)) = -int32(1) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), uintptr(0)) r = _start_tcp(tls, pfd+uintptr(i)*8, family, bp+116+uintptr(j)*28, sl, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), *(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))) @@ -124854,8 +124852,8 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a } if int32((*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Frevents)&int32(POLLOUT) != 0 { *(*[2]Tuint8_t)(unsafe.Pointer(bp + 52)) = [2]Tuint8_t{ - 0: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), - 1: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + 0: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), + 1: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), } *(*[2]Tiovec)(unsafe.Pointer(bp + 24)) = [2]Tiovec{ 0: { @@ -124864,14 +124862,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), - Fiov_len: uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + Fiov_len: Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 288)) = Tmsghdr{ Fmsg_iov: bp + 24, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+288, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) + _step_mh(tls, bp+288, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) r = int32(Xsendmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+288, int32(MSG_NOSIGNAL))) if r < 0 { goto out @@ -124899,14 +124897,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 344)) = Tmsghdr{ Fmsg_iov: bp + 56, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+344, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) + _step_mh(tls, bp+344, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) r = int32(Xrecvmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+344, 0)) if r <= 0 { goto out @@ -124915,14 +124913,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < int32(2) { goto _21 } - alen = int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) + alen = Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) if alen < int32(13) { goto out } if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < alen+int32(2) && *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < asize+int32(2) { goto _21 } - rcode = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) + rcode = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) if rcode != 0 && rcode != int32(3) { goto out } @@ -125000,7 +124998,7 @@ func X__res_send(tls *TLS, _msg uintptr, _msglen int32, _answer uintptr, _anslen } else { v1 = *(*int32)(unsafe.Pointer(bp + 24)) } - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, uint64(v1)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, Uint64FromInt32(v1)) } return r } @@ -125078,8 +125076,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v4 = !(Xstrncmp(tls, bp, __ccgo_ts+1208, uint64(7)) != 0); v4 { - v1 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: } @@ -125111,7 +125109,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1233) - if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { + if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { p += uintptr(8) x2 = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -125126,8 +125124,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v11 = !(Xstrncmp(tls, bp, __ccgo_ts+1242, uint64(10)) != 0); v11 { - v8 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -125137,8 +125135,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(11) for { - v13 = int32(*(*uint8)(unsafe.Pointer(p))) - v14 = BoolInt32(v13 == int32(' ') || uint32(v13)-uint32('\t') < uint32(5)) + v13 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v14 = BoolInt32(v13 == int32(' ') || Uint32FromInt32(v13)-uint32('\t') < uint32(5)) goto _15 _15: if !(v14 != 0) { @@ -125152,8 +125150,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ *(*uintptr)(unsafe.Pointer(bp + 744)) = p for { if v20 = *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744)))) != 0; v20 { - v17 = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) - v18 = BoolInt32(v17 == int32(' ') || uint32(v17)-uint32('\t') < uint32(5)) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) + v18 = BoolInt32(v17 == int32(' ') || Uint32FromInt32(v17)-uint32('\t') < uint32(5)) goto _19 _19: } @@ -125175,8 +125173,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v24 = Xstrncmp(tls, bp, __ccgo_ts+1253, uint64(6)) != 0 && Xstrncmp(tls, bp, __ccgo_ts+1260, uint64(6)) != 0; !v24 { - v21 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) - v22 = BoolInt32(v21 == int32(' ') || uint32(v21)-uint32('\t') < uint32(5)) + v21 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) + v22 = BoolInt32(v21 == int32(' ') || Uint32FromInt32(v21)-uint32('\t') < uint32(5)) goto _23 _23: } @@ -125185,8 +125183,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(7) for { - v26 = int32(*(*uint8)(unsafe.Pointer(p))) - v27 = BoolInt32(v26 == int32(' ') || uint32(v26)-uint32('\t') < uint32(5)) + v26 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v27 = BoolInt32(v26 == int32(' ') || Uint32FromInt32(v26)-uint32('\t') < uint32(5)) goto _28 _28: if !(v27 != 0) { @@ -125212,7 +125210,7 @@ no_resolv_conf: X__lookup_ipliteral(tls, conf, __ccgo_ts+1267, PF_UNSPEC) nns = int32(1) } - (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(nns) + (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = Uint32FromInt32(nns) return 0 } @@ -125240,18 +125238,18 @@ func Xsendmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32) (r } i = 0 for { - if !(uint32(i) < vlen) { + if !(Uint32FromInt32(i) < vlen) { break } /* As an unfortunate inconsistency, the sendmmsg API uses * unsigned int for the resulting msg_len, despite sendmsg * returning ssize_t. However Linux limits the total bytes * sent by sendmsg to INT_MAX, so the assignment is safe. */ - r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, int32(flags)) + r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, Int32FromUint32(flags)) if r < 0 { goto error } - (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = uint32(r) + (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = Uint32FromInt64(r) goto _1 _1: ; @@ -125310,10 +125308,10 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { goto _2 _2: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_controllen))-int64(c1)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_controllen))-int64(c1)) { v4 = uintptr(0) } else { - v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } c1 = v4 } @@ -125361,7 +125359,7 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { v14 = r goto _15 _15: - return X__syscall_ret(tls, uint64(v14)) + return X__syscall_ret(tls, Uint64FromInt64(v14)) } func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr uintptr, alen Tsocklen_t) (r1 Tssize_t) { @@ -125380,10 +125378,10 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v3 = int32(1) v4 = int64(fd) v5 = int64(buf) - v6 = int64(len1) + v6 = Int64FromUint64(len1) v7 = int64(flags) v8 = int64(addr) - v9 = int64(alen) + v9 = Int64FromUint32(alen) if v3 != 0 { r = ___syscall_cp(tls, int64(v1), v4, v5, v6, v7, v8, v9) } else { @@ -125417,7 +125415,7 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v10 = r goto _11 _11: - return X__syscall_ret(tls, uint64(v10)) + return X__syscall_ret(tls, Uint64FromInt64(v10)) } func Xendservent(tls *TLS) { @@ -125462,7 +125460,7 @@ func Xsetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, v5 = int64(level) v6 = int64(optname) v7 = int64(optval) - v8 = int64(optlen) + v8 = Int64FromUint32(optlen) v9 = int64(Int32FromInt32(0)) if v3 != 0 { r = ___syscall_cp(tls, int64(v1), v4, v5, v6, v7, v8, v9) @@ -125509,13 +125507,13 @@ _11: break } if uint64(optlen) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } tv = optval s = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec us = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -125523,14 +125521,14 @@ _11: if optname == int32(SO_SNDTIMEO) { optname = int32(SO_SNDTIMEO_OLD) } - if !((uint64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v12 = uint64(us) + if !((Uint64FromInt64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v12 = Uint64FromInt64(us) } else { - v12 = uint64(0x7fffffff) + (0+uint64(us))>>int32(63) + v12 = uint64(0x7fffffff) + (0+Uint64FromInt64(us))>>int32(63) } *(*[2]int64)(unsafe.Pointer(bp + 96)) = [2]int64{ 0: s, - 1: int64(int32(v12)), + 1: int64(Int32FromUint64(v12)), } v13 = int32(SYS_setsockopt) v14 = int32(__SC_setsockopt) @@ -125539,7 +125537,7 @@ _11: v17 = int64(level) v18 = int64(optname) v19 = int64(bp + 96) - v20 = int64(Uint64FromInt32(2) * Uint64FromInt64(8)) + v20 = Int64FromUint64(Uint64FromInt32(2) * Uint64FromInt64(8)) v21 = int64(Int32FromInt32(0)) if v15 != 0 { r = ___syscall_cp(tls, int64(v13), v16, v17, v18, v19, v20, v21) @@ -125594,7 +125592,7 @@ _11: v28 = int64(level) v29 = int64(optname) v30 = int64(optval) - v31 = int64(optlen) + v31 = Int64FromUint32(optlen) v32 = int64(Int32FromInt32(0)) if v26 != 0 { r = ___syscall_cp(tls, int64(v24), v27, v28, v29, v30, v31, v32) @@ -125634,7 +125632,7 @@ _11: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { @@ -125690,7 +125688,7 @@ func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func Xsockatmark(tls *TLS, s int32) (r int32) { @@ -125806,7 +125804,7 @@ _11: _22: s = int32(v21) if s < 0 { - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } if type1&int32(SOCK_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) @@ -125815,7 +125813,7 @@ _11: X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFL)), int64(Int32FromInt32(O_NONBLOCK))) } } - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr) (r2 int32) { @@ -125871,7 +125869,7 @@ func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr v10 = r goto _11 _11: - r1 = int32(X__syscall_ret(tls, uint64(v10))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v10))) if r1 < 0 && (*(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EINVAL) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EPROTONOSUPPORT)) && type1&(Int32FromInt32(SOCK_CLOEXEC)|Int32FromInt32(SOCK_NONBLOCK)) != 0 { v12 = int32(SYS_socketpair) v13 = int32(__SC_socketpair) @@ -125915,7 +125913,7 @@ _11: v21 = r goto _22 _22: - r1 = int32(X__syscall_ret(tls, uint64(v21))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v21))) if r1 < 0 { return r1 } @@ -126112,11 +126110,11 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) + len1 = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) i = 0 for { if !(i < (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]) { @@ -126167,18 +126165,18 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = v8 goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { rv = int32(ENOMEM) goto cleanup_f } - tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) + tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) if !(tmp1 != 0) { rv = *(*int32)(unsafe.Pointer(X__errno_location(tls))) goto cleanup_f } *(*uintptr)(unsafe.Pointer(mem)) = tmp1 - *(*Tsize_t)(unsafe.Pointer(nmem)) = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) + *(*Tsize_t)(unsafe.Pointer(nmem)) = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) } if (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] != 0 { *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(mem)))) = *(*uintptr)(unsafe.Pointer(buf)) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) @@ -126208,7 +126206,7 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz } (*Tgroup)(unsafe.Pointer(gr)).Fgr_name = *(*uintptr)(unsafe.Pointer(buf)) (*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd = (*Tgroup)(unsafe.Pointer(gr)).Fgr_name + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) - (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) + (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) (*Tgroup)(unsafe.Pointer(gr)).Fgr_mem = *(*uintptr)(unsafe.Pointer(mem)) if *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr(-Int32FromInt32(1)))) != 0 || *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]-int32(1)))) != 0 { rv = int32(EIO) @@ -126383,10 +126381,10 @@ func _atou(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126449,7 +126447,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = _atou(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) @@ -126465,7 +126463,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { *(*Tsize_t)(unsafe.Pointer(nmem))++ } goto _10 @@ -126490,7 +126488,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { v12 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v12)) = uint8(0) @@ -126561,11 +126559,11 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u goto cleanup } if (*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRFOUND)] != 0 { - nscdbuf = Xcalloc(tls, uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) + nscdbuf = Xcalloc(tls, Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) if !(nscdbuf != 0) { goto cleanup } - nbytes = uint64(4) * uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) + nbytes = uint64(4) * Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) if nbytes != 0 && !(Xfread(tls, nscdbuf, nbytes, uint64(1), f) != 0) { if !(Xferror(tls, f) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EIO) @@ -126776,11 +126774,11 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { + if Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) + len1 = Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) if len1 > *(*Tsize_t)(unsafe.Pointer(size)) || !(*(*uintptr)(unsafe.Pointer(buf)) != 0) { tmp = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(buf)), len1) if !(tmp != 0) { @@ -126804,8 +126802,8 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_passwd + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_shell = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) /* Don't assume that nscd made sure to null terminate strings. * It's supposed to, but malicious nscd should be ignored * rather than causing a crash. @@ -126953,10 +126951,10 @@ func _atou1(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -127018,14 +127016,14 @@ func X__getpwent_a(tls *TLS, f uintptr, pw uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v9)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v10 = *(*uintptr)(unsafe.Pointer(bp)) @@ -127124,7 +127122,7 @@ func X__nscd_query(tls *TLS, req Tint32_t, key uintptr, buf uintptr, len1 Tsize_ *(*[3]Tint32_t)(unsafe.Pointer(bp + 32)) = [3]Tint32_t{ 0: int32(NSCDVERSION), 1: req, - 2: int32(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), + 2: Int32FromUint64(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -127197,11 +127195,11 @@ retry: if !(i < Uint64FromInt64(12)/Uint64FromInt64(4)) { break } - v3 = uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) + v3 = Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) v4 = v3>>int32(24) | v3>>int32(8)&uint32(0xff00) | v3<>int32(24) | v7>>int32(8)&uint32(0xff00) | v7< %v", r) }() } - return int64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) + return Int64FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) } func Xlrand48(tls *TLS) (r int64) { @@ -127490,7 +127488,7 @@ func Xjrand48(tls *TLS, s uintptr) (r int64) { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) + return int64(Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) } func Xmrand48(tls *TLS) (r int64) { @@ -127516,7 +127514,7 @@ func Xrand(tls *TLS) (r int32) { defer func() { trc("-> %v", r) }() } _seed = uint64(6364136223846793005)*_seed + uint64(1) - return int32(_seed >> int32(33)) + return Int32FromUint64(_seed >> int32(33)) } func _temper(tls *TLS, x uint32) (r uint32) { @@ -127536,7 +127534,7 @@ func Xrand_r(tls *TLS, seed uintptr) (r int32) { _ = v1 v1 = *(*uint32)(unsafe.Pointer(seed))*Uint32FromInt32(1103515245) + Uint32FromInt32(12345) *(*uint32)(unsafe.Pointer(seed)) = v1 - return int32(_temper(tls, v1) / uint32(2)) + return Int32FromUint32(_temper(tls, v1) / uint32(2)) } /* @@ -127594,15 +127592,15 @@ func _lcg64(tls *TLS, x Tuint64_t) (r Tuint64_t) { } func _savestate(tls *TLS) (r uintptr) { - *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) = uint32(_n<> int32(16)) - _i = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) - _j = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) + _n = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> int32(16)) + _i = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) + _j = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) } func ___srandom(tls *TLS, seed uint32) { @@ -127709,11 +127707,11 @@ func Xrandom(tls *TLS) (r int64) { if _n == 0 { v1 = _lcg31(tls, *(*Tuint32_t)(unsafe.Pointer(_x1))) *(*Tuint32_t)(unsafe.Pointer(_x1)) = v1 - k = int64(v1) + k = Int64FromUint32(v1) goto end } *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) += *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_j)*4)) - k = int64(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) + k = Int64FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) _i++ v2 = _i if v2 == _n { @@ -127751,8 +127749,8 @@ func Xsrand48(tls *TLS, seed int64) { defer tls.Free(16) *(*[3]uint16)(unsafe.Pointer(bp)) = [3]uint16{ 0: uint16(0x330e), - 1: uint16(seed), - 2: uint16(seed >> int32(16)), + 1: Uint16FromInt64(seed), + 2: Uint16FromInt64(seed >> int32(16)), } Xseed48(tls, bp) } @@ -127780,7 +127778,7 @@ func Xexecl(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127824,7 +127822,7 @@ func Xexecle(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127868,7 +127866,7 @@ func Xexeclp(tls *TLS, file uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127903,7 +127901,7 @@ func Xexecve(tls *TLS, path uintptr, argv uintptr, envp uintptr) (r int32) { defer func() { trc("-> %v", r) }() } /* do we need to use environ if envp is null? */ - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) } func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { @@ -127929,18 +127927,18 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { if !(path != 0) { path = __ccgo_ts + 1408 } - k = Xstrnlen(tls, file, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + k = Xstrnlen(tls, file, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if k > uint64(NAME_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENAMETOOLONG) return -int32(1) } - l = Xstrnlen(tls, path, uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) + l = Xstrnlen(tls, path, Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) p = path for { v2 = l + k + uint64(1) b = Xrealloc(tls, b, v2) z = X__strchrnul(tls, p, int32(':')) - if uint64(int64(z)-int64(p)) >= l { + if Uint64FromInt64(int64(z)-int64(p)) >= l { v3 = z z++ if !(*(*uint8)(unsafe.Pointer(v3)) != 0) { @@ -127948,7 +127946,7 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { } goto _1 } - Xmemcpy(tls, b, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, b, p, Uint64FromInt64(int64(z)-int64(p))) *(*uint8)(unsafe.Add(unsafe.Pointer(b), int64(z)-int64(p))) = uint8('/') Xmemcpy(tls, b+uintptr(int64(z)-int64(p))+BoolUintptr(z > p), file, k+uint64(1)) Xexecve(tls, b, argv, envp) @@ -128006,9 +128004,9 @@ func Xfexecve(tls *TLS, fd int32, argv uintptr, envp uintptr) (r1 int32) { _ = r r = int32(X__syscall5(tls, int64(SYS_execveat), int64(fd), int64(__ccgo_ts), int64(argv), int64(envp), int64(Int32FromInt32(AT_EMPTY_PATH)))) if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - X__procfdname(tls, bp, uint32(fd)) + X__procfdname(tls, bp, Uint32FromInt32(fd)) Xexecve(tls, bp, argv, envp) if *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EBADF) @@ -128327,8 +128325,8 @@ func Xposix_spawnattr_setflags(tls *TLS, attr uintptr, flags int16) (r int32) { } var all_flags uint32 _ = all_flags - all_flags = uint32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) - if uint32(flags) & ^all_flags != 0 { + all_flags = Uint32FromInt32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) + if Uint32FromInt16(flags) & ^all_flags != 0 { return int32(EINVAL) } (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(flags) @@ -128368,7 +128366,7 @@ func Xvfork(tls *TLS) (r Tpid_t) { defer func() { trc("-> %v", r) }() } /* vfork syscall cannot be made from C code */ - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_fork))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_fork))))) } func Xwait(tls *TLS, status uintptr) (r Tpid_t) { @@ -128384,7 +128382,7 @@ func Xwaitid(tls *TLS, type1 Tidtype_t, id Tid_t, info uintptr, options int32) ( trc("tls=%v type1=%v id=%v info=%v options=%v, (%v:)", tls, type1, id, info, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), int64(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), Int64FromUint32(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) } func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { @@ -128392,7 +128390,7 @@ func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { trc("tls=%v pid=%v status=%v options=%v, (%v:)", tls, pid, status, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) } const BRACKET = -3 @@ -128425,11 +128423,11 @@ func _str_next(tls *TLS, str uintptr, n Tsize_t, step uintptr) (r int32) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) return -int32(1) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k) return *(*Twchar_t)(unsafe.Pointer(bp)) } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) - return int32(*(*uint8)(unsafe.Pointer(str))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) } func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r int32) { @@ -128445,35 +128443,35 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i return END } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(2) pat++ esc = int32(1) goto escaped } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { k = uint64(1) if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { k++ } } if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { k++ } } for { - if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { break } - if k+uint64(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1)))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('=')) { - z = int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) + if k+uint64(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('=')) { + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) k += uint64(2) if k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 { k++ } - for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint64(1))))) != z || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint64(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { k++ } if k == m || !(*(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0) { @@ -128492,10 +128490,10 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i *(*Tsize_t)(unsafe.Pointer(step)) = k + uint64(1) return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { return -int32(5) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { return -int32(4) } goto escaped @@ -128507,23 +128505,23 @@ escaped: *(*Tsize_t)(unsafe.Pointer(step)) = uint64(0) return -int32(2) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k1 + esc) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k1 + esc) return *(*Twchar_t)(unsafe.Pointer(bp)) } - return int32(*(*uint8)(unsafe.Pointer(pat))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) } func _casefold(tls *TLS, k int32) (r int32) { var c int32 var v1 uint32 _, _ = c, v1 - c = int32(Xtowupper(tls, uint32(k))) + c = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(k))) if c == k { - v1 = Xtowlower(tls, uint32(k)) + v1 = Xtowlower(tls, Uint32FromInt32(k)) } else { - v1 = uint32(c) + v1 = Uint32FromInt32(c) } - return int32(v1) + return Int32FromUint32(v1) } func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { @@ -128537,59 +128535,59 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { _, _, _, _, _ = inv, l, l1, p0, z inv = 0 p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(p))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('!') { inv = int32(1) p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { if k == int32(']') { return BoolInt32(!(inv != 0)) } p++ } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { if k == int32('-') { return BoolInt32(!(inv != 0)) } p++ } } - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { l = Xmbtowc(tls, bp+4, p+uintptr(1), uint64(4)) if l < 0 { return 0 } if *(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4)) { - if uint32(k)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || uint32(kfold)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { + if Uint32FromInt32(k)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || Uint32FromInt32(kfold)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { return BoolInt32(!(inv != 0)) } } p += uintptr(l - int32(1)) goto _1 } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { p0 = p + uintptr(2) - z = int32(*(*uint8)(unsafe.Pointer(p + 1))) + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) p += uintptr(3) - for int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || int32(*(*uint8)(unsafe.Pointer(p))) != int32(']') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']') { p++ } if z == int32(':') && int64(p-uintptr(1))-int64(p0) < int64(16) { - Xmemcpy(tls, bp+8, p0, uint64(int64(p-uintptr(1))-int64(p0))) + Xmemcpy(tls, bp+8, p0, Uint64FromInt64(int64(p-uintptr(1))-int64(p0))) (*(*[16]uint8)(unsafe.Pointer(bp + 8)))[int64(p-uintptr(1))-int64(p0)] = uint8(0) - if Xiswctype(tls, uint32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, uint32(kfold), Xwctype(tls, bp+8)) != 0 { + if Xiswctype(tls, Uint32FromInt32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, Uint32FromInt32(kfold), Xwctype(tls, bp+8)) != 0 { return BoolInt32(!(inv != 0)) } } goto _1 } if uint32(*(*uint8)(unsafe.Pointer(p))) < uint32(128) { - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(*(*uint8)(unsafe.Pointer(p))) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) } else { l1 = Xmbtowc(tls, bp, p, uint64(4)) if l1 < 0 { @@ -128620,7 +128618,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, endpat, endstr, k, kfold, p, ptail, s, stail, tailcnt, v10, v12, v13, v15, v2, v3, v4, v6, v8, v9 tailcnt = uint64(0) if flags&int32(FNM_PERIOD) != 0 { - if int32(*(*uint8)(unsafe.Pointer(str))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { return int32(FNM_NOMATCH) } } @@ -128679,7 +128677,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(p < endpat) { break } - switch _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) { + switch _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) { case -int32(2): return int32(FNM_NOMATCH) case -int32(5): @@ -128740,9 +128738,9 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, /* Check that the pat and str tails match */ p = ptail for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) - v12 = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + v12 = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) k = v12 if v12 <= 0 { if c != END { @@ -128777,7 +128775,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, p = pat s = str for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) /* Encountering * completes/commits a component */ if c == -int32(5) { @@ -128785,7 +128783,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, str = s break } - k = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + k = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) if !(k != 0) { return int32(FNM_NOMATCH) } @@ -128813,13 +128811,13 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, } /* If we failed, advance str, by 1 char if it's a valid * char, or past all invalid bytes otherwise. */ - k = _str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) + k = _str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) if k > 0 { str += uintptr(*(*Tsize_t)(unsafe.Pointer(bp + 8))) } else { str++ for { - if !(_str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) < 0) { + if !(_str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) < 0) { break } goto _16 @@ -128847,7 +128845,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { for { s = str for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { break } goto _2 @@ -128857,7 +128855,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } p = pat for { - v4 = _pat_next(tls, p, uint64(-Int32FromInt32(1)), bp, flags) + v4 = _pat_next(tls, p, Uint64FromInt32(-Int32FromInt32(1)), bp, flags) c = v4 if !(v4 != END && c != int32('/')) { break @@ -128867,10 +128865,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { ; p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) } - if c != int32(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { return int32(FNM_NOMATCH) } - if _fnmatch_internal(tls, pat, uint64(int64(p)-int64(pat)), str, uint64(int64(s)-int64(str)), flags) != 0 { + if _fnmatch_internal(tls, pat, Uint64FromInt64(int64(p)-int64(pat)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0 { return int32(FNM_NOMATCH) } if !(c != 0) { @@ -128888,10 +128886,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if !(*(*uint8)(unsafe.Pointer(s)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/') { goto _5 } - if !(_fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(int64(s)-int64(str)), flags) != 0) { + if !(_fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0) { return 0 } goto _5 @@ -128901,7 +128899,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } } } - return _fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(-Int32FromInt32(1)), flags) + return _fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt32(-Int32FromInt32(1)), flags) } const GLOB_ABORTED = 2 @@ -128941,7 +128939,7 @@ func _append(tls *TLS, tail uintptr, name uintptr, len1 Tsize_t, mark int32) (r (*Tmatch)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tail)))).Fnext = new1 (*Tmatch)(unsafe.Pointer(new1)).Fnext = UintptrFromInt32(0) Xmemcpy(tls, new1+8, name, len1+uint64(1)) - if mark != 0 && len1 != 0 && int32(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint64(1))))) != int32('/') { + if mark != 0 && len1 != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint64(1))))) != int32('/') { *(*uint8)(unsafe.Pointer(new1 + 8 + uintptr(len1))) = uint8('/') *(*uint8)(unsafe.Pointer(new1 + 8 + uintptr(len1+uint64(1)))) = uint8(0) } @@ -128968,7 +128966,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if *(*uint8)(unsafe.Pointer(pat)) != 0 && type1 != int32(DT_DIR) { type1 = 0 } - for pos+uint64(1) < uint64(PATH_MAX) && int32(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { + for pos+uint64(1) < uint64(PATH_MAX) && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { v1 = pos pos++ v2 = pat @@ -128982,7 +128980,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag in_bracket = 0 overflow = 0 for { - if !(int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { break } if !(*(*uint8)(unsafe.Pointer(pat + uintptr(i))) != 0) { @@ -128990,20 +128988,20 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag return 0 } pat += uintptr(i) - pos += uint64(j) + pos += Uint64FromInt64(j) v4 = Int64FromInt32(0) j = v4 i = v4 break } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { in_bracket = int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { /* Backslashes inside a bracket are (at least by * our interpretation) non-special, so if next * char is ']' we have a complete expression. */ - if in_bracket != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int64(1))))) == int32(']') { + if in_bracket != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int64(1))))) == int32(']') { break } /* Unpaired final backslash never matches. */ @@ -129014,14 +129012,14 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } } } - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { if overflow != 0 { return 0 } in_bracket = 0 pat += uintptr(i + int64(1)) i = int64(-int32(1)) - pos += uint64(j + int64(1)) + pos += Uint64FromInt64(j + int64(1)) j = int64(-int32(1)) } /* Only store a character if it fits in the buffer, but if @@ -129029,10 +129027,10 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag * must be remembered and handled later only if the bracket * is unterminated (and thereby a literal), so as not to * disallow long bracket expressions with short matches. */ - if pos+uint64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { + if pos+Uint64FromInt64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { v5 = j j++ - *(*uint8)(unsafe.Pointer(buf + uintptr(pos+uint64(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) + *(*uint8)(unsafe.Pointer(buf + uintptr(pos+Uint64FromInt64(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) } else { if in_bracket != 0 { overflow = int32(1) @@ -129075,7 +129073,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if p2 != 0 && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { p = p2 for { - if !(p > pat && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { + if !(p > pat && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { break } goto _6 @@ -129109,7 +129107,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag break } /* Quickly skip non-directories when there's pattern left. */ - if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { + if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { continue } l = Xstrlen(tls, de+19) @@ -129135,7 +129133,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } /* With GLOB_PERIOD, don't allow matching . or .. unless * fnmatch would match them with FNM_PERIOD rules in effect. */ - if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { + if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { continue } Xmemcpy(tls, buf+uintptr(pos), de+19, l+uint64(1)) @@ -129147,7 +129145,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } else { v11 = __ccgo_ts } - r = _do_glob(tls, buf, pos+l, int32((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) + r = _do_glob(tls, buf, pos+l, Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) if r != 0 { Xclosedir(tls, dir) return r @@ -129249,7 +129247,7 @@ func _expand_tilde(tls *TLS, pat uintptr, buf uintptr, pos uintptr) (r int32) { ; home = (*(*Tpasswd)(unsafe.Pointer(bp))).Fpw_dir } - for i < uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { + for i < Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { v10 = i i++ v11 = home @@ -129314,7 +129312,7 @@ func Xglob(tls *TLS, pat uintptr, flags int32, errfunc uintptr, g uintptr) (r in (*(*[4096]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) *(*Tsize_t)(unsafe.Pointer(bp + 4112)) = uint64(0) *(*uintptr)(unsafe.Pointer(bp + 4120)) = p - if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && int32(*(*uint8)(unsafe.Pointer(p))) == int32('~') { + if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('~') { error1 = _expand_tilde(tls, bp+4120, bp+16, bp+4112) } if !(error1 != 0) { @@ -129712,7 +129710,7 @@ func _tre_ast_new_iter(tls *TLS, mem Ttre_mem_t, arg uintptr, min int32, max int (*Ttre_iteration_t)(unsafe.Pointer(iter)).Farg = arg (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmin = min (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmax = max - SetBitFieldPtr8Uint32(iter+16, uint32(minimal), 0, 0x1) + SetBitFieldPtr8Uint32(iter+16, Uint32FromInt32(minimal), 0, 0x1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnum_submatches = (*Ttre_ast_node_t)(unsafe.Pointer(arg)).Fnum_submatches return node } @@ -129781,7 +129779,7 @@ func _tre_stack_new(tls *TLS, size int32, max_size int32, increment int32) (r ui _ = s s = Xmalloc(tls, uint64(24)) if s != UintptrFromInt32(0) { - (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*uint64(size)) + (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*Uint64FromInt32(size)) if (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack == UintptrFromInt32(0) { Xfree(tls, s) return UintptrFromInt32(0) @@ -129818,7 +129816,7 @@ func _tre_stack_push(tls *TLS, s uintptr, value Ttre_stack_item) (r Treg_errcode if new_size > (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size { new_size = (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size } - new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*uint64(new_size)) + new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*Uint64FromInt32(new_size)) if new_buffer == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -129952,7 +129950,7 @@ func _tre_expand_macro(tls *TLS, s uintptr) (r uintptr) { _ = i i = 0 for { - if !(_tre_macros[i].Fc != 0 && int32(_tre_macros[i].Fc) != int32(*(*uint8)(unsafe.Pointer(s)))) { + if !(_tre_macros[i].Fc != 0 && Int32FromUint8(_tre_macros[i].Fc) != Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) { break } goto _1 @@ -129988,7 +129986,7 @@ func _tre_new_lit(tls *TLS, p uintptr) (r uintptr) { return uintptr(0) } *(*int32)(unsafe.Pointer(p + 20)) *= int32(2) - a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, uint64((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) + a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, Uint64FromInt32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) if !(a != 0) { return uintptr(0) } @@ -130014,8 +130012,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { /* assumes islower(c) and isupper(c) are exclusive and toupper(c)!=c if islower(c). multiple opposite case characters are not supported */ - if Xiswlower(tls, uint32(c)) != 0 { - v2 = int32(Xtowupper(tls, uint32(c))) + if Xiswlower(tls, Uint32FromInt32(c)) != 0 { + v2 = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(c))) e = v2 b = v2 c++ @@ -130024,7 +130022,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowupper(tls, uint32(c)) != uint32(e) { + if Xtowupper(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _3 @@ -130034,8 +130032,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { e++ } } else { - if Xiswupper(tls, uint32(c)) != 0 { - v4 = int32(Xtowlower(tls, uint32(c))) + if Xiswupper(tls, Uint32FromInt32(c)) != 0 { + v4 = Int32FromUint32(Xtowlower(tls, Uint32FromInt32(c))) e = v4 b = v4 c++ @@ -130044,7 +130042,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowlower(tls, uint32(c)) != uint32(e) { + if Xtowlower(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _5 @@ -130111,7 +130109,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint start = s for { class = uint64(0) - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 <= 0 { if *(*uint8)(unsafe.Pointer(s)) != 0 { v2 = int32(REG_BADPAT) @@ -130120,26 +130118,26 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint } return v2 } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fs = s + uintptr(1) return REG_OK } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { return int32(REG_ERANGE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { /* collating symbols and equivalence classes are not supported */ return int32(REG_ECOLLATE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { s += uintptr(2) len1 = 0 for { if !(len1 < int32(CHARCLASS_NAME_MAX) && *(*uint8)(unsafe.Pointer(s + uintptr(len1))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { - Xmemcpy(tls, bp+4, s, uint64(len1)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { + Xmemcpy(tls, bp+4, s, Uint64FromInt32(len1)) (*(*[15]uint8)(unsafe.Pointer(bp + 4)))[len1] = uint8(0) class = Xwctype(tls, bp+4) break @@ -130149,7 +130147,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint ; len1++ } - if !(class != 0) || int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { + if !(class != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { return int32(REG_ECTYPE) } min = 0 @@ -130160,9 +130158,9 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint max = v4 min = v4 s += uintptr(len1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { s++ - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) max = *(*Twchar_t)(unsafe.Pointer(bp)) /* XXX - Should use collation order instead of encoding values in character ranges. */ @@ -130222,12 +130220,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*(*Tliterals)(unsafe.Pointer(bp))).Fmem = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem (*(*Tliterals)(unsafe.Pointer(bp))).Flen1 = 0 (*(*Tliterals)(unsafe.Pointer(bp))).Fcap1 = int32(32) - (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) + (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) if !((*(*Tliterals)(unsafe.Pointer(bp))).Fa != 0) { return int32(REG_ESPACE) } (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 = 0 - (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate = BoolInt32(int32(*(*uint8)(unsafe.Pointer(s))) == int32('^')) + (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('^')) if (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate != 0 { s++ } @@ -130251,7 +130249,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) } /* Sort the array if we need to negate it. */ - Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) + Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) /* extra lit for the last negated range */ lit = _tre_new_lit(tls, bp) if !(lit != 0) { @@ -130263,12 +130261,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) /* negated classes */ if (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 != 0 { - nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) + nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) if !(nc != 0) { err = int32(REG_ESPACE) goto parse_bracket_done } - Xmemcpy(tls, nc, bp+24+8, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) + Xmemcpy(tls, nc, bp+24+8, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) *(*Ttre_ctype_t)(unsafe.Pointer(nc + uintptr((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*8)) = uint64(0) } } @@ -130329,7 +130327,7 @@ func _parse_dup_count(tls *TLS, s uintptr, n uintptr) (r uintptr) { } *(*int32)(unsafe.Pointer(n)) = 0 for { - *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (int32(*(*uint8)(unsafe.Pointer(s))) - int32('0')) + *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0')) s++ if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { break @@ -130349,7 +130347,7 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u var _ /* min at bp+0 */ int32 _, _, _, _, _ = v1, v2, v3, v4, v5 s = _parse_dup_count(tls, s, bp) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(',') { s = _parse_dup_count(tls, s+uintptr(1), bp+4) } else { *(*int32)(unsafe.Pointer(bp + 4)) = *(*int32)(unsafe.Pointer(bp)) @@ -130360,11 +130358,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u s++ } } - if v5 = v3 || v2 && int32(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { + if v5 = v3 || v2 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { v4 = s s++ } - if v5 || int32(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { + if v5 || Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { return uintptr(0) } *(*int32)(unsafe.Pointer(pmin)) = *(*int32)(unsafe.Pointer(bp)) @@ -130374,11 +130372,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u func _hexval1(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -130431,7 +130429,7 @@ func _parse_atom(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { var _ /* wc at bp+0 */ Twchar_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, ere, err, i, len1, node, p, tmp1, tmp11, tmp2, tmp21, v, val, v14, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26 ere = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags & int32(REG_EXTENDED) - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('['): goto _1 case int32('\\'): @@ -130473,7 +130471,7 @@ _2: /* extensions: \b, \B, \<, \>, \xHH \x{HHHH} */ s++ v14 = s - switch int32(*(*uint8)(unsafe.Pointer(v14))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v14))) { case 0: return int32(REG_EESCAPE) case int32('b'): @@ -130488,7 +130486,7 @@ _2: s++ v = 0 len1 = int32(2) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { len1 = int32(8) s++ } @@ -130509,7 +130507,7 @@ _2: } s += uintptr(i) if len1 == int32(8) { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('}') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('}') { return int32(REG_EBRACE) } s++ @@ -130542,7 +130540,7 @@ _2: default: if !(ere != 0) && uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { /* back reference */ - val = int32(*(*uint8)(unsafe.Pointer(s))) - int32('0') + val = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0') v19 = ctx + 44 v18 = *(*int32)(unsafe.Pointer(v19)) *(*int32)(unsafe.Pointer(v19))++ @@ -130597,7 +130595,7 @@ _4: _5: ; /* '$' is special everywhere in EREs, and at the end of a BRE subexpression. */ - if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { + if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { goto parse_literal } node = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(2), int32(ASSERT_AT_EOL), -int32(1)) @@ -130629,14 +130627,14 @@ _12: goto parse_literal parse_literal: ; - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 < 0 { return int32(REG_BADPAT) } - if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { + if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { /* multiple opposite case characters are not supported */ - tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) - tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) if tmp11 != 0 && tmp21 != 0 { node = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, tmp11, tmp21) } else { @@ -130685,7 +130683,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { return err } for { - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { v4 = _tre_stack_push_voidptr(tls, stack, nunion) err = v4 if v4 != REG_OK { @@ -130714,7 +130712,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s goto _3 } - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(1), -int32(1), -int32(1)) if !((*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn != 0) { return int32(REG_ESPACE) @@ -130730,33 +130728,33 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { parse_iter: ; for { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('*') { if !(ere != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('{') { break } } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { break } /* extension: treat \+, \? as repetitions in BRE */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { s++ } /* handle ^* at the start of a BRE. */ - if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && int32(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { + if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { break } /* extension: multiple consecutive *+?{,} is unspecified, but (a+)+ has to be supported so accepting a++ makes sense, note however that the RE_DUP_MAX limit can be circumvented: (a{255}){255} uses a lot of memory.. */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { s = _parse_dup(tls, s+uintptr(1), ere, bp, bp+4) if !(s != 0) { return int32(REG_BADBR) @@ -130764,10 +130762,10 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { } else { *(*int32)(unsafe.Pointer(bp)) = 0 *(*int32)(unsafe.Pointer(bp + 4)) = -int32(1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { *(*int32)(unsafe.Pointer(bp)) = int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('?') { *(*int32)(unsafe.Pointer(bp + 4)) = int32(1) } s++ @@ -130784,13 +130782,13 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { _9: } nbranch = _tre_ast_new_catenation(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nbranch, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn) - if ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { + if ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { /* extension: empty branch is unspecified (), (|a), (a|) here they are not rejected but match on empty string */ - c = int32(*(*uint8)(unsafe.Pointer(s))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) nunion = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nunion, nbranch) nbranch = uintptr(0) - if c == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { + if c == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { s += uintptr(2) (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s } else { @@ -131098,7 +131096,7 @@ func _tre_add_tags(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr, tnfa u } (*(*Ttre_submatch_data_t)(unsafe.Pointer((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fsubmatch_data + uintptr(id1)*16))).Fparents = UintptrFromInt32(0) if i2 > 0 { - p = Xmalloc(tls, uint64(4)*uint64(i2+Int32FromInt32(1))) + p = Xmalloc(tls, uint64(4)*Uint64FromInt32(i2+Int32FromInt32(1))) if p == UintptrFromInt32(0) { status = int32(REG_ESPACE) goto _10 @@ -132002,7 +132000,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; s2++ } - new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*uint64(s1+s2+Int32FromInt32(1))) + new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*Uint64FromInt32(s1+s2+Int32FromInt32(1))) if !(new_set != 0) { return UintptrFromInt32(0) } @@ -132031,7 +132029,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*uint64(i+num_tags+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*Uint64FromInt32(i+num_tags+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -132091,7 +132089,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*uint64(i+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*Uint64FromInt32(i+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -132409,7 +132407,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -132440,7 +132438,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -132498,8 +132496,8 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun } /* Use the character ranges, assertions, etc. from `p1' for the transition from `p1' to `p2'. */ - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition)*4)))*56 (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate_id = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition if (*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fclass != 0 { @@ -132530,7 +132528,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun ; i++ } - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*uint64(i+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*Uint64FromInt32(i+Int32FromInt32(1))) if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -132569,7 +132567,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = UintptrFromInt32(0) /* If there were any tags, allocate an array and fill it. */ if i+j > 0 { - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*uint64(i+j+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(i+j+Int32FromInt32(1))) if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags != 0) { return int32(REG_ESPACE) } @@ -132723,10 +132721,10 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) + (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) tree = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fn /* Referring to nonexistent subexpressions is illegal. */ - if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > int32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { + if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > Int32FromUint64((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { errcode = int32(REG_ESUBREG) if int32(1) != 0 { goto error_exit @@ -132742,7 +132740,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs = BoolInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref >= 0) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_approx = 0 - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) /* Set up tags for submatch addressing. If REG_NOSUB is set and the regexp does not have back references, this can be skipped. */ if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs != 0 || !(cflags&Int32FromInt32(REG_NOSUB) != 0) { @@ -132755,7 +132753,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 { - tag_directions = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + tag_directions = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) if tag_directions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132763,16 +132761,16 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftag_directions = tag_directions - Xmemset(tls, tag_directions, -int32(1), uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + Xmemset(tls, tag_directions, -int32(1), uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) } - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - submatch_data = Xcalloc(tls, uint64(uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) + submatch_data = Xcalloc(tls, uint64(Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) if submatch_data == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132825,14 +132823,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - counts = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + counts = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if counts == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - offs = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + offs = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if offs == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132865,7 +132863,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; i++ } - transitions = Xcalloc(tls, uint64(uint32(add)+uint32(1)), uint64(56)) + transitions = Xcalloc(tls, uint64(Uint32FromInt32(add)+uint32(1)), uint64(56)) if transitions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132873,7 +132871,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftransitions = transitions - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) errcode = _tre_ast_to_tnfa(tls, tree, transitions, counts, offs) if errcode != REG_OK { errcode = errcode @@ -132888,7 +132886,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { i++ p += 56 } - initial = Xcalloc(tls, uint64(uint32(i)+uint32(1)), uint64(56)) + initial = Xcalloc(tls, uint64(Uint32FromInt32(i)+uint32(1)), uint64(56)) if initial == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132918,14 +132916,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; j++ } - (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*uint64(j+Int32FromInt32(1))) + (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) if !((*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags != 0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*uint64(j+Int32FromInt32(1))) + Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fassertions = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Fassertions i++ @@ -132935,7 +132933,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { p += 56 } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fstate = UintptrFromInt32(0) - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ffinal = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*(*Ttre_pos_and_tags_t)(unsafe.Pointer((*Ttre_ast_node_t)(unsafe.Pointer(tree)).Flastpos))).Fposition)*4)))*56 (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags = cflags @@ -133072,7 +133070,7 @@ func Xregerror(tls *TLS, e int32, preg uintptr, buf uintptr, size Tsize_t) (r Ts s++ } s = X__lctrans_cur(tls, s) - return uint64(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) + return Uint64FromInt32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) } const tre_bt_mem_alloc = 0 @@ -133193,23 +133191,23 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags everything in a single large block with calloc(). */ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ - if uint64(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { + if Uint64FromInt32(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { return int32(REG_ESPACE) } /* Likewise check rbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Likewise check pbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Compute the length of the block we need. */ - tbytes = uint64(8) * uint64(num_tags) - rbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) - pbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) - xbytes = uint64(8) * uint64(num_tags) - total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes + tbytes = uint64(8) * Uint64FromInt32(num_tags) + rbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) + pbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) + xbytes = uint64(8) * Uint64FromInt32(num_tags) + total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes /* Allocate the memory. */ buf = Xcalloc(tls, total_bytes, uint64(1)) if buf == UintptrFromInt32(0) { @@ -133218,32 +133216,32 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = buf tmp_buf = buf + uintptr(tbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v1 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v1 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v1 = uint64(0) } tmp_buf += uintptr(v1) reach_next = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v2 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v2 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v2 = uint64(0) } tmp_buf += uintptr(v2) reach = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v3 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v3 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v3 = uint64(0) } tmp_buf += uintptr(v3) reach_pos = tmp_buf tmp_buf += uintptr(pbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v4 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v4 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v4 = uint64(0) } @@ -133294,7 +133292,7 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags trans_i = (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Finitial for (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != UintptrFromInt32(0) { if (*(*Ttre_reach_pos_t)(unsafe.Pointer(reach_pos + uintptr((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id)*16))).Fpos < pos { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { trans_i += 56 continue } @@ -133433,8 +133431,8 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags break } /* Does this transition match the input symbol? */ - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _14 } /* Compute the tags after this transition. */ @@ -133618,7 +133616,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fprev = UintptrFromInt32(0) (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fnext = UintptrFromInt32(0) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags != 0 { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !(tags != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -133632,7 +133630,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states != 0 { - states_seen = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) + states_seen = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) if !(states_seen != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -133691,7 +133689,7 @@ retry: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { goto _4 } if state == UintptrFromInt32(0) { @@ -133717,7 +133715,7 @@ retry: } (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133815,11 +133813,11 @@ _9: bt = *(*int32)(unsafe.Pointer(&(*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fu)) /* Get the substring we need to match against. Remember to turn off REG_NOSUB temporarily. */ - _tre_fill_pmatch(tls, uint64(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) + _tre_fill_pmatch(tls, Uint64FromInt32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) so = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_so eo = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_eo bt_len = eo - so - result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), uint64(bt_len)) + result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), Uint64FromInt64(bt_len)) if result == 0 { /* Back reference matched. Check for infinite loop. */ if bt_len == 0 { @@ -133875,8 +133873,8 @@ _9: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _13 } if next_state == UintptrFromInt32(0) { @@ -133905,7 +133903,7 @@ _9: } (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -134132,7 +134130,7 @@ func Xregexec(tls *TLS, preg uintptr, string1 uintptr, nmatch Tsize_t, pmatch ui nmatch = uint64(0) } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 && nmatch > uint64(0) { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if tags == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -134229,7 +134227,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(TRE_MEM_BLOCK_SIZE) } else { if size*uint64(8) > uint64(TRE_MEM_BLOCK_SIZE) { - block_size = int32(size * uint64(8)) + block_size = Int32FromUint64(size * uint64(8)) } else { block_size = int32(TRE_MEM_BLOCK_SIZE) } @@ -134238,7 +134236,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) return UintptrFromInt32(0) } - (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, uint64(block_size)) + (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, Uint64FromInt32(block_size)) if (*Ttre_list_t)(unsafe.Pointer(l)).Fdata == UintptrFromInt32(0) { Xfree(tls, l) (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) @@ -134253,12 +134251,12 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl } (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fcurrent = l (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr = (*Ttre_list_t)(unsafe.Pointer(l)).Fdata - (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(block_size) + (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = Uint64FromInt32(block_size) } } /* Make sure the next pointer will be aligned. */ - if (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { - v1 = uint64(8) - (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) + if (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { + v1 = uint64(8) - (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) } else { v1 = uint64(0) } @@ -134345,8 +134343,8 @@ func _resize(tls *TLS, nel Tsize_t, htab uintptr) (r int32) { _, _, _, _, _, _, _, _ = e, i, j, newe, newsize, oldsize, oldtab, v4 oldsize = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fmask + uint64(1) oldtab = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fentries - if nel > uint64(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { - nel = uint64(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) + if nel > Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { + nel = Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) } newsize = uint64(MINSIZE) for { @@ -134789,7 +134787,7 @@ func X__tsearch_balance(tls *TLS, p uintptr) (r int32) { n = *(*uintptr)(unsafe.Pointer(p)) h0 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8))) h1 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8 + 1*8))) - if uint32(h0-h1)+uint32(1) < uint32(3) { + if Uint32FromInt32(h0-h1)+uint32(1) < uint32(3) { old = (*Tnode1)(unsafe.Pointer(n)).Fh if h0 < h1 { v1 = h1 + int32(1) @@ -134887,7 +134885,7 @@ func Xpoll(tls *TLS, fds uintptr, n Tnfds_t, timeout int32) (r int32) { trc("tls=%v fds=%v n=%v timeout=%v, (%v:)", tls, fds, n, timeout, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_poll), int64(fds), int64(n), int64(timeout), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_poll), int64(fds), Int64FromUint64(n), int64(timeout), 0, 0, 0)))) } type t__ucontext3 = Tucontext_t5 @@ -134924,7 +134922,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r int32 } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), int64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), Int64FromUint64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) } type t__ucontext4 = Tucontext_t4 @@ -134942,7 +134940,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui var _ /* data at bp+16 */ [2]Tsyscall_arg_t _, _, _, _, _ = ns, s, v1, v2, v3 *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 16)) = [2]Tsyscall_arg_t{ - 0: int64(uint64(mask)), + 0: Int64FromUint64(uint64(mask)), 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } if ts != 0 { @@ -134966,7 +134964,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) } type Tucontext_t6 = struct { @@ -135001,9 +134999,9 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin v2 = 0 } us = v2 - max_time = int64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) + max_time = Int64FromUint64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) if s < 0 || us < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if us/int64(1000000) > max_time-s { s = max_time @@ -135023,7 +135021,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS__newselect), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS__newselect), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), 0)))) } var _all_mask = [1]uint64{ @@ -135073,9 +135071,9 @@ func Xgetitimer(tls *TLS, which int32, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) } func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { @@ -135083,7 +135081,7 @@ func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { trc("tls=%v pid=%v sig=%v, (%v:)", tls, pid, sig, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) } func Xkillpg(tls *TLS, pgid Tpid_t, sig int32) (r int32) { @@ -135160,7 +135158,7 @@ func Xraise(tls *TLS, sig int32) (r int32) { var _ /* set at bp+0 */ Tsigset_t _ = ret X__block_app_sigs(tls, bp) - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) X__restore_sigs(tls, bp) return ret } @@ -135196,8 +135194,8 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { vs = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_sec ius = (*Titimerval)(unsafe.Pointer(new1)).Fit_interval.Ftv_usec vus = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_usec - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, @@ -135212,9 +135210,9 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) } type Tk_sigaction = struct { @@ -135253,8 +135251,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = old, r, r1, v, v1, v12, v13, v14, v15, v18, v19, v2, v22, v23, v24, v27, v28, v3, v31, v32, v33, v4, v5, v8, v9 if sa != 0 { if uint64(*(*uintptr)(unsafe.Pointer(sa))) > uint64(1) { - v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(uint64(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 - v2 = int64(uint64(1) << (uint64(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) + v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(Uint64FromInt32(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 + v2 = Int64FromUint64(uint64(1) << (Uint64FromInt32(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) if Uint64FromInt64(8) == Uint64FromInt64(4) { v3 = v1 // __asm__ __volatile__ ("sync" : : : "memory"); @@ -135298,7 +135296,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) Fr [0][2]Tuint32_t Fv Tuint64_t }{} - *(*uint64)(unsafe.Pointer(bp + 8)) = uint64(v2) + *(*uint64)(unsafe.Pointer(bp + 8)) = Uint64FromInt64(v2) if *(*Tuint32_t)(unsafe.Pointer(bp + 8)) != 0 { v13 = v12 // __asm__ __volatile__ ("sync" : : : "memory"); @@ -135385,7 +135383,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) X__syscall4(tls, int64(SYS_rt_sigprocmask), int64(Int32FromInt32(SIG_UNBLOCK)), int64(bp), int64(Int32FromInt32(0)), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) _unmask_done = int32(1) } - if !(uint32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags)&Uint32FromUint32(0x10000000) != 0) { + if !(Uint32FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags)&Uint32FromUint32(0x10000000) != 0) { // __asm__ __volatile__ ("sync" : : : "memory"); X__assert_fail(tls, __ccgo_ts+212, __ccgo_ts+247, 40, __ccgo_ts+1529) AtomicStorePInt32(uintptr(unsafe.Pointer(&X__eintr_valid_flag)), int32(1)) @@ -135394,15 +135392,15 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) } } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fhandler = *(*uintptr)(unsafe.Pointer(sa)) - (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = uint64((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) + (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = Uint64FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags |= uint64(0x04000000) - if uint32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags)&uint32(4) != 0 { + if Uint32FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags)&uint32(4) != 0 { v31 = __ccgo_fp(X__restore_rt) } else { v31 = __ccgo_fp(X__restore) } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Frestorer = v31 - Xmemcpy(tls, bp+16+24, sa+8, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + Xmemcpy(tls, bp+16+24, sa+8, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } if sa != 0 { v32 = bp + 16 @@ -135417,10 +135415,10 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r2 int32) r1 = int32(X__syscall4(tls, int64(SYS_rt_sigaction), int64(sig), int64(v32), int64(v33), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if old1 != 0 && !(r1 != 0) { *(*uintptr)(unsafe.Pointer(old1)) = (*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fhandler - (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = int32((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) - Xmemcpy(tls, old1+8, bp+48+24, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = Int32FromUint64((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) + Xmemcpy(tls, old1+8, bp+48+24, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { @@ -135433,7 +135431,7 @@ func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { var r int32 var _ /* set at bp+0 */ [1]uint64 _ = r - if uint32(sig)-uint32(32) < uint32(3) || uint32(sig)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(sig)-uint32(32) < uint32(3) || Uint32FromInt32(sig)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135467,8 +135465,8 @@ func Xsigaddset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135491,7 +135489,7 @@ func Xsigaltstack(tls *TLS, ss uintptr, old uintptr) (r int32) { return -int32(1) } } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) } const SST_SIZE = 8 @@ -135517,7 +135515,7 @@ func Xsigandset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) & *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -135536,8 +135534,8 @@ func Xsigdelset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135591,7 +135589,7 @@ func Xsigisemptyset(tls *TLS, set uintptr) (r int32) { _ = i i = uint64(0) for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } if *(*uint64)(unsafe.Pointer(set + uintptr(i)*8)) != 0 { @@ -135612,8 +135610,8 @@ func Xsigismember(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { return 0 } return BoolInt32(!!(*(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8))&(Uint64FromUint64(1)<<(uint64(s)&(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)))) != 0)) @@ -135632,7 +135630,7 @@ func Xsigorset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) { l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) | *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -135649,7 +135647,7 @@ func Xsigpending(tls *TLS, set uintptr) (r int32) { trc("tls=%v set=%v, (%v:)", tls, set, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) } func Xsigprocmask(tls *TLS, how int32, set uintptr, old uintptr) (r1 int32) { @@ -135685,7 +135683,7 @@ func Xsigqueue(tls *TLS, pid Tpid_t, sig int32, value Tsigval) (r1 int32) { *(*Tuid_t)(unsafe.Pointer(bp + 16 + 4)) = Xgetuid(tls) X__block_app_sigs(tls, bp+128) *(*Tpid_t)(unsafe.Pointer(bp + 16)) = Xgetpid(tls) - r = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) X__restore_sigs(tls, bp+128) return r } @@ -135711,7 +135709,7 @@ func Xsigsuspend(tls *TLS, mask uintptr) (r int32) { trc("tls=%v mask=%v, (%v:)", tls, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) } func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r int32) { @@ -135728,7 +135726,7 @@ func Xsigtimedwait(tls *TLS, mask uintptr, si uintptr, timeout uintptr) (r int32 for cond := true; cond; cond = ret == -int32(EINTR) { ret = _do_sigtimedwait(tls, mask, si, timeout) } - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsigwait(tls *TLS, mask uintptr, sig uintptr) (r int32) { @@ -135807,7 +135805,7 @@ func Xchmod(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_chmod), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_chmod), int64(path), Int64FromUint32(mode))))) } func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { @@ -135820,12 +135818,12 @@ func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), int64(mode))) + ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), Int64FromUint32(mode))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_chmod), int64(bp), int64(mode))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_chmod), int64(bp), Int64FromUint32(mode))))) } func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r int32) { @@ -135840,36 +135838,36 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in var _ /* st at bp+0 */ Tstat _, _, _ = fd2, ret, v1 if !(flag != 0) { - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), Int64FromUint32(mode))))) } - ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), int64(mode), int64(flag))) + ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), Int64FromUint32(mode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag != int32(AT_SYMLINK_NOFOLLOW) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if Xfstatat(tls, fd, path, bp, flag) != 0 { return -int32(1) } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } v1 = int32(X__syscall3(tls, int64(SYS_openat), int64(fd), int64(path), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_PATH)|Int32FromInt32(O_NOFOLLOW)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC)))) fd2 = v1 if v1 < 0 { if fd2 == -int32(ELOOP) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } - return int32(X__syscall_ret(tls, uint64(fd2))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd2))) } - X__procfdname(tls, bp+144, uint32(fd2)) + X__procfdname(tls, bp+144, Uint32FromInt32(fd2)) ret = Xstat(tls, bp+144, bp) if !(ret != 0) { if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - ret = int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + ret = int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } else { - ret = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+144), int64(mode))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+144), Int64FromUint32(mode))))) } } X__syscall1(tls, int64(SYS_close), int64(fd2)) @@ -135882,7 +135880,7 @@ func X__fstat(tls *TLS, fd int32, st uintptr) (r int32) { defer func() { trc("-> %v", r) }() } if fd < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EBADF)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EBADF)))) } return X__fstatat(tls, fd, __ccgo_ts, st, int32(AT_EMPTY_PATH)) } @@ -135954,20 +135952,20 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r Fst_uid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_uid, Fst_gid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_gid, Fst_rdev: uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<= 0 { ret = int32(X__syscall4(tls, int64(SYS_newfstatat), int64(fd), int64(path), int64(bp), int64(flag))) if ret == -int32(EINVAL) { - X__procfdname(tls, bp+144, uint32(fd)) + X__procfdname(tls, bp+144, Uint32FromInt32(fd)) ret = int32(X__syscall2(tls, int64(SYS_stat), int64(bp+144), int64(bp))) } } } else { - if (fd == -int32(100) || int32(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && flag == int32(AT_SYMLINK_NOFOLLOW) { + if (fd == -int32(100) || Int32FromUint8(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && flag == int32(AT_SYMLINK_NOFOLLOW) { ret = int32(X__syscall2(tls, int64(SYS_lstat), int64(path), int64(bp))) } else { - if (fd == -int32(100) || int32(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && !(flag != 0) { + if (fd == -int32(100) || Int32FromUint8(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && !(flag != 0) { ret = int32(X__syscall2(tls, int64(SYS_stat), int64(path), int64(bp))) } else { ret = int32(X__syscall4(tls, int64(SYS_newfstatat), int64(fd), int64(path), int64(bp), int64(flag))) @@ -136060,11 +136058,11 @@ func X__fstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int if uint64(8) < uint64(8) { ret = _fstatat_statx(tls, fd, path, st, flag) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } ret = _fstatat_kstat(tls, fd, path, st, flag) - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xfstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int32) { @@ -136100,8 +136098,8 @@ func X__futimesat(tls *TLS, dirfd int32, pathname uintptr, times uintptr) (r int if !(i < int32(2)) { break } - if uint64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_sec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_nsec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec * int64(1000) @@ -136148,7 +136146,7 @@ func Xmkdir(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_mkdir), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_mkdir), int64(path), Int64FromUint32(mode))))) } func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { @@ -136156,7 +136154,7 @@ func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v fd=%v path=%v mode=%v, (%v:)", tls, fd, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), Int64FromUint32(mode))))) } func Xmkfifo(tls *TLS, path uintptr, mode Tmode_t) (r int32) { @@ -136180,7 +136178,7 @@ func Xmknod(tls *TLS, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { trc("tls=%v path=%v mode=%v dev=%v, (%v:)", tls, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mknod), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mknod), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { @@ -136188,7 +136186,7 @@ func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int trc("tls=%v fd=%v path=%v mode=%v dev=%v, (%v:)", tls, fd, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { @@ -136201,7 +136199,7 @@ func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { func ___statfs(tls *TLS, path uintptr, buf uintptr) (r int32) { *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_statfs64), int64(path), int64(Uint64FromInt64(120)), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_statfs64), int64(path), Int64FromUint64(Uint64FromInt64(120)), int64(buf))))) } func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { @@ -136210,7 +136208,7 @@ func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { defer func() { trc("-> %v", r) }() } *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fstatfs64), int64(fd), int64(Uint64FromInt64(120)), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fstatfs64), int64(fd), Int64FromUint64(Uint64FromInt64(120)), int64(buf))))) } func _fixup(tls *TLS, out uintptr, in uintptr) { @@ -136230,7 +136228,7 @@ func _fixup(tls *TLS, out uintptr, in uintptr) { (*Tstatvfs)(unsafe.Pointer(out)).Ff_files = (*Tstatfs)(unsafe.Pointer(in)).Ff_files (*Tstatvfs)(unsafe.Pointer(out)).Ff_ffree = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree (*Tstatvfs)(unsafe.Pointer(out)).Ff_favail = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree - (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = uint64(*(*int32)(unsafe.Pointer(in + 56))) + (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = Uint64FromInt32(*(*int32)(unsafe.Pointer(in + 56))) (*Tstatvfs)(unsafe.Pointer(out)).Ff_flag = (*Tstatfs)(unsafe.Pointer(in)).Ff_flags (*Tstatvfs)(unsafe.Pointer(out)).Ff_namemax = (*Tstatfs)(unsafe.Pointer(in)).Ff_namelen (*Tstatvfs)(unsafe.Pointer(out)).Ff_type = uint32((*Tstatfs)(unsafe.Pointer(in)).Ff_type) @@ -136271,7 +136269,7 @@ func Xumask(tls *TLS, mode Tmode_t) (r Tmode_t) { trc("tls=%v mode=%v, (%v:)", tls, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_umask), int64(mode))))) + return Uint32FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_umask), Int64FromUint32(mode))))) } func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r1 int32) { @@ -136290,7 +136288,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = int32(X__syscall4(tls, int64(SYS_utimensat), int64(fd), int64(path), int64(times), int64(flags))) if r != -int32(ENOSYS) || flags != 0 { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } tv = uintptr(0) if times != 0 { @@ -136300,11 +136298,11 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r if !(i < int32(2)) { break } - if uint64((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { + if Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { if (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int64(UTIME_NOW) || (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int64(UTIME_OMIT) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOSYS)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOSYS)))) } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)*i+0] = (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)*i+int32(1)] = (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec / int64(1000) @@ -136316,10 +136314,10 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = int32(X__syscall3(tls, int64(SYS_futimesat), int64(fd), int64(path), int64(tv))) if r != -int32(ENOSYS) || fd != -int32(100) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } r = int32(X__syscall2(tls, int64(SYS_utimes), int64(path), int64(tv))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__fclose_ca(tls *TLS, f uintptr) (r int32) { @@ -136342,7 +136340,7 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { var _ /* wsz at bp+0 */ Twinsize _, _, _, _ = f, flags, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1546, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1546, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -136356,19 +136354,19 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { Xmemset(tls, f, 0, uint64(232)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(v2) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(v2) } /* Apply close-on-exec flag */ if Xstrchr(tls, mode, int32('e')) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } /* Set append mode on fd if opened for append */ - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { flags = int32(X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFL)))) if !(flags&Int32FromInt32(O_APPEND) != 0) { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFL)), int64(flags|Int32FromInt32(O_APPEND))) @@ -136380,7 +136378,7 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { (*TFILE)(unsafe.Pointer(f)).Fbuf_size = uint64(BUFSIZ) /* Activate line buffered mode for terminals */ (*TFILE)(unsafe.Pointer(f)).Flbf = -int32(1) - if !((*TFILE)(unsafe.Pointer(f)).Fflags&Uint32FromInt32(F_NOWR) != 0) && !(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(uint64(Uint32FromUint32(2)< %v", r) }() } Xmemset(tls, f, 0, uint64(232)) - (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_open), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) + (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_open), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) if (*TFILE)(unsafe.Pointer(f)).Ffd < 0 { return uintptr(0) } X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) (*TFILE)(unsafe.Pointer(f)).Fbuf = buf + uintptr(UNGET) (*TFILE)(unsafe.Pointer(f)).Fbuf_size = len1 - uint64(UNGET) (*TFILE)(unsafe.Pointer(f)).Fread = __ccgo_fp(X__stdio_read) @@ -136469,22 +136467,22 @@ func X__overflow(tls *TLS, f uintptr, _c int32) (r int32) { var v2, v3 uintptr var _ /* c at bp+0 */ uint8 _, _, _ = v1, v2, v3 - *(*uint8)(unsafe.Pointer(bp)) = uint8(_c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(_c) if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return -int32(1) } - if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && int32(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { + if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { v1 = *(*uint8)(unsafe.Pointer(bp)) v3 = f + 40 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ *(*uint8)(unsafe.Pointer(v2)) = v1 - return int32(v1) + return Int32FromUint8(v1) } if (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, bp, uint64(1)) != uint64(1) { return -int32(1) } - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } func _dummy9(tls *TLS, fd int32) (r int32) { @@ -136496,7 +136494,7 @@ func X__stdio_close(tls *TLS, f uintptr) (r int32) { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) } var _dummy_file = uintptr(0) @@ -136569,9 +136567,9 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { }, } if (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len != 0 { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) } else { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), Int64FromUint64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) } cnt = v1 if cnt <= 0 { @@ -136580,11 +136578,11 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32(F_EOF) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v2) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v2) return uint64(0) } - if uint64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { - return uint64(cnt) + if Uint64FromInt64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { + return Uint64FromInt64(cnt) } cnt = Tssize_t(uint64(cnt) - (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len) (*TFILE)(unsafe.Pointer(f)).Frpos = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -136623,7 +136621,7 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { Fiov_base: (*TFILE)(unsafe.Pointer(f)).Fwbase, - Fiov_len: uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), + Fiov_len: Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), }, 1: { Fiov_base: buf, @@ -136634,8 +136632,8 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) rem = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len + (*(*Tiovec)(unsafe.Pointer(iov + 1*16))).Fiov_len iovcnt = int32(2) for { - cnt = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) - if uint64(cnt) == rem { + cnt = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) + if Uint64FromInt64(cnt) == rem { (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v2 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fwbase = v2 @@ -136656,14 +136654,14 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) } return v5 } - rem -= uint64(cnt) - if uint64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { + rem -= Uint64FromInt64(cnt) + if Uint64FromInt64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { cnt = Tssize_t(uint64(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len) iov += 16 iovcnt-- } (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base + uintptr(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= uint64(cnt) + (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= Uint64FromInt64(cnt) goto _1 _1: } @@ -136679,7 +136677,7 @@ func X__stdout_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) defer tls.Free(16) var _ /* wsz at bp+0 */ Twinsize (*TFILE)(unsafe.Pointer(f)).Fwrite = __ccgo_fp(X__stdio_write) - if !((*TFILE)(unsafe.Pointer(f)).Fflags&Uint32FromInt32(F_SVB) != 0) && X__syscall3(tls, int64(SYS_ioctl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(uint64(Uint32FromUint32(2)< 0 { - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(l) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(l) ret = (*TFILE)(unsafe.Pointer(f)).Fgetln_buf } } @@ -137415,17 +137413,17 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { n-- for n != 0 { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v2 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v2 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v2) - if k < uint64(n) { + k = Uint64FromInt64(v2) + if k < Uint64FromInt32(n) { v3 = k } else { - v3 = uint64(n) + v3 = Uint64FromInt32(n) } k = v3 Xmemcpy(tls, p, (*TFILE)(unsafe.Pointer(f)).Frpos, k) @@ -137440,7 +137438,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -137453,11 +137451,11 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { break } n-- - v8 = uint8(c) + v8 = Uint8FromInt32(c) v9 = p p++ *(*uint8)(unsafe.Pointer(v9)) = v8 - if int32(v8) == int32('\n') { + if Int32FromUint8(v8) == int32('\n') { break } } @@ -137490,27 +137488,27 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { _, _, _, _, _, _, _ = c, first, l, v1, v2, v3, v4 /* Convert character from buffer if possible */ if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - l = uint64(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) + l = Uint64FromInt32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) if l+uint64(1) >= uint64(1) { *(*uintptr)(unsafe.Pointer(f + 8)) += uintptr(l + BoolUint64(!(l != 0))) /* l==0 means 1 byte, null */ - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } /* Convert character byte-by-byte */ *(*Tmbstate_t)(unsafe.Pointer(bp + 8)) = Tmbstate_t{} first = int32(1) - for cond := true; cond; cond = l == uint64(-Int32FromInt32(2)) { + for cond := true; cond; cond = l == Uint64FromInt32(-Int32FromInt32(2)) { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } v1 = v2 c = v1 - *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(v1) + *(*uint8)(unsafe.Pointer(bp + 16)) = Uint8FromInt32(v1) if c < 0 { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) @@ -137519,16 +137517,16 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { return uint32(0xffffffff) } l = Xmbrtowc(tls, bp, bp+16, uint64(1), bp+8) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - Xungetc(tls, int32(*(*uint8)(unsafe.Pointer(bp + 16))), f) + Xungetc(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 16))), f) } return uint32(0xffffffff) } first = 0 } - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { @@ -137546,9 +137544,9 @@ func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - wc = int32(___fgetwc_unlocked_internal(tls, f)) + wc = Int32FromUint32(___fgetwc_unlocked_internal(tls, f)) *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(wc) + return Uint32FromInt32(wc) } func Xfgetwc(tls *TLS, f uintptr) (r Twint_t) { @@ -137619,7 +137617,7 @@ func Xfgetws(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { } v4 = p p += 4 - *(*Twchar_t)(unsafe.Pointer(v4)) = int32(c) + *(*Twchar_t)(unsafe.Pointer(v4)) = Int32FromUint32(c) if c == uint32('\n') { break } @@ -137716,7 +137714,7 @@ func _mseek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -137730,13 +137728,13 @@ _1: 1: (*Tcookie)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) - if off < -base || off > int64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + if off < -base || off > Int64FromUint64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _mread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -137770,7 +137768,7 @@ func _mwrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2, rem Tsize_t _, _, _ = c, len2, rem c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _mwrite(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwpos, len2) < len2 { @@ -137814,11 +137812,11 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { var v3 Tsize_t _, _, _, _, _ = f, plus, v1, v2, v3 plus = BoolInt32(!!(Xstrchr(tls, mode, int32('+')) != 0)) - if !(Xstrchr(tls, __ccgo_ts+1546, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1546, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } - if !(buf != 0) && size > uint64(Int64FromInt64(INT64_MAX)) { + if !(buf != 0) && size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -137843,19 +137841,19 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { } (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fbuf = buf (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fsize = size - (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = int32(*(*uint8)(unsafe.Pointer(mode))) + (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) if !(plus != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = size } else { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { v3 = Xstrnlen(tls, buf, size) (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fpos = v3 (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = v3 @@ -137884,13 +137882,13 @@ func Xfopen(tls *TLS, filename uintptr, mode uintptr) (r uintptr) { var fd, flags int32 _, _, _ = f, fd, flags /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1546, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1546, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } /* Compute the flags to pass to open() */ flags = X__fmodeflags(tls, mode) - fd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) if fd < 0 { return uintptr(0) } @@ -137935,8 +137933,8 @@ func _cookieread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { if ret <= 0 { goto bail } - readlen += uint64(ret) - remain -= uint64(ret) + readlen += Uint64FromInt64(ret) + remain -= Uint64FromInt64(ret) } if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) || remain > BoolUint64(!!((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0)) { return readlen @@ -137962,7 +137960,7 @@ bail: } else { v4 = int32(F_ERR) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v4) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v4) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Frend = v5 (*TFILE)(unsafe.Pointer(f)).Frpos = v5 @@ -137975,7 +137973,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var ret Tssize_t _, _, _, _, _ = fc, len2, ret, v1, v2 fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if !((*Tfcookie)(unsafe.Pointer(fc)).Fiofuncs.Fwrite != 0) { return len1 } @@ -137995,7 +137993,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) return uint64(0) } - return uint64(ret) + return Uint64FromInt64(ret) } func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { @@ -138006,7 +138004,7 @@ func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { var res int32 _, _ = fc, res fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - if uint32(whence) > uint32(2) { + if Uint32FromInt32(whence) > uint32(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -138040,7 +138038,7 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun var v2 int32 _, _, _ = f, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1546, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1546, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -138054,12 +138052,12 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun Xmemset(tls, f, 0, uint64(232)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } /* Set up our fcookie */ (*Tcookie_FILE)(unsafe.Pointer(f)).Ffc.Fcookie = cookie @@ -138135,15 +138133,15 @@ _11: if v10 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v13 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v13 = Uint8FromInt32(c) v15 = f + 40 v14 = *(*uintptr)(unsafe.Pointer(v15)) *(*uintptr)(unsafe.Pointer(v15))++ *(*uint8)(unsafe.Pointer(v14)) = v13 - v12 = int32(v13) + v12 = Int32FromUint8(v13) } else { - v12 = X__overflow(tls, f, int32(uint8(c))) + v12 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v12 v16 = f + 140 @@ -138207,15 +138205,15 @@ func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -138264,16 +138262,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - if BoolInt32(uint32(c) < uint32(128)) != 0 { - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if BoolInt32(Uint32FromInt32(c) < uint32(128)) != 0 { + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v1 } else { @@ -138286,16 +138284,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } } else { l = Xwctomb(tls, bp, c) - if l < 0 || X__fwritex(tls, bp, uint64(l), f) < uint64(l) { + if l < 0 || X__fwritex(tls, bp, Uint64FromInt32(l), f) < Uint64FromInt32(l) { c = Int32FromUint32(0xffffffff) } } } - if uint32(c) == uint32(0xffffffff) { + if Uint32FromInt32(c) == uint32(0xffffffff) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -138311,11 +138309,11 @@ func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { v1 = 0 } __need_unlock = v1 - c = int32(X__fputwc_unlocked(tls, c, f)) + c = Int32FromUint32(X__fputwc_unlocked(tls, c, f)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -138380,7 +138378,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { ___unlockfile(tls, f) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return int32(l) /* 0 or -1 */ + return Int32FromUint64(l) /* 0 or -1 */ } func Xfputws_unlocked(tls *TLS, _ws uintptr, f uintptr) (r int32) { @@ -138416,8 +138414,8 @@ func Xfread(tls *TLS, destv uintptr, size Tsize_t, nmemb Tsize_t, f uintptr) (r *(*int32)(unsafe.Pointer(f + 136)) |= (*TFILE)(unsafe.Pointer(f)).Fmode - int32(1) if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { /* First exhaust the buffer. */ - if uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { - v2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + if Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { + v2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) } else { v2 = l } @@ -138493,7 +138491,7 @@ func Xfreopen(tls *TLS, filename uintptr, mode uintptr, f uintptr) (r uintptr) { X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } fl &= ^(Int32FromInt32(O_CREAT) | Int32FromInt32(O_EXCL) | Int32FromInt32(O_CLOEXEC)) - if X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { goto fail } } else { @@ -138591,7 +138589,7 @@ func X__fseeko_unlocked(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32) v3 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v3 (*TFILE)(unsafe.Pointer(f)).Frpos = v3 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) return 0 } @@ -138922,14 +138920,14 @@ func X__fwritex(tls *TLS, s uintptr, l Tsize_t, f uintptr) (r Tsize_t) { if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return uint64(0) } - if l > uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { + if l > Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { return (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, s, l) } if (*TFILE)(unsafe.Pointer(f)).Flbf >= 0 { /* Match /^(.*\n|)/ */ i = l for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { break } goto _1 @@ -139058,7 +139056,7 @@ _11: v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__uflow(tls, f) } @@ -139126,7 +139124,7 @@ func Xgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -139159,7 +139157,7 @@ func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -139228,7 +139226,7 @@ _11: v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__uflow(tls, f) } @@ -139296,7 +139294,7 @@ func Xgetchar(tls *TLS) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -139321,7 +139319,7 @@ func Xgetchar_unlocked(tls *TLS) (r int32) { v3 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -139360,13 +139358,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize } for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v3 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v3 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v3) + k = Uint64FromInt64(v3) } else { z = uintptr(0) k = uint64(0) @@ -139410,7 +139408,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -139431,13 +139429,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) - *(*uint8)(unsafe.Pointer(v8)) = uint8(c) + *(*uint8)(unsafe.Pointer(v8)) = Uint8FromInt32(c) } else { - v10 = uint8(c) + v10 = Uint8FromInt32(c) v11 = i i++ *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)) + uintptr(v11))) = v10 - if int32(v10) == delim { + if Int32FromUint8(v10) == delim { break } } @@ -139448,7 +139446,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize if __need_unlock != 0 { ___unlockfile(tls, f) } - return int64(i) + return Int64FromUint64(i) } func X__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t) { @@ -139488,7 +139486,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { v5 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -139499,7 +139497,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { } v6 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = Uint8FromInt32(c) } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) if c != int32('\n') && (!((*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdin_FILE)))).Fflags&Uint32FromInt32(F_EOF) != 0) || !(i != 0)) { @@ -139612,7 +139610,7 @@ func _ms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -139626,13 +139624,13 @@ _1: 1: (*Tcookie1)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie1)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > int64(0x7fffffffffffffff)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie1)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -139640,7 +139638,7 @@ func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _ms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -139746,7 +139744,7 @@ func _wms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -139760,14 +139758,14 @@ _1: 1: (*Tcookie2)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie2)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)-base { goto fail } Xmemset(tls, c+48, 0, uint64(8)) - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie2)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -139778,7 +139776,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _wms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -139787,7 +139785,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { } if len1+(*Tcookie2)(unsafe.Pointer(c)).Fpos >= (*Tcookie2)(unsafe.Pointer(c)).Fspace { len2 = uint64(2)*(*Tcookie2)(unsafe.Pointer(c)).Fspace + uint64(1) | ((*Tcookie2)(unsafe.Pointer(c)).Fpos + len1 + uint64(1)) - if len2 > uint64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { + if len2 > Uint64FromInt64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { return uint64(0) } newbuf = Xrealloc(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf, len2*uint64(4)) @@ -139801,7 +139799,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { (*Tcookie2)(unsafe.Pointer(c)).Fspace = len2 } len2 = Xmbsnrtowcs(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf+uintptr((*Tcookie2)(unsafe.Pointer(c)).Fpos)*4, bp, len1, (*Tcookie2)(unsafe.Pointer(c)).Fspace-(*Tcookie2)(unsafe.Pointer(c)).Fpos, c+48) - if len2 == uint64(-Int32FromInt32(1)) { + if len2 == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } *(*Tsize_t)(unsafe.Pointer(c + 16)) += len2 @@ -139887,7 +139885,7 @@ func Xpclose(tls *TLS, f uintptr) (r1 int32) { } } if r < 0 { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } return *(*int32)(unsafe.Pointer(bp)) } @@ -139982,15 +139980,15 @@ _11: if v10 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v13 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v13 = Uint8FromInt32(c) v15 = f + 40 v14 = *(*uintptr)(unsafe.Pointer(v15)) *(*uintptr)(unsafe.Pointer(v15))++ *(*uint8)(unsafe.Pointer(v14)) = v13 - v12 = int32(v13) + v12 = Int32FromUint8(v13) } else { - v12 = X__overflow(tls, f, int32(uint8(c))) + v12 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v12 v16 = f + 140 @@ -140054,15 +140052,15 @@ func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -140090,15 +140088,15 @@ func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -140162,15 +140160,15 @@ _11: if v10 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v13 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v13 = Uint8FromInt32(c) v15 = f + 40 v14 = *(*uintptr)(unsafe.Pointer(v15)) *(*uintptr)(unsafe.Pointer(v15))++ *(*uint8)(unsafe.Pointer(v14)) = v13 - v12 = int32(v13) + v12 = Int32FromUint8(v13) } else { - v12 = X__overflow(tls, f, int32(uint8(c))) + v12 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v12 v16 = f + 140 @@ -140234,15 +140232,15 @@ func Xputchar(tls *TLS, c1 int32) (r int32) { v2 = uintptr(unsafe.Pointer(&X__stdout_FILE)) l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -140262,15 +140260,15 @@ func Xputchar_unlocked(tls *TLS, c int32) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v2 = Uint8FromInt32(c) v4 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(c))) + v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -140292,15 +140290,15 @@ func Xputs(tls *TLS, s uintptr) (r1 int32) { } __need_unlock = v1 if v6 = Xfputs(tls, s, uintptr(unsafe.Pointer(&X__stdout_FILE))) < 0; !v6 { - if int32(uint8(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v3 = uint8(Int32FromUint8('\n')) + if Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v3 = Uint8FromInt32(Int32FromUint8('\n')) v5 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ *(*uint8)(unsafe.Pointer(v4)) = v3 - v2 = int32(v3) + v2 = Int32FromUint8(v3) } else { - v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(Int32FromUint8('\n')))) + v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n')))) } } r = -BoolInt32(v6 || v2 < 0) @@ -140318,7 +140316,7 @@ func Xputw(tls *TLS, _x int32, f uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) *(*int32)(unsafe.Pointer(bp)) = _x - return int32(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) + return Int32FromUint64(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) } func Xputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -140356,7 +140354,7 @@ func Xremove(tls *TLS, path uintptr) (r1 int32) { if r == -int32(EISDIR) { r = int32(X__syscall1(tls, int64(SYS_rmdir), int64(path))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { @@ -140364,7 +140362,7 @@ func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { trc("tls=%v old=%v new1=%v, (%v:)", tls, old, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_rename), int64(old), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_rename), int64(old), int64(new1))))) } func Xrewind(tls *TLS, f uintptr) { @@ -140380,7 +140378,7 @@ func Xrewind(tls *TLS, f uintptr) { } __need_unlock = v1 X__fseeko_unlocked(tls, f, 0, 0) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -140655,7 +140653,7 @@ func Xtmpfile(tls *TLS) (r uintptr) { break } ___randname(tls, bp+uintptr(13)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) if fd >= 0 { X__syscall1(tls, int64(SYS_unlink), int64(bp)) f = X__fdopen(tls, fd, __ccgo_ts+1625) @@ -140739,12 +140737,12 @@ func Xungetc(tls *TLS, c int32, f uintptr) (r int32) { v3 = f + 8 *(*uintptr)(unsafe.Pointer(v3))-- v2 = *(*uintptr)(unsafe.Pointer(v3)) - *(*uint8)(unsafe.Pointer(v2)) = uint8(c) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(c) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(uint8(c)) + return Int32FromUint8(Uint8FromInt32(c)) } func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { @@ -140776,7 +140774,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { X__toread(tls, f) } if v3 = !((*TFILE)(unsafe.Pointer(f)).Frpos != 0) || c == uint32(0xffffffff); !v3 { - v2 = int32(Xwcrtomb(tls, bp, int32(c), uintptr(0))) + v2 = Int32FromUint64(Xwcrtomb(tls, bp, Int32FromUint32(c), uintptr(0))) l = v2 } if v3 || v2 < 0 || (*TFILE)(unsafe.Pointer(f)).Frpos < (*TFILE)(unsafe.Pointer(f)).Fbuf-uintptr(UNGET)+uintptr(l) { @@ -140794,9 +140792,9 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { } else { p6 = f + 8 *(*uintptr)(unsafe.Pointer(p6)) -= uintptr(l) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint64(l)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, Uint64FromInt32(l)) } - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -140818,13 +140816,13 @@ func Xvasprintf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32) { l = Xvsnprintf(tls, uintptr(0), uint64(0), fmt, ap2) _ = ap2 if v2 = l < 0; !v2 { - v1 = Xmalloc(tls, uint64(uint32(l)+uint32(1))) + v1 = Xmalloc(tls, uint64(Uint32FromInt32(l)+uint32(1))) *(*uintptr)(unsafe.Pointer(s)) = v1 } if v2 || !(v1 != 0) { return -int32(1) } - return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(uint32(l)+uint32(1)), fmt, ap) + return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(Uint32FromInt32(l)+uint32(1)), fmt, ap) } func Xvdprintf(tls *TLS, fd int32, fmt uintptr, ap Tva_list) (r int32) { @@ -141004,33 +141002,33 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -141052,18 +141050,18 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { var v1 uint64 var _ /* pad at bp+0 */ [256]uint8 _ = v1 - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { return } l = w - l - if uint64(l) > uint64(256) { + if Uint64FromInt32(l) > uint64(256) { v1 = uint64(256) } else { - v1 = uint64(l) + v1 = Uint64FromInt32(l) } - Xmemset(tls, bp, int32(c), v1) + Xmemset(tls, bp, Int32FromUint8(c), v1) for { - if !(uint64(l) >= uint64(256)) { + if !(Uint64FromInt32(l) >= uint64(256)) { break } _out(tls, f, bp, uint64(256)) @@ -141072,7 +141070,7 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { ; l = int32(uint64(l) - Uint64FromInt64(256)) } - _out(tls, f, bp, uint64(l)) + _out(tls, f, bp, Uint64FromInt32(l)) } var _xdigits1 = [16]uint8{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} @@ -141086,7 +141084,7 @@ func _fmt_x(tls *TLS, x Tuintmax_t, s uintptr, lower int32) (r uintptr) { } s-- v2 = s - *(*uint8)(unsafe.Pointer(v2)) = uint8(int32(_xdigits1[x&uint64(15)]) | lower) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x&uint64(15)]) | lower) goto _1 _1: ; @@ -141179,13 +141177,13 @@ func _fmt_fp(tls *TLS, f uintptr, y float64, w int32, p int32, fl int32, t int32 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: - if int32(v1>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v1>>Int32FromInt32(63)) != 0 { y = -y } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { prefix += uintptr(3) } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { prefix += uintptr(6) } else { prefix++ @@ -141212,10 +141210,10 @@ _4: } s1 = v6 } - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) - _out(tls, f, prefix, uint64(pl)) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) + _out(tls, f, prefix, Uint64FromInt32(pl)) _out(tls, f, s1, uint64(3)) - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > int32(3)+pl { v7 = w } else { @@ -141248,7 +141246,7 @@ _4: } round *= Float64FromInt32(16) } - if int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { y = -y y -= round y += round @@ -141263,7 +141261,7 @@ _4: } else { v9 = *(*int32)(unsafe.Pointer(bp + 512)) } - estr = _fmt_u(tls, uint64(v9), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v9), ebuf) if estr == ebuf { estr-- v10 = estr @@ -141276,18 +141274,18 @@ _4: } else { v12 = int32('+') } - *(*uint8)(unsafe.Pointer(v11)) = uint8(v12) + *(*uint8)(unsafe.Pointer(v11)) = Uint8FromInt32(v12) estr-- v13 = estr - *(*uint8)(unsafe.Pointer(v13)) = uint8(t + (Int32FromUint8('p') - Int32FromUint8('a'))) + *(*uint8)(unsafe.Pointer(v13)) = Uint8FromInt32(t + (Int32FromUint8('p') - Int32FromUint8('a'))) s = bp + 516 for cond := true; cond; cond = y != 0 { x = int32(y) v14 = s s++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32(_xdigits1[x]) | t&int32(32)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x]) | t&int32(32)) y = Float64FromInt32(16) * (y - float64(x)) - if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { v15 = s s++ *(*uint8)(unsafe.Pointer(v15)) = uint8('.') @@ -141302,12 +141300,12 @@ _4: l = int32(int64(s) - t__predefined_ptrdiff_t(bp+516) + (int64(ebuf) - int64(estr))) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) - _out(tls, f, bp+516, uint64(int64(s)-t__predefined_ptrdiff_t(bp+516))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, bp+516, Uint64FromInt64(int64(s)-t__predefined_ptrdiff_t(bp+516))) _pad3(tls, f, uint8('0'), int32(int64(l)-(int64(ebuf)-int64(estr))-(int64(s)-t__predefined_ptrdiff_t(bp+516))), 0, 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v16 = w } else { @@ -141380,15 +141378,15 @@ _4: v25 = -*(*int32)(unsafe.Pointer(bp + 512)) } sh1 = v25 - need = int32(uint32(1) + (uint32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) + need = Int32FromUint32(uint32(1) + (Uint32FromInt32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) d = a for { if !(d < z) { break } - rm = *(*Tuint32_t)(unsafe.Pointer(d)) & uint32(int32(1)<>sh1 + carry1 - carry1 = uint32(Int32FromInt32(1000000000)>>sh1) * rm + carry1 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh1) * rm goto _26 _26: ; @@ -141418,7 +141416,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _29 @@ -141449,30 +141447,30 @@ _4: i *= int32(10) j++ } - x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(i) + x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % Uint32FromInt32(i) /* Are there any significant digits past j? */ if x2 != 0 || d+uintptr(1)*4 != z { round1 = Float64FromInt32(2) / Float64FromFloat64(2.22044604925031308085e-16) - if *(*Tuint32_t)(unsafe.Pointer(d))/uint32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { + if *(*Tuint32_t)(unsafe.Pointer(d))/Uint32FromInt32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { round1 += Float64FromInt32(2) } - if x2 < uint32(i/int32(2)) { + if x2 < Uint32FromInt32(i/int32(2)) { small = Float64FromFloat64(0.5) } else { - if x2 == uint32(i/int32(2)) && d+uintptr(1)*4 == z { + if x2 == Uint32FromInt32(i/int32(2)) && d+uintptr(1)*4 == z { small = Float64FromFloat64(1) } else { small = Float64FromFloat64(1.5) } } - if pl != 0 && int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if pl != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { round1 *= float64(-Int32FromInt32(1)) small *= float64(-Int32FromInt32(1)) } *(*Tuint32_t)(unsafe.Pointer(d)) -= x2 /* Decide whether to round by probing round+small */ if round1+small != round1 { - *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + uint32(i) + *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + Uint32FromInt32(i) for *(*Tuint32_t)(unsafe.Pointer(d)) > uint32(999999999) { v31 = d d -= 4 @@ -141487,7 +141485,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _33 @@ -141522,13 +141520,13 @@ _4: t -= int32(2) p-- } - if !(uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if !(Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { /* Count trailing zeros in last place */ if z > a && *(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4)) != 0 { i = int32(10) j = Int32FromInt32(0) for { - if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%uint32(i) == uint32(0)) { + if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%Uint32FromInt32(i) == uint32(0)) { break } goto _35 @@ -141577,10 +141575,10 @@ _4: } } } - if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { return -int32(1) } - l = int32(1) + p + BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) + l = int32(1) + p + BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) if t|int32(32) == int32('f') { if e > int32(INT_MAX)-l { return -int32(1) @@ -141594,7 +141592,7 @@ _4: } else { v42 = e } - estr = _fmt_u(tls, uint64(v42), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v42), ebuf) for int64(ebuf)-int64(estr) < int64(2) { estr-- v43 = estr @@ -141607,10 +141605,10 @@ _4: } else { v45 = int32('+') } - *(*uint8)(unsafe.Pointer(v44)) = uint8(v45) + *(*uint8)(unsafe.Pointer(v44)) = Uint8FromInt32(v45) estr-- v46 = estr - *(*uint8)(unsafe.Pointer(v46)) = uint8(t) + *(*uint8)(unsafe.Pointer(v46)) = Uint8FromInt32(t) if int64(ebuf)-int64(estr) > int64(int32(INT_MAX)-l) { return -int32(1) } @@ -141620,8 +141618,8 @@ _4: return -int32(1) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) if t|int32(32) == int32('f') { if a > r { a = r @@ -141645,13 +141643,13 @@ _4: *(*uint8)(unsafe.Pointer(v49)) = uint8('0') } } - _out(tls, f, s2, uint64(int64(bp+516+uintptr(9))-int64(s2))) + _out(tls, f, s2, Uint64FromInt64(int64(bp+516+uintptr(9))-int64(s2))) goto _47 _47: ; d += 4 } - if p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+606, uint64(1)) } for { @@ -141669,7 +141667,7 @@ _4: } else { v52 = p } - _out(tls, f, s3, uint64(v52)) + _out(tls, f, s3, Uint64FromInt32(v52)) goto _50 _50: ; @@ -141702,7 +141700,7 @@ _4: v56 = s4 s4++ _out(tls, f, v56, uint64(1)) - if p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+606, uint64(1)) } } @@ -141711,7 +141709,7 @@ _4: } else { v57 = int64(p) } - _out(tls, f, s4, uint64(v57)) + _out(tls, f, s4, Uint64FromInt64(v57)) p = int32(int64(p) - (int64(bp+516+UintptrFromInt32(9)) - int64(s4))) goto _53 _53: @@ -141719,9 +141717,9 @@ _4: d += 4 } _pad3(tls, f, uint8('0'), p+int32(18), int32(18), 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) } - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v58 = w } else { @@ -141738,10 +141736,10 @@ func _getint(tls *TLS, s uintptr) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { - i = int32(10)*i + (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) + i = int32(10)*i + (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) } goto _1 _1: @@ -141786,7 +141784,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Handle literal text and %% format specifiers */ a = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { break } goto _2 @@ -141796,7 +141794,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } z = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { break } goto _3 @@ -141810,14 +141808,14 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32(int64(z) - int64(a)) if f != 0 { - _out(tls, f, a, uint64(l)) + _out(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) - argpos = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') + argpos = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { argpos = -int32(1) @@ -141826,24 +141824,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { + if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { break } - fl |= uint32(1) << (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) + fl |= uint32(1) << (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) goto _4 _4: ; *(*uintptr)(unsafe.Pointer(bp))++ } /* Read field width */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) w = Int32FromInt32(0) } else { - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { @@ -141871,13 +141869,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } /* Read precision */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) p = Int32FromInt32(0) } else { - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(4) } else { @@ -141895,7 +141893,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } xp = BoolInt32(p >= 0) } else { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { *(*uintptr)(unsafe.Pointer(bp))++ p = _getint(tls, bp) xp = int32(1) @@ -141907,13 +141905,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st v8 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ - st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(int32(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) + st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) } if !(st != 0) { goto inval @@ -141926,13 +141924,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { if argpos >= 0 { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) } else { *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } } else { if f != 0 { - _pop_arg(tls, bp+8, int32(st), ap) + _pop_arg(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -141948,7 +141946,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, z = bp + 16 + uintptr(24) prefix = __ccgo_ts + 1659 pl = 0 - t = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) /* Transform ls,lc -> S,C */ if ps != 0 && t&int32(15) == int32(3) { t &= ^Int32FromInt32(32) @@ -142012,24 +142010,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) break } goto _1 _10: ; - if uint64(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { - v31 = uint64(p) + if Uint64FromInt32(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { + v31 = Uint64FromInt32(p) } else { v31 = Uint64FromInt32(2) * Uint64FromInt64(8) } - p = int32(v31) + p = Int32FromUint64(v31) t = int32('x') fl |= Uint32FromUint32(1) << (Int32FromUint8('#') - Int32FromUint8(' ')) _12: @@ -142060,7 +142058,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, _14: ; pl = int32(1) - if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > uint64(Int64FromInt64(INT64_MAX)) { + if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) = -*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { if fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { @@ -142131,7 +142129,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v40 = p } - z = a + uintptr(Xstrnlen(tls, a, uint64(v40))) + z = a + uintptr(Xstrnlen(tls, a, Uint64FromInt32(v40))) if p < 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -142143,7 +142141,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if !(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0) { goto narrow_c } - (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) + (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[int32(1)] = 0 *(*uintptr)(unsafe.Pointer(bp + 8)) = bp + 40 p = -int32(1) @@ -142152,21 +142150,21 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, ws = *(*uintptr)(unsafe.Pointer(bp + 8)) v42 = Int32FromInt32(0) l = v42 - i = uint64(v42) + i = Uint64FromInt32(v42) for { - if v45 = i < uint64(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { + if v45 = i < Uint64FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { v44 = ws ws += 4 v43 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v44))) l = v43 } - if !(v45 && v43 >= 0 && uint64(l) <= uint64(p)-i) { + if !(v45 && v43 >= 0 && Uint64FromInt32(l) <= Uint64FromInt32(p)-i) { break } goto _41 _41: ; - i += uint64(l) + i += Uint64FromInt32(l) } if l < 0 { return -int32(1) @@ -142174,27 +142172,27 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if i > uint64(INT_MAX) { goto overflow } - p = int32(i) - _pad3(tls, f, uint8(' '), w, p, int32(fl)) + p = Int32FromUint64(i) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl)) ws = *(*uintptr)(unsafe.Pointer(bp + 8)) i = uint64(0) for { - if v49 = i < uint64(0+uint32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { + if v49 = i < uint64(0+Uint32FromInt32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { v48 = ws ws += 4 v47 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v48))) l = v47 } - if !(v49 && i+uint64(v47) <= uint64(p)) { + if !(v49 && i+Uint64FromInt32(v47) <= Uint64FromInt32(p)) { break } - _out(tls, f, bp+48, uint64(l)) + _out(tls, f, bp+48, Uint64FromInt32(l)) goto _46 _46: ; - i += uint64(l) + i += Uint64FromInt32(l) } - _pad3(tls, f, uint8(' '), w, p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > p { v50 = w } else { @@ -142221,7 +142219,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if xp != 0 && p < 0 { goto overflow } - l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, int32(fl), t) + l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, Int32FromUint32(fl), t) if l < 0 { goto overflow } @@ -142240,12 +142238,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w > int32(INT_MAX)-cnt { goto overflow } - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl)) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl)) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) _pad3(tls, f, uint8('0'), p, int32(int64(z)-int64(a)), 0) - _out(tls, f, a, uint64(int64(z)-int64(a))) - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, a, Uint64FromInt64(int64(z)-int64(a))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 _1: @@ -142320,8 +142318,8 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v1 = 0 } __need_unlock = v1 - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) { saved_buf = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fbuf = bp + 128 @@ -142353,7 +142351,7 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -142376,13 +142374,13 @@ func _store_int(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -142449,14 +142447,14 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - v3 = int32(*(*uint8)(unsafe.Pointer(p))) - v4 = BoolInt32(v3 == int32(' ') || uint32(v3)-uint32('\t') < uint32(5)) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v4 = BoolInt32(v3 == int32(' ') || Uint32FromInt32(v3)-uint32('\t') < uint32(5)) goto _5 _5: if v4 != 0 { for { - v6 = int32(*(*uint8)(unsafe.Pointer(p + 1))) - v7 = BoolInt32(v6 == int32(' ') || uint32(v6)-uint32('\t') < uint32(5)) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) + v7 = BoolInt32(v6 == int32(' ') || Uint32FromInt32(v6)-uint32('\t') < uint32(5)) goto _8 _8: if !(v7 != 0) { @@ -142470,12 +142468,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } v12 = v9 - v13 = BoolInt32(v12 == int32(' ') || uint32(v12)-uint32('\t') < uint32(5)) + v13 = BoolInt32(v12 == int32(' ') || Uint32FromInt32(v12)-uint32('\t') < uint32(5)) goto _14 _14: if !(v13 != 0) { @@ -142488,23 +142486,23 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { pos += (*TFILE)(unsafe.Pointer(f)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(f)).Frpos) - int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) goto _2 } - if int32(*(*uint8)(unsafe.Pointer(p))) != int32('%') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32('%') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { X__shlim(tls, f, int64(Int32FromInt32(0))) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('%') { p++ for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Fshend { v19 = f + 8 v18 = *(*uintptr)(unsafe.Pointer(v19)) *(*uintptr)(unsafe.Pointer(v19))++ - v17 = int32(*(*uint8)(unsafe.Pointer(v18))) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v18))) } else { v17 = X__shgetc(tls, f) } v16 = v17 c = v16 v20 = v16 - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: if !(v21 != 0) { @@ -142516,13 +142514,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ - v23 = int32(*(*uint8)(unsafe.Pointer(v24))) + v23 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v24))) } else { v23 = X__shgetc(tls, f) } c = v23 } - if c != int32(*(*uint8)(unsafe.Pointer(p))) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -142535,12 +142533,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto _2 } p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('*') { dest = uintptr(0) p++ } else { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { - dest = _arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { + dest = _arg_n(tls, ap, Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) p += uintptr(2) } else { dest = VaUintptr(&ap) @@ -142551,13 +142549,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } - width = int32(10)*width + int32(*(*uint8)(unsafe.Pointer(p))) - int32('0') + width = int32(10)*width + Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) - int32('0') goto _27 _27: ; p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('m') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('m') { wcs = uintptr(0) s = uintptr(0) alloc = BoolInt32(!!(dest != 0)) @@ -142568,16 +142566,16 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { size = SIZE_def v28 = p p++ - switch int32(*(*uint8)(unsafe.Pointer(v28))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) { case int32('h'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('h') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('h') { p++ size = -Int32FromInt32(2) } else { size = -int32(1) } case int32('l'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('l') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('l') { p++ size = Int32FromInt32(SIZE_ll) } else { @@ -142636,7 +142634,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*uint8)(unsafe.Pointer(p))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) /* C or S */ if t&int32(0x2f) == int32(3) { t |= int32(32) @@ -142650,7 +142648,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { fallthrough case int32('['): case int32('n'): - _store_int(tls, dest, size, uint64(pos)) + _store_int(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 default: @@ -142660,12 +142658,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } v32 = v29 - v33 = BoolInt32(v32 == int32(' ') || uint32(v32)-uint32('\t') < uint32(5)) + v33 = BoolInt32(v32 == int32(' ') || Uint32FromInt32(v32)-uint32('\t') < uint32(5)) goto _34 _34: if !(v33 != 0) { @@ -142682,7 +142680,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v38 = f + 8 v37 = *(*uintptr)(unsafe.Pointer(v38)) *(*uintptr)(unsafe.Pointer(v38))++ - v36 = int32(*(*uint8)(unsafe.Pointer(v37))) + v36 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v37))) } else { v36 = X__shgetc(tls, f) } @@ -142751,7 +142749,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { p++ v59 = p - if int32(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { p++ invert = Int32FromInt32(1) } else { @@ -142759,38 +142757,38 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } Xmemset(tls, bp+16, invert, uint64(257)) (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = Uint8FromInt32(Int32FromInt32(1) - invert) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = Uint8FromInt32(Int32FromInt32(1) - invert) } } for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } if !(*(*uint8)(unsafe.Pointer(p)) != 0) { goto fmt_fail } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { v62 = p p++ - c = int32(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) for { - if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + if !(c < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))) { break } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = Uint8FromInt32(int32(1) - invert) goto _61 _61: ; c++ } } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+int32(*(*uint8)(unsafe.Pointer(p)))] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))] = Uint8FromInt32(int32(1) - invert) goto _60 _60: ; @@ -142801,7 +142799,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { s = uintptr(0) i = uint64(0) if t == int32('c') { - v63 = uint32(width) + uint32(1) + v63 = Uint32FromInt32(width) + uint32(1) } else { v63 = uint32(31) } @@ -142821,7 +142819,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v67 = f + 8 v66 = *(*uintptr)(unsafe.Pointer(v67)) *(*uintptr)(unsafe.Pointer(v67))++ - v65 = int32(*(*uint8)(unsafe.Pointer(v66))) + v65 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v66))) } else { v65 = X__shgetc(tls, f) } @@ -142830,11 +142828,11 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !((*(*[257]uint8)(unsafe.Pointer(bp + 16)))[v64+int32(1)] != 0) { break } - *(*uint8)(unsafe.Pointer(bp)) = uint8(c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(c) switch Xmbrtowc(tls, bp+276, bp, uint64(1), bp+8) { - case uint64(-Int32FromInt32(1)): + case Uint64FromInt32(-Int32FromInt32(1)): goto input_fail - case uint64(-Int32FromInt32(2)): + case Uint64FromInt32(-Int32FromInt32(2)): continue } if wcs != 0 { @@ -142865,7 +142863,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v72 = f + 8 v71 = *(*uintptr)(unsafe.Pointer(v72)) *(*uintptr)(unsafe.Pointer(v72))++ - v70 = int32(*(*uint8)(unsafe.Pointer(v71))) + v70 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v71))) } else { v70 = X__shgetc(tls, f) } @@ -142876,7 +142874,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v73 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = Uint8FromInt32(c) if i == k { k += k + uint64(1) tmp1 = Xrealloc(tls, s, k) @@ -142895,7 +142893,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v78 = f + 8 v77 = *(*uintptr)(unsafe.Pointer(v78)) *(*uintptr)(unsafe.Pointer(v78))++ - v76 = int32(*(*uint8)(unsafe.Pointer(v77))) + v76 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v77))) } else { v76 = X__shgetc(tls, f) } @@ -142906,7 +142904,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v79 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = Uint8FromInt32(c) } } else { for { @@ -142914,7 +142912,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v83 = f + 8 v82 = *(*uintptr)(unsafe.Pointer(v83)) *(*uintptr)(unsafe.Pointer(v83))++ - v81 = int32(*(*uint8)(unsafe.Pointer(v82))) + v81 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v82))) } else { v81 = X__shgetc(tls, f) } @@ -142976,7 +142974,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto int_common int_common: ; - x = X__intscan(tls, f, uint32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) + x = X__intscan(tls, f, Uint32FromInt32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) if !((*TFILE)(unsafe.Pointer(f)).Fshcnt+(int64((*TFILE)(unsafe.Pointer(f)).Frpos)-int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) != 0) { goto match_fail } @@ -143181,33 +143179,33 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -143236,7 +143234,7 @@ func _out1(tls *TLS, f uintptr, s uintptr, l Tsize_t) { func _pad4(tls *TLS, f uintptr, n int32, fl int32) { bp := tls.Alloc(32) defer tls.Free(32) - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return } Xfprintf(tls, f, __ccgo_ts+1676, VaList(bp+8, n, __ccgo_ts)) @@ -143247,10 +143245,10 @@ func _getint1(tls *TLS, s uintptr) (r int32) { _ = i i = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { i = int32(10)*i + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - int32('0')) @@ -143332,12 +143330,12 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32((int64(z) - int64(a)) / 4) if f != 0 { - _out1(tls, f, a, uint64(l)) + _out1(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) argpos = *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) - int32('0') *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 @@ -143348,7 +143346,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { + if !(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { break } fl |= uint32(1) << (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) - int32(' ')) @@ -143359,10 +143357,10 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read field width */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*4)) = int32(_INT) - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 } else { if !(l10n != 0) { @@ -143390,9 +143388,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read precision */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('.') && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*4)) = int32(_INT) - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(4) * 4 } else { if !(l10n != 0) { @@ -143421,7 +143419,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -143439,11 +143437,11 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } else { if argpos >= 0 { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) *(*Targ)(unsafe.Pointer(bp + 16)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } else { if f != 0 { - _pop_arg1(tls, bp+16, int32(st), ap) + _pop_arg1(tls, bp+16, Int32FromUint32(st), ap) } else { return 0 } @@ -143470,13 +143468,13 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) break } goto _1 @@ -143486,15 +143484,15 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < int32(1) { w = int32(1) } - _pad4(tls, f, w-int32(1), int32(fl)) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl)) if t == int32('C') { v9 = *(*Tuintmax_t)(unsafe.Pointer(bp + 16)) } else { - v9 = uint64(Xbtowc(tls, int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) + v9 = uint64(Xbtowc(tls, Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) } - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(v9) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint64(v9) _out1(tls, f, bp, uint64(1)) - _pad4(tls, f, w-int32(1), int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('S'): @@ -143504,7 +143502,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v10 = p } - z = a + uintptr(Xwcsnlen(tls, a, uint64(v10)))*4 + z = a + uintptr(Xwcsnlen(tls, a, Uint64FromInt32(v10)))*4 if p < 0 && *(*Twchar_t)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -143512,9 +143510,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) - _out1(tls, f, a, uint64(p)) - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl)) + _out1(tls, f, a, Uint64FromInt32(p)) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('m'): @@ -143557,7 +143555,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) + _pad4(tls, f, w-p, Int32FromUint32(fl)) bs = *(*uintptr)(unsafe.Pointer(bp + 16)) for { v16 = l @@ -143569,14 +143567,14 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, bs += uintptr(i) _out1(tls, f, bp+40, uint64(1)) } - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 } if xp != 0 && p < 0 { goto overflow } - Xsnprintf(tls, bp+24, uint64(16), __ccgo_ts+1680, VaList(bp+56, __ccgo_ts+1700+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1702+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1704+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+714+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1706+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), int32(_sizeprefix[t|int32(32)-int32('a')]), t)) + Xsnprintf(tls, bp+24, uint64(16), __ccgo_ts+1680, VaList(bp+56, __ccgo_ts+1700+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1702+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1704+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+714+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1706+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), Int32FromUint8(_sizeprefix[t|int32(32)-int32('a')]), t)) switch t | Int32FromInt32(32) { case int32('a'): fallthrough @@ -143671,13 +143669,13 @@ func Xvfwprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } __need_unlock = v1 Xfwide(tls, f, int32(1)) - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) ret = _wprintf_core(tls, f, fmt, bp, bp+48, bp+8) if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -143693,13 +143691,13 @@ func _store_int1(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -143807,12 +143805,12 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - if Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { + if Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { p += 4 } for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ @@ -143820,20 +143818,20 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v4 = Xgetwc(tls, f) } - v3 = int32(v4) + v3 = Int32FromUint32(v4) c = v3 - if !(Xiswspace(tls, uint32(v3)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v3)) != 0) { break } pos++ } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) _ = *(*uint8)(unsafe.Pointer(v8)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } goto _2 } @@ -143841,7 +143839,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == int32('%') { p += 4 for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ @@ -143849,15 +143847,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v11 = Xgetwc(tls, f) } - v10 = int32(v11) + v10 = Int32FromUint32(v11) c = v10 - if !(Xiswspace(tls, uint32(v10)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v10)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ @@ -143865,16 +143863,16 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v14 = Xgetwc(tls, f) } - c = int32(v14) + c = Int32FromUint32(v14) } if c != *(*Twchar_t)(unsafe.Pointer(p)) { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v19 = f + 8 *(*uintptr)(unsafe.Pointer(v19))-- v18 = *(*uintptr)(unsafe.Pointer(v19)) _ = *(*uint8)(unsafe.Pointer(v18)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if c < 0 { goto input_fail @@ -143889,8 +143887,8 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { dest = uintptr(0) p += 4 } else { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { - dest = _arg_n1(tls, ap, uint32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { + dest = _arg_n1(tls, ap, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) p += uintptr(2) * 4 } else { dest = VaUintptr(&ap) @@ -143898,7 +143896,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } width = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } width = int32(10)*width + *(*Twchar_t)(unsafe.Pointer(p)) - int32('0') @@ -143995,7 +143993,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if t != int32('n') { if t != int32('[') && t|int32(32) != int32('c') { for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ @@ -144003,15 +144001,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v23 = Xgetwc(tls, f) } - v22 = int32(v23) + v22 = Int32FromUint32(v23) c = v22 - if !(Xiswspace(tls, uint32(v22)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v22)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v28 = f + 8 v27 = *(*uintptr)(unsafe.Pointer(v28)) *(*uintptr)(unsafe.Pointer(v28))++ @@ -144019,23 +144017,23 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v26 = Xgetwc(tls, f) } - c = int32(v26) + c = Int32FromUint32(v26) } if c < 0 { goto input_fail } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v31 = f + 8 *(*uintptr)(unsafe.Pointer(v31))-- v30 = *(*uintptr)(unsafe.Pointer(v31)) _ = *(*uint8)(unsafe.Pointer(v30)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } } switch t { case int32('n'): - _store_int1(tls, dest, size, uint64(pos)) + _store_int1(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 case int32('s'): @@ -144093,7 +144091,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { i = uint64(0) if alloc != 0 { if t == int32('c') { - v35 = uint32(width) + uint32(1) + v35 = Uint32FromInt32(width) + uint32(1) } else { v35 = uint32(31) } @@ -144111,7 +144109,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } } for width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ @@ -144119,7 +144117,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v37 = Xgetwc(tls, f) } - v36 = int32(v37) + v36 = Int32FromUint32(v37) c = v36 if v36 < 0 { break @@ -144150,7 +144148,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if l < 0 { goto input_fail } - i += uint64(l) + i += Uint64FromInt32(l) if alloc != 0 && i > k-uint64(4) { k += k + uint64(1) tmp2 = Xrealloc(tls, s, k) @@ -144166,13 +144164,13 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { gotmatch = int32(1) } if width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v44 = f + 8 *(*uintptr)(unsafe.Pointer(v44))-- v43 = *(*uintptr)(unsafe.Pointer(v44)) _ = *(*uint8)(unsafe.Pointer(v43)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if t == int32('c') || !(gotmatch != 0) { goto match_fail @@ -144357,10 +144355,10 @@ func _sn_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { var v1, v2 uint64 _, _, _, _, _ = c, k, v1, v2, v3 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if (*Tcookie3)(unsafe.Pointer(c)).Fn < uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { + if (*Tcookie3)(unsafe.Pointer(c)).Fn < Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { v1 = (*Tcookie3)(unsafe.Pointer(c)).Fn } else { - v1 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + v1 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) } k = v1 if k != 0 { @@ -144451,7 +144449,7 @@ func _string_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { k = len1 + uint64(256) end = Xmemchr(tls, src, 0, k) if end != 0 { - k = uint64(int64(end) - int64(src)) + k = Uint64FromInt64(int64(end) - int64(src)) } if k < len1 { len1 = k @@ -144502,8 +144500,8 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { l0 = l i = 0 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == uint64(-Int32FromInt32(1)) { - return uint64(-Int32FromInt32(1)) + if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == Uint64FromInt32(-Int32FromInt32(1)) { + return Uint64FromInt32(-Int32FromInt32(1)) } for { if v2 = (*Tcookie4)(unsafe.Pointer(c)).Fl != 0 && l != 0; v2 { @@ -144517,7 +144515,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { i = int32(1) } s += uintptr(i) - l -= uint64(i) + l -= Uint64FromInt32(i) (*Tcookie4)(unsafe.Pointer(c)).Fl-- (*Tcookie4)(unsafe.Pointer(c)).Fws += 4 } @@ -144529,7 +144527,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { (*TFILE)(unsafe.Pointer(f)).Fwbase = v3 (*TFILE)(unsafe.Pointer(f)).Fwpos = v3 *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - return uint64(i) + return Uint64FromInt32(i) } (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -144567,7 +144565,7 @@ func Xvswprintf(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, ap Tva_list) (r1 in } r = Xvfwprintf(tls, bp+272, fmt, ap) _sw_write(tls, bp+272, uintptr(0), uint64(0)) - if uint64(r) >= n { + if Uint64FromInt32(r) >= n { v1 = -int32(1) } else { v1 = r @@ -144587,7 +144585,7 @@ func _wstring_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { return uint64(0) } k = Xwcsrtombs(tls, (*TFILE)(unsafe.Pointer(f)).Fbuf, bp, (*TFILE)(unsafe.Pointer(f)).Fbuf_size, uintptr(0)) - if k == uint64(-Int32FromInt32(1)) { + if k == Uint64FromInt32(-Int32FromInt32(1)) { v1 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v1 (*TFILE)(unsafe.Pointer(f)).Frpos = v1 @@ -144727,8 +144725,8 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144736,7 +144734,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -144747,7 +144745,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int32(10)*n - (int32(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) + n = int32(10)*n - (Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) } if neg != 0 { v5 = n @@ -144769,8 +144767,8 @@ func Xatol(tls *TLS, s uintptr) (r int64) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144778,7 +144776,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -144789,7 +144787,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int64(10)*n - int64(int32(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) + n = int64(10)*n - int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -144811,8 +144809,8 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144820,7 +144818,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -144831,7 +144829,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int64(10)*n - int64(int32(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) + n = int64(10)*n - int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -144887,16 +144885,16 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, j, v1, v3 int32 var _ /* tmp at bp+0 */ [32]uint8 _, _, _, _ = i, j, v1, v3 - if uint32(n)-uint32(1) > uint32(15) { + if Uint32FromInt32(n)-uint32(1) > uint32(15) { n = int32(15) } Xsprintf(tls, bp, __ccgo_ts+1733, VaList(bp+40, n-int32(1), x)) - v1 = BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) + v1 = BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) *(*int32)(unsafe.Pointer(sign)) = v1 i = v1 j = 0 for { - if !(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { + if !(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { break } _buf8[j] = (*(*[32]uint8)(unsafe.Pointer(bp)))[i] @@ -144905,7 +144903,7 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { ; v3 = i i++ - j += BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) + j += BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) } _buf8[j] = uint8(0) *(*int32)(unsafe.Pointer(dp)) = Xatoi(tls, bp+uintptr(i)+uintptr(1)) + int32(1) @@ -144924,20 +144922,20 @@ func Xfcvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, lz int32 var _ /* tmp at bp+0 */ [1500]uint8 _, _ = i, lz - if uint32(n) > uint32(1400) { + if Uint32FromInt32(n) > uint32(1400) { n = int32(1400) } Xsprintf(tls, bp, __ccgo_ts+1738, VaList(bp+1512, n, x)) - i = BoolInt32(int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) - if int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { - lz = int32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1706)) + i = BoolInt32(Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) + if Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { + lz = Int32FromUint64(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1706)) } else { - lz = -int32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+606)) + lz = -Int32FromUint64(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+606)) } if n <= lz { *(*int32)(unsafe.Pointer(sign)) = i *(*int32)(unsafe.Pointer(dp)) = int32(1) - if uint32(n) > uint32(14) { + if Uint32FromInt32(n) > uint32(14) { n = int32(14) } return __ccgo_ts + 1743 + UintptrFromInt32(14) - uintptr(n) @@ -145051,10 +145049,10 @@ _3: v6 = _a_ctz_64(tls, v5) goto _7 _7: - v4 = int32(Uint64FromInt32(8)*Uint64FromInt64(8) + uint64(v6)) + v4 = Int32FromUint64(Uint64FromInt32(8)*Uint64FromInt64(8) + Uint64FromInt32(v6)) r = v4 } - if v8 || uint64(v4) != Uint64FromInt32(8)*Uint64FromInt64(8) { + if v8 || Uint64FromInt32(v4) != Uint64FromInt32(8)*Uint64FromInt64(8) { return r } return 0 @@ -145100,25 +145098,25 @@ func _cycle(tls *TLS, width Tsize_t, ar uintptr, n int32) { // // /* shl() and shr() need n > 0 */ func _shl(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = *(*Tsize_t)(unsafe.Pointer(p)) *(*Tsize_t)(unsafe.Pointer(p)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p)) <<= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p)) <<= Uint64FromInt32(n) } func _shr(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p)) = *(*Tsize_t)(unsafe.Pointer(p + 1*8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p)) >>= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p)) >>= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= Uint64FromInt32(n) } func _sift(tls *TLS, head uintptr, width Tsize_t, cmp Tcmpfun, arg uintptr, pshift int32, lp uintptr) { @@ -145236,7 +145234,7 @@ func X__qsort_r(tls *TLS, base uintptr, nel Tsize_t, width Tsize_t, cmp Tcmpfun, _shr(tls, bp+768, int32(2)) pshift += int32(2) } else { - if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= uint64(int64(high)-int64(head)) { + if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= Uint64FromInt64(int64(high)-int64(head)) { _trinkle(tls, head, width, cmp, arg, bp+768, pshift, 0, bp) } else { _sift(tls, head, width, cmp, arg, pshift, bp) @@ -145353,9 +145351,9 @@ func _strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*TFILE)(unsafe.Pointer(bp)).Fbuf = v1 (*TFILE)(unsafe.Pointer(bp)).Frend = uintptr(-Int32FromInt32(1)) X__shlim(tls, bp, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp, uint32(base), int32(1), lim) + y = X__intscan(tls, bp, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -145374,7 +145372,7 @@ func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -145390,7 +145388,7 @@ func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -145480,7 +145478,7 @@ func _do_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -145519,14 +145517,14 @@ func _wcstox(tls *TLS, s uintptr, p uintptr, prec int32) (r float64) { (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) y = X__floatscan(tls, bp+64, prec, int32(1)) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -145584,7 +145582,7 @@ func _do_read1(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -145623,14 +145621,14 @@ func _wcstox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read1) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp+64, uint32(base), int32(1), lim) + y = X__intscan(tls, bp+64, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -145654,7 +145652,7 @@ func Xwcstoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -145670,7 +145668,7 @@ func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -145751,14 +145749,14 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt _, _, _, _, _, _, _, _, _ = d, k, s, wd, ws, v2, v3, v6, v7 d = dest s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(d)&(Uint64FromInt64(8)-Uint64FromInt32(1)) { for { if v3 = uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v2 } - if !(v3 && int32(v2) != c) { + if !(v3 && Int32FromUint8(v2) != c) { break } goto _1 @@ -145771,11 +145769,11 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 { goto tail } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -145794,7 +145792,7 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt v6 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v6 } - if !(v7 && int32(v6) != c) { + if !(v7 && Int32FromUint8(v6) != c) { break } goto _5 @@ -145833,9 +145831,9 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { var s, w, v4 uintptr _, _, _, _ = k, s, w, v4 s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { - if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _1 @@ -145844,11 +145842,11 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s++ n-- } - if n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c { - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + if n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c { + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -145860,7 +145858,7 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s = w } for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -145888,7 +145886,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { l = vl r = vr for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _1 @@ -145899,7 +145897,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { r++ } if n != 0 { - v2 = int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } else { v2 = 0 } @@ -146261,15 +146259,15 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146404,13 +146402,13 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -146418,7 +146416,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146453,7 +146451,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Search loop */ for { /* If remainder of haystack is shorter than needle, done */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } /* Check last byte first; advance by shift on mismatch */ @@ -146480,7 +146478,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin } k = v11 for { - if !(k < l && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(k < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -146496,7 +146494,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -146533,11 +146531,11 @@ func Xmemmem(tls *TLS, h0 uintptr, k Tsize_t, n0 uintptr, l Tsize_t) (r uintptr) return uintptr(0) } /* Use faster algorithms for short needles */ - h = Xmemchr(tls, h0, int32(*(*uint8)(unsafe.Pointer(n))), k) + h = Xmemchr(tls, h0, Int32FromUint8(*(*uint8)(unsafe.Pointer(n))), k) if !(h != 0) || l == uint64(1) { return h } - k -= uint64(int64(h) - int64(h0)) + k -= Uint64FromInt64(int64(h) - int64(h0)) if k < l { return uintptr(0) } @@ -146570,7 +146568,7 @@ func Xmemmove(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { if d == s { return d } - if uint64(s)-uint64(d)-n <= uint64(-Int32FromInt32(2))*n { + if uint64(s)-uint64(d)-n <= Uint64FromInt32(-Int32FromInt32(2))*n { return Xmemcpy(tls, d, s, n) } if d < s { @@ -146654,14 +146652,14 @@ func X__memrchr(tls *TLS, m uintptr, c int32, n Tsize_t) (r uintptr) { var v1 Tsize_t _, _ = s, v1 s = m - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { v1 = n n-- if !(v1 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { return s + uintptr(n) } } @@ -146693,20 +146691,20 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { if !(n != 0) { return dest } - *(*uint8)(unsafe.Pointer(s)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = Uint8FromInt32(c) if n <= uint64(2) { return dest } - *(*uint8)(unsafe.Pointer(s + 1)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + 2)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 1)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + 2)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = Uint8FromInt32(c) if n <= uint64(6) { return dest } - *(*uint8)(unsafe.Pointer(s + 3)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 3)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = Uint8FromInt32(c) if n <= uint64(8) { return dest } @@ -146717,8 +146715,8 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { k = -uint64(s) & uint64(3) s += uintptr(k) n -= k - n &= uint64(-Int32FromInt32(4)) - c32 = uint32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(uint8(c)) + n &= Uint64FromInt32(-Int32FromInt32(4)) + c32 = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(Uint8FromInt32(c)) /* In preparation to copy 32 bytes at a time, aligned on * an 8-byte bounary, fill head/tail up to 28 bytes each. * As in the initial byte-based head/tail fill, each @@ -146817,7 +146815,7 @@ func X__stpcpy(tls *TLS, d uintptr, s uintptr) (r uintptr) { wd = d ws = s for { - if !!((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _3 @@ -146906,7 +146904,7 @@ func X__stpncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -146969,7 +146967,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l = _l r = _r for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _1 @@ -146978,7 +146976,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l++ r++ } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strcasecmp_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) { @@ -147037,7 +147035,7 @@ func Xstrchr(tls *TLS, s uintptr, c int32) (r1 uintptr) { var r, v1 uintptr _, _ = r, v1 r = X__strchrnul(tls, s, c) - if int32(*(*uint8)(unsafe.Pointer(r))) == int32(uint8(c)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) == Int32FromUint8(Uint8FromInt32(c)) { v1 = r } else { v1 = uintptr(0) @@ -147064,7 +147062,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { var k Tsize_t var w uintptr _, _ = k, w - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } @@ -147072,7 +147070,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { if !(uint64(s)%Uint64FromInt64(8) != 0) { break } - if !(*(*uint8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { + if !(*(*uint8)(unsafe.Pointer(s)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == c { return s } goto _1 @@ -147080,10 +147078,10 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { ; s++ } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -147093,7 +147091,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { } s = w for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -147127,7 +147125,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { defer func() { trc("-> %v", r1) }() } for { - if !(int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { break } goto _1 @@ -147136,7 +147134,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { l++ r++ } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrcpy(tls *TLS, dest uintptr, src uintptr) (r uintptr) { @@ -147161,7 +147159,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { _, _, _ = a, v3, p2 a = s if !(*(*uint8)(unsafe.Pointer(c)) != 0) || !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { - return uint64(int64(X__strchrnul(tls, s, int32(*(*uint8)(unsafe.Pointer(c))))) - int64(a)) + return Uint64FromInt64(int64(X__strchrnul(tls, s, Int32FromUint8(*(*uint8)(unsafe.Pointer(c))))) - int64(a)) } Xmemset(tls, bp, 0, uint64(32)) for { @@ -147186,7 +147184,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrdup(tls *TLS, s uintptr) (r uintptr) { @@ -147295,7 +147293,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*Tsize_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -147329,7 +147327,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { goto finish finish: ; - return uint64(int64(d)-int64(d0)) + Xstrlen(tls, s) + return Uint64FromInt64(int64(d)-int64(d0)) + Xstrlen(tls, s) return r } @@ -147357,7 +147355,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { break } if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } goto _1 _1: @@ -147366,7 +147364,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { } w = s for { - if !!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _2 @@ -147384,7 +147382,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { @@ -147403,7 +147401,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _2 @@ -147413,7 +147411,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, loc Tlocale_t) (r1 int32) { @@ -147471,7 +147469,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _2 @@ -147481,7 +147479,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { @@ -147521,7 +147519,7 @@ func Xstrnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _, _ = p, v1 p = Xmemchr(tls, s, 0, n) if p != 0 { - v1 = uint64(int64(p) - int64(s)) + v1 = Uint64FromInt64(int64(p) - int64(s)) } else { v1 = n } @@ -147587,7 +147585,7 @@ func Xstrsignal(tls *TLS, signum int32) (r uintptr) { _, _ = s, v2 s = uintptr(unsafe.Pointer(&_strings)) signum = signum - if uint32(signum)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(signum)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { signum = 0 } for { @@ -147631,7 +147629,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { } if !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(c)))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(c)))) { break } goto _1 @@ -147639,7 +147637,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } for { if v4 = *(*uint8)(unsafe.Pointer(c)) != 0; v4 { @@ -147663,18 +147661,18 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -147802,13 +147800,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -147816,7 +147814,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -147853,13 +147851,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { /* Fast estimate for MAX(l,63) */ grow = l | uint64(63) z2 = Xmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } } else { @@ -147890,7 +147888,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { } k = v11 for { - if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -147906,7 +147904,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -147935,7 +147933,7 @@ func Xstrstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return h } /* Use faster algorithms for short needles */ - h = Xstrchr(tls, h, int32(*(*uint8)(unsafe.Pointer(n)))) + h = Xstrchr(tls, h, Int32FromUint8(*(*uint8)(unsafe.Pointer(n)))) if !(h != 0) || !(*(*uint8)(unsafe.Pointer(n + 1)) != 0) { return h } @@ -148045,14 +148043,14 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { i = v2 dp = v2 for { - if !(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { break } - c = int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) if !(c != 0) { return 0 } - if !(BoolInt32(uint32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { dp = i + uint64(1) z = Int32FromInt32(1) } else { @@ -148065,7 +148063,7 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { ; i++ } - if uint32(int32(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && uint32(int32(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { + if Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { /* If we're looking at non-degenerate digit sequences starting * with nonzero digits, longest digit string is greater. */ j = i @@ -148088,10 +148086,10 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { if z != 0 && dp < i && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-uint32('0') < uint32(10)) != 0 || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-uint32('0') < uint32(10)) != 0) { /* Otherwise, if common prefix of digit sequence is * all zeros, digits order less than non-digits. */ - return int32(uint8(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - int32(uint8(int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) + return Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) } } - return int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - int32(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) } func Xswab(tls *TLS, _src uintptr, _dest uintptr, n Tssize_t) { @@ -148138,7 +148136,7 @@ func Xwcscasecmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2)) defer func() { trc("-> %v", r1) }() } - return Xwcsncasecmp(tls, l, r, uint64(-Int32FromInt32(1))) + return Xwcsncasecmp(tls, l, r, Uint64FromInt32(-Int32FromInt32(1))) } func Xwcscasecmp_l(tls *TLS, l uintptr, r uintptr, locale Tlocale_t) (r1 int32) { @@ -148250,7 +148248,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { v2 = Xwcschr(tls, v3, *(*Twchar_t)(unsafe.Pointer(c))) s = v2 if v2 != 0 { - v1 = uint64((int64(s) - int64(a)) / 4) + v1 = Uint64FromInt64((int64(s) - int64(a)) / 4) } else { v1 = Xwcslen(tls, a) } @@ -148266,7 +148264,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsdup(tls *TLS, s uintptr) (r uintptr) { @@ -148302,7 +148300,7 @@ func Xwcslen(tls *TLS, s uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { @@ -148318,7 +148316,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r)))))) { + if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r)))))) { break } goto _2 @@ -148328,7 +148326,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { r += 4 n-- } - return int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r))))) + return Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r))))) } func Xwcsncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, locale Tlocale_t) (r1 int32) { @@ -148422,7 +148420,7 @@ func Xwcsnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _ = z z = Xwmemchr(tls, s, 0, n) if z != 0 { - n = uint64((int64(z) - int64(s)) / 4) + n = Uint64FromInt64((int64(z) - int64(s)) / 4) } return n } @@ -148485,7 +148483,7 @@ func Xwcsspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { @@ -148508,7 +148506,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return uintptr(0) } /* hit the end of h */ /* Compute maximal suffix */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v2 = Uint64FromInt32(1) p = v2 @@ -148539,7 +148537,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 @@ -148590,13 +148588,13 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { /* Fast estimate for MIN(l,63) */ grow = l | uint64(63) z2 = Xwmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { return uintptr(0) } } else { @@ -148901,7 +148899,7 @@ func X__mkostemps(tls *TLS, template uintptr, len1 int32, flags int32) (r int32) var l Tsize_t _, _, _, _, _ = fd, l, retries, v1, v3 l = Xstrlen(tls, template) - if l < uint64(6) || uint64(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1772, uint64(6)) != 0 { + if l < uint64(6) || Uint64FromInt32(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1772, uint64(6)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -149011,10 +149009,10 @@ func Xcfmakeraw(tls *TLS, t uintptr) { if __ccgo_strace { trc("tls=%v t=%v, (%v:)", tls, t, origin(2)) } - *(*Ttcflag_t)(unsafe.Pointer(t)) &= uint32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) - *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= uint32(^Int32FromInt32(OPOST)) - *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) - *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= uint32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) + *(*Ttcflag_t)(unsafe.Pointer(t)) &= Uint32FromInt32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) + *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= Uint32FromInt32(^Int32FromInt32(OPOST)) + *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) + *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= Uint32FromInt32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) *(*Ttcflag_t)(unsafe.Pointer(t + 8)) |= uint32(CS8) *(*Tcc_t)(unsafe.Pointer(t + 16 + 5)) = uint8(1) *(*Tcc_t)(unsafe.Pointer(t + 16 + 7)) = uint8(0) @@ -149025,11 +149023,11 @@ func Xcfsetospeed(tls *TLS, tio uintptr, speed Tspeed_t) (r int32) { trc("tls=%v tio=%v speed=%v, (%v:)", tls, tio, speed, origin(2)) defer func() { trc("-> %v", r) }() } - if speed&uint32(^Int32FromInt32(CBAUD)) != 0 { + if speed&Uint32FromInt32(^Int32FromInt32(CBAUD)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= uint32(^Int32FromInt32(CBAUD)) + *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= Uint32FromInt32(^Int32FromInt32(CBAUD)) *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) |= speed return 0 } @@ -149062,7 +149060,7 @@ func Xtcdrain(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Uint32FromUint32(1)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(uint64(Uint32FromUint32(2)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(uint64(Uint32FromUint32(4)<')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i)))) != int32('>')) { break } if i < int32(TZNAME_MAX) { @@ -149471,7 +149469,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } else { i = 0 for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { break } if i < int32(TZNAME_MAX) { @@ -149493,7 +149491,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } func _zi_read32(tls *TLS, z uintptr) (r Tuint32_t) { - return uint32(*(*uint8)(unsafe.Pointer(z)))< uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { + if i > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { *(*uintptr)(unsafe.Pointer(bp + 288)) = uintptr(unsafe.Pointer(&X__utc)) i = Uint64FromInt32(3) } @@ -149570,8 +149568,8 @@ func _do_tzset(tls *TLS) { if i >= _old_tz_size { _old_tz_size = i + uint64(1) } - if _old_tz_size > uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { - _old_tz_size = uint64(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) + if _old_tz_size > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { + _old_tz_size = Uint64FromInt32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) } _old_tz = Xmalloc(tls, _old_tz_size) } @@ -149579,10 +149577,10 @@ func _do_tzset(tls *TLS) { Xmemcpy(tls, _old_tz, *(*uintptr)(unsafe.Pointer(bp + 288)), i+uint64(1)) } posix_form = 0 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { *(*uintptr)(unsafe.Pointer(bp + 296)) = *(*uintptr)(unsafe.Pointer(bp + 288)) _getname(tls, bp+308, bp+296) - if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1797) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1801) != 0)) { + if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1797) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1801) != 0)) { posix_form = int32(1) } } @@ -149590,10 +149588,10 @@ func _do_tzset(tls *TLS) { * pathame beginning with "."; in secure mode, only the * standard path will be searched. */ if !(posix_form != 0) { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { *(*uintptr)(unsafe.Pointer(bp + 288))++ } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { if !(X__libc.Fsecure != 0) || !(Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), __ccgo_ts+1782) != 0) { map1 = X__map_file(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), uintptr(unsafe.Pointer(&_map_size))) } @@ -149629,7 +149627,7 @@ func _do_tzset(tls *TLS) { _zi = map1 if map1 != 0 { scale = int32(2) - if int32(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { *(*[6]uint8)(unsafe.Pointer(bp)) = [6]uint8{ 0: uint8(1), 1: uint8(1), @@ -149648,10 +149646,10 @@ func _do_tzset(tls *TLS) { _types = _index + uintptr(_zi_read32(tls, _trans-uintptr(12))) _abbrevs = _types + uintptr(uint32(6)*_zi_read32(tls, _trans-uintptr(8))) _abbrevs_end = _abbrevs + uintptr(_zi_read32(tls, _trans-uintptr(4))) - if int32(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { *(*uintptr)(unsafe.Pointer(bp + 288)) = _zi + uintptr(_map_size) - uintptr(2) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { break } goto _4 @@ -149676,11 +149674,11 @@ func _do_tzset(tls *TLS) { } if !(*(*uint8)(unsafe.Pointer(p1 + 4)) != 0) && !(Xtzname[0] != 0) { Xtzname[0] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - Xtimezone = int64(-_zi_read32(tls, p1)) + Xtimezone = Int64FromUint32(-_zi_read32(tls, p1)) } if *(*uint8)(unsafe.Pointer(p1 + 4)) != 0 && !(Xtzname[int32(1)] != 0) { Xtzname[int32(1)] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - _dst_off = int32(-_zi_read32(tls, p1)) + _dst_off = Int32FromUint32(-_zi_read32(tls, p1)) Xdaylight = int32(1) } goto _8 @@ -149711,7 +149709,7 @@ func _do_tzset(tls *TLS) { Xtzname[int32(1)] = uintptr(unsafe.Pointer(&_dst_name)) if _dst_name[0] != 0 { Xdaylight = int32(1) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { _dst_off = _getoff(tls, bp+288) } else { _dst_off = int32(Xtimezone - int64(3600)) @@ -149720,11 +149718,11 @@ func _do_tzset(tls *TLS) { Xdaylight = 0 _dst_off = int32(Xtimezone) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r0))) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r12))) } @@ -149743,7 +149741,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { scale = int32(3) - BoolInt32(_trans == _zi+uintptr(44)) off = 0 a = uint64(0) - n = uint64((int64(_index) - int64(_trans)) >> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if !(n != 0) { if alt != 0 { *(*Tsize_t)(unsafe.Pointer(alt)) = uint64(0) @@ -149757,12 +149755,12 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if a == n-uint64(1) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if a == uint64(0) { x = uint64(_zi_read32(tls, _trans)) if scale == int32(3) { x = x<= uint64(int64(_abbrevs_end)-int64(_abbrevs))) { + if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint64(p)-uint64(_abbrevs) >= Uint64FromInt64(int64(_abbrevs_end)-int64(_abbrevs))) { p = __ccgo_ts } ___unlock(tls, uintptr(unsafe.Pointer(&_lock4))) @@ -149985,7 +149983,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { var centuries, cycles, leaps, leaps1, rem, y int32 var _ /* dummy at bp+0 */ int32 _, _, _, _, _, _ = centuries, cycles, leaps, leaps1, rem, y - if uint64(year)-uint64(2) <= uint64(136) { + if Uint64FromInt64(year)-uint64(2) <= uint64(136) { y = int32(year) leaps = (y - int32(68)) >> int32(2) if !((y-Int32FromInt32(68))&Int32FromInt32(3) != 0) { @@ -150034,7 +150032,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { *(*int32)(unsafe.Pointer(is_leap)) = 0 leaps1 = 0 } else { - leaps1 = int32(uint32(rem) / uint32(4)) + leaps1 = Int32FromUint32(Uint32FromInt32(rem) / uint32(4)) rem = int32(uint32(rem) % Uint32FromUint32(4)) *(*int32)(unsafe.Pointer(is_leap)) = BoolInt32(!(rem != 0)) } @@ -150119,7 +150117,7 @@ func Xclock_getcpuclockid(tls *TLS, pid Tpid_t, clk uintptr) (r int32) { var ret int32 var _ /* ts at bp+0 */ Ttimespec _, _ = id, ret - id = int32(uint32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) + id = Int32FromUint32(Uint32FromInt32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) ret = int32(X__syscall2(tls, int64(SYS_clock_getres), int64(id), int64(bp))) if ret == -int32(EINVAL) { ret = -int32(ESRCH) @@ -150138,7 +150136,7 @@ func Xclock_getres(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { } /* If reaching this point, it's a 64-bit arch or time64-only * 32-bit arch and we can get result directly into timespec. */ - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) } func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { @@ -150157,7 +150155,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { } r = -int32(EINVAL) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xclock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { @@ -150195,7 +150193,7 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { trc("tls=%v clk=%v ts=%v, (%v:)", tls, clk, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) } func Xctime(tls *TLS, t uintptr) (r uintptr) { @@ -150258,7 +150256,7 @@ func Xftime(tls *TLS, tp uintptr) (r int32) { _ = v1 Xclock_gettime(tls, CLOCK_REALTIME, bp) (*Ttimeb)(unsafe.Pointer(tp)).Ftime = (*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec - (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = uint16((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) + (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = Uint16FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) v1 = Int16FromInt32(0) (*Ttimeb)(unsafe.Pointer(tp)).Fdstflag = v1 (*Ttimeb)(unsafe.Pointer(tp)).Ftimezone = v1 @@ -150460,7 +150458,7 @@ func Xnanosleep(tls *TLS, req uintptr, rem uintptr) (r int32) { trc("tls=%v req=%v rem=%v, (%v:)", tls, req, rem, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) } func _is_leap(tls *TLS, y int32) (r int32) { @@ -150475,10 +150473,10 @@ func _is_leap(tls *TLS, y int32) (r int32) { func _week_num(tls *TLS, tm uintptr) (r int32) { var dec31, jan1, val int32 _, _, _ = dec31, jan1, val - val = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) /* If 1 Jan is just 1-3 days past Monday, * the previous week is also in this year. */ - if (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { + if (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { val++ } if !(val != 0) { @@ -150486,7 +150484,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 31 December of prev year a Thursday, * or Friday of a leap year, then the * prev year has 53 weeks. */ - dec31 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) + dec31 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) if dec31 == int32(4) || dec31 == int32(5) && _is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year%int32(400)-int32(1)) != 0 { val++ } @@ -150495,7 +150493,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 1 January is not a Thursday, and not * a Wednesday of a leap year, then this * year has only 52 weeks. */ - jan1 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) + jan1 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) if jan1 != int32(4) && (jan1 != int32(3) || !(_is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year) != 0)) { val = int32(1) } @@ -150521,13 +150519,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc def_pad = int32('0') switch f { case int32('a'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(ABDAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday goto nl_strcat case int32('A'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(DAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday @@ -150535,13 +150533,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('h'): fallthrough case int32('b'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(ABMON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon goto nl_strcat case int32('B'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(MON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon @@ -150640,7 +150638,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc d++ v5 = fmt fmt++ - *(*uint8)(unsafe.Pointer(v4)) = uint8(Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(v5))))) + *(*uint8)(unsafe.Pointer(v4)) = Uint8FromInt32(Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))))) goto _3 _3: ; @@ -150676,10 +150674,10 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc width = int32(1) goto number case int32('U'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) goto number case int32('W'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) goto number case int32('V'): val = int64(_week_num(tls, tm)) @@ -150703,7 +150701,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('Y'): val = int64((*Ttm)(unsafe.Pointer(tm)).Ftm_year) + int64(1900) if val >= int64(10000) { - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1895, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1895, VaList(bp+8, val))) return s } width = int32(4) @@ -150713,7 +150711,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc *(*Tsize_t)(unsafe.Pointer(l)) = uint64(0) return __ccgo_ts } - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1901, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1901, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) return s case int32('Z'): if (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst < 0 { @@ -150738,13 +150736,13 @@ number: } switch v7 { case int32('-'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1908, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1908, VaList(bp+8, val))) case int32('_'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1913, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1913, VaList(bp+8, width, val))) case int32('0'): fallthrough default: - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1919, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1919, VaList(bp+8, width, val))) break } return s @@ -150796,7 +150794,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl *(*uint8)(unsafe.Pointer(s + uintptr(l))) = uint8(0) return l } - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { v2 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v2))) = *(*uint8)(unsafe.Pointer(f)) @@ -150804,12 +150802,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } f++ pad = 0 - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('_') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('0') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('_') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('0') { v3 = f f++ - pad = int32(*(*uint8)(unsafe.Pointer(v3))) + pad = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } - v4 = BoolInt32(int32(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) + v4 = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) plus = v4 if v4 != 0 { f++ @@ -150820,7 +150818,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint64(0) *(*uintptr)(unsafe.Pointer(bp + 112)) = f } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('F') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('G') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('Y') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('F') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('G') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('Y') { if !(width != 0) && *(*uintptr)(unsafe.Pointer(bp + 112)) != f { width = uint64(1) } @@ -150828,10 +150826,10 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint64(0) } f = *(*uintptr)(unsafe.Pointer(bp + 112)) - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('E') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('O') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('E') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('O') { f++ } - t = X__strftime_fmt_1(tls, bp+8, bp, int32(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) + t = X__strftime_fmt_1(tls, bp+8, bp, Int32FromUint8(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) if !(t != 0) { break } @@ -150839,12 +150837,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl /* Trim off any sign and leading zeros, then * count remaining digits to determine behavior * for the + flag. */ - if int32(*(*uint8)(unsafe.Pointer(t))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(t))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('-') { t++ *(*Tsize_t)(unsafe.Pointer(bp))-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(t))) == int32('0') && uint32(int32(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('0') && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { break } goto _5 @@ -150858,7 +150856,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } d = uint64(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { break } goto _6 @@ -150873,13 +150871,13 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width-- } else { if v9 = plus != 0; v9 { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') { v8 = int32(3) } else { v8 = int32(5) } } - if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= uint64(v8) { + if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= Uint64FromInt32(v8) { v10 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v10))) = uint8('+') @@ -150954,16 +150952,16 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(bp + 4)) = 0 *(*int32)(unsafe.Pointer(bp + 8)) = 0 for *(*uint8)(unsafe.Pointer(f)) != 0 { - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { - v1 = int32(*(*uint8)(unsafe.Pointer(f))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if v2 != 0 { for { if v8 = *(*uint8)(unsafe.Pointer(s)) != 0; v8 { - v5 = int32(*(*uint8)(unsafe.Pointer(s))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: } @@ -150976,7 +150974,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { s++ } } else { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(*(*uint8)(unsafe.Pointer(f))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) { return uintptr(0) } else { s++ @@ -150986,11 +150984,11 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { continue } f++ - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('+') { f++ } if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { - w = int32(Xstrtoul(tls, f, bp+16, int32(10))) + w = Int32FromUint64(Xstrtoul(tls, f, bp+16, int32(10))) f = *(*uintptr)(unsafe.Pointer(bp + 16)) } else { w = -int32(1) @@ -150998,7 +150996,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { adj = 0 v9 = f f++ - switch int32(*(*uint8)(unsafe.Pointer(v9))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) { case int32('A'): goto _10 case int32('a'): @@ -151150,8 +151148,8 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { _44: ; if v48 = *(*uint8)(unsafe.Pointer(s)) != 0; v48 { - v45 = int32(*(*uint8)(unsafe.Pointer(s))) - v46 = BoolInt32(v45 == int32(' ') || uint32(v45)-uint32('\t') < uint32(5)) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v46 = BoolInt32(v45 == int32(' ') || Uint32FromInt32(v45)-uint32('\t') < uint32(5)) goto _47 _47: } @@ -151260,7 +151258,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; v49 = s s++ - if int32(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { return uintptr(0) } goto _41 @@ -151281,28 +151279,28 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v51 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v51))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v51))) - int32('0') goto _50 _50: ; i *= int32(10) } - if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(range1) { + if Uint32FromInt32(*(*int32)(unsafe.Pointer(dest))-min) >= Uint32FromInt32(range1) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) -= adj switch int64(dest) - int64(tm) { - case int64(uint64(UintptrFromInt32(0) + 28)): + case Int64FromUint64(uint64(UintptrFromInt32(0) + 28)): } goto update goto numeric_digits numeric_digits: ; neg = 0 - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { s++ } else { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') { neg = int32(1) s++ } @@ -151319,7 +151317,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v54 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v54))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v54))) - int32('0') goto _52 _52: ; @@ -151440,9 +151438,9 @@ func Xtimer_getoverrun(tls *TLS, t Ttimer_t) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) } func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { @@ -151454,9 +151452,9 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) } func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (r int32) { @@ -151468,9 +151466,9 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) } type Ttms = struct { @@ -151601,7 +151599,7 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl break } *(*Tsize_t)(unsafe.Pointer(bp)) = Xmbstowcs(tls, bp+108, t_mb, Uint64FromInt64(400)/Uint64FromInt64(4)) - if *(*Tsize_t)(unsafe.Pointer(bp)) == uint64(-Int32FromInt32(1)) { + if *(*Tsize_t)(unsafe.Pointer(bp)) == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } t = bp + 108 @@ -151690,7 +151688,7 @@ func Xaccess(tls *TLS, filename uintptr, amode int32) (r int32) { trc("tls=%v filename=%v amode=%v, (%v:)", tls, filename, amode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_access), int64(filename), int64(amode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_access), int64(filename), int64(amode))))) } func Xacct(tls *TLS, filename uintptr) (r int32) { @@ -151698,7 +151696,7 @@ func Xacct(tls *TLS, filename uintptr) (r int32) { trc("tls=%v filename=%v, (%v:)", tls, filename, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) } func Xalarm(tls *TLS, seconds uint32) (r uint32) { @@ -151712,12 +151710,12 @@ func Xalarm(tls *TLS, seconds uint32) (r uint32) { var _ /* old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_value: Ttimeval{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), }, } *(*Titimerval)(unsafe.Pointer(bp + 32)) = Titimerval{} Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) } func Xchdir(tls *TLS, path uintptr) (r int32) { @@ -151725,7 +151723,7 @@ func Xchdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) } func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { @@ -151733,7 +151731,7 @@ func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_chown), int64(path), int64(uid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_chown), int64(path), Int64FromUint32(uid), Int64FromUint32(gid))))) } func _dummy12(tls *TLS, fd int32) (r int32) { @@ -151752,7 +151750,7 @@ func Xclose(tls *TLS, fd int32) (r1 int32) { if r == -int32(EINTR) { r = 0 } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xctermid(tls *TLS, s uintptr) (r uintptr) { @@ -151775,7 +151773,7 @@ func Xdup(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) } func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { @@ -151792,7 +151790,7 @@ func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { break } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { @@ -151803,7 +151801,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { var r, v1, v2 int32 _, _, _ = r, v1, v2 if old == new1 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if flags != 0 { for { @@ -151814,10 +151812,10 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { } } if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } if flags & ^Int32FromInt32(O_CLOEXEC) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } } for { @@ -151830,7 +151828,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { if r >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(new1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xdup3(tls *TLS, old int32, new1 int32, flags int32) (r int32) { @@ -151859,7 +151857,7 @@ func _checker(tls *TLS, p uintptr) (r int32) { X__syscall1(tls, int64(SYS_exit), int64(Int32FromInt32(1))) } *(*int32)(unsafe.Pointer(bp)) = int32(X__syscall4(tls, int64(SYS_faccessat), int64((*Tctx1)(unsafe.Pointer(c)).Ffd), int64((*Tctx1)(unsafe.Pointer(c)).Ffilename), int64((*Tctx1)(unsafe.Pointer(c)).Famode), int64(Int32FromInt32(0)))) - X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), int64(Uint64FromInt64(4))) + X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), Int64FromUint64(Uint64FromInt64(4))) return 0 } @@ -151873,13 +151871,13 @@ func Xfaccessat(tls *TLS, fd int32, filename uintptr, amode int32, flag int32) ( if flag != 0 { ret = int32(X__syscall4(tls, int64(SYS_faccessat2), int64(fd), int64(filename), int64(amode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } if flag & ^Int32FromInt32(AT_EACCESS) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) } func Xfchdir(tls *TLS, fd int32) (r int32) { @@ -151894,10 +151892,10 @@ func Xfchdir(tls *TLS, fd int32) (r int32) { _ = ret ret = int32(X__syscall1(tls, int64(SYS_fchdir), int64(fd))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) } func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { @@ -151910,12 +151908,12 @@ func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), int64(uid), int64(gid))) + ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), Int64FromUint32(uid), Int64FromUint32(gid))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_chown), int64(bp), int64(uid), int64(gid))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_chown), int64(bp), Int64FromUint32(uid), Int64FromUint32(gid))))) } func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag int32) (r int32) { @@ -151923,7 +151921,7 @@ func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag in trc("tls=%v fd=%v path=%v uid=%v gid=%v flag=%v, (%v:)", tls, fd, path, uid, gid, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), int64(uid), int64(gid), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(flag))))) } func Xfdatasync(tls *TLS, fd int32) (r int32) { @@ -151931,7 +151929,7 @@ func Xfdatasync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) } func Xfsync(tls *TLS, fd int32) (r int32) { @@ -151939,7 +151937,7 @@ func Xfsync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) } func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { @@ -151947,7 +151945,7 @@ func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { trc("tls=%v fd=%v length=%v, (%v:)", tls, fd, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) } func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { @@ -151966,7 +151964,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { } else { v2 = int32(PATH_MAX) } - v1 = uint64(v2) + v1 = Uint64FromInt32(v2) tmp = Xrealloc(tls, tmp, v1) if !(buf != 0) { buf = tmp @@ -151977,11 +151975,11 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { return uintptr(0) } } - ret = X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), int64(size)))) + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), Int64FromUint64(size)))) if ret < 0 { return uintptr(0) } - if ret == 0 || int32(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { + if ret == 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOENT) return uintptr(0) } @@ -151998,7 +151996,7 @@ func Xgetegid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getegid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getegid))) } func Xgeteuid(tls *TLS) (r Tuid_t) { @@ -152006,7 +152004,7 @@ func Xgeteuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_geteuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_geteuid))) } func Xgetgid(tls *TLS) (r Tgid_t) { @@ -152014,7 +152012,7 @@ func Xgetgid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getgid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getgid))) } func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { @@ -152022,7 +152020,7 @@ func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { trc("tls=%v count=%v list=%v, (%v:)", tls, count, list, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) } func Xgethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -152094,7 +152092,7 @@ func Xgetpgid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) } func Xgetpgrp(tls *TLS) (r Tpid_t) { @@ -152126,7 +152124,7 @@ func Xgetsid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) } func Xgetuid(tls *TLS) (r Tuid_t) { @@ -152134,7 +152132,7 @@ func Xgetuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getuid))) } func Xisatty(tls *TLS, fd int32) (r1 int32) { @@ -152147,7 +152145,7 @@ func Xisatty(tls *TLS, fd int32) (r1 int32) { var r uint64 var _ /* wsz at bp+0 */ Twinsize _ = r - r = uint64(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(uint64(Uint32FromUint32(2)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_lchown), int64(path), int64(uid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_lchown), int64(path), Int64FromUint32(uid), Int64FromUint32(gid))))) } func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { @@ -152170,7 +152168,7 @@ func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_link), int64(existing), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_link), int64(existing), int64(new1))))) } func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, flag int32) (r int32) { @@ -152178,7 +152176,7 @@ func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, fla trc("tls=%v fd1=%v existing=%v fd2=%v new1=%v flag=%v, (%v:)", tls, fd1, existing, fd2, new1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) } func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -152191,7 +152189,7 @@ func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { var v1 int64 var _ /* result at bp+0 */ Toff_t _ = v1 - if X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS__llseek), int64(fd), offset>>Int32FromInt32(32), offset, int64(bp), int64(whence)))) != 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS__llseek), int64(fd), offset>>Int32FromInt32(32), offset, int64(bp), int64(whence)))) != 0 { v1 = int64(-int32(1)) } else { v1 = *(*Toff_t)(unsafe.Pointer(bp)) @@ -152242,7 +152240,7 @@ func Xpause(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pause), 0, 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pause), 0, 0, 0, 0, 0, 0)))) } func Xpipe(tls *TLS, fd uintptr) (r int32) { @@ -152250,7 +152248,7 @@ func Xpipe(tls *TLS, fd uintptr) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_pipe), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_pipe), int64(fd))))) } func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { @@ -152265,10 +152263,10 @@ func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { } ret = int32(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag & ^(Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } ret = Xpipe(tls, fd) if ret != 0 { @@ -152298,7 +152296,7 @@ func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -152306,7 +152304,7 @@ func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { @@ -152314,7 +152312,7 @@ func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -152322,7 +152320,7 @@ func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { @@ -152330,7 +152328,7 @@ func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -152347,11 +152345,11 @@ func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_ buf = bp bufsize = uint64(1) } - r = int32(X__syscall3(tls, int64(SYS_readlink), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall3(tls, int64(SYS_readlink), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -152368,11 +152366,11 @@ func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) buf = bp bufsize = uint64(1) } - r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -152380,7 +152378,7 @@ func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r int32) { @@ -152388,7 +152386,7 @@ func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r trc("tls=%v oldfd=%v old=%v newfd=%v new1=%v, (%v:)", tls, oldfd, old, newfd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_renameat), int64(oldfd), int64(old), int64(newfd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_renameat), int64(oldfd), int64(old), int64(newfd), int64(new1))))) } func Xrmdir(tls *TLS, path uintptr) (r int32) { @@ -152396,7 +152394,7 @@ func Xrmdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_rmdir), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_rmdir), int64(path))))) } func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { @@ -152404,7 +152402,7 @@ func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setgid), int32(gid), 0, 0) + return X__setxid(tls, int32(SYS_setgid), Int32FromUint32(gid), 0, 0) } func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { @@ -152412,7 +152410,7 @@ func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { trc("tls=%v pid=%v pgid=%v, (%v:)", tls, pid, pgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) } func Xsetpgrp(tls *TLS) (r Tpid_t) { @@ -152428,7 +152426,7 @@ func Xsetsid(tls *TLS) (r Tpid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_setsid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_setsid))))) } func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { @@ -152436,7 +152434,7 @@ func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setuid), int32(uid), 0, 0) + return X__setxid(tls, int32(SYS_setuid), Int32FromUint32(uid), 0, 0) } type Tctx2 = struct { @@ -152492,7 +152490,7 @@ func X__setxid(tls *TLS, nr int32, id int32, eid int32, sid int32) (r int32) { } else { v1 = (*(*Tctx2)(unsafe.Pointer(bp))).Fret } - return int32(X__syscall_ret(tls, uint64(v1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(v1))) } func Xsleep(tls *TLS, seconds uint32) (r uint32) { @@ -152504,10 +152502,10 @@ func Xsleep(tls *TLS, seconds uint32) (r uint32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), } if Xnanosleep(tls, bp, bp) != 0 { - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) } return uint32(0) } @@ -152517,7 +152515,7 @@ func Xsymlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_symlink), int64(existing), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_symlink), int64(existing), int64(new1))))) } func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { @@ -152525,7 +152523,7 @@ func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { trc("tls=%v existing=%v fd=%v new1=%v, (%v:)", tls, existing, fd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) } func Xsync(tls *TLS) { @@ -152543,7 +152541,7 @@ func Xtcgetpgrp(tls *TLS, fd int32) (r Tpid_t) { bp := tls.Alloc(32) defer tls.Free(32) var _ /* pgrp at bp+0 */ int32 - if Xioctl(tls, fd, int32(uint64(Uint32FromUint32(2)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) } /* Support signed or unsigned plain-char */ @@ -152611,12 +152609,12 @@ func Xttyname_r(tls *TLS, fd int32, name uintptr, size Tsize_t) (r int32) { if !(Xisatty(tls, fd) != 0) { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } - X__procfdname(tls, bp+288, uint32(fd)) + X__procfdname(tls, bp+288, Uint32FromInt32(fd)) l = Xreadlink(tls, bp+288, name, size) if l < 0 { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } else { - if uint64(l) == size { + if Uint64FromInt64(l) == size { return int32(ERANGE) } } @@ -152641,14 +152639,14 @@ func Xualarm(tls *TLS, value uint32, interval uint32) (r uint32) { var _ /* it_old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_interval: Ttimeval{ - Ftv_usec: int64(interval), + Ftv_usec: Int64FromUint32(interval), }, Fit_value: Ttimeval{ - Ftv_usec: int64(value), + Ftv_usec: Int64FromUint32(value), }, } Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) } func Xunlink(tls *TLS, path uintptr) (r int32) { @@ -152656,7 +152654,7 @@ func Xunlink(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_unlink), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_unlink), int64(path))))) } func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { @@ -152664,7 +152662,7 @@ func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { trc("tls=%v fd=%v path=%v flag=%v, (%v:)", tls, fd, path, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) } func Xusleep(tls *TLS, useconds uint32) (r int32) { @@ -152676,8 +152674,8 @@ func Xusleep(tls *TLS, useconds uint32) (r int32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(useconds / uint32(1000000)), - Ftv_nsec: int64(useconds % uint32(1000000) * uint32(1000)), + Ftv_sec: Int64FromUint32(useconds / uint32(1000000)), + Ftv_nsec: Int64FromUint32(useconds % uint32(1000000) * uint32(1000)), } return Xnanosleep(tls, bp, bp) } @@ -152687,7 +152685,7 @@ func Xwrite(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -152695,7 +152693,7 @@ func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func __ccgo_fp(f interface{}) uintptr { @@ -153070,22 +153068,22 @@ var X__fsmu8 = [51]Tuint32_t{ 11: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x0), 31: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x1), 32: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x2), @@ -154992,7 +154990,7 @@ var Xsigngam int32 var X__stack_chk_guard Tuintptr_t var X__stderr_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf5)) + uintptr(UNGET), Ffd: int32(2), Flock: -int32(1), @@ -155002,7 +155000,7 @@ var X__stderr_FILE = TFILE{ var X__stderr_used = uintptr(unsafe.Pointer(&X__stderr_FILE)) var X__stdin_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), Fbuf: uintptr(unsafe.Pointer(&_buf6)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Flock: -int32(1), @@ -155013,7 +155011,7 @@ var X__stdin_used = uintptr(unsafe.Pointer(&X__stdin_FILE)) var X__stdio_ofl_lockptr = uintptr(unsafe.Pointer(&_ofl_lock)) var X__stdout_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf7)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Ffd: int32(1), diff --git a/vendor/modernc.org/libc/ccgo_linux_riscv64.go b/vendor/modernc.org/libc/ccgo_linux_riscv64.go index 43926ed4..884510da 100644 --- a/vendor/modernc.org/libc/ccgo_linux_riscv64.go +++ b/vendor/modernc.org/libc/ccgo_linux_riscv64.go @@ -9,10 +9,8 @@ import ( "unsafe" ) -var ( - _ reflect.Type - _ unsafe.Pointer -) +var _ reflect.Type +var _ unsafe.Pointer const BIG_ENDIAN = 4321 const BYTE_ORDER = 1234 @@ -559,8 +557,8 @@ func ___frexp_exp(tls *TLS, x float64, expt uintptr) (r float64) { */ exp_x = Xexp(tls, x-_kln2) hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&exp_x)) >> int32(32)) - *(*int32)(unsafe.Pointer(expt)) = int32(hx>>Int32FromInt32(20) - uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) - v1 = uint64(hx&Uint32FromInt32(0xfffff)|uint32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(20) - Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) + v1 = uint64(hx&Uint32FromInt32(0xfffff)|Uint32FromInt32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) - v1 = hx&uint32(0x7fffff) | uint32((Int32FromInt32(0x7f)+Int32FromInt32(127))<>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) + v1 = hx&uint32(0x7fffff) | Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(127))<> Int32FromInt32(63)) + zineg = Int32FromUint64(v1 >> Int32FromInt32(63)) z = Xcacos(tls, z) if zineg != 0 { v3 = [2]float64{ @@ -787,7 +785,7 @@ func Xcacoshf(tls *TLS, z complex64) (r complex64) { v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: - zineg = int32(v1 >> Int32FromInt32(31)) + zineg = Int32FromUint32(v1 >> Int32FromInt32(31)) z = Xcacosf(tls, z) if zineg != 0 { v3 = [2]float32{ @@ -1168,11 +1166,11 @@ func Xccosh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -1329,8 +1327,8 @@ func Xccoshf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -1924,11 +1922,11 @@ func Xcsinh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -2086,8 +2084,8 @@ func Xcsinhf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -2282,7 +2280,7 @@ _9: v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v12 = [2]float64{ 0: Xfabs(tls, b-b), 1: Xcopysign(tls, a, b), @@ -2402,7 +2400,7 @@ _9: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v12 = [2]float32{ 0: Xfabsf(tls, b-b), 1: Xcopysignf(tls, a, b), @@ -3164,14 +3162,14 @@ func Xconfstr(tls *TLS, name int32, buf uintptr, len1 Tsize_t) (r Tsize_t) { if !(name != 0) { s = __ccgo_ts + 1 } else { - if uint32(name) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { + if Uint32FromInt32(name) & ^Uint32FromUint32(4) != uint32(1) && Uint32FromInt32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uint64(0) } } // snprintf is overkill but avoid wasting code size to implement // this completely useless function and its truncation semantics - return uint64(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) + return Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) } const ARG_MAX = 131072 @@ -3289,7 +3287,7 @@ func Xfpathconf(tls *TLS, fd int32, name int32) (r int64) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { + if Uint64FromInt32(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -7353,7 +7351,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { var _ /* set at bp+16 */ [128]uint8 var _ /* si at bp+144 */ Tsysinfo _, _, _, _, _, _, _, _ = cnt, i, mem, val, v1, v3, v6, p5 - if uint64(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { + if Uint64FromInt32(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } else { @@ -7370,11 +7368,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v1 = (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur } - return int64(v1) + return Int64FromUint64(v1) } } } - switch int32(uint8(_values1[name])) { + switch Int32FromUint8(Uint8FromInt16(_values1[name])) { case (-Int32FromInt32(256) | Int32FromInt32(1)) & Int32FromInt32(255): return int64(200809) case (-Int32FromInt32(256) | Int32FromInt32(2)) & Int32FromInt32(255): @@ -7382,7 +7380,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { case (-Int32FromInt32(256) | Int32FromInt32(3)) & Int32FromInt32(255): return int64(MQ_PRIO_MAX) case (-Int32FromInt32(256) | Int32FromInt32(4)) & Int32FromInt32(255): - return int64(X__libc.Fpage_size) + return Int64FromUint64(X__libc.Fpage_size) case (-Int32FromInt32(256) | Int32FromInt32(5)) & Int32FromInt32(255): return int64(SEM_VALUE_MAX) case (-Int32FromInt32(256) | Int32FromInt32(11)) & Int32FromInt32(255): @@ -7393,12 +7391,12 @@ func Xsysconf(tls *TLS, name int32) (r int64) { *(*[128]uint8)(unsafe.Pointer(bp + 16)) = [128]uint8{ 0: uint8(1), } - X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), int64(Uint64FromInt64(128)), int64(bp+16)) + X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), Int64FromUint64(Uint64FromInt64(128)), int64(bp+16)) v3 = Int32FromInt32(0) cnt = v3 i = v3 for { - if !(uint64(i) < uint64(128)) { + if !(Uint64FromInt32(i) < uint64(128)) { break } for { @@ -7409,7 +7407,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { _4: ; p5 = bp + 16 + uintptr(i) - *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (int32((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (Int32FromUint8((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) cnt++ } goto _2 @@ -7437,11 +7435,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v6 = mem } - return int64(v6) + return Int64FromUint64(v6) case (-Int32FromInt32(256) | Int32FromInt32(12)) & Int32FromInt32(255): fallthrough case (-Int32FromInt32(256) | Int32FromInt32(13)) & Int32FromInt32(255): - val = int64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) + val = Int64FromUint64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) if val < int64(MINSIGSTKSZ) { val = int64(MINSIGSTKSZ) } @@ -9071,14 +9069,14 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags * Prefix "$2x$": bug = 1, safety = 0 * Prefix "$2y$": bug = 0, safety = 0 */ - bug = uint32(int32(flags) & int32(1)) + bug = Uint32FromInt32(Int32FromUint8(flags) & int32(1)) safety = uint32(flags) & uint32(2) << int32(15) v1 = Uint32FromInt32(0) diff = v1 sign = v1 i = uint32(0) for { - if !(i < uint32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { + if !(i < Uint32FromInt32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { break } v3 = Uint32FromInt32(0) @@ -9092,7 +9090,7 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags *(*TBF_word)(unsafe.Pointer(bp)) <<= uint32(8) *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(*(*uint8)(unsafe.Pointer(ptr))) /* correct */ *(*TBF_word)(unsafe.Pointer(bp + 1*4)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(int8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ + *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= Uint32FromInt8(Int8FromUint8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ /* * Sign extension in the first char has no effect - nothing to overwrite yet, * and those extra 24 bits will be fully shifted out of the 32-bit word. For @@ -9172,15 +9170,15 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w } } _, _, _, _, _, _, _, _, _, _, _, _, _ = L, L1, R, count, done, i, ptr, tmp1, tmp2, tmp3, tmp4, v1, v6 - if int32(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { return UintptrFromInt32(0) } - count = Uint32FromInt32(1) << ((int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (int32(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) + count = Uint32FromInt32(1) << ((Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) if count < min || _BF_decode(tls, bp+4240, setting+7, int32(16)) != 0 { return UintptrFromInt32(0) } _BF_swap(tls, bp+4240, int32(4)) - _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) Xmemcpy(tls, bp+72, uintptr(unsafe.Pointer(&_BF_init_state))+72, uint64(4096)) L = uint32(0) R = uint32(0) @@ -9272,8 +9270,8 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w ; i += int32(2) } - Xmemcpy(tls, output, setting, uint64(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) - *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[int32(_BF_atoi64[int32(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] + Xmemcpy(tls, output, setting, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[Int32FromUint8(_BF_atoi64[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] /* This has to be bug-compatible with the original implementation, so * only encode 23 of the 24 bytes. :-) */ _BF_swap(tls, bp+4240, int32(6)) @@ -9337,14 +9335,14 @@ func X__crypt_blowfish(tls *TLS, key uintptr, setting uintptr, output uintptr) ( */ Xmemcpy(tls, bp, test_setting, uint64(30)) if retval != 0 { - flags = uint32(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + flags = uint32(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) test_hash = uintptr(unsafe.Pointer(&_test_hashes)) + uintptr(flags&uint32(1))*34 *(*uint8)(unsafe.Pointer(bp + 2)) = *(*uint8)(unsafe.Pointer(setting + 2)) } Xmemset(tls, bp+30, int32(0x55), uint64(63)) *(*uint8)(unsafe.Pointer(bp + 30 + uintptr(Uint64FromInt64(63)-Uint64FromInt32(1)))) = uint8(0) p = _BF_crypt(tls, test_key, bp, bp+30, uint32(1)) - ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, uint64(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, uint64(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) + ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, Uint64FromInt32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) k = __ccgo_ts + 58 _BF_set_key(tls, k, bp+96, bp+168, uint8(2)) /* $2a$ */ _BF_set_key(tls, k, bp+240, bp+312, uint8(4)) /* $2y$ */ @@ -11154,7 +11152,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { } } retval &= int32(0x3f) - return uint32(retval) + return Uint32FromInt32(retval) } // C documentation @@ -11164,7 +11162,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { // * containing characters that would violate the passwd file format. // */ func _ascii_is_unsafe(tls *TLS, ch uint8) (r int32) { - return BoolInt32(!(ch != 0) || int32(ch) == int32('\n') || int32(ch) == int32(':')) + return BoolInt32(!(ch != 0) || Int32FromUint8(ch) == int32('\n') || Int32FromUint8(ch) == int32(':')) } func _setup_salt(tls *TLS, salt Tuint32_t) (r Tuint32_t) { @@ -11415,13 +11413,13 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin for q <= bp+128+uintptr(Uint64FromInt64(8)-Uint64FromInt32(1)) { v1 = q q++ - *(*uint8)(unsafe.Pointer(v1)) = uint8(int32(*(*uint8)(unsafe.Pointer(key))) << int32(1)) + *(*uint8)(unsafe.Pointer(v1)) = Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(key))) << int32(1)) if *(*uint8)(unsafe.Pointer(key)) != 0 { key++ } } X__des_setkey(tls, bp+128, bp) - if int32(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { /* * "new"-style: * setting - underscore, 4 chars of count, 4 chars of salt @@ -11433,8 +11431,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(5)) { break } - value = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } count |= value << ((i - uint32(1)) * uint32(6)) @@ -11452,8 +11450,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(9)) { break } - value1 = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value1]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value1 = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value1]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } salt |= value1 << ((i - uint32(5)) * uint32(6)) @@ -11477,7 +11475,7 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin p4 = v5 v6 = key key++ - *(*uint8)(unsafe.Pointer(p4)) = uint8(int32(*(*uint8)(unsafe.Pointer(p4))) ^ int32(*(*uint8)(unsafe.Pointer(v6)))< uint32(KEY_MAX) { return uintptr(0) } @@ -11907,7 +11905,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt salt = setting + uintptr(3) i = uint32(0) for { - if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } goto _1 @@ -11995,7 +11993,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt if !(i < uint32(5)) { break } - p = _to64(tls, p, uint32(int32((*(*[16]uint8)(unsafe.Pointer(bp + 88)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm)) + uintptr(i)*3))])< uint32(KEY_MAX1) { return uintptr(0) } @@ -12424,7 +12422,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui return uintptr(0) } u = Xstrtoul(tls, salt, bp+224, int32(10)) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224))))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224))))) != int32('$') { return uintptr(0) } salt = *(*uintptr)(unsafe.Pointer(bp + 224)) + uintptr(1) @@ -12442,11 +12440,11 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui } i = uint32(0) for { - if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } /* reject characters that interfere with /etc/shadow parsing */ - if int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { return uintptr(0) } goto _1 @@ -12500,7 +12498,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha256_init(tls, bp) i = uint32(0) for { - if !(i < uint32(int32(16)+int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { + if !(i < Uint32FromInt32(int32(16)+Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { break } _sha256_update(tls, bp, salt, uint64(slen)) @@ -12547,13 +12545,13 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(10)) { break } - p = _to641(tls, p, uint32(int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm1)) + uintptr(i)*3))])<= 0) { break } - *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= uint32(int32(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j + *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j goto _2 _2: ; @@ -13377,134 +13375,134 @@ func Xencrypt(tls *TLS, block uintptr, edflag int32) { } var _table = [384]uint16{ - 128: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 129: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 130: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 131: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 132: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 133: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 134: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 135: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 136: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 137: uint16((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 138: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 139: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 140: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 141: uint16((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 142: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 143: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 144: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 145: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 146: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 147: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 148: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 149: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 150: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 151: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 152: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 153: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 154: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 155: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 156: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 157: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 158: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 159: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 160: uint16((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 161: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 162: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 163: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 164: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 165: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 166: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 167: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 168: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 169: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 170: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 171: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 172: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 173: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 174: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 175: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 176: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 177: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 178: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 179: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 180: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 181: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 182: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 183: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 184: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 185: uint16((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 186: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 187: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 188: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 189: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 190: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 191: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 192: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 193: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 194: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 195: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 196: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 197: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 198: uint16((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 199: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 200: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 201: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 202: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 203: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 204: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 205: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 206: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 207: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 208: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 209: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 210: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 211: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 212: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 213: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 214: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 215: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 216: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 217: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 218: uint16((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 219: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 220: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 221: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 222: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 223: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 224: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 225: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 226: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 227: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 228: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 229: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 230: uint16((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 231: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 232: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 233: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 234: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 235: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 236: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 237: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 238: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 239: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 240: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 241: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 242: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 243: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 244: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 245: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 246: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 247: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 248: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 249: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 250: uint16((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 251: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 252: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 253: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 254: uint16((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), - 255: uint16((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 128: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 129: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 130: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 131: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 132: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 133: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 134: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 135: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 136: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 137: Uint16FromInt32((Int32FromInt32(0x320)/Int32FromInt32(256) | Int32FromInt32(0x320)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 138: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 139: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 140: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 141: Uint16FromInt32((Int32FromInt32(0x220)/Int32FromInt32(256) | Int32FromInt32(0x220)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 142: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 143: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 144: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 145: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 146: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 147: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 148: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 149: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 150: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 151: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 152: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 153: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 154: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 155: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 156: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 157: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 158: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 159: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 160: Uint16FromInt32((Int32FromInt32(0x160)/Int32FromInt32(256) | Int32FromInt32(0x160)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 161: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 162: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 163: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 164: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 165: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 166: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 167: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 168: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 169: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 170: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 171: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 172: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 173: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 174: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 175: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 176: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 177: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 178: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 179: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 180: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 181: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 182: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 183: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 184: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 185: Uint16FromInt32((Int32FromInt32(0x8d8)/Int32FromInt32(256) | Int32FromInt32(0x8d8)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 186: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 187: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 188: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 189: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 190: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 191: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 192: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 193: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 194: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 195: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 196: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 197: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 198: Uint16FromInt32((Int32FromInt32(0x8d5)/Int32FromInt32(256) | Int32FromInt32(0x8d5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 199: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 200: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 201: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 202: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 203: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 204: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 205: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 206: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 207: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 208: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 209: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 210: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 211: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 212: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 213: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 214: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 215: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 216: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 217: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 218: Uint16FromInt32((Int32FromInt32(0x8c5)/Int32FromInt32(256) | Int32FromInt32(0x8c5)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 219: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 220: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 221: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 222: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 223: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 224: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 225: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 226: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 227: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 228: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 229: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 230: Uint16FromInt32((Int32FromInt32(0x8d6)/Int32FromInt32(256) | Int32FromInt32(0x8d6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 231: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 232: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 233: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 234: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 235: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 236: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 237: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 238: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 239: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 240: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 241: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 242: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 243: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 244: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 245: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 246: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 247: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 248: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 249: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 250: Uint16FromInt32((Int32FromInt32(0x8c6)/Int32FromInt32(256) | Int32FromInt32(0x8c6)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 251: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 252: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 253: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 254: Uint16FromInt32((Int32FromInt32(0x4c0)/Int32FromInt32(256) | Int32FromInt32(0x4c0)*Int32FromInt32(256)) % Int32FromInt32(65536)), + 255: Uint16FromInt32((Int32FromInt32(0x200)/Int32FromInt32(256) | Int32FromInt32(0x200)*Int32FromInt32(256)) % Int32FromInt32(65536)), } var _ptable = uintptr(unsafe.Pointer(&_table)) + uintptr(128)*2 @@ -13844,7 +13842,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) { } else { v1 = int32(1) } - return uint64(v1) + return Uint64FromInt32(v1) } var _table1 = [384]Tint32_t{ @@ -14132,7 +14130,7 @@ func Xisalnum(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0) + return BoolInt32(BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0) } func X__isalnum_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14156,7 +14154,7 @@ func Xisalpha(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14212,7 +14210,7 @@ func Xiscntrl(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c) < uint32(0x20) || c == int32(0x7f)) + return BoolInt32(Uint32FromInt32(c) < uint32(0x20) || c == int32(0x7f)) } func X__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14236,7 +14234,7 @@ func Xisdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('0') < uint32(10)) + return BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14260,7 +14258,7 @@ func Xisgraph(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) } func X__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14284,7 +14282,7 @@ func Xislower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14308,7 +14306,7 @@ func Xisprint(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x20) < uint32(0x5f)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14332,7 +14330,7 @@ func Xispunct(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) } func X__ispunct_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14356,7 +14354,7 @@ func Xisspace(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(c == int32(' ') || uint32(c)-uint32('\t') < uint32(5)) + return BoolInt32(c == int32(' ') || Uint32FromInt32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14380,7 +14378,7 @@ func Xisupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('A') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -17273,7 +17271,7 @@ func Xiswalpha(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table3[uint32(int32(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table3[Uint32FromInt32(Int32FromUint8(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } if wc < uint32(0x2fffe) { return int32(1) @@ -17302,7 +17300,7 @@ func Xiswblank(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return Xisblank(tls, int32(wc)) + return Xisblank(tls, Int32FromUint32(wc)) } func X__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32) { @@ -17406,8 +17404,8 @@ func Xwctype(tls *TLS, s uintptr) (r Twctype_t) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { - return uint64(i) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { + return Uint64FromInt32(i) } goto _1 _1: @@ -17541,10 +17539,10 @@ func Xiswprint(tls *TLS, wc Twint_t) (r int32) { if wc < uint32(0xff) { return BoolInt32((wc+uint32(1))&uint32(0x7f) >= uint32(0x21)) } - if wc < uint32(0x2028) || wc-uint32(0x202a) < uint32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < uint32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { + if wc < uint32(0x2028) || wc-uint32(0x202a) < Uint32FromInt32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < Uint32FromInt32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { return int32(1) } - if wc-uint32(0xfffc) > uint32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { + if wc-uint32(0xfffc) > Uint32FromInt32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { return 0 } return int32(1) @@ -19124,7 +19122,7 @@ func Xiswpunct(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table4[uint32(int32(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table4[Uint32FromInt32(Int32FromUint8(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } return 0 } @@ -19161,7 +19159,7 @@ func Xiswspace(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), int32(wc)) != 0) + return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), Int32FromUint32(wc)) != 0) } var _spaces = [22]Twchar_t{ @@ -19257,7 +19255,7 @@ func Xisxdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0 || Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -19292,7 +19290,7 @@ func Xtolower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('A') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) != 0 { return c | int32(32) } return c @@ -19319,7 +19317,7 @@ func Xtoupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('a') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) != 0 { return c & int32(0x5f) } return c @@ -22125,40 +22123,40 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { var b, rt, try, v, x, xb, xn, y uint32 var c0, r, rd, v1 int32 _, _, _, _, _, _, _, _, _, _, _, _ = b, c0, r, rd, rt, try, v, x, xb, xn, y, v1 - c0 = int32(c) + c0 = Int32FromUint32(c) if c >= uint32(0x20000) { - return int32(c) + return Int32FromUint32(c) } b = c >> int32(8) c &= uint32(255) x = c / uint32(3) y = c % uint32(3) /* lookup entry in two-level base-6 table */ - v = uint32(_tab1[uint32(int32(_tab1[b])*int32(86))+x]) - v = v * uint32(_mt[y]) >> int32(11) % uint32(6) + v = uint32(_tab1[Uint32FromInt32(Int32FromUint8(_tab1[b])*int32(86))+x]) + v = v * Uint32FromInt32(_mt[y]) >> int32(11) % uint32(6) /* use the bit vector out of the tables as an index into * a block-specific set of rules and decode the rule into * a type and a case-mapping delta. */ r = _rules[uint32(_rulebases[b])+v] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) /* rules 0/1 are simple lower/upper case with a delta. * apply according to desired mapping direction. */ if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* binary search. endpoints of the binary search for * this block are stored in the rule delta field. */ - xn = uint32(rd & int32(0xff)) - xb = uint32(rd) >> int32(8) + xn = Uint32FromInt32(rd & int32(0xff)) + xb = Uint32FromInt32(rd) >> int32(8) for xn != 0 { try = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2))) if try == c { r = _rules[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2 + 1))] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* Hard-coded for the four exceptional titlecase */ if dir != 0 { @@ -22190,7 +22188,7 @@ func Xtowlower(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, 0)) + return Uint32FromInt32(_casemap(tls, wc, 0)) } func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { @@ -22198,7 +22196,7 @@ func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, int32(1))) + return Uint32FromInt32(_casemap(tls, wc, int32(1))) } func X__towupper_l(tls *TLS, c Twint_t, l Tlocale_t) (r Twint_t) { @@ -24397,7 +24395,7 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } var v1, v2 int32 _, _ = v1, v2 - if uint32(wc) < uint32(0xff) { + if Uint32FromInt32(wc) < uint32(0xff) { if (wc+int32(1))&int32(0x7f) >= int32(0x21) { v1 = int32(1) } else { @@ -24410,11 +24408,11 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } return v1 } - if uint32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { - if int32(_table5[int32(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Uint32FromInt32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { + if Int32FromUint8(_table5[Int32FromUint8(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return 0 } - if int32(_wtable[int32(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Int32FromUint8(_wtable[Int32FromUint8(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return int32(2) } return int32(1) @@ -24422,10 +24420,10 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { if wc&int32(0xfffe) == int32(0xfffe) { return -int32(1) } - if uint32(wc)-uint32(0x20000) < uint32(0x20000) { + if Uint32FromInt32(wc)-uint32(0x20000) < uint32(0x20000) { return int32(2) } - if wc == int32(0xe0001) || uint32(wc)-uint32(0xe0020) < uint32(0x5f) || uint32(wc)-uint32(0xe0100) < uint32(0xef) { + if wc == int32(0xe0001) || Uint32FromInt32(wc)-uint32(0xe0020) < uint32(0x5f) || Uint32FromInt32(wc)-uint32(0xe0100) < uint32(0xef) { return 0 } return int32(1) @@ -24753,7 +24751,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { var len1 int32 _, _ = de, len1 if (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos >= (*TDIR)(unsafe.Pointer(dir)).Fbuf_end { - len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), int64(Uint64FromInt64(2048)))) + len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), Int64FromUint64(Uint64FromInt64(2048)))) if len1 <= 0 { if len1 < 0 && len1 != -int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = -len1 @@ -24764,7 +24762,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos = 0 } de = dir + 24 + uintptr((*TDIR)(unsafe.Pointer(dir)).Fbuf_pos) - *(*int32)(unsafe.Pointer(dir + 12)) += int32((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) + *(*int32)(unsafe.Pointer(dir + 12)) += Int32FromUint16((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) (*TDIR)(unsafe.Pointer(dir)).Ftell = (*Tdirent)(unsafe.Pointer(de)).Fd_off return de } @@ -24879,7 +24877,7 @@ func Xscandir(tls *TLS, path uintptr, res uintptr, sel uintptr, cmp uintptr) (r Xqsort(tls, names, cnt, uint64(8), cmp) } *(*uintptr)(unsafe.Pointer(res)) = names - return int32(cnt) + return Int32FromUint64(cnt) } func Xseekdir(tls *TLS, dir uintptr, off int64) { @@ -25007,14 +25005,14 @@ func Xgetenv(tls *TLS, name uintptr) (r uintptr) { var e uintptr var l Tsize_t _, _ = e, l - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if l != 0 && !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) && Xenviron != 0 { e = Xenviron for { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { return *(*uintptr)(unsafe.Pointer(e)) + uintptr(l) + uintptr(1) } goto _1 @@ -25097,7 +25095,7 @@ func Xputenv(tls *TLS, s uintptr) (r int32) { } var l Tsize_t _ = l - l = uint64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) + l = Uint64FromInt64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) if !(l != 0) || !(*(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0) { return Xunsetenv(tls, s) } @@ -25186,7 +25184,7 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) (r int32) { var v2 bool _, _, _, _, _ = l1, l2, s, v1, v2 if v2 = !(var1 != 0); !v2 { - v1 = uint64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) + v1 = Uint64FromInt64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) l1 = v1 } if v2 || !(v1 != 0) || *(*uint8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { @@ -25218,7 +25216,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { var e, eo, v2 uintptr var l Tsize_t _, _, _, _ = e, eo, l, v2 - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if !(l != 0) || *(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) @@ -25230,7 +25228,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { X__env_rm_add(tls, *(*uintptr)(unsafe.Pointer(e)), uintptr(0)) } else { if eo != e { @@ -25553,7 +25551,7 @@ func X__strerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { } var s uintptr _ = s - if uint64(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { + if Uint64FromInt32(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { e = 0 } s = uintptr(unsafe.Pointer(&_errmsgstr)) + uintptr(_errmsgidx[e]) @@ -25682,7 +25680,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { arg |= uint64(O_LARGEFILE) } if cmd == int32(F_SETLKW) { - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) } if cmd == int32(F_GETOWN) { ret = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETOWN_EX)), int64(bp))) @@ -25690,7 +25688,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))) } if ret != 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*(*Tf_owner_ex)(unsafe.Pointer(bp))).Ftype1 == int32(F_OWNER_PGRP) { v1 = -(*(*Tf_owner_ex)(unsafe.Pointer(bp))).Fpid @@ -25700,25 +25698,25 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return v1 } if cmd == int32(F_DUPFD_CLOEXEC) { - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), Int64FromUint64(arg))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(Int32FromInt32(0)))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall1(tls, int64(SYS_close), int64(ret1)) } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), Int64FromUint64(arg))) if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } switch cmd { case int32(F_SETLK): @@ -25728,9 +25726,9 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { case int32(F_GETOWN_EX): fallthrough case int32(F_SETOWN_EX): - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) default: - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(arg))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), Int64FromUint64(arg))))) } return r } @@ -25750,11 +25748,11 @@ func Xopen(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) { mode = VaUint32(&ap) _ = ap } - fd = int32(___syscall_cp(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0)) + fd = int32(___syscall_cp(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0)) if fd >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(fd))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd))) } func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r int32) { @@ -25771,7 +25769,7 @@ func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r i mode = VaUint32(&ap) _ = ap } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0)))) } func Xposix_fadvise(tls *TLS, fd int32, base Toff_t, len1 Toff_t, advice int32) (r int32) { @@ -25867,7 +25865,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -25878,18 +25876,18 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__shgetc(tls, f) } c = v4 - if uint32(c-int32('0')) >= uint32(10) && pok != 0 { + if Uint32FromInt32(c-int32('0')) >= uint32(10) && pok != 0 { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } } } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -25897,7 +25895,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } x = 0 for { - if !(uint32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { break } x = int32(10)*x + c - int32('0') @@ -25908,7 +25906,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v12 = f + 8 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__shgetc(tls, f) } @@ -25916,7 +25914,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } y = int64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { break } y = int64(10)*y + int64(c) - int64('0') @@ -25927,14 +25925,14 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 } for { - if !(uint32(c-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10)) { break } goto _17 @@ -25944,7 +25942,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v20 = f + 8 v19 = *(*uintptr)(unsafe.Pointer(v20)) *(*uintptr)(unsafe.Pointer(v20))++ - v18 = int32(*(*uint8)(unsafe.Pointer(v19))) + v18 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) } else { v18 = X__shgetc(tls, f) } @@ -25997,7 +25995,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } @@ -26009,7 +26007,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v8 = f + 8 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ - v6 = int32(*(*uint8)(unsafe.Pointer(v7))) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v7))) } else { v6 = X__shgetc(tls, f) } @@ -26027,7 +26025,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } @@ -26036,7 +26034,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0] = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || c == int32('.')) { break } if c == int32('.') { @@ -26052,9 +26050,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, lnz = int32(dc) } if j != 0 { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(c) - uint32('0') + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + Uint32FromInt32(c) - uint32('0') } else { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(c - int32('0')) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = Uint32FromInt32(c - int32('0')) } j++ v13 = j @@ -26078,7 +26076,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } @@ -26186,9 +26184,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % uint32(p10) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/uint32(p10) + carry - carry = uint32(int32(1000000000)/p10) * tmp + tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % Uint32FromInt32(p10) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/Uint32FromInt32(p10) + carry + carry = Uint32FromInt32(int32(1000000000)/p10) * tmp if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) rp -= int32(9) @@ -26275,9 +26273,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp2 = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] & uint32(int32(1)<>sh + carry2 - carry2 = uint32(Int32FromInt32(1000000000)>>sh) * tmp2 + carry2 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh) * tmp2 if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) i-- @@ -26410,7 +26408,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26428,7 +26426,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__shgetc(tls, f) } @@ -26440,7 +26438,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26459,7 +26457,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26468,7 +26466,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } } for { - if !(uint32(c-int32('0')) < uint32(10) || uint32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { break } if c == int32('.') { @@ -26485,7 +26483,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 d = c - int32('0') } if dc < int64(8) { - x = x*uint32(16) + uint32(d) + x = x*uint32(16) + Uint32FromInt32(d) } else { if dc < int64(Int32FromInt32(LDBL_MANT_DIG)/Int32FromInt32(4)+Int32FromInt32(1)) { scale /= Float64FromInt32(16) @@ -26506,7 +26504,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v18 = f + 8 v17 = *(*uintptr)(unsafe.Pointer(v18)) *(*uintptr)(unsafe.Pointer(v18))++ - v16 = int32(*(*uint8)(unsafe.Pointer(v17))) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) } else { v16 = X__shgetc(tls, f) } @@ -26626,14 +26624,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -26646,7 +26644,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26654,7 +26652,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { } i = uint64(0) for { - if !(i < uint64(8) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 247 + uintptr(i))))) { + if !(i < uint64(8) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 247 + uintptr(i))))) { break } if i < uint64(7) { @@ -26662,7 +26660,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26698,7 +26696,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { if !(i != 0) { i = uint64(0) for { - if !(i < uint64(3) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 256 + uintptr(i))))) { + if !(i < uint64(3) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 256 + uintptr(i))))) { break } if i < uint64(2) { @@ -26706,7 +26704,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v21 = f + 8 v20 = *(*uintptr)(unsafe.Pointer(v21)) *(*uintptr)(unsafe.Pointer(v21))++ - v19 = int32(*(*uint8)(unsafe.Pointer(v20))) + v19 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v20))) } else { v19 = X__shgetc(tls, f) } @@ -26723,7 +26721,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v24 = f + 8 v23 = *(*uintptr)(unsafe.Pointer(v24)) *(*uintptr)(unsafe.Pointer(v24))++ - v22 = int32(*(*uint8)(unsafe.Pointer(v23))) + v22 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) } else { v22 = X__shgetc(tls, f) } @@ -26739,12 +26737,12 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v29 = f + 8 v28 = *(*uintptr)(unsafe.Pointer(v29)) *(*uintptr)(unsafe.Pointer(v29))++ - v27 = int32(*(*uint8)(unsafe.Pointer(v28))) + v27 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) } else { v27 = X__shgetc(tls, f) } c = v27 - if uint32(c-int32('0')) < uint32(10) || uint32(c-int32('A')) < uint32(26) || uint32(c-int32('a')) < uint32(26) || c == int32('_') { + if Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c-int32('A')) < uint32(26) || Uint32FromInt32(c-int32('a')) < uint32(26) || c == int32('_') { goto _26 } if c == int32(')') { @@ -26789,7 +26787,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v36 = f + 8 v35 = *(*uintptr)(unsafe.Pointer(v36)) *(*uintptr)(unsafe.Pointer(v36))++ - v34 = int32(*(*uint8)(unsafe.Pointer(v35))) + v34 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v35))) } else { v34 = X__shgetc(tls, f) } @@ -26809,55 +26807,55 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { // // /* Lookup table for digit values. -1==255>=36 -> invalid */ var _table6 = [257]uint8{ - 0: uint8(-Int32FromInt32(1)), - 1: uint8(-Int32FromInt32(1)), - 2: uint8(-Int32FromInt32(1)), - 3: uint8(-Int32FromInt32(1)), - 4: uint8(-Int32FromInt32(1)), - 5: uint8(-Int32FromInt32(1)), - 6: uint8(-Int32FromInt32(1)), - 7: uint8(-Int32FromInt32(1)), - 8: uint8(-Int32FromInt32(1)), - 9: uint8(-Int32FromInt32(1)), - 10: uint8(-Int32FromInt32(1)), - 11: uint8(-Int32FromInt32(1)), - 12: uint8(-Int32FromInt32(1)), - 13: uint8(-Int32FromInt32(1)), - 14: uint8(-Int32FromInt32(1)), - 15: uint8(-Int32FromInt32(1)), - 16: uint8(-Int32FromInt32(1)), - 17: uint8(-Int32FromInt32(1)), - 18: uint8(-Int32FromInt32(1)), - 19: uint8(-Int32FromInt32(1)), - 20: uint8(-Int32FromInt32(1)), - 21: uint8(-Int32FromInt32(1)), - 22: uint8(-Int32FromInt32(1)), - 23: uint8(-Int32FromInt32(1)), - 24: uint8(-Int32FromInt32(1)), - 25: uint8(-Int32FromInt32(1)), - 26: uint8(-Int32FromInt32(1)), - 27: uint8(-Int32FromInt32(1)), - 28: uint8(-Int32FromInt32(1)), - 29: uint8(-Int32FromInt32(1)), - 30: uint8(-Int32FromInt32(1)), - 31: uint8(-Int32FromInt32(1)), - 32: uint8(-Int32FromInt32(1)), - 33: uint8(-Int32FromInt32(1)), - 34: uint8(-Int32FromInt32(1)), - 35: uint8(-Int32FromInt32(1)), - 36: uint8(-Int32FromInt32(1)), - 37: uint8(-Int32FromInt32(1)), - 38: uint8(-Int32FromInt32(1)), - 39: uint8(-Int32FromInt32(1)), - 40: uint8(-Int32FromInt32(1)), - 41: uint8(-Int32FromInt32(1)), - 42: uint8(-Int32FromInt32(1)), - 43: uint8(-Int32FromInt32(1)), - 44: uint8(-Int32FromInt32(1)), - 45: uint8(-Int32FromInt32(1)), - 46: uint8(-Int32FromInt32(1)), - 47: uint8(-Int32FromInt32(1)), - 48: uint8(-Int32FromInt32(1)), + 0: Uint8FromInt32(-Int32FromInt32(1)), + 1: Uint8FromInt32(-Int32FromInt32(1)), + 2: Uint8FromInt32(-Int32FromInt32(1)), + 3: Uint8FromInt32(-Int32FromInt32(1)), + 4: Uint8FromInt32(-Int32FromInt32(1)), + 5: Uint8FromInt32(-Int32FromInt32(1)), + 6: Uint8FromInt32(-Int32FromInt32(1)), + 7: Uint8FromInt32(-Int32FromInt32(1)), + 8: Uint8FromInt32(-Int32FromInt32(1)), + 9: Uint8FromInt32(-Int32FromInt32(1)), + 10: Uint8FromInt32(-Int32FromInt32(1)), + 11: Uint8FromInt32(-Int32FromInt32(1)), + 12: Uint8FromInt32(-Int32FromInt32(1)), + 13: Uint8FromInt32(-Int32FromInt32(1)), + 14: Uint8FromInt32(-Int32FromInt32(1)), + 15: Uint8FromInt32(-Int32FromInt32(1)), + 16: Uint8FromInt32(-Int32FromInt32(1)), + 17: Uint8FromInt32(-Int32FromInt32(1)), + 18: Uint8FromInt32(-Int32FromInt32(1)), + 19: Uint8FromInt32(-Int32FromInt32(1)), + 20: Uint8FromInt32(-Int32FromInt32(1)), + 21: Uint8FromInt32(-Int32FromInt32(1)), + 22: Uint8FromInt32(-Int32FromInt32(1)), + 23: Uint8FromInt32(-Int32FromInt32(1)), + 24: Uint8FromInt32(-Int32FromInt32(1)), + 25: Uint8FromInt32(-Int32FromInt32(1)), + 26: Uint8FromInt32(-Int32FromInt32(1)), + 27: Uint8FromInt32(-Int32FromInt32(1)), + 28: Uint8FromInt32(-Int32FromInt32(1)), + 29: Uint8FromInt32(-Int32FromInt32(1)), + 30: Uint8FromInt32(-Int32FromInt32(1)), + 31: Uint8FromInt32(-Int32FromInt32(1)), + 32: Uint8FromInt32(-Int32FromInt32(1)), + 33: Uint8FromInt32(-Int32FromInt32(1)), + 34: Uint8FromInt32(-Int32FromInt32(1)), + 35: Uint8FromInt32(-Int32FromInt32(1)), + 36: Uint8FromInt32(-Int32FromInt32(1)), + 37: Uint8FromInt32(-Int32FromInt32(1)), + 38: Uint8FromInt32(-Int32FromInt32(1)), + 39: Uint8FromInt32(-Int32FromInt32(1)), + 40: Uint8FromInt32(-Int32FromInt32(1)), + 41: Uint8FromInt32(-Int32FromInt32(1)), + 42: Uint8FromInt32(-Int32FromInt32(1)), + 43: Uint8FromInt32(-Int32FromInt32(1)), + 44: Uint8FromInt32(-Int32FromInt32(1)), + 45: Uint8FromInt32(-Int32FromInt32(1)), + 46: Uint8FromInt32(-Int32FromInt32(1)), + 47: Uint8FromInt32(-Int32FromInt32(1)), + 48: Uint8FromInt32(-Int32FromInt32(1)), 50: uint8(1), 51: uint8(2), 52: uint8(3), @@ -26867,13 +26865,13 @@ var _table6 = [257]uint8{ 56: uint8(7), 57: uint8(8), 58: uint8(9), - 59: uint8(-Int32FromInt32(1)), - 60: uint8(-Int32FromInt32(1)), - 61: uint8(-Int32FromInt32(1)), - 62: uint8(-Int32FromInt32(1)), - 63: uint8(-Int32FromInt32(1)), - 64: uint8(-Int32FromInt32(1)), - 65: uint8(-Int32FromInt32(1)), + 59: Uint8FromInt32(-Int32FromInt32(1)), + 60: Uint8FromInt32(-Int32FromInt32(1)), + 61: Uint8FromInt32(-Int32FromInt32(1)), + 62: Uint8FromInt32(-Int32FromInt32(1)), + 63: Uint8FromInt32(-Int32FromInt32(1)), + 64: Uint8FromInt32(-Int32FromInt32(1)), + 65: Uint8FromInt32(-Int32FromInt32(1)), 66: uint8(10), 67: uint8(11), 68: uint8(12), @@ -26900,12 +26898,12 @@ var _table6 = [257]uint8{ 89: uint8(33), 90: uint8(34), 91: uint8(35), - 92: uint8(-Int32FromInt32(1)), - 93: uint8(-Int32FromInt32(1)), - 94: uint8(-Int32FromInt32(1)), - 95: uint8(-Int32FromInt32(1)), - 96: uint8(-Int32FromInt32(1)), - 97: uint8(-Int32FromInt32(1)), + 92: Uint8FromInt32(-Int32FromInt32(1)), + 93: Uint8FromInt32(-Int32FromInt32(1)), + 94: Uint8FromInt32(-Int32FromInt32(1)), + 95: Uint8FromInt32(-Int32FromInt32(1)), + 96: Uint8FromInt32(-Int32FromInt32(1)), + 97: Uint8FromInt32(-Int32FromInt32(1)), 98: uint8(10), 99: uint8(11), 100: uint8(12), @@ -26932,139 +26930,139 @@ var _table6 = [257]uint8{ 121: uint8(33), 122: uint8(34), 123: uint8(35), - 124: uint8(-Int32FromInt32(1)), - 125: uint8(-Int32FromInt32(1)), - 126: uint8(-Int32FromInt32(1)), - 127: uint8(-Int32FromInt32(1)), - 128: uint8(-Int32FromInt32(1)), - 129: uint8(-Int32FromInt32(1)), - 130: uint8(-Int32FromInt32(1)), - 131: uint8(-Int32FromInt32(1)), - 132: uint8(-Int32FromInt32(1)), - 133: uint8(-Int32FromInt32(1)), - 134: uint8(-Int32FromInt32(1)), - 135: uint8(-Int32FromInt32(1)), - 136: uint8(-Int32FromInt32(1)), - 137: uint8(-Int32FromInt32(1)), - 138: uint8(-Int32FromInt32(1)), - 139: uint8(-Int32FromInt32(1)), - 140: uint8(-Int32FromInt32(1)), - 141: uint8(-Int32FromInt32(1)), - 142: uint8(-Int32FromInt32(1)), - 143: uint8(-Int32FromInt32(1)), - 144: uint8(-Int32FromInt32(1)), - 145: uint8(-Int32FromInt32(1)), - 146: uint8(-Int32FromInt32(1)), - 147: uint8(-Int32FromInt32(1)), - 148: uint8(-Int32FromInt32(1)), - 149: uint8(-Int32FromInt32(1)), - 150: uint8(-Int32FromInt32(1)), - 151: uint8(-Int32FromInt32(1)), - 152: uint8(-Int32FromInt32(1)), - 153: uint8(-Int32FromInt32(1)), - 154: uint8(-Int32FromInt32(1)), - 155: uint8(-Int32FromInt32(1)), - 156: uint8(-Int32FromInt32(1)), - 157: uint8(-Int32FromInt32(1)), - 158: uint8(-Int32FromInt32(1)), - 159: uint8(-Int32FromInt32(1)), - 160: uint8(-Int32FromInt32(1)), - 161: uint8(-Int32FromInt32(1)), - 162: uint8(-Int32FromInt32(1)), - 163: uint8(-Int32FromInt32(1)), - 164: uint8(-Int32FromInt32(1)), - 165: uint8(-Int32FromInt32(1)), - 166: uint8(-Int32FromInt32(1)), - 167: uint8(-Int32FromInt32(1)), - 168: uint8(-Int32FromInt32(1)), - 169: uint8(-Int32FromInt32(1)), - 170: uint8(-Int32FromInt32(1)), - 171: uint8(-Int32FromInt32(1)), - 172: uint8(-Int32FromInt32(1)), - 173: uint8(-Int32FromInt32(1)), - 174: uint8(-Int32FromInt32(1)), - 175: uint8(-Int32FromInt32(1)), - 176: uint8(-Int32FromInt32(1)), - 177: uint8(-Int32FromInt32(1)), - 178: uint8(-Int32FromInt32(1)), - 179: uint8(-Int32FromInt32(1)), - 180: uint8(-Int32FromInt32(1)), - 181: uint8(-Int32FromInt32(1)), - 182: uint8(-Int32FromInt32(1)), - 183: uint8(-Int32FromInt32(1)), - 184: uint8(-Int32FromInt32(1)), - 185: uint8(-Int32FromInt32(1)), - 186: uint8(-Int32FromInt32(1)), - 187: uint8(-Int32FromInt32(1)), - 188: uint8(-Int32FromInt32(1)), - 189: uint8(-Int32FromInt32(1)), - 190: uint8(-Int32FromInt32(1)), - 191: uint8(-Int32FromInt32(1)), - 192: uint8(-Int32FromInt32(1)), - 193: uint8(-Int32FromInt32(1)), - 194: uint8(-Int32FromInt32(1)), - 195: uint8(-Int32FromInt32(1)), - 196: uint8(-Int32FromInt32(1)), - 197: uint8(-Int32FromInt32(1)), - 198: uint8(-Int32FromInt32(1)), - 199: uint8(-Int32FromInt32(1)), - 200: uint8(-Int32FromInt32(1)), - 201: uint8(-Int32FromInt32(1)), - 202: uint8(-Int32FromInt32(1)), - 203: uint8(-Int32FromInt32(1)), - 204: uint8(-Int32FromInt32(1)), - 205: uint8(-Int32FromInt32(1)), - 206: uint8(-Int32FromInt32(1)), - 207: uint8(-Int32FromInt32(1)), - 208: uint8(-Int32FromInt32(1)), - 209: uint8(-Int32FromInt32(1)), - 210: uint8(-Int32FromInt32(1)), - 211: uint8(-Int32FromInt32(1)), - 212: uint8(-Int32FromInt32(1)), - 213: uint8(-Int32FromInt32(1)), - 214: uint8(-Int32FromInt32(1)), - 215: uint8(-Int32FromInt32(1)), - 216: uint8(-Int32FromInt32(1)), - 217: uint8(-Int32FromInt32(1)), - 218: uint8(-Int32FromInt32(1)), - 219: uint8(-Int32FromInt32(1)), - 220: uint8(-Int32FromInt32(1)), - 221: uint8(-Int32FromInt32(1)), - 222: uint8(-Int32FromInt32(1)), - 223: uint8(-Int32FromInt32(1)), - 224: uint8(-Int32FromInt32(1)), - 225: uint8(-Int32FromInt32(1)), - 226: uint8(-Int32FromInt32(1)), - 227: uint8(-Int32FromInt32(1)), - 228: uint8(-Int32FromInt32(1)), - 229: uint8(-Int32FromInt32(1)), - 230: uint8(-Int32FromInt32(1)), - 231: uint8(-Int32FromInt32(1)), - 232: uint8(-Int32FromInt32(1)), - 233: uint8(-Int32FromInt32(1)), - 234: uint8(-Int32FromInt32(1)), - 235: uint8(-Int32FromInt32(1)), - 236: uint8(-Int32FromInt32(1)), - 237: uint8(-Int32FromInt32(1)), - 238: uint8(-Int32FromInt32(1)), - 239: uint8(-Int32FromInt32(1)), - 240: uint8(-Int32FromInt32(1)), - 241: uint8(-Int32FromInt32(1)), - 242: uint8(-Int32FromInt32(1)), - 243: uint8(-Int32FromInt32(1)), - 244: uint8(-Int32FromInt32(1)), - 245: uint8(-Int32FromInt32(1)), - 246: uint8(-Int32FromInt32(1)), - 247: uint8(-Int32FromInt32(1)), - 248: uint8(-Int32FromInt32(1)), - 249: uint8(-Int32FromInt32(1)), - 250: uint8(-Int32FromInt32(1)), - 251: uint8(-Int32FromInt32(1)), - 252: uint8(-Int32FromInt32(1)), - 253: uint8(-Int32FromInt32(1)), - 254: uint8(-Int32FromInt32(1)), - 255: uint8(-Int32FromInt32(1)), - 256: uint8(-Int32FromInt32(1)), + 124: Uint8FromInt32(-Int32FromInt32(1)), + 125: Uint8FromInt32(-Int32FromInt32(1)), + 126: Uint8FromInt32(-Int32FromInt32(1)), + 127: Uint8FromInt32(-Int32FromInt32(1)), + 128: Uint8FromInt32(-Int32FromInt32(1)), + 129: Uint8FromInt32(-Int32FromInt32(1)), + 130: Uint8FromInt32(-Int32FromInt32(1)), + 131: Uint8FromInt32(-Int32FromInt32(1)), + 132: Uint8FromInt32(-Int32FromInt32(1)), + 133: Uint8FromInt32(-Int32FromInt32(1)), + 134: Uint8FromInt32(-Int32FromInt32(1)), + 135: Uint8FromInt32(-Int32FromInt32(1)), + 136: Uint8FromInt32(-Int32FromInt32(1)), + 137: Uint8FromInt32(-Int32FromInt32(1)), + 138: Uint8FromInt32(-Int32FromInt32(1)), + 139: Uint8FromInt32(-Int32FromInt32(1)), + 140: Uint8FromInt32(-Int32FromInt32(1)), + 141: Uint8FromInt32(-Int32FromInt32(1)), + 142: Uint8FromInt32(-Int32FromInt32(1)), + 143: Uint8FromInt32(-Int32FromInt32(1)), + 144: Uint8FromInt32(-Int32FromInt32(1)), + 145: Uint8FromInt32(-Int32FromInt32(1)), + 146: Uint8FromInt32(-Int32FromInt32(1)), + 147: Uint8FromInt32(-Int32FromInt32(1)), + 148: Uint8FromInt32(-Int32FromInt32(1)), + 149: Uint8FromInt32(-Int32FromInt32(1)), + 150: Uint8FromInt32(-Int32FromInt32(1)), + 151: Uint8FromInt32(-Int32FromInt32(1)), + 152: Uint8FromInt32(-Int32FromInt32(1)), + 153: Uint8FromInt32(-Int32FromInt32(1)), + 154: Uint8FromInt32(-Int32FromInt32(1)), + 155: Uint8FromInt32(-Int32FromInt32(1)), + 156: Uint8FromInt32(-Int32FromInt32(1)), + 157: Uint8FromInt32(-Int32FromInt32(1)), + 158: Uint8FromInt32(-Int32FromInt32(1)), + 159: Uint8FromInt32(-Int32FromInt32(1)), + 160: Uint8FromInt32(-Int32FromInt32(1)), + 161: Uint8FromInt32(-Int32FromInt32(1)), + 162: Uint8FromInt32(-Int32FromInt32(1)), + 163: Uint8FromInt32(-Int32FromInt32(1)), + 164: Uint8FromInt32(-Int32FromInt32(1)), + 165: Uint8FromInt32(-Int32FromInt32(1)), + 166: Uint8FromInt32(-Int32FromInt32(1)), + 167: Uint8FromInt32(-Int32FromInt32(1)), + 168: Uint8FromInt32(-Int32FromInt32(1)), + 169: Uint8FromInt32(-Int32FromInt32(1)), + 170: Uint8FromInt32(-Int32FromInt32(1)), + 171: Uint8FromInt32(-Int32FromInt32(1)), + 172: Uint8FromInt32(-Int32FromInt32(1)), + 173: Uint8FromInt32(-Int32FromInt32(1)), + 174: Uint8FromInt32(-Int32FromInt32(1)), + 175: Uint8FromInt32(-Int32FromInt32(1)), + 176: Uint8FromInt32(-Int32FromInt32(1)), + 177: Uint8FromInt32(-Int32FromInt32(1)), + 178: Uint8FromInt32(-Int32FromInt32(1)), + 179: Uint8FromInt32(-Int32FromInt32(1)), + 180: Uint8FromInt32(-Int32FromInt32(1)), + 181: Uint8FromInt32(-Int32FromInt32(1)), + 182: Uint8FromInt32(-Int32FromInt32(1)), + 183: Uint8FromInt32(-Int32FromInt32(1)), + 184: Uint8FromInt32(-Int32FromInt32(1)), + 185: Uint8FromInt32(-Int32FromInt32(1)), + 186: Uint8FromInt32(-Int32FromInt32(1)), + 187: Uint8FromInt32(-Int32FromInt32(1)), + 188: Uint8FromInt32(-Int32FromInt32(1)), + 189: Uint8FromInt32(-Int32FromInt32(1)), + 190: Uint8FromInt32(-Int32FromInt32(1)), + 191: Uint8FromInt32(-Int32FromInt32(1)), + 192: Uint8FromInt32(-Int32FromInt32(1)), + 193: Uint8FromInt32(-Int32FromInt32(1)), + 194: Uint8FromInt32(-Int32FromInt32(1)), + 195: Uint8FromInt32(-Int32FromInt32(1)), + 196: Uint8FromInt32(-Int32FromInt32(1)), + 197: Uint8FromInt32(-Int32FromInt32(1)), + 198: Uint8FromInt32(-Int32FromInt32(1)), + 199: Uint8FromInt32(-Int32FromInt32(1)), + 200: Uint8FromInt32(-Int32FromInt32(1)), + 201: Uint8FromInt32(-Int32FromInt32(1)), + 202: Uint8FromInt32(-Int32FromInt32(1)), + 203: Uint8FromInt32(-Int32FromInt32(1)), + 204: Uint8FromInt32(-Int32FromInt32(1)), + 205: Uint8FromInt32(-Int32FromInt32(1)), + 206: Uint8FromInt32(-Int32FromInt32(1)), + 207: Uint8FromInt32(-Int32FromInt32(1)), + 208: Uint8FromInt32(-Int32FromInt32(1)), + 209: Uint8FromInt32(-Int32FromInt32(1)), + 210: Uint8FromInt32(-Int32FromInt32(1)), + 211: Uint8FromInt32(-Int32FromInt32(1)), + 212: Uint8FromInt32(-Int32FromInt32(1)), + 213: Uint8FromInt32(-Int32FromInt32(1)), + 214: Uint8FromInt32(-Int32FromInt32(1)), + 215: Uint8FromInt32(-Int32FromInt32(1)), + 216: Uint8FromInt32(-Int32FromInt32(1)), + 217: Uint8FromInt32(-Int32FromInt32(1)), + 218: Uint8FromInt32(-Int32FromInt32(1)), + 219: Uint8FromInt32(-Int32FromInt32(1)), + 220: Uint8FromInt32(-Int32FromInt32(1)), + 221: Uint8FromInt32(-Int32FromInt32(1)), + 222: Uint8FromInt32(-Int32FromInt32(1)), + 223: Uint8FromInt32(-Int32FromInt32(1)), + 224: Uint8FromInt32(-Int32FromInt32(1)), + 225: Uint8FromInt32(-Int32FromInt32(1)), + 226: Uint8FromInt32(-Int32FromInt32(1)), + 227: Uint8FromInt32(-Int32FromInt32(1)), + 228: Uint8FromInt32(-Int32FromInt32(1)), + 229: Uint8FromInt32(-Int32FromInt32(1)), + 230: Uint8FromInt32(-Int32FromInt32(1)), + 231: Uint8FromInt32(-Int32FromInt32(1)), + 232: Uint8FromInt32(-Int32FromInt32(1)), + 233: Uint8FromInt32(-Int32FromInt32(1)), + 234: Uint8FromInt32(-Int32FromInt32(1)), + 235: Uint8FromInt32(-Int32FromInt32(1)), + 236: Uint8FromInt32(-Int32FromInt32(1)), + 237: Uint8FromInt32(-Int32FromInt32(1)), + 238: Uint8FromInt32(-Int32FromInt32(1)), + 239: Uint8FromInt32(-Int32FromInt32(1)), + 240: Uint8FromInt32(-Int32FromInt32(1)), + 241: Uint8FromInt32(-Int32FromInt32(1)), + 242: Uint8FromInt32(-Int32FromInt32(1)), + 243: Uint8FromInt32(-Int32FromInt32(1)), + 244: Uint8FromInt32(-Int32FromInt32(1)), + 245: Uint8FromInt32(-Int32FromInt32(1)), + 246: Uint8FromInt32(-Int32FromInt32(1)), + 247: Uint8FromInt32(-Int32FromInt32(1)), + 248: Uint8FromInt32(-Int32FromInt32(1)), + 249: Uint8FromInt32(-Int32FromInt32(1)), + 250: Uint8FromInt32(-Int32FromInt32(1)), + 251: Uint8FromInt32(-Int32FromInt32(1)), + 252: Uint8FromInt32(-Int32FromInt32(1)), + 253: Uint8FromInt32(-Int32FromInt32(1)), + 254: Uint8FromInt32(-Int32FromInt32(1)), + 255: Uint8FromInt32(-Int32FromInt32(1)), + 256: Uint8FromInt32(-Int32FromInt32(1)), } func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint64) { @@ -27088,14 +27086,14 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -27108,7 +27106,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -27119,7 +27117,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ - v11 = int32(*(*uint8)(unsafe.Pointer(v12))) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) } else { v11 = X__shgetc(tls, f) } @@ -27129,12 +27127,12 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 - if int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -27169,10 +27167,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint if base == uint32(10) { x = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { break } - x = x*uint32(10) + uint32(c-Int32FromUint8('0')) + x = x*uint32(10) + Uint32FromInt32(c-Int32FromUint8('0')) goto _20 _20: ; @@ -27180,7 +27178,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v23 = f + 8 v22 = *(*uintptr)(unsafe.Pointer(v23)) *(*uintptr)(unsafe.Pointer(v23))++ - v21 = int32(*(*uint8)(unsafe.Pointer(v22))) + v21 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v22))) } else { v21 = X__shgetc(tls, f) } @@ -27188,10 +27186,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } y = uint64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(c-Int32FromUint8('0'))) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-Uint64FromInt32(c-Int32FromUint8('0'))) { break } - y = y*uint64(10) + uint64(c-Int32FromUint8('0')) + y = y*uint64(10) + Uint64FromInt32(c-Int32FromUint8('0')) goto _24 _24: ; @@ -27199,18 +27197,18 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v27 = f + 8 v26 = *(*uintptr)(unsafe.Pointer(v27)) *(*uintptr)(unsafe.Pointer(v27))++ - v25 = int32(*(*uint8)(unsafe.Pointer(v26))) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v26))) } else { v25 = X__shgetc(tls, f) } c = v25 } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { goto done } } else { if !(base&(base-Uint32FromInt32(1)) != 0) { - bs = int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 260 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) + bs = Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 260 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) x = uint32(0) for { if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(32)) { @@ -27224,7 +27222,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } @@ -27243,7 +27241,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v35 = f + 8 v34 = *(*uintptr)(unsafe.Pointer(v35)) *(*uintptr)(unsafe.Pointer(v35))++ - v33 = int32(*(*uint8)(unsafe.Pointer(v34))) + v33 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v34))) } else { v33 = X__shgetc(tls, f) } @@ -27263,7 +27261,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ - v37 = int32(*(*uint8)(unsafe.Pointer(v38))) + v37 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v38))) } else { v37 = X__shgetc(tls, f) } @@ -27282,7 +27280,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v43 = f + 8 v42 = *(*uintptr)(unsafe.Pointer(v43)) *(*uintptr)(unsafe.Pointer(v43))++ - v41 = int32(*(*uint8)(unsafe.Pointer(v42))) + v41 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v42))) } else { v41 = X__shgetc(tls, f) } @@ -27302,7 +27300,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v47 = f + 8 v46 = *(*uintptr)(unsafe.Pointer(v47)) *(*uintptr)(unsafe.Pointer(v47))++ - v45 = int32(*(*uint8)(unsafe.Pointer(v46))) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v46))) } else { v45 = X__shgetc(tls, f) } @@ -27331,7 +27329,7 @@ done: } } } - return y ^ uint64(neg) - uint64(neg) + return y ^ Uint64FromInt32(neg) - Uint64FromInt32(neg) } func X__procfdname(tls *TLS, buf uintptr, fd uint32) { @@ -27431,7 +27429,7 @@ func X__shgetc(tls *TLS, f uintptr) (r int32) { } (*TFILE)(unsafe.Pointer(f)).Fshcnt = int64((*TFILE)(unsafe.Pointer(f)).Fbuf) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + cnt if (*TFILE)(unsafe.Pointer(f)).Frpos <= (*TFILE)(unsafe.Pointer(f)).Fbuf { - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = Uint8FromInt32(c) } return c } @@ -27442,10 +27440,10 @@ func X__syscall_ret(tls *TLS, r uint64) (r1 int64) { defer func() { trc("-> %v", r1) }() } if r > -Uint64FromUint64(4096) { - *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(-r) + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = Int32FromUint64(-r) return int64(-int32(1)) } - return int64(r) + return Int64FromUint64(r) } const OK_BINDS = 1030 @@ -27541,7 +27539,7 @@ func _checkver(tls *TLS, def uintptr, vsym int32, vername uintptr, strings uintp _ = aux vsym &= int32(0x7fff) for { - if !(int32((*TVerdef)(unsafe.Pointer(def)).Fvd_flags)&Int32FromInt32(VER_FLG_BASE) != 0) && int32((*TVerdef)(unsafe.Pointer(def)).Fvd_ndx)&int32(0x7fff) == vsym { + if !(Int32FromUint16((*TVerdef)(unsafe.Pointer(def)).Fvd_flags)&Int32FromInt32(VER_FLG_BASE) != 0) && Int32FromUint16((*TVerdef)(unsafe.Pointer(def)).Fvd_ndx)&int32(0x7fff) == vsym { break } if (*TVerdef)(unsafe.Pointer(def)).Fvd_next == uint32(0) { @@ -27582,7 +27580,7 @@ func X__vdsosym(tls *TLS, vername uintptr, name uintptr) (r uintptr) { eh = uintptr(*(*Tsize_t)(unsafe.Pointer(X__libc.Fauxv + uintptr(i+uint64(1))*8))) ph = eh + uintptr((*TEhdr)(unsafe.Pointer(eh)).Fe_phoff) dynv = uintptr(0) - base = uint64(-Int32FromInt32(1)) + base = Uint64FromInt32(-Int32FromInt32(1)) i = uint64(0) for { if !(i < uint64((*TEhdr)(unsafe.Pointer(eh)).Fe_phnum)) { @@ -27601,7 +27599,7 @@ func X__vdsosym(tls *TLS, vername uintptr, name uintptr) (r uintptr) { i++ ph = ph + uintptr((*TEhdr)(unsafe.Pointer(eh)).Fe_phentsize) } - if !(dynv != 0) || base == uint64(-Int32FromInt32(1)) { + if !(dynv != 0) || base == Uint64FromInt32(-Int32FromInt32(1)) { return uintptr(0) } strings = uintptr(0) @@ -27644,10 +27642,10 @@ func X__vdsosym(tls *TLS, vername uintptr, name uintptr) (r uintptr) { if !(i < uint64(*(*TElf_Symndx)(unsafe.Pointer(hashtab + 1*4)))) { break } - if !(Int32FromInt32(1)<<(int32((*(*TSym)(unsafe.Pointer(syms + uintptr(i)*24))).Fst_info)&Int32FromInt32(0xf))&(Int32FromInt32(1)<>Int32FromInt32(4))&(Int32FromInt32(1)<>Int32FromInt32(4))&(Int32FromInt32(1)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_msgget), int64(k), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_msgget), int64(k), int64(flag))))) } func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32) (r Tssize_t) { @@ -27780,7 +27778,7 @@ func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32 trc("tls=%v q=%v m=%v len1=%v type1=%v flag=%v, (%v:)", tls, q, m, len1, type1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msgrcv), int64(q), int64(m), int64(len1), type1, int64(flag), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msgrcv), int64(q), int64(m), Int64FromUint64(len1), type1, int64(flag), 0))) } func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { @@ -27788,7 +27786,7 @@ func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { trc("tls=%v q=%v m=%v len1=%v flag=%v, (%v:)", tls, q, m, len1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msgsnd), int64(q), int64(m), int64(len1), int64(flag), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msgsnd), int64(q), int64(m), Int64FromUint64(len1), int64(flag), 0, 0)))) } const GETALL = 13 @@ -27876,7 +27874,7 @@ func Xsemctl(tls *TLS, id int32, num int32, cmd int32, va uintptr) (r1 int32) { _ = ap } r = int32(X__syscall4(tls, int64(SYS_semctl), int64(id), int64(num), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(*(*uintptr)(unsafe.Pointer(bp))))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { @@ -27889,9 +27887,9 @@ func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { * n fits in the correct (per POSIX) userspace type, so * we have to check here. */ if n > int32(USHRT_MAX) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_semget), int64(key), int64(n), int64(fl))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_semget), int64(key), int64(n), int64(fl))))) } func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { @@ -27899,7 +27897,7 @@ func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { trc("tls=%v id=%v buf=%v n=%v, (%v:)", tls, id, buf, n, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_semop), int64(id), int64(buf), int64(n))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_semop), int64(id), int64(buf), Int64FromUint64(n))))) } const NO_TIME32 = 0 @@ -27933,7 +27931,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r int3 trc("tls=%v id=%v buf=%v n=%v ts=%v, (%v:)", tls, id, buf, n, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_semtimedop), int64(id), int64(buf), int64(n), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_semtimedop), int64(id), int64(buf), Int64FromUint64(n), int64(ts))))) } const SHMLBA = 4096 @@ -28005,7 +28003,7 @@ func Xshmat(tls *TLS, id int32, addr uintptr, flag int32) (r uintptr) { trc("tls=%v id=%v addr=%v flag=%v, (%v:)", tls, id, addr, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return uintptr(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_shmat), int64(id), int64(addr), int64(flag))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_shmat), int64(id), int64(addr), int64(flag))))) } func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { @@ -28016,7 +28014,7 @@ func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { var r int32 _ = r r = int32(X__syscall3(tls, int64(SYS_shmctl), int64(id), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(buf))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xshmdt(tls *TLS, addr uintptr) (r int32) { @@ -28024,7 +28022,7 @@ func Xshmdt(tls *TLS, addr uintptr) (r int32) { trc("tls=%v addr=%v, (%v:)", tls, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_shmdt), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_shmdt), int64(addr))))) } func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { @@ -28032,10 +28030,10 @@ func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { trc("tls=%v key=%v size=%v flag=%v, (%v:)", tls, key, size, flag, origin(2)) defer func() { trc("-> %v", r) }() } - if size > uint64(Int64FromInt64(INT64_MAX)) { + if size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { size = Uint64FromUint64(0xffffffffffffffff) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_shmget), int64(key), int64(size), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_shmget), int64(key), Int64FromUint64(size), int64(flag))))) } type Tpasswd = struct { @@ -28300,7 +28298,7 @@ func Xgetdtablesize(tls *TLS) (r int32) { } else { v1 = uint64(INT_MAX) } - return int32(v1) + return Int32FromUint64(v1) } func Xgetloadavg(tls *TLS, a uintptr, n int32) (r int32) { @@ -28344,7 +28342,7 @@ func Xgetpagesize(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__libc.Fpage_size) + return Int32FromUint64(X__libc.Fpage_size) } const B0 = 0 @@ -28531,16 +28529,16 @@ func Xgetpass(tls *TLS, prompt uintptr) (r uintptr) { } Xtcgetattr(tls, fd, bp+60) *(*Ttermios)(unsafe.Pointer(bp)) = *(*Ttermios)(unsafe.Pointer(bp + 60)) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag |= uint32(ICANON) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= uint32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= Uint32FromInt32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag |= uint32(ICRNL) Xtcsetattr(tls, fd, int32(TCSAFLUSH), bp+60) Xtcdrain(tls, fd) Xdprintf(tls, fd, __ccgo_ts+15, VaList(bp+128, prompt)) l = Xread(tls, fd, uintptr(unsafe.Pointer(&_password)), uint64(128)) if l >= 0 { - if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || uint64(l) == uint64(128) { + if l > 0 && Int32FromUint8(_password[l-int64(1)]) == int32('\n') || Uint64FromInt64(l) == uint64(128) { l-- } _password[l] = uint8(0) @@ -28603,7 +28601,7 @@ func Xgetusershell(tls *TLS) (r uintptr) { if l <= 0 { return uintptr(0) } - if int32(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1))))) == int32('\n') { *(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1)))) = uint8(0) } return _line @@ -28780,12 +28778,12 @@ func Xulimit(tls *TLS, cmd int32, va uintptr) (r int64) { ap = va val = VaInt64(&ap) _ = ap - (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * uint64(val) + (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * Uint64FromInt64(val) if Xsetrlimit(tls, int32(RLIMIT_FSIZE), bp) != 0 { return int64(-int32(1)) } } - return int64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) + return Int64FromUint64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) } const BOOT_TIME = 2 @@ -29054,7 +29052,7 @@ func Xbrk(tls *TLS, end uintptr) (r int32) { trc("tls=%v end=%v, (%v:)", tls, end, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } const VDSO_FLUSH_ICACHE_SYM = "__vdso_flush_icache" @@ -29107,10 +29105,10 @@ func X__riscv_flush_icache(tls *TLS, start uintptr, end uintptr, flags uint64) ( return r } if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(Int32FromInt32(__NR_arch_specific_syscall)+Int32FromInt32(15)), int64(start), int64(end), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(Int32FromInt32(__NR_arch_specific_syscall)+Int32FromInt32(15)), int64(start), int64(end), Int64FromUint64(flags))))) } func Xriscv_flush_icache(tls *TLS, start uintptr, end uintptr, flags uint64) (r int32) { @@ -29126,7 +29124,7 @@ func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) } func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29134,7 +29132,7 @@ func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) } func Xchroot(tls *TLS, path uintptr) (r int32) { @@ -29142,7 +29140,7 @@ func Xchroot(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) } type Tktimex64 = struct { @@ -29261,12 +29259,12 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Fstbcnt = (*(*Tktimex)(unsafe.Pointer(bp))).Fstbcnt (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex)(unsafe.Pointer(bp))).Ftai } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } if clock_id == CLOCK_REALTIME { - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) } func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -29274,7 +29272,7 @@ func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_o trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } const EPOLLERR = 8 @@ -29327,7 +29325,7 @@ func Xepoll_create(tls *TLS, size int32) (r int32) { defer func() { trc("-> %v", r) }() } if size <= 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } return Xepoll_create1(tls, 0) } @@ -29340,7 +29338,7 @@ func Xepoll_create1(tls *TLS, flags int32) (r1 int32) { var r int32 _ = r r = int32(X__syscall1(tls, int64(SYS_epoll_create1), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { @@ -29348,7 +29346,7 @@ func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { trc("tls=%v fd=%v op=%v fd2=%v ev=%v, (%v:)", tls, fd, op, fd2, ev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) } func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uintptr) (r1 int32) { @@ -29359,7 +29357,7 @@ func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uint var r int32 _ = r r = int32(___syscall_cp(tls, int64(SYS_epoll_pwait), int64(fd), int64(ev), int64(cnt), int64(to), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_wait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32) (r int32) { @@ -29383,8 +29381,8 @@ func Xeventfd(tls *TLS, count uint32, flags int32) (r1 int32) { } var r int32 _ = r - r = int32(X__syscall2(tls, int64(SYS_eventfd2), int64(count), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + r = int32(X__syscall2(tls, int64(SYS_eventfd2), Int64FromUint32(count), int64(flags))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { @@ -29394,7 +29392,7 @@ func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { } var v1 int32 _ = v1 - if uint64(8) == uint64(Xread(tls, fd, value, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xread(tls, fd, value, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29412,7 +29410,7 @@ func Xeventfd_write(tls *TLS, fd int32, _value Teventfd_t) (r int32) { *(*Teventfd_t)(unsafe.Pointer(bp)) = _value var v1 int32 _ = v1 - if uint64(8) == uint64(Xwrite(tls, fd, bp, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xwrite(tls, fd, bp, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29425,7 +29423,7 @@ func Xfallocate(tls *TLS, fd int32, mode int32, base Toff_t, len1 Toff_t) (r int trc("tls=%v fd=%v mode=%v base=%v len1=%v, (%v:)", tls, fd, mode, base, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) } const FANOTIFY_METADATA_VERSION = 3 @@ -29570,7 +29568,7 @@ func Xfanotify_init(tls *TLS, flags uint32, event_f_flags uint32) (r int32) { trc("tls=%v flags=%v event_f_flags=%v, (%v:)", tls, flags, event_f_flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fanotify_init), int64(flags), int64(event_f_flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fanotify_init), Int64FromUint32(flags), Int64FromUint32(event_f_flags))))) } func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd int32, pathname uintptr) (r int32) { @@ -29578,7 +29576,7 @@ func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd trc("tls=%v fanotify_fd=%v flags=%v mask=%v dfd=%v pathname=%v, (%v:)", tls, fanotify_fd, flags, mask, dfd, pathname, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), int64(flags), int64(mask), int64(dfd), int64(pathname))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), Int64FromUint32(flags), Int64FromUint64(mask), int64(dfd), int64(pathname))))) } const LOCK_EX = 2 @@ -29591,7 +29589,7 @@ func Xflock(tls *TLS, fd int32, op int32) (r int32) { trc("tls=%v fd=%v op=%v, (%v:)", tls, fd, op, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) } func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { @@ -29602,7 +29600,7 @@ func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if len1 > uint64(INT_MAX) { len1 = uint64(INT_MAX) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), Int64FromUint64(len1))))) } const GRND_INSECURE = 4 @@ -29614,7 +29612,7 @@ func Xgetrandom(tls *TLS, buf uintptr, buflen Tsize_t, flags uint32) (r Tssize_t trc("tls=%v buf=%v buflen=%v flags=%v, (%v:)", tls, buf, buflen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), int64(buflen), int64(flags), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), Int64FromUint64(buflen), Int64FromUint32(flags), 0, 0, 0))) } const IN_ACCESS = 1 @@ -29668,7 +29666,7 @@ func Xinotify_init1(tls *TLS, flags int32) (r1 int32) { var r int32 _ = r r = int32(X__syscall1(tls, int64(SYS_inotify_init1), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r int32) { @@ -29676,7 +29674,7 @@ func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r trc("tls=%v fd=%v pathname=%v mask=%v, (%v:)", tls, fd, pathname, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), int64(mask))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), Int64FromUint32(mask))))) } func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { @@ -29684,7 +29682,7 @@ func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { trc("tls=%v fd=%v wd=%v, (%v:)", tls, fd, wd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) } func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { @@ -29692,7 +29690,7 @@ func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { trc("tls=%v type1=%v buf=%v len1=%v, (%v:)", tls, type1, buf, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) } const MADV_COLD = 20 @@ -29730,7 +29728,7 @@ func Xmemfd_create(tls *TLS, name uintptr, flags uint32) (r int32) { trc("tls=%v name=%v flags=%v, (%v:)", tls, name, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), Int64FromUint32(flags))))) } func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { @@ -29741,7 +29739,7 @@ func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { if flags == uint32(0) { return Xmlock(tls, addr, len1) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), int64(len1), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), Int64FromUint64(len1), Int64FromUint32(flags))))) } func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { @@ -29749,7 +29747,7 @@ func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { trc("tls=%v a=%v b=%v c=%v, (%v:)", tls, a, b, c, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_init_module), int64(a), int64(b), int64(c))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_init_module), int64(a), Int64FromUint64(b), int64(c))))) } func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { @@ -29757,7 +29755,7 @@ func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_delete_module), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_delete_module), int64(a), Int64FromUint32(b))))) } const BLKBSZGET = 2147488368 @@ -30006,7 +30004,7 @@ func Xmount(tls *TLS, special uintptr, dir uintptr, fstype uintptr, flags uint64 trc("tls=%v special=%v dir=%v fstype=%v flags=%v data=%v, (%v:)", tls, special, dir, fstype, flags, data, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), int64(flags), int64(data))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), Int64FromUint64(flags), int64(data))))) } func Xumount(tls *TLS, special uintptr) (r int32) { @@ -30014,7 +30012,7 @@ func Xumount(tls *TLS, special uintptr) (r int32) { trc("tls=%v special=%v, (%v:)", tls, special, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) } func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { @@ -30022,7 +30020,7 @@ func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { trc("tls=%v special=%v flags=%v, (%v:)", tls, special, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) } func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, mount_id uintptr, flags int32) (r int32) { @@ -30030,7 +30028,7 @@ func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, trc("tls=%v dirfd=%v pathname=%v handle=%v mount_id=%v flags=%v, (%v:)", tls, dirfd, pathname, handle, mount_id, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) } func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) (r int32) { @@ -30038,7 +30036,7 @@ func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) ( trc("tls=%v mount_fd=%v handle=%v flags=%v, (%v:)", tls, mount_fd, handle, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) } const ADDR_COMPAT_LAYOUT = 2097152 @@ -30081,7 +30079,7 @@ func Xpersonality(tls *TLS, persona uint64) (r int32) { trc("tls=%v persona=%v, (%v:)", tls, persona, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_personality), int64(persona))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_personality), Int64FromUint64(persona))))) } func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { @@ -30089,7 +30087,7 @@ func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { trc("tls=%v new1=%v old=%v, (%v:)", tls, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) } const PR_CAPBSET_DROP = 24 @@ -30266,7 +30264,7 @@ func Xprctl(tls *TLS, op int32, va uintptr) (r int32) { i++ } _ = ap - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_prctl), int64(op), int64(x[0]), int64(x[int32(1)]), int64(x[int32(2)]), int64(x[int32(3)]))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_prctl), int64(op), Int64FromUint64(x[0]), Int64FromUint64(x[int32(1)]), Int64FromUint64(x[int32(2)]), Int64FromUint64(x[int32(3)]))))) } const RWF_APPEND = 16 @@ -30285,9 +30283,9 @@ func Xpreadv2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags in if ofs == int64(-int32(1)) { return Xreadv(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit uintptr) (r1 int32) { @@ -30310,7 +30308,7 @@ func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit } new_limit = bp } - r = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) if !(r != 0) && old_limit != 0 && Bool(^Uint64FromUint64(0) != ^Uint64FromUint64(0)) { if (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur = ^Uint64FromUint64(0) @@ -30327,7 +30325,7 @@ func Xprocess_vm_writev(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec uintptr, riovcnt uint64, flags uint64) (r Tssize_t) { @@ -30335,7 +30333,7 @@ func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } const PTRACE_ATTACH = 16 @@ -30484,11 +30482,11 @@ func Xptrace(tls *TLS, req int32, va uintptr) (r int64) { data = VaUintptr(&ap) /* PTRACE_{READ,WRITE}{DATA,TEXT} (16...19) are specific to SPARC. */ _ = ap - if uint32(req)-uint32(1) < uint32(3) { + if Uint32FromInt32(req)-uint32(1) < uint32(3) { data = bp } - ret = X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) - if ret < 0 || uint32(req)-uint32(1) >= uint32(3) { + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) + if ret < 0 || Uint32FromInt32(req)-uint32(1) >= uint32(3) { return ret } return *(*int64)(unsafe.Pointer(bp)) @@ -30503,9 +30501,9 @@ func Xpwritev2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags i if ofs == int64(-int32(1)) { return Xwritev(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } const GRPQUOTA = 1 @@ -30571,7 +30569,7 @@ func Xquotactl(tls *TLS, cmd int32, special uintptr, id int32, addr uintptr) (r trc("tls=%v cmd=%v special=%v id=%v addr=%v, (%v:)", tls, cmd, special, id, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) } func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { @@ -30579,7 +30577,7 @@ func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v pos=%v len1=%v, (%v:)", tls, fd, pos, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, int64(len1)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, Int64FromUint64(len1)))) } const RB_AUTOBOOT = 19088743 @@ -30595,7 +30593,7 @@ func Xreboot(tls *TLS, type1 int32) (r int32) { trc("tls=%v type1=%v, (%v:)", tls, type1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_reboot), int64(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_reboot), Int64FromUint32(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) } func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff Tsize_t, flags int32) (r int32) { @@ -30603,7 +30601,7 @@ func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff T trc("tls=%v addr=%v size=%v prot=%v pgoff=%v flags=%v, (%v:)", tls, addr, size, prot, pgoff, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), int64(size), int64(prot), int64(pgoff), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), Int64FromUint64(size), int64(prot), Int64FromUint64(pgoff), int64(flags))))) } func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { @@ -30612,7 +30610,7 @@ func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { defer func() { trc("-> %v", r) }() } if inc != 0 { - return uintptr(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return uintptr(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } return uintptr(X__syscall1(tls, int64(SYS_brk), int64(Int32FromInt32(0)))) } @@ -30622,7 +30620,7 @@ func Xsendfile(tls *TLS, out_fd int32, in_fd int32, ofs uintptr, count Tsize_t) trc("tls=%v out_fd=%v in_fd=%v ofs=%v count=%v, (%v:)", tls, out_fd, in_fd, ofs, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), int64(count)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), Int64FromUint64(count)))) } func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { @@ -30630,7 +30628,7 @@ func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsgid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsgid), Int64FromUint32(gid))))) } func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { @@ -30638,7 +30636,7 @@ func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsuid), int64(uid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsuid), Int64FromUint32(uid))))) } func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -30646,7 +30644,7 @@ func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sethostname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sethostname), int64(name), Int64FromUint64(len1))))) } const CLONE_CHILD_CLEARTID = 2097152 @@ -30686,7 +30684,7 @@ func Xsetns(tls *TLS, fd int32, nstype int32) (r int32) { trc("tls=%v fd=%v nstype=%v, (%v:)", tls, fd, nstype, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) } const __tm_gmtoff = 0 @@ -30716,8 +30714,8 @@ func Xsettimeofday(tls *TLS, tv uintptr, tz uintptr) (r int32) { if !(tv != 0) { return 0 } - if uint64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ Ftv_sec: (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec, @@ -30762,7 +30760,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { var ret int32 _ = ret ret = int32(X__syscall4(tls, int64(SYS_signalfd4), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), int64(flags))) - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -30770,7 +30768,7 @@ func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintpt trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx uintptr) (r int32) { @@ -30783,9 +30781,9 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u var ret int32 var _ /* st at bp+0 */ Tstat _ = ret - ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), int64(mask), int64(stx))) + ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), Int64FromUint32(mask), int64(stx))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } ret = Xfstatat(tls, dirfd, path, bp, flags) if ret != 0 { @@ -30798,15 +30796,15 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u (*Tstatx)(unsafe.Pointer(stx)).Fstx_nlink = (*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink (*Tstatx)(unsafe.Pointer(stx)).Fstx_uid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_uid (*Tstatx)(unsafe.Pointer(stx)).Fstx_gid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_gid - (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = Uint32FromInt32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_btime = Tstatx_timestamp{} (*Tstatx)(unsafe.Pointer(stx)).Fstx_mask = uint32(0x7ff) return 0 @@ -30836,7 +30834,7 @@ func Xswapon(tls *TLS, path uintptr, flags int32) (r int32) { trc("tls=%v path=%v flags=%v, (%v:)", tls, path, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) } func Xswapoff(tls *TLS, path uintptr) (r int32) { @@ -30844,7 +30842,7 @@ func Xswapoff(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) } func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) (r int32) { @@ -30852,7 +30850,7 @@ func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) trc("tls=%v fd=%v pos=%v len1=%v flags=%v, (%v:)", tls, fd, pos, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, Int64FromUint32(flags))))) } func Xsyncfs(tls *TLS, fd int32) (r int32) { @@ -30860,7 +30858,7 @@ func Xsyncfs(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) } func X__lsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30868,7 +30866,7 @@ func X__lsysinfo(tls *TLS, info uintptr) (r int32) { trc("tls=%v info=%v, (%v:)", tls, info, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) } func Xsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30884,7 +30882,7 @@ func Xtee(tls *TLS, src int32, dest int32, len1 Tsize_t, flags uint32) (r Tssize trc("tls=%v src=%v dest=%v len1=%v flags=%v, (%v:)", tls, src, dest, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), Int64FromUint64(len1), Int64FromUint32(flags)))) } const TFD_CLOEXEC = 524288 @@ -30897,7 +30895,7 @@ func Xtimerfd_create(tls *TLS, clockid int32, flags int32) (r int32) { trc("tls=%v clockid=%v flags=%v, (%v:)", tls, clockid, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) } func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr) (r int32) { @@ -30905,7 +30903,7 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr trc("tls=%v fd=%v flags=%v new1=%v old=%v, (%v:)", tls, fd, flags, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) } func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { @@ -30913,7 +30911,7 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { trc("tls=%v fd=%v cur=%v, (%v:)", tls, fd, cur, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) } func Xunshare(tls *TLS, flags int32) (r int32) { @@ -30921,7 +30919,7 @@ func Xunshare(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) } func Xutimes(tls *TLS, path uintptr, times uintptr) (r int32) { @@ -30937,7 +30935,7 @@ func Xvhangup(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_vhangup))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_vhangup))))) } func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Tssize_t) { @@ -30945,7 +30943,7 @@ func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Ts trc("tls=%v fd=%v iov=%v cnt=%v flags=%v, (%v:)", tls, fd, iov, cnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), int64(cnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), Int64FromUint64(cnt), Int64FromUint32(flags)))) } const NSIG = 65 @@ -31022,7 +31020,7 @@ func Xwait4(tls *TLS, pid Tpid_t, status uintptr, options int32, ru uintptr) (r1 Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } const XATTR_CREATE = 1 @@ -31034,7 +31032,7 @@ func Xgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31042,7 +31040,7 @@ func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31050,7 +31048,7 @@ func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v, (%v:)", tls, filedes, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size)))) } func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31058,7 +31056,7 @@ func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31066,7 +31064,7 @@ func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31074,7 +31072,7 @@ func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_ trc("tls=%v filedes=%v list=%v size=%v, (%v:)", tls, filedes, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), Int64FromUint64(size)))) } func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31082,7 +31080,7 @@ func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31090,7 +31088,7 @@ func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31098,7 +31096,7 @@ func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, filedes, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31106,7 +31104,7 @@ func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) } func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31114,7 +31112,7 @@ func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) } func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { @@ -31122,7 +31120,7 @@ func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) } func _dummy4(tls *TLS, msg uintptr, lm uintptr) (r uintptr) { @@ -31166,7 +31164,7 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { var sign, sw int32 _, _, _, _, _, _, _, _, _, _, _ = b, mo, n, o, ol, os, sign, sw, t, tl, ts mo = p - sw = int32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) + sw = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) b = uint32(0) n = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 2*4)), sw) o = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 3*4)), sw) @@ -31223,9 +31221,9 @@ func Xbind_textdomain_codeset(tls *TLS, domainname uintptr, codeset uintptr) (r var _empty_mo = [5]Tuint32_t{ 0: uint32(0x950412de), - 2: uint32(-Int32FromInt32(1)), - 3: uint32(-Int32FromInt32(1)), - 4: uint32(-Int32FromInt32(1)), + 2: Uint32FromInt32(-Int32FromInt32(1)), + 3: Uint32FromInt32(-Int32FromInt32(1)), + 4: Uint32FromInt32(-Int32FromInt32(1)), } const NL_CAT_LOCALE = 1 @@ -31308,12 +31306,12 @@ _6: goto _9 _9: strings = map1 + uintptr(20) + uintptr(v8) - v10 = uint32(set_id) + v10 = Uint32FromInt32(set_id) v11 = v10>>int32(24) | v10>>int32(8)&uint32(0xff00) | v10<>int32(24) | v13>>int32(8)&uint32(0xff00) | v13< uint64(NAME_MAX) || dirlen >= uint64(PATH_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) @@ -31633,7 +31631,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r uintptr) return uintptr(0) } (*Tbinding)(unsafe.Pointer(p2)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) - (*Tbinding)(unsafe.Pointer(p2)).Fdirlen = int32(dirlen) + (*Tbinding)(unsafe.Pointer(p2)).Fdirlen = Int32FromUint64(dirlen) (*Tbinding)(unsafe.Pointer(p2)).Fdomainname = p2 + 32 (*Tbinding)(unsafe.Pointer(p2)).Fdirname = p2 + 32 + uintptr(domlen) + uintptr(1) Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p2)).Fdomainname, domainname, domlen+uint64(1)) @@ -31730,13 +31728,13 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n if !(msgid1 != 0) { goto notrans } - if uint32(category) >= uint32(LC_ALL) { + if Uint32FromInt32(category) >= uint32(LC_ALL) { goto notrans } if !(domainname != 0) { domainname = X__gettextdomain(tls) } - domlen = Xstrnlen(tls, domainname, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + domlen = Xstrnlen(tls, domainname, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if domlen > uint64(NAME_MAX) { goto notrans } @@ -31789,7 +31787,7 @@ _2: dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 16 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 - dirlen = uint64((*Tbinding)(unsafe.Pointer(q)).Fdirlen) + dirlen = Uint64FromInt32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) loclen = Xstrlen(tls, locname) catlen = uint64(_catlens[category]) /* Logically split @mod suffix from locale name. */ @@ -31797,19 +31795,19 @@ _2: if !(modname != 0) { modname = locname + uintptr(loclen) } - v5 = loclen - uint64(int64(modname)-int64(locname)) + v5 = loclen - Uint64FromInt64(int64(modname)-int64(locname)) modlen = v5 alt_modlen = v5 - loclen = uint64(int64(modname) - int64(locname)) + loclen = Uint64FromInt64(int64(modname) - int64(locname)) /* Drop .charset identifier; it is not used. */ csp = Xmemchr(tls, locname, int32('.'), loclen) if csp != 0 { - loclen = uint64(int64(csp) - int64(locname)) + loclen = Uint64FromInt64(int64(csp) - int64(locname)) } v6 = dirlen + uint64(1) + loclen + modlen + uint64(1) + catlen + uint64(1) + domlen + uint64(3) + uint64(1) name = Xrealloc(tls, name, v6) for { - Xsnprintf(tls, name, v6, __ccgo_ts+472, VaList(bp+24, dirname, int32(loclen), locname, int32(alt_modlen), modname, catname, domainname)) + Xsnprintf(tls, name, v6, __ccgo_ts+472, VaList(bp+24, dirname, Int32FromUint64(loclen), locname, Int32FromUint64(alt_modlen), modname, catname, domainname)) v8 = X__map_file(tls, name, bp) map1 = v8 if v8 != 0 { @@ -31822,7 +31820,7 @@ _2: v9 = Xmemchr(tls, locname, int32('_'), loclen) locp = v9 if v9 != 0 { - loclen = uint64(int64(locp) - int64(locname)) + loclen = Uint64FromInt64(int64(locp) - int64(locname)) alt_modlen = modlen } else { break @@ -31859,8 +31857,8 @@ _2: if r != 0 { r += uintptr(13) for { - v11 = int32(*(*uint8)(unsafe.Pointer(r))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: if !(v12 != 0) { @@ -31872,14 +31870,14 @@ _2: np = Xstrtoul(tls, r+uintptr(9), bp+8, int32(10)) r = *(*uintptr)(unsafe.Pointer(bp + 8)) } - for *(*uint8)(unsafe.Pointer(r)) != 0 && int32(*(*uint8)(unsafe.Pointer(r))) != int32(';') { + for *(*uint8)(unsafe.Pointer(r)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) != int32(';') { r++ } if *(*uint8)(unsafe.Pointer(r)) != 0 { r++ for { - v14 = int32(*(*uint8)(unsafe.Pointer(r))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: if !(v15 != 0) { @@ -31892,7 +31890,7 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals = Int32FromUint64(np) (*Tmsgcat)(unsafe.Pointer(p1)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) @@ -31924,7 +31922,7 @@ _2: * msgid2 to request that dcngettext suppress plural processing. */ if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals != 0 { plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p1)).Fplural_rule, n) - if plural > uint64((*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals) { + if plural > Uint64FromInt32((*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals) { goto notrans } for { @@ -31933,7 +31931,7 @@ _2: if !(v20 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size - uint64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p1)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size - Uint64FromInt64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p1)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint64(1) >= rem { goto notrans @@ -98162,7 +98160,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(a)) != 0 && *(*uint8)(unsafe.Pointer(b)) != 0) { break } - for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && uint32(int32(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { + for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { a++ } if uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32) != uint32(*(*uint8)(unsafe.Pointer(b))) { @@ -98174,7 +98172,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { a++ b++ } - return BoolInt32(int32(*(*uint8)(unsafe.Pointer(a))) != int32(*(*uint8)(unsafe.Pointer(b)))) + return BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(b)))) } func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { @@ -98198,11 +98196,11 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { ; s += uintptr(Xstrlen(tls, s) + uint64(1)) } - return uint64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) + return Uint64FromInt64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) } s += uintptr(Xstrlen(tls, s) + uint64(1)) if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - if int32(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { s += uintptr(2) } else { s += uintptr(uint32(2) + (uint32(64)-uint32(*(*uint8)(unsafe.Pointer(s + 1))))*uint32(5)) @@ -98211,7 +98209,7 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { goto _1 _1: } - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } type Tstateful_cd = struct { @@ -98243,16 +98241,16 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { _, _, _, _, _, _, _ = cd, f, scd, t, v1, v2, v3 v1 = _find_charmap(tls, to) t = v1 - if v3 = v1 == uint64(-Int32FromInt32(1)); !v3 { + if v3 = v1 == Uint64FromInt32(-Int32FromInt32(1)); !v3 { v2 = _find_charmap(tls, from) f = v2 } - if v3 || v2 == uint64(-Int32FromInt32(1)) || int32(_charmaps[t]) >= int32(0330) { + if v3 || v2 == Uint64FromInt32(-Int32FromInt32(1)) || Int32FromUint8(_charmaps[t]) >= int32(0330) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } cd = _combine_to_from(tls, t, f) - switch int32(_charmaps[f]) { + switch Int32FromUint8(_charmaps[f]) { case int32(UTF_16): fallthrough case int32(UTF_32): @@ -98273,7 +98271,7 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { func _get_16(tls *TLS, s uintptr, e int32) (r uint32) { e &= int32(1) - return uint32(int32(*(*uint8)(unsafe.Pointer(s + uintptr(e))))<>(uint32(2)*x%uint32(8)) | int32(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) + x = c - Uint32FromInt32(int32(4)*Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1)))))) + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)))))>>(uint32(2)*x%uint32(8)) | Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) if x < uint32(256) { v1 = x } else { @@ -98389,7 +98387,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } c = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) l = uint64(1) - switch int32(type1) { + switch Int32FromUint8(type1) { case int32(UTF_8): goto _2 case int32(US_ASCII): @@ -98440,13 +98438,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } l = Xmbrtowc(tls, bp+32, *(*uintptr)(unsafe.Pointer(in)), *(*Tsize_t)(unsafe.Pointer(inb)), bp+24) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { goto ilseq } - if l == uint64(-Int32FromInt32(2)) { + if l == Uint64FromInt32(-Int32FromInt32(2)) { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) goto _23 _3: ; @@ -98460,7 +98458,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < l { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) if !(0 != 0) { goto _24 } @@ -98472,7 +98470,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) _24: ; if c-uint32(0xd800) < uint32(0x800) || c >= uint32(0x110000) { @@ -98491,19 +98489,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(2) { goto starved } - c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) if c-Uint32FromInt32(0xdc00) < uint32(0x400) { goto ilseq } if c-Uint32FromInt32(0xd800) < uint32(0x400) { - if uint32(int32(type1)-int32(UCS2BE)) < uint32(2) { + if Uint32FromInt32(Int32FromUint8(type1)-int32(UCS2BE)) < uint32(2) { goto ilseq } l = uint64(4) if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), int32(type1)) + d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), Int32FromUint8(type1)) if d-Uint32FromInt32(0xdc00) >= uint32(0x400) { goto ilseq } @@ -98520,7 +98518,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), 0) - if int32(type1) == int32(UCS2) { + if Int32FromUint8(type1) == int32(UCS2) { if c == uint32(0xfffe) { v26 = int32(UCS2LE) } else { @@ -98535,7 +98533,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } v25 = v27 } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v25) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v25) if c == uint32(0xfffe) || c == uint32(0xfeff) { l = uint64(2) } @@ -98555,7 +98553,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v28 = int32(UTF_32BE) } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v28) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v28) if c == uint32(0xfffe0000) || c == uint32(0xfeff) { l = uint64(4) } @@ -98567,8 +98565,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto _23 } - if c-uint32(0xa1) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + if c-uint32(0xa1) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } l = uint64(2) @@ -98576,17 +98574,17 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if c-uint32(129) <= uint32(Int32FromInt32(159)-Int32FromInt32(129)) { + if c-uint32(129) <= Uint32FromInt32(Int32FromInt32(159)-Int32FromInt32(129)) { c -= uint32(129) } else { - if c-uint32(224) <= uint32(Int32FromInt32(239)-Int32FromInt32(224)) { + if c-uint32(224) <= Uint32FromInt32(Int32FromInt32(239)-Int32FromInt32(224)) { c -= uint32(193) } else { goto ilseq } } c *= uint32(2) - if d-uint32(64) <= uint32(Int32FromInt32(158)-Int32FromInt32(64)) { + if d-uint32(64) <= Uint32FromInt32(Int32FromInt32(158)-Int32FromInt32(64)) { if d == uint32(127) { goto ilseq } @@ -98595,7 +98593,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } d -= uint32(64) } else { - if d-uint32(159) <= uint32(Int32FromInt32(252)-Int32FromInt32(159)) { + if d-uint32(159) <= Uint32FromInt32(Int32FromInt32(252)-Int32FromInt32(159)) { c++ d -= uint32(159) } @@ -98620,10 +98618,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) if c == uint32(0x8e) { c = d - if c-uint32(0xa1) > uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + if c-uint32(0xa1) > Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { goto ilseq } - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } c -= uint32(0xa1) @@ -98651,7 +98649,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c != uint32('(') && c != uint32('$') { goto ilseq } - switch uint32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { + switch Uint32FromInt32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { case uint32('B'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(0) goto _1 @@ -98661,10 +98659,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui case uint32('I'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(4) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('@')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('@')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(2) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('B')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('B')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(3) goto _1 } @@ -98700,7 +98698,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto ilseq } if c-uint32(0x21) < uint32(0x5e) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) } break } @@ -98733,11 +98731,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d < uint32(0xa1) && int32(type1) == int32(GB2312) { + if d < uint32(0xa1) && Int32FromUint8(type1) == int32(GB2312) { goto ilseq } if d-uint32(0x40) >= uint32(191) || d == uint32(127) { - if d-uint32('0') > uint32(9) || int32(type1) != int32(GB18030) { + if d-uint32('0') > uint32(9) || Int32FromUint8(type1) != int32(GB18030) { goto ilseq } l = uint64(4) @@ -98808,23 +98806,23 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d-uint32(0x40) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < uint32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { + if d-uint32(0x40) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < Uint32FromInt32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { goto ilseq } d -= uint32(0x40) if d > uint32(0x3e) { d -= uint32(0x22) } - if c-uint32(0xa1) >= uint32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { - if c-uint32(0x87) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { + if c-uint32(0xa1) >= Uint32FromInt32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { + if c-uint32(0x87) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { goto ilseq } if c < uint32(0xa1) { c -= uint32(0x87) } else { - c -= uint32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) + c -= Uint32FromInt32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) } - c = uint32(int32(_hkscs[uint32(4867)+(c*uint32(157)+d)/uint32(16)])>>((c*uint32(157)+d)%uint32(16))%int32(2)<>((c*uint32(157)+d)%uint32(16))%int32(2)< *(*Tsize_t)(unsafe.Pointer(outb)) { goto toobig } @@ -98853,7 +98851,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } c -= uint32(0xa1) - c = uint32(int32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(&_big5)) + uintptr(c)*314 + uintptr(d)*2))) | BoolInt32(c == uint32(0x27) && (d == uint32(0x3a) || d == uint32(0x3c) || d == uint32(0x42)))<= uint32(93) || d >= uint32(94) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) d += uint32(0xa1) - if c >= uint32(93) || c >= uint32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { + if c >= uint32(93) || c >= Uint32FromInt32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { goto ilseq } if d-uint32('A') < uint32(26) { @@ -98882,7 +98880,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if d-uint32('a') < uint32(26) { d = d - uint32('a') + uint32(26) } else { - if d-uint32(0x81) < uint32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { + if d-uint32(0x81) < Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { d = d - uint32(0x81) + uint32(52) } else { goto ilseq @@ -98892,7 +98890,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(0x20) { c = uint32(178)*c + d } else { - c = uint32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d + c = Uint32FromInt32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d } c += uint32(0xac00) d = uint32(0xac00) @@ -98947,7 +98945,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } _23: ; - switch int32(totype) { + switch Int32FromUint8(totype) { case int32(WCHAR_T): goto _35 case int32(UTF_8): @@ -98987,20 +98985,20 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = int32(c) + *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = Int32FromUint32(c) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 _36: ; if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { - k = uint64(Xwctomb(tls, bp+56, int32(c))) + k = Uint64FromInt32(Xwctomb(tls, bp+56, Int32FromUint32(c))) if *(*Tsize_t)(unsafe.Pointer(outb)) < k { goto toobig } Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(out)), bp+56, k) } else { - k = uint64(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), int32(c))) + k = Uint64FromInt32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), Int32FromUint32(c))) } *(*uintptr)(unsafe.Pointer(out)) += uintptr(k) *(*Tsize_t)(unsafe.Pointer(outb)) -= k @@ -99040,7 +99038,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui _53: ; d = c - c = uint32(int32(4) * int32(totype)) + c = Uint32FromInt32(int32(4) * Int32FromUint8(totype)) for { if !(c < uint32(256)) { break @@ -99069,8 +99067,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui c = uint32('~') goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) goto revout } c = _uni_to_jis(tls, c) @@ -99090,7 +99088,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v59 = int32(176) } - *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + uint32(v59)) + *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + Uint32FromInt32(v59)) v61 = out v60 = *(*uintptr)(unsafe.Pointer(v61)) *(*uintptr)(unsafe.Pointer(v61))++ @@ -99107,8 +99105,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) } else { c = _uni_to_jis(tls, c) } @@ -99133,7 +99131,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(7) { goto toobig } @@ -99244,14 +99242,14 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ; _43: ; - if c < uint32(0x10000) || uint32(int32(totype)-int32(UCS2BE)) < uint32(2) { + if c < uint32(0x10000) || Uint32FromInt32(Int32FromUint8(totype)-int32(UCS2BE)) < uint32(2) { if c >= uint32(0x10000) { c = uint32(0xFFFD) } if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(2) { goto toobig } - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(2) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 @@ -99260,8 +99258,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto toobig } c -= uint32(0x10000) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), int32(totype)) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), Int32FromUint8(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99275,7 +99273,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99293,19 +99291,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ilseq: ; err = int32(EILSEQ) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto toobig toobig: ; err = int32(E2BIG) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto starved starved: ; err = int32(EINVAL) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end end: ; @@ -99494,7 +99492,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { /* Limit name length and forbid leading dot or any slashes. */ n = uint64(0) for { - if !(n < uint64(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && int32(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { + if !(n < uint64(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { break } goto _8 @@ -99502,12 +99500,12 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { ; n++ } - if int32(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { val = __ccgo_ts + 580 } - builtin = BoolInt32(int32(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+580) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+588) != 0)) + builtin = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+580) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+588) != 0)) if builtin != 0 { - if cat == LC_CTYPE && int32(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { + if cat == LC_CTYPE && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { return uintptr(unsafe.Pointer(&X__c_dot_utf8)) } return uintptr(0) @@ -99535,7 +99533,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { break } z = X__strchrnul(tls, path, int32(':')) - l = uint64(int64(z) - int64(path)) + l = Uint64FromInt64(int64(z) - int64(path)) if l >= uint64(256)-n-uint64(2) { goto _10 } @@ -99774,8 +99772,8 @@ func _skipspace(tls *TLS, s uintptr) (r uintptr) { var v1, v2 int32 _, _ = v1, v2 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -99800,23 +99798,23 @@ func _evalprim(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { s = _skipspace(tls, s) if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { (*Tst)(unsafe.Pointer(st)).Fr = Xstrtoul(tls, s, bp, int32(10)) - if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == uint64(-Int32FromInt32(1)) { + if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == Uint64FromInt32(-Int32FromInt32(1)) { return __ccgo_ts } return _skipspace(tls, *(*uintptr)(unsafe.Pointer(bp))) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('n') { (*Tst)(unsafe.Pointer(st)).Fr = (*Tst)(unsafe.Pointer(st)).Fn return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(')') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(')') { return __ccgo_ts } return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('!') { s = _evalprim(tls, st, s+uintptr(1), d) (*Tst)(unsafe.Pointer(st)).Fr = BoolUint64(!((*Tst)(unsafe.Pointer(st)).Fr != 0)) return s @@ -99887,9 +99885,9 @@ func _parseop(tls *TLS, st uintptr, s uintptr) (r uintptr) { if !(i < int32(11)) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(_opch[i]) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(_opch[i]) { /* note: >,< are accepted with or without = */ - if i < int32(6) && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(_opch2[i]) { + if i < int32(6) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == Int32FromUint8(_opch2[i]) { (*Tst)(unsafe.Pointer(st)).Fop = i return s + uintptr(2) } @@ -99926,11 +99924,11 @@ func _evalbinop(tls *TLS, st uintptr, s uintptr, minprec int32, d int32) (r uint if op was missing then prec[op]==0 */ op = (*Tst)(unsafe.Pointer(st)).Fop - if int32(_prec[op]) <= minprec { + if Int32FromUint8(_prec[op]) <= minprec { return s } left = (*Tst)(unsafe.Pointer(st)).Fr - s = _evalbinop(tls, st, s, int32(_prec[op]), d) + s = _evalbinop(tls, st, s, Int32FromUint8(_prec[op]), d) if _binop(tls, st, op, left) != 0 { return __ccgo_ts } @@ -99966,12 +99964,12 @@ func _evalexpr(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { return __ccgo_ts } s = _evalbinop(tls, st, s, 0, d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') { return s } a = (*Tst)(unsafe.Pointer(st)).Fr s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(':') { return __ccgo_ts } b = (*Tst)(unsafe.Pointer(st)).Fr @@ -99997,10 +99995,10 @@ func X__pleval(tls *TLS, s uintptr, n uint64) (r uint64) { _ = v1 (*(*Tst)(unsafe.Pointer(bp))).Fn = n s = _evalexpr(tls, bp, s, int32(100)) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(';') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(';') { v1 = (*(*Tst)(unsafe.Pointer(bp))).Fr } else { - v1 = uint64(-Int32FromInt32(1)) + v1 = Uint64FromInt32(-Int32FromInt32(1)) } return v1 } @@ -100020,7 +100018,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { var _ /* part at bp+48 */ [24]uint8 var _ /* tmp_locale at bp+0 */ t__locale_struct _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, l, lm, lm1, p, part1, ret, s, same, z, v3, v4, v5, v6 - if uint32(cat) > uint32(LC_ALL) { + if Uint32FromInt32(cat) > uint32(LC_ALL) { return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&X__locale_lock))) @@ -100040,7 +100038,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { } z = X__strchrnul(tls, p, int32(';')) if int64(z)-int64(p) <= int64(LOCALE_NAME_MAX) { - Xmemcpy(tls, bp+48, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, bp+48, p, Uint64FromInt64(int64(z)-int64(p))) (*(*[24]uint8)(unsafe.Pointer(bp + 48)))[int64(z)-int64(p)] = uint8(0) if *(*uint8)(unsafe.Pointer(z)) != 0 { p = z + uintptr(1) @@ -100154,7 +100152,7 @@ _3: if !(n != 0 && *(*uint8)(unsafe.Pointer(fmt)) != 0) { goto _1 } - if !(int32(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { goto _4 } goto literal @@ -100170,7 +100168,7 @@ literal: _4: ; fmt++ - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { goto literal } fill = int32(' ') @@ -100179,11 +100177,11 @@ _4: nosym = 0 left = 0 for { - switch int32(*(*uint8)(unsafe.Pointer(fmt))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) { case int32('='): fmt++ v8 = fmt - fill = int32(*(*uint8)(unsafe.Pointer(v8))) + fill = Int32FromUint8(*(*uint8)(unsafe.Pointer(v8))) goto _7 case int32('^'): nogrp = int32(1) @@ -100211,7 +100209,7 @@ _4: if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - fw = int32(10)*fw + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + fw = int32(10)*fw + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _9 _9: ; @@ -100219,28 +100217,28 @@ _4: } lp = 0 rp = int32(2) - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { lp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - lp = int32(10)*lp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + lp = int32(10)*lp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _10 _10: ; fmt++ } } - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { rp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - rp = int32(10)*rp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + rp = int32(10)*rp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _11 _11: ; @@ -100249,13 +100247,13 @@ _4: } v12 = fmt fmt++ - intl = BoolInt32(int32(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) + intl = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) w = lp + int32(1) + rp if !(left != 0) && fw > w { w = fw } x = VaFloat64(&ap) - l = uint64(Xsnprintf(tls, s, n, __ccgo_ts+609, VaList(bp+8, w, rp, x))) + l = Uint64FromInt32(Xsnprintf(tls, s, n, __ccgo_ts+609, VaList(bp+8, w, rp, x))) if l >= n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(E2BIG) return int64(-int32(1)) @@ -100426,7 +100424,7 @@ func Xtextdomain(tls *TLS, domainname uintptr) (r uintptr) { return uintptr(0) } if !(_current_domain != 0) { - _current_domain = Xmalloc(tls, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + _current_domain = Xmalloc(tls, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if !(_current_domain != 0) { return uintptr(0) } @@ -100562,7 +100560,7 @@ func Xreallocarray(tls *TLS, ptr uintptr, m Tsize_t, n Tsize_t) (r uintptr) { trc("tls=%v ptr=%v m=%v n=%v, (%v:)", tls, ptr, m, n, origin(2)) defer func() { trc("-> %v", r) }() } - if n != 0 && m > uint64(-Int32FromInt32(1))/n { + if n != 0 && m > Uint64FromInt32(-Int32FromInt32(1))/n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -100636,7 +100634,7 @@ func X__expo2(tls *TLS, x float64, sign float64) (r float64) { var v1 Tuint64_t _, _ = scale, v1 /* note that k is odd and scale*scale overflows */ - v1 = uint64(uint32(Int32FromInt32(0x3ff)+_k2/Int32FromInt32(2))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(e != 0) { if *(*Tuint64_t)(unsafe.Pointer(bp))<> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(e != 0) { if *(*Tuint32_t)(unsafe.Pointer(bp))<> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix <= uint32(0x400f6a7a) { /* |x| ~<= 5pi/4 */ if ix&uint32(0xfffff) == uint32(0x921fb) { /* |x| ~= pi/2 or 2pi/2 */ @@ -101039,8 +101037,8 @@ medium: } *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - ex = int32(ix >> int32(20)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ex = Int32FromUint32(ix >> int32(20)) if ex-ey > int32(16) { /* 2nd round, good to 118 bits */ t = r w = fn * _pio2_2 @@ -101048,7 +101046,7 @@ medium: w = fn*_pio2_2t - (t - r - w) *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if ex-ey > int32(49) { /* 3rd round, good to 151 bits, covers all cases */ t = r w = fn * _pio2_3 @@ -101072,8 +101070,8 @@ _1: } /* set z = scalbn(|x|,-ilogb(x)+23) */ *(*float64)(unsafe.Pointer(bp)) = x - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) >> Int32FromInt32(12) - *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) >> Int32FromInt32(12) + *(*Tuint64_t)(unsafe.Pointer(bp)) |= Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) z = *(*float64)(unsafe.Pointer(bp)) i = 0 for { @@ -101092,7 +101090,7 @@ _1: for (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] == float64(0) { i-- } - n = X__rem_pio2_large(tls, bp+8, bp+32, int32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) + n = X__rem_pio2_large(tls, bp+8, bp+32, Int32FromUint32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) if sign != 0 { *(*float64)(unsafe.Pointer(y)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[0] *(*float64)(unsafe.Pointer(y + 1*8)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[int32(1)] @@ -101664,9 +101662,9 @@ func X__rem_pio2f(tls *TLS, x float32, y uintptr) (r int32) { return 0 } /* scale x into [2^23, 2^24-1] */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) - e0 = int32(ix>>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ - *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - uint32(e0<> int32(31)) + e0 = Int32FromUint32(ix>>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - Uint32FromInt32(e0<> int32(63)) + return Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) } // C documentation @@ -101726,7 +101724,7 @@ func X__signbitf(tls *TLS, x float32) (r int32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - return int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + return Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) } func X__signbitl(tls *TLS, x float64) (r int32) { @@ -101819,7 +101817,7 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) big = BoolInt32(hx&uint32(0x7fffffff) >= uint32(0x3FE59428)) /* |x| >= 0.6744 */ if big != 0 { - sign = int32(hx >> int32(31)) + sign = Int32FromUint32(hx >> int32(31)) if sign != 0 { x = -x y = -y @@ -101854,13 +101852,13 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { } /* -1.0/(x+r) has up to 2ulp error, so compute it accurately */ w0 = w - v2 = *(*Tuint64_t)(unsafe.Pointer(&w0))>>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) /* x < 1 domain error is handled in the called functions */ - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| < 2, up to 2ulp error in [1,1.125] */ return Xlog1p(tls, x-Float64FromInt32(1)+Xsqrt(tls, (x-Float64FromInt32(1))*(x-Float64FromInt32(1))+Float64FromInt32(2)*(x-Float64FromInt32(1)))) } - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| < 0x1p26 */ return Xlog(tls, Float64FromInt32(2)*x-Float64FromInt32(1)/(x+Xsqrt(tls, x*x-Float64FromInt32(1)))) } @@ -102106,12 +102104,12 @@ func Xacoshf(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x a = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - if a < uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { - if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { @@ -102351,15 +102349,15 @@ func Xasinhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i x3 = *(*float32)(unsafe.Pointer(bp)) - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { - if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { @@ -102615,7 +102613,7 @@ _2: } } /* |y/x| > 0x1p64 */ - if ix+uint32(Int32FromInt32(64)< 0x1p26 */ - if ix+uint32(Int32FromInt32(26)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) y3 = *(*float64)(unsafe.Pointer(bp)) - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { /* handle underflow */ if e == uint32(0) { if uint64(4) == uint64(4) { @@ -102974,10 +102972,10 @@ func Xatanhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) y3 = *(*float32)(unsafe.Pointer(bp)) - if *(*Tuint32_t)(unsafe.Pointer(bp)) < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(1)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -103279,12 +103277,12 @@ func Xceilf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -103451,7 +103449,7 @@ func Xcos(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) @@ -103545,7 +103543,7 @@ func Xcosf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -103591,12 +103589,12 @@ func Xcosh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(2) */ if w < uint32(0x3fe62e42) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -103844,7 +103842,7 @@ func Xerfc(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -103989,7 +103987,7 @@ func Xerff(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -104029,7 +104027,7 @@ func Xerfcf(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104197,7 +104195,7 @@ _3: kd -= X__exp_data.Fshift r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<>int32(52)&uint64(0x7ff) < uint64(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { + if *(*Tuint64_t)(unsafe.Pointer(bp + 8))>>int32(52)&uint64(0x7ff) < Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { if !(y != 0) { return _p10[int32(*(*float64)(unsafe.Pointer(bp)))+int32(15)] } @@ -104324,7 +104322,7 @@ func Xexp10f(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp + 4)) = *(*float32)(unsafe.Pointer(bp)) /* fabsf(n) < 8 without raising invalid on nan */ - if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < uint32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { + if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { if !(y != 0) { return _p101[int32(*(*float32)(unsafe.Pointer(bp)))+int32(7)] } @@ -104491,7 +104489,7 @@ _5: kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4043687A) { /* if |x|>=56*ln2 */ *(*float64)(unsafe.Pointer(bp)) = x3 @@ -104826,7 +104824,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return float64(1) + float64(2)*(x3-e) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ twopk = *(*float64)(unsafe.Pointer(bp + 8)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + float64(1) @@ -104837,7 +104835,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return y3 - float64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { @@ -104883,7 +104881,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4195b844) { /* if |x|>=27*ln2 */ if hx > uint32(0x7f800000) { /* NaN */ @@ -104961,7 +104959,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return Float32FromFloat32(1) + Float32FromFloat32(2)*(x3-e) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) + k) << int32(23)) /* 2^k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) + k) << int32(23)) /* 2^k */ twopk = *(*float32)(unsafe.Pointer(bp)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + Float32FromFloat32(1) @@ -104972,7 +104970,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return y3 - Float32FromFloat32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { y3 = (x3 - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk } else { @@ -105194,7 +105192,7 @@ func Xfloor(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -105254,12 +105252,12 @@ func Xfloorf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -105321,13 +105319,13 @@ func _normalize(tls *TLS, x float64) (r Tnum) { var v1 float64 _, _, _, _, _ = e, ix, sign, v1, v2 ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - e = int32(ix >> int32(52)) + e = Int32FromUint64(ix >> int32(52)) sign = e & int32(0x800) e &= int32(0x7ff) if !(e != 0) { v1 = x * float64(9.223372036854776e+18) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) - e = int32(ix >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(ix >> int32(52) & uint64(0x7ff)) if e != 0 { v2 = e - int32(63) } else { @@ -105532,7 +105530,7 @@ func Xfma(tls *TLS, x1 float64, y1 float64, z float64) (r2 float64) { } e -= d /* convert to double */ - i = int64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ + i = Int64FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ if sign != 0 { i = -i } @@ -105554,7 +105552,7 @@ func Xfma(tls *TLS, x1 float64, y1 float64, z float64) (r2 float64) { /* one bit is lost when scaled, add another top bit to only round once at conversion if it is inexact */ if *(*Tuint64_t)(unsafe.Pointer(bp))<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) + i = Int64FromUint64((*(*Tuint64_t)(unsafe.Pointer(bp))>>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) if sign != 0 { i = -i } @@ -105626,12 +105624,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = y } else { v9 = x @@ -105683,12 +105681,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = y } else { v9 = x @@ -105748,12 +105746,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = x } else { v9 = y @@ -105805,12 +105803,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = x } else { v9 = y @@ -105874,9 +105872,9 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* in the followings uxi should be ux.i, but then gcc wrongly adds */ /* float load/store to inner loops ruining performance and code size */ uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) @@ -105908,7 +105906,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ex-- i <<= uint64(1) } - uxi <<= uint64(-ex + int32(1)) + uxi <<= Uint64FromInt32(-ex + int32(1)) } else { uxi = uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -105970,11 +105968,11 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { /* scale result */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } - uxi |= uint64(sx) << int32(63) + uxi |= Uint64FromInt32(sx) << int32(63) *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi return *(*float64)(unsafe.Pointer(bp + 8)) } @@ -106019,8 +106017,8 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) sx = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) & uint32(0x80000000) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106068,7 +106066,7 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106111,9 +106109,9 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { /* scale result up */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } uxi |= sx *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi @@ -106150,7 +106148,7 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { Fd float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ee = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(ee != 0) { if x != 0 { x = Xfrexp(tls, x*float64(1.8446744073709552e+19), e) @@ -106194,7 +106192,7 @@ func Xfrexpf(tls *TLS, x float32, e uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + ee = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(ee != 0) { if x != 0 { x = Xfrexpf(tls, float32(float64(x)*float64(1.8446744073709552e+19)), e) @@ -106302,8 +106300,8 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) { })(unsafe.Pointer(bp + 8)) = ut } /* special cases */ - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) x = *(*float64)(unsafe.Pointer(bp)) y = *(*float64)(unsafe.Pointer(bp + 8)) /* note: hypot(inf,nan) == inf */ @@ -106395,19 +106393,19 @@ func Xhypotf(tls *TLS, x float32, y float32) (r float32) { } x = *(*float32)(unsafe.Pointer(bp)) y = *(*float32)(unsafe.Pointer(bp + 4)) - if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(25)<= Uint32FromInt32(Int32FromInt32(0xff)<= Uint32FromInt32(Int32FromInt32(25)<= uint32((Int32FromInt32(0x7f)+Int32FromInt32(60))<= Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(60))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { i <<= uint64(12) if i == uint64(0) { @@ -106523,7 +106521,7 @@ func Xilogbf(tls *TLS, x3 float32) (r int32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) - e = int32(i >> int32(23) & uint32(0xff)) + e = Int32FromUint32(i >> int32(23) & uint32(0xff)) if !(e != 0) { i <<= uint32(9) if i == uint32(0) { @@ -107331,7 +107329,7 @@ func Xj1(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { return Float64FromInt32(1) / (x * x) @@ -107667,7 +107665,7 @@ func Xj1f(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return Float32FromInt32(1) / (x * x) @@ -107956,7 +107954,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108158,7 +108156,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108252,7 +108250,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { var ix Tuint32_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = a, b, h, i, ix, k, nf, nm1, q0, q1, sign, t, temp, tmp, w, z, v6 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108417,7 +108415,7 @@ func Xynf(tls *TLS, n int32, x float32) (r float32) { var ib, ix Tuint32_t _, _, _, _, _, _, _, _, _, _ = a, b, i, ib, ix, nm1, sign, temp, v1, v3 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108619,12 +108617,12 @@ func X__lgamma_r(tls *TLS, x float64, signgamp uintptr) (r1 float64) { *(*float64)(unsafe.Pointer(bp)) = x /* purge off +-inf, NaN, +-0, tiny and negative arguments */ *(*int32)(unsafe.Pointer(signgamp)) = int32(1) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix >= uint32(0x7ff00000) { return x * x } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(70))<> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) ix = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return x * x @@ -109158,7 +109156,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109179,8 +109177,8 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<>Int32FromInt32(20)) - int32(0x3ff) + hx += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k += Int32FromUint32(hx>>Int32FromInt32(20)) - int32(0x3ff) hx = hx&uint32(0x000fffff) + uint32(0x3fe6a09e) *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(hx)<>Int32FromInt32(23)) - int32(0x7f) + ix += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k += Int32FromUint32(ix>>Int32FromInt32(23)) - int32(0x7f) ix = ix&uint32(0x007fffff) + uint32(0x3f3504f3) *(*Tuint32_t)(unsafe.Pointer(bp)) = ix x = *(*float32)(unsafe.Pointer(bp)) @@ -109441,7 +109439,7 @@ func Xlog1p(tls *TLS, x3 float64) (r float64) { } /* log1p(-1) = -inf */ return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } - if hx<> int32(32)) - hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) - k = int32(hu>>Int32FromInt32(20)) - int32(0x3ff) + hu += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k = Int32FromUint32(hu>>Int32FromInt32(20)) - int32(0x3ff) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(54) { if k >= int32(2) { @@ -109541,7 +109539,7 @@ func Xlog1pf(tls *TLS, x3 float32) (r float32) { } /* log1p(-1)=+inf */ return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } - if ix<>Int32FromInt32(23)) - int32(0x7f) + iu += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k = Int32FromUint32(iu>>Int32FromInt32(23)) - int32(0x7f) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(25) { if k >= int32(2) { @@ -109662,7 +109660,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109683,8 +109681,8 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109774,16 +109772,16 @@ func Xlog2f(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + k = Int32FromUint32(tmp) >> int32(23) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -109950,7 +109948,7 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) } - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109964,14 +109962,14 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % uint32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + i = Int32FromUint32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ iz = ix - tmp&uint32(0xff800000) invc = (*(*struct { Finvc float64 @@ -110110,7 +110108,7 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) /* no fractional part */ if e >= int32(52) { *(*float64)(unsafe.Pointer(iptr)) = x @@ -110162,7 +110160,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) /* no fractional part */ if e >= int32(23) { *(*float32)(unsafe.Pointer(iptr)) = x @@ -110178,7 +110176,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { *(*float32)(unsafe.Pointer(iptr)) = *(*float32)(unsafe.Pointer(bp)) return x } - mask = uint32(int32(0x007fffff) >> e) + mask = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&mask == uint32(0) { *(*float32)(unsafe.Pointer(iptr)) = x *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x80000000) @@ -110301,7 +110299,7 @@ _2: *(*Tuint64_t)(unsafe.Pointer(bp + 8))++ } } - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) /* raise overflow if ux.f is infinite and x is finite */ if e == int32(0x7ff) { if uint64(8) == uint64(4) { @@ -110502,7 +110500,7 @@ _2: v6 = *(*uint64)(unsafe.Pointer(bp + 8)) goto _7 _7: - if int32(v6>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v6>>Int32FromInt32(63)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16)) |= uint32(0x80000000) } } else { @@ -110511,7 +110509,7 @@ _2: v8 = *(*uint32)(unsafe.Pointer(bp)) goto _9 _9: - if int32(v8>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v8>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ @@ -110521,7 +110519,7 @@ _2: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- @@ -110596,8 +110594,8 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF2) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(iy >> int32(52) & uint64(0x7ff)) if e < int32(0x3ff) { return 0 } @@ -110835,7 +110833,7 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) topx = _top124(tls, x1) topy = _top124(tls, y1) - if topx-uint32(0x001) >= uint32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topx-uint32(0x001) >= Uint32FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1. */ /* Special cases: (x < 0x1p-126 or inf or nan) or @@ -110891,12 +110889,12 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { return X__math_invalid(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) + sign_bias = Uint32FromInt32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) } ix &= uint64(0x7fffffffffffffff) topx &= uint32(0x7ff) } - if topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: sign_bias == 0 here because y is not odd. */ v10 = float64(1) if ix == *(*Tuint64_t)(unsafe.Pointer(&v10)) { @@ -110981,10 +110979,10 @@ func _log2_inline(tls *TLS, ix Tuint32_t) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF3) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ + k = Int32FromUint32(top) >> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -111030,7 +111028,7 @@ _2: kd -= X__exp2f_data.Fshift_scaled /* k/N */ r = xd - kd /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */ - t = *(*Tuint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + uintptr(ki%uint64(Int32FromInt32(1)<> int32(23) & uint32(0xff)) + e = Int32FromUint32(iy >> int32(23) & uint32(0xff)) if e < int32(0x7f) { return 0 } if e > Int32FromInt32(0x7f)+Int32FromInt32(23) { return int32(2) } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { return 0 } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { return int32(1) } return int32(2) @@ -111088,7 +111086,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { sign_bias = uint32(0) ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) iy = *(*Tuint32_t)(unsafe.Pointer(&y1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ if _zeroinfnan1(tls, iy) != 0 { if uint32(2)*iy == uint32(0) { @@ -111100,10 +111098,10 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { return x1 + y1 } - if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { + if uint32(2)*ix == Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) } - if BoolInt32(uint32(2)*ix < uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { + if BoolInt32(uint32(2)*ix < Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { return Float32FromFloat32(0) } /* |x|<1 && y==inf or |x|>1 && y==-inf. */ return y1 * y1 @@ -111134,7 +111132,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { return X__math_invalidf(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) + sign_bias = Uint32FromInt32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) } ix &= uint32(0x7fffffff) } @@ -111143,7 +111141,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } } logx = _log2_inline(tls, ix) @@ -111267,10 +111265,10 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) - sy = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sy = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint64_t)(unsafe.Pointer(bp + 16))<> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -111371,9 +111369,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi x = *(*float64)(unsafe.Pointer(bp + 8)) @@ -111386,9 +111384,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v10 = -int32(q) + v10 = -Int32FromUint32(q) } else { - v10 = int32(q) + v10 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v10 if sx != 0 { @@ -111440,10 +111438,10 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) - sx = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) - sy = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + sx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) + sy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111488,7 +111486,7 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111542,9 +111540,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi x = *(*float32)(unsafe.Pointer(bp + 4)) @@ -111557,9 +111555,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -111605,8 +111603,8 @@ func Xrint(tls *TLS, x float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - s = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + s = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x } @@ -111654,8 +111652,8 @@ func Xrintf(tls *TLS, x float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) - s = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + s = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x } @@ -111713,7 +111711,7 @@ func Xround(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x3 } @@ -111778,7 +111776,7 @@ func Xroundf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x3 } @@ -112002,7 +112000,7 @@ func Xscalbn(tls *TLS, x float64, n int32) (r float64) { } } } - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(Int32FromInt32(0x3ff)+n) << int32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) = Uint64FromInt32(Int32FromInt32(0x3ff)+n) << int32(52) x = y * *(*float64)(unsafe.Pointer(bp)) return x } @@ -112044,7 +112042,7 @@ func Xscalbnf(tls *TLS, x float32, n int32) (r float32) { } } } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32(Int32FromInt32(0x7f)+n) << int32(23) + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32(Int32FromInt32(0x7f)+n) << int32(23) x = y * *(*float32)(unsafe.Pointer(bp)) return x } @@ -112126,7 +112124,7 @@ func Xsin(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) @@ -112199,7 +112197,7 @@ func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) s = X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) c = X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) switch n & Uint32FromInt32(3) { @@ -112346,7 +112344,7 @@ func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) s = X__sindf(tls, *(*float64)(unsafe.Pointer(bp))) c = X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) switch n & Uint32FromInt32(3) { @@ -112408,7 +112406,7 @@ func Xsinf(tls *TLS, x3 float32) (r float32) { var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ @@ -112525,14 +112523,14 @@ func Xsinh(tls *TLS, x float64) (r float64) { h = -h } /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) absx = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(DBL_MAX) */ if w < uint32(0x40862e42) { t = Xexpm1(tls, absx) if w < uint32(0x3ff00000) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<> int32(52) - if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { + if top-uint64(0x001) >= Uint64FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return x1 @@ -112666,7 +112664,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { x = 4^e m; with integer e, and m in [1, 4) m: fixed point representation [2.62] 2^e is the exponent part of the result. */ - even = int32(top & uint64(1)) + even = Int32FromUint64(top & uint64(1)) m = ix<>= uint64(1) @@ -112710,7 +112708,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { /* handle rounding modes and inexact exception: only (s+1)^2 == 2^42 m case is exact otherwise add a tiny value to cause the fenv effects. */ - tiny = uint64(v2) + tiny = Uint64FromInt64(v2) tiny |= (d1 ^ d2) & uint64(0x8000000000000000) t = *(*float64)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112795,7 +112793,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { var v3 int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, t, tiny, u, y, y1, v1, v2, v3, v4 ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return x1 @@ -112809,7 +112807,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 4^e m; with int e and m in [1, 4). */ even = ix & uint32(0x00800000) @@ -112823,7 +112821,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { m = v2 /* 2^e is the exponent part of the return value. */ ey = ix >> int32(1) - ey += uint32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) + ey += Uint32FromInt32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) ey &= uint32(0x7f800000) i = ix >> Int32FromInt32(17) % uint32(128) r = uint32(X__rsqrt_tab[i]) << int32(16) @@ -112855,7 +112853,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { v3 = int32(0x01000000) } /* handle rounding and inexact exception. */ - tiny = uint32(v3) + tiny = Uint32FromInt32(v3) tiny |= (d1 ^ d2) & uint32(0x80000000) t = *(*float32)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112930,8 +112928,8 @@ func Xtan(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) - return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) + return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], Int32FromUint32(n&uint32(1))) } const M_PI_29 = 1.5707963267948966 @@ -113031,8 +113029,8 @@ func Xtanf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x3, bp)) - return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) + return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), Int32FromUint32(n&uint32(1))) } const M_PI_210 = 0 @@ -113069,8 +113067,8 @@ func Xtanh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { @@ -113142,7 +113140,7 @@ func Xtanhf(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) @@ -113367,13 +113365,13 @@ func Xtgamma(tls *TLS, x3 float64) (r1 float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ return x3 + float64(X__builtin_inff(tls)) } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { return x3 } @@ -113526,7 +113524,7 @@ func Xtruncf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { return x3 } @@ -113575,18 +113573,18 @@ func Xa64l(tls *TLS, s uintptr) (r int64) { if !(e < int32(36) && *(*uint8)(unsafe.Pointer(s)) != 0) { break } - d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), int32(*(*uint8)(unsafe.Pointer(s)))) + d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) if !(d != 0) { break } - x |= uint32(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e + x |= Uint32FromInt64(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e goto _1 _1: ; e += int32(6) s++ } - return int64(int32(x)) + return int64(Int32FromUint32(x)) } func Xl64a(tls *TLS, x0 int64) (r uintptr) { @@ -113597,7 +113595,7 @@ func Xl64a(tls *TLS, x0 int64) (r uintptr) { var p uintptr var x Tuint32_t _, _ = p, x - x = uint32(x0) + x = Uint32FromInt64(x0) p = uintptr(unsafe.Pointer(&_s)) for { if !(x != 0) { @@ -113628,7 +113626,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint64(1) for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) @@ -113638,7 +113636,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('/')) { break } goto _2 @@ -113669,7 +113667,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint64(1) for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -113681,7 +113679,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { break } if !(i != 0) { @@ -113693,7 +113691,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -113716,7 +113714,7 @@ func Xffs(tls *TLS, i int32) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_l(tls, uint64(i)) + int32(1) + v1 = _a_ctz_l(tls, Uint64FromInt32(i)) + int32(1) } else { v1 = 0 } @@ -113731,7 +113729,7 @@ func Xffsl(tls *TLS, i int64) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_l(tls, uint64(i)) + int32(1) + v1 = _a_ctz_l(tls, Uint64FromInt64(i)) + int32(1) } else { v1 = 0 } @@ -113746,7 +113744,7 @@ func Xffsll(tls *TLS, i int64) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_64(tls, uint64(i)) + int32(1) + v1 = _a_ctz_64(tls, Uint64FromInt64(i)) + int32(1) } else { v1 = 0 } @@ -113785,10 +113783,10 @@ func __strcolcmp(tls *TLS, lstr uintptr, bstr uintptr) (r int32) { var i Tsize_t _ = i i = uint64(0) - for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { + for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { i++ } - if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { + if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { return int32(1) } return 0 @@ -114073,7 +114071,7 @@ func Xgetentropy(tls *TLS, buffer uintptr, len1 Tsize_t) (r int32) { } } pos += uintptr(ret) - len1 -= uint64(ret) + len1 -= Uint64FromInt32(ret) ret = 0 } _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) @@ -114131,8 +114129,8 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if Xoptind >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) != int32('-') { - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { v1 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v1)*8)) @@ -114143,7 +114141,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { Xoptind++ return -Int32FromInt32(1) } @@ -114162,7 +114160,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { Xoptind++ X__optpos = 0 } - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { optstring++ } i = 0 @@ -114177,14 +114175,14 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { } if *(*Twchar_t)(unsafe.Pointer(bp + 4)) != *(*Twchar_t)(unsafe.Pointer(bp)) || *(*Twchar_t)(unsafe.Pointer(bp)) == int32(':') { Xoptopt = *(*Twchar_t)(unsafe.Pointer(bp)) - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+735, optchar, uint64(k)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+735, optchar, Uint64FromInt32(k)) } return int32('?') } - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { Xoptarg = uintptr(0) - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { v3 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v3)*8)) @@ -114195,11 +114193,11 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { } if Xoptind > argc { Xoptopt = *(*Twchar_t)(unsafe.Pointer(bp)) - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { return int32(':') } if Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+759, optchar, uint64(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+759, optchar, Uint64FromInt32(k)) } return int32('?') } @@ -114258,13 +114256,13 @@ func ___getopt_long(tls *TLS, argc int32, argv uintptr, optstring uintptr, longo return -int32(1) } skipped = Xoptind - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { i = Xoptind for { if i >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + 1)) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + 1)) != 0 { break } goto _1 @@ -114299,8 +114297,8 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, var cnt, colon, i, j, l, match, v2 int32 _, _, _, _, _, _, _, _, _, _, _, _, _ = arg, cnt, colon, i, j, l, match, name, opt, start, v2, v5, v6 Xoptarg = uintptr(0) - if longopts != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { - colon = BoolInt32(int32(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) + if longopts != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { + colon = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) start = *(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + uintptr(1) v2 = Int32FromInt32(0) i = v2 @@ -114311,14 +114309,14 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } name = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fname opt = start - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { opt++ } - for *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && int32(*(*uint8)(unsafe.Pointer(opt))) == int32(*(*uint8)(unsafe.Pointer(name))) { + for *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) { name++ opt++ } - if *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { + if *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { goto _1 } arg = opt @@ -114342,7 +114340,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } j = 0 for { - if !(j < l && int32(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { + if !(j < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { break } goto _4 @@ -114364,7 +114362,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, i = match opt = arg Xoptind++ - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { if !((*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fhas_arg != 0) { Xoptopt = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fval if colon != 0 || !(Xopterr != 0) { @@ -114401,7 +114399,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } return (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fval } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') { Xoptopt = 0 if !(colon != 0) && Xopterr != 0 { if cnt != 0 { @@ -114441,7 +114439,7 @@ func Xgetpriority(tls *TLS, which int32, who Tid_t) (r int32) { } var ret int32 _ = ret - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getpriority), int64(which), int64(who))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getpriority), int64(which), Int64FromUint32(who))))) if ret < 0 { return ret } @@ -114453,7 +114451,7 @@ func Xgetresgid(tls *TLS, rgid uintptr, egid uintptr, sgid uintptr) (r int32) { trc("tls=%v rgid=%v egid=%v sgid=%v, (%v:)", tls, rgid, egid, sgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) } func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { @@ -114461,7 +114459,7 @@ func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { trc("tls=%v ruid=%v euid=%v suid=%v, (%v:)", tls, ruid, euid, suid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) } func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { @@ -114475,7 +114473,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { var v1, v2 uint64 var _ /* k_rlim at bp+0 */ [2]uint64 _, _, _ = ret, v1, v2 - ret = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) if !(ret != 0) { if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur = ^Uint64FromUint64(0) @@ -114487,7 +114485,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { if !(ret != 0) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) { return ret } - if X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getrlimit), int64(resource), int64(bp)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getrlimit), int64(resource), int64(bp)))) < 0 { return -int32(1) } if (*(*[2]uint64)(unsafe.Pointer(bp)))[0] == -Uint64FromUint64(1) { @@ -114535,7 +114533,7 @@ func Xgetrusage(tls *TLS, who int32, ru uintptr) (r1 int32) { Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { @@ -114567,7 +114565,7 @@ func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { if Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(keys + uintptr(i)*8)), s, l) != 0 { goto _3 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { *(*uintptr)(unsafe.Pointer(val)) = s + uintptr(l) + uintptr(1) } else { if *(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0 { @@ -114631,8 +114629,8 @@ var _compat_map = [20]Tioctl_compat_map{ }, }, 2: { - Fnew_req: int32(uint64(Uint32FromUint32(2)< %v", r) }() } - return int32(X__libc.Fsecure) + return Int32FromUint8(X__libc.Fsecure) } func Xlockf(tls *TLS, fd int32, op int32, size Toff_t) (r int32) { @@ -115087,7 +115085,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { src = beg for *(*uint8)(unsafe.Pointer(src)) != 0 { cval = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { v1 = dest dest++ v2 = src @@ -115095,7 +115093,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { *(*uint8)(unsafe.Pointer(v1)) = *(*uint8)(unsafe.Pointer(v2)) continue } - if int32(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { src++ v3 = dest dest++ @@ -115110,11 +115108,11 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { if !(i < int32(3)) { break } - if int32(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && int32(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { cval = uint8(int32(cval) << Int32FromInt32(3)) v6 = val val++ - cval = uint8(int32(cval) + (int32(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) + cval = uint8(int32(cval) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) } else { break } @@ -115154,7 +115152,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 use_internal = BoolInt32(linebuf == uintptr(unsafe.Pointer(&_internal_buf))) (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_freq = 0 (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_passno = 0 - for cond := true; cond; cond = int32(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || uint64((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { + for cond := true; cond; cond = Int32FromUint8(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || Uint64FromInt32((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { if use_internal != 0 { Xgetline(tls, uintptr(unsafe.Pointer(&_internal_buf)), uintptr(unsafe.Pointer(&_internal_bufsize)), f) linebuf = _internal_buf @@ -115178,7 +115176,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 if !(i < Uint64FromInt64(32)/Uint64FromInt64(4)) { break } - (*(*[8]int32)(unsafe.Pointer(bp)))[i] = int32(len1) + (*(*[8]int32)(unsafe.Pointer(bp)))[i] = Int32FromUint64(len1) goto _1 _1: ; @@ -115250,7 +115248,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h var _ /* st at bp+0 */ Tstat _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, de, dfd, err, j, k, l, r, type1, v1, v10, v11, v12, v13, v2, v3, v4, v7, v8 l = Xstrlen(tls, path) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint64(1))))) == int32('/') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint64(1))))) == int32('/') { v1 = l - uint64(1) } else { v1 = l @@ -115305,14 +115303,14 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h v4 = 0 } (*(*Thistory)(unsafe.Pointer(bp + 128))).Flevel = v4 - (*(*Thistory)(unsafe.Pointer(bp + 128))).Fbase = int32(j + uint64(1)) + (*(*Thistory)(unsafe.Pointer(bp + 128))).Fbase = Int32FromUint64(j + uint64(1)) (*(*TFTW)(unsafe.Pointer(bp + 160))).Flevel = (*(*Thistory)(unsafe.Pointer(bp + 128))).Flevel if h != 0 { (*(*TFTW)(unsafe.Pointer(bp + 160))).Fbase = (*Thistory)(unsafe.Pointer(h)).Fbase } else { k = j for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { break } goto _5 @@ -115321,7 +115319,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h k-- } for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint64(1))))) != int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint64(1))))) != int32('/')) { break } goto _6 @@ -115329,7 +115327,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h ; k-- } - (*(*TFTW)(unsafe.Pointer(bp + 160))).Fbase = int32(k) + (*(*TFTW)(unsafe.Pointer(bp + 160))).Fbase = Int32FromUint64(k) } if type1 == int32(FTW_D) || type1 == int32(FTW_DP) { dfd = Xopen(tls, path, O_RDONLY, 0) @@ -115373,7 +115371,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h if !(v10 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { continue } if Xstrlen(tls, de+19) >= uint64(PATH_MAX)-l { @@ -115548,12 +115546,12 @@ func X__ptsname_r(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if !(buf != 0) { len1 = uint64(0) } - v1 = int32(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Uint32FromUint32(TIOCGPTN)), int64(bp))) + v1 = int32(X__syscall3(tls, int64(SYS_ioctl), int64(fd), Int64FromUint32(Uint32FromUint32(TIOCGPTN)), int64(bp))) err = v1 if v1 != 0 { return -err } - if uint64(Xsnprintf(tls, buf, len1, __ccgo_ts+948, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { + if Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+948, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { return int32(ERANGE) } return 0 @@ -115571,10 +115569,10 @@ func _slash_len(tls *TLS, s uintptr) (r Tsize_t) { var s0 uintptr _ = s0 s0 = s - for int32(*(*uint8)(unsafe.Pointer(s))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('/') { s++ } - return uint64(int64(s) - int64(s0)) + return Uint64FromInt64(int64(s) - int64(s0)) } func Xrealpath(tls *TLS, filename uintptr, resolved uintptr) (r uintptr) { @@ -115620,7 +115618,7 @@ _3: ; /* If stack starts with /, the whole component is / or // * and the output state must be reset. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { check_dir = 0 nup = uint64(0) q = uint64(0) @@ -115629,7 +115627,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v4] = uint8('/') p++ /* Initial // is special. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint64(1)]) != int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint64(1)]) != int32('/') { v5 = q q++ (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v5] = uint8('/') @@ -115637,21 +115635,21 @@ _3: goto _2 } z = X__strchrnul(tls, bp+uintptr(p), int32('/')) - v6 = uint64(int64(z) - int64(bp+uintptr(p))) + v6 = Uint64FromInt64(int64(z) - int64(bp+uintptr(p))) l = v6 l0 = v6 if !(l != 0) && !(check_dir != 0) { goto _1 } /* Skip any . component but preserve check_dir status. */ - if l == uint64(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { + if l == uint64(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { p += l goto _2 } /* Copy next component onto output at least temporarily, to * call readlink, but wait to advance output position until * determining it's not a link. */ - if q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { + if q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { if !(p != 0) { goto toolong } @@ -115667,7 +115665,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q+l] = uint8(0) p += l up = 0 - if l0 == uint64(2) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(2)]) == int32('.') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(1)]) == int32('.') { + if l0 == uint64(2) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(2)]) == int32('.') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(1)]) == int32('.') { up = int32(1) /* Any non-.. path components we could cancel start * after nup repetitions of the 3-byte string "../"; @@ -115685,7 +115683,7 @@ _3: } } k = Xreadlink(tls, bp+4097, bp, p) - if uint64(k) == p { + if Uint64FromInt64(k) == p { goto toolong } if !(k != 0) { @@ -115703,10 +115701,10 @@ skip_readlink: ; check_dir = 0 if up != 0 { - for q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { + for q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { q-- } - if q > uint64(1) && (q > uint64(2) || int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { + if q > uint64(1) && (q > uint64(2) || Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { q-- } goto _2 @@ -115714,7 +115712,7 @@ skip_readlink: if l0 != 0 { q += l } - check_dir = int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) + check_dir = Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) goto _2 _8: ; @@ -115726,13 +115724,13 @@ _8: } /* If link contents end in /, strip any slashes already on * stack to avoid /->// or //->/// or spurious toolong. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int64(1)]) == int32('/') { - for int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int64(1)]) == int32('/') { + for Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { p++ } } - p -= uint64(k) - Xmemmove(tls, bp+uintptr(p), bp, uint64(k)) + p -= Uint64FromInt64(k) + Xmemmove(tls, bp+uintptr(p), bp, Uint64FromInt64(k)) /* Skip the stack advancement in case we have a new * absolute base path. */ goto restart @@ -115745,7 +115743,7 @@ _2: _1: ; (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q] = uint8(0) - if int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { + if Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { if !(Xgetcwd(tls, bp, uint64(4097)) != 0) { return uintptr(0) } @@ -115758,7 +115756,7 @@ _1: if !(v10 != 0) { break } - for l > uint64(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { + for l > uint64(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { l-- } if l > uint64(1) { @@ -115769,7 +115767,7 @@ _1: p++ } } - if q-p != 0 && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { + if q-p != 0 && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { v11 = l l++ (*(*[4097]uint8)(unsafe.Pointer(bp)))[v11] = uint8('/') @@ -115798,7 +115796,7 @@ func Xsetdomainname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), Int64FromUint64(len1))))) } func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { @@ -115806,7 +115804,7 @@ func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { trc("tls=%v which=%v who=%v prio=%v, (%v:)", tls, which, who, prio, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setpriority), int64(which), int64(who), int64(prio))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setpriority), int64(which), Int64FromUint32(who), int64(prio))))) } type Tctx = struct { @@ -115849,7 +115847,7 @@ func Xsetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { } ret = int32(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(rlim), int64(Int32FromInt32(0)))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur < ^Uint64FromUint64(0) { v1 = (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur @@ -115895,7 +115893,7 @@ func Xsyscall(tls *TLS, n int64, va uintptr) (r int64) { e = VaInt64(&ap) f = VaInt64(&ap) _ = ap - return X__syscall_ret(tls, uint64(X__syscall6(tls, n, a, b, c, d, e, f))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, n, a, b, c, d, e, f))) } const AF_ALG = 38 @@ -116321,19 +116319,19 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { pid = v1 l = Xsnprintf(tls, bp+80, uint64(1024), __ccgo_ts+969, VaList(bp+1120, priority, bp, bp+1104, uintptr(unsafe.Pointer(&_log_ident)), __ccgo_ts+991+BoolUintptr(!(pid != 0)), pid, __ccgo_ts+993+BoolUintptr(!(pid != 0)))) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = errno_save - l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-uint64(l), message, ap) + l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-Uint64FromInt32(l), message, ap) if l2 >= 0 { - if uint64(l2) >= uint64(1024)-uint64(l) { - l = int32(Uint64FromInt64(1024) - Uint64FromInt32(1)) + if Uint64FromInt32(l2) >= uint64(1024)-Uint64FromInt32(l) { + l = Int32FromUint64(Uint64FromInt64(1024) - Uint64FromInt32(1)) } else { l += l2 } - if int32((*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[l-int32(1)]) != int32('\n') { + if Int32FromUint8((*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[l-int32(1)]) != int32('\n') { v2 = l l++ (*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[v2] = uint8('\n') } - if Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { + if Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { fd = Xopen(tls, __ccgo_ts+688, Int32FromInt32(O_WRONLY)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC), 0) if fd >= 0 { Xdprintf(tls, fd, __ccgo_ts+995, VaList(bp+1120, l-*(*int32)(unsafe.Pointer(bp + 1104)), bp+80+uintptr(*(*int32)(unsafe.Pointer(bp + 1104))))) @@ -116385,7 +116383,7 @@ func Xuname(tls *TLS, uts uintptr) (r int32) { trc("tls=%v uts=%v, (%v:)", tls, uts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) } func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116393,7 +116391,7 @@ func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { trc("tls=%v addr=%v len1=%v advice=%v, (%v:)", tls, addr, len1, advice, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))))) } func Xmadvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116409,7 +116407,7 @@ func Xmincore(tls *TLS, addr uintptr, len1 Tsize_t, vec uintptr) (r int32) { trc("tls=%v addr=%v len1=%v vec=%v, (%v:)", tls, addr, len1, vec, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mincore), int64(addr), int64(len1), int64(vec))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mincore), int64(addr), Int64FromUint64(len1), int64(vec))))) } func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116417,7 +116415,7 @@ func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_mlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_mlock), int64(addr), Int64FromUint64(len1))))) } func Xmlockall(tls *TLS, flags int32) (r int32) { @@ -116425,7 +116423,7 @@ func Xmlockall(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) } const OFF_MASK = 4095 @@ -116441,23 +116439,23 @@ func X__mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd } var ret int64 _ = ret - if uint64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { + if Uint64FromInt64(off)&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } - if len1 >= uint64(Int64FromInt64(INT64_MAX)) { + if len1 >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } if flags&int32(MAP_FIXED) != 0 { _dummy5(tls) } - ret = X__syscall6(tls, int64(SYS_mmap), int64(start), int64(len1), int64(prot), int64(flags), int64(fd), off) + ret = X__syscall6(tls, int64(SYS_mmap), int64(start), Int64FromUint64(len1), int64(prot), int64(flags), int64(fd), off) /* Fixup incorrect EPERM from kernel. */ if ret == int64(-int32(EPERM)) && !(start != 0) && flags&int32(MAP_ANON) != 0 && !(flags&Int32FromInt32(MAP_FIXED) != 0) { ret = int64(-int32(ENOMEM)) } - return uintptr(X__syscall_ret(tls, uint64(ret))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(ret))) } func Xmmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { @@ -116477,7 +116475,7 @@ func X__mprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { _, _ = end, start start = uint64(addr) & -X__libc.Fpage_size end = uint64(addr+uintptr(len1)+uintptr(X__libc.Fpage_size)-UintptrFromInt32(1)) & -X__libc.Fpage_size - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mprotect), int64(start), int64(end-start), int64(prot))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mprotect), Int64FromUint64(start), Int64FromUint64(end-start), int64(prot))))) } func Xmprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { @@ -116500,7 +116498,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla var new_addr uintptr _, _ = ap, new_addr new_addr = uintptr(0) - if new_len >= uint64(Int64FromInt64(INT64_MAX)) { + if new_len >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } @@ -116510,7 +116508,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla new_addr = VaUintptr(&ap) _ = ap } - return uintptr(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), int64(old_len), int64(new_len), int64(flags), int64(new_addr))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), Int64FromUint64(old_len), Int64FromUint64(new_len), int64(flags), int64(new_addr))))) } func Xmremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, flags int32, va uintptr) (r uintptr) { @@ -116526,7 +116524,7 @@ func Xmsync(tls *TLS, start uintptr, len1 Tsize_t, flags int32) (r int32) { trc("tls=%v start=%v len1=%v flags=%v, (%v:)", tls, start, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msync), int64(start), int64(len1), int64(flags), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msync), int64(start), Int64FromUint64(len1), int64(flags), 0, 0, 0)))) } func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116534,7 +116532,7 @@ func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munlock), int64(addr), Int64FromUint64(len1))))) } func Xmunlockall(tls *TLS) (r int32) { @@ -116542,7 +116540,7 @@ func Xmunlockall(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_munlockall))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_munlockall))))) } func _dummy7(tls *TLS) { @@ -116554,7 +116552,7 @@ func X__munmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { defer func() { trc("-> %v", r) }() } _dummy7(tls) - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munmap), int64(start), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munmap), int64(start), Int64FromUint64(len1))))) } func Xmunmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { @@ -116573,7 +116571,7 @@ func Xposix_madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32 if advice == int32(MADV_DONTNEED) { return 0 } - return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))) + return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))) } func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { @@ -116583,12 +116581,12 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { } var p, v1 uintptr _, _ = p, v1 - for int32(*(*uint8)(unsafe.Pointer(name))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('/') { name++ } v1 = X__strchrnul(tls, name, int32('/')) p = v1 - if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int64(p)-int64(name) <= int64(2) && int32(*(*uint8)(unsafe.Pointer(name))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { + if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int64(p)-int64(name) <= int64(2) && Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -116597,7 +116595,7 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { return uintptr(0) } Xmemcpy(tls, buf, __ccgo_ts+1000, uint64(9)) - Xmemcpy(tls, buf+uintptr(9), name, uint64(int64(p)-int64(name)+int64(1))) + Xmemcpy(tls, buf+uintptr(9), name, Uint64FromInt64(int64(p)-int64(name)+int64(1))) return buf } @@ -116654,9 +116652,9 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { var b, v3 int32 var v1, v2 uint32 _, _, _, _ = b, v1, v2, v3 - b = int32(uint8(c)) - if uint32(b) < uint32(128) { - v1 = uint32(b) + b = Int32FromUint8(Uint8FromInt32(c)) + if Uint32FromInt32(b) < uint32(128) { + v1 = Uint32FromInt32(b) } else { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v3 = int32(4) @@ -116664,7 +116662,7 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { v3 = int32(1) } if v3 == int32(1) && c != -int32(1) { - v2 = uint32(Int32FromInt32(0xdfff) & int32(int8(c))) + v2 = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(int8(c))) } else { v2 = uint32(0xffffffff) } @@ -116696,18 +116694,18 @@ func Xc16rtomb(tls *TLS, s uintptr, c16 Tchar16_t, ps uintptr) (r Tsize_t) { return uint64(1) } if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(c16)-uint32(0xd800) < uint32(0x400) { - *(*uint32)(unsafe.Pointer(x)) = uint32((int32(c16) - int32(0xd7c0)) << int32(10)) + *(*uint32)(unsafe.Pointer(x)) = Uint32FromInt32((Int32FromUint16(c16) - int32(0xd7c0)) << int32(10)) return uint64(0) } if *(*uint32)(unsafe.Pointer(x)) != 0 { if uint32(c16)-uint32(0xdc00) >= uint32(0x400) { goto ilseq } else { - wc = int32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) + wc = Int32FromUint32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) } *(*uint32)(unsafe.Pointer(x)) = uint32(0) } else { - wc = int32(c16) + wc = Int32FromUint16(c16) } return Xwcrtomb(tls, s, wc, uintptr(0)) goto ilseq @@ -116715,7 +116713,7 @@ ilseq: ; *(*uint32)(unsafe.Pointer(x)) = uint32(0) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } var _internal_state uint32 @@ -116725,7 +116723,7 @@ func Xc32rtomb(tls *TLS, s uintptr, c32 Tchar32_t, ps uintptr) (r Tsize_t) { trc("tls=%v s=%v c32=%v ps=%v, (%v:)", tls, s, c32, ps, origin(2)) defer func() { trc("-> %v", r) }() } - return Xwcrtomb(tls, s, int32(c32), ps) + return Xwcrtomb(tls, s, Int32FromUint32(c32), ps) } func Xmblen(tls *TLS, s uintptr, n Tsize_t) (r int32) { @@ -116773,21 +116771,21 @@ func Xmbrtoc16(tls *TLS, pc16 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } /* mbrtowc states for partial UTF-8 characters have the high bit set; * we use nonzero states without high bit for pending surrogates. */ - if int32(*(*uint32)(unsafe.Pointer(pending))) > 0 { + if Int32FromUint32(*(*uint32)(unsafe.Pointer(pending))) > 0 { if pc16 != 0 { *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*uint32)(unsafe.Pointer(pending))) } *(*uint32)(unsafe.Pointer(pending)) = uint32(0) - return uint64(-Int32FromInt32(3)) + return Uint64FromInt32(-Int32FromInt32(3)) } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) { if *(*Twchar_t)(unsafe.Pointer(bp)) >= int32(0x10000) { - *(*uint32)(unsafe.Pointer(pending)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) + *(*uint32)(unsafe.Pointer(pending)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) *(*Twchar_t)(unsafe.Pointer(bp)) = int32(0xd7c0) + *(*Twchar_t)(unsafe.Pointer(bp))>>Int32FromInt32(10) } if pc16 != 0 { - *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar16_t)(unsafe.Pointer(pc16)) = Uint16FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } return ret @@ -116813,7 +116811,7 @@ func Xmbrtoc32(tls *TLS, pc32 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) && pc32 != 0 { - *(*Tchar32_t)(unsafe.Pointer(pc32)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar32_t)(unsafe.Pointer(pc32)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } return ret } @@ -116851,11 +116849,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize } } if !(n != 0) { - return uint64(-Int32FromInt32(2)) + return Uint64FromInt32(-Int32FromInt32(2)) } if !(c != 0) { - if int32(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolUint64(!!(v1 != 0)) } @@ -116865,7 +116863,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize v2 = int32(1) } if v2 == int32(1) { - *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(int8(*(*uint8)(unsafe.Pointer(s)))) + *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(Int8FromUint8(*(*uint8)(unsafe.Pointer(s)))) return Uint64FromInt32(1) } if uint32(*(*uint8)(unsafe.Pointer(s)))-uint32(0xc2) > Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -116877,7 +116875,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize n-- } if n != 0 { - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } goto loop @@ -116885,11 +116883,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize ; v4 = s s++ - c = c<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _9 } @@ -117129,22 +117127,22 @@ _15: ws += 4 v17 = s s++ - *(*Twchar_t)(unsafe.Pointer(v16)) = int32(*(*uint8)(unsafe.Pointer(v17))) + *(*Twchar_t)(unsafe.Pointer(v16)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) v18 = ws ws += 4 v19 = s s++ - *(*Twchar_t)(unsafe.Pointer(v18)) = int32(*(*uint8)(unsafe.Pointer(v19))) + *(*Twchar_t)(unsafe.Pointer(v18)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) v20 = ws ws += 4 v21 = s s++ - *(*Twchar_t)(unsafe.Pointer(v20)) = int32(*(*uint8)(unsafe.Pointer(v21))) + *(*Twchar_t)(unsafe.Pointer(v20)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v21))) v22 = ws ws += 4 v23 = s s++ - *(*Twchar_t)(unsafe.Pointer(v22)) = int32(*(*uint8)(unsafe.Pointer(v23))) + *(*Twchar_t)(unsafe.Pointer(v22)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) wn -= uint64(4) } } @@ -117153,7 +117151,7 @@ _15: ws += 4 v25 = s s++ - *(*Twchar_t)(unsafe.Pointer(v24)) = int32(*(*uint8)(unsafe.Pointer(v25))) + *(*Twchar_t)(unsafe.Pointer(v24)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v25))) wn-- goto _14 } @@ -117166,13 +117164,13 @@ _15: goto resume resume: ; - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _13 } v27 = s s++ - c = c<= uint32(0x40) { s -= uintptr(2) @@ -117180,7 +117178,7 @@ resume: } v28 = s s++ - c = c<= uint32(0x40) { s -= uintptr(3) @@ -117188,12 +117186,12 @@ resume: } v29 = s s++ - c = c< Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117279,14 +117277,14 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { if n < uint64(4) && c<<(uint64(6)*n-uint64(6))&(Uint32FromUint32(1)<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } v4 = s s++ - c = c<= uint32(0x40) { @@ -117294,9 +117292,9 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v5 = s s++ - c = c<= uint32(0x40) { @@ -117304,7 +117302,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v6 = s s++ - *(*Twchar_t)(unsafe.Pointer(wc)) = int32(c<>Int32FromInt32(6)) - *(*uint8)(unsafe.Pointer(s)) = uint8(int32(0x80) | wc&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(int32(0xc0) | wc>>Int32FromInt32(6)) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(int32(0x80) | wc&int32(0x3f)) return uint64(2) } else { - if uint32(wc) < uint32(0xd800) || uint32(wc)-uint32(0xe000) < uint32(0x2000) { + if Uint32FromInt32(wc) < uint32(0xd800) || Uint32FromInt32(wc)-uint32(0xe000) < uint32(0x2000) { v3 = s s++ - *(*uint8)(unsafe.Pointer(v3)) = uint8(int32(0xe0) | wc>>Int32FromInt32(12)) + *(*uint8)(unsafe.Pointer(v3)) = Uint8FromInt32(int32(0xe0) | wc>>Int32FromInt32(12)) v4 = s s++ - *(*uint8)(unsafe.Pointer(v4)) = uint8(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) - *(*uint8)(unsafe.Pointer(s)) = uint8(int32(0x80) | wc&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v4)) = Uint8FromInt32(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(int32(0x80) | wc&int32(0x3f)) return uint64(3) } else { - if uint32(wc)-uint32(0x10000) < uint32(0x100000) { + if Uint32FromInt32(wc)-uint32(0x10000) < uint32(0x100000) { v5 = s s++ - *(*uint8)(unsafe.Pointer(v5)) = uint8(int32(0xf0) | wc>>Int32FromInt32(18)) + *(*uint8)(unsafe.Pointer(v5)) = Uint8FromInt32(int32(0xf0) | wc>>Int32FromInt32(18)) v6 = s s++ - *(*uint8)(unsafe.Pointer(v6)) = uint8(int32(0x80) | wc>>Int32FromInt32(12)&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v6)) = Uint8FromInt32(int32(0x80) | wc>>Int32FromInt32(12)&int32(0x3f)) v7 = s s++ - *(*uint8)(unsafe.Pointer(v7)) = uint8(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) - *(*uint8)(unsafe.Pointer(s)) = uint8(int32(0x80) | wc&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v7)) = Uint8FromInt32(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(int32(0x80) | wc&int32(0x3f)) return uint64(4) } } @@ -117376,7 +117374,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { } } *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st uintptr) (r Tsize_t) { @@ -117402,8 +117400,8 @@ func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st u v1 = dst } l = Xwcrtomb(tls, v1, *(*Twchar_t)(unsafe.Pointer(ws)), uintptr(0)) - if l == uint64(-Int32FromInt32(1)) { - cnt = uint64(-Int32FromInt32(1)) + if l == Uint64FromInt32(-Int32FromInt32(1)) { + cnt = Uint64FromInt32(-Int32FromInt32(1)) break } if dst != 0 { @@ -117449,10 +117447,10 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize if !(*(*Twchar_t)(unsafe.Pointer(ws2)) != 0) { break } - if uint32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(ws2)), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } n += l } else { @@ -117466,7 +117464,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize return n } for n >= uint64(4) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*uint8)(unsafe.Pointer(s)) = uint8(0) *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117474,20 +117472,20 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, s, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } s += uintptr(l) n -= l } else { v2 = s s++ - *(*uint8)(unsafe.Pointer(v2)) = uint8(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) n-- } *(*uintptr)(unsafe.Pointer(ws)) += 4 } for n != 0 { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*uint8)(unsafe.Pointer(s)) = uint8(0) *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117495,7 +117493,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if l > n { return N - n @@ -117506,7 +117504,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } else { v3 = s s++ - *(*uint8)(unsafe.Pointer(v3)) = uint8(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) + *(*uint8)(unsafe.Pointer(v3)) = Uint8FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) n-- } *(*uintptr)(unsafe.Pointer(ws)) += 4 @@ -117533,7 +117531,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { var v1 int32 _ = v1 if c < uint32(128) { - return int32(c) + return Int32FromUint32(c) } if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) @@ -117541,7 +117539,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { v1 = int32(1) } if v1 == int32(1) && c-uint32(0xdf80) < uint32(0x80) { - return int32(uint8(c)) + return Int32FromUint8(uint8(c)) } return -int32(1) } @@ -117554,7 +117552,7 @@ func Xwctomb(tls *TLS, s uintptr, wc Twchar_t) (r int32) { if !(s != 0) { return 0 } - return int32(Xwcrtomb(tls, s, wc, uintptr(0))) + return Int32FromUint64(Xwcrtomb(tls, s, wc, uintptr(0))) } func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { @@ -117586,7 +117584,7 @@ func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } type Tucred = struct { @@ -117632,7 +117630,7 @@ func Xaccept4(tls *TLS, fd int32, addr uintptr, len1 uintptr, flg int32) (r1 int v8 = r goto _9 _9: - ret = int32(X__syscall_ret(tls, uint64(v8))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(v8))) if ret >= 0 || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) && *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(EINVAL) { return ret } @@ -117666,7 +117664,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_bind) v2 = int64(fd) v3 = int64(addr) - v4 = int64(len1) + v4 = Int64FromUint32(len1) v5 = int64(Int32FromInt32(0)) v6 = int64(Int32FromInt32(0)) v7 = int64(Int32FromInt32(0)) @@ -117682,7 +117680,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { @@ -117698,7 +117696,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { _ = int32(__SC_connect) v2 = int64(fd) v3 = int64(addr) - v4 = int64(len1) + v4 = Int64FromUint32(len1) v5 = int64(Int32FromInt32(0)) v6 = int64(Int32FromInt32(0)) v7 = int64(Int32FromInt32(0)) @@ -117714,7 +117712,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } const ADD = 0 @@ -118624,11 +118622,11 @@ func _getoffs(tls *TLS, offs uintptr, base uintptr, s uintptr) (r int32) { _, _ = i, v2 i = 0 for { - for int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { - if int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { return 0 } - s = base + uintptr(int32(*(*uint8)(unsafe.Pointer(s)))&Int32FromInt32(0x3f)< uint32(62) { + if Uint32FromInt32(j-k)-uint32(1) > uint32(62) { return 0 } v3 = i i++ - *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = uint8(j - k) + *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = Uint8FromInt32(j - k) if j == l { return i } @@ -118700,12 +118698,12 @@ func _match(tls *TLS, offset uintptr, base uintptr, dn uintptr, end uintptr, len for { nlen-- v2 = nlen - l = int32(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) + l = Int32FromUint8(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) noff-- v3 = noff o = int32((*(*[128]int16)(unsafe.Pointer(bp)))[v3]) end -= uintptr(l) - if l != int32(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, uint64(l)) != 0 { + if l != Int32FromUint8(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, Uint64FromInt32(l)) != 0 { return m } *(*int32)(unsafe.Pointer(offset)) = o @@ -118739,7 +118737,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l m = 0 bestlen = 0 l = Xstrnlen(tls, src, uint64(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint64(1))))) == int32('.') { l-- } if l > uint64(253) || space <= 0 { @@ -118750,7 +118748,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l return int32(1) } end = src + uintptr(l) - n = _getlens(tls, bp+4, src, int32(l)) + n = _getlens(tls, bp+4, src, Int32FromUint64(l)) if !(n != 0) { return -int32(1) } @@ -118765,7 +118763,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l if m > bestlen { bestlen = m bestoff = *(*int32)(unsafe.Pointer(bp)) - if uint64(m) == l { + if Uint64FromInt32(m) == l { break } } @@ -118776,15 +118774,15 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l } } /* encode unmatched part */ - if uint64(space) < l-uint64(bestlen)+uint64(2)+BoolUint64(uint64(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { + if Uint64FromInt32(space) < l-Uint64FromInt32(bestlen)+uint64(2)+BoolUint64(Uint64FromInt32(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { return -int32(1) } - Xmemcpy(tls, dst+uintptr(1), src, l-uint64(bestlen)) + Xmemcpy(tls, dst+uintptr(1), src, l-Uint64FromInt32(bestlen)) v3 = Int32FromInt32(0) j = v3 i = v3 for { - if !(uint64(i) < l-uint64(bestlen)) { + if !(Uint64FromInt32(i) < l-Uint64FromInt32(bestlen)) { break } *(*uint8)(unsafe.Pointer(dst + uintptr(i))) = (*(*[127]uint8)(unsafe.Pointer(bp + 4)))[j] @@ -118793,16 +118791,16 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l ; v4 = j j++ - i += int32((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) + i += Int32FromUint8((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) } /* add tail */ if bestlen != 0 { v5 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = uint8(int32(0xc0) | bestoff>>int32(8)) + *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = Uint8FromInt32(int32(0xc0) | bestoff>>int32(8)) v6 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(bestoff) + *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = Uint8FromInt32(bestoff) } else { v7 = i i++ @@ -118850,11 +118848,11 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr break } /* loop invariants: p= int64(end)-int64(p) || int64(j) >= int64(dend)-int64(dest) { return -int32(1) } @@ -118923,17 +118921,17 @@ func Xdn_skipname(tls *TLS, s uintptr, end uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { return int32(int64(p) - int64(s) + int64(1)) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { if p+uintptr(1) < end { return int32(int64(p) - int64(s) + int64(2)) } else { break } } else { - if int64(end)-int64(p) < int64(int32(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { + if int64(end)-int64(p) < int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { break } else { - p += uintptr(int32(*(*uint8)(unsafe.Pointer(p))) + int32(1)) + p += uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + int32(1)) } } } @@ -119047,12 +119045,12 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if rlen < int32(12) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { return 0 } p = r + uintptr(12) - qdcount = int32(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 5))) - ancount = int32(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 7))) + qdcount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 5))) + ancount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 7))) for { v1 = qdcount qdcount-- @@ -119080,11 +119078,11 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr return -int32(1) } p += uintptr(int32(1) + BoolInt32(!!(*(*uint8)(unsafe.Pointer(p)) != 0))) - len1 = int32(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(p + 9))) + len1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 9))) if int64(len1+int32(10)) > int64(r+uintptr(rlen))-int64(p) { return -int32(1) } - if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, int32(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { + if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { return -int32(1) } p += uintptr(int32(10) + len1) @@ -119426,7 +119424,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { break } if ii != 0 { - if int32(*(*uint8)(unsafe.Pointer(x))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != int32(':') { return uintptr(0) } else { x++ @@ -119443,7 +119441,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { ; ii++ } - if int32(*(*uint8)(unsafe.Pointer(x))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != 0 { return uintptr(0) } /* bad format */ *(*Tether_addr)(unsafe.Pointer(p_a)) = *(*Tether_addr)(unsafe.Pointer(bp)) @@ -119481,7 +119479,7 @@ func Xether_ntoa_r(tls *TLS, p_a uintptr, x uintptr) (r uintptr) { } else { v2 = __ccgo_ts + 1015 } - x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, int32(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) + x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) goto _1 _1: ; @@ -119703,14 +119701,14 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt return -int32(5) } nais = nservs * naddrs - canon_len = int32(Xstrlen(tls, bp+1352)) - out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(88)+uint64(canon_len)+uint64(1)) + canon_len = Int32FromUint64(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), Uint64FromInt32(nais)*uint64(88)+Uint64FromInt32(canon_len)+uint64(1)) if !(out != 0) { return -int32(10) } if canon_len != 0 { outcanon = out + uintptr(nais)*88 - Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+int32(1))) + Xmemcpy(tls, outcanon, bp+1352, Uint64FromInt32(canon_len+int32(1))) } else { outcanon = uintptr(0) } @@ -119734,8 +119732,8 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*88))).Fai = Taddrinfo{ Fai_family: (*(*[48]Taddress)(unsafe.Pointer(bp + 8)))[i].Ffamily, - Fai_socktype: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), - Fai_protocol: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), + Fai_socktype: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), + Fai_protocol: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), Fai_addrlen: uint32(v5), Fai_addr: out + uintptr(k)*88 + 48, Fai_canonname: outcanon, @@ -119933,7 +119931,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu Fsin Tsockaddr_in F__ccgo_pad2 [12]byte }{} - *(*uint16)(unsafe.Pointer(bp)) = uint16(af) + *(*uint16)(unsafe.Pointer(bp)) = Uint16FromInt32(af) if af == int32(PF_INET6) { v1 = uint64(28) } else { @@ -119953,15 +119951,15 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu } } /* Align buffer and check for space for pointers and ip address */ - i = int32(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) + i = Int32FromUint64(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) if !(i != 0) { i = int32(8) } - if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-uint64(i)+uint64(l) { + if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-Uint64FromInt32(i)+uint64(l) { return int32(ERANGE) } - buf += uintptr(uint64(8) - uint64(i)) - buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - uint64(i) + uint64(l) + buf += uintptr(uint64(8) - Uint64FromInt32(i)) + buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - Uint64FromInt32(i) + uint64(l) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(Uint64FromInt32(2) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf @@ -119990,7 +119988,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu break } (*Thostent)(unsafe.Pointer(h)).Fh_addrtype = af - (*Thostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*Thostent)(unsafe.Pointer(h)).Fh_length = Int32FromUint32(l) (*Thostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 @@ -120077,7 +120075,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, /* Align buffer */ align = -uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1)) need = Uint64FromInt32(4) * Uint64FromInt64(8) - need += uint64(cnt+Int32FromInt32(1)) * (uint64(8) + uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + need += Uint64FromInt32(cnt+Int32FromInt32(1)) * (uint64(8) + Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) need += Xstrlen(tls, name) + uint64(1) need += Xstrlen(tls, bp+1344) + uint64(1) need += align @@ -120088,7 +120086,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(Uint64FromInt32(3) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf - buf += uintptr(uint64(cnt+Int32FromInt32(1)) * uint64(8)) + buf += uintptr(Uint64FromInt32(cnt+Int32FromInt32(1)) * uint64(8)) i = 0 for { if !(i < cnt) { @@ -120096,7 +120094,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf buf += uintptr((*Thostent)(unsafe.Pointer(h)).Fh_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) goto _2 _2: ; @@ -120345,17 +120343,17 @@ func _copy_addr(tls *TLS, r uintptr, af int32, sa uintptr, addr uintptr, addrlen case int32(PF_INET6): dst = sa + 8 len1 = int32(16) - if int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { - (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = uint32(ifindex) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { + (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = Uint32FromInt32(ifindex) } default: return } - if addrlen < uint64(len1) { + if addrlen < Uint64FromInt32(len1) { return } - (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(af) - Xmemcpy(tls, dst, addr, uint64(len1)) + (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = Uint16FromInt32(af) + Xmemcpy(tls, dst, addr, Uint64FromInt32(len1)) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -120366,15 +120364,15 @@ func _gen_netmask(tls *TLS, r uintptr, af int32, sa uintptr, prefixlen int32) { var _ /* addr at bp+0 */ [16]Tuint8_t _, _ = i, v1 *(*[16]Tuint8_t)(unsafe.Pointer(bp)) = [16]Tuint8_t{} - if uint64(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { - prefixlen = int32(Uint64FromInt32(8) * Uint64FromInt64(16)) + if Uint64FromInt32(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { + prefixlen = Int32FromUint64(Uint64FromInt32(8) * Uint64FromInt64(16)) } i = prefixlen / int32(8) - Xmemset(tls, bp, int32(0xff), uint64(i)) - if uint64(i) < uint64(16) { + Xmemset(tls, bp, int32(0xff), Uint64FromInt32(i)) + if Uint64FromInt32(i) < uint64(16) { v1 = i i++ - (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = uint8(int32(0xff) << (int32(8) - prefixlen%int32(8))) + (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = Uint8FromInt32(int32(0xff) << (int32(8) - prefixlen%int32(8))) } _copy_addr(tls, r, af, sa, bp, uint64(16), 0) } @@ -120400,21 +120398,21 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { ifi = h + UintptrFromInt64(16) ifa = h + UintptrFromInt64(16) stats_len = 0 - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { goto _1 } - stats_len = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) + stats_len = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) break goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } } else { ifs0 = *(*uintptr)(unsafe.Pointer(ctx + 16 + uintptr((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index%uint32(IFADDRS_HASH_SIZE))*8)) @@ -120434,19 +120432,19 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { return 0 } } - ifs = Xcalloc(tls, uint64(1), uint64(200)+uint64(stats_len)) + ifs = Xcalloc(tls, uint64(1), uint64(200)+Uint64FromInt32(stats_len)) if ifs == uintptr(0) { return -int32(1) } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = uint32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = Uint32FromInt32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFLA_IFNAME): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120464,7 +120462,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _3 _3: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { bucket = (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex % uint32(IFADDRS_HASH_SIZE) @@ -120474,22 +120472,22 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { } else { (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_name (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFA_ADDRESS): /* If ifa_addr is already set we, received an IFA_LOCAL before * so treat this as destination address */ if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } else { - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } case int32(IFA_BROADCAST): - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LOCAL): /* If ifa_addr is set and we get IFA_LOCAL, assume we have * a point-to-point network. Move address to correct field. */ @@ -120498,7 +120496,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { *(*uintptr)(unsafe.Pointer(ifs + 40)) = ifs + 136 Xmemset(tls, ifs+64, 0, uint64(36)) } - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LABEL): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120509,10 +120507,10 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _4 _4: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _gen_netmask(tls, ifs+32, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) + _gen_netmask(tls, ifs+32, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) } } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { @@ -120572,7 +120570,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { func _mkptr4(tls *TLS, s uintptr, ip uintptr) { bp := tls.Alloc(48) defer tls.Free(48) - Xsprintf(tls, s, __ccgo_ts+1021, VaList(bp+8, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) + Xsprintf(tls, s, __ccgo_ts+1021, VaList(bp+8, Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 3))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip))))) } func _mkptr6(tls *TLS, s uintptr, ip uintptr) { @@ -120586,13 +120584,13 @@ func _mkptr6(tls *TLS, s uintptr, ip uintptr) { } v2 = s s++ - *(*uint8)(unsafe.Pointer(v2)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] + *(*uint8)(unsafe.Pointer(v2)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] v3 = s s++ *(*uint8)(unsafe.Pointer(v3)) = uint8('.') v4 = s s++ - *(*uint8)(unsafe.Pointer(v4)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] + *(*uint8)(unsafe.Pointer(v4)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] v5 = s s++ *(*uint8)(unsafe.Pointer(v5)) = uint8('.') @@ -120639,8 +120637,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120671,8 +120669,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } for { if v13 = *(*uint8)(unsafe.Pointer(p)) != 0; v13 { - v10 = int32(*(*uint8)(unsafe.Pointer(p))) - v11 = BoolInt32(v10 == int32(' ') || uint32(v10)-uint32('\t') < uint32(5)) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v11 = BoolInt32(v10 == int32(' ') || Uint32FromInt32(v10)-uint32('\t') < uint32(5)) goto _12 _12: } @@ -120687,8 +120685,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int z = p for { if v18 = *(*uint8)(unsafe.Pointer(z)) != 0; v18 { - v15 = int32(*(*uint8)(unsafe.Pointer(z))) - v16 = BoolInt32(v15 == int32(' ') || uint32(v15)-uint32('\t') < uint32(5)) + v15 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v16 = BoolInt32(v15 == int32(' ') || Uint32FromInt32(v15)-uint32('\t') < uint32(5)) goto _17 _17: } @@ -120702,7 +120700,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } *(*uint8)(unsafe.Pointer(z)) = uint8(0) if int64(z)-int64(p) < int64(256) { - Xmemcpy(tls, buf, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, buf, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) break } } @@ -120737,8 +120735,8 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120757,7 +120755,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) svport = Xstrtoul(tls, p, bp+128, int32(10)) - if svport != uint64(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { + if svport != Uint64FromInt32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { continue } if dgram != 0 && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+1093, uint64(4)) != 0 { @@ -120769,7 +120767,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { if int64(p)-t__predefined_ptrdiff_t(bp) > int64(32) { continue } - Xmemcpy(tls, buf, bp, uint64(int64(p)-t__predefined_ptrdiff_t(bp))) + Xmemcpy(tls, buf, bp, Uint64FromInt64(int64(p)-t__predefined_ptrdiff_t(bp))) break } X__fclose_ca(tls, f) @@ -120802,7 +120800,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso var _ /* reply at bp+443 */ [512]uint8 var _ /* tmp at bp+955 */ [17]uint8 _, _, _, _, _, _, _, _, _ = a, af, p, p1, port, qlen, rlen, scopeid, v1 - af = int32((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) + af = Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) switch af { case int32(PF_INET): a = sa + 4 @@ -120836,7 +120834,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso rlen = X__res_send(tls, bp+347, qlen, bp+443, int32(512)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if rlen > 0 { - if uint64(rlen) > uint64(512) { + if Uint64FromInt32(rlen) > uint64(512) { rlen = int32(512) } X__dns_parse(tls, bp+443, rlen, __ccgo_fp(_dns_parse_callback), bp+78) @@ -120849,7 +120847,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso Xinet_ntop(tls, af, a, bp+78, uint32(256)) if scopeid != 0 { p = uintptr(0) - if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { + if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { p = Xif_indextoname(tls, scopeid, bp+955+uintptr(1)) } if !(p != 0) { @@ -120868,13 +120866,13 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso } if serv != 0 && servlen != 0 { p1 = bp + 78 - port = int32(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) + port = Int32FromUint16(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if !(flags&Int32FromInt32(NI_NUMERICSERV) != 0) { _reverse_services(tls, bp+78, port, flags&int32(NI_DGRAM)) } if !(*(*uint8)(unsafe.Pointer(p1)) != 0) { - p1 = _itoa(tls, bp+334, uint32(port)) + p1 = _itoa(tls, bp+334, Uint32FromInt32(port)) } if Xstrlen(tls, p1) >= uint64(servlen) { return -int32(12) @@ -120913,7 +120911,7 @@ func Xgetpeername(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xgetservbyname(tls *TLS, name uintptr, prots uintptr) (r uintptr) { @@ -120956,8 +120954,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin return int32(ENOENT) } /* Align buffer */ - align = int32(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) - if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+uint64(align) { + align = Int32FromUint64(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) + if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+Uint64FromInt32(align) { return int32(ERANGE) } buf += uintptr(align) @@ -120989,8 +120987,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin (*Tservent)(unsafe.Pointer(se)).Fs_aliases = buf *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases)) = (*Tservent)(unsafe.Pointer(se)).Fs_name *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases + 1*8)) = uintptr(0) - (*Tservent)(unsafe.Pointer(se)).Fs_port = int32(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) - if int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { + (*Tservent)(unsafe.Pointer(se)).Fs_port = Int32FromUint16(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) + if Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { v1 = __ccgo_ts + 1103 } else { v1 = __ccgo_ts + 1107 @@ -121029,7 +121027,7 @@ func Xgetsockname(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xgetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, optlen uintptr) (r2 int32) { @@ -121077,7 +121075,7 @@ _9: break } if uint64(*(*Tsocklen_t)(unsafe.Pointer(optlen))) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -121153,7 +121151,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func X__h_errno_location(tls *TLS) (r uintptr) { @@ -121274,14 +121272,14 @@ func Xhtons(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } func Xif_freenameindex(tls *TLS, idx uintptr) { @@ -121306,7 +121304,7 @@ func Xif_indextoname(tls *TLS, index uint32, name uintptr) (r1 uintptr) { if v1 < 0 { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 16)) = int32(index) + *(*int32)(unsafe.Pointer(bp + 16)) = Int32FromUint32(index) r = Xioctl(tls, fd, int32(SIOCGIFNAME), VaList(bp+48, bp)) X__syscall1(tls, int64(SYS_close), int64(fd)) if r < 0 { @@ -121340,25 +121338,25 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { var i, v2 uint32 _, _, _, _, _, _, _, _, _, _, _, _ = a, bucket, ctx, i, ifa, ifi, index, map1, namelen, rta, type1, v2 ctx = pctx - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { ifi = h + UintptrFromInt64(16) index = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index type1 = int32(IFLA_IFNAME) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } else { ifa = h + UintptrFromInt64(16) - index = int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) + index = Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) type1 = int32(IFA_LABEL) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { goto _1 } - namelen = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) + namelen = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) if namelen > int32(IF_NAMESIZE) { return 0 } @@ -121367,7 +121365,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { i = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) for i != 0 { map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr(i-uint32(1))*28 - if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == uint32(index) && int32((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) == 0 { + if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == Uint32FromInt32(index) && Int32FromUint8((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) == 0 { return 0 } i = (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next @@ -121390,10 +121388,10 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fallocated = uint32(a) } map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*28 - (*Tifnamemap)(unsafe.Pointer(map1)).Findex = uint32(index) - (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = uint8(namelen) - Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) - *(*uint32)(unsafe.Pointer(ctx + 8)) += uint32(namelen + int32(1)) + (*Tifnamemap)(unsafe.Pointer(map1)).Findex = Uint32FromInt32(index) + (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = Uint8FromInt32(namelen) + Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) + *(*uint32)(unsafe.Pointer(ctx + 8)) += Uint32FromInt32(namelen + int32(1)) (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum++ (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum @@ -121401,7 +121399,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } return 0 } @@ -121430,7 +121428,7 @@ func Xif_nameindex(tls *TLS) (r uintptr) { goto err } p = ifs + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*16 + UintptrFromInt32(1)*16 - i = int32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) + i = Int32FromUint32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) d = ifs s = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist for { @@ -121485,7 +121483,7 @@ func Xif_nametoindex(tls *TLS, name uintptr) (r1 uint32) { } else { v2 = *(*int32)(unsafe.Pointer(bp + 16)) } - return uint32(v2) + return Uint32FromInt32(v2) } func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { @@ -121497,7 +121495,7 @@ func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { defer tls.Free(16) var _ /* a at bp+0 */ Tin_addr if !(X__inet_aton(tls, p, bp) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } return (*(*Tin_addr)(unsafe.Pointer(bp))).Fs_addr } @@ -121523,7 +121521,7 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) (r int32) { break } (*(*[4]uint64)(unsafe.Pointer(bp)))[i] = Xstrtoul(tls, s, bp+32, 0) - if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return 0 } if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0) { @@ -121648,7 +121646,7 @@ func Xinet_ntoa(tls *TLS, _in Tin_addr) (r uintptr) { var a uintptr _ = a a = bp - Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1119, VaList(bp+16, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3))))) + Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1119, VaList(bp+16, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))))) return uintptr(unsafe.Pointer(&_buf4)) } @@ -121669,14 +121667,14 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint a = a0 switch af { case int32(PF_INET): - if uint32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1119, VaList(bp+112, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + if Uint32FromInt32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1119, VaList(bp+112, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { return s } case int32(PF_INET6): if Xmemcmp(tls, a, __ccgo_ts+1066, uint64(12)) != 0 { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1131, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1131, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } else { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1155, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1155, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } /* Replace longest /(^0|:)[:0]{2,}/ with "::" */ v2 = Int32FromInt32(0) @@ -121687,10 +121685,10 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint if !((*(*[100]uint8)(unsafe.Pointer(bp)))[i] != 0) { break } - if i != 0 && int32((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { + if i != 0 && Int32FromUint8((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { goto _1 } - j = int32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1185)) + j = Int32FromUint64(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1185)) if j > max { best = i max = j @@ -121704,7 +121702,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint v3 = Uint8FromUint8(':') (*(*[100]uint8)(unsafe.Pointer(bp)))[best+int32(1)] = v3 (*(*[100]uint8)(unsafe.Pointer(bp)))[best] = v3 - Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), uint64(i-best-max+int32(1))) + Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), Uint64FromInt32(i-best-max+int32(1))) } if Xstrlen(tls, bp) < uint64(l) { Xstrcpy(tls, s, bp) @@ -121720,11 +121718,11 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint func _hexval(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -121757,20 +121755,20 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if !(j < int32(3) && BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { break } - v = int32(10)*v + int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') + v = int32(10)*v + Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') goto _2 _2: ; j++ } - if j == 0 || j > int32(1) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { + if j == 0 || j > int32(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { return 0 } - *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = Uint8FromInt32(v) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { return int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { return 0 } s += uintptr(j + int32(1)) @@ -121786,16 +121784,16 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { return -int32(1) } } - if v5 = int32(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { + if v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { s++ v4 = s } - if v5 && int32(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { + if v5 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { return 0 } i = 0 for { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { brk = i (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(0) s++ @@ -121828,15 +121826,15 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 { return 0 } - (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(v) + (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = Uint16FromInt32(v) if !(*(*uint8)(unsafe.Pointer(s + uintptr(j))) != 0) && (brk >= 0 || i == int32(7)) { break } if i == int32(7) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { return 0 } need_v4 = int32(1) @@ -121851,7 +121849,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { i++ } if brk >= 0 { - Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(int32(2)*(i+int32(1)-brk))) + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, Uint64FromInt32(int32(2)*(i+int32(1)-brk))) j = 0 for { if !(j < int32(7)-i) { @@ -121871,7 +121869,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { } v14 = a a++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint16((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) v15 = a a++ *(*uint8)(unsafe.Pointer(v15)) = uint8((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) @@ -121915,7 +121913,7 @@ func Xlisten(tls *TLS, fd int32, backlog int32) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r int32) { @@ -121944,7 +121942,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i p = Xstrchr(tls, name, int32('%')) scopeid = uint64(0) if p != 0 && int64(p)-int64(name) < int64(64) { - Xmemcpy(tls, bp+20, name, uint64(int64(p)-int64(name))) + Xmemcpy(tls, bp+20, name, Uint64FromInt64(int64(p)-int64(name))) (*(*[64]uint8)(unsafe.Pointer(bp + 20)))[int64(p)-int64(name)] = uint8(0) name = bp + 20 } @@ -121965,7 +121963,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i *(*uintptr)(unsafe.Pointer(bp + 88)) = p - uintptr(1) } if *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { - if !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { + if !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { return -int32(2) } scopeid = uint64(Xif_nametoindex(tls, p)) @@ -121996,12 +121994,12 @@ const RR_CNAME = 5 func _is_valid_hostname(tls *TLS, host uintptr) (r int32) { var s uintptr _ = s - if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == uint64(-Int32FromInt32(1)) { + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == Uint64FromInt32(-Int32FromInt32(1)) { return 0 } s = host for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || int32(*(*uint8)(unsafe.Pointer(s))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) != 0) { break } goto _1 @@ -122106,14 +122104,14 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family v4 = Xstrstr(tls, p, name) p = v4 if v12 = v4 != 0; v12 { - v5 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: ; if v11 = !(v6 != 0); !v11 { - v8 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -122133,8 +122131,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family p = bp for { if v17 = *(*uint8)(unsafe.Pointer(p)) != 0; v17 { - v14 = int32(*(*uint8)(unsafe.Pointer(p))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: } @@ -122164,8 +122162,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family /* Extract first name as canonical name */ for { if v23 = *(*uint8)(unsafe.Pointer(p)) != 0; v23 { - v20 = int32(*(*uint8)(unsafe.Pointer(p))) - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v20 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: } @@ -122180,8 +122178,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family z = p for { if v28 = *(*uint8)(unsafe.Pointer(z)) != 0; v28 { - v25 = int32(*(*uint8)(unsafe.Pointer(z))) - v26 = BoolInt32(v25 == int32(' ') || uint32(v25)-uint32('\t') < uint32(5)) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v26 = BoolInt32(v25 == int32(' ') || Uint32FromInt32(v25)-uint32('\t') < uint32(5)) goto _27 _27: } @@ -122196,7 +122194,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family *(*uint8)(unsafe.Pointer(z)) = uint8(0) if _is_valid_hostname(tls, p) != 0 { have_canon = int32(1) - Xmemcpy(tls, canon, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, canon, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) } } X__fclose_ca(tls, f) @@ -122253,7 +122251,7 @@ func _dns_parse_callback1(tls *TLS, c uintptr, rr int32, data uintptr, len1 int3 v2 = ctx + 16 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ - Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, uint64(len1)) + Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, Uint64FromInt32(len1)) return 0 } @@ -122296,7 +122294,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i qtypes[nq] = _afrr[i].Frr *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280 + 3)) = uint8(0) /* don't need AD flag */ /* Ensure query IDs are distinct. */ - if nq != 0 && int32(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == int32(*(*uint8)(unsafe.Pointer(bp))) { + if nq != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) { *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))++ } nq++ @@ -122314,13 +122312,13 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i if !(i < nq) { break } - if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { + if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { return -int32(4) } goto _2 @@ -122334,7 +122332,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i break } (*(*Tdpc_ctx)(unsafe.Pointer(bp + 10208))).Frrtype = qtypes[i] - if uint64((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { + if Uint64FromInt32((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] = int32(4800) } X__dns_parse(tls, bp+560+uintptr(i)*4800, (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i], __ccgo_fp(_dns_parse_callback1), bp+10208) @@ -122385,7 +122383,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { dots++ } goto _1 @@ -122393,14 +122391,14 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f ; l++ } - if dots >= uint64((*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots) || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if dots >= uint64((*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots) || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { *(*uint8)(unsafe.Pointer(bp)) = uint8(0) } /* Strip final dot for canon, fail if multiple trailing dots. */ - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { l-- } - if !(l != 0) || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if !(l != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { return -int32(2) } /* This can never happen; the caller already checked length. */ @@ -122419,8 +122417,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f break } for { - v5 = int32(*(*uint8)(unsafe.Pointer(p))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -122434,8 +122432,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f z = p for { if v12 = *(*uint8)(unsafe.Pointer(z)) != 0; v12 { - v9 = int32(*(*uint8)(unsafe.Pointer(z))) - v10 = BoolInt32(v9 == int32(' ') || uint32(v9)-uint32('\t') < uint32(5)) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v10 = BoolInt32(v9 == int32(' ') || Uint32FromInt32(v9)-uint32('\t') < uint32(5)) goto _11 _11: } @@ -122450,9 +122448,9 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if z == p { break } - if uint64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { - Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, uint64(int64(z)-int64(p))) - *(*uint8)(unsafe.Pointer(canon + uintptr(uint64(int64(z)-int64(p)+int64(1))+l))) = uint8(0) + if Uint64FromInt64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { + Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, Uint64FromInt64(int64(z)-int64(p))) + *(*uint8)(unsafe.Pointer(canon + uintptr(Uint64FromInt64(int64(z)-int64(p)+int64(1))+l))) = uint8(0) cnt = _name_from_dns(tls, buf, canon, canon, family, bp+256) if cnt != 0 { return cnt @@ -122524,7 +122522,7 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&_defpolicy))+uintptr(i)*20, uint64(_defpolicy[i].Flen1)) != 0 { goto _1 } - if int32(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&int32(_defpolicy[i].Fmask) != int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&Int32FromUint8(_defpolicy[i].Fmask) != Int32FromUint8(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { goto _1 } return uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 @@ -122537,20 +122535,20 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { } func _labelof(tls *TLS, a uintptr) (r int32) { - return int32((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) + return Int32FromUint8((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) } func _scopeof(tls *TLS, a uintptr) (r int32) { - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { - return int32(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { + return Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { return int32(2) } - if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { + if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { return int32(2) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { return int32(5) } return int32(14) @@ -122561,7 +122559,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(128) && !((int32(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^int32(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { + if !(i < uint32(128) && !((Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { break } goto _1 @@ -122569,7 +122567,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { ; i++ } - return int32(i) + return Int32FromUint32(i) } func _addrcmp(tls *TLS, _a uintptr, _b uintptr) (r int32) { @@ -122754,8 +122752,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } dpolicy = _policyof(tls, bp+32+8) dscope = _scopeof(tls, bp+32+8) - dlabel = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) - dprec = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) + dlabel = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) + dprec = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) prefixlen = 0 fd = Xsocket(tls, family1, Int32FromInt32(SOCK_DGRAM)|Int32FromInt32(SOCK_CLOEXEC), int32(IPPROTO_UDP)) if fd >= 0 { @@ -122786,7 +122784,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i ; i++ } - Xqsort(tls, buf, uint64(cnt), uint64(28), __ccgo_fp(_addrcmp)) + Xqsort(tls, buf, Uint64FromInt32(cnt), uint64(28), __ccgo_fp(_addrcmp)) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) return cnt } @@ -122837,8 +122835,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -int32(8) } (*(*Tservice)(unsafe.Pointer(buf))).Fport = uint16(0) - (*(*Tservice)(unsafe.Pointer(buf))).Fproto = uint8(proto) - (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(socktype) + (*(*Tservice)(unsafe.Pointer(buf))).Fproto = Uint8FromInt32(proto) + (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = Uint8FromInt32(socktype) return int32(1) } if name != 0 { @@ -122902,8 +122900,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i break } if v10 = p > bp; v10 { - v7 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v8 = BoolInt32(v7 == int32(' ') || uint32(v7)-uint32('\t') < uint32(5)) + v7 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v8 = BoolInt32(v7 == int32(' ') || Uint32FromInt32(v7)-uint32('\t') < uint32(5)) goto _9 _9: } @@ -122911,8 +122909,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i goto _5 } if v14 = *(*uint8)(unsafe.Pointer(p + uintptr(l))) != 0; v14 { - v11 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: } @@ -122932,8 +122930,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i p = bp for { if v19 = *(*uint8)(unsafe.Pointer(p)) != 0; v19 { - v16 = int32(*(*uint8)(unsafe.Pointer(p))) - v17 = BoolInt32(v16 == int32(' ') || uint32(v16)-uint32('\t') < uint32(5)) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v17 = BoolInt32(v16 == int32(' ') || Uint32FromInt32(v16)-uint32('\t') < uint32(5)) goto _18 _18: } @@ -123015,7 +123013,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = uint16(type1) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = Uint16FromInt32(type1) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123026,7 +123024,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = uint16(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = Uint16FromInt32(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123048,7 +123046,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fg.Frtgen_family = uint8(af) + })(unsafe.Pointer(bp))))).Fg.Frtgen_family = Uint8FromInt32(af) r = int32(Xsend(tls, fd, bp, uint64(20), 0)) if r < 0 { return r @@ -123060,13 +123058,13 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } h = bp for { - if !(uint64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { + if !(Uint64FromInt64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { break } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { return 0 } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { return -int32(1) } ret = (*(*func(*TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{cb})))(tls, ctx, h) @@ -123076,7 +123074,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, goto _1 _1: ; - h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } } return r1 @@ -123122,7 +123120,7 @@ func Xns_get16(tls *TLS, cp uintptr) (r uint32) { trc("tls=%v cp=%v, (%v:)", tls, cp, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(int32(*(*uint8)(unsafe.Pointer(cp)))< %v", r) }() } - return uint64(uint32(*(*uint8)(unsafe.Pointer(cp)))< int64(eom)-int64(p) { goto bad } @@ -123292,7 +123290,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin if rrnum == -int32(1) { rrnum = (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum } - if rrnum < 0 || rrnum >= int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if rrnum < 0 || rrnum >= Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { goto bad } if rrnum < (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum { @@ -123331,7 +123329,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin p4 = handle + 72 *(*uintptr)(unsafe.Pointer(p4)) += uintptr(2) (*Tns_rr)(unsafe.Pointer(rr)).Frdlength = uint16(Xns_get16(tls, *(*uintptr)(unsafe.Pointer(p4))-uintptr(2))) - if int64((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { + if Int64FromUint16((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { goto size } (*Tns_rr)(unsafe.Pointer(rr)).Frdata = (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr @@ -123342,7 +123340,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin (*Tns_rr)(unsafe.Pointer(rr)).Frdata = UintptrFromInt32(0) } (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum++ - if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { (*Tns_msg)(unsafe.Pointer(handle)).F_sect = section + int32(1) if (*Tns_msg)(unsafe.Pointer(handle)).F_sect == int32(_ns_s_max) { (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum = -int32(1) @@ -123371,7 +123369,7 @@ func Xns_name_uncompress(tls *TLS, msg uintptr, eom uintptr, src uintptr, dst ui } var r int32 _ = r - r = Xdn_expand(tls, msg, eom, src, dst, int32(dstsiz)) + r = Xdn_expand(tls, msg, eom, src, dst, Int32FromUint64(dstsiz)) if r < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) } @@ -123424,14 +123422,14 @@ func Xntohs(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } /* do we really need all these?? */ @@ -123458,10 +123456,10 @@ func Xgetprotoent(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(_idx) >= uint64(239) { + if Uint64FromInt32(_idx) >= uint64(239) { return UintptrFromInt32(0) } - _p.Fp_proto = int32(_protos[_idx]) + _p.Fp_proto = Int32FromUint8(_protos[_idx]) _p.Fp_name = uintptr(unsafe.Pointer(&_protos)) + uintptr(_idx+int32(1)) _p.Fp_aliases = uintptr(unsafe.Pointer(&_aliases)) _idx = int32(uint64(_idx) + (Xstrlen(tls, _p.Fp_name) + Uint64FromInt32(2))) @@ -123521,7 +123519,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr _ = int32(__SC_recvfrom) v2 = int64(fd) v3 = int64(buf) - v4 = int64(len1) + v4 = Int64FromUint64(len1) v5 = int64(flags) v6 = int64(addr) v7 = int64(alen) @@ -123537,7 +123535,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v8 = r goto _9 _9: - return X__syscall_ret(tls, uint64(v8)) + return X__syscall_ret(tls, Uint64FromInt64(v8)) } func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, timeout uintptr) (r int32) { @@ -123564,7 +123562,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti i-- mh += 64 } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), int64(vlen), int64(flags), int64(timeout), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), Int64FromUint32(vlen), Int64FromUint32(flags), int64(timeout), 0)))) } func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { @@ -123628,10 +123626,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { goto _1 _1: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { v6 = uintptr(0) } else { - v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v6 } @@ -123644,10 +123642,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { } p7 = msg + 40 *(*Tsocklen_t)(unsafe.Pointer(p7)) = Tsocklen_t(uint64(*(*Tsocklen_t)(unsafe.Pointer(p7))) + ((Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)) + (Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)))) - if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { v8 = uintptr(0) } else { - v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v8 (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_level = int32(SOL_SOCKET) @@ -123700,7 +123698,7 @@ func Xrecvmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r2 Tssize_t) { v9 = r goto _10 _10: - r1 = X__syscall_ret(tls, uint64(v9)) + r1 = X__syscall_ret(tls, Uint64FromInt64(v9)) if r1 >= 0 { X__convert_scm_timestamps(tls, msg, orig_controllen) } @@ -123731,19 +123729,19 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, var _ /* ts at bp+280 */ Ttimespec _, _, _, _, _ = i, id, j, l, n l = Xstrnlen(tls, dname, uint64(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { l-- } - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { return -int32(1) } - n = int32(uint64(17) + l + BoolUint64(!!(l != 0))) - if l > uint64(253) || buflen < n || uint32(op) > uint32(15) || uint32(class) > uint32(255) || uint32(type1) > uint32(255) { + n = Int32FromUint64(uint64(17) + l + BoolUint64(!!(l != 0))) + if l > uint64(253) || buflen < n || Uint32FromInt32(op) > uint32(15) || Uint32FromInt32(class) > uint32(255) || Uint32FromInt32(type1) > uint32(255) { return -int32(1) } /* Construct query template - ID will be filled later */ - Xmemset(tls, bp, 0, uint64(n)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(op*int32(8) + int32(1)) + Xmemset(tls, bp, 0, Uint64FromInt32(n)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = Uint8FromInt32(op*int32(8) + int32(1)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(32) /* AD */ (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(5)] = uint8(1) Xmemcpy(tls, bp+uintptr(13), dname, l) @@ -123754,7 +123752,7 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, } j = i for { - if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && int32((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { + if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && Int32FromUint8((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { break } goto _2 @@ -123762,23 +123760,23 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, ; j++ } - if uint32(j-i)-uint32(1) > uint32(62) { + if Uint32FromInt32(j-i)-uint32(1) > uint32(62) { return -int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = uint8(j - i) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = Uint8FromInt32(j - i) goto _1 _1: ; i = j + int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(type1) - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(class) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = Uint8FromInt32(type1) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = Uint8FromInt32(class) /* Make a reasonably unpredictable id */ Xclock_gettime(tls, CLOCK_REALTIME, bp+280) - id = int32((uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = uint8(id / int32(256)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(id) - Xmemcpy(tls, buf, bp, uint64(n)) + id = Int32FromUint64((Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = Uint8FromInt32(id / int32(256)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = Uint8FromInt32(id) + Xmemcpy(tls, buf, bp, Uint64FromInt32(n)) return n } @@ -123914,7 +123912,7 @@ func _mtime(tls *TLS) (r uint64) { if Xclock_gettime(tls, int32(CLOCK_MONOTONIC), bp) < 0 && *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOSYS) { Xclock_gettime(tls, CLOCK_REALTIME, bp) } - return uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) + return Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) } func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, q uintptr, ql int32) (r1 int32) { @@ -123924,8 +123922,8 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, var _ /* mh at bp+40 */ Tmsghdr _, _ = fd, r *(*[2]Tuint8_t)(unsafe.Pointer(bp + 32)) = [2]Tuint8_t{ - 0: uint8(ql >> int32(8)), - 1: uint8(ql), + 0: Uint8FromInt32(ql >> int32(8)), + 1: Uint8FromInt32(ql), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -123934,7 +123932,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, }, 1: { Fiov_base: q, - Fiov_len: uint64(ql), + Fiov_len: Uint64FromInt32(ql), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 40)) = Tmsghdr{ @@ -124043,20 +124041,20 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a sl = uint32(16) nns = 0 family = int32(PF_INET) - v1 = uint64(nqueries+int32(2)) * 8 + v1 = Uint64FromInt32(nqueries+int32(2)) * 8 pfd = Xrealloc(tls, pfd, v1) - v2 = uint64(nqueries) * 4 + v2 = Uint64FromInt32(nqueries) * 4 qpos = Xrealloc(tls, qpos, v2) - v3 = uint64(nqueries) * 4 + v3 = Uint64FromInt32(nqueries) * 4 apos = Xrealloc(tls, apos, v3) - v4 = uint64(nqueries) * 2 + v4 = Uint64FromInt32(nqueries) * 2 alen_buf = Xrealloc(tls, alen_buf, v4) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), bp+200) - timeout = int32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) - attempts = int32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) + timeout = Int32FromUint32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) + attempts = Int32FromUint32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) nns = 0 for { - if !(uint32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { + if !(Uint32FromInt32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { break } iplit = conf + uintptr(nns)*28 @@ -124079,7 +124077,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_scope_id = (*Taddress)(unsafe.Pointer(iplit)).Fscopeid v6 = Int32FromInt32(PF_INET6) family = v6 - (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = uint16(v6) + (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = Uint16FromInt32(v6) } goto _5 _5: @@ -124117,7 +124115,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(i < nns) { break } - if int32((*(*[3]struct { + if Int32FromUint16((*(*[3]struct { Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte @@ -124139,7 +124137,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte - })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = uint16(family) + })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = Uint16FromInt32(family) if fd < 0 || Xbind(tls, fd, bp+88, sl) < 0 { if fd >= 0 { Xclose(tls, fd) @@ -124166,15 +124164,15 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), (nqueries+int32(1))*8))).Ffd = -int32(2) __pthread_cleanup_push(tls, bp+208, __ccgo_fp(_cleanup), pfd) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp + 200)), uintptr(0)) - Xmemset(tls, alens, 0, uint64(4)*uint64(nqueries)) + Xmemset(tls, alens, 0, uint64(4)*Uint64FromInt32(nqueries)) retry_interval = timeout / attempts next = 0 v10 = _mtime(tls) t2 = v10 t0 = v10 - t1 = t2 - uint64(retry_interval) + t1 = t2 - Uint64FromInt32(retry_interval) for { - if !(t2-t0 < uint64(timeout)) { + if !(t2-t0 < Uint64FromInt32(timeout)) { break } /* This is the loop exit condition: that all queries @@ -124192,7 +124190,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if i == nqueries { break } - if t2-t1 >= uint64(retry_interval) { + if t2-t1 >= Uint64FromInt32(retry_interval) { /* Query all configured namservers in parallel */ i = 0 for { @@ -124205,7 +124203,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(j < nns) { break } - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) goto _14 _14: ; @@ -124221,14 +124219,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry = int32(2) * nqueries } /* Wait for a response, or until time to retry */ - if Xpoll(tls, pfd, uint64(nqueries+int32(1)), int32(t1+uint64(retry_interval)-t2)) <= 0 { + if Xpoll(tls, pfd, Uint64FromInt32(nqueries+int32(1)), Int32FromUint64(t1+Uint64FromInt32(retry_interval)-t2)) <= 0 { goto _11 } for next < nqueries { *(*[1]Tiovec)(unsafe.Pointer(bp + 8)) = [1]Tiovec{ 0: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 232)) = Tmsghdr{ @@ -124262,7 +124260,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Find which query this answer goes with, if any */ i = next for { - if !(i < nqueries && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { + if !(i < nqueries && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { break } goto _16 @@ -124279,7 +124277,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Only accept positive or negative responses; * retry immediately on server failure, and ignore * all other codes such as refusal. */ - switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { case 0: fallthrough case int32(3): @@ -124289,7 +124287,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry-- } if v18 && v17 != 0 { - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) } fallthrough default: @@ -124309,14 +124307,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a next++ } } else { - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), uint64(rlen)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), Uint64FromInt32(rlen)) } /* Ignore further UDP if all slots full or TCP-mode */ if next == nqueries { (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), nqueries*8))).Fevents = 0 } /* If answer is truncated (TC bit), fallback to TCP */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { *(*int32)(unsafe.Pointer(alens + uintptr(i)*4)) = -int32(1) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), uintptr(0)) r = _start_tcp(tls, pfd+uintptr(i)*8, family, bp+116+uintptr(j)*28, sl, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), *(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))) @@ -124335,8 +124333,8 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a } if int32((*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Frevents)&int32(POLLOUT) != 0 { *(*[2]Tuint8_t)(unsafe.Pointer(bp + 52)) = [2]Tuint8_t{ - 0: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), - 1: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + 0: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), + 1: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), } *(*[2]Tiovec)(unsafe.Pointer(bp + 24)) = [2]Tiovec{ 0: { @@ -124345,14 +124343,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), - Fiov_len: uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + Fiov_len: Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 288)) = Tmsghdr{ Fmsg_iov: bp + 24, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+288, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) + _step_mh(tls, bp+288, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) r = int32(Xsendmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+288, int32(MSG_NOSIGNAL))) if r < 0 { goto out @@ -124380,14 +124378,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 344)) = Tmsghdr{ Fmsg_iov: bp + 56, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+344, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) + _step_mh(tls, bp+344, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) r = int32(Xrecvmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+344, 0)) if r <= 0 { goto out @@ -124396,14 +124394,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < int32(2) { goto _21 } - alen = int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) + alen = Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) if alen < int32(13) { goto out } if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < alen+int32(2) && *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < asize+int32(2) { goto _21 } - rcode = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) + rcode = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) if rcode != 0 && rcode != int32(3) { goto out } @@ -124481,7 +124479,7 @@ func X__res_send(tls *TLS, _msg uintptr, _msglen int32, _answer uintptr, _anslen } else { v1 = *(*int32)(unsafe.Pointer(bp + 24)) } - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, uint64(v1)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, Uint64FromInt32(v1)) } return r } @@ -124559,8 +124557,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v4 = !(Xstrncmp(tls, bp, __ccgo_ts+1205, uint64(7)) != 0); v4 { - v1 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: } @@ -124592,7 +124590,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1230) - if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { + if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { p += uintptr(8) x2 = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -124607,8 +124605,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v11 = !(Xstrncmp(tls, bp, __ccgo_ts+1239, uint64(10)) != 0); v11 { - v8 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -124618,8 +124616,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(11) for { - v13 = int32(*(*uint8)(unsafe.Pointer(p))) - v14 = BoolInt32(v13 == int32(' ') || uint32(v13)-uint32('\t') < uint32(5)) + v13 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v14 = BoolInt32(v13 == int32(' ') || Uint32FromInt32(v13)-uint32('\t') < uint32(5)) goto _15 _15: if !(v14 != 0) { @@ -124633,8 +124631,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ *(*uintptr)(unsafe.Pointer(bp + 744)) = p for { if v20 = *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744)))) != 0; v20 { - v17 = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) - v18 = BoolInt32(v17 == int32(' ') || uint32(v17)-uint32('\t') < uint32(5)) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) + v18 = BoolInt32(v17 == int32(' ') || Uint32FromInt32(v17)-uint32('\t') < uint32(5)) goto _19 _19: } @@ -124656,8 +124654,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v24 = Xstrncmp(tls, bp, __ccgo_ts+1250, uint64(6)) != 0 && Xstrncmp(tls, bp, __ccgo_ts+1257, uint64(6)) != 0; !v24 { - v21 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) - v22 = BoolInt32(v21 == int32(' ') || uint32(v21)-uint32('\t') < uint32(5)) + v21 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) + v22 = BoolInt32(v21 == int32(' ') || Uint32FromInt32(v21)-uint32('\t') < uint32(5)) goto _23 _23: } @@ -124666,8 +124664,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(7) for { - v26 = int32(*(*uint8)(unsafe.Pointer(p))) - v27 = BoolInt32(v26 == int32(' ') || uint32(v26)-uint32('\t') < uint32(5)) + v26 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v27 = BoolInt32(v26 == int32(' ') || Uint32FromInt32(v26)-uint32('\t') < uint32(5)) goto _28 _28: if !(v27 != 0) { @@ -124693,7 +124691,7 @@ no_resolv_conf: X__lookup_ipliteral(tls, conf, __ccgo_ts+1264, PF_UNSPEC) nns = int32(1) } - (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(nns) + (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = Uint32FromInt32(nns) return 0 } @@ -124721,18 +124719,18 @@ func Xsendmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32) (r } i = 0 for { - if !(uint32(i) < vlen) { + if !(Uint32FromInt32(i) < vlen) { break } /* As an unfortunate inconsistency, the sendmmsg API uses * unsigned int for the resulting msg_len, despite sendmsg * returning ssize_t. However Linux limits the total bytes * sent by sendmsg to INT_MAX, so the assignment is safe. */ - r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, int32(flags)) + r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, Int32FromUint32(flags)) if r < 0 { goto error } - (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = uint32(r) + (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = Uint32FromInt64(r) goto _1 _1: ; @@ -124791,10 +124789,10 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { goto _2 _2: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_controllen))-int64(c1)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp)).Fmsg_controllen))-int64(c1)) { v4 = uintptr(0) } else { - v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } c1 = v4 } @@ -124820,7 +124818,7 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { v12 = r goto _13 _13: - return X__syscall_ret(tls, uint64(v12)) + return X__syscall_ret(tls, Uint64FromInt64(v12)) } func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr uintptr, alen Tsocklen_t) (r1 Tssize_t) { @@ -124836,10 +124834,10 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui _ = int32(__SC_sendto) v2 = int64(fd) v3 = int64(buf) - v4 = int64(len1) + v4 = Int64FromUint64(len1) v5 = int64(flags) v6 = int64(addr) - v7 = int64(alen) + v7 = Int64FromUint32(alen) if int32(1) != 0 { r = ___syscall_cp(tls, int64(v1), v2, v3, v4, v5, v6, v7) } else { @@ -124852,7 +124850,7 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v8 = r goto _9 _9: - return X__syscall_ret(tls, uint64(v8)) + return X__syscall_ret(tls, Uint64FromInt64(v8)) } func Xendservent(tls *TLS) { @@ -124896,7 +124894,7 @@ func Xsetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, v3 = int64(level) v4 = int64(optname) v5 = int64(optval) - v6 = int64(optlen) + v6 = Int64FromUint32(optlen) v7 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v1), v2, v3, v4, v5, v6, v7) @@ -124922,13 +124920,13 @@ _9: break } if uint64(optlen) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } tv = optval s = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec us = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -124936,14 +124934,14 @@ _9: if optname == int32(SO_SNDTIMEO) { optname = int32(SO_SNDTIMEO_OLD) } - if !((uint64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v10 = uint64(us) + if !((Uint64FromInt64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v10 = Uint64FromInt64(us) } else { - v10 = uint64(0x7fffffff) + (0+uint64(us))>>int32(63) + v10 = uint64(0x7fffffff) + (0+Uint64FromInt64(us))>>int32(63) } *(*[2]int64)(unsafe.Pointer(bp)) = [2]int64{ 0: s, - 1: int64(int32(v10)), + 1: int64(Int32FromUint64(v10)), } v11 = int32(SYS_setsockopt) _ = int32(__SC_setsockopt) @@ -124951,7 +124949,7 @@ _9: v13 = int64(level) v14 = int64(optname) v15 = int64(bp) - v16 = int64(Uint64FromInt32(2) * Uint64FromInt64(8)) + v16 = Int64FromUint64(Uint64FromInt32(2) * Uint64FromInt64(8)) v17 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v11), v12, v13, v14, v15, v16, v17) @@ -124984,7 +124982,7 @@ _9: v22 = int64(level) v23 = int64(optname) v24 = int64(optval) - v25 = int64(optlen) + v25 = Int64FromUint32(optlen) v26 = int64(Int32FromInt32(0)) if 0 != 0 { r = ___syscall_cp(tls, int64(v20), v21, v22, v23, v24, v25, v26) @@ -125003,7 +125001,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { @@ -125035,7 +125033,7 @@ func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { v8 = r goto _9 _9: - return int32(X__syscall_ret(tls, uint64(v8))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v8))) } func Xsockatmark(tls *TLS, s int32) (r int32) { @@ -125105,7 +125103,7 @@ _9: _18: s = int32(v17) if s < 0 { - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } if type1&int32(SOCK_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) @@ -125114,7 +125112,7 @@ _9: X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFL)), int64(Int32FromInt32(O_NONBLOCK))) } } - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr) (r2 int32) { @@ -125146,7 +125144,7 @@ func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr v8 = r goto _9 _9: - r1 = int32(X__syscall_ret(tls, uint64(v8))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v8))) if r1 < 0 && (*(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EINVAL) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EPROTONOSUPPORT)) && type1&(Int32FromInt32(SOCK_CLOEXEC)|Int32FromInt32(SOCK_NONBLOCK)) != 0 { v10 = int32(SYS_socketpair) _ = int32(__SC_socketpair) @@ -125168,7 +125166,7 @@ _9: v17 = r goto _18 _18: - r1 = int32(X__syscall_ret(tls, uint64(v17))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v17))) if r1 < 0 { return r1 } @@ -125365,11 +125363,11 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) + len1 = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) i = 0 for { if !(i < (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]) { @@ -125420,18 +125418,18 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = v8 goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { rv = int32(ENOMEM) goto cleanup_f } - tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) + tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) if !(tmp1 != 0) { rv = *(*int32)(unsafe.Pointer(X__errno_location(tls))) goto cleanup_f } *(*uintptr)(unsafe.Pointer(mem)) = tmp1 - *(*Tsize_t)(unsafe.Pointer(nmem)) = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) + *(*Tsize_t)(unsafe.Pointer(nmem)) = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) } if (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] != 0 { *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(mem)))) = *(*uintptr)(unsafe.Pointer(buf)) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) @@ -125461,7 +125459,7 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz } (*Tgroup)(unsafe.Pointer(gr)).Fgr_name = *(*uintptr)(unsafe.Pointer(buf)) (*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd = (*Tgroup)(unsafe.Pointer(gr)).Fgr_name + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) - (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) + (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) (*Tgroup)(unsafe.Pointer(gr)).Fgr_mem = *(*uintptr)(unsafe.Pointer(mem)) if *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr(-Int32FromInt32(1)))) != 0 || *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]-int32(1)))) != 0 { rv = int32(EIO) @@ -125636,10 +125634,10 @@ func _atou(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -125702,7 +125700,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = _atou(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) @@ -125718,7 +125716,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { *(*Tsize_t)(unsafe.Pointer(nmem))++ } goto _10 @@ -125743,7 +125741,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { v12 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v12)) = uint8(0) @@ -125814,11 +125812,11 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u goto cleanup } if (*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRFOUND)] != 0 { - nscdbuf = Xcalloc(tls, uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) + nscdbuf = Xcalloc(tls, Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) if !(nscdbuf != 0) { goto cleanup } - nbytes = uint64(4) * uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) + nbytes = uint64(4) * Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) if nbytes != 0 && !(Xfread(tls, nscdbuf, nbytes, uint64(1), f) != 0) { if !(Xferror(tls, f) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EIO) @@ -126029,11 +126027,11 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { + if Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) + len1 = Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) if len1 > *(*Tsize_t)(unsafe.Pointer(size)) || !(*(*uintptr)(unsafe.Pointer(buf)) != 0) { tmp = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(buf)), len1) if !(tmp != 0) { @@ -126057,8 +126055,8 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_passwd + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_shell = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) /* Don't assume that nscd made sure to null terminate strings. * It's supposed to, but malicious nscd should be ignored * rather than causing a crash. @@ -126206,10 +126204,10 @@ func _atou1(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126271,14 +126269,14 @@ func X__getpwent_a(tls *TLS, f uintptr, pw uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v9)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v10 = *(*uintptr)(unsafe.Pointer(bp)) @@ -126377,7 +126375,7 @@ func X__nscd_query(tls *TLS, req Tint32_t, key uintptr, buf uintptr, len1 Tsize_ *(*[3]Tint32_t)(unsafe.Pointer(bp + 32)) = [3]Tint32_t{ 0: int32(NSCDVERSION), 1: req, - 2: int32(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), + 2: Int32FromUint64(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -126450,11 +126448,11 @@ retry: if !(i < Uint64FromInt64(12)/Uint64FromInt64(4)) { break } - v3 = uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) + v3 = Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) v4 = v3>>int32(24) | v3>>int32(8)&uint32(0xff00) | v3<>int32(24) | v7>>int32(8)&uint32(0xff00) | v7< %v", r) }() } - return int64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) + return Int64FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) } func Xlrand48(tls *TLS) (r int64) { @@ -126743,7 +126741,7 @@ func Xjrand48(tls *TLS, s uintptr) (r int64) { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) + return int64(Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) } func Xmrand48(tls *TLS) (r int64) { @@ -126769,7 +126767,7 @@ func Xrand(tls *TLS) (r int32) { defer func() { trc("-> %v", r) }() } _seed = uint64(6364136223846793005)*_seed + uint64(1) - return int32(_seed >> int32(33)) + return Int32FromUint64(_seed >> int32(33)) } func _temper(tls *TLS, x uint32) (r uint32) { @@ -126789,7 +126787,7 @@ func Xrand_r(tls *TLS, seed uintptr) (r int32) { _ = v1 v1 = *(*uint32)(unsafe.Pointer(seed))*Uint32FromInt32(1103515245) + Uint32FromInt32(12345) *(*uint32)(unsafe.Pointer(seed)) = v1 - return int32(_temper(tls, v1) / uint32(2)) + return Int32FromUint32(_temper(tls, v1) / uint32(2)) } /* @@ -126847,15 +126845,15 @@ func _lcg64(tls *TLS, x Tuint64_t) (r Tuint64_t) { } func _savestate(tls *TLS) (r uintptr) { - *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) = uint32(_n<> int32(16)) - _i = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) - _j = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) + _n = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> int32(16)) + _i = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) + _j = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) } func ___srandom(tls *TLS, seed uint32) { @@ -126962,11 +126960,11 @@ func Xrandom(tls *TLS) (r int64) { if _n == 0 { v1 = _lcg31(tls, *(*Tuint32_t)(unsafe.Pointer(_x1))) *(*Tuint32_t)(unsafe.Pointer(_x1)) = v1 - k = int64(v1) + k = Int64FromUint32(v1) goto end } *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) += *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_j)*4)) - k = int64(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) + k = Int64FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) _i++ v2 = _i if v2 == _n { @@ -127004,8 +127002,8 @@ func Xsrand48(tls *TLS, seed int64) { defer tls.Free(16) *(*[3]uint16)(unsafe.Pointer(bp)) = [3]uint16{ 0: uint16(0x330e), - 1: uint16(seed), - 2: uint16(seed >> int32(16)), + 1: Uint16FromInt64(seed), + 2: Uint16FromInt64(seed >> int32(16)), } Xseed48(tls, bp) } @@ -127033,7 +127031,7 @@ func Xexecl(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127077,7 +127075,7 @@ func Xexecle(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127121,7 +127119,7 @@ func Xexeclp(tls *TLS, file uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127156,7 +127154,7 @@ func Xexecve(tls *TLS, path uintptr, argv uintptr, envp uintptr) (r int32) { defer func() { trc("-> %v", r) }() } /* do we need to use environ if envp is null? */ - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) } func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { @@ -127182,18 +127180,18 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { if !(path != 0) { path = __ccgo_ts + 1405 } - k = Xstrnlen(tls, file, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + k = Xstrnlen(tls, file, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if k > uint64(NAME_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENAMETOOLONG) return -int32(1) } - l = Xstrnlen(tls, path, uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) + l = Xstrnlen(tls, path, Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) p = path for { v2 = l + k + uint64(1) b = Xrealloc(tls, b, v2) z = X__strchrnul(tls, p, int32(':')) - if uint64(int64(z)-int64(p)) >= l { + if Uint64FromInt64(int64(z)-int64(p)) >= l { v3 = z z++ if !(*(*uint8)(unsafe.Pointer(v3)) != 0) { @@ -127201,7 +127199,7 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { } goto _1 } - Xmemcpy(tls, b, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, b, p, Uint64FromInt64(int64(z)-int64(p))) *(*uint8)(unsafe.Add(unsafe.Pointer(b), int64(z)-int64(p))) = uint8('/') Xmemcpy(tls, b+uintptr(int64(z)-int64(p))+BoolUintptr(z > p), file, k+uint64(1)) Xexecve(tls, b, argv, envp) @@ -127259,9 +127257,9 @@ func Xfexecve(tls *TLS, fd int32, argv uintptr, envp uintptr) (r1 int32) { _ = r r = int32(X__syscall5(tls, int64(SYS_execveat), int64(fd), int64(__ccgo_ts), int64(argv), int64(envp), int64(Int32FromInt32(AT_EMPTY_PATH)))) if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - X__procfdname(tls, bp, uint32(fd)) + X__procfdname(tls, bp, Uint32FromInt32(fd)) Xexecve(tls, bp, argv, envp) if *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EBADF) @@ -127580,8 +127578,8 @@ func Xposix_spawnattr_setflags(tls *TLS, attr uintptr, flags int16) (r int32) { } var all_flags uint32 _ = all_flags - all_flags = uint32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) - if uint32(flags) & ^all_flags != 0 { + all_flags = Uint32FromInt32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) + if Uint32FromInt16(flags) & ^all_flags != 0 { return int32(EINVAL) } (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(flags) @@ -127621,7 +127619,7 @@ func Xvfork(tls *TLS) (r Tpid_t) { defer func() { trc("-> %v", r) }() } /* vfork syscall cannot be made from C code */ - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clone), int64(Int32FromInt32(SIGCHLD)), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clone), int64(Int32FromInt32(SIGCHLD)), int64(Int32FromInt32(0)))))) } func Xwait(tls *TLS, status uintptr) (r Tpid_t) { @@ -127637,7 +127635,7 @@ func Xwaitid(tls *TLS, type1 Tidtype_t, id Tid_t, info uintptr, options int32) ( trc("tls=%v type1=%v id=%v info=%v options=%v, (%v:)", tls, type1, id, info, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), int64(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), Int64FromUint32(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) } func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { @@ -127645,7 +127643,7 @@ func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { trc("tls=%v pid=%v status=%v options=%v, (%v:)", tls, pid, status, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) } const BRACKET = -3 @@ -127678,11 +127676,11 @@ func _str_next(tls *TLS, str uintptr, n Tsize_t, step uintptr) (r int32) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) return -int32(1) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k) return *(*Twchar_t)(unsafe.Pointer(bp)) } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) - return int32(*(*uint8)(unsafe.Pointer(str))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) } func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r int32) { @@ -127698,35 +127696,35 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i return END } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(2) pat++ esc = int32(1) goto escaped } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { k = uint64(1) if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { k++ } } if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { k++ } } for { - if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { break } - if k+uint64(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1)))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('=')) { - z = int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) + if k+uint64(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('=')) { + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) k += uint64(2) if k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 { k++ } - for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint64(1))))) != z || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint64(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { k++ } if k == m || !(*(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0) { @@ -127745,10 +127743,10 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i *(*Tsize_t)(unsafe.Pointer(step)) = k + uint64(1) return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { return -int32(5) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { return -int32(4) } goto escaped @@ -127760,23 +127758,23 @@ escaped: *(*Tsize_t)(unsafe.Pointer(step)) = uint64(0) return -int32(2) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k1 + esc) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k1 + esc) return *(*Twchar_t)(unsafe.Pointer(bp)) } - return int32(*(*uint8)(unsafe.Pointer(pat))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) } func _casefold(tls *TLS, k int32) (r int32) { var c int32 var v1 uint32 _, _ = c, v1 - c = int32(Xtowupper(tls, uint32(k))) + c = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(k))) if c == k { - v1 = Xtowlower(tls, uint32(k)) + v1 = Xtowlower(tls, Uint32FromInt32(k)) } else { - v1 = uint32(c) + v1 = Uint32FromInt32(c) } - return int32(v1) + return Int32FromUint32(v1) } func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { @@ -127790,59 +127788,59 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { _, _, _, _, _ = inv, l, l1, p0, z inv = 0 p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(p))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('!') { inv = int32(1) p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { if k == int32(']') { return BoolInt32(!(inv != 0)) } p++ } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { if k == int32('-') { return BoolInt32(!(inv != 0)) } p++ } } - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { l = Xmbtowc(tls, bp+4, p+uintptr(1), uint64(4)) if l < 0 { return 0 } if *(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4)) { - if uint32(k)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || uint32(kfold)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { + if Uint32FromInt32(k)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || Uint32FromInt32(kfold)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { return BoolInt32(!(inv != 0)) } } p += uintptr(l - int32(1)) goto _1 } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { p0 = p + uintptr(2) - z = int32(*(*uint8)(unsafe.Pointer(p + 1))) + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) p += uintptr(3) - for int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || int32(*(*uint8)(unsafe.Pointer(p))) != int32(']') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']') { p++ } if z == int32(':') && int64(p-uintptr(1))-int64(p0) < int64(16) { - Xmemcpy(tls, bp+8, p0, uint64(int64(p-uintptr(1))-int64(p0))) + Xmemcpy(tls, bp+8, p0, Uint64FromInt64(int64(p-uintptr(1))-int64(p0))) (*(*[16]uint8)(unsafe.Pointer(bp + 8)))[int64(p-uintptr(1))-int64(p0)] = uint8(0) - if Xiswctype(tls, uint32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, uint32(kfold), Xwctype(tls, bp+8)) != 0 { + if Xiswctype(tls, Uint32FromInt32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, Uint32FromInt32(kfold), Xwctype(tls, bp+8)) != 0 { return BoolInt32(!(inv != 0)) } } goto _1 } if uint32(*(*uint8)(unsafe.Pointer(p))) < uint32(128) { - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(*(*uint8)(unsafe.Pointer(p))) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) } else { l1 = Xmbtowc(tls, bp, p, uint64(4)) if l1 < 0 { @@ -127873,7 +127871,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, endpat, endstr, k, kfold, p, ptail, s, stail, tailcnt, v10, v12, v13, v15, v2, v3, v4, v6, v8, v9 tailcnt = uint64(0) if flags&int32(FNM_PERIOD) != 0 { - if int32(*(*uint8)(unsafe.Pointer(str))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { return int32(FNM_NOMATCH) } } @@ -127932,7 +127930,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(p < endpat) { break } - switch _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) { + switch _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) { case -int32(2): return int32(FNM_NOMATCH) case -int32(5): @@ -127993,9 +127991,9 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, /* Check that the pat and str tails match */ p = ptail for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) - v12 = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + v12 = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) k = v12 if v12 <= 0 { if c != END { @@ -128030,7 +128028,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, p = pat s = str for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) /* Encountering * completes/commits a component */ if c == -int32(5) { @@ -128038,7 +128036,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, str = s break } - k = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + k = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) if !(k != 0) { return int32(FNM_NOMATCH) } @@ -128066,13 +128064,13 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, } /* If we failed, advance str, by 1 char if it's a valid * char, or past all invalid bytes otherwise. */ - k = _str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) + k = _str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) if k > 0 { str += uintptr(*(*Tsize_t)(unsafe.Pointer(bp + 8))) } else { str++ for { - if !(_str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) < 0) { + if !(_str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) < 0) { break } goto _16 @@ -128100,7 +128098,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { for { s = str for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { break } goto _2 @@ -128110,7 +128108,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } p = pat for { - v4 = _pat_next(tls, p, uint64(-Int32FromInt32(1)), bp, flags) + v4 = _pat_next(tls, p, Uint64FromInt32(-Int32FromInt32(1)), bp, flags) c = v4 if !(v4 != END && c != int32('/')) { break @@ -128120,10 +128118,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { ; p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) } - if c != int32(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { return int32(FNM_NOMATCH) } - if _fnmatch_internal(tls, pat, uint64(int64(p)-int64(pat)), str, uint64(int64(s)-int64(str)), flags) != 0 { + if _fnmatch_internal(tls, pat, Uint64FromInt64(int64(p)-int64(pat)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0 { return int32(FNM_NOMATCH) } if !(c != 0) { @@ -128141,10 +128139,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if !(*(*uint8)(unsafe.Pointer(s)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/') { goto _5 } - if !(_fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(int64(s)-int64(str)), flags) != 0) { + if !(_fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0) { return 0 } goto _5 @@ -128154,7 +128152,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } } } - return _fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(-Int32FromInt32(1)), flags) + return _fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt32(-Int32FromInt32(1)), flags) } const GLOB_ABORTED = 2 @@ -128194,7 +128192,7 @@ func _append(tls *TLS, tail uintptr, name uintptr, len1 Tsize_t, mark int32) (r (*Tmatch)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tail)))).Fnext = new1 (*Tmatch)(unsafe.Pointer(new1)).Fnext = UintptrFromInt32(0) Xmemcpy(tls, new1+8, name, len1+uint64(1)) - if mark != 0 && len1 != 0 && int32(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint64(1))))) != int32('/') { + if mark != 0 && len1 != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint64(1))))) != int32('/') { *(*uint8)(unsafe.Pointer(new1 + 8 + uintptr(len1))) = uint8('/') *(*uint8)(unsafe.Pointer(new1 + 8 + uintptr(len1+uint64(1)))) = uint8(0) } @@ -128221,7 +128219,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if *(*uint8)(unsafe.Pointer(pat)) != 0 && type1 != int32(DT_DIR) { type1 = 0 } - for pos+uint64(1) < uint64(PATH_MAX) && int32(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { + for pos+uint64(1) < uint64(PATH_MAX) && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { v1 = pos pos++ v2 = pat @@ -128235,7 +128233,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag in_bracket = 0 overflow = 0 for { - if !(int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { break } if !(*(*uint8)(unsafe.Pointer(pat + uintptr(i))) != 0) { @@ -128243,20 +128241,20 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag return 0 } pat += uintptr(i) - pos += uint64(j) + pos += Uint64FromInt64(j) v4 = Int64FromInt32(0) j = v4 i = v4 break } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { in_bracket = int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { /* Backslashes inside a bracket are (at least by * our interpretation) non-special, so if next * char is ']' we have a complete expression. */ - if in_bracket != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int64(1))))) == int32(']') { + if in_bracket != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int64(1))))) == int32(']') { break } /* Unpaired final backslash never matches. */ @@ -128267,14 +128265,14 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } } } - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { if overflow != 0 { return 0 } in_bracket = 0 pat += uintptr(i + int64(1)) i = int64(-int32(1)) - pos += uint64(j + int64(1)) + pos += Uint64FromInt64(j + int64(1)) j = int64(-int32(1)) } /* Only store a character if it fits in the buffer, but if @@ -128282,10 +128280,10 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag * must be remembered and handled later only if the bracket * is unterminated (and thereby a literal), so as not to * disallow long bracket expressions with short matches. */ - if pos+uint64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { + if pos+Uint64FromInt64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { v5 = j j++ - *(*uint8)(unsafe.Pointer(buf + uintptr(pos+uint64(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) + *(*uint8)(unsafe.Pointer(buf + uintptr(pos+Uint64FromInt64(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) } else { if in_bracket != 0 { overflow = int32(1) @@ -128328,7 +128326,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if p2 != 0 && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { p = p2 for { - if !(p > pat && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { + if !(p > pat && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { break } goto _6 @@ -128362,7 +128360,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag break } /* Quickly skip non-directories when there's pattern left. */ - if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { + if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { continue } l = Xstrlen(tls, de+19) @@ -128388,7 +128386,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } /* With GLOB_PERIOD, don't allow matching . or .. unless * fnmatch would match them with FNM_PERIOD rules in effect. */ - if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { + if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { continue } Xmemcpy(tls, buf+uintptr(pos), de+19, l+uint64(1)) @@ -128400,7 +128398,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } else { v11 = __ccgo_ts } - r = _do_glob(tls, buf, pos+l, int32((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) + r = _do_glob(tls, buf, pos+l, Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) if r != 0 { Xclosedir(tls, dir) return r @@ -128502,7 +128500,7 @@ func _expand_tilde(tls *TLS, pat uintptr, buf uintptr, pos uintptr) (r int32) { ; home = (*(*Tpasswd)(unsafe.Pointer(bp))).Fpw_dir } - for i < uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { + for i < Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { v10 = i i++ v11 = home @@ -128567,7 +128565,7 @@ func Xglob(tls *TLS, pat uintptr, flags int32, errfunc uintptr, g uintptr) (r in (*(*[4096]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) *(*Tsize_t)(unsafe.Pointer(bp + 4112)) = uint64(0) *(*uintptr)(unsafe.Pointer(bp + 4120)) = p - if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && int32(*(*uint8)(unsafe.Pointer(p))) == int32('~') { + if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('~') { error1 = _expand_tilde(tls, bp+4120, bp+16, bp+4112) } if !(error1 != 0) { @@ -128965,7 +128963,7 @@ func _tre_ast_new_iter(tls *TLS, mem Ttre_mem_t, arg uintptr, min int32, max int (*Ttre_iteration_t)(unsafe.Pointer(iter)).Farg = arg (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmin = min (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmax = max - SetBitFieldPtr8Uint32(iter+16, uint32(minimal), 0, 0x1) + SetBitFieldPtr8Uint32(iter+16, Uint32FromInt32(minimal), 0, 0x1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnum_submatches = (*Ttre_ast_node_t)(unsafe.Pointer(arg)).Fnum_submatches return node } @@ -129034,7 +129032,7 @@ func _tre_stack_new(tls *TLS, size int32, max_size int32, increment int32) (r ui _ = s s = Xmalloc(tls, uint64(24)) if s != UintptrFromInt32(0) { - (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*uint64(size)) + (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*Uint64FromInt32(size)) if (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack == UintptrFromInt32(0) { Xfree(tls, s) return UintptrFromInt32(0) @@ -129071,7 +129069,7 @@ func _tre_stack_push(tls *TLS, s uintptr, value Ttre_stack_item) (r Treg_errcode if new_size > (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size { new_size = (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size } - new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*uint64(new_size)) + new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*Uint64FromInt32(new_size)) if new_buffer == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -129205,7 +129203,7 @@ func _tre_expand_macro(tls *TLS, s uintptr) (r uintptr) { _ = i i = 0 for { - if !(_tre_macros[i].Fc != 0 && int32(_tre_macros[i].Fc) != int32(*(*uint8)(unsafe.Pointer(s)))) { + if !(_tre_macros[i].Fc != 0 && Int32FromUint8(_tre_macros[i].Fc) != Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) { break } goto _1 @@ -129241,7 +129239,7 @@ func _tre_new_lit(tls *TLS, p uintptr) (r uintptr) { return uintptr(0) } *(*int32)(unsafe.Pointer(p + 20)) *= int32(2) - a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, uint64((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) + a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, Uint64FromInt32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) if !(a != 0) { return uintptr(0) } @@ -129267,8 +129265,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { /* assumes islower(c) and isupper(c) are exclusive and toupper(c)!=c if islower(c). multiple opposite case characters are not supported */ - if Xiswlower(tls, uint32(c)) != 0 { - v2 = int32(Xtowupper(tls, uint32(c))) + if Xiswlower(tls, Uint32FromInt32(c)) != 0 { + v2 = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(c))) e = v2 b = v2 c++ @@ -129277,7 +129275,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowupper(tls, uint32(c)) != uint32(e) { + if Xtowupper(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _3 @@ -129287,8 +129285,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { e++ } } else { - if Xiswupper(tls, uint32(c)) != 0 { - v4 = int32(Xtowlower(tls, uint32(c))) + if Xiswupper(tls, Uint32FromInt32(c)) != 0 { + v4 = Int32FromUint32(Xtowlower(tls, Uint32FromInt32(c))) e = v4 b = v4 c++ @@ -129297,7 +129295,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowlower(tls, uint32(c)) != uint32(e) { + if Xtowlower(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _5 @@ -129364,7 +129362,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint start = s for { class = uint64(0) - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 <= 0 { if *(*uint8)(unsafe.Pointer(s)) != 0 { v2 = int32(REG_BADPAT) @@ -129373,26 +129371,26 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint } return v2 } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fs = s + uintptr(1) return REG_OK } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { return int32(REG_ERANGE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { /* collating symbols and equivalence classes are not supported */ return int32(REG_ECOLLATE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { s += uintptr(2) len1 = 0 for { if !(len1 < int32(CHARCLASS_NAME_MAX) && *(*uint8)(unsafe.Pointer(s + uintptr(len1))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { - Xmemcpy(tls, bp+4, s, uint64(len1)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { + Xmemcpy(tls, bp+4, s, Uint64FromInt32(len1)) (*(*[15]uint8)(unsafe.Pointer(bp + 4)))[len1] = uint8(0) class = Xwctype(tls, bp+4) break @@ -129402,7 +129400,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint ; len1++ } - if !(class != 0) || int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { + if !(class != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { return int32(REG_ECTYPE) } min = 0 @@ -129413,9 +129411,9 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint max = v4 min = v4 s += uintptr(len1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { s++ - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) max = *(*Twchar_t)(unsafe.Pointer(bp)) /* XXX - Should use collation order instead of encoding values in character ranges. */ @@ -129475,12 +129473,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*(*Tliterals)(unsafe.Pointer(bp))).Fmem = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem (*(*Tliterals)(unsafe.Pointer(bp))).Flen1 = 0 (*(*Tliterals)(unsafe.Pointer(bp))).Fcap1 = int32(32) - (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) + (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) if !((*(*Tliterals)(unsafe.Pointer(bp))).Fa != 0) { return int32(REG_ESPACE) } (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 = 0 - (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate = BoolInt32(int32(*(*uint8)(unsafe.Pointer(s))) == int32('^')) + (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('^')) if (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate != 0 { s++ } @@ -129504,7 +129502,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) } /* Sort the array if we need to negate it. */ - Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) + Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) /* extra lit for the last negated range */ lit = _tre_new_lit(tls, bp) if !(lit != 0) { @@ -129516,12 +129514,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) /* negated classes */ if (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 != 0 { - nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) + nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) if !(nc != 0) { err = int32(REG_ESPACE) goto parse_bracket_done } - Xmemcpy(tls, nc, bp+24+8, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) + Xmemcpy(tls, nc, bp+24+8, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) *(*Ttre_ctype_t)(unsafe.Pointer(nc + uintptr((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*8)) = uint64(0) } } @@ -129582,7 +129580,7 @@ func _parse_dup_count(tls *TLS, s uintptr, n uintptr) (r uintptr) { } *(*int32)(unsafe.Pointer(n)) = 0 for { - *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (int32(*(*uint8)(unsafe.Pointer(s))) - int32('0')) + *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0')) s++ if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { break @@ -129602,7 +129600,7 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u var _ /* min at bp+0 */ int32 _, _, _, _, _ = v1, v2, v3, v4, v5 s = _parse_dup_count(tls, s, bp) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(',') { s = _parse_dup_count(tls, s+uintptr(1), bp+4) } else { *(*int32)(unsafe.Pointer(bp + 4)) = *(*int32)(unsafe.Pointer(bp)) @@ -129613,11 +129611,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u s++ } } - if v5 = v3 || v2 && int32(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { + if v5 = v3 || v2 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { v4 = s s++ } - if v5 || int32(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { + if v5 || Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { return uintptr(0) } *(*int32)(unsafe.Pointer(pmin)) = *(*int32)(unsafe.Pointer(bp)) @@ -129627,11 +129625,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u func _hexval1(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -129684,7 +129682,7 @@ func _parse_atom(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { var _ /* wc at bp+0 */ Twchar_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, ere, err, i, len1, node, p, tmp1, tmp11, tmp2, tmp21, v, val, v14, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26 ere = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags & int32(REG_EXTENDED) - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('['): goto _1 case int32('\\'): @@ -129726,7 +129724,7 @@ _2: /* extensions: \b, \B, \<, \>, \xHH \x{HHHH} */ s++ v14 = s - switch int32(*(*uint8)(unsafe.Pointer(v14))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v14))) { case 0: return int32(REG_EESCAPE) case int32('b'): @@ -129741,7 +129739,7 @@ _2: s++ v = 0 len1 = int32(2) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { len1 = int32(8) s++ } @@ -129762,7 +129760,7 @@ _2: } s += uintptr(i) if len1 == int32(8) { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('}') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('}') { return int32(REG_EBRACE) } s++ @@ -129795,7 +129793,7 @@ _2: default: if !(ere != 0) && uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { /* back reference */ - val = int32(*(*uint8)(unsafe.Pointer(s))) - int32('0') + val = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0') v19 = ctx + 44 v18 = *(*int32)(unsafe.Pointer(v19)) *(*int32)(unsafe.Pointer(v19))++ @@ -129850,7 +129848,7 @@ _4: _5: ; /* '$' is special everywhere in EREs, and at the end of a BRE subexpression. */ - if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { + if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { goto parse_literal } node = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(2), int32(ASSERT_AT_EOL), -int32(1)) @@ -129882,14 +129880,14 @@ _12: goto parse_literal parse_literal: ; - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 < 0 { return int32(REG_BADPAT) } - if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { + if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { /* multiple opposite case characters are not supported */ - tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) - tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) if tmp11 != 0 && tmp21 != 0 { node = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, tmp11, tmp21) } else { @@ -129938,7 +129936,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { return err } for { - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { v4 = _tre_stack_push_voidptr(tls, stack, nunion) err = v4 if v4 != REG_OK { @@ -129967,7 +129965,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s goto _3 } - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(1), -int32(1), -int32(1)) if !((*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn != 0) { return int32(REG_ESPACE) @@ -129983,33 +129981,33 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { parse_iter: ; for { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('*') { if !(ere != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('{') { break } } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { break } /* extension: treat \+, \? as repetitions in BRE */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { s++ } /* handle ^* at the start of a BRE. */ - if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && int32(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { + if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { break } /* extension: multiple consecutive *+?{,} is unspecified, but (a+)+ has to be supported so accepting a++ makes sense, note however that the RE_DUP_MAX limit can be circumvented: (a{255}){255} uses a lot of memory.. */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { s = _parse_dup(tls, s+uintptr(1), ere, bp, bp+4) if !(s != 0) { return int32(REG_BADBR) @@ -130017,10 +130015,10 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { } else { *(*int32)(unsafe.Pointer(bp)) = 0 *(*int32)(unsafe.Pointer(bp + 4)) = -int32(1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { *(*int32)(unsafe.Pointer(bp)) = int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('?') { *(*int32)(unsafe.Pointer(bp + 4)) = int32(1) } s++ @@ -130037,13 +130035,13 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { _9: } nbranch = _tre_ast_new_catenation(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nbranch, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn) - if ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { + if ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { /* extension: empty branch is unspecified (), (|a), (a|) here they are not rejected but match on empty string */ - c = int32(*(*uint8)(unsafe.Pointer(s))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) nunion = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nunion, nbranch) nbranch = uintptr(0) - if c == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { + if c == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { s += uintptr(2) (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s } else { @@ -130351,7 +130349,7 @@ func _tre_add_tags(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr, tnfa u } (*(*Ttre_submatch_data_t)(unsafe.Pointer((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fsubmatch_data + uintptr(id1)*16))).Fparents = UintptrFromInt32(0) if i2 > 0 { - p = Xmalloc(tls, uint64(4)*uint64(i2+Int32FromInt32(1))) + p = Xmalloc(tls, uint64(4)*Uint64FromInt32(i2+Int32FromInt32(1))) if p == UintptrFromInt32(0) { status = int32(REG_ESPACE) goto _10 @@ -131255,7 +131253,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; s2++ } - new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*uint64(s1+s2+Int32FromInt32(1))) + new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*Uint64FromInt32(s1+s2+Int32FromInt32(1))) if !(new_set != 0) { return UintptrFromInt32(0) } @@ -131284,7 +131282,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*uint64(i+num_tags+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*Uint64FromInt32(i+num_tags+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -131344,7 +131342,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*uint64(i+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*Uint64FromInt32(i+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -131662,7 +131660,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -131693,7 +131691,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -131751,8 +131749,8 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun } /* Use the character ranges, assertions, etc. from `p1' for the transition from `p1' to `p2'. */ - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition)*4)))*56 (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate_id = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition if (*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fclass != 0 { @@ -131783,7 +131781,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun ; i++ } - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*uint64(i+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*Uint64FromInt32(i+Int32FromInt32(1))) if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -131822,7 +131820,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = UintptrFromInt32(0) /* If there were any tags, allocate an array and fill it. */ if i+j > 0 { - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*uint64(i+j+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(i+j+Int32FromInt32(1))) if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags != 0) { return int32(REG_ESPACE) } @@ -131976,10 +131974,10 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) + (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) tree = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fn /* Referring to nonexistent subexpressions is illegal. */ - if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > int32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { + if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > Int32FromUint64((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { errcode = int32(REG_ESUBREG) if int32(1) != 0 { goto error_exit @@ -131995,7 +131993,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs = BoolInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref >= 0) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_approx = 0 - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) /* Set up tags for submatch addressing. If REG_NOSUB is set and the regexp does not have back references, this can be skipped. */ if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs != 0 || !(cflags&Int32FromInt32(REG_NOSUB) != 0) { @@ -132008,7 +132006,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 { - tag_directions = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + tag_directions = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) if tag_directions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132016,16 +132014,16 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftag_directions = tag_directions - Xmemset(tls, tag_directions, -int32(1), uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + Xmemset(tls, tag_directions, -int32(1), uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) } - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - submatch_data = Xcalloc(tls, uint64(uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) + submatch_data = Xcalloc(tls, uint64(Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) if submatch_data == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132078,14 +132076,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - counts = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + counts = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if counts == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - offs = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + offs = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if offs == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132118,7 +132116,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; i++ } - transitions = Xcalloc(tls, uint64(uint32(add)+uint32(1)), uint64(56)) + transitions = Xcalloc(tls, uint64(Uint32FromInt32(add)+uint32(1)), uint64(56)) if transitions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132126,7 +132124,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftransitions = transitions - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) errcode = _tre_ast_to_tnfa(tls, tree, transitions, counts, offs) if errcode != REG_OK { errcode = errcode @@ -132141,7 +132139,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { i++ p += 56 } - initial = Xcalloc(tls, uint64(uint32(i)+uint32(1)), uint64(56)) + initial = Xcalloc(tls, uint64(Uint32FromInt32(i)+uint32(1)), uint64(56)) if initial == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132171,14 +132169,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; j++ } - (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*uint64(j+Int32FromInt32(1))) + (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) if !((*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags != 0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*uint64(j+Int32FromInt32(1))) + Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fassertions = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Fassertions i++ @@ -132188,7 +132186,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { p += 56 } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fstate = UintptrFromInt32(0) - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ffinal = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*(*Ttre_pos_and_tags_t)(unsafe.Pointer((*Ttre_ast_node_t)(unsafe.Pointer(tree)).Flastpos))).Fposition)*4)))*56 (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags = cflags @@ -132325,7 +132323,7 @@ func Xregerror(tls *TLS, e int32, preg uintptr, buf uintptr, size Tsize_t) (r Ts s++ } s = X__lctrans_cur(tls, s) - return uint64(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) + return Uint64FromInt32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) } const tre_bt_mem_alloc = 0 @@ -132446,23 +132444,23 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags everything in a single large block with calloc(). */ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ - if uint64(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { + if Uint64FromInt32(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { return int32(REG_ESPACE) } /* Likewise check rbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Likewise check pbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Compute the length of the block we need. */ - tbytes = uint64(8) * uint64(num_tags) - rbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) - pbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) - xbytes = uint64(8) * uint64(num_tags) - total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes + tbytes = uint64(8) * Uint64FromInt32(num_tags) + rbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) + pbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) + xbytes = uint64(8) * Uint64FromInt32(num_tags) + total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes /* Allocate the memory. */ buf = Xcalloc(tls, total_bytes, uint64(1)) if buf == UintptrFromInt32(0) { @@ -132471,32 +132469,32 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = buf tmp_buf = buf + uintptr(tbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v1 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v1 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v1 = uint64(0) } tmp_buf += uintptr(v1) reach_next = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v2 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v2 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v2 = uint64(0) } tmp_buf += uintptr(v2) reach = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v3 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v3 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v3 = uint64(0) } tmp_buf += uintptr(v3) reach_pos = tmp_buf tmp_buf += uintptr(pbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v4 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v4 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v4 = uint64(0) } @@ -132547,7 +132545,7 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags trans_i = (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Finitial for (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != UintptrFromInt32(0) { if (*(*Ttre_reach_pos_t)(unsafe.Pointer(reach_pos + uintptr((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id)*16))).Fpos < pos { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { trans_i += 56 continue } @@ -132686,8 +132684,8 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags break } /* Does this transition match the input symbol? */ - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _14 } /* Compute the tags after this transition. */ @@ -132871,7 +132869,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fprev = UintptrFromInt32(0) (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fnext = UintptrFromInt32(0) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags != 0 { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !(tags != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -132885,7 +132883,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states != 0 { - states_seen = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) + states_seen = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) if !(states_seen != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -132944,7 +132942,7 @@ retry: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { goto _4 } if state == UintptrFromInt32(0) { @@ -132970,7 +132968,7 @@ retry: } (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133068,11 +133066,11 @@ _9: bt = *(*int32)(unsafe.Pointer(&(*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fu)) /* Get the substring we need to match against. Remember to turn off REG_NOSUB temporarily. */ - _tre_fill_pmatch(tls, uint64(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) + _tre_fill_pmatch(tls, Uint64FromInt32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) so = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_so eo = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_eo bt_len = eo - so - result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), uint64(bt_len)) + result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), Uint64FromInt64(bt_len)) if result == 0 { /* Back reference matched. Check for infinite loop. */ if bt_len == 0 { @@ -133128,8 +133126,8 @@ _9: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _13 } if next_state == UintptrFromInt32(0) { @@ -133158,7 +133156,7 @@ _9: } (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133385,7 +133383,7 @@ func Xregexec(tls *TLS, preg uintptr, string1 uintptr, nmatch Tsize_t, pmatch ui nmatch = uint64(0) } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 && nmatch > uint64(0) { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if tags == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -133482,7 +133480,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(TRE_MEM_BLOCK_SIZE) } else { if size*uint64(8) > uint64(TRE_MEM_BLOCK_SIZE) { - block_size = int32(size * uint64(8)) + block_size = Int32FromUint64(size * uint64(8)) } else { block_size = int32(TRE_MEM_BLOCK_SIZE) } @@ -133491,7 +133489,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) return UintptrFromInt32(0) } - (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, uint64(block_size)) + (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, Uint64FromInt32(block_size)) if (*Ttre_list_t)(unsafe.Pointer(l)).Fdata == UintptrFromInt32(0) { Xfree(tls, l) (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) @@ -133506,12 +133504,12 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl } (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fcurrent = l (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr = (*Ttre_list_t)(unsafe.Pointer(l)).Fdata - (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(block_size) + (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = Uint64FromInt32(block_size) } } /* Make sure the next pointer will be aligned. */ - if (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { - v1 = uint64(8) - (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) + if (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { + v1 = uint64(8) - (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) } else { v1 = uint64(0) } @@ -133598,8 +133596,8 @@ func _resize(tls *TLS, nel Tsize_t, htab uintptr) (r int32) { _, _, _, _, _, _, _, _ = e, i, j, newe, newsize, oldsize, oldtab, v4 oldsize = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fmask + uint64(1) oldtab = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fentries - if nel > uint64(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { - nel = uint64(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) + if nel > Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { + nel = Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) } newsize = uint64(MINSIZE) for { @@ -134042,7 +134040,7 @@ func X__tsearch_balance(tls *TLS, p uintptr) (r int32) { n = *(*uintptr)(unsafe.Pointer(p)) h0 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8))) h1 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8 + 1*8))) - if uint32(h0-h1)+uint32(1) < uint32(3) { + if Uint32FromInt32(h0-h1)+uint32(1) < uint32(3) { old = (*Tnode1)(unsafe.Pointer(n)).Fh if h0 < h1 { v1 = h1 + int32(1) @@ -134153,7 +134151,7 @@ func Xpoll(tls *TLS, fds uintptr, n Tnfds_t, timeout int32) (r int32) { } else { v1 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), int64(n), int64(v1), int64(Int32FromInt32(0)), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), Int64FromUint64(n), int64(v1), int64(Int32FromInt32(0)), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) } func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r int32) { @@ -134188,7 +134186,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r int32 } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), int64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), Int64FromUint64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) } func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts uintptr, mask uintptr) (r int32) { @@ -134204,7 +134202,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui var _ /* data at bp+16 */ [2]Tsyscall_arg_t _, _, _, _, _ = ns, s, v1, v2, v3 *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 16)) = [2]Tsyscall_arg_t{ - 0: int64(uint64(mask)), + 0: Int64FromUint64(uint64(mask)), 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } if ts != 0 { @@ -134228,7 +134226,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) } func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uintptr) (r int32) { @@ -134255,9 +134253,9 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin v2 = 0 } us = v2 - max_time = int64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) + max_time = Int64FromUint64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) if s < 0 || us < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if us/int64(1000000) > max_time-s { s = max_time @@ -134280,7 +134278,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 16)) = [2]Tsyscall_arg_t{ 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) } var _all_mask = [1]uint64{ @@ -134330,9 +134328,9 @@ func Xgetitimer(tls *TLS, which int32, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) } func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { @@ -134340,7 +134338,7 @@ func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { trc("tls=%v pid=%v sig=%v, (%v:)", tls, pid, sig, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) } func Xkillpg(tls *TLS, pgid Tpid_t, sig int32) (r int32) { @@ -134417,7 +134415,7 @@ func Xraise(tls *TLS, sig int32) (r int32) { var _ /* set at bp+0 */ Tsigset_t _ = ret X__block_app_sigs(tls, bp) - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) X__restore_sigs(tls, bp) return ret } @@ -134453,8 +134451,8 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { vs = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_sec ius = (*Titimerval)(unsafe.Pointer(new1)).Fit_interval.Ftv_usec vus = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_usec - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, @@ -134469,9 +134467,9 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) } type Tk_sigaction = struct { @@ -134510,8 +134508,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old2 uintptr) (r1 int32) _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = old, old1, r, tmp, v1, v10, v14, v15, v19, v2, v20, v3, v4, v8, v9 if sa != 0 { if uint64(*(*uintptr)(unsafe.Pointer(sa))) > uint64(1) { - v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(uint64(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 - v2 = int64(uint64(1) << (uint64(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) + v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(Uint64FromInt32(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 + v2 = Int64FromUint64(uint64(1) << (Uint64FromInt32(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) if Uint64FromInt64(8) == Uint64FromInt64(4) { v3 = v1 for { @@ -134546,7 +134544,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old2 uintptr) (r1 int32) Fr [0][2]Tuint32_t Fv Tuint64_t }{} - *(*uint64)(unsafe.Pointer(bp + 8)) = uint64(v2) + *(*uint64)(unsafe.Pointer(bp + 8)) = Uint64FromInt64(v2) if *(*Tuint32_t)(unsafe.Pointer(bp + 8)) != 0 { v9 = v8 for { @@ -134624,8 +134622,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old2 uintptr) (r1 int32) } } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fhandler = *(*uintptr)(unsafe.Pointer(sa)) - (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = uint64((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) - Xmemcpy(tls, bp+16+16, sa+8, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = Uint64FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) + Xmemcpy(tls, bp+16+16, sa+8, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } if sa != 0 { v19 = bp + 16 @@ -134640,10 +134638,10 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old2 uintptr) (r1 int32) r = int32(X__syscall4(tls, int64(SYS_rt_sigaction), int64(sig), int64(v19), int64(v20), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if old2 != 0 && !(r != 0) { *(*uintptr)(unsafe.Pointer(old2)) = (*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fhandler - (*Tsigaction)(unsafe.Pointer(old2)).Fsa_flags = int32((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) - Xmemcpy(tls, old2+8, bp+48+16, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*Tsigaction)(unsafe.Pointer(old2)).Fsa_flags = Int32FromUint64((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) + Xmemcpy(tls, old2+8, bp+48+16, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { @@ -134656,7 +134654,7 @@ func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { var r int32 var _ /* set at bp+0 */ [1]uint64 _ = r - if uint32(sig)-uint32(32) < uint32(3) || uint32(sig)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(sig)-uint32(32) < uint32(3) || Uint32FromInt32(sig)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134690,8 +134688,8 @@ func Xsigaddset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134714,7 +134712,7 @@ func Xsigaltstack(tls *TLS, ss uintptr, old uintptr) (r int32) { return -int32(1) } } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) } const SST_SIZE = 8 @@ -134732,7 +134730,7 @@ func Xsigandset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) & *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -134751,8 +134749,8 @@ func Xsigdelset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134806,7 +134804,7 @@ func Xsigisemptyset(tls *TLS, set uintptr) (r int32) { _ = i i = uint64(0) for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } if *(*uint64)(unsafe.Pointer(set + uintptr(i)*8)) != 0 { @@ -134827,8 +134825,8 @@ func Xsigismember(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { return 0 } return BoolInt32(!!(*(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8))&(Uint64FromUint64(1)<<(uint64(s)&(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)))) != 0)) @@ -134847,7 +134845,7 @@ func Xsigorset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) { l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) | *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -134864,7 +134862,7 @@ func Xsigpending(tls *TLS, set uintptr) (r int32) { trc("tls=%v set=%v, (%v:)", tls, set, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) } func Xsigprocmask(tls *TLS, how int32, set uintptr, old uintptr) (r1 int32) { @@ -134900,7 +134898,7 @@ func Xsigqueue(tls *TLS, pid Tpid_t, sig int32, value Tsigval) (r1 int32) { *(*Tuid_t)(unsafe.Pointer(bp + 16 + 4)) = Xgetuid(tls) X__block_app_sigs(tls, bp+128) *(*Tpid_t)(unsafe.Pointer(bp + 16)) = Xgetpid(tls) - r = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) X__restore_sigs(tls, bp+128) return r } @@ -134960,7 +134958,7 @@ func Xsigsuspend(tls *TLS, mask uintptr) (r int32) { trc("tls=%v mask=%v, (%v:)", tls, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) } func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r int32) { @@ -134977,7 +134975,7 @@ func Xsigtimedwait(tls *TLS, mask uintptr, si uintptr, timeout uintptr) (r int32 for cond := true; cond; cond = ret == -int32(EINTR) { ret = _do_sigtimedwait(tls, mask, si, timeout) } - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsigwait(tls *TLS, mask uintptr, sig uintptr) (r int32) { @@ -135056,7 +135054,7 @@ func Xchmod(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(mode))))) } func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { @@ -135069,12 +135067,12 @@ func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), int64(mode))) + ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), Int64FromUint32(mode))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp), int64(mode))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp), Int64FromUint32(mode))))) } func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r int32) { @@ -135089,36 +135087,36 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in var _ /* st at bp+0 */ Tstat _, _, _ = fd2, ret, v1 if !(flag != 0) { - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), Int64FromUint32(mode))))) } - ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), int64(mode), int64(flag))) + ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), Int64FromUint32(mode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag != int32(AT_SYMLINK_NOFOLLOW) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if Xfstatat(tls, fd, path, bp, flag) != 0 { return -int32(1) } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } v1 = int32(X__syscall3(tls, int64(SYS_openat), int64(fd), int64(path), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_PATH)|Int32FromInt32(O_NOFOLLOW)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC)))) fd2 = v1 if v1 < 0 { if fd2 == -int32(ELOOP) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } - return int32(X__syscall_ret(tls, uint64(fd2))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd2))) } - X__procfdname(tls, bp+128, uint32(fd2)) + X__procfdname(tls, bp+128, Uint32FromInt32(fd2)) ret = Xstat(tls, bp+128, bp) if !(ret != 0) { if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - ret = int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + ret = int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } else { - ret = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+128), int64(mode))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+128), Int64FromUint32(mode))))) } } X__syscall1(tls, int64(SYS_close), int64(fd2)) @@ -135131,7 +135129,7 @@ func X__fstat(tls *TLS, fd int32, st uintptr) (r int32) { defer func() { trc("-> %v", r) }() } if fd < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EBADF)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EBADF)))) } return X__fstatat(tls, fd, __ccgo_ts, st, int32(AT_EMPTY_PATH)) } @@ -135203,20 +135201,20 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r Fst_uid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_uid, Fst_gid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_gid, Fst_rdev: uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<= 0 { ret = int32(X__syscall4(tls, int64(SYS_newfstatat), int64(fd), int64(path), int64(bp), int64(flag))) if ret == -int32(EINVAL) { - X__procfdname(tls, bp+128, uint32(fd)) + X__procfdname(tls, bp+128, Uint32FromInt32(fd)) ret = int32(X__syscall4(tls, int64(SYS_newfstatat), int64(-Int32FromInt32(100)), int64(bp+128), int64(bp), int64(Int32FromInt32(0)))) } } @@ -135303,11 +135301,11 @@ func X__fstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int if uint64(8) < uint64(8) { ret = _fstatat_statx(tls, fd, path, st, flag) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } ret = _fstatat_kstat(tls, fd, path, st, flag) - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xfstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int32) { @@ -135343,8 +135341,8 @@ func X__futimesat(tls *TLS, dirfd int32, pathname uintptr, times uintptr) (r int if !(i < int32(2)) { break } - if uint64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_sec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_nsec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec * int64(1000) @@ -135391,7 +135389,7 @@ func Xmkdir(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mkdirat), int64(-Int32FromInt32(100)), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mkdirat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(mode))))) } func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { @@ -135399,7 +135397,7 @@ func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v fd=%v path=%v mode=%v, (%v:)", tls, fd, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), Int64FromUint32(mode))))) } func Xmkfifo(tls *TLS, path uintptr, mode Tmode_t) (r int32) { @@ -135423,7 +135421,7 @@ func Xmknod(tls *TLS, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { trc("tls=%v path=%v mode=%v dev=%v, (%v:)", tls, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_mknodat), int64(-Int32FromInt32(100)), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_mknodat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { @@ -135431,7 +135429,7 @@ func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int trc("tls=%v fd=%v path=%v mode=%v dev=%v, (%v:)", tls, fd, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { @@ -135444,7 +135442,7 @@ func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { func ___statfs(tls *TLS, path uintptr, buf uintptr) (r int32) { *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_statfs), int64(path), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_statfs), int64(path), int64(buf))))) } func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { @@ -135453,7 +135451,7 @@ func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { defer func() { trc("-> %v", r) }() } *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fstatfs), int64(fd), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fstatfs), int64(fd), int64(buf))))) } func _fixup(tls *TLS, out uintptr, in uintptr) { @@ -135473,7 +135471,7 @@ func _fixup(tls *TLS, out uintptr, in uintptr) { (*Tstatvfs)(unsafe.Pointer(out)).Ff_files = (*Tstatfs)(unsafe.Pointer(in)).Ff_files (*Tstatvfs)(unsafe.Pointer(out)).Ff_ffree = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree (*Tstatvfs)(unsafe.Pointer(out)).Ff_favail = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree - (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = uint64(*(*int32)(unsafe.Pointer(in + 56))) + (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = Uint64FromInt32(*(*int32)(unsafe.Pointer(in + 56))) (*Tstatvfs)(unsafe.Pointer(out)).Ff_flag = (*Tstatfs)(unsafe.Pointer(in)).Ff_flags (*Tstatvfs)(unsafe.Pointer(out)).Ff_namemax = (*Tstatfs)(unsafe.Pointer(in)).Ff_namelen (*Tstatvfs)(unsafe.Pointer(out)).Ff_type = uint32((*Tstatfs)(unsafe.Pointer(in)).Ff_type) @@ -135514,7 +135512,7 @@ func Xumask(tls *TLS, mode Tmode_t) (r Tmode_t) { trc("tls=%v mode=%v, (%v:)", tls, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_umask), int64(mode))))) + return Uint32FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_umask), Int64FromUint32(mode))))) } func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r1 int32) { @@ -135528,7 +135526,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r times = uintptr(0) } r = int32(X__syscall4(tls, int64(SYS_utimensat), int64(fd), int64(path), int64(times), int64(flags))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__fclose_ca(tls *TLS, f uintptr) (r int32) { @@ -135551,7 +135549,7 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { var _ /* wsz at bp+0 */ Twinsize _, _, _, _ = f, flags, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1543, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1543, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -135565,19 +135563,19 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { Xmemset(tls, f, 0, uint64(232)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(v2) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(v2) } /* Apply close-on-exec flag */ if Xstrchr(tls, mode, int32('e')) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } /* Set append mode on fd if opened for append */ - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { flags = int32(X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFL)))) if !(flags&Int32FromInt32(O_APPEND) != 0) { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFL)), int64(flags|Int32FromInt32(O_APPEND))) @@ -135622,7 +135620,7 @@ func X__fmodeflags(tls *TLS, mode uintptr) (r int32) { if Xstrchr(tls, mode, int32('+')) != 0 { flags = int32(O_RDWR) } else { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { flags = O_RDONLY } else { flags = int32(O_WRONLY) @@ -135634,13 +135632,13 @@ func X__fmodeflags(tls *TLS, mode uintptr) (r int32) { if Xstrchr(tls, mode, int32('e')) != 0 { flags |= int32(O_CLOEXEC) } - if int32(*(*uint8)(unsafe.Pointer(mode))) != int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) != int32('r') { flags |= int32(O_CREAT) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('w') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('w') { flags |= int32(O_TRUNC) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { flags |= int32(O_APPEND) } return flags @@ -135652,12 +135650,12 @@ func X__fopen_rb_ca(tls *TLS, filename uintptr, f uintptr, buf uintptr, len1 Tsi defer func() { trc("-> %v", r) }() } Xmemset(tls, f, 0, uint64(232)) - (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) + (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) if (*TFILE)(unsafe.Pointer(f)).Ffd < 0 { return uintptr(0) } X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) (*TFILE)(unsafe.Pointer(f)).Fbuf = buf + uintptr(UNGET) (*TFILE)(unsafe.Pointer(f)).Fbuf_size = len1 - uint64(UNGET) (*TFILE)(unsafe.Pointer(f)).Fread = __ccgo_fp(X__stdio_read) @@ -135678,22 +135676,22 @@ func X__overflow(tls *TLS, f uintptr, _c int32) (r int32) { var v2, v3 uintptr var _ /* c at bp+0 */ uint8 _, _, _ = v1, v2, v3 - *(*uint8)(unsafe.Pointer(bp)) = uint8(_c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(_c) if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return -int32(1) } - if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && int32(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { + if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { v1 = *(*uint8)(unsafe.Pointer(bp)) v3 = f + 40 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ *(*uint8)(unsafe.Pointer(v2)) = v1 - return int32(v1) + return Int32FromUint8(v1) } if (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, bp, uint64(1)) != uint64(1) { return -int32(1) } - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } func _dummy9(tls *TLS, fd int32) (r int32) { @@ -135705,7 +135703,7 @@ func X__stdio_close(tls *TLS, f uintptr) (r int32) { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) } var _dummy_file = uintptr(0) @@ -135778,9 +135776,9 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { }, } if (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len != 0 { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) } else { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), Int64FromUint64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) } cnt = v1 if cnt <= 0 { @@ -135789,11 +135787,11 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32(F_EOF) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v2) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v2) return uint64(0) } - if uint64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { - return uint64(cnt) + if Uint64FromInt64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { + return Uint64FromInt64(cnt) } cnt = Tssize_t(uint64(cnt) - (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len) (*TFILE)(unsafe.Pointer(f)).Frpos = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -135832,7 +135830,7 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { Fiov_base: (*TFILE)(unsafe.Pointer(f)).Fwbase, - Fiov_len: uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), + Fiov_len: Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), }, 1: { Fiov_base: buf, @@ -135843,8 +135841,8 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) rem = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len + (*(*Tiovec)(unsafe.Pointer(iov + 1*16))).Fiov_len iovcnt = int32(2) for { - cnt = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) - if uint64(cnt) == rem { + cnt = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) + if Uint64FromInt64(cnt) == rem { (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v2 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fwbase = v2 @@ -135865,14 +135863,14 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) } return v5 } - rem -= uint64(cnt) - if uint64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { + rem -= Uint64FromInt64(cnt) + if Uint64FromInt64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { cnt = Tssize_t(uint64(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len) iov += 16 iovcnt-- } (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base + uintptr(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= uint64(cnt) + (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= Uint64FromInt64(cnt) goto _1 _1: } @@ -135976,7 +135974,7 @@ func X__uflow(tls *TLS, f uintptr) (r int32) { defer tls.Free(16) var _ /* c at bp+0 */ uint8 if !(X__toread(tls, f) != 0) && (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fread})))(tls, f, bp, uint64(1)) == uint64(1) { - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } return -int32(1) } @@ -136007,7 +136005,7 @@ func Xclearerr(tls *TLS, f uintptr) { v1 = 0 } __need_unlock = v1 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -136113,7 +136111,7 @@ func X__fpending(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__fpurge(tls *TLS, f uintptr) (r int32) { @@ -136157,7 +136155,7 @@ func X__freadahead(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { @@ -136168,7 +136166,7 @@ func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { if (*TFILE)(unsafe.Pointer(f)).Frpos == (*TFILE)(unsafe.Pointer(f)).Frend { return uintptr(0) } - *(*Tsize_t)(unsafe.Pointer(sizep)) = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + *(*Tsize_t)(unsafe.Pointer(sizep)) = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) return (*TFILE)(unsafe.Pointer(f)).Frpos } @@ -136417,7 +136415,7 @@ _2: v5 = f + 8 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, f) } @@ -136476,7 +136474,7 @@ func Xfgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -136512,27 +136510,27 @@ func Xfgetln(tls *TLS, f uintptr, plen uintptr) (r uintptr) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } Xungetc(tls, v2, f) if v6 = (*TFILE)(unsafe.Pointer(f)).Frend != 0; v6 { - v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) z = v5 } if v6 && v5 != 0 { ret = (*TFILE)(unsafe.Pointer(f)).Frpos z++ v7 = z - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(int64(v7) - int64(ret)) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(int64(v7) - int64(ret)) (*TFILE)(unsafe.Pointer(f)).Frpos = z } else { *(*[1]Tsize_t)(unsafe.Pointer(bp)) = [1]Tsize_t{} v8 = Xgetline(tls, f+168, bp, f) l = v8 if v8 > 0 { - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(l) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(l) ret = (*TFILE)(unsafe.Pointer(f)).Fgetln_buf } } @@ -136590,17 +136588,17 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { n-- for n != 0 { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v2 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v2 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v2) - if k < uint64(n) { + k = Uint64FromInt64(v2) + if k < Uint64FromInt32(n) { v3 = k } else { - v3 = uint64(n) + v3 = Uint64FromInt32(n) } k = v3 Xmemcpy(tls, p, (*TFILE)(unsafe.Pointer(f)).Frpos, k) @@ -136615,7 +136613,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -136628,11 +136626,11 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { break } n-- - v8 = uint8(c) + v8 = Uint8FromInt32(c) v9 = p p++ *(*uint8)(unsafe.Pointer(v9)) = v8 - if int32(v8) == int32('\n') { + if Int32FromUint8(v8) == int32('\n') { break } } @@ -136665,27 +136663,27 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { _, _, _, _, _, _, _ = c, first, l, v1, v2, v3, v4 /* Convert character from buffer if possible */ if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - l = uint64(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) + l = Uint64FromInt32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) if l+uint64(1) >= uint64(1) { *(*uintptr)(unsafe.Pointer(f + 8)) += uintptr(l + BoolUint64(!(l != 0))) /* l==0 means 1 byte, null */ - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } /* Convert character byte-by-byte */ *(*Tmbstate_t)(unsafe.Pointer(bp + 8)) = Tmbstate_t{} first = int32(1) - for cond := true; cond; cond = l == uint64(-Int32FromInt32(2)) { + for cond := true; cond; cond = l == Uint64FromInt32(-Int32FromInt32(2)) { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } v1 = v2 c = v1 - *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(v1) + *(*uint8)(unsafe.Pointer(bp + 16)) = Uint8FromInt32(v1) if c < 0 { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) @@ -136694,16 +136692,16 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { return uint32(0xffffffff) } l = Xmbrtowc(tls, bp, bp+16, uint64(1), bp+8) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - Xungetc(tls, int32(*(*uint8)(unsafe.Pointer(bp + 16))), f) + Xungetc(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 16))), f) } return uint32(0xffffffff) } first = 0 } - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { @@ -136721,9 +136719,9 @@ func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - wc = int32(___fgetwc_unlocked_internal(tls, f)) + wc = Int32FromUint32(___fgetwc_unlocked_internal(tls, f)) *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(wc) + return Uint32FromInt32(wc) } func Xfgetwc(tls *TLS, f uintptr) (r Twint_t) { @@ -136794,7 +136792,7 @@ func Xfgetws(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { } v4 = p p += 4 - *(*Twchar_t)(unsafe.Pointer(v4)) = int32(c) + *(*Twchar_t)(unsafe.Pointer(v4)) = Int32FromUint32(c) if c == uint32('\n') { break } @@ -136891,7 +136889,7 @@ func _mseek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -136905,13 +136903,13 @@ _1: 1: (*Tcookie)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) - if off < -base || off > int64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + if off < -base || off > Int64FromUint64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _mread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -136945,7 +136943,7 @@ func _mwrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2, rem Tsize_t _, _, _ = c, len2, rem c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _mwrite(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwpos, len2) < len2 { @@ -136989,11 +136987,11 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { var v3 Tsize_t _, _, _, _, _ = f, plus, v1, v2, v3 plus = BoolInt32(!!(Xstrchr(tls, mode, int32('+')) != 0)) - if !(Xstrchr(tls, __ccgo_ts+1543, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1543, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } - if !(buf != 0) && size > uint64(Int64FromInt64(INT64_MAX)) { + if !(buf != 0) && size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -137018,19 +137016,19 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { } (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fbuf = buf (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fsize = size - (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = int32(*(*uint8)(unsafe.Pointer(mode))) + (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) if !(plus != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = size } else { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { v3 = Xstrnlen(tls, buf, size) (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fpos = v3 (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = v3 @@ -137059,13 +137057,13 @@ func Xfopen(tls *TLS, filename uintptr, mode uintptr) (r uintptr) { var fd, flags int32 _, _, _ = f, fd, flags /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1543, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1543, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } /* Compute the flags to pass to open() */ flags = X__fmodeflags(tls, mode) - fd = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) if fd < 0 { return uintptr(0) } @@ -137110,8 +137108,8 @@ func _cookieread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { if ret <= 0 { goto bail } - readlen += uint64(ret) - remain -= uint64(ret) + readlen += Uint64FromInt64(ret) + remain -= Uint64FromInt64(ret) } if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) || remain > BoolUint64(!!((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0)) { return readlen @@ -137137,7 +137135,7 @@ bail: } else { v4 = int32(F_ERR) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v4) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v4) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Frend = v5 (*TFILE)(unsafe.Pointer(f)).Frpos = v5 @@ -137150,7 +137148,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var ret Tssize_t _, _, _, _, _ = fc, len2, ret, v1, v2 fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if !((*Tfcookie)(unsafe.Pointer(fc)).Fiofuncs.Fwrite != 0) { return len1 } @@ -137170,7 +137168,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) return uint64(0) } - return uint64(ret) + return Uint64FromInt64(ret) } func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { @@ -137181,7 +137179,7 @@ func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { var res int32 _, _ = fc, res fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - if uint32(whence) > uint32(2) { + if Uint32FromInt32(whence) > uint32(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -137215,7 +137213,7 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun var v2 int32 _, _, _ = f, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1543, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1543, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -137229,12 +137227,12 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun Xmemset(tls, f, 0, uint64(232)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } /* Set up our fcookie */ (*Tcookie_FILE)(unsafe.Pointer(f)).Ffc.Fcookie = cookie @@ -137285,15 +137283,15 @@ _2: if v1 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v4 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v4 = Uint8FromInt32(c) v6 = f + 40 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ *(*uint8)(unsafe.Pointer(v5)) = v4 - v3 = int32(v4) + v3 = Int32FromUint8(v4) } else { - v3 = X__overflow(tls, f, int32(uint8(c))) + v3 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v3 v7 = f + 140 @@ -137348,15 +137346,15 @@ func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -137405,16 +137403,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - if BoolInt32(uint32(c) < uint32(128)) != 0 { - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if BoolInt32(Uint32FromInt32(c) < uint32(128)) != 0 { + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v1 } else { @@ -137427,16 +137425,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } } else { l = Xwctomb(tls, bp, c) - if l < 0 || X__fwritex(tls, bp, uint64(l), f) < uint64(l) { + if l < 0 || X__fwritex(tls, bp, Uint64FromInt32(l), f) < Uint64FromInt32(l) { c = Int32FromUint32(0xffffffff) } } } - if uint32(c) == uint32(0xffffffff) { + if Uint32FromInt32(c) == uint32(0xffffffff) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137452,11 +137450,11 @@ func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { v1 = 0 } __need_unlock = v1 - c = int32(X__fputwc_unlocked(tls, c, f)) + c = Int32FromUint32(X__fputwc_unlocked(tls, c, f)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137521,7 +137519,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { ___unlockfile(tls, f) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return int32(l) /* 0 or -1 */ + return Int32FromUint64(l) /* 0 or -1 */ } func Xfputws_unlocked(tls *TLS, _ws uintptr, f uintptr) (r int32) { @@ -137557,8 +137555,8 @@ func Xfread(tls *TLS, destv uintptr, size Tsize_t, nmemb Tsize_t, f uintptr) (r *(*int32)(unsafe.Pointer(f + 136)) |= (*TFILE)(unsafe.Pointer(f)).Fmode - int32(1) if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { /* First exhaust the buffer. */ - if uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { - v2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + if Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { + v2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) } else { v2 = l } @@ -137634,7 +137632,7 @@ func Xfreopen(tls *TLS, filename uintptr, mode uintptr, f uintptr) (r uintptr) { X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } fl &= ^(Int32FromInt32(O_CREAT) | Int32FromInt32(O_EXCL) | Int32FromInt32(O_CLOEXEC)) - if X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { goto fail } } else { @@ -137732,7 +137730,7 @@ func X__fseeko_unlocked(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32) v3 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v3 (*TFILE)(unsafe.Pointer(f)).Frpos = v3 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) return 0 } @@ -138038,14 +138036,14 @@ func X__fwritex(tls *TLS, s uintptr, l Tsize_t, f uintptr) (r Tsize_t) { if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return uint64(0) } - if l > uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { + if l > Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { return (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, s, l) } if (*TFILE)(unsafe.Pointer(f)).Flbf >= 0 { /* Match /^(.*\n|)/ */ i = l for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { break } goto _1 @@ -138149,7 +138147,7 @@ _2: v5 = f + 8 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, f) } @@ -138208,7 +138206,7 @@ func Xgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138241,7 +138239,7 @@ func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -138285,7 +138283,7 @@ _2: v5 = f + 8 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, f) } @@ -138344,7 +138342,7 @@ func Xgetchar(tls *TLS) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138369,7 +138367,7 @@ func Xgetchar_unlocked(tls *TLS) (r int32) { v3 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -138408,13 +138406,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize } for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v3 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v3 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v3) + k = Uint64FromInt64(v3) } else { z = uintptr(0) k = uint64(0) @@ -138458,7 +138456,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -138479,13 +138477,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) - *(*uint8)(unsafe.Pointer(v8)) = uint8(c) + *(*uint8)(unsafe.Pointer(v8)) = Uint8FromInt32(c) } else { - v10 = uint8(c) + v10 = Uint8FromInt32(c) v11 = i i++ *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)) + uintptr(v11))) = v10 - if int32(v10) == delim { + if Int32FromUint8(v10) == delim { break } } @@ -138496,7 +138494,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize if __need_unlock != 0 { ___unlockfile(tls, f) } - return int64(i) + return Int64FromUint64(i) } func X__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t) { @@ -138536,7 +138534,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { v5 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -138547,7 +138545,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { } v6 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = Uint8FromInt32(c) } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) if c != int32('\n') && (!((*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdin_FILE)))).Fflags&Uint32FromInt32(F_EOF) != 0) || !(i != 0)) { @@ -138660,7 +138658,7 @@ func _ms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -138674,13 +138672,13 @@ _1: 1: (*Tcookie1)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie1)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > int64(0x7fffffffffffffff)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie1)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -138688,7 +138686,7 @@ func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _ms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -138794,7 +138792,7 @@ func _wms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -138808,14 +138806,14 @@ _1: 1: (*Tcookie2)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie2)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)-base { goto fail } Xmemset(tls, c+48, 0, uint64(8)) - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie2)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -138826,7 +138824,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _wms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -138835,7 +138833,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { } if len1+(*Tcookie2)(unsafe.Pointer(c)).Fpos >= (*Tcookie2)(unsafe.Pointer(c)).Fspace { len2 = uint64(2)*(*Tcookie2)(unsafe.Pointer(c)).Fspace + uint64(1) | ((*Tcookie2)(unsafe.Pointer(c)).Fpos + len1 + uint64(1)) - if len2 > uint64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { + if len2 > Uint64FromInt64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { return uint64(0) } newbuf = Xrealloc(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf, len2*uint64(4)) @@ -138849,7 +138847,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { (*Tcookie2)(unsafe.Pointer(c)).Fspace = len2 } len2 = Xmbsnrtowcs(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf+uintptr((*Tcookie2)(unsafe.Pointer(c)).Fpos)*4, bp, len1, (*Tcookie2)(unsafe.Pointer(c)).Fspace-(*Tcookie2)(unsafe.Pointer(c)).Fpos, c+48) - if len2 == uint64(-Int32FromInt32(1)) { + if len2 == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } *(*Tsize_t)(unsafe.Pointer(c + 16)) += len2 @@ -138935,7 +138933,7 @@ func Xpclose(tls *TLS, f uintptr) (r1 int32) { } } if r < 0 { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } return *(*int32)(unsafe.Pointer(bp)) } @@ -139005,15 +139003,15 @@ _2: if v1 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v4 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v4 = Uint8FromInt32(c) v6 = f + 40 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ *(*uint8)(unsafe.Pointer(v5)) = v4 - v3 = int32(v4) + v3 = Int32FromUint8(v4) } else { - v3 = X__overflow(tls, f, int32(uint8(c))) + v3 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v3 v7 = f + 140 @@ -139068,15 +139066,15 @@ func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139104,15 +139102,15 @@ func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139151,15 +139149,15 @@ _2: if v1 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v4 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v4 = Uint8FromInt32(c) v6 = f + 40 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ *(*uint8)(unsafe.Pointer(v5)) = v4 - v3 = int32(v4) + v3 = Int32FromUint8(v4) } else { - v3 = X__overflow(tls, f, int32(uint8(c))) + v3 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v3 v7 = f + 140 @@ -139214,15 +139212,15 @@ func Xputchar(tls *TLS, c1 int32) (r int32) { v2 = uintptr(unsafe.Pointer(&X__stdout_FILE)) l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139242,15 +139240,15 @@ func Xputchar_unlocked(tls *TLS, c int32) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v2 = Uint8FromInt32(c) v4 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(c))) + v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139272,15 +139270,15 @@ func Xputs(tls *TLS, s uintptr) (r1 int32) { } __need_unlock = v1 if v6 = Xfputs(tls, s, uintptr(unsafe.Pointer(&X__stdout_FILE))) < 0; !v6 { - if int32(uint8(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v3 = uint8(Int32FromUint8('\n')) + if Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v3 = Uint8FromInt32(Int32FromUint8('\n')) v5 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ *(*uint8)(unsafe.Pointer(v4)) = v3 - v2 = int32(v3) + v2 = Int32FromUint8(v3) } else { - v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(Int32FromUint8('\n')))) + v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n')))) } } r = -BoolInt32(v6 || v2 < 0) @@ -139298,7 +139296,7 @@ func Xputw(tls *TLS, _x int32, f uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) *(*int32)(unsafe.Pointer(bp)) = _x - return int32(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) + return Int32FromUint64(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) } func Xputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -139336,7 +139334,7 @@ func Xremove(tls *TLS, path uintptr) (r1 int32) { if r == -int32(EISDIR) { r = int32(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(AT_REMOVEDIR)))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { @@ -139344,7 +139342,7 @@ func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { trc("tls=%v old=%v new1=%v, (%v:)", tls, old, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_renameat2), int64(-Int32FromInt32(100)), int64(old), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_renameat2), int64(-Int32FromInt32(100)), int64(old), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) } func Xrewind(tls *TLS, f uintptr) { @@ -139360,7 +139358,7 @@ func Xrewind(tls *TLS, f uintptr) { } __need_unlock = v1 X__fseeko_unlocked(tls, f, 0, 0) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -139635,7 +139633,7 @@ func Xtmpfile(tls *TLS) (r uintptr) { break } ___randname(tls, bp+uintptr(13)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) if fd >= 0 { X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(bp), int64(Int32FromInt32(0))) f = X__fdopen(tls, fd, __ccgo_ts+1622) @@ -139719,12 +139717,12 @@ func Xungetc(tls *TLS, c int32, f uintptr) (r int32) { v3 = f + 8 *(*uintptr)(unsafe.Pointer(v3))-- v2 = *(*uintptr)(unsafe.Pointer(v3)) - *(*uint8)(unsafe.Pointer(v2)) = uint8(c) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(c) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(uint8(c)) + return Int32FromUint8(Uint8FromInt32(c)) } func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { @@ -139756,7 +139754,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { X__toread(tls, f) } if v3 = !((*TFILE)(unsafe.Pointer(f)).Frpos != 0) || c == uint32(0xffffffff); !v3 { - v2 = int32(Xwcrtomb(tls, bp, int32(c), uintptr(0))) + v2 = Int32FromUint64(Xwcrtomb(tls, bp, Int32FromUint32(c), uintptr(0))) l = v2 } if v3 || v2 < 0 || (*TFILE)(unsafe.Pointer(f)).Frpos < (*TFILE)(unsafe.Pointer(f)).Fbuf-uintptr(UNGET)+uintptr(l) { @@ -139774,9 +139772,9 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { } else { p6 = f + 8 *(*uintptr)(unsafe.Pointer(p6)) -= uintptr(l) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint64(l)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, Uint64FromInt32(l)) } - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -139798,13 +139796,13 @@ func Xvasprintf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32) { l = Xvsnprintf(tls, uintptr(0), uint64(0), fmt, ap2) _ = ap2 if v2 = l < 0; !v2 { - v1 = Xmalloc(tls, uint64(uint32(l)+uint32(1))) + v1 = Xmalloc(tls, uint64(Uint32FromInt32(l)+uint32(1))) *(*uintptr)(unsafe.Pointer(s)) = v1 } if v2 || !(v1 != 0) { return -int32(1) } - return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(uint32(l)+uint32(1)), fmt, ap) + return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(Uint32FromInt32(l)+uint32(1)), fmt, ap) } func Xvdprintf(tls *TLS, fd int32, fmt uintptr, ap Tva_list) (r int32) { @@ -139984,33 +139982,33 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -140032,18 +140030,18 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { var v1 uint64 var _ /* pad at bp+0 */ [256]uint8 _ = v1 - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { return } l = w - l - if uint64(l) > uint64(256) { + if Uint64FromInt32(l) > uint64(256) { v1 = uint64(256) } else { - v1 = uint64(l) + v1 = Uint64FromInt32(l) } - Xmemset(tls, bp, int32(c), v1) + Xmemset(tls, bp, Int32FromUint8(c), v1) for { - if !(uint64(l) >= uint64(256)) { + if !(Uint64FromInt32(l) >= uint64(256)) { break } _out(tls, f, bp, uint64(256)) @@ -140052,7 +140050,7 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { ; l = int32(uint64(l) - Uint64FromInt64(256)) } - _out(tls, f, bp, uint64(l)) + _out(tls, f, bp, Uint64FromInt32(l)) } var _xdigits1 = [16]uint8{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} @@ -140066,7 +140064,7 @@ func _fmt_x(tls *TLS, x Tuintmax_t, s uintptr, lower int32) (r uintptr) { } s-- v2 = s - *(*uint8)(unsafe.Pointer(v2)) = uint8(int32(_xdigits1[x&uint64(15)]) | lower) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x&uint64(15)]) | lower) goto _1 _1: ; @@ -140159,13 +140157,13 @@ func _fmt_fp(tls *TLS, f uintptr, y float64, w int32, p int32, fl int32, t int32 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: - if int32(v1>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v1>>Int32FromInt32(63)) != 0 { y = -y } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { prefix += uintptr(3) } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { prefix += uintptr(6) } else { prefix++ @@ -140192,10 +140190,10 @@ _4: } s1 = v6 } - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) - _out(tls, f, prefix, uint64(pl)) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) + _out(tls, f, prefix, Uint64FromInt32(pl)) _out(tls, f, s1, uint64(3)) - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > int32(3)+pl { v7 = w } else { @@ -140228,7 +140226,7 @@ _4: } round *= Float64FromInt32(16) } - if int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { y = -y y -= round y += round @@ -140243,7 +140241,7 @@ _4: } else { v9 = *(*int32)(unsafe.Pointer(bp + 512)) } - estr = _fmt_u(tls, uint64(v9), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v9), ebuf) if estr == ebuf { estr-- v10 = estr @@ -140256,18 +140254,18 @@ _4: } else { v12 = int32('+') } - *(*uint8)(unsafe.Pointer(v11)) = uint8(v12) + *(*uint8)(unsafe.Pointer(v11)) = Uint8FromInt32(v12) estr-- v13 = estr - *(*uint8)(unsafe.Pointer(v13)) = uint8(t + (Int32FromUint8('p') - Int32FromUint8('a'))) + *(*uint8)(unsafe.Pointer(v13)) = Uint8FromInt32(t + (Int32FromUint8('p') - Int32FromUint8('a'))) s = bp + 516 for cond := true; cond; cond = y != 0 { x = int32(y) v14 = s s++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32(_xdigits1[x]) | t&int32(32)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x]) | t&int32(32)) y = Float64FromInt32(16) * (y - float64(x)) - if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { v15 = s s++ *(*uint8)(unsafe.Pointer(v15)) = uint8('.') @@ -140282,12 +140280,12 @@ _4: l = int32(int64(s) - t__predefined_ptrdiff_t(bp+516) + (int64(ebuf) - int64(estr))) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) - _out(tls, f, bp+516, uint64(int64(s)-t__predefined_ptrdiff_t(bp+516))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, bp+516, Uint64FromInt64(int64(s)-t__predefined_ptrdiff_t(bp+516))) _pad3(tls, f, uint8('0'), int32(int64(l)-(int64(ebuf)-int64(estr))-(int64(s)-t__predefined_ptrdiff_t(bp+516))), 0, 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v16 = w } else { @@ -140360,15 +140358,15 @@ _4: v25 = -*(*int32)(unsafe.Pointer(bp + 512)) } sh1 = v25 - need = int32(uint32(1) + (uint32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) + need = Int32FromUint32(uint32(1) + (Uint32FromInt32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) d = a for { if !(d < z) { break } - rm = *(*Tuint32_t)(unsafe.Pointer(d)) & uint32(int32(1)<>sh1 + carry1 - carry1 = uint32(Int32FromInt32(1000000000)>>sh1) * rm + carry1 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh1) * rm goto _26 _26: ; @@ -140398,7 +140396,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _29 @@ -140429,30 +140427,30 @@ _4: i *= int32(10) j++ } - x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(i) + x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % Uint32FromInt32(i) /* Are there any significant digits past j? */ if x2 != 0 || d+uintptr(1)*4 != z { round1 = Float64FromInt32(2) / Float64FromFloat64(2.22044604925031308085e-16) - if *(*Tuint32_t)(unsafe.Pointer(d))/uint32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { + if *(*Tuint32_t)(unsafe.Pointer(d))/Uint32FromInt32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { round1 += Float64FromInt32(2) } - if x2 < uint32(i/int32(2)) { + if x2 < Uint32FromInt32(i/int32(2)) { small = Float64FromFloat64(0.5) } else { - if x2 == uint32(i/int32(2)) && d+uintptr(1)*4 == z { + if x2 == Uint32FromInt32(i/int32(2)) && d+uintptr(1)*4 == z { small = Float64FromFloat64(1) } else { small = Float64FromFloat64(1.5) } } - if pl != 0 && int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if pl != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { round1 *= float64(-Int32FromInt32(1)) small *= float64(-Int32FromInt32(1)) } *(*Tuint32_t)(unsafe.Pointer(d)) -= x2 /* Decide whether to round by probing round+small */ if round1+small != round1 { - *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + uint32(i) + *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + Uint32FromInt32(i) for *(*Tuint32_t)(unsafe.Pointer(d)) > uint32(999999999) { v31 = d d -= 4 @@ -140467,7 +140465,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _33 @@ -140502,13 +140500,13 @@ _4: t -= int32(2) p-- } - if !(uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if !(Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { /* Count trailing zeros in last place */ if z > a && *(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4)) != 0 { i = int32(10) j = Int32FromInt32(0) for { - if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%uint32(i) == uint32(0)) { + if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%Uint32FromInt32(i) == uint32(0)) { break } goto _35 @@ -140557,10 +140555,10 @@ _4: } } } - if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { return -int32(1) } - l = int32(1) + p + BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) + l = int32(1) + p + BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) if t|int32(32) == int32('f') { if e > int32(INT_MAX)-l { return -int32(1) @@ -140574,7 +140572,7 @@ _4: } else { v42 = e } - estr = _fmt_u(tls, uint64(v42), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v42), ebuf) for int64(ebuf)-int64(estr) < int64(2) { estr-- v43 = estr @@ -140587,10 +140585,10 @@ _4: } else { v45 = int32('+') } - *(*uint8)(unsafe.Pointer(v44)) = uint8(v45) + *(*uint8)(unsafe.Pointer(v44)) = Uint8FromInt32(v45) estr-- v46 = estr - *(*uint8)(unsafe.Pointer(v46)) = uint8(t) + *(*uint8)(unsafe.Pointer(v46)) = Uint8FromInt32(t) if int64(ebuf)-int64(estr) > int64(int32(INT_MAX)-l) { return -int32(1) } @@ -140600,8 +140598,8 @@ _4: return -int32(1) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) if t|int32(32) == int32('f') { if a > r { a = r @@ -140625,13 +140623,13 @@ _4: *(*uint8)(unsafe.Pointer(v49)) = uint8('0') } } - _out(tls, f, s2, uint64(int64(bp+516+uintptr(9))-int64(s2))) + _out(tls, f, s2, Uint64FromInt64(int64(bp+516+uintptr(9))-int64(s2))) goto _47 _47: ; d += 4 } - if p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+607, uint64(1)) } for { @@ -140649,7 +140647,7 @@ _4: } else { v52 = p } - _out(tls, f, s3, uint64(v52)) + _out(tls, f, s3, Uint64FromInt32(v52)) goto _50 _50: ; @@ -140682,7 +140680,7 @@ _4: v56 = s4 s4++ _out(tls, f, v56, uint64(1)) - if p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+607, uint64(1)) } } @@ -140691,7 +140689,7 @@ _4: } else { v57 = int64(p) } - _out(tls, f, s4, uint64(v57)) + _out(tls, f, s4, Uint64FromInt64(v57)) p = int32(int64(p) - (int64(bp+516+UintptrFromInt32(9)) - int64(s4))) goto _53 _53: @@ -140699,9 +140697,9 @@ _4: d += 4 } _pad3(tls, f, uint8('0'), p+int32(18), int32(18), 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) } - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v58 = w } else { @@ -140718,10 +140716,10 @@ func _getint(tls *TLS, s uintptr) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { - i = int32(10)*i + (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) + i = int32(10)*i + (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) } goto _1 _1: @@ -140766,7 +140764,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Handle literal text and %% format specifiers */ a = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { break } goto _2 @@ -140776,7 +140774,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } z = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { break } goto _3 @@ -140790,14 +140788,14 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32(int64(z) - int64(a)) if f != 0 { - _out(tls, f, a, uint64(l)) + _out(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) - argpos = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') + argpos = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { argpos = -int32(1) @@ -140806,24 +140804,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { + if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { break } - fl |= uint32(1) << (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) + fl |= uint32(1) << (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) goto _4 _4: ; *(*uintptr)(unsafe.Pointer(bp))++ } /* Read field width */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) w = Int32FromInt32(0) } else { - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { @@ -140851,13 +140849,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } /* Read precision */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) p = Int32FromInt32(0) } else { - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(4) } else { @@ -140875,7 +140873,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } xp = BoolInt32(p >= 0) } else { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { *(*uintptr)(unsafe.Pointer(bp))++ p = _getint(tls, bp) xp = int32(1) @@ -140887,13 +140885,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st v8 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ - st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(int32(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) + st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) } if !(st != 0) { goto inval @@ -140906,13 +140904,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { if argpos >= 0 { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) } else { *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } } else { if f != 0 { - _pop_arg(tls, bp+8, int32(st), ap) + _pop_arg(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -140928,7 +140926,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, z = bp + 16 + uintptr(24) prefix = __ccgo_ts + 1656 pl = 0 - t = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) /* Transform ls,lc -> S,C */ if ps != 0 && t&int32(15) == int32(3) { t &= ^Int32FromInt32(32) @@ -140992,24 +140990,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) break } goto _1 _10: ; - if uint64(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { - v31 = uint64(p) + if Uint64FromInt32(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { + v31 = Uint64FromInt32(p) } else { v31 = Uint64FromInt32(2) * Uint64FromInt64(8) } - p = int32(v31) + p = Int32FromUint64(v31) t = int32('x') fl |= Uint32FromUint32(1) << (Int32FromUint8('#') - Int32FromUint8(' ')) _12: @@ -141040,7 +141038,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, _14: ; pl = int32(1) - if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > uint64(Int64FromInt64(INT64_MAX)) { + if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) = -*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { if fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { @@ -141111,7 +141109,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v40 = p } - z = a + uintptr(Xstrnlen(tls, a, uint64(v40))) + z = a + uintptr(Xstrnlen(tls, a, Uint64FromInt32(v40))) if p < 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -141123,7 +141121,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if !(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0) { goto narrow_c } - (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) + (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[int32(1)] = 0 *(*uintptr)(unsafe.Pointer(bp + 8)) = bp + 40 p = -int32(1) @@ -141132,21 +141130,21 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, ws = *(*uintptr)(unsafe.Pointer(bp + 8)) v42 = Int32FromInt32(0) l = v42 - i = uint64(v42) + i = Uint64FromInt32(v42) for { - if v45 = i < uint64(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { + if v45 = i < Uint64FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { v44 = ws ws += 4 v43 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v44))) l = v43 } - if !(v45 && v43 >= 0 && uint64(l) <= uint64(p)-i) { + if !(v45 && v43 >= 0 && Uint64FromInt32(l) <= Uint64FromInt32(p)-i) { break } goto _41 _41: ; - i += uint64(l) + i += Uint64FromInt32(l) } if l < 0 { return -int32(1) @@ -141154,27 +141152,27 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if i > uint64(INT_MAX) { goto overflow } - p = int32(i) - _pad3(tls, f, uint8(' '), w, p, int32(fl)) + p = Int32FromUint64(i) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl)) ws = *(*uintptr)(unsafe.Pointer(bp + 8)) i = uint64(0) for { - if v49 = i < uint64(0+uint32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { + if v49 = i < uint64(0+Uint32FromInt32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { v48 = ws ws += 4 v47 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v48))) l = v47 } - if !(v49 && i+uint64(v47) <= uint64(p)) { + if !(v49 && i+Uint64FromInt32(v47) <= Uint64FromInt32(p)) { break } - _out(tls, f, bp+48, uint64(l)) + _out(tls, f, bp+48, Uint64FromInt32(l)) goto _46 _46: ; - i += uint64(l) + i += Uint64FromInt32(l) } - _pad3(tls, f, uint8(' '), w, p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > p { v50 = w } else { @@ -141201,7 +141199,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if xp != 0 && p < 0 { goto overflow } - l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, int32(fl), t) + l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, Int32FromUint32(fl), t) if l < 0 { goto overflow } @@ -141220,12 +141218,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w > int32(INT_MAX)-cnt { goto overflow } - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl)) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl)) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) _pad3(tls, f, uint8('0'), p, int32(int64(z)-int64(a)), 0) - _out(tls, f, a, uint64(int64(z)-int64(a))) - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, a, Uint64FromInt64(int64(z)-int64(a))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 _1: @@ -141300,8 +141298,8 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v1 = 0 } __need_unlock = v1 - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) { saved_buf = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fbuf = bp + 128 @@ -141333,7 +141331,7 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -141356,13 +141354,13 @@ func _store_int(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -141429,14 +141427,14 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - v3 = int32(*(*uint8)(unsafe.Pointer(p))) - v4 = BoolInt32(v3 == int32(' ') || uint32(v3)-uint32('\t') < uint32(5)) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v4 = BoolInt32(v3 == int32(' ') || Uint32FromInt32(v3)-uint32('\t') < uint32(5)) goto _5 _5: if v4 != 0 { for { - v6 = int32(*(*uint8)(unsafe.Pointer(p + 1))) - v7 = BoolInt32(v6 == int32(' ') || uint32(v6)-uint32('\t') < uint32(5)) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) + v7 = BoolInt32(v6 == int32(' ') || Uint32FromInt32(v6)-uint32('\t') < uint32(5)) goto _8 _8: if !(v7 != 0) { @@ -141450,12 +141448,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } v12 = v9 - v13 = BoolInt32(v12 == int32(' ') || uint32(v12)-uint32('\t') < uint32(5)) + v13 = BoolInt32(v12 == int32(' ') || Uint32FromInt32(v12)-uint32('\t') < uint32(5)) goto _14 _14: if !(v13 != 0) { @@ -141468,23 +141466,23 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { pos += (*TFILE)(unsafe.Pointer(f)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(f)).Frpos) - int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) goto _2 } - if int32(*(*uint8)(unsafe.Pointer(p))) != int32('%') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32('%') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { X__shlim(tls, f, int64(Int32FromInt32(0))) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('%') { p++ for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Fshend { v19 = f + 8 v18 = *(*uintptr)(unsafe.Pointer(v19)) *(*uintptr)(unsafe.Pointer(v19))++ - v17 = int32(*(*uint8)(unsafe.Pointer(v18))) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v18))) } else { v17 = X__shgetc(tls, f) } v16 = v17 c = v16 v20 = v16 - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: if !(v21 != 0) { @@ -141496,13 +141494,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ - v23 = int32(*(*uint8)(unsafe.Pointer(v24))) + v23 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v24))) } else { v23 = X__shgetc(tls, f) } c = v23 } - if c != int32(*(*uint8)(unsafe.Pointer(p))) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -141515,12 +141513,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto _2 } p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('*') { dest = uintptr(0) p++ } else { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { - dest = _arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { + dest = _arg_n(tls, ap, Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) p += uintptr(2) } else { dest = VaUintptr(&ap) @@ -141531,13 +141529,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } - width = int32(10)*width + int32(*(*uint8)(unsafe.Pointer(p))) - int32('0') + width = int32(10)*width + Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) - int32('0') goto _27 _27: ; p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('m') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('m') { wcs = uintptr(0) s = uintptr(0) alloc = BoolInt32(!!(dest != 0)) @@ -141548,16 +141546,16 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { size = SIZE_def v28 = p p++ - switch int32(*(*uint8)(unsafe.Pointer(v28))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) { case int32('h'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('h') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('h') { p++ size = -Int32FromInt32(2) } else { size = -int32(1) } case int32('l'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('l') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('l') { p++ size = Int32FromInt32(SIZE_ll) } else { @@ -141616,7 +141614,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*uint8)(unsafe.Pointer(p))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) /* C or S */ if t&int32(0x2f) == int32(3) { t |= int32(32) @@ -141630,7 +141628,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { fallthrough case int32('['): case int32('n'): - _store_int(tls, dest, size, uint64(pos)) + _store_int(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 default: @@ -141640,12 +141638,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } v32 = v29 - v33 = BoolInt32(v32 == int32(' ') || uint32(v32)-uint32('\t') < uint32(5)) + v33 = BoolInt32(v32 == int32(' ') || Uint32FromInt32(v32)-uint32('\t') < uint32(5)) goto _34 _34: if !(v33 != 0) { @@ -141662,7 +141660,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v38 = f + 8 v37 = *(*uintptr)(unsafe.Pointer(v38)) *(*uintptr)(unsafe.Pointer(v38))++ - v36 = int32(*(*uint8)(unsafe.Pointer(v37))) + v36 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v37))) } else { v36 = X__shgetc(tls, f) } @@ -141731,7 +141729,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { p++ v59 = p - if int32(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { p++ invert = Int32FromInt32(1) } else { @@ -141739,38 +141737,38 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } Xmemset(tls, bp+16, invert, uint64(257)) (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = Uint8FromInt32(Int32FromInt32(1) - invert) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = Uint8FromInt32(Int32FromInt32(1) - invert) } } for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } if !(*(*uint8)(unsafe.Pointer(p)) != 0) { goto fmt_fail } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { v62 = p p++ - c = int32(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) for { - if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + if !(c < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))) { break } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = Uint8FromInt32(int32(1) - invert) goto _61 _61: ; c++ } } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+int32(*(*uint8)(unsafe.Pointer(p)))] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))] = Uint8FromInt32(int32(1) - invert) goto _60 _60: ; @@ -141781,7 +141779,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { s = uintptr(0) i = uint64(0) if t == int32('c') { - v63 = uint32(width) + uint32(1) + v63 = Uint32FromInt32(width) + uint32(1) } else { v63 = uint32(31) } @@ -141801,7 +141799,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v67 = f + 8 v66 = *(*uintptr)(unsafe.Pointer(v67)) *(*uintptr)(unsafe.Pointer(v67))++ - v65 = int32(*(*uint8)(unsafe.Pointer(v66))) + v65 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v66))) } else { v65 = X__shgetc(tls, f) } @@ -141810,11 +141808,11 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !((*(*[257]uint8)(unsafe.Pointer(bp + 16)))[v64+int32(1)] != 0) { break } - *(*uint8)(unsafe.Pointer(bp)) = uint8(c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(c) switch Xmbrtowc(tls, bp+276, bp, uint64(1), bp+8) { - case uint64(-Int32FromInt32(1)): + case Uint64FromInt32(-Int32FromInt32(1)): goto input_fail - case uint64(-Int32FromInt32(2)): + case Uint64FromInt32(-Int32FromInt32(2)): continue } if wcs != 0 { @@ -141845,7 +141843,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v72 = f + 8 v71 = *(*uintptr)(unsafe.Pointer(v72)) *(*uintptr)(unsafe.Pointer(v72))++ - v70 = int32(*(*uint8)(unsafe.Pointer(v71))) + v70 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v71))) } else { v70 = X__shgetc(tls, f) } @@ -141856,7 +141854,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v73 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = Uint8FromInt32(c) if i == k { k += k + uint64(1) tmp1 = Xrealloc(tls, s, k) @@ -141875,7 +141873,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v78 = f + 8 v77 = *(*uintptr)(unsafe.Pointer(v78)) *(*uintptr)(unsafe.Pointer(v78))++ - v76 = int32(*(*uint8)(unsafe.Pointer(v77))) + v76 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v77))) } else { v76 = X__shgetc(tls, f) } @@ -141886,7 +141884,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v79 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = Uint8FromInt32(c) } } else { for { @@ -141894,7 +141892,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v83 = f + 8 v82 = *(*uintptr)(unsafe.Pointer(v83)) *(*uintptr)(unsafe.Pointer(v83))++ - v81 = int32(*(*uint8)(unsafe.Pointer(v82))) + v81 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v82))) } else { v81 = X__shgetc(tls, f) } @@ -141956,7 +141954,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto int_common int_common: ; - x = X__intscan(tls, f, uint32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) + x = X__intscan(tls, f, Uint32FromInt32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) if !((*TFILE)(unsafe.Pointer(f)).Fshcnt+(int64((*TFILE)(unsafe.Pointer(f)).Frpos)-int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) != 0) { goto match_fail } @@ -142161,33 +142159,33 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -142216,7 +142214,7 @@ func _out1(tls *TLS, f uintptr, s uintptr, l Tsize_t) { func _pad4(tls *TLS, f uintptr, n int32, fl int32) { bp := tls.Alloc(32) defer tls.Free(32) - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return } Xfprintf(tls, f, __ccgo_ts+1673, VaList(bp+8, n, __ccgo_ts)) @@ -142227,10 +142225,10 @@ func _getint1(tls *TLS, s uintptr) (r int32) { _ = i i = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { i = int32(10)*i + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - int32('0')) @@ -142312,12 +142310,12 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32((int64(z) - int64(a)) / 4) if f != 0 { - _out1(tls, f, a, uint64(l)) + _out1(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) argpos = *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) - int32('0') *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 @@ -142328,7 +142326,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { + if !(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { break } fl |= uint32(1) << (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) - int32(' ')) @@ -142339,10 +142337,10 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read field width */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*4)) = int32(_INT) - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 } else { if !(l10n != 0) { @@ -142370,9 +142368,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read precision */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('.') && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*4)) = int32(_INT) - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(4) * 4 } else { if !(l10n != 0) { @@ -142401,7 +142399,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -142419,11 +142417,11 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } else { if argpos >= 0 { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) *(*Targ)(unsafe.Pointer(bp + 16)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } else { if f != 0 { - _pop_arg1(tls, bp+16, int32(st), ap) + _pop_arg1(tls, bp+16, Int32FromUint32(st), ap) } else { return 0 } @@ -142450,13 +142448,13 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) break } goto _1 @@ -142466,15 +142464,15 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < int32(1) { w = int32(1) } - _pad4(tls, f, w-int32(1), int32(fl)) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl)) if t == int32('C') { v9 = *(*Tuintmax_t)(unsafe.Pointer(bp + 16)) } else { - v9 = uint64(Xbtowc(tls, int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) + v9 = uint64(Xbtowc(tls, Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) } - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(v9) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint64(v9) _out1(tls, f, bp, uint64(1)) - _pad4(tls, f, w-int32(1), int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('S'): @@ -142484,7 +142482,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v10 = p } - z = a + uintptr(Xwcsnlen(tls, a, uint64(v10)))*4 + z = a + uintptr(Xwcsnlen(tls, a, Uint64FromInt32(v10)))*4 if p < 0 && *(*Twchar_t)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -142492,9 +142490,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) - _out1(tls, f, a, uint64(p)) - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl)) + _out1(tls, f, a, Uint64FromInt32(p)) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('m'): @@ -142537,7 +142535,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) + _pad4(tls, f, w-p, Int32FromUint32(fl)) bs = *(*uintptr)(unsafe.Pointer(bp + 16)) for { v16 = l @@ -142549,14 +142547,14 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, bs += uintptr(i) _out1(tls, f, bp+40, uint64(1)) } - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 } if xp != 0 && p < 0 { goto overflow } - Xsnprintf(tls, bp+24, uint64(16), __ccgo_ts+1677, VaList(bp+56, __ccgo_ts+1697+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1699+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1701+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+711+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1703+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), int32(_sizeprefix[t|int32(32)-int32('a')]), t)) + Xsnprintf(tls, bp+24, uint64(16), __ccgo_ts+1677, VaList(bp+56, __ccgo_ts+1697+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1699+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1701+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+711+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1703+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), Int32FromUint8(_sizeprefix[t|int32(32)-int32('a')]), t)) switch t | Int32FromInt32(32) { case int32('a'): fallthrough @@ -142651,13 +142649,13 @@ func Xvfwprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } __need_unlock = v1 Xfwide(tls, f, int32(1)) - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) ret = _wprintf_core(tls, f, fmt, bp, bp+48, bp+8) if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -142673,13 +142671,13 @@ func _store_int1(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -142787,12 +142785,12 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - if Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { + if Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { p += 4 } for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ @@ -142800,20 +142798,20 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v4 = Xgetwc(tls, f) } - v3 = int32(v4) + v3 = Int32FromUint32(v4) c = v3 - if !(Xiswspace(tls, uint32(v3)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v3)) != 0) { break } pos++ } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) _ = *(*uint8)(unsafe.Pointer(v8)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } goto _2 } @@ -142821,7 +142819,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == int32('%') { p += 4 for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ @@ -142829,15 +142827,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v11 = Xgetwc(tls, f) } - v10 = int32(v11) + v10 = Int32FromUint32(v11) c = v10 - if !(Xiswspace(tls, uint32(v10)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v10)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ @@ -142845,16 +142843,16 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v14 = Xgetwc(tls, f) } - c = int32(v14) + c = Int32FromUint32(v14) } if c != *(*Twchar_t)(unsafe.Pointer(p)) { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v19 = f + 8 *(*uintptr)(unsafe.Pointer(v19))-- v18 = *(*uintptr)(unsafe.Pointer(v19)) _ = *(*uint8)(unsafe.Pointer(v18)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if c < 0 { goto input_fail @@ -142869,8 +142867,8 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { dest = uintptr(0) p += 4 } else { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { - dest = _arg_n1(tls, ap, uint32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { + dest = _arg_n1(tls, ap, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) p += uintptr(2) * 4 } else { dest = VaUintptr(&ap) @@ -142878,7 +142876,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } width = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } width = int32(10)*width + *(*Twchar_t)(unsafe.Pointer(p)) - int32('0') @@ -142975,7 +142973,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if t != int32('n') { if t != int32('[') && t|int32(32) != int32('c') { for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ @@ -142983,15 +142981,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v23 = Xgetwc(tls, f) } - v22 = int32(v23) + v22 = Int32FromUint32(v23) c = v22 - if !(Xiswspace(tls, uint32(v22)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v22)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v28 = f + 8 v27 = *(*uintptr)(unsafe.Pointer(v28)) *(*uintptr)(unsafe.Pointer(v28))++ @@ -142999,23 +142997,23 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v26 = Xgetwc(tls, f) } - c = int32(v26) + c = Int32FromUint32(v26) } if c < 0 { goto input_fail } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v31 = f + 8 *(*uintptr)(unsafe.Pointer(v31))-- v30 = *(*uintptr)(unsafe.Pointer(v31)) _ = *(*uint8)(unsafe.Pointer(v30)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } } switch t { case int32('n'): - _store_int1(tls, dest, size, uint64(pos)) + _store_int1(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 case int32('s'): @@ -143073,7 +143071,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { i = uint64(0) if alloc != 0 { if t == int32('c') { - v35 = uint32(width) + uint32(1) + v35 = Uint32FromInt32(width) + uint32(1) } else { v35 = uint32(31) } @@ -143091,7 +143089,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } } for width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ @@ -143099,7 +143097,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v37 = Xgetwc(tls, f) } - v36 = int32(v37) + v36 = Int32FromUint32(v37) c = v36 if v36 < 0 { break @@ -143130,7 +143128,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if l < 0 { goto input_fail } - i += uint64(l) + i += Uint64FromInt32(l) if alloc != 0 && i > k-uint64(4) { k += k + uint64(1) tmp2 = Xrealloc(tls, s, k) @@ -143146,13 +143144,13 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { gotmatch = int32(1) } if width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v44 = f + 8 *(*uintptr)(unsafe.Pointer(v44))-- v43 = *(*uintptr)(unsafe.Pointer(v44)) _ = *(*uint8)(unsafe.Pointer(v43)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if t == int32('c') || !(gotmatch != 0) { goto match_fail @@ -143337,10 +143335,10 @@ func _sn_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { var v1, v2 uint64 _, _, _, _, _ = c, k, v1, v2, v3 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if (*Tcookie3)(unsafe.Pointer(c)).Fn < uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { + if (*Tcookie3)(unsafe.Pointer(c)).Fn < Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { v1 = (*Tcookie3)(unsafe.Pointer(c)).Fn } else { - v1 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + v1 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) } k = v1 if k != 0 { @@ -143431,7 +143429,7 @@ func _string_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { k = len1 + uint64(256) end = Xmemchr(tls, src, 0, k) if end != 0 { - k = uint64(int64(end) - int64(src)) + k = Uint64FromInt64(int64(end) - int64(src)) } if k < len1 { len1 = k @@ -143482,8 +143480,8 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { l0 = l i = 0 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == uint64(-Int32FromInt32(1)) { - return uint64(-Int32FromInt32(1)) + if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == Uint64FromInt32(-Int32FromInt32(1)) { + return Uint64FromInt32(-Int32FromInt32(1)) } for { if v2 = (*Tcookie4)(unsafe.Pointer(c)).Fl != 0 && l != 0; v2 { @@ -143497,7 +143495,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { i = int32(1) } s += uintptr(i) - l -= uint64(i) + l -= Uint64FromInt32(i) (*Tcookie4)(unsafe.Pointer(c)).Fl-- (*Tcookie4)(unsafe.Pointer(c)).Fws += 4 } @@ -143509,7 +143507,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { (*TFILE)(unsafe.Pointer(f)).Fwbase = v3 (*TFILE)(unsafe.Pointer(f)).Fwpos = v3 *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - return uint64(i) + return Uint64FromInt32(i) } (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -143547,7 +143545,7 @@ func Xvswprintf(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, ap Tva_list) (r1 in } r = Xvfwprintf(tls, bp+272, fmt, ap) _sw_write(tls, bp+272, uintptr(0), uint64(0)) - if uint64(r) >= n { + if Uint64FromInt32(r) >= n { v1 = -int32(1) } else { v1 = r @@ -143567,7 +143565,7 @@ func _wstring_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { return uint64(0) } k = Xwcsrtombs(tls, (*TFILE)(unsafe.Pointer(f)).Fbuf, bp, (*TFILE)(unsafe.Pointer(f)).Fbuf_size, uintptr(0)) - if k == uint64(-Int32FromInt32(1)) { + if k == Uint64FromInt32(-Int32FromInt32(1)) { v1 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v1 (*TFILE)(unsafe.Pointer(f)).Frpos = v1 @@ -143707,8 +143705,8 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143716,7 +143714,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -143727,7 +143725,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int32(10)*n - (int32(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) + n = int32(10)*n - (Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) } if neg != 0 { v5 = n @@ -143749,8 +143747,8 @@ func Xatol(tls *TLS, s uintptr) (r int64) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143758,7 +143756,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -143769,7 +143767,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int64(10)*n - int64(int32(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) + n = int64(10)*n - int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -143791,8 +143789,8 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -143800,7 +143798,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -143811,7 +143809,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int64(10)*n - int64(int32(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) + n = int64(10)*n - int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -143867,16 +143865,16 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, j, v1, v3 int32 var _ /* tmp at bp+0 */ [32]uint8 _, _, _, _ = i, j, v1, v3 - if uint32(n)-uint32(1) > uint32(15) { + if Uint32FromInt32(n)-uint32(1) > uint32(15) { n = int32(15) } Xsprintf(tls, bp, __ccgo_ts+1730, VaList(bp+40, n-int32(1), x)) - v1 = BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) + v1 = BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) *(*int32)(unsafe.Pointer(sign)) = v1 i = v1 j = 0 for { - if !(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { + if !(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { break } _buf8[j] = (*(*[32]uint8)(unsafe.Pointer(bp)))[i] @@ -143885,7 +143883,7 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { ; v3 = i i++ - j += BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) + j += BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) } _buf8[j] = uint8(0) *(*int32)(unsafe.Pointer(dp)) = Xatoi(tls, bp+uintptr(i)+uintptr(1)) + int32(1) @@ -143904,20 +143902,20 @@ func Xfcvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, lz int32 var _ /* tmp at bp+0 */ [1500]uint8 _, _ = i, lz - if uint32(n) > uint32(1400) { + if Uint32FromInt32(n) > uint32(1400) { n = int32(1400) } Xsprintf(tls, bp, __ccgo_ts+1735, VaList(bp+1512, n, x)) - i = BoolInt32(int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) - if int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { - lz = int32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1703)) + i = BoolInt32(Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) + if Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { + lz = Int32FromUint64(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1703)) } else { - lz = -int32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+607)) + lz = -Int32FromUint64(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+607)) } if n <= lz { *(*int32)(unsafe.Pointer(sign)) = i *(*int32)(unsafe.Pointer(dp)) = int32(1) - if uint32(n) > uint32(14) { + if Uint32FromInt32(n) > uint32(14) { n = int32(14) } return __ccgo_ts + 1740 + UintptrFromInt32(14) - uintptr(n) @@ -144022,10 +144020,10 @@ func _pntz(tls *TLS, p uintptr) (r1 int32) { _, _, _ = r, v1, v2 r = _a_ctz_l(tls, *(*Tsize_t)(unsafe.Pointer(p))-uint64(1)) if v2 = r != 0; !v2 { - v1 = int32(Uint64FromInt32(8)*Uint64FromInt64(8) + uint64(_a_ctz_l(tls, *(*Tsize_t)(unsafe.Pointer(p + 1*8))))) + v1 = Int32FromUint64(Uint64FromInt32(8)*Uint64FromInt64(8) + Uint64FromInt32(_a_ctz_l(tls, *(*Tsize_t)(unsafe.Pointer(p + 1*8))))) r = v1 } - if v2 || uint64(v1) != Uint64FromInt32(8)*Uint64FromInt64(8) { + if v2 || Uint64FromInt32(v1) != Uint64FromInt32(8)*Uint64FromInt64(8) { return r } return 0 @@ -144071,25 +144069,25 @@ func _cycle(tls *TLS, width Tsize_t, ar uintptr, n int32) { // // /* shl() and shr() need n > 0 */ func _shl(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = *(*Tsize_t)(unsafe.Pointer(p)) *(*Tsize_t)(unsafe.Pointer(p)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p)) <<= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p)) <<= Uint64FromInt32(n) } func _shr(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p)) = *(*Tsize_t)(unsafe.Pointer(p + 1*8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p)) >>= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p)) >>= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= Uint64FromInt32(n) } func _sift(tls *TLS, head uintptr, width Tsize_t, cmp Tcmpfun, arg uintptr, pshift int32, lp uintptr) { @@ -144207,7 +144205,7 @@ func X__qsort_r(tls *TLS, base uintptr, nel Tsize_t, width Tsize_t, cmp Tcmpfun, _shr(tls, bp+768, int32(2)) pshift += int32(2) } else { - if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= uint64(int64(high)-int64(head)) { + if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= Uint64FromInt64(int64(high)-int64(head)) { _trinkle(tls, head, width, cmp, arg, bp+768, pshift, 0, bp) } else { _sift(tls, head, width, cmp, arg, pshift, bp) @@ -144324,9 +144322,9 @@ func _strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*TFILE)(unsafe.Pointer(bp)).Fbuf = v1 (*TFILE)(unsafe.Pointer(bp)).Frend = uintptr(-Int32FromInt32(1)) X__shlim(tls, bp, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp, uint32(base), int32(1), lim) + y = X__intscan(tls, bp, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -144345,7 +144343,7 @@ func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -144361,7 +144359,7 @@ func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144451,7 +144449,7 @@ func _do_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -144490,14 +144488,14 @@ func _wcstox(tls *TLS, s uintptr, p uintptr, prec int32) (r float64) { (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) y = X__floatscan(tls, bp+64, prec, int32(1)) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -144555,7 +144553,7 @@ func _do_read1(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -144594,14 +144592,14 @@ func _wcstox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read1) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp+64, uint32(base), int32(1), lim) + y = X__intscan(tls, bp+64, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -144625,7 +144623,7 @@ func Xwcstoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -144641,7 +144639,7 @@ func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144722,14 +144720,14 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt _, _, _, _, _, _, _, _, _ = d, k, s, wd, ws, v2, v3, v6, v7 d = dest s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(d)&(Uint64FromInt64(8)-Uint64FromInt32(1)) { for { if v3 = uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v2 } - if !(v3 && int32(v2) != c) { + if !(v3 && Int32FromUint8(v2) != c) { break } goto _1 @@ -144742,11 +144740,11 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 { goto tail } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -144765,7 +144763,7 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt v6 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v6 } - if !(v7 && int32(v6) != c) { + if !(v7 && Int32FromUint8(v6) != c) { break } goto _5 @@ -144804,9 +144802,9 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { var s, w, v4 uintptr _, _, _, _ = k, s, w, v4 s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { - if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _1 @@ -144815,11 +144813,11 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s++ n-- } - if n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c { - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + if n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c { + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -144831,7 +144829,7 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s = w } for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -144859,7 +144857,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { l = vl r = vr for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _1 @@ -144870,7 +144868,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { r++ } if n != 0 { - v2 = int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } else { v2 = 0 } @@ -145232,15 +145230,15 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145375,13 +145373,13 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -145389,7 +145387,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145424,7 +145422,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Search loop */ for { /* If remainder of haystack is shorter than needle, done */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } /* Check last byte first; advance by shift on mismatch */ @@ -145451,7 +145449,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin } k = v11 for { - if !(k < l && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(k < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -145467,7 +145465,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -145504,11 +145502,11 @@ func Xmemmem(tls *TLS, h0 uintptr, k Tsize_t, n0 uintptr, l Tsize_t) (r uintptr) return uintptr(0) } /* Use faster algorithms for short needles */ - h = Xmemchr(tls, h0, int32(*(*uint8)(unsafe.Pointer(n))), k) + h = Xmemchr(tls, h0, Int32FromUint8(*(*uint8)(unsafe.Pointer(n))), k) if !(h != 0) || l == uint64(1) { return h } - k -= uint64(int64(h) - int64(h0)) + k -= Uint64FromInt64(int64(h) - int64(h0)) if k < l { return uintptr(0) } @@ -145541,7 +145539,7 @@ func Xmemmove(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { if d == s { return d } - if uint64(s)-uint64(d)-n <= uint64(-Int32FromInt32(2))*n { + if uint64(s)-uint64(d)-n <= Uint64FromInt32(-Int32FromInt32(2))*n { return Xmemcpy(tls, d, s, n) } if d < s { @@ -145625,14 +145623,14 @@ func X__memrchr(tls *TLS, m uintptr, c int32, n Tsize_t) (r uintptr) { var v1 Tsize_t _, _ = s, v1 s = m - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { v1 = n n-- if !(v1 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { return s + uintptr(n) } } @@ -145664,20 +145662,20 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { if !(n != 0) { return dest } - *(*uint8)(unsafe.Pointer(s)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = Uint8FromInt32(c) if n <= uint64(2) { return dest } - *(*uint8)(unsafe.Pointer(s + 1)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + 2)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 1)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + 2)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = Uint8FromInt32(c) if n <= uint64(6) { return dest } - *(*uint8)(unsafe.Pointer(s + 3)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 3)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = Uint8FromInt32(c) if n <= uint64(8) { return dest } @@ -145688,8 +145686,8 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { k = -uint64(s) & uint64(3) s += uintptr(k) n -= k - n &= uint64(-Int32FromInt32(4)) - c32 = uint32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(uint8(c)) + n &= Uint64FromInt32(-Int32FromInt32(4)) + c32 = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(Uint8FromInt32(c)) /* In preparation to copy 32 bytes at a time, aligned on * an 8-byte bounary, fill head/tail up to 28 bytes each. * As in the initial byte-based head/tail fill, each @@ -145788,7 +145786,7 @@ func X__stpcpy(tls *TLS, d uintptr, s uintptr) (r uintptr) { wd = d ws = s for { - if !!((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _3 @@ -145877,7 +145875,7 @@ func X__stpncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -145940,7 +145938,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l = _l r = _r for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _1 @@ -145949,7 +145947,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l++ r++ } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strcasecmp_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) { @@ -146008,7 +146006,7 @@ func Xstrchr(tls *TLS, s uintptr, c int32) (r1 uintptr) { var r, v1 uintptr _, _ = r, v1 r = X__strchrnul(tls, s, c) - if int32(*(*uint8)(unsafe.Pointer(r))) == int32(uint8(c)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) == Int32FromUint8(Uint8FromInt32(c)) { v1 = r } else { v1 = uintptr(0) @@ -146035,7 +146033,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { var k Tsize_t var w uintptr _, _ = k, w - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } @@ -146043,7 +146041,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { if !(uint64(s)%Uint64FromInt64(8) != 0) { break } - if !(*(*uint8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { + if !(*(*uint8)(unsafe.Pointer(s)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == c { return s } goto _1 @@ -146051,10 +146049,10 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { ; s++ } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -146064,7 +146062,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { } s = w for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -146098,7 +146096,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { defer func() { trc("-> %v", r1) }() } for { - if !(int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { break } goto _1 @@ -146107,7 +146105,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { l++ r++ } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrcpy(tls *TLS, dest uintptr, src uintptr) (r uintptr) { @@ -146132,7 +146130,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { _, _, _ = a, v3, p2 a = s if !(*(*uint8)(unsafe.Pointer(c)) != 0) || !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { - return uint64(int64(X__strchrnul(tls, s, int32(*(*uint8)(unsafe.Pointer(c))))) - int64(a)) + return Uint64FromInt64(int64(X__strchrnul(tls, s, Int32FromUint8(*(*uint8)(unsafe.Pointer(c))))) - int64(a)) } Xmemset(tls, bp, 0, uint64(32)) for { @@ -146157,7 +146155,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrdup(tls *TLS, s uintptr) (r uintptr) { @@ -146266,7 +146264,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*Tsize_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -146300,7 +146298,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { goto finish finish: ; - return uint64(int64(d)-int64(d0)) + Xstrlen(tls, s) + return Uint64FromInt64(int64(d)-int64(d0)) + Xstrlen(tls, s) return r } @@ -146328,7 +146326,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { break } if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } goto _1 _1: @@ -146337,7 +146335,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { } w = s for { - if !!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _2 @@ -146355,7 +146353,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { @@ -146374,7 +146372,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _2 @@ -146384,7 +146382,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, loc Tlocale_t) (r1 int32) { @@ -146442,7 +146440,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _2 @@ -146452,7 +146450,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { @@ -146492,7 +146490,7 @@ func Xstrnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _, _ = p, v1 p = Xmemchr(tls, s, 0, n) if p != 0 { - v1 = uint64(int64(p) - int64(s)) + v1 = Uint64FromInt64(int64(p) - int64(s)) } else { v1 = n } @@ -146558,7 +146556,7 @@ func Xstrsignal(tls *TLS, signum int32) (r uintptr) { _, _ = s, v2 s = uintptr(unsafe.Pointer(&_strings)) signum = signum - if uint32(signum)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(signum)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { signum = 0 } for { @@ -146602,7 +146600,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { } if !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(c)))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(c)))) { break } goto _1 @@ -146610,7 +146608,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } for { if v4 = *(*uint8)(unsafe.Pointer(c)) != 0; v4 { @@ -146634,18 +146632,18 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146773,13 +146771,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -146787,7 +146785,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -146824,13 +146822,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { /* Fast estimate for MAX(l,63) */ grow = l | uint64(63) z2 = Xmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } } else { @@ -146861,7 +146859,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { } k = v11 for { - if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -146877,7 +146875,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -146906,7 +146904,7 @@ func Xstrstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return h } /* Use faster algorithms for short needles */ - h = Xstrchr(tls, h, int32(*(*uint8)(unsafe.Pointer(n)))) + h = Xstrchr(tls, h, Int32FromUint8(*(*uint8)(unsafe.Pointer(n)))) if !(h != 0) || !(*(*uint8)(unsafe.Pointer(n + 1)) != 0) { return h } @@ -147016,14 +147014,14 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { i = v2 dp = v2 for { - if !(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { break } - c = int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) if !(c != 0) { return 0 } - if !(BoolInt32(uint32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { dp = i + uint64(1) z = Int32FromInt32(1) } else { @@ -147036,7 +147034,7 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { ; i++ } - if uint32(int32(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && uint32(int32(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { + if Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { /* If we're looking at non-degenerate digit sequences starting * with nonzero digits, longest digit string is greater. */ j = i @@ -147059,10 +147057,10 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { if z != 0 && dp < i && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-uint32('0') < uint32(10)) != 0 || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-uint32('0') < uint32(10)) != 0) { /* Otherwise, if common prefix of digit sequence is * all zeros, digits order less than non-digits. */ - return int32(uint8(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - int32(uint8(int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) + return Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) } } - return int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - int32(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) } func Xswab(tls *TLS, _src uintptr, _dest uintptr, n Tssize_t) { @@ -147109,7 +147107,7 @@ func Xwcscasecmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2)) defer func() { trc("-> %v", r1) }() } - return Xwcsncasecmp(tls, l, r, uint64(-Int32FromInt32(1))) + return Xwcsncasecmp(tls, l, r, Uint64FromInt32(-Int32FromInt32(1))) } func Xwcscasecmp_l(tls *TLS, l uintptr, r uintptr, locale Tlocale_t) (r1 int32) { @@ -147221,7 +147219,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { v2 = Xwcschr(tls, v3, *(*Twchar_t)(unsafe.Pointer(c))) s = v2 if v2 != 0 { - v1 = uint64((int64(s) - int64(a)) / 4) + v1 = Uint64FromInt64((int64(s) - int64(a)) / 4) } else { v1 = Xwcslen(tls, a) } @@ -147237,7 +147235,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsdup(tls *TLS, s uintptr) (r uintptr) { @@ -147273,7 +147271,7 @@ func Xwcslen(tls *TLS, s uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { @@ -147289,7 +147287,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r)))))) { + if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r)))))) { break } goto _2 @@ -147299,7 +147297,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { r += 4 n-- } - return int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r))))) + return Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r))))) } func Xwcsncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, locale Tlocale_t) (r1 int32) { @@ -147393,7 +147391,7 @@ func Xwcsnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _ = z z = Xwmemchr(tls, s, 0, n) if z != 0 { - n = uint64((int64(z) - int64(s)) / 4) + n = Uint64FromInt64((int64(z) - int64(s)) / 4) } return n } @@ -147456,7 +147454,7 @@ func Xwcsspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { @@ -147479,7 +147477,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return uintptr(0) } /* hit the end of h */ /* Compute maximal suffix */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v2 = Uint64FromInt32(1) p = v2 @@ -147510,7 +147508,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 @@ -147561,13 +147559,13 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { /* Fast estimate for MIN(l,63) */ grow = l | uint64(63) z2 = Xwmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { return uintptr(0) } } else { @@ -147872,7 +147870,7 @@ func X__mkostemps(tls *TLS, template uintptr, len1 int32, flags int32) (r int32) var l Tsize_t _, _, _, _, _ = fd, l, retries, v1, v3 l = Xstrlen(tls, template) - if l < uint64(6) || uint64(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1769, uint64(6)) != 0 { + if l < uint64(6) || Uint64FromInt32(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1769, uint64(6)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -147982,10 +147980,10 @@ func Xcfmakeraw(tls *TLS, t uintptr) { if __ccgo_strace { trc("tls=%v t=%v, (%v:)", tls, t, origin(2)) } - *(*Ttcflag_t)(unsafe.Pointer(t)) &= uint32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) - *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= uint32(^Int32FromInt32(OPOST)) - *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) - *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= uint32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) + *(*Ttcflag_t)(unsafe.Pointer(t)) &= Uint32FromInt32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) + *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= Uint32FromInt32(^Int32FromInt32(OPOST)) + *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) + *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= Uint32FromInt32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) *(*Ttcflag_t)(unsafe.Pointer(t + 8)) |= uint32(CS8) *(*Tcc_t)(unsafe.Pointer(t + 17 + 6)) = uint8(1) *(*Tcc_t)(unsafe.Pointer(t + 17 + 5)) = uint8(0) @@ -147996,11 +147994,11 @@ func Xcfsetospeed(tls *TLS, tio uintptr, speed Tspeed_t) (r int32) { trc("tls=%v tio=%v speed=%v, (%v:)", tls, tio, speed, origin(2)) defer func() { trc("-> %v", r) }() } - if speed&uint32(^Int32FromInt32(CBAUD)) != 0 { + if speed&Uint32FromInt32(^Int32FromInt32(CBAUD)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= uint32(^Int32FromInt32(CBAUD)) + *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= Uint32FromInt32(^Int32FromInt32(CBAUD)) *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) |= speed return 0 } @@ -148033,7 +148031,7 @@ func Xtcdrain(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) } func Xtcflow(tls *TLS, fd int32, action int32) (r int32) { @@ -148088,7 +148086,7 @@ func Xtcgetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) } func Xtcsendbreak(tls *TLS, fd int32, dur int32) (r int32) { @@ -148121,7 +148119,7 @@ func Xtcsetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) } func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { @@ -148136,13 +148134,13 @@ func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { var _ /* st at bp+0 */ Tstat _, _, _ = fd, map1, v1 map1 = uintptr(-Int32FromInt32(1)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_openat), int64(-Int32FromInt32(100)), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) if fd < 0 { return uintptr(0) } if !(X__fstat(tls, fd, bp) != 0) { - map1 = X__mmap(tls, uintptr(0), uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) - *(*Tsize_t)(unsafe.Pointer(size)) = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + map1 = X__mmap(tls, uintptr(0), Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) + *(*Tsize_t)(unsafe.Pointer(size)) = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) } X__syscall1(tls, int64(SYS_close), int64(fd)) if map1 == uintptr(-Int32FromInt32(1)) { @@ -148249,10 +148247,10 @@ func X__secs_to_tm(tls *TLS, t int64, tm uintptr) (r int32) { years = int64(remyears+int32(4)*q_cycles+int32(100)*c_cycles) + int64(400)*int64(qc_cycles) months = 0 for { - if !(int32(_days_in_month[months]) <= remdays) { + if !(Int32FromUint8(_days_in_month[months]) <= remdays) { break } - remdays -= int32(_days_in_month[months]) + remdays -= Int32FromUint8(_days_in_month[months]) goto _1 _1: ; @@ -148348,35 +148346,35 @@ func _getint2(tls *TLS, p uintptr) (r int32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { break } - x = uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x goto _1 _1: ; *(*uintptr)(unsafe.Pointer(p))++ } - return int32(x) + return Int32FromUint32(x) } func _getoff(tls *TLS, p uintptr) (r int32) { var neg, off, v1 int32 _, _, _ = neg, off, v1 neg = 0 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('-') { *(*uintptr)(unsafe.Pointer(p))++ neg = int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('+') { *(*uintptr)(unsafe.Pointer(p))++ } } off = int32(3600) * _getint2(tls, p) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { *(*uintptr)(unsafe.Pointer(p))++ off += int32(60) * _getint2(tls, p) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { *(*uintptr)(unsafe.Pointer(p))++ off += _getint2(tls, p) } @@ -148392,7 +148390,7 @@ func _getoff(tls *TLS, p uintptr) (r int32) { func _getrule(tls *TLS, p uintptr, rule uintptr) { var r, v1 int32 _, _ = r, v1 - v1 = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) *(*int32)(unsafe.Pointer(rule)) = v1 r = v1 if r != int32('M') { @@ -148410,7 +148408,7 @@ func _getrule(tls *TLS, p uintptr, rule uintptr) { *(*uintptr)(unsafe.Pointer(p))++ *(*int32)(unsafe.Pointer(rule + 3*4)) = _getint2(tls, p) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('/') { *(*uintptr)(unsafe.Pointer(p))++ *(*int32)(unsafe.Pointer(rule + 4*4)) = _getoff(tls, p) } else { @@ -148421,11 +148419,11 @@ func _getrule(tls *TLS, p uintptr, rule uintptr) { func _getname(tls *TLS, d uintptr, p uintptr) { var i, v3 int32 _, _ = i, v3 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('<') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('<') { *(*uintptr)(unsafe.Pointer(p))++ i = 0 for { - if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i)))) != int32('>')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i)))) != int32('>')) { break } if i < int32(TZNAME_MAX) { @@ -148442,7 +148440,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } else { i = 0 for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { break } if i < int32(TZNAME_MAX) { @@ -148464,7 +148462,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } func _zi_read32(tls *TLS, z uintptr) (r Tuint32_t) { - return uint32(*(*uint8)(unsafe.Pointer(z)))< uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { + if i > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { *(*uintptr)(unsafe.Pointer(bp + 288)) = uintptr(unsafe.Pointer(&X__utc)) i = Uint64FromInt32(3) } @@ -148541,8 +148539,8 @@ func _do_tzset(tls *TLS) { if i >= _old_tz_size { _old_tz_size = i + uint64(1) } - if _old_tz_size > uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { - _old_tz_size = uint64(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) + if _old_tz_size > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { + _old_tz_size = Uint64FromInt32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) } _old_tz = Xmalloc(tls, _old_tz_size) } @@ -148550,10 +148548,10 @@ func _do_tzset(tls *TLS) { Xmemcpy(tls, _old_tz, *(*uintptr)(unsafe.Pointer(bp + 288)), i+uint64(1)) } posix_form = 0 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { *(*uintptr)(unsafe.Pointer(bp + 296)) = *(*uintptr)(unsafe.Pointer(bp + 288)) _getname(tls, bp+308, bp+296) - if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1794) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1798) != 0)) { + if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1794) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1798) != 0)) { posix_form = int32(1) } } @@ -148561,10 +148559,10 @@ func _do_tzset(tls *TLS) { * pathame beginning with "."; in secure mode, only the * standard path will be searched. */ if !(posix_form != 0) { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { *(*uintptr)(unsafe.Pointer(bp + 288))++ } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { if !(X__libc.Fsecure != 0) || !(Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), __ccgo_ts+1779) != 0) { map1 = X__map_file(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), uintptr(unsafe.Pointer(&_map_size))) } @@ -148600,7 +148598,7 @@ func _do_tzset(tls *TLS) { _zi = map1 if map1 != 0 { scale = int32(2) - if int32(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { *(*[6]uint8)(unsafe.Pointer(bp)) = [6]uint8{ 0: uint8(1), 1: uint8(1), @@ -148619,10 +148617,10 @@ func _do_tzset(tls *TLS) { _types = _index + uintptr(_zi_read32(tls, _trans-uintptr(12))) _abbrevs = _types + uintptr(uint32(6)*_zi_read32(tls, _trans-uintptr(8))) _abbrevs_end = _abbrevs + uintptr(_zi_read32(tls, _trans-uintptr(4))) - if int32(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { *(*uintptr)(unsafe.Pointer(bp + 288)) = _zi + uintptr(_map_size) - uintptr(2) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { break } goto _4 @@ -148647,11 +148645,11 @@ func _do_tzset(tls *TLS) { } if !(*(*uint8)(unsafe.Pointer(p1 + 4)) != 0) && !(Xtzname[0] != 0) { Xtzname[0] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - Xtimezone = int64(-_zi_read32(tls, p1)) + Xtimezone = Int64FromUint32(-_zi_read32(tls, p1)) } if *(*uint8)(unsafe.Pointer(p1 + 4)) != 0 && !(Xtzname[int32(1)] != 0) { Xtzname[int32(1)] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - _dst_off = int32(-_zi_read32(tls, p1)) + _dst_off = Int32FromUint32(-_zi_read32(tls, p1)) Xdaylight = int32(1) } goto _8 @@ -148682,7 +148680,7 @@ func _do_tzset(tls *TLS) { Xtzname[int32(1)] = uintptr(unsafe.Pointer(&_dst_name)) if _dst_name[0] != 0 { Xdaylight = int32(1) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { _dst_off = _getoff(tls, bp+288) } else { _dst_off = int32(Xtimezone - int64(3600)) @@ -148691,11 +148689,11 @@ func _do_tzset(tls *TLS) { Xdaylight = 0 _dst_off = int32(Xtimezone) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r0))) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r12))) } @@ -148714,7 +148712,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { scale = int32(3) - BoolInt32(_trans == _zi+uintptr(44)) off = 0 a = uint64(0) - n = uint64((int64(_index) - int64(_trans)) >> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if !(n != 0) { if alt != 0 { *(*Tsize_t)(unsafe.Pointer(alt)) = uint64(0) @@ -148728,12 +148726,12 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if a == n-uint64(1) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if a == uint64(0) { x = uint64(_zi_read32(tls, _trans)) if scale == int32(3) { x = x<= uint64(int64(_abbrevs_end)-int64(_abbrevs))) { + if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint64(p)-uint64(_abbrevs) >= Uint64FromInt64(int64(_abbrevs_end)-int64(_abbrevs))) { p = __ccgo_ts } ___unlock(tls, uintptr(unsafe.Pointer(&_lock4))) @@ -148956,7 +148954,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { var centuries, cycles, leaps, leaps1, rem, y int32 var _ /* dummy at bp+0 */ int32 _, _, _, _, _, _ = centuries, cycles, leaps, leaps1, rem, y - if uint64(year)-uint64(2) <= uint64(136) { + if Uint64FromInt64(year)-uint64(2) <= uint64(136) { y = int32(year) leaps = (y - int32(68)) >> int32(2) if !((y-Int32FromInt32(68))&Int32FromInt32(3) != 0) { @@ -149005,7 +149003,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { *(*int32)(unsafe.Pointer(is_leap)) = 0 leaps1 = 0 } else { - leaps1 = int32(uint32(rem) / uint32(4)) + leaps1 = Int32FromUint32(Uint32FromInt32(rem) / uint32(4)) rem = int32(uint32(rem) % Uint32FromUint32(4)) *(*int32)(unsafe.Pointer(is_leap)) = BoolInt32(!(rem != 0)) } @@ -149089,7 +149087,7 @@ func Xclock_getcpuclockid(tls *TLS, pid Tpid_t, clk uintptr) (r int32) { var ret int32 var _ /* ts at bp+0 */ Ttimespec _, _ = id, ret - id = int32(uint32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) + id = Int32FromUint32(Uint32FromInt32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) ret = int32(X__syscall2(tls, int64(SYS_clock_getres), int64(id), int64(bp))) if ret == -int32(EINVAL) { ret = -int32(ESRCH) @@ -149108,7 +149106,7 @@ func Xclock_getres(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { } /* If reaching this point, it's a 64-bit arch or time64-only * 32-bit arch and we can get result directly into timespec. */ - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) } func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { @@ -149127,7 +149125,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { } r = -int32(EINVAL) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xclock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { @@ -149165,7 +149163,7 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { trc("tls=%v clk=%v ts=%v, (%v:)", tls, clk, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) } func Xctime(tls *TLS, t uintptr) (r uintptr) { @@ -149228,7 +149226,7 @@ func Xftime(tls *TLS, tp uintptr) (r int32) { _ = v1 Xclock_gettime(tls, CLOCK_REALTIME, bp) (*Ttimeb)(unsafe.Pointer(tp)).Ftime = (*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec - (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = uint16((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) + (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = Uint16FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) v1 = Int16FromInt32(0) (*Ttimeb)(unsafe.Pointer(tp)).Fdstflag = v1 (*Ttimeb)(unsafe.Pointer(tp)).Ftimezone = v1 @@ -149430,7 +149428,7 @@ func Xnanosleep(tls *TLS, req uintptr, rem uintptr) (r int32) { trc("tls=%v req=%v rem=%v, (%v:)", tls, req, rem, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) } func _is_leap(tls *TLS, y int32) (r int32) { @@ -149445,10 +149443,10 @@ func _is_leap(tls *TLS, y int32) (r int32) { func _week_num(tls *TLS, tm uintptr) (r int32) { var dec31, jan1, val int32 _, _, _ = dec31, jan1, val - val = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) /* If 1 Jan is just 1-3 days past Monday, * the previous week is also in this year. */ - if (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { + if (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { val++ } if !(val != 0) { @@ -149456,7 +149454,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 31 December of prev year a Thursday, * or Friday of a leap year, then the * prev year has 53 weeks. */ - dec31 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) + dec31 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) if dec31 == int32(4) || dec31 == int32(5) && _is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year%int32(400)-int32(1)) != 0 { val++ } @@ -149465,7 +149463,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 1 January is not a Thursday, and not * a Wednesday of a leap year, then this * year has only 52 weeks. */ - jan1 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) + jan1 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) if jan1 != int32(4) && (jan1 != int32(3) || !(_is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year) != 0)) { val = int32(1) } @@ -149491,13 +149489,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc def_pad = int32('0') switch f { case int32('a'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(ABDAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday goto nl_strcat case int32('A'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(DAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday @@ -149505,13 +149503,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('h'): fallthrough case int32('b'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(ABMON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon goto nl_strcat case int32('B'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(MON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon @@ -149610,7 +149608,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc d++ v5 = fmt fmt++ - *(*uint8)(unsafe.Pointer(v4)) = uint8(Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(v5))))) + *(*uint8)(unsafe.Pointer(v4)) = Uint8FromInt32(Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))))) goto _3 _3: ; @@ -149646,10 +149644,10 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc width = int32(1) goto number case int32('U'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) goto number case int32('W'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) goto number case int32('V'): val = int64(_week_num(tls, tm)) @@ -149673,7 +149671,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('Y'): val = int64((*Ttm)(unsafe.Pointer(tm)).Ftm_year) + int64(1900) if val >= int64(10000) { - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1880, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1880, VaList(bp+8, val))) return s } width = int32(4) @@ -149683,7 +149681,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc *(*Tsize_t)(unsafe.Pointer(l)) = uint64(0) return __ccgo_ts } - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1886, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1886, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) return s case int32('Z'): if (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst < 0 { @@ -149708,13 +149706,13 @@ number: } switch v7 { case int32('-'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1893, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1893, VaList(bp+8, val))) case int32('_'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1898, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1898, VaList(bp+8, width, val))) case int32('0'): fallthrough default: - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1904, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1904, VaList(bp+8, width, val))) break } return s @@ -149766,7 +149764,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl *(*uint8)(unsafe.Pointer(s + uintptr(l))) = uint8(0) return l } - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { v2 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v2))) = *(*uint8)(unsafe.Pointer(f)) @@ -149774,12 +149772,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } f++ pad = 0 - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('_') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('0') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('_') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('0') { v3 = f f++ - pad = int32(*(*uint8)(unsafe.Pointer(v3))) + pad = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } - v4 = BoolInt32(int32(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) + v4 = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) plus = v4 if v4 != 0 { f++ @@ -149790,7 +149788,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint64(0) *(*uintptr)(unsafe.Pointer(bp + 112)) = f } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('F') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('G') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('Y') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('F') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('G') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('Y') { if !(width != 0) && *(*uintptr)(unsafe.Pointer(bp + 112)) != f { width = uint64(1) } @@ -149798,10 +149796,10 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint64(0) } f = *(*uintptr)(unsafe.Pointer(bp + 112)) - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('E') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('O') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('E') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('O') { f++ } - t = X__strftime_fmt_1(tls, bp+8, bp, int32(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) + t = X__strftime_fmt_1(tls, bp+8, bp, Int32FromUint8(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) if !(t != 0) { break } @@ -149809,12 +149807,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl /* Trim off any sign and leading zeros, then * count remaining digits to determine behavior * for the + flag. */ - if int32(*(*uint8)(unsafe.Pointer(t))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(t))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('-') { t++ *(*Tsize_t)(unsafe.Pointer(bp))-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(t))) == int32('0') && uint32(int32(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('0') && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { break } goto _5 @@ -149828,7 +149826,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } d = uint64(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { break } goto _6 @@ -149843,13 +149841,13 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width-- } else { if v9 = plus != 0; v9 { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') { v8 = int32(3) } else { v8 = int32(5) } } - if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= uint64(v8) { + if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= Uint64FromInt32(v8) { v10 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v10))) = uint8('+') @@ -149924,16 +149922,16 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(bp + 4)) = 0 *(*int32)(unsafe.Pointer(bp + 8)) = 0 for *(*uint8)(unsafe.Pointer(f)) != 0 { - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { - v1 = int32(*(*uint8)(unsafe.Pointer(f))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if v2 != 0 { for { if v8 = *(*uint8)(unsafe.Pointer(s)) != 0; v8 { - v5 = int32(*(*uint8)(unsafe.Pointer(s))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: } @@ -149946,7 +149944,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { s++ } } else { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(*(*uint8)(unsafe.Pointer(f))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) { return uintptr(0) } else { s++ @@ -149956,11 +149954,11 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { continue } f++ - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('+') { f++ } if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { - w = int32(Xstrtoul(tls, f, bp+16, int32(10))) + w = Int32FromUint64(Xstrtoul(tls, f, bp+16, int32(10))) f = *(*uintptr)(unsafe.Pointer(bp + 16)) } else { w = -int32(1) @@ -149968,7 +149966,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { adj = 0 v9 = f f++ - switch int32(*(*uint8)(unsafe.Pointer(v9))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) { case int32('A'): goto _10 case int32('a'): @@ -150120,8 +150118,8 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { _44: ; if v48 = *(*uint8)(unsafe.Pointer(s)) != 0; v48 { - v45 = int32(*(*uint8)(unsafe.Pointer(s))) - v46 = BoolInt32(v45 == int32(' ') || uint32(v45)-uint32('\t') < uint32(5)) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v46 = BoolInt32(v45 == int32(' ') || Uint32FromInt32(v45)-uint32('\t') < uint32(5)) goto _47 _47: } @@ -150230,7 +150228,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; v49 = s s++ - if int32(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { return uintptr(0) } goto _41 @@ -150251,28 +150249,28 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v51 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v51))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v51))) - int32('0') goto _50 _50: ; i *= int32(10) } - if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(range1) { + if Uint32FromInt32(*(*int32)(unsafe.Pointer(dest))-min) >= Uint32FromInt32(range1) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) -= adj switch int64(dest) - int64(tm) { - case int64(uint64(UintptrFromInt32(0) + 28)): + case Int64FromUint64(uint64(UintptrFromInt32(0) + 28)): } goto update goto numeric_digits numeric_digits: ; neg = 0 - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { s++ } else { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') { neg = int32(1) s++ } @@ -150289,7 +150287,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v54 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v54))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v54))) - int32('0') goto _52 _52: ; @@ -150410,9 +150408,9 @@ func Xtimer_getoverrun(tls *TLS, t Ttimer_t) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) } func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { @@ -150424,9 +150422,9 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) } func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (r int32) { @@ -150438,9 +150436,9 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+148) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) } type Ttms = struct { @@ -150571,7 +150569,7 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl break } *(*Tsize_t)(unsafe.Pointer(bp)) = Xmbstowcs(tls, bp+108, t_mb, Uint64FromInt64(400)/Uint64FromInt64(4)) - if *(*Tsize_t)(unsafe.Pointer(bp)) == uint64(-Int32FromInt32(1)) { + if *(*Tsize_t)(unsafe.Pointer(bp)) == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } t = bp + 108 @@ -150660,7 +150658,7 @@ func Xaccess(tls *TLS, filename uintptr, amode int32) (r int32) { trc("tls=%v filename=%v amode=%v, (%v:)", tls, filename, amode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_faccessat), int64(-Int32FromInt32(100)), int64(filename), int64(amode), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_faccessat), int64(-Int32FromInt32(100)), int64(filename), int64(amode), int64(Int32FromInt32(0)))))) } func Xacct(tls *TLS, filename uintptr) (r int32) { @@ -150668,7 +150666,7 @@ func Xacct(tls *TLS, filename uintptr) (r int32) { trc("tls=%v filename=%v, (%v:)", tls, filename, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) } func Xalarm(tls *TLS, seconds uint32) (r uint32) { @@ -150682,12 +150680,12 @@ func Xalarm(tls *TLS, seconds uint32) (r uint32) { var _ /* old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_value: Ttimeval{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), }, } *(*Titimerval)(unsafe.Pointer(bp + 32)) = Titimerval{} Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) } func Xchdir(tls *TLS, path uintptr) (r int32) { @@ -150695,7 +150693,7 @@ func Xchdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) } func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { @@ -150703,7 +150701,7 @@ func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), int64(uid), int64(gid), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(Int32FromInt32(0)))))) } func _dummy12(tls *TLS, fd int32) (r int32) { @@ -150722,7 +150720,7 @@ func Xclose(tls *TLS, fd int32) (r1 int32) { if r == -int32(EINTR) { r = 0 } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xctermid(tls *TLS, s uintptr) (r uintptr) { @@ -150745,7 +150743,7 @@ func Xdup(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) } func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { @@ -150769,7 +150767,7 @@ func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { } } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { @@ -150786,7 +150784,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { break } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xdup3(tls *TLS, old int32, new1 int32, flags int32) (r int32) { @@ -150815,7 +150813,7 @@ func _checker(tls *TLS, p uintptr) (r int32) { X__syscall1(tls, int64(SYS_exit), int64(Int32FromInt32(1))) } *(*int32)(unsafe.Pointer(bp)) = int32(X__syscall4(tls, int64(SYS_faccessat), int64((*Tctx1)(unsafe.Pointer(c)).Ffd), int64((*Tctx1)(unsafe.Pointer(c)).Ffilename), int64((*Tctx1)(unsafe.Pointer(c)).Famode), int64(Int32FromInt32(0)))) - X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), int64(Uint64FromInt64(4))) + X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), Int64FromUint64(Uint64FromInt64(4))) return 0 } @@ -150829,13 +150827,13 @@ func Xfaccessat(tls *TLS, fd int32, filename uintptr, amode int32, flag int32) ( if flag != 0 { ret = int32(X__syscall4(tls, int64(SYS_faccessat2), int64(fd), int64(filename), int64(amode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } if flag & ^Int32FromInt32(AT_EACCESS) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) } func Xfchdir(tls *TLS, fd int32) (r int32) { @@ -150850,10 +150848,10 @@ func Xfchdir(tls *TLS, fd int32) (r int32) { _ = ret ret = int32(X__syscall1(tls, int64(SYS_fchdir), int64(fd))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) } func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { @@ -150866,12 +150864,12 @@ func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), int64(uid), int64(gid))) + ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), Int64FromUint32(uid), Int64FromUint32(gid))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(bp), int64(uid), int64(gid), int64(Int32FromInt32(0)))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(bp), Int64FromUint32(uid), Int64FromUint32(gid), int64(Int32FromInt32(0)))))) } func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag int32) (r int32) { @@ -150879,7 +150877,7 @@ func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag in trc("tls=%v fd=%v path=%v uid=%v gid=%v flag=%v, (%v:)", tls, fd, path, uid, gid, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), int64(uid), int64(gid), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(flag))))) } func Xfdatasync(tls *TLS, fd int32) (r int32) { @@ -150887,7 +150885,7 @@ func Xfdatasync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) } func Xfsync(tls *TLS, fd int32) (r int32) { @@ -150895,7 +150893,7 @@ func Xfsync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) } func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { @@ -150903,7 +150901,7 @@ func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { trc("tls=%v fd=%v length=%v, (%v:)", tls, fd, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) } func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { @@ -150922,7 +150920,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { } else { v2 = int32(PATH_MAX) } - v1 = uint64(v2) + v1 = Uint64FromInt32(v2) tmp = Xrealloc(tls, tmp, v1) if !(buf != 0) { buf = tmp @@ -150933,11 +150931,11 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { return uintptr(0) } } - ret = X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), int64(size)))) + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), Int64FromUint64(size)))) if ret < 0 { return uintptr(0) } - if ret == 0 || int32(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { + if ret == 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOENT) return uintptr(0) } @@ -150954,7 +150952,7 @@ func Xgetegid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getegid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getegid))) } func Xgeteuid(tls *TLS) (r Tuid_t) { @@ -150962,7 +150960,7 @@ func Xgeteuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_geteuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_geteuid))) } func Xgetgid(tls *TLS) (r Tgid_t) { @@ -150970,7 +150968,7 @@ func Xgetgid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getgid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getgid))) } func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { @@ -150978,7 +150976,7 @@ func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { trc("tls=%v count=%v list=%v, (%v:)", tls, count, list, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) } func Xgethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -151050,7 +151048,7 @@ func Xgetpgid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) } func Xgetpgrp(tls *TLS) (r Tpid_t) { @@ -151082,7 +151080,7 @@ func Xgetsid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) } func Xgetuid(tls *TLS) (r Tuid_t) { @@ -151090,7 +151088,7 @@ func Xgetuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getuid))) } func Xisatty(tls *TLS, fd int32) (r1 int32) { @@ -151103,7 +151101,7 @@ func Xisatty(tls *TLS, fd int32) (r1 int32) { var r uint64 var _ /* wsz at bp+0 */ Twinsize _ = r - r = uint64(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) + r = Uint64FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) if r == uint64(0) { return int32(1) } @@ -151118,7 +151116,7 @@ func Xlchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), int64(uid), int64(gid), int64(Int32FromInt32(AT_SYMLINK_NOFOLLOW)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(-Int32FromInt32(100)), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(Int32FromInt32(AT_SYMLINK_NOFOLLOW)))))) } func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { @@ -151126,7 +151124,7 @@ func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_linkat), int64(-Int32FromInt32(100)), int64(existing), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_linkat), int64(-Int32FromInt32(100)), int64(existing), int64(-Int32FromInt32(100)), int64(new1), int64(Int32FromInt32(0)))))) } func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, flag int32) (r int32) { @@ -151134,7 +151132,7 @@ func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, fla trc("tls=%v fd1=%v existing=%v fd2=%v new1=%v flag=%v, (%v:)", tls, fd1, existing, fd2, new1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) } func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151142,7 +151140,7 @@ func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { trc("tls=%v fd=%v offset=%v whence=%v, (%v:)", tls, fd, offset, whence, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_lseek), int64(fd), offset, int64(whence)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_lseek), int64(fd), offset, int64(whence)))) } func Xlseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151188,7 +151186,7 @@ func Xpause(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), 0, 0)))) } func Xpipe(tls *TLS, fd uintptr) (r int32) { @@ -151196,7 +151194,7 @@ func Xpipe(tls *TLS, fd uintptr) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(Int32FromInt32(0)))))) } func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { @@ -151211,10 +151209,10 @@ func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { } ret = int32(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag & ^(Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } ret = Xpipe(tls, fd) if ret != 0 { @@ -151244,7 +151242,7 @@ func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151252,7 +151250,7 @@ func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { @@ -151260,7 +151258,7 @@ func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151268,7 +151266,7 @@ func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { @@ -151276,7 +151274,7 @@ func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151293,11 +151291,11 @@ func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_ buf = bp bufsize = uint64(1) } - r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(-Int32FromInt32(100)), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(-Int32FromInt32(100)), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151314,11 +151312,11 @@ func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) buf = bp bufsize = uint64(1) } - r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151326,7 +151324,7 @@ func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r int32) { @@ -151334,7 +151332,7 @@ func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r trc("tls=%v oldfd=%v old=%v newfd=%v new1=%v, (%v:)", tls, oldfd, old, newfd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_renameat2), int64(oldfd), int64(old), int64(newfd), int64(new1), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_renameat2), int64(oldfd), int64(old), int64(newfd), int64(new1), int64(Int32FromInt32(0)))))) } func Xrmdir(tls *TLS, path uintptr) (r int32) { @@ -151342,7 +151340,7 @@ func Xrmdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(AT_REMOVEDIR)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(AT_REMOVEDIR)))))) } func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { @@ -151350,7 +151348,7 @@ func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setgid), int32(gid), 0, 0) + return X__setxid(tls, int32(SYS_setgid), Int32FromUint32(gid), 0, 0) } func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { @@ -151358,7 +151356,7 @@ func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { trc("tls=%v pid=%v pgid=%v, (%v:)", tls, pid, pgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) } func Xsetpgrp(tls *TLS) (r Tpid_t) { @@ -151374,7 +151372,7 @@ func Xsetsid(tls *TLS) (r Tpid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_setsid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_setsid))))) } func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { @@ -151382,7 +151380,7 @@ func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setuid), int32(uid), 0, 0) + return X__setxid(tls, int32(SYS_setuid), Int32FromUint32(uid), 0, 0) } type Tctx2 = struct { @@ -151438,7 +151436,7 @@ func X__setxid(tls *TLS, nr int32, id int32, eid int32, sid int32) (r int32) { } else { v1 = (*(*Tctx2)(unsafe.Pointer(bp))).Fret } - return int32(X__syscall_ret(tls, uint64(v1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(v1))) } func Xsleep(tls *TLS, seconds uint32) (r uint32) { @@ -151450,10 +151448,10 @@ func Xsleep(tls *TLS, seconds uint32) (r uint32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), } if Xnanosleep(tls, bp, bp) != 0 { - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) } return uint32(0) } @@ -151463,7 +151461,7 @@ func Xsymlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(-Int32FromInt32(100)), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(-Int32FromInt32(100)), int64(new1))))) } func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { @@ -151471,7 +151469,7 @@ func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { trc("tls=%v existing=%v fd=%v new1=%v, (%v:)", tls, existing, fd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) } func Xsync(tls *TLS) { @@ -151512,7 +151510,7 @@ func Xtruncate(tls *TLS, path uintptr, length Toff_t) (r int32) { trc("tls=%v path=%v length=%v, (%v:)", tls, path, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) } /* Support signed or unsigned plain-char */ @@ -151557,12 +151555,12 @@ func Xttyname_r(tls *TLS, fd int32, name uintptr, size Tsize_t) (r int32) { if !(Xisatty(tls, fd) != 0) { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } - X__procfdname(tls, bp+256, uint32(fd)) + X__procfdname(tls, bp+256, Uint32FromInt32(fd)) l = Xreadlink(tls, bp+256, name, size) if l < 0 { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } else { - if uint64(l) == size { + if Uint64FromInt64(l) == size { return int32(ERANGE) } } @@ -151587,14 +151585,14 @@ func Xualarm(tls *TLS, value uint32, interval uint32) (r uint32) { var _ /* it_old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_interval: Ttimeval{ - Ftv_usec: int64(interval), + Ftv_usec: Int64FromUint32(interval), }, Fit_value: Ttimeval{ - Ftv_usec: int64(value), + Ftv_usec: Int64FromUint32(value), }, } Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) } func Xunlink(tls *TLS, path uintptr) (r int32) { @@ -151602,7 +151600,7 @@ func Xunlink(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(-Int32FromInt32(100)), int64(path), int64(Int32FromInt32(0)))))) } func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { @@ -151610,7 +151608,7 @@ func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { trc("tls=%v fd=%v path=%v flag=%v, (%v:)", tls, fd, path, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) } func Xusleep(tls *TLS, useconds uint32) (r int32) { @@ -151622,8 +151620,8 @@ func Xusleep(tls *TLS, useconds uint32) (r int32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(useconds / uint32(1000000)), - Ftv_nsec: int64(useconds % uint32(1000000) * uint32(1000)), + Ftv_sec: Int64FromUint32(useconds / uint32(1000000)), + Ftv_nsec: Int64FromUint32(useconds % uint32(1000000) * uint32(1000)), } return Xnanosleep(tls, bp, bp) } @@ -151633,7 +151631,7 @@ func Xwrite(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151641,7 +151639,7 @@ func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func __ccgo_fp(f interface{}) uintptr { @@ -152016,22 +152014,22 @@ var X__fsmu8 = [51]Tuint32_t{ 11: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x0), 31: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x1), 32: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x2), @@ -153938,7 +153936,7 @@ var Xsigngam int32 var X__stack_chk_guard Tuintptr_t var X__stderr_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf5)) + uintptr(UNGET), Ffd: int32(2), Flock: -int32(1), @@ -153948,7 +153946,7 @@ var X__stderr_FILE = TFILE{ var X__stderr_used = uintptr(unsafe.Pointer(&X__stderr_FILE)) var X__stdin_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), Fbuf: uintptr(unsafe.Pointer(&_buf6)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Flock: -int32(1), @@ -153959,7 +153957,7 @@ var X__stdin_used = uintptr(unsafe.Pointer(&X__stdin_FILE)) var X__stdio_ofl_lockptr = uintptr(unsafe.Pointer(&_ofl_lock)) var X__stdout_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf7)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Ffd: int32(1), diff --git a/vendor/modernc.org/libc/ccgo_linux_s390x.go b/vendor/modernc.org/libc/ccgo_linux_s390x.go index e00e494e..c237bfc0 100644 --- a/vendor/modernc.org/libc/ccgo_linux_s390x.go +++ b/vendor/modernc.org/libc/ccgo_linux_s390x.go @@ -9,10 +9,8 @@ import ( "unsafe" ) -var ( - _ reflect.Type - _ unsafe.Pointer -) +var _ reflect.Type +var _ unsafe.Pointer const BIG_ENDIAN = 4321 const BYTE_ORDER = 4321 @@ -510,8 +508,8 @@ func ___frexp_exp(tls *TLS, x float64, expt uintptr) (r float64) { */ exp_x = Xexp(tls, x-_kln2) hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&exp_x)) >> int32(32)) - *(*int32)(unsafe.Pointer(expt)) = int32(hx>>Int32FromInt32(20) - uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) - v1 = uint64(hx&Uint32FromInt32(0xfffff)|uint32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(20) - Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1023)) + _k) + v1 = uint64(hx&Uint32FromInt32(0xfffff)|Uint32FromInt32((Int32FromInt32(0x3ff)+Int32FromInt32(1023))<>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) - v1 = hx&uint32(0x7fffff) | uint32((Int32FromInt32(0x7f)+Int32FromInt32(127))<>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(127)) + _k1) + v1 = hx&uint32(0x7fffff) | Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(127))<> Int32FromInt32(63)) + zineg = Int32FromUint64(v1 >> Int32FromInt32(63)) z = Xcacos(tls, z) if zineg != 0 { v3 = [2]float64{ @@ -738,7 +736,7 @@ func Xcacoshf(tls *TLS, z complex64) (r complex64) { v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: - zineg = int32(v1 >> Int32FromInt32(31)) + zineg = Int32FromUint32(v1 >> Int32FromInt32(31)) z = Xcacosf(tls, z) if zineg != 0 { v3 = [2]float32{ @@ -1119,11 +1117,11 @@ func Xccosh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -1280,8 +1278,8 @@ func Xccoshf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -1875,11 +1873,11 @@ func Xcsinh(tls *TLS, z complex128) (r complex128) { x = Float64FromComplex128(z) y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) - hx = int32(__u >> int32(32)) - lx = int32(uint32(__u)) + hx = Int32FromUint64(__u >> int32(32)) + lx = Int32FromUint32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) - hy = int32(__u1 >> int32(32)) - ly = int32(uint32(__u1)) + hy = Int32FromUint64(__u1 >> int32(32)) + ly = Int32FromUint32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -2037,8 +2035,8 @@ func Xcsinhf(tls *TLS, z complex64) (r complex64) { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = h, hx, hy, ix, iy, x, y, v1, v10, v11, v12, v13, v2, v3, v4, v5, v6, v7, v8, v9 x = Float32FromComplex64(z) y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] - hx = int32(*(*Tuint32_t)(unsafe.Pointer(&x))) - hy = int32(*(*Tuint32_t)(unsafe.Pointer(&y))) + hx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&x))) + hy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(&y))) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy if ix < int32(0x7f800000) && iy < int32(0x7f800000) { @@ -2233,7 +2231,7 @@ _9: v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v12 = [2]float64{ 0: Xfabs(tls, b-b), 1: Xcopysign(tls, a, b), @@ -2353,7 +2351,7 @@ _9: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v12 = [2]float32{ 0: Xfabsf(tls, b-b), 1: Xcopysignf(tls, a, b), @@ -3115,14 +3113,14 @@ func Xconfstr(tls *TLS, name int32, buf uintptr, len1 Tsize_t) (r Tsize_t) { if !(name != 0) { s = __ccgo_ts + 1 } else { - if uint32(name) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { + if Uint32FromInt32(name) & ^Uint32FromUint32(4) != uint32(1) && Uint32FromInt32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uint64(0) } } // snprintf is overkill but avoid wasting code size to implement // this completely useless function and its truncation semantics - return uint64(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) + return Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+15, VaList(bp+8, s)) + int32(1)) } const ARG_MAX = 131072 @@ -3242,7 +3240,7 @@ func Xfpathconf(tls *TLS, fd int32, name int32) (r int64) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { + if Uint64FromInt32(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -7419,7 +7417,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { var _ /* set at bp+16 */ [128]uint8 var _ /* si at bp+144 */ Tsysinfo _, _, _, _, _, _, _, _ = cnt, i, mem, val, v1, v3, v6, p5 - if uint64(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { + if Uint64FromInt32(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } else { @@ -7436,11 +7434,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v1 = (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur } - return int64(v1) + return Int64FromUint64(v1) } } } - switch int32(uint8(_values1[name])) { + switch Int32FromUint8(Uint8FromInt16(_values1[name])) { case (-Int32FromInt32(256) | Int32FromInt32(1)) & Int32FromInt32(255): return int64(200809) case (-Int32FromInt32(256) | Int32FromInt32(2)) & Int32FromInt32(255): @@ -7459,12 +7457,12 @@ func Xsysconf(tls *TLS, name int32) (r int64) { *(*[128]uint8)(unsafe.Pointer(bp + 16)) = [128]uint8{ 0: uint8(1), } - X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), int64(Uint64FromInt64(128)), int64(bp+16)) + X__syscall3(tls, int64(SYS_sched_getaffinity), int64(Int32FromInt32(0)), Int64FromUint64(Uint64FromInt64(128)), int64(bp+16)) v3 = Int32FromInt32(0) cnt = v3 i = v3 for { - if !(uint64(i) < uint64(128)) { + if !(Uint64FromInt32(i) < uint64(128)) { break } for { @@ -7475,7 +7473,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { _4: ; p5 = bp + 16 + uintptr(i) - *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (int32((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(p5)) = uint8(int32(*(*uint8)(unsafe.Pointer(p5))) & (Int32FromUint8((*(*[128]uint8)(unsafe.Pointer(bp + 16)))[i]) - Int32FromInt32(1))) cnt++ } goto _2 @@ -7503,11 +7501,11 @@ func Xsysconf(tls *TLS, name int32) (r int64) { } else { v6 = mem } - return int64(v6) + return Int64FromUint64(v6) case (-Int32FromInt32(256) | Int32FromInt32(12)) & Int32FromInt32(255): fallthrough case (-Int32FromInt32(256) | Int32FromInt32(13)) & Int32FromInt32(255): - val = int64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) + val = Int64FromUint64(X__getauxval(tls, uint64(AT_MINSIGSTKSZ))) if val < int64(MINSIGSTKSZ) { val = int64(MINSIGSTKSZ) } @@ -9137,14 +9135,14 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags * Prefix "$2x$": bug = 1, safety = 0 * Prefix "$2y$": bug = 0, safety = 0 */ - bug = uint32(int32(flags) & int32(1)) + bug = Uint32FromInt32(Int32FromUint8(flags) & int32(1)) safety = uint32(flags) & uint32(2) << int32(15) v1 = Uint32FromInt32(0) diff = v1 sign = v1 i = uint32(0) for { - if !(i < uint32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { + if !(i < Uint32FromInt32(Int32FromInt32(BF_N)+Int32FromInt32(2))) { break } v3 = Uint32FromInt32(0) @@ -9158,7 +9156,7 @@ func _BF_set_key(tls *TLS, key uintptr, expanded uintptr, initial uintptr, flags *(*TBF_word)(unsafe.Pointer(bp)) <<= uint32(8) *(*TBF_word)(unsafe.Pointer(bp)) |= uint32(*(*uint8)(unsafe.Pointer(ptr))) /* correct */ *(*TBF_word)(unsafe.Pointer(bp + 1*4)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(int8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ + *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= Uint32FromInt8(Int8FromUint8(*(*uint8)(unsafe.Pointer(ptr)))) /* bug */ /* * Sign extension in the first char has no effect - nothing to overwrite yet, * and those extra 24 bits will be fully shifted out of the 32-bit word. For @@ -9238,15 +9236,15 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w } } _, _, _, _, _, _, _, _, _, _, _, _, _ = L, L1, R, count, done, i, ptr, tmp1, tmp2, tmp3, tmp4, v1, v6 - if int32(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || int32(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || int32(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || uint32(int32(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || int32(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) != int32('$') || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 1))) != int32('2') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')) > uint32(25) || !(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')] != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 3))) != int32('$') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0')) > uint32(1) || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5)))-int32('0')) > uint32(9) || Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 6))) != int32('$') { return UintptrFromInt32(0) } - count = Uint32FromInt32(1) << ((int32(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (int32(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) + count = Uint32FromInt32(1) << ((Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 4)))-int32('0'))*int32(10) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 5))) - int32('0'))) if count < min || _BF_decode(tls, bp+4240, setting+7, int32(16)) != 0 { return UintptrFromInt32(0) } _BF_swap(tls, bp+4240, int32(4)) - _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + _BF_set_key(tls, key, bp+4168, bp, _flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) Xmemcpy(tls, bp+72, uintptr(unsafe.Pointer(&_BF_init_state))+72, uint64(4096)) L = uint32(0) R = uint32(0) @@ -9338,8 +9336,8 @@ func _BF_crypt(tls *TLS, key uintptr, setting uintptr, output uintptr, min TBF_w ; i += int32(2) } - Xmemcpy(tls, output, setting, uint64(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) - *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[int32(_BF_atoi64[int32(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] + Xmemcpy(tls, output, setting, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1))) + *(*uint8)(unsafe.Pointer(output + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))) = _BF_itoa64[Int32FromUint8(_BF_atoi64[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(Int32FromInt32(7)+Int32FromInt32(22)-Int32FromInt32(1)))))-int32(0x20)])&int32(0x30)] /* This has to be bug-compatible with the original implementation, so * only encode 23 of the 24 bytes. :-) */ _BF_swap(tls, bp+4240, int32(6)) @@ -9403,14 +9401,14 @@ func X__crypt_blowfish(tls *TLS, key uintptr, setting uintptr, output uintptr) ( */ Xmemcpy(tls, bp, test_setting, uint64(30)) if retval != 0 { - flags = uint32(_flags_by_subtype[int32(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) + flags = uint32(_flags_by_subtype[Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + 2)))-int32('a')]) test_hash = uintptr(unsafe.Pointer(&_test_hashes)) + uintptr(flags&uint32(1))*34 *(*uint8)(unsafe.Pointer(bp + 2)) = *(*uint8)(unsafe.Pointer(setting + 2)) } Xmemset(tls, bp+30, int32(0x55), uint64(63)) *(*uint8)(unsafe.Pointer(bp + 30 + uintptr(Uint64FromInt64(63)-Uint64FromInt32(1)))) = uint8(0) p = _BF_crypt(tls, test_key, bp, bp+30, uint32(1)) - ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, uint64(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, uint64(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) + ok = BoolInt32(p == bp+30 && !(Xmemcmp(tls, p, bp, Uint64FromInt32(Int32FromInt32(7)+Int32FromInt32(22))) != 0) && !(Xmemcmp(tls, p+uintptr(Int32FromInt32(7)+Int32FromInt32(22)), test_hash, Uint64FromInt32(Int32FromInt32(31)+Int32FromInt32(1)+Int32FromInt32(1)+Int32FromInt32(1))) != 0)) k = __ccgo_ts + 58 _BF_set_key(tls, k, bp+96, bp+168, uint8(2)) /* $2a$ */ _BF_set_key(tls, k, bp+240, bp+312, uint8(4)) /* $2y$ */ @@ -11220,7 +11218,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { } } retval &= int32(0x3f) - return uint32(retval) + return Uint32FromInt32(retval) } // C documentation @@ -11230,7 +11228,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { // * containing characters that would violate the passwd file format. // */ func _ascii_is_unsafe(tls *TLS, ch uint8) (r int32) { - return BoolInt32(!(ch != 0) || int32(ch) == int32('\n') || int32(ch) == int32(':')) + return BoolInt32(!(ch != 0) || Int32FromUint8(ch) == int32('\n') || Int32FromUint8(ch) == int32(':')) } func _setup_salt(tls *TLS, salt Tuint32_t) (r Tuint32_t) { @@ -11481,13 +11479,13 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin for q <= bp+128+uintptr(Uint64FromInt64(8)-Uint64FromInt32(1)) { v1 = q q++ - *(*uint8)(unsafe.Pointer(v1)) = uint8(int32(*(*uint8)(unsafe.Pointer(key))) << int32(1)) + *(*uint8)(unsafe.Pointer(v1)) = Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(key))) << int32(1)) if *(*uint8)(unsafe.Pointer(key)) != 0 { key++ } } X__des_setkey(tls, bp+128, bp) - if int32(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(setting))) == int32('_') { /* * "new"-style: * setting - underscore, 4 chars of count, 4 chars of salt @@ -11499,8 +11497,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(5)) { break } - value = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } count |= value << ((i - uint32(1)) * uint32(6)) @@ -11518,8 +11516,8 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin if !(i < uint32(9)) { break } - value1 = _ascii_to_bin(tls, int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) - if int32(_ascii64[value1]) != int32(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { + value1 = _ascii_to_bin(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i))))) + if Int32FromUint8(_ascii64[value1]) != Int32FromUint8(*(*uint8)(unsafe.Pointer(setting + uintptr(i)))) { return UintptrFromInt32(0) } salt |= value1 << ((i - uint32(5)) * uint32(6)) @@ -11543,7 +11541,7 @@ func __crypt_extended_r_uut(tls *TLS, _key uintptr, _setting uintptr, output uin p4 = v5 v6 = key key++ - *(*uint8)(unsafe.Pointer(p4)) = uint8(int32(*(*uint8)(unsafe.Pointer(p4))) ^ int32(*(*uint8)(unsafe.Pointer(v6)))< uint32(KEY_MAX) { return uintptr(0) } @@ -11973,7 +11971,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt salt = setting + uintptr(3) i = uint32(0) for { - if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } goto _1 @@ -12061,7 +12059,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt if !(i < uint32(5)) { break } - p = _to64(tls, p, uint32(int32((*(*[16]uint8)(unsafe.Pointer(bp + 88)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm)) + uintptr(i)*3))])< uint32(KEY_MAX1) { return uintptr(0) } @@ -12490,7 +12488,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui return uintptr(0) } u = Xstrtoul(tls, salt, bp+224, int32(10)) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224))))) != int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224))))) != int32('$') { return uintptr(0) } salt = *(*uintptr)(unsafe.Pointer(bp + 224)) + uintptr(1) @@ -12508,11 +12506,11 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui } i = uint32(0) for { - if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { + if !(i < uint32(SALT_MAX1) && *(*uint8)(unsafe.Pointer(salt + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) != int32('$')) { break } /* reject characters that interfere with /etc/shadow parsing */ - if int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || int32(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32('\n') || Int32FromUint8(*(*uint8)(unsafe.Pointer(salt + uintptr(i)))) == int32(':') { return uintptr(0) } goto _1 @@ -12566,7 +12564,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha256_init(tls, bp) i = uint32(0) for { - if !(i < uint32(int32(16)+int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { + if !(i < Uint32FromInt32(int32(16)+Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { break } _sha256_update(tls, bp, salt, uint64(slen)) @@ -12613,13 +12611,13 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(10)) { break } - p = _to641(tls, p, uint32(int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_perm1)) + uintptr(i)*3))])<= 0) { break } - *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= uint32(int32(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j + *(*Tuint32_t)(unsafe.Pointer(bp + 128 + uintptr(i)*4)) |= Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))&Int32FromInt32(1)) << j goto _2 _2: ; @@ -13909,7 +13907,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) { } else { v1 = int32(1) } - return uint64(v1) + return Uint64FromInt32(v1) } var _table1 = [384]Tint32_t{ @@ -14197,7 +14195,7 @@ func Xisalnum(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0) + return BoolInt32(BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) != 0 || BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0) } func X__isalnum_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14221,7 +14219,7 @@ func Xisalpha(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14277,7 +14275,7 @@ func Xiscntrl(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c) < uint32(0x20) || c == int32(0x7f)) + return BoolInt32(Uint32FromInt32(c) < uint32(0x20) || c == int32(0x7f)) } func X__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14301,7 +14299,7 @@ func Xisdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('0') < uint32(10)) + return BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14325,7 +14323,7 @@ func Xisgraph(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) } func X__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14349,7 +14347,7 @@ func Xislower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('a') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14373,7 +14371,7 @@ func Xisprint(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32(0x20) < uint32(0x5f)) + return BoolInt32(Uint32FromInt32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14397,7 +14395,7 @@ func Xispunct(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32(0x21) < uint32(0x5e)) != 0 && !(Xisalnum(tls, c) != 0)) } func X__ispunct_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14421,7 +14419,7 @@ func Xisspace(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(c == int32(' ') || uint32(c)-uint32('\t') < uint32(5)) + return BoolInt32(c == int32(' ') || Uint32FromInt32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14445,7 +14443,7 @@ func Xisupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(uint32(c)-uint32('A') < uint32(26)) + return BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -17338,7 +17336,7 @@ func Xiswalpha(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table3[uint32(int32(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table3[Uint32FromInt32(Int32FromUint8(_table3[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } if wc < uint32(0x2fffe) { return int32(1) @@ -17367,7 +17365,7 @@ func Xiswblank(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return Xisblank(tls, int32(wc)) + return Xisblank(tls, Int32FromUint32(wc)) } func X__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32) { @@ -17471,8 +17469,8 @@ func Xwctype(tls *TLS, s uintptr) (r Twctype_t) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { - return uint64(i) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) && !(Xstrcmp(tls, s, p) != 0) { + return Uint64FromInt32(i) } goto _1 _1: @@ -17606,10 +17604,10 @@ func Xiswprint(tls *TLS, wc Twint_t) (r int32) { if wc < uint32(0xff) { return BoolInt32((wc+uint32(1))&uint32(0x7f) >= uint32(0x21)) } - if wc < uint32(0x2028) || wc-uint32(0x202a) < uint32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < uint32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { + if wc < uint32(0x2028) || wc-uint32(0x202a) < Uint32FromInt32(Int32FromInt32(0xd800)-Int32FromInt32(0x202a)) || wc-uint32(0xe000) < Uint32FromInt32(Int32FromInt32(0xfff9)-Int32FromInt32(0xe000)) { return int32(1) } - if wc-uint32(0xfffc) > uint32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { + if wc-uint32(0xfffc) > Uint32FromInt32(Int32FromInt32(0x10ffff)-Int32FromInt32(0xfffc)) || wc&uint32(0xfffe) == uint32(0xfffe) { return 0 } return int32(1) @@ -19189,7 +19187,7 @@ func Xiswpunct(tls *TLS, wc Twint_t) (r int32) { defer func() { trc("-> %v", r) }() } if wc < uint32(0x20000) { - return int32(_table4[uint32(int32(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) + return Int32FromUint8(_table4[Uint32FromInt32(Int32FromUint8(_table4[wc>>int32(8)])*int32(32))+wc&uint32(255)>>int32(3)]) >> (wc & uint32(7)) & int32(1) } return 0 } @@ -19226,7 +19224,7 @@ func Xiswspace(tls *TLS, wc Twint_t) (r int32) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), int32(wc)) != 0) + return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), Int32FromUint32(wc)) != 0) } var _spaces = [22]Twchar_t{ @@ -19322,7 +19320,7 @@ func Xisxdigit(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - return BoolInt32(BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) + return BoolInt32(BoolInt32(Uint32FromInt32(c)-uint32('0') < uint32(10)) != 0 || Uint32FromInt32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -19357,7 +19355,7 @@ func Xtolower(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('A') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('A') < uint32(26)) != 0 { return c | int32(32) } return c @@ -19384,7 +19382,7 @@ func Xtoupper(tls *TLS, c int32) (r int32) { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) defer func() { trc("-> %v", r) }() } - if BoolInt32(uint32(c)-uint32('a') < uint32(26)) != 0 { + if BoolInt32(Uint32FromInt32(c)-uint32('a') < uint32(26)) != 0 { return c & int32(0x5f) } return c @@ -22190,40 +22188,40 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { var b, rt, try, v, x, xb, xn, y uint32 var c0, r, rd, v1 int32 _, _, _, _, _, _, _, _, _, _, _, _ = b, c0, r, rd, rt, try, v, x, xb, xn, y, v1 - c0 = int32(c) + c0 = Int32FromUint32(c) if c >= uint32(0x20000) { - return int32(c) + return Int32FromUint32(c) } b = c >> int32(8) c &= uint32(255) x = c / uint32(3) y = c % uint32(3) /* lookup entry in two-level base-6 table */ - v = uint32(_tab1[uint32(int32(_tab1[b])*int32(86))+x]) - v = v * uint32(_mt[y]) >> int32(11) % uint32(6) + v = uint32(_tab1[Uint32FromInt32(Int32FromUint8(_tab1[b])*int32(86))+x]) + v = v * Uint32FromInt32(_mt[y]) >> int32(11) % uint32(6) /* use the bit vector out of the tables as an index into * a block-specific set of rules and decode the rule into * a type and a case-mapping delta. */ r = _rules[uint32(_rulebases[b])+v] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) /* rules 0/1 are simple lower/upper case with a delta. * apply according to desired mapping direction. */ if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* binary search. endpoints of the binary search for * this block are stored in the rule delta field. */ - xn = uint32(rd & int32(0xff)) - xb = uint32(rd) >> int32(8) + xn = Uint32FromInt32(rd & int32(0xff)) + xb = Uint32FromInt32(rd) >> int32(8) for xn != 0 { try = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2))) if try == c { r = _rules[*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2 + 1))] - rt = uint32(r & int32(255)) + rt = Uint32FromInt32(r & int32(255)) rd = r >> int32(8) if rt < uint32(2) { - return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) + return Int32FromUint32(Uint32FromInt32(c0) + Uint32FromInt32(rd)&-(rt^Uint32FromInt32(dir))) } /* Hard-coded for the four exceptional titlecase */ if dir != 0 { @@ -22255,7 +22253,7 @@ func Xtowlower(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, 0)) + return Uint32FromInt32(_casemap(tls, wc, 0)) } func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { @@ -22263,7 +22261,7 @@ func Xtowupper(tls *TLS, wc Twint_t) (r Twint_t) { trc("tls=%v wc=%v, (%v:)", tls, wc, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(_casemap(tls, wc, int32(1))) + return Uint32FromInt32(_casemap(tls, wc, int32(1))) } func X__towupper_l(tls *TLS, c Twint_t, l Tlocale_t) (r Twint_t) { @@ -24462,7 +24460,7 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } var v1, v2 int32 _, _ = v1, v2 - if uint32(wc) < uint32(0xff) { + if Uint32FromInt32(wc) < uint32(0xff) { if (wc+int32(1))&int32(0x7f) >= int32(0x21) { v1 = int32(1) } else { @@ -24475,11 +24473,11 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } return v1 } - if uint32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { - if int32(_table5[int32(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Uint32FromInt32(wc)&uint32(0xfffeffff) < uint32(0xfffe) { + if Int32FromUint8(_table5[Int32FromUint8(_table5[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return 0 } - if int32(_wtable[int32(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { + if Int32FromUint8(_wtable[Int32FromUint8(_wtable[wc>>int32(8)])*int32(32)+wc&int32(255)>>int32(3)])>>(wc&int32(7))&int32(1) != 0 { return int32(2) } return int32(1) @@ -24487,10 +24485,10 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { if wc&int32(0xfffe) == int32(0xfffe) { return -int32(1) } - if uint32(wc)-uint32(0x20000) < uint32(0x20000) { + if Uint32FromInt32(wc)-uint32(0x20000) < uint32(0x20000) { return int32(2) } - if wc == int32(0xe0001) || uint32(wc)-uint32(0xe0020) < uint32(0x5f) || uint32(wc)-uint32(0xe0100) < uint32(0xef) { + if wc == int32(0xe0001) || Uint32FromInt32(wc)-uint32(0xe0020) < uint32(0x5f) || Uint32FromInt32(wc)-uint32(0xe0100) < uint32(0xef) { return 0 } return int32(1) @@ -24816,7 +24814,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { var len1 int32 _, _ = de, len1 if (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos >= (*TDIR)(unsafe.Pointer(dir)).Fbuf_end { - len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), int64(Uint64FromInt64(2048)))) + len1 = int32(X__syscall3(tls, int64(SYS_getdents64), int64((*TDIR)(unsafe.Pointer(dir)).Ffd), int64(dir+24), Int64FromUint64(Uint64FromInt64(2048)))) if len1 <= 0 { if len1 < 0 && len1 != -int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = -len1 @@ -24827,7 +24825,7 @@ func Xreaddir(tls *TLS, dir uintptr) (r uintptr) { (*TDIR)(unsafe.Pointer(dir)).Fbuf_pos = 0 } de = dir + 24 + uintptr((*TDIR)(unsafe.Pointer(dir)).Fbuf_pos) - *(*int32)(unsafe.Pointer(dir + 12)) += int32((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) + *(*int32)(unsafe.Pointer(dir + 12)) += Int32FromUint16((*Tdirent)(unsafe.Pointer(de)).Fd_reclen) (*TDIR)(unsafe.Pointer(dir)).Ftell = (*Tdirent)(unsafe.Pointer(de)).Fd_off return de } @@ -24942,7 +24940,7 @@ func Xscandir(tls *TLS, path uintptr, res uintptr, sel uintptr, cmp uintptr) (r Xqsort(tls, names, cnt, uint64(8), cmp) } *(*uintptr)(unsafe.Pointer(res)) = names - return int32(cnt) + return Int32FromUint64(cnt) } func Xseekdir(tls *TLS, dir uintptr, off int64) { @@ -25071,14 +25069,14 @@ func Xgetenv(tls *TLS, name uintptr) (r uintptr) { var e uintptr var l Tsize_t _, _ = e, l - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if l != 0 && !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) && Xenviron != 0 { e = Xenviron for { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { return *(*uintptr)(unsafe.Pointer(e)) + uintptr(l) + uintptr(1) } goto _1 @@ -25161,7 +25159,7 @@ func Xputenv(tls *TLS, s uintptr) (r int32) { } var l Tsize_t _ = l - l = uint64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) + l = Uint64FromInt64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) if !(l != 0) || !(*(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0) { return Xunsetenv(tls, s) } @@ -25250,7 +25248,7 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) (r int32) { var v2 bool _, _, _, _, _ = l1, l2, s, v1, v2 if v2 = !(var1 != 0); !v2 { - v1 = uint64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) + v1 = Uint64FromInt64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) l1 = v1 } if v2 || !(v1 != 0) || *(*uint8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { @@ -25282,7 +25280,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { var e, eo, v2 uintptr var l Tsize_t _, _, _, _ = e, eo, l, v2 - l = uint64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) + l = Uint64FromInt64(int64(X__strchrnul(tls, name, int32('='))) - int64(name)) if !(l != 0) || *(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) @@ -25294,7 +25292,7 @@ func Xunsetenv(tls *TLS, name uintptr) (r int32) { if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { break } - if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { + if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == int32('=') { X__env_rm_add(tls, *(*uintptr)(unsafe.Pointer(e)), uintptr(0)) } else { if eo != e { @@ -25617,7 +25615,7 @@ func X__strerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { } var s uintptr _ = s - if uint64(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { + if Uint64FromInt32(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { e = 0 } s = uintptr(unsafe.Pointer(&_errmsgstr)) + uintptr(_errmsgidx[e]) @@ -25746,7 +25744,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { arg |= uint64(O_LARGEFILE) } if cmd == int32(F_SETLKW) { - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)), 0, 0, 0)))) } if cmd == int32(F_GETOWN) { ret = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETOWN_EX)), int64(bp))) @@ -25754,7 +25752,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))) } if ret != 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*(*Tf_owner_ex)(unsafe.Pointer(bp))).Ftype1 == int32(F_OWNER_PGRP) { v1 = -(*(*Tf_owner_ex)(unsafe.Pointer(bp))).Fpid @@ -25764,25 +25762,25 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { return v1 } if cmd == int32(F_DUPFD_CLOEXEC) { - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), Int64FromUint64(arg))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(Int32FromInt32(0)))) if ret1 != -int32(EINVAL) { if ret1 >= 0 { X__syscall1(tls, int64(SYS_close), int64(ret1)) } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), int64(arg))) + ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD)), Int64FromUint64(arg))) if ret1 >= 0 { X__syscall3(tls, int64(SYS_fcntl), int64(ret1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(ret1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret1))) } switch cmd { case int32(F_SETLK): @@ -25792,9 +25790,9 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { case int32(F_GETOWN_EX): fallthrough case int32(F_SETOWN_EX): - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(uintptr(arg)))))) default: - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), int64(arg))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(cmd), Int64FromUint64(arg))))) } return r } @@ -25814,11 +25812,11 @@ func Xopen(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) { mode = VaUint32(&ap) _ = ap } - fd = int32(___syscall_cp(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0, 0)) + fd = int32(___syscall_cp(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0, 0)) if fd >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(fd))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd))) } func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r int32) { @@ -25835,7 +25833,7 @@ func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r i mode = VaUint32(&ap) _ = ap } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(mode), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_openat), int64(fd), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), Int64FromUint32(mode), 0, 0)))) } func Xposix_fadvise(tls *TLS, fd int32, base Toff_t, len1 Toff_t, advice int32) (r int32) { @@ -25888,7 +25886,7 @@ func Xfeclearexcept(tls *TLS, mask int32) (r int32) { defer func() { trc("-> %v", r) }() } mask &= int32(FE_ALL_EXCEPT) - _set_fpc(tls, _get_fpc(tls)&uint32(^mask)) + _set_fpc(tls, _get_fpc(tls)&Uint32FromInt32(^mask)) return 0 } @@ -25898,7 +25896,7 @@ func Xferaiseexcept(tls *TLS, mask int32) (r int32) { defer func() { trc("-> %v", r) }() } mask &= int32(FE_ALL_EXCEPT) - _set_fpc(tls, _get_fpc(tls)|uint32(mask)) + _set_fpc(tls, _get_fpc(tls)|Uint32FromInt32(mask)) return 0 } @@ -25907,7 +25905,7 @@ func Xfetestexcept(tls *TLS, mask int32) (r int32) { trc("tls=%v mask=%v, (%v:)", tls, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(_get_fpc(tls) & uint32(mask) & uint32(FE_ALL_EXCEPT)) + return Int32FromUint32(_get_fpc(tls) & Uint32FromInt32(mask) & uint32(FE_ALL_EXCEPT)) } func Xfegetround(tls *TLS) (r int32) { @@ -25915,7 +25913,7 @@ func Xfegetround(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(_get_fpc(tls) & uint32(3)) + return Int32FromUint32(_get_fpc(tls) & uint32(3)) } func X__fesetround(tls *TLS, r int32) (r1 int32) { @@ -25923,7 +25921,7 @@ func X__fesetround(tls *TLS, r int32) (r1 int32) { trc("tls=%v r=%v, (%v:)", tls, r, origin(2)) defer func() { trc("-> %v", r1) }() } - _set_fpc(tls, uint32(int64(_get_fpc(tls)) & ^Int64FromInt64(3) | int64(r))) + _set_fpc(tls, Uint32FromInt64(Int64FromUint32(_get_fpc(tls)) & ^Int64FromInt64(3) | int64(r))) return 0 } @@ -26029,7 +26027,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26040,18 +26038,18 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__shgetc(tls, f) } c = v4 - if uint32(c-int32('0')) >= uint32(10) && pok != 0 { + if Uint32FromInt32(c-int32('0')) >= uint32(10) && pok != 0 { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } } } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -26059,7 +26057,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } x = 0 for { - if !(uint32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x < Int32FromInt32(INT_MAX)/Int32FromInt32(10)) { break } x = int32(10)*x + c - int32('0') @@ -26070,7 +26068,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v12 = f + 8 v11 = *(*uintptr)(unsafe.Pointer(v12)) *(*uintptr)(unsafe.Pointer(v12))++ - v10 = int32(*(*uint8)(unsafe.Pointer(v11))) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v11))) } else { v10 = X__shgetc(tls, f) } @@ -26078,7 +26076,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } y = int64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { break } y = int64(10)*y + int64(c) - int64('0') @@ -26089,14 +26087,14 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 } for { - if !(uint32(c-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10)) { break } goto _17 @@ -26106,7 +26104,7 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { v20 = f + 8 v19 = *(*uintptr)(unsafe.Pointer(v20)) *(*uintptr)(unsafe.Pointer(v20))++ - v18 = int32(*(*uint8)(unsafe.Pointer(v19))) + v18 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) } else { v18 = X__shgetc(tls, f) } @@ -26159,7 +26157,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } @@ -26171,7 +26169,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v8 = f + 8 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ - v6 = int32(*(*uint8)(unsafe.Pointer(v7))) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v7))) } else { v6 = X__shgetc(tls, f) } @@ -26189,7 +26187,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } @@ -26198,7 +26196,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0] = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || c == int32('.')) { break } if c == int32('.') { @@ -26214,9 +26212,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, lnz = int32(dc) } if j != 0 { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(c) - uint32('0') + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + Uint32FromInt32(c) - uint32('0') } else { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(c - int32('0')) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = Uint32FromInt32(c - int32('0')) } j++ v13 = j @@ -26240,7 +26238,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } @@ -26348,9 +26346,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % uint32(p10) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/uint32(p10) + carry - carry = uint32(int32(1000000000)/p10) * tmp + tmp = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] % Uint32FromInt32(p10) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/Uint32FromInt32(p10) + carry + carry = Uint32FromInt32(int32(1000000000)/p10) * tmp if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) rp -= int32(9) @@ -26437,9 +26435,9 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if !(k != z) { break } - tmp2 = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] & uint32(int32(1)<>sh + carry2 - carry2 = uint32(Int32FromInt32(1000000000)>>sh) * tmp2 + carry2 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh) * tmp2 if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) i-- @@ -26572,7 +26570,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__shgetc(tls, f) } @@ -26590,7 +26588,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__shgetc(tls, f) } @@ -26602,7 +26600,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26621,7 +26619,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26630,7 +26628,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } } for { - if !(uint32(c-int32('0')) < uint32(10) || uint32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c|int32(32)-int32('a')) < uint32(6) || c == int32('.')) { break } if c == int32('.') { @@ -26647,7 +26645,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 d = c - int32('0') } if dc < int64(8) { - x = x*uint32(16) + uint32(d) + x = x*uint32(16) + Uint32FromInt32(d) } else { if dc < int64(Int32FromInt32(LDBL_MANT_DIG)/Int32FromInt32(4)+Int32FromInt32(1)) { scale /= Float64FromInt32(16) @@ -26668,7 +26666,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 v18 = f + 8 v17 = *(*uintptr)(unsafe.Pointer(v18)) *(*uintptr)(unsafe.Pointer(v18))++ - v16 = int32(*(*uint8)(unsafe.Pointer(v17))) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) } else { v16 = X__shgetc(tls, f) } @@ -26788,14 +26786,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -26808,7 +26806,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -26816,7 +26814,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { } i = uint64(0) for { - if !(i < uint64(8) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 336 + uintptr(i))))) { + if !(i < uint64(8) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 336 + uintptr(i))))) { break } if i < uint64(7) { @@ -26824,7 +26822,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v14 = f + 8 v13 = *(*uintptr)(unsafe.Pointer(v14)) *(*uintptr)(unsafe.Pointer(v14))++ - v12 = int32(*(*uint8)(unsafe.Pointer(v13))) + v12 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v13))) } else { v12 = X__shgetc(tls, f) } @@ -26860,7 +26858,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { if !(i != 0) { i = uint64(0) for { - if !(i < uint64(3) && c|int32(32) == int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 345 + uintptr(i))))) { + if !(i < uint64(3) && c|int32(32) == Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 345 + uintptr(i))))) { break } if i < uint64(2) { @@ -26868,7 +26866,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v21 = f + 8 v20 = *(*uintptr)(unsafe.Pointer(v21)) *(*uintptr)(unsafe.Pointer(v21))++ - v19 = int32(*(*uint8)(unsafe.Pointer(v20))) + v19 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v20))) } else { v19 = X__shgetc(tls, f) } @@ -26885,7 +26883,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v24 = f + 8 v23 = *(*uintptr)(unsafe.Pointer(v24)) *(*uintptr)(unsafe.Pointer(v24))++ - v22 = int32(*(*uint8)(unsafe.Pointer(v23))) + v22 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) } else { v22 = X__shgetc(tls, f) } @@ -26901,12 +26899,12 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v29 = f + 8 v28 = *(*uintptr)(unsafe.Pointer(v29)) *(*uintptr)(unsafe.Pointer(v29))++ - v27 = int32(*(*uint8)(unsafe.Pointer(v28))) + v27 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) } else { v27 = X__shgetc(tls, f) } c = v27 - if uint32(c-int32('0')) < uint32(10) || uint32(c-int32('A')) < uint32(26) || uint32(c-int32('a')) < uint32(26) || c == int32('_') { + if Uint32FromInt32(c-int32('0')) < uint32(10) || Uint32FromInt32(c-int32('A')) < uint32(26) || Uint32FromInt32(c-int32('a')) < uint32(26) || c == int32('_') { goto _26 } if c == int32(')') { @@ -26951,7 +26949,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { v36 = f + 8 v35 = *(*uintptr)(unsafe.Pointer(v36)) *(*uintptr)(unsafe.Pointer(v36))++ - v34 = int32(*(*uint8)(unsafe.Pointer(v35))) + v34 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v35))) } else { v34 = X__shgetc(tls, f) } @@ -26971,55 +26969,55 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { // // /* Lookup table for digit values. -1==255>=36 -> invalid */ var _table6 = [257]uint8{ - 0: uint8(-Int32FromInt32(1)), - 1: uint8(-Int32FromInt32(1)), - 2: uint8(-Int32FromInt32(1)), - 3: uint8(-Int32FromInt32(1)), - 4: uint8(-Int32FromInt32(1)), - 5: uint8(-Int32FromInt32(1)), - 6: uint8(-Int32FromInt32(1)), - 7: uint8(-Int32FromInt32(1)), - 8: uint8(-Int32FromInt32(1)), - 9: uint8(-Int32FromInt32(1)), - 10: uint8(-Int32FromInt32(1)), - 11: uint8(-Int32FromInt32(1)), - 12: uint8(-Int32FromInt32(1)), - 13: uint8(-Int32FromInt32(1)), - 14: uint8(-Int32FromInt32(1)), - 15: uint8(-Int32FromInt32(1)), - 16: uint8(-Int32FromInt32(1)), - 17: uint8(-Int32FromInt32(1)), - 18: uint8(-Int32FromInt32(1)), - 19: uint8(-Int32FromInt32(1)), - 20: uint8(-Int32FromInt32(1)), - 21: uint8(-Int32FromInt32(1)), - 22: uint8(-Int32FromInt32(1)), - 23: uint8(-Int32FromInt32(1)), - 24: uint8(-Int32FromInt32(1)), - 25: uint8(-Int32FromInt32(1)), - 26: uint8(-Int32FromInt32(1)), - 27: uint8(-Int32FromInt32(1)), - 28: uint8(-Int32FromInt32(1)), - 29: uint8(-Int32FromInt32(1)), - 30: uint8(-Int32FromInt32(1)), - 31: uint8(-Int32FromInt32(1)), - 32: uint8(-Int32FromInt32(1)), - 33: uint8(-Int32FromInt32(1)), - 34: uint8(-Int32FromInt32(1)), - 35: uint8(-Int32FromInt32(1)), - 36: uint8(-Int32FromInt32(1)), - 37: uint8(-Int32FromInt32(1)), - 38: uint8(-Int32FromInt32(1)), - 39: uint8(-Int32FromInt32(1)), - 40: uint8(-Int32FromInt32(1)), - 41: uint8(-Int32FromInt32(1)), - 42: uint8(-Int32FromInt32(1)), - 43: uint8(-Int32FromInt32(1)), - 44: uint8(-Int32FromInt32(1)), - 45: uint8(-Int32FromInt32(1)), - 46: uint8(-Int32FromInt32(1)), - 47: uint8(-Int32FromInt32(1)), - 48: uint8(-Int32FromInt32(1)), + 0: Uint8FromInt32(-Int32FromInt32(1)), + 1: Uint8FromInt32(-Int32FromInt32(1)), + 2: Uint8FromInt32(-Int32FromInt32(1)), + 3: Uint8FromInt32(-Int32FromInt32(1)), + 4: Uint8FromInt32(-Int32FromInt32(1)), + 5: Uint8FromInt32(-Int32FromInt32(1)), + 6: Uint8FromInt32(-Int32FromInt32(1)), + 7: Uint8FromInt32(-Int32FromInt32(1)), + 8: Uint8FromInt32(-Int32FromInt32(1)), + 9: Uint8FromInt32(-Int32FromInt32(1)), + 10: Uint8FromInt32(-Int32FromInt32(1)), + 11: Uint8FromInt32(-Int32FromInt32(1)), + 12: Uint8FromInt32(-Int32FromInt32(1)), + 13: Uint8FromInt32(-Int32FromInt32(1)), + 14: Uint8FromInt32(-Int32FromInt32(1)), + 15: Uint8FromInt32(-Int32FromInt32(1)), + 16: Uint8FromInt32(-Int32FromInt32(1)), + 17: Uint8FromInt32(-Int32FromInt32(1)), + 18: Uint8FromInt32(-Int32FromInt32(1)), + 19: Uint8FromInt32(-Int32FromInt32(1)), + 20: Uint8FromInt32(-Int32FromInt32(1)), + 21: Uint8FromInt32(-Int32FromInt32(1)), + 22: Uint8FromInt32(-Int32FromInt32(1)), + 23: Uint8FromInt32(-Int32FromInt32(1)), + 24: Uint8FromInt32(-Int32FromInt32(1)), + 25: Uint8FromInt32(-Int32FromInt32(1)), + 26: Uint8FromInt32(-Int32FromInt32(1)), + 27: Uint8FromInt32(-Int32FromInt32(1)), + 28: Uint8FromInt32(-Int32FromInt32(1)), + 29: Uint8FromInt32(-Int32FromInt32(1)), + 30: Uint8FromInt32(-Int32FromInt32(1)), + 31: Uint8FromInt32(-Int32FromInt32(1)), + 32: Uint8FromInt32(-Int32FromInt32(1)), + 33: Uint8FromInt32(-Int32FromInt32(1)), + 34: Uint8FromInt32(-Int32FromInt32(1)), + 35: Uint8FromInt32(-Int32FromInt32(1)), + 36: Uint8FromInt32(-Int32FromInt32(1)), + 37: Uint8FromInt32(-Int32FromInt32(1)), + 38: Uint8FromInt32(-Int32FromInt32(1)), + 39: Uint8FromInt32(-Int32FromInt32(1)), + 40: Uint8FromInt32(-Int32FromInt32(1)), + 41: Uint8FromInt32(-Int32FromInt32(1)), + 42: Uint8FromInt32(-Int32FromInt32(1)), + 43: Uint8FromInt32(-Int32FromInt32(1)), + 44: Uint8FromInt32(-Int32FromInt32(1)), + 45: Uint8FromInt32(-Int32FromInt32(1)), + 46: Uint8FromInt32(-Int32FromInt32(1)), + 47: Uint8FromInt32(-Int32FromInt32(1)), + 48: Uint8FromInt32(-Int32FromInt32(1)), 50: uint8(1), 51: uint8(2), 52: uint8(3), @@ -27029,13 +27027,13 @@ var _table6 = [257]uint8{ 56: uint8(7), 57: uint8(8), 58: uint8(9), - 59: uint8(-Int32FromInt32(1)), - 60: uint8(-Int32FromInt32(1)), - 61: uint8(-Int32FromInt32(1)), - 62: uint8(-Int32FromInt32(1)), - 63: uint8(-Int32FromInt32(1)), - 64: uint8(-Int32FromInt32(1)), - 65: uint8(-Int32FromInt32(1)), + 59: Uint8FromInt32(-Int32FromInt32(1)), + 60: Uint8FromInt32(-Int32FromInt32(1)), + 61: Uint8FromInt32(-Int32FromInt32(1)), + 62: Uint8FromInt32(-Int32FromInt32(1)), + 63: Uint8FromInt32(-Int32FromInt32(1)), + 64: Uint8FromInt32(-Int32FromInt32(1)), + 65: Uint8FromInt32(-Int32FromInt32(1)), 66: uint8(10), 67: uint8(11), 68: uint8(12), @@ -27062,12 +27060,12 @@ var _table6 = [257]uint8{ 89: uint8(33), 90: uint8(34), 91: uint8(35), - 92: uint8(-Int32FromInt32(1)), - 93: uint8(-Int32FromInt32(1)), - 94: uint8(-Int32FromInt32(1)), - 95: uint8(-Int32FromInt32(1)), - 96: uint8(-Int32FromInt32(1)), - 97: uint8(-Int32FromInt32(1)), + 92: Uint8FromInt32(-Int32FromInt32(1)), + 93: Uint8FromInt32(-Int32FromInt32(1)), + 94: Uint8FromInt32(-Int32FromInt32(1)), + 95: Uint8FromInt32(-Int32FromInt32(1)), + 96: Uint8FromInt32(-Int32FromInt32(1)), + 97: Uint8FromInt32(-Int32FromInt32(1)), 98: uint8(10), 99: uint8(11), 100: uint8(12), @@ -27094,139 +27092,139 @@ var _table6 = [257]uint8{ 121: uint8(33), 122: uint8(34), 123: uint8(35), - 124: uint8(-Int32FromInt32(1)), - 125: uint8(-Int32FromInt32(1)), - 126: uint8(-Int32FromInt32(1)), - 127: uint8(-Int32FromInt32(1)), - 128: uint8(-Int32FromInt32(1)), - 129: uint8(-Int32FromInt32(1)), - 130: uint8(-Int32FromInt32(1)), - 131: uint8(-Int32FromInt32(1)), - 132: uint8(-Int32FromInt32(1)), - 133: uint8(-Int32FromInt32(1)), - 134: uint8(-Int32FromInt32(1)), - 135: uint8(-Int32FromInt32(1)), - 136: uint8(-Int32FromInt32(1)), - 137: uint8(-Int32FromInt32(1)), - 138: uint8(-Int32FromInt32(1)), - 139: uint8(-Int32FromInt32(1)), - 140: uint8(-Int32FromInt32(1)), - 141: uint8(-Int32FromInt32(1)), - 142: uint8(-Int32FromInt32(1)), - 143: uint8(-Int32FromInt32(1)), - 144: uint8(-Int32FromInt32(1)), - 145: uint8(-Int32FromInt32(1)), - 146: uint8(-Int32FromInt32(1)), - 147: uint8(-Int32FromInt32(1)), - 148: uint8(-Int32FromInt32(1)), - 149: uint8(-Int32FromInt32(1)), - 150: uint8(-Int32FromInt32(1)), - 151: uint8(-Int32FromInt32(1)), - 152: uint8(-Int32FromInt32(1)), - 153: uint8(-Int32FromInt32(1)), - 154: uint8(-Int32FromInt32(1)), - 155: uint8(-Int32FromInt32(1)), - 156: uint8(-Int32FromInt32(1)), - 157: uint8(-Int32FromInt32(1)), - 158: uint8(-Int32FromInt32(1)), - 159: uint8(-Int32FromInt32(1)), - 160: uint8(-Int32FromInt32(1)), - 161: uint8(-Int32FromInt32(1)), - 162: uint8(-Int32FromInt32(1)), - 163: uint8(-Int32FromInt32(1)), - 164: uint8(-Int32FromInt32(1)), - 165: uint8(-Int32FromInt32(1)), - 166: uint8(-Int32FromInt32(1)), - 167: uint8(-Int32FromInt32(1)), - 168: uint8(-Int32FromInt32(1)), - 169: uint8(-Int32FromInt32(1)), - 170: uint8(-Int32FromInt32(1)), - 171: uint8(-Int32FromInt32(1)), - 172: uint8(-Int32FromInt32(1)), - 173: uint8(-Int32FromInt32(1)), - 174: uint8(-Int32FromInt32(1)), - 175: uint8(-Int32FromInt32(1)), - 176: uint8(-Int32FromInt32(1)), - 177: uint8(-Int32FromInt32(1)), - 178: uint8(-Int32FromInt32(1)), - 179: uint8(-Int32FromInt32(1)), - 180: uint8(-Int32FromInt32(1)), - 181: uint8(-Int32FromInt32(1)), - 182: uint8(-Int32FromInt32(1)), - 183: uint8(-Int32FromInt32(1)), - 184: uint8(-Int32FromInt32(1)), - 185: uint8(-Int32FromInt32(1)), - 186: uint8(-Int32FromInt32(1)), - 187: uint8(-Int32FromInt32(1)), - 188: uint8(-Int32FromInt32(1)), - 189: uint8(-Int32FromInt32(1)), - 190: uint8(-Int32FromInt32(1)), - 191: uint8(-Int32FromInt32(1)), - 192: uint8(-Int32FromInt32(1)), - 193: uint8(-Int32FromInt32(1)), - 194: uint8(-Int32FromInt32(1)), - 195: uint8(-Int32FromInt32(1)), - 196: uint8(-Int32FromInt32(1)), - 197: uint8(-Int32FromInt32(1)), - 198: uint8(-Int32FromInt32(1)), - 199: uint8(-Int32FromInt32(1)), - 200: uint8(-Int32FromInt32(1)), - 201: uint8(-Int32FromInt32(1)), - 202: uint8(-Int32FromInt32(1)), - 203: uint8(-Int32FromInt32(1)), - 204: uint8(-Int32FromInt32(1)), - 205: uint8(-Int32FromInt32(1)), - 206: uint8(-Int32FromInt32(1)), - 207: uint8(-Int32FromInt32(1)), - 208: uint8(-Int32FromInt32(1)), - 209: uint8(-Int32FromInt32(1)), - 210: uint8(-Int32FromInt32(1)), - 211: uint8(-Int32FromInt32(1)), - 212: uint8(-Int32FromInt32(1)), - 213: uint8(-Int32FromInt32(1)), - 214: uint8(-Int32FromInt32(1)), - 215: uint8(-Int32FromInt32(1)), - 216: uint8(-Int32FromInt32(1)), - 217: uint8(-Int32FromInt32(1)), - 218: uint8(-Int32FromInt32(1)), - 219: uint8(-Int32FromInt32(1)), - 220: uint8(-Int32FromInt32(1)), - 221: uint8(-Int32FromInt32(1)), - 222: uint8(-Int32FromInt32(1)), - 223: uint8(-Int32FromInt32(1)), - 224: uint8(-Int32FromInt32(1)), - 225: uint8(-Int32FromInt32(1)), - 226: uint8(-Int32FromInt32(1)), - 227: uint8(-Int32FromInt32(1)), - 228: uint8(-Int32FromInt32(1)), - 229: uint8(-Int32FromInt32(1)), - 230: uint8(-Int32FromInt32(1)), - 231: uint8(-Int32FromInt32(1)), - 232: uint8(-Int32FromInt32(1)), - 233: uint8(-Int32FromInt32(1)), - 234: uint8(-Int32FromInt32(1)), - 235: uint8(-Int32FromInt32(1)), - 236: uint8(-Int32FromInt32(1)), - 237: uint8(-Int32FromInt32(1)), - 238: uint8(-Int32FromInt32(1)), - 239: uint8(-Int32FromInt32(1)), - 240: uint8(-Int32FromInt32(1)), - 241: uint8(-Int32FromInt32(1)), - 242: uint8(-Int32FromInt32(1)), - 243: uint8(-Int32FromInt32(1)), - 244: uint8(-Int32FromInt32(1)), - 245: uint8(-Int32FromInt32(1)), - 246: uint8(-Int32FromInt32(1)), - 247: uint8(-Int32FromInt32(1)), - 248: uint8(-Int32FromInt32(1)), - 249: uint8(-Int32FromInt32(1)), - 250: uint8(-Int32FromInt32(1)), - 251: uint8(-Int32FromInt32(1)), - 252: uint8(-Int32FromInt32(1)), - 253: uint8(-Int32FromInt32(1)), - 254: uint8(-Int32FromInt32(1)), - 255: uint8(-Int32FromInt32(1)), - 256: uint8(-Int32FromInt32(1)), + 124: Uint8FromInt32(-Int32FromInt32(1)), + 125: Uint8FromInt32(-Int32FromInt32(1)), + 126: Uint8FromInt32(-Int32FromInt32(1)), + 127: Uint8FromInt32(-Int32FromInt32(1)), + 128: Uint8FromInt32(-Int32FromInt32(1)), + 129: Uint8FromInt32(-Int32FromInt32(1)), + 130: Uint8FromInt32(-Int32FromInt32(1)), + 131: Uint8FromInt32(-Int32FromInt32(1)), + 132: Uint8FromInt32(-Int32FromInt32(1)), + 133: Uint8FromInt32(-Int32FromInt32(1)), + 134: Uint8FromInt32(-Int32FromInt32(1)), + 135: Uint8FromInt32(-Int32FromInt32(1)), + 136: Uint8FromInt32(-Int32FromInt32(1)), + 137: Uint8FromInt32(-Int32FromInt32(1)), + 138: Uint8FromInt32(-Int32FromInt32(1)), + 139: Uint8FromInt32(-Int32FromInt32(1)), + 140: Uint8FromInt32(-Int32FromInt32(1)), + 141: Uint8FromInt32(-Int32FromInt32(1)), + 142: Uint8FromInt32(-Int32FromInt32(1)), + 143: Uint8FromInt32(-Int32FromInt32(1)), + 144: Uint8FromInt32(-Int32FromInt32(1)), + 145: Uint8FromInt32(-Int32FromInt32(1)), + 146: Uint8FromInt32(-Int32FromInt32(1)), + 147: Uint8FromInt32(-Int32FromInt32(1)), + 148: Uint8FromInt32(-Int32FromInt32(1)), + 149: Uint8FromInt32(-Int32FromInt32(1)), + 150: Uint8FromInt32(-Int32FromInt32(1)), + 151: Uint8FromInt32(-Int32FromInt32(1)), + 152: Uint8FromInt32(-Int32FromInt32(1)), + 153: Uint8FromInt32(-Int32FromInt32(1)), + 154: Uint8FromInt32(-Int32FromInt32(1)), + 155: Uint8FromInt32(-Int32FromInt32(1)), + 156: Uint8FromInt32(-Int32FromInt32(1)), + 157: Uint8FromInt32(-Int32FromInt32(1)), + 158: Uint8FromInt32(-Int32FromInt32(1)), + 159: Uint8FromInt32(-Int32FromInt32(1)), + 160: Uint8FromInt32(-Int32FromInt32(1)), + 161: Uint8FromInt32(-Int32FromInt32(1)), + 162: Uint8FromInt32(-Int32FromInt32(1)), + 163: Uint8FromInt32(-Int32FromInt32(1)), + 164: Uint8FromInt32(-Int32FromInt32(1)), + 165: Uint8FromInt32(-Int32FromInt32(1)), + 166: Uint8FromInt32(-Int32FromInt32(1)), + 167: Uint8FromInt32(-Int32FromInt32(1)), + 168: Uint8FromInt32(-Int32FromInt32(1)), + 169: Uint8FromInt32(-Int32FromInt32(1)), + 170: Uint8FromInt32(-Int32FromInt32(1)), + 171: Uint8FromInt32(-Int32FromInt32(1)), + 172: Uint8FromInt32(-Int32FromInt32(1)), + 173: Uint8FromInt32(-Int32FromInt32(1)), + 174: Uint8FromInt32(-Int32FromInt32(1)), + 175: Uint8FromInt32(-Int32FromInt32(1)), + 176: Uint8FromInt32(-Int32FromInt32(1)), + 177: Uint8FromInt32(-Int32FromInt32(1)), + 178: Uint8FromInt32(-Int32FromInt32(1)), + 179: Uint8FromInt32(-Int32FromInt32(1)), + 180: Uint8FromInt32(-Int32FromInt32(1)), + 181: Uint8FromInt32(-Int32FromInt32(1)), + 182: Uint8FromInt32(-Int32FromInt32(1)), + 183: Uint8FromInt32(-Int32FromInt32(1)), + 184: Uint8FromInt32(-Int32FromInt32(1)), + 185: Uint8FromInt32(-Int32FromInt32(1)), + 186: Uint8FromInt32(-Int32FromInt32(1)), + 187: Uint8FromInt32(-Int32FromInt32(1)), + 188: Uint8FromInt32(-Int32FromInt32(1)), + 189: Uint8FromInt32(-Int32FromInt32(1)), + 190: Uint8FromInt32(-Int32FromInt32(1)), + 191: Uint8FromInt32(-Int32FromInt32(1)), + 192: Uint8FromInt32(-Int32FromInt32(1)), + 193: Uint8FromInt32(-Int32FromInt32(1)), + 194: Uint8FromInt32(-Int32FromInt32(1)), + 195: Uint8FromInt32(-Int32FromInt32(1)), + 196: Uint8FromInt32(-Int32FromInt32(1)), + 197: Uint8FromInt32(-Int32FromInt32(1)), + 198: Uint8FromInt32(-Int32FromInt32(1)), + 199: Uint8FromInt32(-Int32FromInt32(1)), + 200: Uint8FromInt32(-Int32FromInt32(1)), + 201: Uint8FromInt32(-Int32FromInt32(1)), + 202: Uint8FromInt32(-Int32FromInt32(1)), + 203: Uint8FromInt32(-Int32FromInt32(1)), + 204: Uint8FromInt32(-Int32FromInt32(1)), + 205: Uint8FromInt32(-Int32FromInt32(1)), + 206: Uint8FromInt32(-Int32FromInt32(1)), + 207: Uint8FromInt32(-Int32FromInt32(1)), + 208: Uint8FromInt32(-Int32FromInt32(1)), + 209: Uint8FromInt32(-Int32FromInt32(1)), + 210: Uint8FromInt32(-Int32FromInt32(1)), + 211: Uint8FromInt32(-Int32FromInt32(1)), + 212: Uint8FromInt32(-Int32FromInt32(1)), + 213: Uint8FromInt32(-Int32FromInt32(1)), + 214: Uint8FromInt32(-Int32FromInt32(1)), + 215: Uint8FromInt32(-Int32FromInt32(1)), + 216: Uint8FromInt32(-Int32FromInt32(1)), + 217: Uint8FromInt32(-Int32FromInt32(1)), + 218: Uint8FromInt32(-Int32FromInt32(1)), + 219: Uint8FromInt32(-Int32FromInt32(1)), + 220: Uint8FromInt32(-Int32FromInt32(1)), + 221: Uint8FromInt32(-Int32FromInt32(1)), + 222: Uint8FromInt32(-Int32FromInt32(1)), + 223: Uint8FromInt32(-Int32FromInt32(1)), + 224: Uint8FromInt32(-Int32FromInt32(1)), + 225: Uint8FromInt32(-Int32FromInt32(1)), + 226: Uint8FromInt32(-Int32FromInt32(1)), + 227: Uint8FromInt32(-Int32FromInt32(1)), + 228: Uint8FromInt32(-Int32FromInt32(1)), + 229: Uint8FromInt32(-Int32FromInt32(1)), + 230: Uint8FromInt32(-Int32FromInt32(1)), + 231: Uint8FromInt32(-Int32FromInt32(1)), + 232: Uint8FromInt32(-Int32FromInt32(1)), + 233: Uint8FromInt32(-Int32FromInt32(1)), + 234: Uint8FromInt32(-Int32FromInt32(1)), + 235: Uint8FromInt32(-Int32FromInt32(1)), + 236: Uint8FromInt32(-Int32FromInt32(1)), + 237: Uint8FromInt32(-Int32FromInt32(1)), + 238: Uint8FromInt32(-Int32FromInt32(1)), + 239: Uint8FromInt32(-Int32FromInt32(1)), + 240: Uint8FromInt32(-Int32FromInt32(1)), + 241: Uint8FromInt32(-Int32FromInt32(1)), + 242: Uint8FromInt32(-Int32FromInt32(1)), + 243: Uint8FromInt32(-Int32FromInt32(1)), + 244: Uint8FromInt32(-Int32FromInt32(1)), + 245: Uint8FromInt32(-Int32FromInt32(1)), + 246: Uint8FromInt32(-Int32FromInt32(1)), + 247: Uint8FromInt32(-Int32FromInt32(1)), + 248: Uint8FromInt32(-Int32FromInt32(1)), + 249: Uint8FromInt32(-Int32FromInt32(1)), + 250: Uint8FromInt32(-Int32FromInt32(1)), + 251: Uint8FromInt32(-Int32FromInt32(1)), + 252: Uint8FromInt32(-Int32FromInt32(1)), + 253: Uint8FromInt32(-Int32FromInt32(1)), + 254: Uint8FromInt32(-Int32FromInt32(1)), + 255: Uint8FromInt32(-Int32FromInt32(1)), + 256: Uint8FromInt32(-Int32FromInt32(1)), } func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint64) { @@ -27250,14 +27248,14 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__shgetc(tls, f) } v1 = v2 c = v1 v5 = v1 - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -27270,7 +27268,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v10 = f + 8 v9 = *(*uintptr)(unsafe.Pointer(v10)) *(*uintptr)(unsafe.Pointer(v10))++ - v8 = int32(*(*uint8)(unsafe.Pointer(v9))) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) } else { v8 = X__shgetc(tls, f) } @@ -27281,7 +27279,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ - v11 = int32(*(*uint8)(unsafe.Pointer(v12))) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) } else { v11 = X__shgetc(tls, f) } @@ -27291,12 +27289,12 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ - v14 = int32(*(*uint8)(unsafe.Pointer(v15))) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v15))) } else { v14 = X__shgetc(tls, f) } c = v14 - if int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= int32(16) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -27331,10 +27329,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint if base == uint32(10) { x = uint32(0) for { - if !(uint32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(10)-Uint32FromInt32(1)) { break } - x = x*uint32(10) + uint32(c-Int32FromUint8('0')) + x = x*uint32(10) + Uint32FromInt32(c-Int32FromUint8('0')) goto _20 _20: ; @@ -27342,7 +27340,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v23 = f + 8 v22 = *(*uintptr)(unsafe.Pointer(v23)) *(*uintptr)(unsafe.Pointer(v23))++ - v21 = int32(*(*uint8)(unsafe.Pointer(v22))) + v21 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v22))) } else { v21 = X__shgetc(tls, f) } @@ -27350,10 +27348,10 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } y = uint64(x) for { - if !(uint32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(c-Int32FromUint8('0'))) { + if !(Uint32FromInt32(c-int32('0')) < uint32(10) && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/Uint64FromInt32(10) && uint64(10)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-Uint64FromInt32(c-Int32FromUint8('0'))) { break } - y = y*uint64(10) + uint64(c-Int32FromUint8('0')) + y = y*uint64(10) + Uint64FromInt32(c-Int32FromUint8('0')) goto _24 _24: ; @@ -27361,18 +27359,18 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v27 = f + 8 v26 = *(*uintptr)(unsafe.Pointer(v27)) *(*uintptr)(unsafe.Pointer(v27))++ - v25 = int32(*(*uint8)(unsafe.Pointer(v26))) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v26))) } else { v25 = X__shgetc(tls, f) } c = v25 } - if uint32(c-int32('0')) >= uint32(10) { + if Uint32FromInt32(c-int32('0')) >= uint32(10) { goto done } } else { if !(base&(base-Uint32FromInt32(1)) != 0) { - bs = int32(*(*uint8)(unsafe.Pointer(__ccgo_ts + 349 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) + bs = Int32FromUint8(*(*uint8)(unsafe.Pointer(__ccgo_ts + 349 + uintptr(uint32(0x17)*base>>int32(5)&uint32(7))))) x = uint32(0) for { if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= Uint32FromUint32(0xffffffff)/Uint32FromInt32(32)) { @@ -27386,7 +27384,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } @@ -27405,7 +27403,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v35 = f + 8 v34 = *(*uintptr)(unsafe.Pointer(v35)) *(*uintptr)(unsafe.Pointer(v35))++ - v33 = int32(*(*uint8)(unsafe.Pointer(v34))) + v33 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v34))) } else { v33 = X__shgetc(tls, f) } @@ -27425,7 +27423,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ - v37 = int32(*(*uint8)(unsafe.Pointer(v38))) + v37 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v38))) } else { v37 = X__shgetc(tls, f) } @@ -27444,7 +27442,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v43 = f + 8 v42 = *(*uintptr)(unsafe.Pointer(v43)) *(*uintptr)(unsafe.Pointer(v43))++ - v41 = int32(*(*uint8)(unsafe.Pointer(v42))) + v41 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v42))) } else { v41 = X__shgetc(tls, f) } @@ -27464,7 +27462,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint v47 = f + 8 v46 = *(*uintptr)(unsafe.Pointer(v47)) *(*uintptr)(unsafe.Pointer(v47))++ - v45 = int32(*(*uint8)(unsafe.Pointer(v46))) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v46))) } else { v45 = X__shgetc(tls, f) } @@ -27493,7 +27491,7 @@ done: } } } - return y ^ uint64(neg) - uint64(neg) + return y ^ Uint64FromInt32(neg) - Uint64FromInt32(neg) } func X__procfdname(tls *TLS, buf uintptr, fd uint32) { @@ -27593,7 +27591,7 @@ func X__shgetc(tls *TLS, f uintptr) (r int32) { } (*TFILE)(unsafe.Pointer(f)).Fshcnt = int64((*TFILE)(unsafe.Pointer(f)).Fbuf) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + cnt if (*TFILE)(unsafe.Pointer(f)).Frpos <= (*TFILE)(unsafe.Pointer(f)).Fbuf { - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = Uint8FromInt32(c) } return c } @@ -27604,10 +27602,10 @@ func X__syscall_ret(tls *TLS, r uint64) (r1 int64) { defer func() { trc("-> %v", r1) }() } if r > -Uint64FromUint64(4096) { - *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(-r) + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = Int32FromUint64(-r) return int64(-int32(1)) } - return int64(r) + return Int64FromUint64(r) } type TElf_Symndx = uint64 @@ -27679,7 +27677,7 @@ func Xftok(tls *TLS, path uintptr, id int32) (r Tkey_t) { if Xstat(tls, path, bp) < 0 { return -int32(1) } - return int32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ino&Uint64FromInt32(0xffff) | (*(*Tstat)(unsafe.Pointer(bp))).Fst_dev&Uint64FromInt32(0xff)< %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgget)), int64(k), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgget)), int64(k), int64(flag))))) } func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32) (r Tssize_t) { @@ -27761,7 +27759,7 @@ func Xmsgrcv(tls *TLS, q int32, m uintptr, len1 Tsize_t, type1 int64, flag int32 0: int64(m), 1: type1, } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgrcv)), int64(q), int64(len1), int64(flag), int64(bp), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgrcv)), int64(q), Int64FromUint64(len1), int64(flag), int64(bp), 0))) } func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { @@ -27769,7 +27767,7 @@ func Xmsgsnd(tls *TLS, q int32, m uintptr, len1 Tsize_t, flag int32) (r int32) { trc("tls=%v q=%v m=%v len1=%v flag=%v, (%v:)", tls, q, m, len1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgsnd)), int64(q), int64(len1), int64(flag), int64(m), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_msgsnd)), int64(q), Int64FromUint64(len1), int64(flag), int64(m), 0)))) } const GETALL = 13 @@ -27857,7 +27855,7 @@ func Xsemctl(tls *TLS, id int32, num int32, cmd int32, va uintptr) (r1 int32) { _ = ap } r = int32(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semctl)), int64(id), int64(num), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(bp))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { @@ -27870,9 +27868,9 @@ func Xsemget(tls *TLS, key Tkey_t, n int32, fl int32) (r int32) { * n fits in the correct (per POSIX) userspace type, so * we have to check here. */ if n > int32(USHRT_MAX) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semget)), int64(key), int64(n), int64(fl))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semget)), int64(key), int64(n), int64(fl))))) } func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { @@ -27880,7 +27878,7 @@ func Xsemop(tls *TLS, id int32, buf uintptr, n Tsize_t) (r int32) { trc("tls=%v id=%v buf=%v n=%v, (%v:)", tls, id, buf, n, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semop)), int64(id), int64(n), int64(Int32FromInt32(0)), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semop)), int64(id), Int64FromUint64(n), int64(Int32FromInt32(0)), int64(buf))))) } const NO_TIME32 = 0 @@ -27914,7 +27912,7 @@ func Xsemtimedop(tls *TLS, id int32, buf uintptr, n Tsize_t, ts uintptr) (r int3 trc("tls=%v id=%v buf=%v n=%v ts=%v, (%v:)", tls, id, buf, n, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semtimedop)), int64(id), int64(n), int64(Int32FromInt32(0)), int64(buf), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_semtimedop)), int64(id), Int64FromUint64(n), int64(Int32FromInt32(0)), int64(buf), int64(ts))))) } const SHMLBA = 4096 @@ -27992,7 +27990,7 @@ func Xshmat(tls *TLS, id int32, _addr uintptr, flag int32) (r uintptr) { var ret uint64 var v1 uintptr _, _ = ret, v1 - ret = uint64(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmat)), int64(id), int64(flag), int64(bp), int64(*(*uintptr)(unsafe.Pointer(bp))))))) + ret = Uint64FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmat)), int64(id), int64(flag), int64(bp), int64(*(*uintptr)(unsafe.Pointer(bp))))))) if ret > -Uint64FromInt32(SHMLBA) { v1 = uintptr(ret) } else { @@ -28009,7 +28007,7 @@ func Xshmctl(tls *TLS, id int32, cmd int32, buf uintptr) (r1 int32) { var r int32 _ = r r = int32(X__syscall6(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmctl)), int64(id), int64(cmd & ^(Int32FromInt32(IPC_STAT)&Int32FromInt32(0x100)) | Int32FromInt32(IPC_64)), int64(Int32FromInt32(0)), int64(buf), int64(Int32FromInt32(0)))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xshmdt(tls *TLS, addr uintptr) (r int32) { @@ -28017,7 +28015,7 @@ func Xshmdt(tls *TLS, addr uintptr) (r int32) { trc("tls=%v addr=%v, (%v:)", tls, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmdt)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmdt)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(Int32FromInt32(0)), int64(addr))))) } func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { @@ -28025,10 +28023,10 @@ func Xshmget(tls *TLS, key Tkey_t, size Tsize_t, flag int32) (r int32) { trc("tls=%v key=%v size=%v flag=%v, (%v:)", tls, key, size, flag, origin(2)) defer func() { trc("-> %v", r) }() } - if size > uint64(Int64FromInt64(INT64_MAX)) { + if size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { size = Uint64FromUint64(0xffffffffffffffff) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmget)), int64(key), int64(size), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_ipc), int64(Int32FromInt32(IPCOP_shmget)), int64(key), Int64FromUint64(size), int64(flag))))) } type Tpasswd = struct { @@ -28293,7 +28291,7 @@ func Xgetdtablesize(tls *TLS) (r int32) { } else { v1 = uint64(INT_MAX) } - return int32(v1) + return Int32FromUint64(v1) } func Xgetloadavg(tls *TLS, a uintptr, n int32) (r int32) { @@ -28524,16 +28522,16 @@ func Xgetpass(tls *TLS, prompt uintptr) (r uintptr) { } Xtcgetattr(tls, fd, bp+60) *(*Ttermios)(unsafe.Pointer(bp)) = *(*Ttermios)(unsafe.Pointer(bp + 60)) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ISIG))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_lflag |= uint32(ICANON) - (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= uint32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) + (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag &= Uint32FromInt32(^(Int32FromInt32(INLCR) | Int32FromInt32(IGNCR))) (*(*Ttermios)(unsafe.Pointer(bp + 60))).Fc_iflag |= uint32(ICRNL) Xtcsetattr(tls, fd, int32(TCSAFLUSH), bp+60) Xtcdrain(tls, fd) Xdprintf(tls, fd, __ccgo_ts+15, VaList(bp+128, prompt)) l = Xread(tls, fd, uintptr(unsafe.Pointer(&_password)), uint64(128)) if l >= 0 { - if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || uint64(l) == uint64(128) { + if l > 0 && Int32FromUint8(_password[l-int64(1)]) == int32('\n') || Uint64FromInt64(l) == uint64(128) { l-- } _password[l] = uint8(0) @@ -28596,7 +28594,7 @@ func Xgetusershell(tls *TLS) (r uintptr) { if l <= 0 { return uintptr(0) } - if int32(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1))))) == int32('\n') { *(*uint8)(unsafe.Pointer(_line + uintptr(l-int64(1)))) = uint8(0) } return _line @@ -28773,12 +28771,12 @@ func Xulimit(tls *TLS, cmd int32, va uintptr) (r int64) { ap = va val = VaInt64(&ap) _ = ap - (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * uint64(val) + (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * Uint64FromInt64(val) if Xsetrlimit(tls, int32(RLIMIT_FSIZE), bp) != 0 { return int64(-int32(1)) } } - return int64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) + return Int64FromUint64((*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur / uint64(512)) } const BOOT_TIME = 2 @@ -29047,7 +29045,7 @@ func Xbrk(tls *TLS, end uintptr) (r int32) { trc("tls=%v end=%v, (%v:)", tls, end, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29055,7 +29053,7 @@ func Xcapset(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capset), int64(a), int64(b))))) } func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { @@ -29063,7 +29061,7 @@ func Xcapget(tls *TLS, a uintptr, b uintptr) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_capget), int64(a), int64(b))))) } func Xchroot(tls *TLS, path uintptr) (r int32) { @@ -29071,7 +29069,7 @@ func Xchroot(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chroot), int64(path))))) } type Tktimex64 = struct { @@ -29190,12 +29188,12 @@ func Xclock_adjtime(tls *TLS, clock_id Tclockid_t, utx uintptr) (r1 int32) { (*Ttimex)(unsafe.Pointer(utx)).Fstbcnt = (*(*Tktimex)(unsafe.Pointer(bp))).Fstbcnt (*Ttimex)(unsafe.Pointer(utx)).Ftai = (*(*Tktimex)(unsafe.Pointer(bp))).Ftai } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } if clock_id == CLOCK_REALTIME { - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_adjtime), int64(clock_id), int64(utx))))) } func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -29203,7 +29201,7 @@ func Xcopy_file_range(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_o trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_copy_file_range), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } const EPOLLERR = 8 @@ -29256,7 +29254,7 @@ func Xepoll_create(tls *TLS, size int32) (r int32) { defer func() { trc("-> %v", r) }() } if size <= 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } return Xepoll_create1(tls, 0) } @@ -29272,7 +29270,7 @@ func Xepoll_create1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = int32(X__syscall1(tls, int64(SYS_epoll_create), int64(Int32FromInt32(1)))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { @@ -29280,7 +29278,7 @@ func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { trc("tls=%v fd=%v op=%v fd2=%v ev=%v, (%v:)", tls, fd, op, fd2, ev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_epoll_ctl), int64(fd), int64(op), int64(fd2), int64(ev))))) } func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uintptr) (r1 int32) { @@ -29294,7 +29292,7 @@ func Xepoll_pwait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32, sigs uint if r == -int32(ENOSYS) && !(sigs != 0) { r = int32(___syscall_cp(tls, int64(SYS_epoll_wait), int64(fd), int64(ev), int64(cnt), int64(to), 0, 0)) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xepoll_wait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32) (r int32) { @@ -29318,11 +29316,11 @@ func Xeventfd(tls *TLS, count uint32, flags int32) (r1 int32) { } var r int32 _ = r - r = int32(X__syscall2(tls, int64(SYS_eventfd2), int64(count), int64(flags))) + r = int32(X__syscall2(tls, int64(SYS_eventfd2), Int64FromUint32(count), int64(flags))) if r == -int32(ENOSYS) && !(flags != 0) { - r = int32(X__syscall1(tls, int64(SYS_eventfd), int64(count))) + r = int32(X__syscall1(tls, int64(SYS_eventfd), Int64FromUint32(count))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { @@ -29332,7 +29330,7 @@ func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { } var v1 int32 _ = v1 - if uint64(8) == uint64(Xread(tls, fd, value, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xread(tls, fd, value, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29350,7 +29348,7 @@ func Xeventfd_write(tls *TLS, fd int32, _value Teventfd_t) (r int32) { *(*Teventfd_t)(unsafe.Pointer(bp)) = _value var v1 int32 _ = v1 - if uint64(8) == uint64(Xwrite(tls, fd, bp, uint64(8))) { + if uint64(8) == Uint64FromInt64(Xwrite(tls, fd, bp, uint64(8))) { v1 = 0 } else { v1 = -int32(1) @@ -29363,7 +29361,7 @@ func Xfallocate(tls *TLS, fd int32, mode int32, base Toff_t, len1 Toff_t) (r int trc("tls=%v fd=%v mode=%v base=%v len1=%v, (%v:)", tls, fd, mode, base, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fallocate), int64(fd), int64(mode), base, len1)))) } const FANOTIFY_METADATA_VERSION = 3 @@ -29508,7 +29506,7 @@ func Xfanotify_init(tls *TLS, flags uint32, event_f_flags uint32) (r int32) { trc("tls=%v flags=%v event_f_flags=%v, (%v:)", tls, flags, event_f_flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fanotify_init), int64(flags), int64(event_f_flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fanotify_init), Int64FromUint32(flags), Int64FromUint32(event_f_flags))))) } func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd int32, pathname uintptr) (r int32) { @@ -29516,7 +29514,7 @@ func Xfanotify_mark(tls *TLS, fanotify_fd int32, flags uint32, mask uint64, dfd trc("tls=%v fanotify_fd=%v flags=%v mask=%v dfd=%v pathname=%v, (%v:)", tls, fanotify_fd, flags, mask, dfd, pathname, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), int64(flags), int64(mask), int64(dfd), int64(pathname))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fanotify_mark), int64(fanotify_fd), Int64FromUint32(flags), Int64FromUint64(mask), int64(dfd), int64(pathname))))) } const LOCK_EX = 2 @@ -29529,7 +29527,7 @@ func Xflock(tls *TLS, fd int32, op int32) (r int32) { trc("tls=%v fd=%v op=%v, (%v:)", tls, fd, op, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_flock), int64(fd), int64(op))))) } func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { @@ -29540,7 +29538,7 @@ func Xgetdents(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if len1 > uint64(INT_MAX) { len1 = uint64(INT_MAX) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getdents64), int64(fd), int64(buf), Int64FromUint64(len1))))) } const GRND_INSECURE = 4 @@ -29552,7 +29550,7 @@ func Xgetrandom(tls *TLS, buf uintptr, buflen Tsize_t, flags uint32) (r Tssize_t trc("tls=%v buf=%v buflen=%v flags=%v, (%v:)", tls, buf, buflen, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), int64(buflen), int64(flags), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_getrandom), int64(buf), Int64FromUint64(buflen), Int64FromUint32(flags), 0, 0, 0))) } const IN_ACCESS = 1 @@ -29609,7 +29607,7 @@ func Xinotify_init1(tls *TLS, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = int32(X__syscall0(tls, int64(SYS_inotify_init))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r int32) { @@ -29617,7 +29615,7 @@ func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r trc("tls=%v fd=%v pathname=%v mask=%v, (%v:)", tls, fd, pathname, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), int64(mask))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_inotify_add_watch), int64(fd), int64(pathname), Int64FromUint32(mask))))) } func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { @@ -29625,7 +29623,7 @@ func Xinotify_rm_watch(tls *TLS, fd int32, wd int32) (r int32) { trc("tls=%v fd=%v wd=%v, (%v:)", tls, fd, wd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_inotify_rm_watch), int64(fd), int64(wd))))) } func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { @@ -29633,7 +29631,7 @@ func Xklogctl(tls *TLS, type1 int32, buf uintptr, len1 int32) (r int32) { trc("tls=%v type1=%v buf=%v len1=%v, (%v:)", tls, type1, buf, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_syslog), int64(type1), int64(buf), int64(len1))))) } const MADV_COLD = 20 @@ -29671,7 +29669,7 @@ func Xmemfd_create(tls *TLS, name uintptr, flags uint32) (r int32) { trc("tls=%v name=%v flags=%v, (%v:)", tls, name, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_memfd_create), int64(name), Int64FromUint32(flags))))) } func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { @@ -29682,7 +29680,7 @@ func Xmlock2(tls *TLS, addr uintptr, len1 Tsize_t, flags uint32) (r int32) { if flags == uint32(0) { return Xmlock(tls, addr, len1) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), int64(len1), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mlock2), int64(addr), Int64FromUint64(len1), Int64FromUint32(flags))))) } func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { @@ -29690,7 +29688,7 @@ func Xinit_module(tls *TLS, a uintptr, b uint64, c uintptr) (r int32) { trc("tls=%v a=%v b=%v c=%v, (%v:)", tls, a, b, c, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_init_module), int64(a), int64(b), int64(c))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_init_module), int64(a), Int64FromUint64(b), int64(c))))) } func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { @@ -29698,7 +29696,7 @@ func Xdelete_module(tls *TLS, a uintptr, b uint32) (r int32) { trc("tls=%v a=%v b=%v, (%v:)", tls, a, b, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_delete_module), int64(a), int64(b))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_delete_module), int64(a), Int64FromUint32(b))))) } const BLKBSZGET = 2147488368 @@ -29946,7 +29944,7 @@ func Xmount(tls *TLS, special uintptr, dir uintptr, fstype uintptr, flags uint64 trc("tls=%v special=%v dir=%v fstype=%v flags=%v data=%v, (%v:)", tls, special, dir, fstype, flags, data, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), int64(flags), int64(data))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mount), int64(special), int64(dir), int64(fstype), Int64FromUint64(flags), int64(data))))) } func Xumount(tls *TLS, special uintptr) (r int32) { @@ -29954,7 +29952,7 @@ func Xumount(tls *TLS, special uintptr) (r int32) { trc("tls=%v special=%v, (%v:)", tls, special, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(Int32FromInt32(0)))))) } func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { @@ -29962,7 +29960,7 @@ func Xumount2(tls *TLS, special uintptr, flags int32) (r int32) { trc("tls=%v special=%v flags=%v, (%v:)", tls, special, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_umount2), int64(special), int64(flags))))) } func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, mount_id uintptr, flags int32) (r int32) { @@ -29970,7 +29968,7 @@ func Xname_to_handle_at(tls *TLS, dirfd int32, pathname uintptr, handle uintptr, trc("tls=%v dirfd=%v pathname=%v handle=%v mount_id=%v flags=%v, (%v:)", tls, dirfd, pathname, handle, mount_id, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_name_to_handle_at), int64(dirfd), int64(pathname), int64(handle), int64(mount_id), int64(flags))))) } func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) (r int32) { @@ -29978,7 +29976,7 @@ func Xopen_by_handle_at(tls *TLS, mount_fd int32, handle uintptr, flags int32) ( trc("tls=%v mount_fd=%v handle=%v flags=%v, (%v:)", tls, mount_fd, handle, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open_by_handle_at), int64(mount_fd), int64(handle), int64(flags))))) } const ADDR_COMPAT_LAYOUT = 2097152 @@ -30021,7 +30019,7 @@ func Xpersonality(tls *TLS, persona uint64) (r int32) { trc("tls=%v persona=%v, (%v:)", tls, persona, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_personality), int64(persona))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_personality), Int64FromUint64(persona))))) } func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { @@ -30029,7 +30027,7 @@ func Xpivot_root(tls *TLS, new1 uintptr, old uintptr) (r int32) { trc("tls=%v new1=%v old=%v, (%v:)", tls, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_pivot_root), int64(new1), int64(old))))) } const PR_CAPBSET_DROP = 24 @@ -30206,7 +30204,7 @@ func Xprctl(tls *TLS, op int32, va uintptr) (r int32) { i++ } _ = ap - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_prctl), int64(op), int64(x[0]), int64(x[int32(1)]), int64(x[int32(2)]), int64(x[int32(3)]))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_prctl), int64(op), Int64FromUint64(x[0]), Int64FromUint64(x[int32(1)]), Int64FromUint64(x[int32(2)]), Int64FromUint64(x[int32(3)]))))) } const RWF_APPEND = 16 @@ -30225,9 +30223,9 @@ func Xpreadv2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags in if ofs == int64(-int32(1)) { return Xreadv(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit uintptr) (r1 int32) { @@ -30250,7 +30248,7 @@ func Xprlimit(tls *TLS, pid Tpid_t, resource int32, new_limit uintptr, old_limit } new_limit = bp } - r = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(pid), int64(resource), int64(new_limit), int64(old_limit))))) if !(r != 0) && old_limit != 0 && Bool(^Uint64FromUint64(0) != ^Uint64FromUint64(0)) { if (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(old_limit)).Frlim_cur = ^Uint64FromUint64(0) @@ -30267,7 +30265,7 @@ func Xprocess_vm_writev(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_writev), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec uintptr, riovcnt uint64, flags uint64) (r Tssize_t) { @@ -30275,7 +30273,7 @@ func Xprocess_vm_readv(tls *TLS, pid Tpid_t, lvec uintptr, liovcnt uint64, rvec trc("tls=%v pid=%v lvec=%v liovcnt=%v rvec=%v riovcnt=%v flags=%v, (%v:)", tls, pid, lvec, liovcnt, rvec, riovcnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), int64(liovcnt), int64(rvec), int64(riovcnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_process_vm_readv), int64(pid), int64(lvec), Int64FromUint64(liovcnt), int64(rvec), Int64FromUint64(riovcnt), Int64FromUint64(flags)))) } const PTRACE_ATTACH = 16 @@ -30435,11 +30433,11 @@ func Xptrace(tls *TLS, req int32, va uintptr) (r int64) { data = VaUintptr(&ap) /* PTRACE_{READ,WRITE}{DATA,TEXT} (16...19) are specific to SPARC. */ _ = ap - if uint32(req)-uint32(1) < uint32(3) { + if Uint32FromInt32(req)-uint32(1) < uint32(3) { data = bp } - ret = X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) - if ret < 0 || uint32(req)-uint32(1) >= uint32(3) { + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_ptrace), int64(req), int64(pid), int64(addr), int64(data), int64(addr2)))) + if ret < 0 || Uint32FromInt32(req)-uint32(1) >= uint32(3) { return ret } return *(*int64)(unsafe.Pointer(bp)) @@ -30454,9 +30452,9 @@ func Xpwritev2(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t, flags i if ofs == int64(-int32(1)) { return Xwritev(tls, fd, iov, count) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev2), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), int64(flags)))) } const GRPQUOTA = 1 @@ -30522,7 +30520,7 @@ func Xquotactl(tls *TLS, cmd int32, special uintptr, id int32, addr uintptr) (r trc("tls=%v cmd=%v special=%v id=%v addr=%v, (%v:)", tls, cmd, special, id, addr, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_quotactl), int64(cmd), int64(special), int64(id), int64(addr))))) } func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { @@ -30530,7 +30528,7 @@ func Xreadahead(tls *TLS, fd int32, pos Toff_t, len1 Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v pos=%v len1=%v, (%v:)", tls, fd, pos, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, int64(len1)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readahead), int64(fd), pos, Int64FromUint64(len1)))) } const RB_AUTOBOOT = 19088743 @@ -30546,7 +30544,7 @@ func Xreboot(tls *TLS, type1 int32) (r int32) { trc("tls=%v type1=%v, (%v:)", tls, type1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_reboot), int64(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_reboot), Int64FromUint32(Uint32FromUint32(0xfee1dead)), int64(Int32FromInt32(672274793)), int64(type1))))) } func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff Tsize_t, flags int32) (r int32) { @@ -30554,7 +30552,7 @@ func Xremap_file_pages(tls *TLS, addr uintptr, size Tsize_t, prot int32, pgoff T trc("tls=%v addr=%v size=%v prot=%v pgoff=%v flags=%v, (%v:)", tls, addr, size, prot, pgoff, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), int64(size), int64(prot), int64(pgoff), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_remap_file_pages), int64(addr), Int64FromUint64(size), int64(prot), Int64FromUint64(pgoff), int64(flags))))) } func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { @@ -30563,7 +30561,7 @@ func Xsbrk(tls *TLS, inc Tintptr_t) (r uintptr) { defer func() { trc("-> %v", r) }() } if inc != 0 { - return uintptr(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOMEM)))) + return uintptr(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOMEM)))) } return uintptr(X__syscall1(tls, int64(SYS_brk), int64(Int32FromInt32(0)))) } @@ -30573,7 +30571,7 @@ func Xsendfile(tls *TLS, out_fd int32, in_fd int32, ofs uintptr, count Tsize_t) trc("tls=%v out_fd=%v in_fd=%v ofs=%v count=%v, (%v:)", tls, out_fd, in_fd, ofs, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), int64(count)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sendfile), int64(out_fd), int64(in_fd), int64(ofs), Int64FromUint64(count)))) } func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { @@ -30581,7 +30579,7 @@ func Xsetfsgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsgid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsgid), Int64FromUint32(gid))))) } func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { @@ -30589,7 +30587,7 @@ func Xsetfsuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_setfsuid), int64(uid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_setfsuid), Int64FromUint32(uid))))) } func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -30597,7 +30595,7 @@ func Xsethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sethostname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sethostname), int64(name), Int64FromUint64(len1))))) } const CLONE_CHILD_CLEARTID = 2097152 @@ -30637,7 +30635,7 @@ func Xsetns(tls *TLS, fd int32, nstype int32) (r int32) { trc("tls=%v fd=%v nstype=%v, (%v:)", tls, fd, nstype, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setns), int64(fd), int64(nstype))))) } const __tm_gmtoff = 0 @@ -30667,8 +30665,8 @@ func Xsettimeofday(tls *TLS, tv uintptr, tz uintptr) (r int32) { if !(tv != 0) { return 0 } - if uint64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ Ftv_sec: (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec, @@ -30714,7 +30712,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { _ = ret ret = int32(X__syscall4(tls, int64(SYS_signalfd4), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), int64(flags))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } ret = int32(X__syscall3(tls, int64(SYS_signalfd), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if ret >= 0 { @@ -30725,7 +30723,7 @@ func Xsignalfd(tls *TLS, fd int32, sigs uintptr, flags int32) (r int32) { X__syscall3(tls, int64(SYS_fcntl), int64(ret), int64(Int32FromInt32(F_SETFL)), int64(Int32FromInt32(O_NONBLOCK))) } } - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintptr, len1 Tsize_t, flags uint32) (r Tssize_t) { @@ -30733,7 +30731,7 @@ func Xsplice(tls *TLS, fd_in int32, off_in uintptr, fd_out int32, off_out uintpt trc("tls=%v fd_in=%v off_in=%v fd_out=%v off_out=%v len1=%v flags=%v, (%v:)", tls, fd_in, off_in, fd_out, off_out, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, int64(SYS_splice), int64(fd_in), int64(off_in), int64(fd_out), int64(off_out), Int64FromUint64(len1), Int64FromUint32(flags)))) } func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx uintptr) (r int32) { @@ -30746,9 +30744,9 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u var ret int32 var _ /* st at bp+0 */ Tstat _ = ret - ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), int64(mask), int64(stx))) + ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), Int64FromUint32(mask), int64(stx))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } ret = Xfstatat(tls, dirfd, path, bp, flags) if ret != 0 { @@ -30761,15 +30759,15 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u (*Tstatx)(unsafe.Pointer(stx)).Fstx_nlink = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink) (*Tstatx)(unsafe.Pointer(stx)).Fstx_uid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_uid (*Tstatx)(unsafe.Pointer(stx)).Fstx_gid = (*(*Tstat)(unsafe.Pointer(bp))).Fst_gid - (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) - (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_size = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blksize = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blksize) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_blocks = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_blocks) (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_atime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_atim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_mtime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_mtim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_sec = (*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_sec - (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = uint32((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) + (*Tstatx)(unsafe.Pointer(stx)).Fstx_ctime.Ftv_nsec = Uint32FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_ctim.Ftv_nsec) (*Tstatx)(unsafe.Pointer(stx)).Fstx_btime = Tstatx_timestamp{} (*Tstatx)(unsafe.Pointer(stx)).Fstx_mask = uint32(0x7ff) return 0 @@ -30799,7 +30797,7 @@ func Xswapon(tls *TLS, path uintptr, flags int32) (r int32) { trc("tls=%v path=%v flags=%v, (%v:)", tls, path, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_swapon), int64(path), int64(flags))))) } func Xswapoff(tls *TLS, path uintptr) (r int32) { @@ -30807,7 +30805,7 @@ func Xswapoff(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_swapoff), int64(path))))) } func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) (r int32) { @@ -30815,7 +30813,7 @@ func Xsync_file_range(tls *TLS, fd int32, pos Toff_t, len1 Toff_t, flags uint32) trc("tls=%v fd=%v pos=%v len1=%v flags=%v, (%v:)", tls, fd, pos, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_sync_file_range), int64(fd), pos, len1, Int64FromUint32(flags))))) } func Xsyncfs(tls *TLS, fd int32) (r int32) { @@ -30823,7 +30821,7 @@ func Xsyncfs(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_syncfs), int64(fd))))) } func X__lsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30831,7 +30829,7 @@ func X__lsysinfo(tls *TLS, info uintptr) (r int32) { trc("tls=%v info=%v, (%v:)", tls, info, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_sysinfo), int64(info))))) } func Xsysinfo(tls *TLS, info uintptr) (r int32) { @@ -30847,7 +30845,7 @@ func Xtee(tls *TLS, src int32, dest int32, len1 Tsize_t, flags uint32) (r Tssize trc("tls=%v src=%v dest=%v len1=%v flags=%v, (%v:)", tls, src, dest, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), int64(len1), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_tee), int64(src), int64(dest), Int64FromUint64(len1), Int64FromUint32(flags)))) } const TFD_CLOEXEC = 524288 @@ -30860,7 +30858,7 @@ func Xtimerfd_create(tls *TLS, clockid int32, flags int32) (r int32) { trc("tls=%v clockid=%v flags=%v, (%v:)", tls, clockid, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_create), int64(clockid), int64(flags))))) } func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr) (r int32) { @@ -30868,7 +30866,7 @@ func Xtimerfd_settime(tls *TLS, fd int32, flags int32, new1 uintptr, old uintptr trc("tls=%v fd=%v flags=%v new1=%v old=%v, (%v:)", tls, fd, flags, new1, old, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timerfd_settime), int64(fd), int64(flags), int64(new1), int64(old))))) } func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { @@ -30876,7 +30874,7 @@ func Xtimerfd_gettime(tls *TLS, fd int32, cur uintptr) (r int32) { trc("tls=%v fd=%v cur=%v, (%v:)", tls, fd, cur, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timerfd_gettime), int64(fd), int64(cur))))) } func Xunshare(tls *TLS, flags int32) (r int32) { @@ -30884,7 +30882,7 @@ func Xunshare(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_unshare), int64(flags))))) } func Xutimes(tls *TLS, path uintptr, times uintptr) (r int32) { @@ -30900,7 +30898,7 @@ func Xvhangup(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_vhangup))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_vhangup))))) } func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Tssize_t) { @@ -30908,7 +30906,7 @@ func Xvmsplice(tls *TLS, fd int32, iov uintptr, cnt Tsize_t, flags uint32) (r Ts trc("tls=%v fd=%v iov=%v cnt=%v flags=%v, (%v:)", tls, fd, iov, cnt, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), int64(cnt), int64(flags)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_vmsplice), int64(fd), int64(iov), Int64FromUint64(cnt), Int64FromUint32(flags)))) } const NSIG = 65 @@ -31000,7 +30998,7 @@ func Xwait4(tls *TLS, pid Tpid_t, status uintptr, options int32, ru uintptr) (r1 Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } const XATTR_CREATE = 1 @@ -31012,7 +31010,7 @@ func Xgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_getxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31020,7 +31018,7 @@ func Xlgetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v, (%v:)", tls, path, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_lgetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size)))) } func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t) (r Tssize_t) { @@ -31028,7 +31026,7 @@ func Xfgetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v, (%v:)", tls, filedes, name, value, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_fgetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size)))) } func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31036,7 +31034,7 @@ func Xlistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_listxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31044,7 +31042,7 @@ func Xllistxattr(tls *TLS, path uintptr, list uintptr, size Tsize_t) (r Tssize_t trc("tls=%v path=%v list=%v size=%v, (%v:)", tls, path, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_llistxattr), int64(path), int64(list), Int64FromUint64(size)))) } func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_t) { @@ -31052,7 +31050,7 @@ func Xflistxattr(tls *TLS, filedes int32, list uintptr, size Tsize_t) (r Tssize_ trc("tls=%v filedes=%v list=%v size=%v, (%v:)", tls, filedes, list, size, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), int64(size)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_flistxattr), int64(filedes), int64(list), Int64FromUint64(size)))) } func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31060,7 +31058,7 @@ func Xsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_setxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31068,7 +31066,7 @@ func Xlsetxattr(tls *TLS, path uintptr, name uintptr, value uintptr, size Tsize_ trc("tls=%v path=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, path, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_lsetxattr), int64(path), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize_t, flags int32) (r int32) { @@ -31076,7 +31074,7 @@ func Xfsetxattr(tls *TLS, filedes int32, name uintptr, value uintptr, size Tsize trc("tls=%v filedes=%v name=%v value=%v size=%v flags=%v, (%v:)", tls, filedes, name, value, size, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), int64(size), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fsetxattr), int64(filedes), int64(name), int64(value), Int64FromUint64(size), int64(flags))))) } func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31084,7 +31082,7 @@ func Xremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_removexattr), int64(path), int64(name))))) } func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { @@ -31092,7 +31090,7 @@ func Xlremovexattr(tls *TLS, path uintptr, name uintptr) (r int32) { trc("tls=%v path=%v name=%v, (%v:)", tls, path, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_lremovexattr), int64(path), int64(name))))) } func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { @@ -31100,7 +31098,7 @@ func Xfremovexattr(tls *TLS, fd int32, name uintptr) (r int32) { trc("tls=%v fd=%v name=%v, (%v:)", tls, fd, name, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_fremovexattr), int64(fd), int64(name))))) } type Tucontext_t2 = struct { @@ -31152,7 +31150,7 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { var sign, sw int32 _, _, _, _, _, _, _, _, _, _, _ = b, mo, n, o, ol, os, sign, sw, t, tl, ts mo = p - sw = int32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) + sw = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(mo)) - uint32(0x950412de)) b = uint32(0) n = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 2*4)), sw) o = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 3*4)), sw) @@ -31209,9 +31207,9 @@ func Xbind_textdomain_codeset(tls *TLS, domainname uintptr, codeset uintptr) (r var _empty_mo = [5]Tuint32_t{ 0: uint32(0x950412de), - 2: uint32(-Int32FromInt32(1)), - 3: uint32(-Int32FromInt32(1)), - 4: uint32(-Int32FromInt32(1)), + 2: Uint32FromInt32(-Int32FromInt32(1)), + 3: Uint32FromInt32(-Int32FromInt32(1)), + 4: Uint32FromInt32(-Int32FromInt32(1)), } const NL_CAT_LOCALE = 1 @@ -31269,8 +31267,8 @@ func Xcatgets(tls *TLS, catd Tnl_catd, set_id int32, msg_id int32, s uintptr) (r sets = map1 + uintptr(20) msgs = map1 + uintptr(20) + uintptr(*(*Tuint32_t)(unsafe.Pointer(map1 + UintptrFromInt32(12)))) strings = map1 + uintptr(20) + uintptr(*(*Tuint32_t)(unsafe.Pointer(map1 + UintptrFromInt32(16)))) - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32(set_id) - *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uint32(msg_id) + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32(set_id) + *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = Uint32FromInt32(msg_id) set = Xbsearch(tls, bp, sets, uint64(nsets), uint64(12), __ccgo_fp(_cmp)) if !(set != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMSG) @@ -31407,13 +31405,13 @@ func Xcatopen(tls *TLS, name uintptr, oflag int32) (r Tnl_catd) { if !(p < z) { break } - if int32(*(*uint8)(unsafe.Pointer(p))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32('%') { v = p l = Uint64FromInt32(1) } else { p++ v6 = p - switch int32(*(*uint8)(unsafe.Pointer(v6))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) { case int32('N'): v = name l = Xstrlen(tls, v) @@ -31502,7 +31500,7 @@ func _gettextdir(tls *TLS, domainname uintptr, dirlen uintptr) (r uintptr) { break } if !(Xstrcmp(tls, (*Tbinding)(unsafe.Pointer(p)).Fdomainname, domainname) != 0) && AtomicLoadPInt32(p+12) != 0 { - *(*Tsize_t)(unsafe.Pointer(dirlen)) = uint64((*Tbinding)(unsafe.Pointer(p)).Fdirlen) + *(*Tsize_t)(unsafe.Pointer(dirlen)) = Uint64FromInt32((*Tbinding)(unsafe.Pointer(p)).Fdirlen) return (*Tbinding)(unsafe.Pointer(p)).Fdirname } goto _1 @@ -31532,7 +31530,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r uintptr) *(*Tsize_t)(unsafe.Pointer(bp)) = uint64(0) return _gettextdir(tls, domainname, bp) } - domlen = Xstrnlen(tls, domainname, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + domlen = Xstrnlen(tls, domainname, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) dirlen = Xstrnlen(tls, dirname, uint64(PATH_MAX)) if domlen > uint64(NAME_MAX) || dirlen >= uint64(PATH_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) @@ -31559,7 +31557,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r uintptr) return uintptr(0) } (*Tbinding)(unsafe.Pointer(p2)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) - (*Tbinding)(unsafe.Pointer(p2)).Fdirlen = int32(dirlen) + (*Tbinding)(unsafe.Pointer(p2)).Fdirlen = Int32FromUint64(dirlen) (*Tbinding)(unsafe.Pointer(p2)).Fdomainname = p2 + 32 (*Tbinding)(unsafe.Pointer(p2)).Fdirname = p2 + 32 + uintptr(domlen) + uintptr(1) Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p2)).Fdomainname, domainname, domlen+uint64(1)) @@ -31656,13 +31654,13 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n if !(msgid1 != 0) { goto notrans } - if uint32(category) >= uint32(LC_ALL) { + if Uint32FromInt32(category) >= uint32(LC_ALL) { goto notrans } if !(domainname != 0) { domainname = X__gettextdomain(tls) } - domlen = Xstrnlen(tls, domainname, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + domlen = Xstrnlen(tls, domainname, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if domlen > uint64(NAME_MAX) { goto notrans } @@ -31715,7 +31713,7 @@ _2: dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 16 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 - dirlen = uint64((*Tbinding)(unsafe.Pointer(q)).Fdirlen) + dirlen = Uint64FromInt32((*Tbinding)(unsafe.Pointer(q)).Fdirlen) loclen = Xstrlen(tls, locname) catlen = uint64(_catlens[category]) /* Logically split @mod suffix from locale name. */ @@ -31723,19 +31721,19 @@ _2: if !(modname != 0) { modname = locname + uintptr(loclen) } - v5 = loclen - uint64(int64(modname)-int64(locname)) + v5 = loclen - Uint64FromInt64(int64(modname)-int64(locname)) modlen = v5 alt_modlen = v5 - loclen = uint64(int64(modname) - int64(locname)) + loclen = Uint64FromInt64(int64(modname) - int64(locname)) /* Drop .charset identifier; it is not used. */ csp = Xmemchr(tls, locname, int32('.'), loclen) if csp != 0 { - loclen = uint64(int64(csp) - int64(locname)) + loclen = Uint64FromInt64(int64(csp) - int64(locname)) } v6 = dirlen + uint64(1) + loclen + modlen + uint64(1) + catlen + uint64(1) + domlen + uint64(3) + uint64(1) name = Xrealloc(tls, name, v6) for { - Xsnprintf(tls, name, v6, __ccgo_ts+463, VaList(bp+24, dirname, int32(loclen), locname, int32(alt_modlen), modname, catname, domainname)) + Xsnprintf(tls, name, v6, __ccgo_ts+463, VaList(bp+24, dirname, Int32FromUint64(loclen), locname, Int32FromUint64(alt_modlen), modname, catname, domainname)) v8 = X__map_file(tls, name, bp) map1 = v8 if v8 != 0 { @@ -31748,7 +31746,7 @@ _2: v9 = Xmemchr(tls, locname, int32('_'), loclen) locp = v9 if v9 != 0 { - loclen = uint64(int64(locp) - int64(locname)) + loclen = Uint64FromInt64(int64(locp) - int64(locname)) alt_modlen = modlen } else { break @@ -31785,8 +31783,8 @@ _2: if r != 0 { r += uintptr(13) for { - v11 = int32(*(*uint8)(unsafe.Pointer(r))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: if !(v12 != 0) { @@ -31798,14 +31796,14 @@ _2: np = Xstrtoul(tls, r+uintptr(9), bp+8, int32(10)) r = *(*uintptr)(unsafe.Pointer(bp + 8)) } - for *(*uint8)(unsafe.Pointer(r)) != 0 && int32(*(*uint8)(unsafe.Pointer(r))) != int32(';') { + for *(*uint8)(unsafe.Pointer(r)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) != int32(';') { r++ } if *(*uint8)(unsafe.Pointer(r)) != 0 { r++ for { - v14 = int32(*(*uint8)(unsafe.Pointer(r))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: if !(v15 != 0) { @@ -31818,7 +31816,7 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals = Int32FromUint64(np) (*Tmsgcat)(unsafe.Pointer(p1)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) @@ -31850,7 +31848,7 @@ _2: * msgid2 to request that dcngettext suppress plural processing. */ if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals != 0 { plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p1)).Fplural_rule, n) - if plural > uint64((*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals) { + if plural > Uint64FromInt32((*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals) { goto notrans } for { @@ -31859,7 +31857,7 @@ _2: if !(v21 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size - uint64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p1)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size - Uint64FromInt64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p1)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint64(1) >= rem { goto notrans @@ -98088,7 +98086,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(a)) != 0 && *(*uint8)(unsafe.Pointer(b)) != 0) { break } - for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && uint32(int32(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { + for *(*uint8)(unsafe.Pointer(a)) != 0 && uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32)-uint32('a') > uint32(26) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))-int32('0')) > uint32(10) { a++ } if uint32(*(*uint8)(unsafe.Pointer(a)))|uint32(32) != uint32(*(*uint8)(unsafe.Pointer(b))) { @@ -98100,7 +98098,7 @@ func _fuzzycmp(tls *TLS, a uintptr, b uintptr) (r int32) { a++ b++ } - return BoolInt32(int32(*(*uint8)(unsafe.Pointer(a))) != int32(*(*uint8)(unsafe.Pointer(b)))) + return BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(b)))) } func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { @@ -98124,11 +98122,11 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { ; s += uintptr(Xstrlen(tls, s) + uint64(1)) } - return uint64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) + return Uint64FromInt64(int64(s+uintptr(1)) - t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_charmaps)))) } s += uintptr(Xstrlen(tls, s) + uint64(1)) if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - if int32(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) > int32(0200) { s += uintptr(2) } else { s += uintptr(uint32(2) + (uint32(64)-uint32(*(*uint8)(unsafe.Pointer(s + 1))))*uint32(5)) @@ -98137,7 +98135,7 @@ func _find_charmap(tls *TLS, name uintptr) (r Tsize_t) { goto _1 _1: } - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } type Tstateful_cd = struct { @@ -98169,16 +98167,16 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { _, _, _, _, _, _, _ = cd, f, scd, t, v1, v2, v3 v1 = _find_charmap(tls, to) t = v1 - if v3 = v1 == uint64(-Int32FromInt32(1)); !v3 { + if v3 = v1 == Uint64FromInt32(-Int32FromInt32(1)); !v3 { v2 = _find_charmap(tls, from) f = v2 } - if v3 || v2 == uint64(-Int32FromInt32(1)) || int32(_charmaps[t]) >= int32(0330) { + if v3 || v2 == Uint64FromInt32(-Int32FromInt32(1)) || Int32FromUint8(_charmaps[t]) >= int32(0330) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(-Int32FromInt32(1)) } cd = _combine_to_from(tls, t, f) - switch int32(_charmaps[f]) { + switch Int32FromUint8(_charmaps[f]) { case int32(UTF_16): fallthrough case int32(UTF_32): @@ -98199,7 +98197,7 @@ func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { func _get_16(tls *TLS, s uintptr, e int32) (r uint32) { e &= int32(1) - return uint32(int32(*(*uint8)(unsafe.Pointer(s + uintptr(e))))<>(uint32(2)*x%uint32(8)) | int32(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) + x = c - Uint32FromInt32(int32(4)*Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1)))))) + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)))))>>(uint32(2)*x%uint32(8)) | Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + uintptr(x*uint32(5)/uint32(4)+uint32(1)))))<<(uint32(8)-uint32(2)*x%uint32(8))&int32(1023)) if x < uint32(256) { v1 = x } else { @@ -98315,7 +98313,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } c = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) l = uint64(1) - switch int32(type1) { + switch Int32FromUint8(type1) { case int32(UTF_8): goto _2 case int32(US_ASCII): @@ -98366,13 +98364,13 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } l = Xmbrtowc(tls, bp+32, *(*uintptr)(unsafe.Pointer(in)), *(*Tsize_t)(unsafe.Pointer(inb)), bp+24) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { goto ilseq } - if l == uint64(-Int32FromInt32(2)) { + if l == Uint64FromInt32(-Int32FromInt32(2)) { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 32))) goto _23 _3: ; @@ -98386,7 +98384,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < l { goto starved } - c = uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) + c = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in))))) if !(0 != 0) { goto _24 } @@ -98398,7 +98396,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) _24: ; if c-uint32(0xd800) < uint32(0x800) || c >= uint32(0x110000) { @@ -98417,19 +98415,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(2) { goto starved } - c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) + c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), Int32FromUint8(type1)) if c-Uint32FromInt32(0xdc00) < uint32(0x400) { goto ilseq } if c-Uint32FromInt32(0xd800) < uint32(0x400) { - if uint32(int32(type1)-int32(UCS2BE)) < uint32(2) { + if Uint32FromInt32(Int32FromUint8(type1)-int32(UCS2BE)) < uint32(2) { goto ilseq } l = uint64(4) if *(*Tsize_t)(unsafe.Pointer(inb)) < uint64(4) { goto starved } - d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), int32(type1)) + d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), Int32FromUint8(type1)) if d-Uint32FromInt32(0xdc00) >= uint32(0x400) { goto ilseq } @@ -98446,7 +98444,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), 0) - if int32(type1) == int32(UCS2) { + if Int32FromUint8(type1) == int32(UCS2) { if c == uint32(0xfffe) { v26 = int32(UCS2LE) } else { @@ -98461,7 +98459,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } v25 = v27 } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v25) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v25) if c == uint32(0xfffe) || c == uint32(0xfeff) { l = uint64(2) } @@ -98481,7 +98479,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v28 = int32(UTF_32BE) } - (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(v28) + (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = Uint32FromInt32(v28) if c == uint32(0xfffe0000) || c == uint32(0xfeff) { l = uint64(4) } @@ -98493,8 +98491,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto _23 } - if c-uint32(0xa1) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + if c-uint32(0xa1) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } l = uint64(2) @@ -98502,17 +98500,17 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if c-uint32(129) <= uint32(Int32FromInt32(159)-Int32FromInt32(129)) { + if c-uint32(129) <= Uint32FromInt32(Int32FromInt32(159)-Int32FromInt32(129)) { c -= uint32(129) } else { - if c-uint32(224) <= uint32(Int32FromInt32(239)-Int32FromInt32(224)) { + if c-uint32(224) <= Uint32FromInt32(Int32FromInt32(239)-Int32FromInt32(224)) { c -= uint32(193) } else { goto ilseq } } c *= uint32(2) - if d-uint32(64) <= uint32(Int32FromInt32(158)-Int32FromInt32(64)) { + if d-uint32(64) <= Uint32FromInt32(Int32FromInt32(158)-Int32FromInt32(64)) { if d == uint32(127) { goto ilseq } @@ -98521,7 +98519,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } d -= uint32(64) } else { - if d-uint32(159) <= uint32(Int32FromInt32(252)-Int32FromInt32(159)) { + if d-uint32(159) <= Uint32FromInt32(Int32FromInt32(252)-Int32FromInt32(159)) { c++ d -= uint32(159) } @@ -98546,10 +98544,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) if c == uint32(0x8e) { c = d - if c-uint32(0xa1) > uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + if c-uint32(0xa1) > Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { goto ilseq } - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0xa1)) goto _23 } c -= uint32(0xa1) @@ -98577,7 +98575,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c != uint32('(') && c != uint32('$') { goto ilseq } - switch uint32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { + switch Uint32FromInt32(Int32FromInt32(128)*BoolInt32(c == Uint32FromUint8('$'))) + d { case uint32('B'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(0) goto _1 @@ -98587,10 +98585,10 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui case uint32('I'): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(4) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('@')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('@')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(2) goto _1 - case uint32(Int32FromInt32(128) + Int32FromUint8('B')): + case Uint32FromInt32(Int32FromInt32(128) + Int32FromUint8('B')): (*Tstateful_cd)(unsafe.Pointer(scd)).Fstate = uint32(3) goto _1 } @@ -98626,7 +98624,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto ilseq } if c-uint32(0x21) < uint32(0x5e) { - c += uint32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) + c += Uint32FromInt32(Int32FromInt32(0xff61) - Int32FromInt32(0x21)) } break } @@ -98659,11 +98657,11 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d < uint32(0xa1) && int32(type1) == int32(GB2312) { + if d < uint32(0xa1) && Int32FromUint8(type1) == int32(GB2312) { goto ilseq } if d-uint32(0x40) >= uint32(191) || d == uint32(127) { - if d-uint32('0') > uint32(9) || int32(type1) != int32(GB18030) { + if d-uint32('0') > uint32(9) || Int32FromUint8(type1) != int32(GB18030) { goto ilseq } l = uint64(4) @@ -98734,23 +98732,23 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto starved } d = uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(in)) + UintptrFromInt32(1)))) - if d-uint32(0x40) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < uint32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { + if d-uint32(0x40) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x40)) || d-uint32(0x7f) < Uint32FromInt32(Int32FromInt32(0xa1)-Int32FromInt32(0x7f)) { goto ilseq } d -= uint32(0x40) if d > uint32(0x3e) { d -= uint32(0x22) } - if c-uint32(0xa1) >= uint32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { - if c-uint32(0x87) >= uint32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { + if c-uint32(0xa1) >= Uint32FromInt32(Int32FromInt32(0xfa)-Int32FromInt32(0xa1)) { + if c-uint32(0x87) >= Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x87)) { goto ilseq } if c < uint32(0xa1) { c -= uint32(0x87) } else { - c -= uint32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) + c -= Uint32FromInt32(Int32FromInt32(0x87) + (Int32FromInt32(0xfa) - Int32FromInt32(0xa1))) } - c = uint32(int32(_hkscs[uint32(4867)+(c*uint32(157)+d)/uint32(16)])>>((c*uint32(157)+d)%uint32(16))%int32(2)<>((c*uint32(157)+d)%uint32(16))%int32(2)< *(*Tsize_t)(unsafe.Pointer(outb)) { goto toobig } @@ -98779,7 +98777,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto _23 } c -= uint32(0xa1) - c = uint32(int32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(&_big5)) + uintptr(c)*314 + uintptr(d)*2))) | BoolInt32(c == uint32(0x27) && (d == uint32(0x3a) || d == uint32(0x3c) || d == uint32(0x42)))<= uint32(93) || d >= uint32(94) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0x81)) d += uint32(0xa1) - if c >= uint32(93) || c >= uint32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { + if c >= uint32(93) || c >= Uint32FromInt32(Int32FromInt32(0xc6)-Int32FromInt32(0x81)) && d > uint32(0x52) { goto ilseq } if d-uint32('A') < uint32(26) { @@ -98808,7 +98806,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if d-uint32('a') < uint32(26) { d = d - uint32('a') + uint32(26) } else { - if d-uint32(0x81) < uint32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { + if d-uint32(0x81) < Uint32FromInt32(Int32FromInt32(0xff)-Int32FromInt32(0x81)) { d = d - uint32(0x81) + uint32(52) } else { goto ilseq @@ -98818,7 +98816,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(0x20) { c = uint32(178)*c + d } else { - c = uint32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d + c = Uint32FromInt32(Int32FromInt32(178)*Int32FromInt32(0x20)) + uint32(84)*(c-uint32(0x20)) + d } c += uint32(0xac00) d = uint32(0xac00) @@ -98873,7 +98871,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } _23: ; - switch int32(totype) { + switch Int32FromUint8(totype) { case int32(WCHAR_T): goto _35 case int32(UTF_8): @@ -98913,20 +98911,20 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = int32(c) + *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = Int32FromUint32(c) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 _36: ; if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { - k = uint64(Xwctomb(tls, bp+56, int32(c))) + k = Uint64FromInt32(Xwctomb(tls, bp+56, Int32FromUint32(c))) if *(*Tsize_t)(unsafe.Pointer(outb)) < k { goto toobig } Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(out)), bp+56, k) } else { - k = uint64(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), int32(c))) + k = Uint64FromInt32(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), Int32FromUint32(c))) } *(*uintptr)(unsafe.Pointer(out)) += uintptr(k) *(*Tsize_t)(unsafe.Pointer(outb)) -= k @@ -98966,7 +98964,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui _53: ; d = c - c = uint32(int32(4) * int32(totype)) + c = Uint32FromInt32(int32(4) * Int32FromUint8(totype)) for { if !(c < uint32(256)) { break @@ -98995,8 +98993,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui c = uint32('~') goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0xa1) - Int32FromInt32(0xff61)) goto revout } c = _uni_to_jis(tls, c) @@ -99016,7 +99014,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } else { v59 = int32(176) } - *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + uint32(v59)) + *(*uint8)(unsafe.Pointer(v57)) = uint8((c+uint32(1))/uint32(2) + Uint32FromInt32(v59)) v61 = out v60 = *(*uintptr)(unsafe.Pointer(v61)) *(*uintptr)(unsafe.Pointer(v61))++ @@ -99033,8 +99031,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { - c += uint32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) { + c += Uint32FromInt32(Int32FromInt32(0x0e00) + Int32FromInt32(0x21) - Int32FromInt32(0xff61)) } else { c = _uni_to_jis(tls, c) } @@ -99059,7 +99057,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if c < uint32(128) { goto revout } - if c-uint32(0xff61) <= uint32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { + if c-uint32(0xff61) <= Uint32FromInt32(Int32FromInt32(0xdf)-Int32FromInt32(0xa1)) || c == uint32(0xa5) || c == uint32(0x203e) { if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(7) { goto toobig } @@ -99170,14 +99168,14 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ; _43: ; - if c < uint32(0x10000) || uint32(int32(totype)-int32(UCS2BE)) < uint32(2) { + if c < uint32(0x10000) || Uint32FromInt32(Int32FromUint8(totype)-int32(UCS2BE)) < uint32(2) { if c >= uint32(0x10000) { c = uint32(0xFFFD) } if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(2) { goto toobig } - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(2) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 @@ -99186,8 +99184,8 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui goto toobig } c -= uint32(0x10000) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), int32(totype)) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), int32(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c>>int32(10)|uint32(0xd800), Int32FromUint8(totype)) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99201,7 +99199,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui if *(*Tsize_t)(unsafe.Pointer(outb)) < uint64(4) { goto toobig } - _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) + _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, Int32FromUint8(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99219,19 +99217,19 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ilseq: ; err = int32(EILSEQ) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto toobig toobig: ; err = int32(E2BIG) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end goto starved starved: ; err = int32(EINVAL) - x = uint64(-Int32FromInt32(1)) + x = Uint64FromInt32(-Int32FromInt32(1)) goto end end: ; @@ -99420,7 +99418,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { /* Limit name length and forbid leading dot or any slashes. */ n = uint64(0) for { - if !(n < uint64(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && int32(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { + if !(n < uint64(LOCALE_NAME_MAX) && *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + uintptr(n)))) != int32('/')) { break } goto _8 @@ -99428,12 +99426,12 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { ; n++ } - if int32(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('.') || *(*uint8)(unsafe.Pointer(val + uintptr(n))) != 0 { val = __ccgo_ts + 571 } - builtin = BoolInt32(int32(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+571) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+579) != 0)) + builtin = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) == int32('C') && !(*(*uint8)(unsafe.Pointer(val + 1)) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+571) != 0) || !(Xstrcmp(tls, val, __ccgo_ts+579) != 0)) if builtin != 0 { - if cat == LC_CTYPE && int32(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { + if cat == LC_CTYPE && Int32FromUint8(*(*uint8)(unsafe.Pointer(val + 1))) == int32('.') { return uintptr(unsafe.Pointer(&X__c_dot_utf8)) } return uintptr(0) @@ -99461,7 +99459,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { break } z = X__strchrnul(tls, path, int32(':')) - l = uint64(int64(z) - int64(path)) + l = Uint64FromInt64(int64(z) - int64(path)) if l >= uint64(256)-n-uint64(2) { goto _10 } @@ -99700,8 +99698,8 @@ func _skipspace(tls *TLS, s uintptr) (r uintptr) { var v1, v2 int32 _, _ = v1, v2 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -99726,23 +99724,23 @@ func _evalprim(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { s = _skipspace(tls, s) if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { (*Tst)(unsafe.Pointer(st)).Fr = Xstrtoul(tls, s, bp, int32(10)) - if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == uint64(-Int32FromInt32(1)) { + if *(*uintptr)(unsafe.Pointer(bp)) == s || (*Tst)(unsafe.Pointer(st)).Fr == Uint64FromInt32(-Int32FromInt32(1)) { return __ccgo_ts } return _skipspace(tls, *(*uintptr)(unsafe.Pointer(bp))) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('n') { (*Tst)(unsafe.Pointer(st)).Fr = (*Tst)(unsafe.Pointer(st)).Fn return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(')') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(')') { return __ccgo_ts } return _skipspace(tls, s+uintptr(1)) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('!') { s = _evalprim(tls, st, s+uintptr(1), d) (*Tst)(unsafe.Pointer(st)).Fr = BoolUint64(!((*Tst)(unsafe.Pointer(st)).Fr != 0)) return s @@ -99813,9 +99811,9 @@ func _parseop(tls *TLS, st uintptr, s uintptr) (r uintptr) { if !(i < int32(11)) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(_opch[i]) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(_opch[i]) { /* note: >,< are accepted with or without = */ - if i < int32(6) && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(_opch2[i]) { + if i < int32(6) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == Int32FromUint8(_opch2[i]) { (*Tst)(unsafe.Pointer(st)).Fop = i return s + uintptr(2) } @@ -99852,11 +99850,11 @@ func _evalbinop(tls *TLS, st uintptr, s uintptr, minprec int32, d int32) (r uint if op was missing then prec[op]==0 */ op = (*Tst)(unsafe.Pointer(st)).Fop - if int32(_prec[op]) <= minprec { + if Int32FromUint8(_prec[op]) <= minprec { return s } left = (*Tst)(unsafe.Pointer(st)).Fr - s = _evalbinop(tls, st, s, int32(_prec[op]), d) + s = _evalbinop(tls, st, s, Int32FromUint8(_prec[op]), d) if _binop(tls, st, op, left) != 0 { return __ccgo_ts } @@ -99892,12 +99890,12 @@ func _evalexpr(tls *TLS, st uintptr, s uintptr, d int32) (r uintptr) { return __ccgo_ts } s = _evalbinop(tls, st, s, 0, d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') { return s } a = (*Tst)(unsafe.Pointer(st)).Fr s = _evalexpr(tls, st, s+uintptr(1), d) - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32(':') { return __ccgo_ts } b = (*Tst)(unsafe.Pointer(st)).Fr @@ -99923,10 +99921,10 @@ func X__pleval(tls *TLS, s uintptr, n uint64) (r uint64) { _ = v1 (*(*Tst)(unsafe.Pointer(bp))).Fn = n s = _evalexpr(tls, bp, s, int32(100)) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(';') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(';') { v1 = (*(*Tst)(unsafe.Pointer(bp))).Fr } else { - v1 = uint64(-Int32FromInt32(1)) + v1 = Uint64FromInt32(-Int32FromInt32(1)) } return v1 } @@ -99946,7 +99944,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { var _ /* part at bp+48 */ [24]uint8 var _ /* tmp_locale at bp+0 */ t__locale_struct _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, l, lm, lm1, p, part1, ret, s, same, z, v3, v4, v5, v6 - if uint32(cat) > uint32(LC_ALL) { + if Uint32FromInt32(cat) > uint32(LC_ALL) { return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&X__locale_lock))) @@ -99966,7 +99964,7 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { } z = X__strchrnul(tls, p, int32(';')) if int64(z)-int64(p) <= int64(LOCALE_NAME_MAX) { - Xmemcpy(tls, bp+48, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, bp+48, p, Uint64FromInt64(int64(z)-int64(p))) (*(*[24]uint8)(unsafe.Pointer(bp + 48)))[int64(z)-int64(p)] = uint8(0) if *(*uint8)(unsafe.Pointer(z)) != 0 { p = z + uintptr(1) @@ -100080,7 +100078,7 @@ _3: if !(n != 0 && *(*uint8)(unsafe.Pointer(fmt)) != 0) { goto _1 } - if !(int32(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) != int32('%')) { goto _4 } goto literal @@ -100096,7 +100094,7 @@ literal: _4: ; fmt++ - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('%') { goto literal } fill = int32(' ') @@ -100105,11 +100103,11 @@ _4: nosym = 0 left = 0 for { - switch int32(*(*uint8)(unsafe.Pointer(fmt))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) { case int32('='): fmt++ v8 = fmt - fill = int32(*(*uint8)(unsafe.Pointer(v8))) + fill = Int32FromUint8(*(*uint8)(unsafe.Pointer(v8))) goto _7 case int32('^'): nogrp = int32(1) @@ -100137,7 +100135,7 @@ _4: if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - fw = int32(10)*fw + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + fw = int32(10)*fw + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _9 _9: ; @@ -100145,28 +100143,28 @@ _4: } lp = 0 rp = int32(2) - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('#') { lp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - lp = int32(10)*lp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + lp = int32(10)*lp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _10 _10: ; fmt++ } } - if int32(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) == int32('.') { rp = 0 fmt++ for { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(fmt)))-uint32('0') < uint32(10)) != 0) { break } - rp = int32(10)*rp + (int32(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) + rp = int32(10)*rp + (Int32FromUint8(*(*uint8)(unsafe.Pointer(fmt))) - int32('0')) goto _11 _11: ; @@ -100175,13 +100173,13 @@ _4: } v12 = fmt fmt++ - intl = BoolInt32(int32(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) + intl = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(v12))) == int32('i')) w = lp + int32(1) + rp if !(left != 0) && fw > w { w = fw } x = VaFloat64(&ap) - l = uint64(Xsnprintf(tls, s, n, __ccgo_ts+600, VaList(bp+8, w, rp, x))) + l = Uint64FromInt32(Xsnprintf(tls, s, n, __ccgo_ts+600, VaList(bp+8, w, rp, x))) if l >= n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(E2BIG) return int64(-int32(1)) @@ -100352,7 +100350,7 @@ func Xtextdomain(tls *TLS, domainname uintptr) (r uintptr) { return uintptr(0) } if !(_current_domain != 0) { - _current_domain = Xmalloc(tls, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + _current_domain = Xmalloc(tls, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if !(_current_domain != 0) { return uintptr(0) } @@ -100488,7 +100486,7 @@ func Xreallocarray(tls *TLS, ptr uintptr, m Tsize_t, n Tsize_t) (r uintptr) { trc("tls=%v ptr=%v m=%v n=%v, (%v:)", tls, ptr, m, n, origin(2)) defer func() { trc("-> %v", r) }() } - if n != 0 && m > uint64(-Int32FromInt32(1))/n { + if n != 0 && m > Uint64FromInt32(-Int32FromInt32(1))/n { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -100562,7 +100560,7 @@ func X__expo2(tls *TLS, x float64, sign float64) (r float64) { var v1 Tuint64_t _, _ = scale, v1 /* note that k is odd and scale*scale overflows */ - v1 = uint64(uint32(Int32FromInt32(0x3ff)+_k2/Int32FromInt32(2))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(e != 0) { if *(*Tuint64_t)(unsafe.Pointer(bp))<> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(e != 0) { if *(*Tuint32_t)(unsafe.Pointer(bp))<> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix <= uint32(0x400f6a7a) { /* |x| ~<= 5pi/4 */ if ix&uint32(0xfffff) == uint32(0x921fb) { /* |x| ~= pi/2 or 2pi/2 */ @@ -100965,8 +100963,8 @@ medium: } *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - ex = int32(ix >> int32(20)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ex = Int32FromUint32(ix >> int32(20)) if ex-ey > int32(16) { /* 2nd round, good to 118 bits */ t = r w = fn * _pio2_2 @@ -100974,7 +100972,7 @@ medium: w = fn*_pio2_2t - (t - r - w) *(*float64)(unsafe.Pointer(y)) = r - w *(*float64)(unsafe.Pointer(bp)) = *(*float64)(unsafe.Pointer(y)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if ex-ey > int32(49) { /* 3rd round, good to 151 bits, covers all cases */ t = r w = fn * _pio2_3 @@ -100998,8 +100996,8 @@ _1: } /* set z = scalbn(|x|,-ilogb(x)+23) */ *(*float64)(unsafe.Pointer(bp)) = x - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) >> Int32FromInt32(12) - *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) >> Int32FromInt32(12) + *(*Tuint64_t)(unsafe.Pointer(bp)) |= Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(23)) << Int32FromInt32(52) z = *(*float64)(unsafe.Pointer(bp)) i = 0 for { @@ -101018,7 +101016,7 @@ _1: for (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] == float64(0) { i-- } - n = X__rem_pio2_large(tls, bp+8, bp+32, int32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) + n = X__rem_pio2_large(tls, bp+8, bp+32, Int32FromUint32(ix>>Int32FromInt32(20))-(Int32FromInt32(0x3ff)+Int32FromInt32(23)), i+int32(1), int32(1)) if sign != 0 { *(*float64)(unsafe.Pointer(y)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[0] *(*float64)(unsafe.Pointer(y + 1*8)) = -(*(*[2]float64)(unsafe.Pointer(bp + 32)))[int32(1)] @@ -101590,9 +101588,9 @@ func X__rem_pio2f(tls *TLS, x float32, y uintptr) (r int32) { return 0 } /* scale x into [2^23, 2^24-1] */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) - e0 = int32(ix>>Int32FromInt32(23) - uint32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ - *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - uint32(e0<> int32(31)) + e0 = Int32FromUint32(ix>>Int32FromInt32(23) - Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(23))) /* e0 = ilogb(|x|)-23, positive */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = ix - Uint32FromInt32(e0<> int32(63)) + return Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) } // C documentation @@ -101652,7 +101650,7 @@ func X__signbitf(tls *TLS, x float32) (r int32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - return int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + return Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) } func X__signbitl(tls *TLS, x float64) (r int32) { @@ -101745,7 +101743,7 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { hx = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) big = BoolInt32(hx&uint32(0x7fffffff) >= uint32(0x3FE59428)) /* |x| >= 0.6744 */ if big != 0 { - sign = int32(hx >> int32(31)) + sign = Int32FromUint32(hx >> int32(31)) if sign != 0 { x = -x y = -y @@ -101780,13 +101778,13 @@ func X__tan(tls *TLS, x float64, y float64, odd int32) (r1 float64) { } /* -1.0/(x+r) has up to 2ulp error, so compute it accurately */ w0 = w - v2 = *(*Tuint64_t)(unsafe.Pointer(&w0))>>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) /* x < 1 domain error is handled in the called functions */ - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| < 2, up to 2ulp error in [1,1.125] */ return Xlog1p(tls, x-Float64FromInt32(1)+Xsqrt(tls, (x-Float64FromInt32(1))*(x-Float64FromInt32(1))+Float64FromInt32(2)*(x-Float64FromInt32(1)))) } - if e < uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| < 0x1p26 */ return Xlog(tls, Float64FromInt32(2)*x-Float64FromInt32(1)/(x+Xsqrt(tls, x*x-Float64FromInt32(1)))) } @@ -102032,12 +102030,12 @@ func Xacoshf(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x a = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - if a < uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { - if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { - if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { + if e >= Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { @@ -102277,15 +102275,15 @@ func Xasinhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i x3 = *(*float32)(unsafe.Pointer(bp)) - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { - if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= Uint32FromInt32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { - if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= Uint32FromInt32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { @@ -102541,7 +102539,7 @@ _2: } } /* |y/x| > 0x1p64 */ - if ix+uint32(Int32FromInt32(64)< 0x1p26 */ - if ix+uint32(Int32FromInt32(26)<> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) y3 = *(*float64)(unsafe.Pointer(bp)) - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { - if e < uint32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(1)) { + if e < Uint32FromInt32(Int32FromInt32(0x3ff)-Int32FromInt32(32)) { /* handle underflow */ if e == uint32(0) { if uint64(4) == uint64(4) { @@ -102900,10 +102898,10 @@ func Xatanhf(tls *TLS, x3 float32) (r float32) { /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) y3 = float64(*(*float32)(unsafe.Pointer(bp))) - if *(*Tuint32_t)(unsafe.Pointer(bp)) < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(1)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -103205,12 +103203,12 @@ func Xceilf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -103377,7 +103375,7 @@ func Xcos(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) @@ -103471,7 +103469,7 @@ func Xcosf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -103517,12 +103515,12 @@ func Xcosh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(2) */ if w < uint32(0x3fe62e42) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<>Int32FromInt32(32)<>Int32FromInt32(32)<> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -103770,7 +103768,7 @@ func Xerfc(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -103915,7 +103913,7 @@ func Xerff(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erf(nan)=nan, erf(+-inf)=+-1 */ @@ -103955,7 +103953,7 @@ func Xerfcf(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _, _, _, _ = ix, r, s, sign, y, z, v1, v2 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { /* erfc(nan)=nan, erfc(+-inf)=0,2 */ @@ -104123,7 +104121,7 @@ _3: kd -= X__exp_data.Fshift r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<>int32(52)&uint64(0x7ff) < uint64(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { + if *(*Tuint64_t)(unsafe.Pointer(bp + 8))>>int32(52)&uint64(0x7ff) < Uint64FromInt32(Int32FromInt32(0x3ff)+Int32FromInt32(4)) { if !(y != 0) { return _p10[int32(*(*float64)(unsafe.Pointer(bp)))+int32(15)] } @@ -104250,7 +104248,7 @@ func Xexp10f(tls *TLS, x float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp + 4)) = *(*float32)(unsafe.Pointer(bp)) /* fabsf(n) < 8 without raising invalid on nan */ - if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < uint32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { + if *(*Tuint32_t)(unsafe.Pointer(bp + 4))>>int32(23)&uint32(0xff) < Uint32FromInt32(Int32FromInt32(0x7f)+Int32FromInt32(3)) { if !(y != 0) { return _p101[int32(*(*float32)(unsafe.Pointer(bp)))+int32(7)] } @@ -104417,7 +104415,7 @@ _5: kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ - idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4043687A) { /* if |x|>=56*ln2 */ *(*float64)(unsafe.Pointer(bp)) = x3 @@ -104752,7 +104750,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return float64(1) + float64(2)*(x3-e) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)+k) << int32(52) /* 2^k */ twopk = *(*float64)(unsafe.Pointer(bp + 8)) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = x3 - e + float64(1) @@ -104763,7 +104761,7 @@ func Xexpm1(tls *TLS, x3 float64) (r float64) { } return y3 - float64(1) } - *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ + *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = Uint64FromInt32(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { @@ -104809,7 +104807,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) /* filter out huge and non-finite argument */ if hx >= uint32(0x4195b844) { /* if |x|>=27*ln2 */ if hx > uint32(0x7f800000) { /* NaN */ @@ -104887,7 +104885,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return float32(Float64FromFloat32(1) + Float64FromFloat32(2)*(float64(x3)-e)) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) + k) << int32(23)) /* 2^k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) + k) << int32(23)) /* 2^k */ twopk = float64(*(*float32)(unsafe.Pointer(bp))) if k < 0 || k > int32(56) { /* suffice to return exp(x)-1 */ y3 = float64(x3) - e + Float64FromFloat32(1) @@ -104898,7 +104896,7 @@ func Xexpm1f(tls *TLS, x3 float32) (r float32) { } return float32(y3 - Float64FromFloat32(1)) } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { y3 = (float64(x3) - e + float64(Float32FromInt32(1)-*(*float32)(unsafe.Pointer(bp)))) * twopk } else { @@ -105120,7 +105118,7 @@ func Xfloor(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { return x3 } @@ -105180,12 +105178,12 @@ func Xfloorf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { return x3 } if e >= 0 { - m = uint32(int32(0x007fffff) >> e) + m = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { return x3 } @@ -105247,13 +105245,13 @@ func _normalize(tls *TLS, x float64) (r Tnum) { var v1 float64 _, _, _, _, _ = e, ix, sign, v1, v2 ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - e = int32(ix >> int32(52)) + e = Int32FromUint64(ix >> int32(52)) sign = e & int32(0x800) e &= int32(0x7ff) if !(e != 0) { v1 = x * float64(9.223372036854776e+18) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) - e = int32(ix >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(ix >> int32(52) & uint64(0x7ff)) if e != 0 { v2 = e - int32(63) } else { @@ -105458,7 +105456,7 @@ func Xfma(tls *TLS, x1 float64, y1 float64, z float64) (r2 float64) { } e -= d /* convert to double */ - i = int64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ + i = Int64FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))) /* i is in [1<<62,(1<<63)-1] */ if sign != 0 { i = -i } @@ -105480,7 +105478,7 @@ func Xfma(tls *TLS, x1 float64, y1 float64, z float64) (r2 float64) { /* one bit is lost when scaled, add another top bit to only round once at conversion if it is inexact */ if *(*Tuint64_t)(unsafe.Pointer(bp))<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>int32(1) | *(*Tuint64_t)(unsafe.Pointer(bp))&uint64(1) | Uint64FromUint64(1)<>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) + i = Int64FromUint64((*(*Tuint64_t)(unsafe.Pointer(bp))>>d | BoolUint64(!!(*(*Tuint64_t)(unsafe.Pointer(bp))<<(Int32FromInt32(64)-d) != 0))) << d) if sign != 0 { i = -i } @@ -105552,12 +105550,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = y } else { v9 = x @@ -105609,12 +105607,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = y } else { v9 = x @@ -105674,12 +105672,12 @@ _6: v7 = *(*uint64)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(63)) != int32(v7>>Int32FromInt32(63)) { + if Int32FromUint64(v5>>Int32FromInt32(63)) != Int32FromUint64(v7>>Int32FromInt32(63)) { *(*float64)(unsafe.Pointer(bp)) = x v10 = *(*uint64)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v10>>Int32FromInt32(63)) != 0 { v9 = x } else { v9 = y @@ -105731,12 +105729,12 @@ _6: v7 = *(*uint32)(unsafe.Pointer(bp)) goto _8 _8: - if int32(v5>>Int32FromInt32(31)) != int32(v7>>Int32FromInt32(31)) { + if Int32FromUint32(v5>>Int32FromInt32(31)) != Int32FromUint32(v7>>Int32FromInt32(31)) { *(*float32)(unsafe.Pointer(bp)) = x v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { v9 = x } else { v9 = y @@ -105800,9 +105798,9 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) /* in the followings uxi should be ux.i, but then gcc wrongly adds */ /* float load/store to inner loops ruining performance and code size */ uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) @@ -105834,7 +105832,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { ex-- i <<= uint64(1) } - uxi <<= uint64(-ex + int32(1)) + uxi <<= Uint64FromInt32(-ex + int32(1)) } else { uxi = uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -105896,11 +105894,11 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { /* scale result */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } - uxi |= uint64(sx) << int32(63) + uxi |= Uint64FromInt32(sx) << int32(63) *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi return *(*float64)(unsafe.Pointer(bp + 8)) } @@ -105945,8 +105943,8 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) sx = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) & uint32(0x80000000) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -105994,7 +105992,7 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -106037,9 +106035,9 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { /* scale result up */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } uxi |= sx *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi @@ -106076,7 +106074,7 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { Fd float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + ee = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if !(ee != 0) { if x != 0 { x = Xfrexp(tls, x*float64(1.8446744073709552e+19), e) @@ -106120,7 +106118,7 @@ func Xfrexpf(tls *TLS, x float32, e uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - ee = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + ee = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(ee != 0) { if x != 0 { x = Xfrexpf(tls, float32(float64(x)*float64(1.8446744073709552e+19)), e) @@ -106228,8 +106226,8 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) { })(unsafe.Pointer(bp + 8)) = ut } /* special cases */ - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52)) x = *(*float64)(unsafe.Pointer(bp)) y = *(*float64)(unsafe.Pointer(bp + 8)) /* note: hypot(inf,nan) == inf */ @@ -106321,19 +106319,19 @@ func Xhypotf(tls *TLS, x float32, y float32) (r float32) { } x = *(*float32)(unsafe.Pointer(bp)) y = *(*float32)(unsafe.Pointer(bp + 4)) - if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(0xff)<= uint32(Int32FromInt32(25)<= Uint32FromInt32(Int32FromInt32(0xff)<= Uint32FromInt32(Int32FromInt32(25)<= uint32((Int32FromInt32(0x7f)+Int32FromInt32(60))<= Uint32FromInt32((Int32FromInt32(0x7f)+Int32FromInt32(60))<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { i <<= uint64(12) if i == uint64(0) { @@ -106449,7 +106447,7 @@ func Xilogbf(tls *TLS, x3 float32) (r int32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) - e = int32(i >> int32(23) & uint32(0xff)) + e = Int32FromUint32(i >> int32(23) & uint32(0xff)) if !(e != 0) { i <<= uint32(9) if i == uint32(0) { @@ -107257,7 +107255,7 @@ func Xj1(tls *TLS, x float64) (r1 float64) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7ff00000) { return Float64FromInt32(1) / (x * x) @@ -107593,7 +107591,7 @@ func Xj1f(tls *TLS, x float32) (r1 float32) { var sign int32 _, _, _, _, _ = ix, r, s, sign, z ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return Float32FromInt32(1) / (x * x) @@ -107882,7 +107880,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108084,7 +108082,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) lx = uint32(__u) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ return x @@ -108178,7 +108176,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { var ix Tuint32_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = a, b, h, i, ix, k, nf, nm1, q0, q1, sign, t, temp, tmp, w, z, v6 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108343,7 +108341,7 @@ func Xynf(tls *TLS, n int32, x float32) (r float32) { var ib, ix Tuint32_t _, _, _, _, _, _, _, _, _, _ = a, b, i, ib, ix, nm1, sign, temp, v1, v3 ix = *(*Tuint32_t)(unsafe.Pointer(&x)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix > uint32(0x7f800000) { /* nan */ return x @@ -108545,12 +108543,12 @@ func X__lgamma_r(tls *TLS, x float64, signgamp uintptr) (r1 float64) { *(*float64)(unsafe.Pointer(bp)) = x /* purge off +-inf, NaN, +-0, tiny and negative arguments */ *(*int32)(unsafe.Pointer(signgamp)) = int32(1) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) if ix >= uint32(0x7ff00000) { return x * x } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(70))<> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) ix = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) if ix >= uint32(0x7f800000) { return x * x @@ -109069,7 +109067,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109090,8 +109088,8 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<>Int32FromInt32(20)) - int32(0x3ff) + hx += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k += Int32FromUint32(hx>>Int32FromInt32(20)) - int32(0x3ff) hx = hx&uint32(0x000fffff) + uint32(0x3fe6a09e) *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(hx)<>Int32FromInt32(23)) - int32(0x7f) + ix += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k += Int32FromUint32(ix>>Int32FromInt32(23)) - int32(0x7f) ix = ix&uint32(0x007fffff) + uint32(0x3f3504f3) *(*Tuint32_t)(unsafe.Pointer(bp)) = ix x = *(*float32)(unsafe.Pointer(bp)) @@ -109352,7 +109350,7 @@ func Xlog1p(tls *TLS, x3 float64) (r float64) { } /* log1p(-1) = -inf */ return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } - if hx<> int32(32)) - hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) - k = int32(hu>>Int32FromInt32(20)) - int32(0x3ff) + hu += Uint32FromInt32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) + k = Int32FromUint32(hu>>Int32FromInt32(20)) - int32(0x3ff) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(54) { if k >= int32(2) { @@ -109452,7 +109450,7 @@ func Xlog1pf(tls *TLS, x3 float32) (r float32) { } /* log1p(-1)=+inf */ return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } - if ix<>Int32FromInt32(23)) - int32(0x7f) + iu += Uint32FromInt32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) + k = Int32FromUint32(iu>>Int32FromInt32(23)) - int32(0x7f) /* correction term ~ log(1+x)-log(u), avoid underflow in c/u */ if k < int32(25) { if k >= int32(2) { @@ -109573,7 +109571,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { _7: return v6 } - if top-uint32(0x0010) >= uint32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { + if top-uint32(0x0010) >= Uint32FromInt32(Int32FromInt32(0x7ff0)-Int32FromInt32(0x0010)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return X__math_divzero(tls, uint32(1)) @@ -109594,8 +109592,8 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109685,16 +109683,16 @@ func Xlog2f(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + k = Int32FromUint32(tmp) >> int32(23) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -109861,7 +109859,7 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) } - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return X__math_divzerof(tls, uint32(1)) @@ -109875,14 +109873,14 @@ func Xlogf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 2^k z; where z is in range [OFF,2*OFF] and exact. The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF1) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % uint32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + i = Int32FromUint32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOGF_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ iz = ix - tmp&uint32(0xff800000) invc = (*(*struct { Finvc float64 @@ -110021,7 +110019,7 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) /* no fractional part */ if e >= int32(52) { *(*float64)(unsafe.Pointer(iptr)) = x @@ -110073,7 +110071,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) /* no fractional part */ if e >= int32(23) { *(*float32)(unsafe.Pointer(iptr)) = x @@ -110089,7 +110087,7 @@ func Xmodff(tls *TLS, x float32, iptr uintptr) (r float32) { *(*float32)(unsafe.Pointer(iptr)) = *(*float32)(unsafe.Pointer(bp)) return x } - mask = uint32(int32(0x007fffff) >> e) + mask = Uint32FromInt32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&mask == uint32(0) { *(*float32)(unsafe.Pointer(iptr)) = x *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x80000000) @@ -110212,7 +110210,7 @@ _2: *(*Tuint64_t)(unsafe.Pointer(bp + 8))++ } } - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) /* raise overflow if ux.f is infinite and x is finite */ if e == int32(0x7ff) { if uint64(8) == uint64(4) { @@ -110413,7 +110411,7 @@ _2: v6 = *(*uint64)(unsafe.Pointer(bp + 8)) goto _7 _7: - if int32(v6>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v6>>Int32FromInt32(63)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16)) |= uint32(0x80000000) } } else { @@ -110422,7 +110420,7 @@ _2: v8 = *(*uint32)(unsafe.Pointer(bp)) goto _9 _9: - if int32(v8>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v8>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ @@ -110432,7 +110430,7 @@ _2: v10 = *(*uint32)(unsafe.Pointer(bp)) goto _11 _11: - if int32(v10>>Int32FromInt32(31)) != 0 { + if Int32FromUint32(v10>>Int32FromInt32(31)) != 0 { *(*Tuint32_t)(unsafe.Pointer(bp + 16))++ } else { *(*Tuint32_t)(unsafe.Pointer(bp + 16))-- @@ -110507,8 +110505,8 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint64(OFF2) - i = int32(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ + i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ iz = ix - tmp&(Uint64FromUint64(0xfff)<> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(iy >> int32(52) & uint64(0x7ff)) if e < int32(0x3ff) { return 0 } @@ -110746,7 +110744,7 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) topx = _top124(tls, x1) topy = _top124(tls, y1) - if topx-uint32(0x001) >= uint32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topx-uint32(0x001) >= Uint32FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) || topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1. */ /* Special cases: (x < 0x1p-126 or inf or nan) or @@ -110802,12 +110800,12 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { return X__math_invalid(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) + sign_bias = Uint32FromInt32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) } ix &= uint64(0x7fffffffffffffff) topx &= uint32(0x7ff) } - if topy&uint32(0x7ff)-uint32(0x3be) >= uint32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { + if topy&uint32(0x7ff)-uint32(0x3be) >= Uint32FromInt32(Int32FromInt32(0x43e)-Int32FromInt32(0x3be)) { /* Note: sign_bias == 0 here because y is not odd. */ v10 = float64(1) if ix == *(*Tuint64_t)(unsafe.Pointer(&v10)) { @@ -110892,10 +110890,10 @@ func _log2_inline(tls *TLS, ix Tuint32_t) (r1 Tdouble_t) { The range is split into N subintervals. The ith subinterval contains z and c is near its center. */ tmp = ix - uint32(OFF3) - i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % Uint32FromInt32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ + k = Int32FromUint32(top) >> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -110941,7 +110939,7 @@ _2: kd -= X__exp2f_data.Fshift_scaled /* k/N */ r = xd - kd /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */ - t = *(*Tuint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + uintptr(ki%uint64(Int32FromInt32(1)<> int32(23) & uint32(0xff)) + e = Int32FromUint32(iy >> int32(23) & uint32(0xff)) if e < int32(0x7f) { return 0 } if e > Int32FromInt32(0x7f)+Int32FromInt32(23) { return int32(2) } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)-Int32FromInt32(1)) != 0 { return 0 } - if iy&uint32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { + if iy&Uint32FromInt32(Int32FromInt32(1)<<(Int32FromInt32(0x7f)+Int32FromInt32(23)-e)) != 0 { return int32(1) } return int32(2) @@ -110999,7 +110997,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { sign_bias = uint32(0) ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) iy = *(*Tuint32_t)(unsafe.Pointer(&y1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) || _zeroinfnan1(tls, iy) != 0 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ if _zeroinfnan1(tls, iy) != 0 { if uint32(2)*iy == uint32(0) { @@ -111011,10 +111009,10 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { return x1 + y1 } - if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { + if uint32(2)*ix == Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) } - if BoolInt32(uint32(2)*ix < uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { + if BoolInt32(uint32(2)*ix < Uint32FromInt32(Int32FromInt32(2)*Int32FromInt32(0x3f800000))) == BoolInt32(!(iy&Uint32FromUint32(0x80000000) != 0)) { return Float32FromFloat32(0) } /* |x|<1 && y==inf or |x|>1 && y==-inf. */ return y1 * y1 @@ -111045,7 +111043,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { return X__math_invalidf(tls, x1) } if yint == int32(1) { - sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) + sign_bias = Uint32FromInt32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) } ix &= uint32(0x7fffffff) } @@ -111054,7 +111052,7 @@ func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } } logx = _log2_inline(tls, ix) @@ -111178,10 +111176,10 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y - ex = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) - ey = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) - sx = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) - sy = int32(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) + ex = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(52) & uint64(0x7ff)) + ey = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(52) & uint64(0x7ff)) + sx = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(63)) + sy = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) >> int32(63)) uxi = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint64_t)(unsafe.Pointer(bp + 16))<> Int32FromInt32(12)) uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12)) @@ -111282,9 +111280,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi = uxi - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) + uxi >>= Uint64FromInt32(-ex + int32(1)) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi x = *(*float64)(unsafe.Pointer(bp + 8)) @@ -111297,9 +111295,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v10 = -int32(q) + v10 = -Int32FromUint32(q) } else { - v10 = int32(q) + v10 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v10 if sx != 0 { @@ -111351,10 +111349,10 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y - ex = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) - ey = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) - sx = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) - sy = int32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) + ex = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(23) & uint32(0xff)) + ey = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(23) & uint32(0xff)) + sx = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 4)) >> int32(31)) + sy = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp + 8)) >> int32(31)) uxi = *(*Tuint32_t)(unsafe.Pointer(bp + 4)) *(*int32)(unsafe.Pointer(quo)) = 0 if v3 = *(*Tuint32_t)(unsafe.Pointer(bp + 8))<> Int32FromInt32(9) uxi |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111399,7 +111397,7 @@ func Xremquof(tls *TLS, x float32, y float32, quo uintptr) (r float32) { ey-- i <<= uint32(1) } - *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= uint32(-ey + int32(1)) + *(*Tuint32_t)(unsafe.Pointer(bp + 8)) <<= Uint32FromInt32(-ey + int32(1)) } else { *(*Tuint32_t)(unsafe.Pointer(bp + 8)) &= -Uint32FromUint32(1) >> Int32FromInt32(9) *(*Tuint32_t)(unsafe.Pointer(bp + 8)) |= Uint32FromUint32(1) << Int32FromInt32(23) @@ -111453,9 +111451,9 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(ex) << int32(23) + uxi |= Uint32FromInt32(ex) << int32(23) } else { - uxi >>= uint32(-ex + int32(1)) + uxi >>= Uint32FromInt32(-ex + int32(1)) } *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uxi x = *(*float32)(unsafe.Pointer(bp + 4)) @@ -111468,9 +111466,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(q) + v8 = -Int32FromUint32(q) } else { - v8 = int32(q) + v8 = Int32FromUint32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -111516,8 +111514,8 @@ func Xrint(tls *TLS, x float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - s = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + s = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x } @@ -111565,8 +111563,8 @@ func Xrintf(tls *TLS, x float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) - s = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + s = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x } @@ -111624,7 +111622,7 @@ func Xround(tls *TLS, x3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { return x3 } @@ -111689,7 +111687,7 @@ func Xroundf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { return x3 } @@ -111913,7 +111911,7 @@ func Xscalbn(tls *TLS, x float64, n int32) (r float64) { } } } - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(Int32FromInt32(0x3ff)+n) << int32(52) + *(*Tuint64_t)(unsafe.Pointer(bp)) = Uint64FromInt32(Int32FromInt32(0x3ff)+n) << int32(52) x = y * *(*float64)(unsafe.Pointer(bp)) return x } @@ -111955,7 +111953,7 @@ func Xscalbnf(tls *TLS, x float32, n int32) (r float32) { } } } - *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32(Int32FromInt32(0x7f)+n) << int32(23) + *(*Tuint32_t)(unsafe.Pointer(bp)) = Uint32FromInt32(Int32FromInt32(0x7f)+n) << int32(23) x = float32(y * float64(*(*float32)(unsafe.Pointer(bp)))) return x } @@ -112037,7 +112035,7 @@ func Xsin(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) @@ -112110,7 +112108,7 @@ func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) s = X__sin(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(1)) c = X__cos(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)]) switch n & Uint32FromInt32(3) { @@ -112257,7 +112255,7 @@ func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x3, bp)) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) s = float64(X__sindf(tls, *(*float64)(unsafe.Pointer(bp)))) c = float64(X__cosdf(tls, *(*float64)(unsafe.Pointer(bp)))) switch n & Uint32FromInt32(3) { @@ -112319,7 +112317,7 @@ func Xsinf(tls *TLS, x3 float32) (r float32) { var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) - sign = int32(ix >> int32(31)) + sign = Int32FromUint32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ @@ -112436,14 +112434,14 @@ func Xsinh(tls *TLS, x float64) (r float64) { h = -h } /* |x| */ - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) absx = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) /* |x| < log(DBL_MAX) */ if w < uint32(0x40862e42) { t = Xexpm1(tls, absx) if w < uint32(0x3ff00000) { - if w < uint32(Int32FromInt32(0x3ff00000)-Int32FromInt32(26)<> int32(52) - if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { + if top-uint64(0x001) >= Uint64FromInt32(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { return x1 @@ -112577,7 +112575,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { x = 4^e m; with integer e, and m in [1, 4) m: fixed point representation [2.62] 2^e is the exponent part of the result. */ - even = int32(top & uint64(1)) + even = Int32FromUint64(top & uint64(1)) m = ix<>= uint64(1) @@ -112621,7 +112619,7 @@ func Xsqrt(tls *TLS, x1 float64) (r1 float64) { /* handle rounding modes and inexact exception: only (s+1)^2 == 2^42 m case is exact otherwise add a tiny value to cause the fenv effects. */ - tiny = uint64(v2) + tiny = Uint64FromInt64(v2) tiny |= (d1 ^ d2) & uint64(0x8000000000000000) t = *(*float64)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112706,7 +112704,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { var v3 int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, t, tiny, u, y, y1, v1, v2, v3, v4 ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) - if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { + if ix-uint32(0x00800000) >= Uint32FromInt32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { return x1 @@ -112720,7 +112718,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { /* x is subnormal, normalize it. */ v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) - ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) + ix -= Uint32FromInt32(Int32FromInt32(23) << Int32FromInt32(23)) } /* x = 4^e m; with int e and m in [1, 4). */ even = ix & uint32(0x00800000) @@ -112734,7 +112732,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { m = v2 /* 2^e is the exponent part of the return value. */ ey = ix >> int32(1) - ey += uint32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) + ey += Uint32FromInt32(Int32FromInt32(0x3f800000) >> Int32FromInt32(1)) ey &= uint32(0x7f800000) i = ix >> Int32FromInt32(17) % uint32(128) r = uint32(X__rsqrt_tab[i]) << int32(16) @@ -112766,7 +112764,7 @@ func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { v3 = int32(0x01000000) } /* handle rounding and inexact exception. */ - tiny = uint32(v3) + tiny = Uint32FromInt32(v3) tiny |= (d1 ^ d2) & uint32(0x80000000) t = *(*float32)(unsafe.Pointer(&tiny)) y = y1 + t @@ -112841,8 +112839,8 @@ func Xtan(tls *TLS, x3 float64) (r float64) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x3, bp)) - return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2(tls, x3, bp)) + return X__tan(tls, (*(*[2]float64)(unsafe.Pointer(bp)))[0], (*(*[2]float64)(unsafe.Pointer(bp)))[int32(1)], Int32FromUint32(n&uint32(1))) } const M_PI_29 = 1.5707963267948966 @@ -112942,8 +112940,8 @@ func Xtanf(tls *TLS, x3 float32) (r float32) { return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x3, bp)) - return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) + n = Uint32FromInt32(X__rem_pio2f(tls, x3, bp)) + return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), Int32FromUint32(n&uint32(1))) } const M_PI_210 = 0 @@ -112980,8 +112978,8 @@ func Xtanh(tls *TLS, x3 float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) - *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + *(*Tuint64_t)(unsafe.Pointer(bp)) &= Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(2) x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { @@ -113053,7 +113051,7 @@ func Xtanhf(tls *TLS, x3 float32) (r float32) { }{} *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ - sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) + sign = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) @@ -113278,13 +113276,13 @@ func Xtgamma(tls *TLS, x3 float64) (r1 float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x3 ix = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32) & uint64(0x7fffffff)) - sign = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) + sign = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ return x3 + float64(X__builtin_inff(tls)) } - if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) + e = Int32FromUint64(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { return x3 } @@ -113437,7 +113435,7 @@ func Xtruncf(tls *TLS, x3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp)) = x3 - e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) + e = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { return x3 } @@ -113486,18 +113484,18 @@ func Xa64l(tls *TLS, s uintptr) (r int64) { if !(e < int32(36) && *(*uint8)(unsafe.Pointer(s)) != 0) { break } - d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), int32(*(*uint8)(unsafe.Pointer(s)))) + d = Xstrchr(tls, uintptr(unsafe.Pointer(&_digits)), Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) if !(d != 0) { break } - x |= uint32(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e + x |= Uint32FromInt64(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e goto _1 _1: ; e += int32(6) s++ } - return int64(int32(x)) + return int64(Int32FromUint32(x)) } func Xl64a(tls *TLS, x0 int64) (r uintptr) { @@ -113508,7 +113506,7 @@ func Xl64a(tls *TLS, x0 int64) (r uintptr) { var p uintptr var x Tuint32_t _, _ = p, x - x = uint32(x0) + x = Uint32FromInt64(x0) p = uintptr(unsafe.Pointer(&_s)) for { if !(x != 0) { @@ -113539,7 +113537,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint64(1) for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) @@ -113549,7 +113547,7 @@ func Xbasename(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('/')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('/')) { break } goto _2 @@ -113580,7 +113578,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { } i = Xstrlen(tls, s) - uint64(1) for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -113592,7 +113590,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) != int32('/')) { break } if !(i != 0) { @@ -113604,7 +113602,7 @@ func Xdirname(tls *TLS, s uintptr) (r uintptr) { i-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i)))) == int32('/')) { break } if !(i != 0) { @@ -113628,7 +113626,7 @@ func Xffs(tls *TLS, i int32) (r int32) { var v2 uint64 _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint64(i) + v2 = Uint64FromInt32(i) v3 = _a_ctz_64(tls, v2) goto _4 _4: @@ -113648,7 +113646,7 @@ func Xffsl(tls *TLS, i int64) (r int32) { var v2 uint64 _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint64(i) + v2 = Uint64FromInt64(i) v3 = _a_ctz_64(tls, v2) goto _4 _4: @@ -113667,7 +113665,7 @@ func Xffsll(tls *TLS, i int64) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_64(tls, uint64(i)) + int32(1) + v1 = _a_ctz_64(tls, Uint64FromInt64(i)) + int32(1) } else { v1 = 0 } @@ -113706,10 +113704,10 @@ func __strcolcmp(tls *TLS, lstr uintptr, bstr uintptr) (r int32) { var i Tsize_t _ = i i = uint64(0) - for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { + for *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 && *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(lstr + uintptr(i)))) { i++ } - if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { + if *(*uint8)(unsafe.Pointer(lstr + uintptr(i))) != 0 || *(*uint8)(unsafe.Pointer(bstr + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bstr + uintptr(i)))) != int32(':') { return int32(1) } return 0 @@ -113994,7 +113992,7 @@ func Xgetentropy(tls *TLS, buffer uintptr, len1 Tsize_t) (r int32) { } } pos += uintptr(ret) - len1 -= uint64(ret) + len1 -= Uint64FromInt32(ret) ret = 0 } _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) @@ -114062,8 +114060,8 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if Xoptind >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) != int32('-') { - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') { v1 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v1)*8)) @@ -114074,7 +114072,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { Xoptind++ return -Int32FromInt32(1) } @@ -114093,7 +114091,7 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { Xoptind++ X__optpos = 0 } - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') { optstring++ } i = 0 @@ -114108,14 +114106,14 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { } if *(*Twchar_t)(unsafe.Pointer(bp + 4)) != *(*Twchar_t)(unsafe.Pointer(bp)) || *(*Twchar_t)(unsafe.Pointer(bp)) == int32(':') { Xoptopt = *(*Twchar_t)(unsafe.Pointer(bp)) - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+726, optchar, uint64(k)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32(':') && Xopterr != 0 { + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+726, optchar, Uint64FromInt32(k)) } return int32('?') } - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i)))) == int32(':') { Xoptarg = uintptr(0) - if int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+int32(1))))) != int32(':') || X__optpos != 0 { v3 = Xoptind Xoptind++ Xoptarg = *(*uintptr)(unsafe.Pointer(argv + uintptr(v3)*8)) @@ -114126,11 +114124,11 @@ func Xgetopt(tls *TLS, argc int32, argv uintptr, optstring uintptr) (r int32) { } if Xoptind > argc { Xoptopt = *(*Twchar_t)(unsafe.Pointer(bp)) - if int32(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32(':') { return int32(':') } if Xopterr != 0 { - X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+750, optchar, uint64(k)) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+750, optchar, Uint64FromInt32(k)) } return int32('?') } @@ -114189,13 +114187,13 @@ func ___getopt_long(tls *TLS, argc int32, argv uintptr, optstring uintptr, longo return -int32(1) } skipped = Xoptind - if int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) != int32('-') { i = Xoptind for { if i >= argc || !(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) != 0) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + 1)) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + 1)) != 0 { break } goto _1 @@ -114230,8 +114228,8 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, var cnt, colon, i, j, l, match, v2 int32 _, _, _, _, _, _, _, _, _, _, _, _, _ = arg, cnt, colon, i, j, l, match, name, opt, start, v2, v5, v6 Xoptarg = uintptr(0) - if longopts != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { - colon = BoolInt32(int32(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) + if longopts != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8))))) == int32('-') && (longonly != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 2)) != 0) { + colon = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + BoolUintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring))) == int32('-'))))) == int32(':')) start = *(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + uintptr(1) v2 = Int32FromInt32(0) i = v2 @@ -114242,14 +114240,14 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } name = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fname opt = start - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('-') { opt++ } - for *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && int32(*(*uint8)(unsafe.Pointer(opt))) == int32(*(*uint8)(unsafe.Pointer(name))) { + for *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) { name++ opt++ } - if *(*uint8)(unsafe.Pointer(opt)) != 0 && int32(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { + if *(*uint8)(unsafe.Pointer(opt)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) != int32('=') { goto _1 } arg = opt @@ -114273,7 +114271,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } j = 0 for { - if !(j < l && int32(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == int32(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { + if !(j < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(start + uintptr(j)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(optstring + uintptr(i+j))))) { break } goto _4 @@ -114295,7 +114293,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, i = match opt = arg Xoptind++ - if int32(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(opt))) == int32('=') { if !((*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fhas_arg != 0) { Xoptopt = (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fval if colon != 0 || !(Xopterr != 0) { @@ -114332,7 +114330,7 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, } return (*(*Toption)(unsafe.Pointer(longopts + uintptr(i)*32))).Fval } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(Xoptind)*8)) + 1))) == int32('-') { Xoptopt = 0 if !(colon != 0) && Xopterr != 0 { if cnt != 0 { @@ -114372,7 +114370,7 @@ func Xgetpriority(tls *TLS, which int32, who Tid_t) (r int32) { } var ret int32 _ = ret - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getpriority), int64(which), int64(who))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getpriority), int64(which), Int64FromUint32(who))))) if ret < 0 { return ret } @@ -114384,7 +114382,7 @@ func Xgetresgid(tls *TLS, rgid uintptr, egid uintptr, sgid uintptr) (r int32) { trc("tls=%v rgid=%v egid=%v sgid=%v, (%v:)", tls, rgid, egid, sgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresgid), int64(rgid), int64(egid), int64(sgid))))) } func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { @@ -114392,7 +114390,7 @@ func Xgetresuid(tls *TLS, ruid uintptr, euid uintptr, suid uintptr) (r int32) { trc("tls=%v ruid=%v euid=%v suid=%v, (%v:)", tls, ruid, euid, suid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_getresuid), int64(ruid), int64(euid), int64(suid))))) } func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { @@ -114406,7 +114404,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { var v1, v2 uint64 var _ /* k_rlim at bp+0 */ [2]uint64 _, _, _ = ret, v1, v2 - ret = int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(Int32FromInt32(0)), int64(rlim))))) if !(ret != 0) { if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur >= ^Uint64FromUint64(0) { (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur = ^Uint64FromUint64(0) @@ -114418,7 +114416,7 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { if !(ret != 0) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) { return ret } - if X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getrlimit), int64(resource), int64(bp)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getrlimit), int64(resource), int64(bp)))) < 0 { return -int32(1) } if (*(*[2]uint64)(unsafe.Pointer(bp)))[0] == -Uint64FromUint64(1) { @@ -114466,7 +114464,7 @@ func Xgetrusage(tls *TLS, who int32, ru uintptr) (r1 int32) { Ftv_usec: (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)], } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { @@ -114498,7 +114496,7 @@ func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { if Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(keys + uintptr(i)*8)), s, l) != 0 { goto _3 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(l)))) == int32('=') { *(*uintptr)(unsafe.Pointer(val)) = s + uintptr(l) + uintptr(1) } else { if *(*uint8)(unsafe.Pointer(s + uintptr(l))) != 0 { @@ -114562,8 +114560,8 @@ var _compat_map = [20]Tioctl_compat_map{ }, }, 2: { - Fnew_req: int32(uint64(Uint32FromUint32(2)< %v", r) }() } - return int32(X__libc.Fsecure) + return Int32FromUint8(X__libc.Fsecure) } func Xlockf(tls *TLS, fd int32, op int32, size Toff_t) (r int32) { @@ -115018,7 +115016,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { src = beg for *(*uint8)(unsafe.Pointer(src)) != 0 { cval = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src))) != int32('\\') { v1 = dest dest++ v2 = src @@ -115026,7 +115024,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { *(*uint8)(unsafe.Pointer(v1)) = *(*uint8)(unsafe.Pointer(v2)) continue } - if int32(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(src + 1))) == int32('\\') { src++ v3 = dest dest++ @@ -115041,11 +115039,11 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { if !(i < int32(3)) { break } - if int32(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && int32(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) >= int32('0') && Int32FromUint8(*(*uint8)(unsafe.Pointer(val))) <= int32('7') { cval = uint8(int32(cval) << Int32FromInt32(3)) v6 = val val++ - cval = uint8(int32(cval) + (int32(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) + cval = uint8(int32(cval) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) - Int32FromUint8('0'))) } else { break } @@ -115085,7 +115083,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 use_internal = BoolInt32(linebuf == uintptr(unsafe.Pointer(&_internal_buf))) (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_freq = 0 (*Tmntent)(unsafe.Pointer(mnt)).Fmnt_passno = 0 - for cond := true; cond; cond = int32(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || uint64((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { + for cond := true; cond; cond = Int32FromUint8(*(*uint8)(unsafe.Pointer(linebuf + uintptr((*(*[8]int32)(unsafe.Pointer(bp)))[0])))) == int32('#') || Uint64FromInt32((*(*[8]int32)(unsafe.Pointer(bp)))[int32(1)]) == len1 { if use_internal != 0 { Xgetline(tls, uintptr(unsafe.Pointer(&_internal_buf)), uintptr(unsafe.Pointer(&_internal_bufsize)), f) linebuf = _internal_buf @@ -115109,7 +115107,7 @@ func Xgetmntent_r(tls *TLS, f uintptr, mnt uintptr, linebuf uintptr, buflen int3 if !(i < Uint64FromInt64(32)/Uint64FromInt64(4)) { break } - (*(*[8]int32)(unsafe.Pointer(bp)))[i] = int32(len1) + (*(*[8]int32)(unsafe.Pointer(bp)))[i] = Int32FromUint64(len1) goto _1 _1: ; @@ -115181,7 +115179,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h var _ /* st at bp+0 */ Tstat _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, de, dfd, err, j, k, l, r, type1, v1, v10, v11, v12, v13, v2, v3, v4, v7, v8 l = Xstrlen(tls, path) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint64(1))))) == int32('/') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(l-uint64(1))))) == int32('/') { v1 = l - uint64(1) } else { v1 = l @@ -115236,14 +115234,14 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h v4 = 0 } (*(*Thistory)(unsafe.Pointer(bp + 144))).Flevel = v4 - (*(*Thistory)(unsafe.Pointer(bp + 144))).Fbase = int32(j + uint64(1)) + (*(*Thistory)(unsafe.Pointer(bp + 144))).Fbase = Int32FromUint64(j + uint64(1)) (*(*TFTW)(unsafe.Pointer(bp + 176))).Flevel = (*(*Thistory)(unsafe.Pointer(bp + 144))).Flevel if h != 0 { (*(*TFTW)(unsafe.Pointer(bp + 176))).Fbase = (*Thistory)(unsafe.Pointer(h)).Fbase } else { k = j for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k)))) == int32('/')) { break } goto _5 @@ -115252,7 +115250,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h k-- } for { - if !(k != 0 && int32(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint64(1))))) != int32('/')) { + if !(k != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(path + uintptr(k-uint64(1))))) != int32('/')) { break } goto _6 @@ -115260,7 +115258,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h ; k-- } - (*(*TFTW)(unsafe.Pointer(bp + 176))).Fbase = int32(k) + (*(*TFTW)(unsafe.Pointer(bp + 176))).Fbase = Int32FromUint64(k) } if type1 == int32(FTW_D) || type1 == int32(FTW_DP) { dfd = Xopen(tls, path, O_RDONLY, 0) @@ -115304,7 +115302,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h if !(v10 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) { continue } if Xstrlen(tls, de+19) >= uint64(PATH_MAX)-l { @@ -115479,12 +115477,12 @@ func X__ptsname_r(tls *TLS, fd int32, buf uintptr, len1 Tsize_t) (r int32) { if !(buf != 0) { len1 = uint64(0) } - v1 = int32(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Uint32FromUint32(TIOCGPTN)), int64(bp))) + v1 = int32(X__syscall3(tls, int64(SYS_ioctl), int64(fd), Int64FromUint32(Uint32FromUint32(TIOCGPTN)), int64(bp))) err = v1 if v1 != 0 { return -err } - if uint64(Xsnprintf(tls, buf, len1, __ccgo_ts+939, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { + if Uint64FromInt32(Xsnprintf(tls, buf, len1, __ccgo_ts+939, VaList(bp+16, *(*int32)(unsafe.Pointer(bp))))) >= len1 { return int32(ERANGE) } return 0 @@ -115502,10 +115500,10 @@ func _slash_len(tls *TLS, s uintptr) (r Tsize_t) { var s0 uintptr _ = s0 s0 = s - for int32(*(*uint8)(unsafe.Pointer(s))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('/') { s++ } - return uint64(int64(s) - int64(s0)) + return Uint64FromInt64(int64(s) - int64(s0)) } func Xrealpath(tls *TLS, filename uintptr, resolved uintptr) (r uintptr) { @@ -115551,7 +115549,7 @@ _3: ; /* If stack starts with /, the whole component is / or // * and the output state must be reset. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { check_dir = 0 nup = uint64(0) q = uint64(0) @@ -115560,7 +115558,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v4] = uint8('/') p++ /* Initial // is special. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint64(1)]) != int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p+uint64(1)]) != int32('/') { v5 = q q++ (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[v5] = uint8('/') @@ -115568,21 +115566,21 @@ _3: goto _2 } z = X__strchrnul(tls, bp+uintptr(p), int32('/')) - v6 = uint64(int64(z) - int64(bp+uintptr(p))) + v6 = Uint64FromInt64(int64(z) - int64(bp+uintptr(p))) l = v6 l0 = v6 if !(l != 0) && !(check_dir != 0) { goto _1 } /* Skip any . component but preserve check_dir status. */ - if l == uint64(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { + if l == uint64(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('.') { p += l goto _2 } /* Copy next component onto output at least temporarily, to * call readlink, but wait to advance output position until * determining it's not a link. */ - if q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { + if q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { if !(p != 0) { goto toolong } @@ -115598,7 +115596,7 @@ _3: (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q+l] = uint8(0) p += l up = 0 - if l0 == uint64(2) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(2)]) == int32('.') && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(1)]) == int32('.') { + if l0 == uint64(2) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(2)]) == int32('.') && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p-uint64(1)]) == int32('.') { up = int32(1) /* Any non-.. path components we could cancel start * after nup repetitions of the 3-byte string "../"; @@ -115616,7 +115614,7 @@ _3: } } k = Xreadlink(tls, bp+4097, bp, p) - if uint64(k) == p { + if Uint64FromInt64(k) == p { goto toolong } if !(k != 0) { @@ -115634,10 +115632,10 @@ skip_readlink: ; check_dir = 0 if up != 0 { - for q != 0 && int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { + for q != 0 && Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q-uint64(1)]) != int32('/') { q-- } - if q > uint64(1) && (q > uint64(2) || int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { + if q > uint64(1) && (q > uint64(2) || Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/')) { q-- } goto _2 @@ -115645,7 +115643,7 @@ skip_readlink: if l0 != 0 { q += l } - check_dir = int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) + check_dir = Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) goto _2 _8: ; @@ -115657,13 +115655,13 @@ _8: } /* If link contents end in /, strip any slashes already on * stack to avoid /->// or //->/// or spurious toolong. */ - if int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int64(1)]) == int32('/') { - for int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { + if Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[k-int64(1)]) == int32('/') { + for Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[p]) == int32('/') { p++ } } - p -= uint64(k) - Xmemmove(tls, bp+uintptr(p), bp, uint64(k)) + p -= Uint64FromInt64(k) + Xmemmove(tls, bp+uintptr(p), bp, Uint64FromInt64(k)) /* Skip the stack advancement in case we have a new * absolute base path. */ goto restart @@ -115676,7 +115674,7 @@ _2: _1: ; (*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[q] = uint8(0) - if int32((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { + if Int32FromUint8((*(*[4096]uint8)(unsafe.Pointer(bp + 4097)))[0]) != int32('/') { if !(Xgetcwd(tls, bp, uint64(4097)) != 0) { return uintptr(0) } @@ -115689,7 +115687,7 @@ _1: if !(v10 != 0) { break } - for l > uint64(1) && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { + for l > uint64(1) && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { l-- } if l > uint64(1) { @@ -115700,7 +115698,7 @@ _1: p++ } } - if q-p != 0 && int32((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { + if q-p != 0 && Int32FromUint8((*(*[4097]uint8)(unsafe.Pointer(bp)))[l-uint64(1)]) != int32('/') { v11 = l l++ (*(*[4097]uint8)(unsafe.Pointer(bp)))[v11] = uint8('/') @@ -115729,7 +115727,7 @@ func Xsetdomainname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { trc("tls=%v name=%v len1=%v, (%v:)", tls, name, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setdomainname), int64(name), Int64FromUint64(len1))))) } func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { @@ -115737,7 +115735,7 @@ func Xsetpriority(tls *TLS, which int32, who Tid_t, prio int32) (r int32) { trc("tls=%v which=%v who=%v prio=%v, (%v:)", tls, which, who, prio, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setpriority), int64(which), int64(who), int64(prio))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setpriority), int64(which), Int64FromUint32(who), int64(prio))))) } type Tctx = struct { @@ -115780,7 +115778,7 @@ func Xsetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { } ret = int32(X__syscall4(tls, int64(SYS_prlimit64), int64(Int32FromInt32(0)), int64(resource), int64(rlim), int64(Int32FromInt32(0)))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur < ^Uint64FromUint64(0) { v1 = (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur @@ -115826,7 +115824,7 @@ func Xsyscall(tls *TLS, n int64, va uintptr) (r int64) { e = VaInt64(&ap) f = VaInt64(&ap) _ = ap - return X__syscall_ret(tls, uint64(X__syscall6(tls, n, a, b, c, d, e, f))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall6(tls, n, a, b, c, d, e, f))) } const AF_ALG = 38 @@ -116254,19 +116252,19 @@ func __vsyslog(tls *TLS, priority int32, message uintptr, ap Tva_list) { pid = v1 l = Xsnprintf(tls, bp+80, uint64(1024), __ccgo_ts+960, VaList(bp+1120, priority, bp, bp+1104, uintptr(unsafe.Pointer(&_log_ident)), __ccgo_ts+982+BoolUintptr(!(pid != 0)), pid, __ccgo_ts+984+BoolUintptr(!(pid != 0)))) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = errno_save - l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-uint64(l), message, ap) + l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-Uint64FromInt32(l), message, ap) if l2 >= 0 { - if uint64(l2) >= uint64(1024)-uint64(l) { - l = int32(Uint64FromInt64(1024) - Uint64FromInt32(1)) + if Uint64FromInt32(l2) >= uint64(1024)-Uint64FromInt32(l) { + l = Int32FromUint64(Uint64FromInt64(1024) - Uint64FromInt32(1)) } else { l += l2 } - if int32((*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[l-int32(1)]) != int32('\n') { + if Int32FromUint8((*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[l-int32(1)]) != int32('\n') { v2 = l l++ (*(*[1024]uint8)(unsafe.Pointer(bp + 80)))[v2] = uint8('\n') } - if Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, uint64(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { + if Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0 && (!(_is_lost_conn(tls, *(*int32)(unsafe.Pointer(X__errno_location(tls)))) != 0) || Xconnect(tls, _log_fd, uintptr(unsafe.Pointer(&_log_addr)), uint32(12)) < 0 || Xsend(tls, _log_fd, bp+80, Uint64FromInt32(l), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { fd = Xopen(tls, __ccgo_ts+679, Int32FromInt32(O_WRONLY)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC), 0) if fd >= 0 { Xdprintf(tls, fd, __ccgo_ts+986, VaList(bp+1120, l-*(*int32)(unsafe.Pointer(bp + 1104)), bp+80+uintptr(*(*int32)(unsafe.Pointer(bp + 1104))))) @@ -116318,7 +116316,7 @@ func Xuname(tls *TLS, uts uintptr) (r int32) { trc("tls=%v uts=%v, (%v:)", tls, uts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_uname), int64(uts))))) } func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116326,7 +116324,7 @@ func X__madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { trc("tls=%v addr=%v len1=%v advice=%v, (%v:)", tls, addr, len1, advice, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))))) } func Xmadvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32) { @@ -116342,7 +116340,7 @@ func Xmincore(tls *TLS, addr uintptr, len1 Tsize_t, vec uintptr) (r int32) { trc("tls=%v addr=%v len1=%v vec=%v, (%v:)", tls, addr, len1, vec, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mincore), int64(addr), int64(len1), int64(vec))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mincore), int64(addr), Int64FromUint64(len1), int64(vec))))) } func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116350,7 +116348,7 @@ func Xmlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_mlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_mlock), int64(addr), Int64FromUint64(len1))))) } func Xmlockall(tls *TLS, flags int32) (r int32) { @@ -116358,7 +116356,7 @@ func Xmlockall(tls *TLS, flags int32) (r int32) { trc("tls=%v flags=%v, (%v:)", tls, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_mlockall), int64(flags))))) } const OFF_MASK = 4095 @@ -116374,9 +116372,9 @@ func X__mprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { } var end, start Tsize_t _, _ = end, start - start = uint64(addr) & uint64(-Int32FromInt32(PAGESIZE)) - end = uint64(addr+uintptr(len1)+UintptrFromInt32(PAGESIZE)-UintptrFromInt32(1)) & uint64(-Int32FromInt32(PAGESIZE)) - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mprotect), int64(start), int64(end-start), int64(prot))))) + start = uint64(addr) & Uint64FromInt32(-Int32FromInt32(PAGESIZE)) + end = uint64(addr+uintptr(len1)+UintptrFromInt32(PAGESIZE)-UintptrFromInt32(1)) & Uint64FromInt32(-Int32FromInt32(PAGESIZE)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mprotect), Int64FromUint64(start), Int64FromUint64(end-start), int64(prot))))) } func Xmprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { @@ -116399,7 +116397,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla var new_addr uintptr _, _ = ap, new_addr new_addr = uintptr(0) - if new_len >= uint64(Int64FromInt64(INT64_MAX)) { + if new_len >= Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(-Int32FromInt32(1)) } @@ -116409,7 +116407,7 @@ func X__mremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, fla new_addr = VaUintptr(&ap) _ = ap } - return uintptr(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), int64(old_len), int64(new_len), int64(flags), int64(new_addr))))) + return uintptr(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_mremap), int64(old_addr), Int64FromUint64(old_len), Int64FromUint64(new_len), int64(flags), int64(new_addr))))) } func Xmremap(tls *TLS, old_addr uintptr, old_len Tsize_t, new_len Tsize_t, flags int32, va uintptr) (r uintptr) { @@ -116425,7 +116423,7 @@ func Xmsync(tls *TLS, start uintptr, len1 Tsize_t, flags int32) (r int32) { trc("tls=%v start=%v len1=%v flags=%v, (%v:)", tls, start, len1, flags, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_msync), int64(start), int64(len1), int64(flags), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_msync), int64(start), Int64FromUint64(len1), int64(flags), 0, 0, 0)))) } func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { @@ -116433,7 +116431,7 @@ func Xmunlock(tls *TLS, addr uintptr, len1 Tsize_t) (r int32) { trc("tls=%v addr=%v len1=%v, (%v:)", tls, addr, len1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munlock), int64(addr), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munlock), int64(addr), Int64FromUint64(len1))))) } func Xmunlockall(tls *TLS) (r int32) { @@ -116441,7 +116439,7 @@ func Xmunlockall(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_munlockall))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_munlockall))))) } func _dummy7(tls *TLS) { @@ -116453,7 +116451,7 @@ func X__munmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { defer func() { trc("-> %v", r) }() } _dummy7(tls) - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_munmap), int64(start), int64(len1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_munmap), int64(start), Int64FromUint64(len1))))) } func Xmunmap(tls *TLS, start uintptr, len1 Tsize_t) (r int32) { @@ -116472,7 +116470,7 @@ func Xposix_madvise(tls *TLS, addr uintptr, len1 Tsize_t, advice int32) (r int32 if advice == int32(MADV_DONTNEED) { return 0 } - return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), int64(len1), int64(advice))) + return int32(-X__syscall3(tls, int64(SYS_madvise), int64(addr), Int64FromUint64(len1), int64(advice))) } func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { @@ -116482,12 +116480,12 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { } var p, v1 uintptr _, _ = p, v1 - for int32(*(*uint8)(unsafe.Pointer(name))) == int32('/') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('/') { name++ } v1 = X__strchrnul(tls, name, int32('/')) p = v1 - if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int64(p)-int64(name) <= int64(2) && int32(*(*uint8)(unsafe.Pointer(name))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { + if *(*uint8)(unsafe.Pointer(v1)) != 0 || p == name || int64(p)-int64(name) <= int64(2) && Int32FromUint8(*(*uint8)(unsafe.Pointer(name))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -116496,7 +116494,7 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { return uintptr(0) } Xmemcpy(tls, buf, __ccgo_ts+991, uint64(9)) - Xmemcpy(tls, buf+uintptr(9), name, uint64(int64(p)-int64(name)+int64(1))) + Xmemcpy(tls, buf+uintptr(9), name, Uint64FromInt64(int64(p)-int64(name)+int64(1))) return buf } @@ -116561,9 +116559,9 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { var b, v3 int32 var v1, v2 uint32 _, _, _, _ = b, v1, v2, v3 - b = int32(uint8(c)) - if uint32(b) < uint32(128) { - v1 = uint32(b) + b = Int32FromUint8(Uint8FromInt32(c)) + if Uint32FromInt32(b) < uint32(128) { + v1 = Uint32FromInt32(b) } else { if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v3 = int32(4) @@ -116571,7 +116569,7 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { v3 = int32(1) } if v3 == int32(1) && c != -int32(1) { - v2 = uint32(Int32FromInt32(0xdfff) & int32(int8(c))) + v2 = Uint32FromInt32(Int32FromInt32(0xdfff) & int32(int8(c))) } else { v2 = uint32(0xffffffff) } @@ -116603,18 +116601,18 @@ func Xc16rtomb(tls *TLS, s uintptr, c16 Tchar16_t, ps uintptr) (r Tsize_t) { return uint64(1) } if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(c16)-uint32(0xd800) < uint32(0x400) { - *(*uint32)(unsafe.Pointer(x)) = uint32((int32(c16) - int32(0xd7c0)) << int32(10)) + *(*uint32)(unsafe.Pointer(x)) = Uint32FromInt32((Int32FromUint16(c16) - int32(0xd7c0)) << int32(10)) return uint64(0) } if *(*uint32)(unsafe.Pointer(x)) != 0 { if uint32(c16)-uint32(0xdc00) >= uint32(0x400) { goto ilseq } else { - wc = int32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) + wc = Int32FromUint32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) } *(*uint32)(unsafe.Pointer(x)) = uint32(0) } else { - wc = int32(c16) + wc = Int32FromUint16(c16) } return Xwcrtomb(tls, s, wc, uintptr(0)) goto ilseq @@ -116622,7 +116620,7 @@ ilseq: ; *(*uint32)(unsafe.Pointer(x)) = uint32(0) *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } var _internal_state uint32 @@ -116632,7 +116630,7 @@ func Xc32rtomb(tls *TLS, s uintptr, c32 Tchar32_t, ps uintptr) (r Tsize_t) { trc("tls=%v s=%v c32=%v ps=%v, (%v:)", tls, s, c32, ps, origin(2)) defer func() { trc("-> %v", r) }() } - return Xwcrtomb(tls, s, int32(c32), ps) + return Xwcrtomb(tls, s, Int32FromUint32(c32), ps) } func Xmblen(tls *TLS, s uintptr, n Tsize_t) (r int32) { @@ -116680,21 +116678,21 @@ func Xmbrtoc16(tls *TLS, pc16 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } /* mbrtowc states for partial UTF-8 characters have the high bit set; * we use nonzero states without high bit for pending surrogates. */ - if int32(*(*uint32)(unsafe.Pointer(pending))) > 0 { + if Int32FromUint32(*(*uint32)(unsafe.Pointer(pending))) > 0 { if pc16 != 0 { *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*uint32)(unsafe.Pointer(pending))) } *(*uint32)(unsafe.Pointer(pending)) = uint32(0) - return uint64(-Int32FromInt32(3)) + return Uint64FromInt32(-Int32FromInt32(3)) } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) { if *(*Twchar_t)(unsafe.Pointer(bp)) >= int32(0x10000) { - *(*uint32)(unsafe.Pointer(pending)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) + *(*uint32)(unsafe.Pointer(pending)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))&int32(0x3ff) + int32(0xdc00)) *(*Twchar_t)(unsafe.Pointer(bp)) = int32(0xd7c0) + *(*Twchar_t)(unsafe.Pointer(bp))>>Int32FromInt32(10) } if pc16 != 0 { - *(*Tchar16_t)(unsafe.Pointer(pc16)) = uint16(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar16_t)(unsafe.Pointer(pc16)) = Uint16FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } return ret @@ -116720,7 +116718,7 @@ func Xmbrtoc32(tls *TLS, pc32 uintptr, s uintptr, n Tsize_t, ps uintptr) (r Tsiz } ret = Xmbrtowc(tls, bp, s, n, ps) if ret <= uint64(4) && pc32 != 0 { - *(*Tchar32_t)(unsafe.Pointer(pc32)) = uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + *(*Tchar32_t)(unsafe.Pointer(pc32)) = Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } return ret } @@ -116758,11 +116756,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize } } if !(n != 0) { - return uint64(-Int32FromInt32(2)) + return Uint64FromInt32(-Int32FromInt32(2)) } if !(c != 0) { - if int32(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) < int32(0x80) { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolUint64(!!(v1 != 0)) } @@ -116772,7 +116770,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize v2 = int32(1) } if v2 == int32(1) { - *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(int8(*(*uint8)(unsafe.Pointer(s)))) + *(*Twchar_t)(unsafe.Pointer(wc)) = Int32FromInt32(0xdfff) & int32(Int8FromUint8(*(*uint8)(unsafe.Pointer(s)))) return Uint64FromInt32(1) } if uint32(*(*uint8)(unsafe.Pointer(s)))-uint32(0xc2) > Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -116784,7 +116782,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize n-- } if n != 0 { - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } goto loop @@ -116792,11 +116790,11 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize ; v4 = s s++ - c = c<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _9 } @@ -117036,22 +117034,22 @@ _15: ws += 4 v17 = s s++ - *(*Twchar_t)(unsafe.Pointer(v16)) = int32(*(*uint8)(unsafe.Pointer(v17))) + *(*Twchar_t)(unsafe.Pointer(v16)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v17))) v18 = ws ws += 4 v19 = s s++ - *(*Twchar_t)(unsafe.Pointer(v18)) = int32(*(*uint8)(unsafe.Pointer(v19))) + *(*Twchar_t)(unsafe.Pointer(v18)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v19))) v20 = ws ws += 4 v21 = s s++ - *(*Twchar_t)(unsafe.Pointer(v20)) = int32(*(*uint8)(unsafe.Pointer(v21))) + *(*Twchar_t)(unsafe.Pointer(v20)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v21))) v22 = ws ws += 4 v23 = s s++ - *(*Twchar_t)(unsafe.Pointer(v22)) = int32(*(*uint8)(unsafe.Pointer(v23))) + *(*Twchar_t)(unsafe.Pointer(v22)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v23))) wn -= uint64(4) } } @@ -117060,7 +117058,7 @@ _15: ws += 4 v25 = s s++ - *(*Twchar_t)(unsafe.Pointer(v24)) = int32(*(*uint8)(unsafe.Pointer(v25))) + *(*Twchar_t)(unsafe.Pointer(v24)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(v25))) wn-- goto _14 } @@ -117073,13 +117071,13 @@ _15: goto resume resume: ; - if (int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { s-- goto _13 } v27 = s s++ - c = c<= uint32(0x40) { s -= uintptr(2) @@ -117087,7 +117085,7 @@ resume: } v28 = s s++ - c = c<= uint32(0x40) { s -= uintptr(3) @@ -117095,12 +117093,12 @@ resume: } v29 = s s++ - c = c< Uint32FromUint32(0xf4)-Uint32FromUint32(0xc2) { @@ -117186,14 +117184,14 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { if n < uint64(4) && c<<(uint64(6)*n-uint64(6))&(Uint32FromUint32(1)<>int32(3)-int32(0x10)|(int32(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+int32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { + if (Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)-int32(0x10)|(Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))>>int32(3)+Int32FromUint32(c)>>Int32FromInt32(26))) & ^Int32FromInt32(7) != 0 { goto ilseq } v4 = s s++ - c = c<= uint32(0x40) { @@ -117201,9 +117199,9 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v5 = s s++ - c = c<= uint32(0x40) { @@ -117211,7 +117209,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { } v6 = s s++ - *(*Twchar_t)(unsafe.Pointer(wc)) = int32(c<>Int32FromInt32(6)) - *(*uint8)(unsafe.Pointer(s)) = uint8(int32(0x80) | wc&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(int32(0xc0) | wc>>Int32FromInt32(6)) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(int32(0x80) | wc&int32(0x3f)) return uint64(2) } else { - if uint32(wc) < uint32(0xd800) || uint32(wc)-uint32(0xe000) < uint32(0x2000) { + if Uint32FromInt32(wc) < uint32(0xd800) || Uint32FromInt32(wc)-uint32(0xe000) < uint32(0x2000) { v3 = s s++ - *(*uint8)(unsafe.Pointer(v3)) = uint8(int32(0xe0) | wc>>Int32FromInt32(12)) + *(*uint8)(unsafe.Pointer(v3)) = Uint8FromInt32(int32(0xe0) | wc>>Int32FromInt32(12)) v4 = s s++ - *(*uint8)(unsafe.Pointer(v4)) = uint8(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) - *(*uint8)(unsafe.Pointer(s)) = uint8(int32(0x80) | wc&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v4)) = Uint8FromInt32(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(int32(0x80) | wc&int32(0x3f)) return uint64(3) } else { - if uint32(wc)-uint32(0x10000) < uint32(0x100000) { + if Uint32FromInt32(wc)-uint32(0x10000) < uint32(0x100000) { v5 = s s++ - *(*uint8)(unsafe.Pointer(v5)) = uint8(int32(0xf0) | wc>>Int32FromInt32(18)) + *(*uint8)(unsafe.Pointer(v5)) = Uint8FromInt32(int32(0xf0) | wc>>Int32FromInt32(18)) v6 = s s++ - *(*uint8)(unsafe.Pointer(v6)) = uint8(int32(0x80) | wc>>Int32FromInt32(12)&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v6)) = Uint8FromInt32(int32(0x80) | wc>>Int32FromInt32(12)&int32(0x3f)) v7 = s s++ - *(*uint8)(unsafe.Pointer(v7)) = uint8(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) - *(*uint8)(unsafe.Pointer(s)) = uint8(int32(0x80) | wc&int32(0x3f)) + *(*uint8)(unsafe.Pointer(v7)) = Uint8FromInt32(int32(0x80) | wc>>Int32FromInt32(6)&int32(0x3f)) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(int32(0x80) | wc&int32(0x3f)) return uint64(4) } } @@ -117283,7 +117281,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { } } *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EILSEQ) - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st uintptr) (r Tsize_t) { @@ -117309,8 +117307,8 @@ func Xwcsnrtombs(tls *TLS, dst uintptr, wcs uintptr, wn Tsize_t, n Tsize_t, st u v1 = dst } l = Xwcrtomb(tls, v1, *(*Twchar_t)(unsafe.Pointer(ws)), uintptr(0)) - if l == uint64(-Int32FromInt32(1)) { - cnt = uint64(-Int32FromInt32(1)) + if l == Uint64FromInt32(-Int32FromInt32(1)) { + cnt = Uint64FromInt32(-Int32FromInt32(1)) break } if dst != 0 { @@ -117356,10 +117354,10 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize if !(*(*Twchar_t)(unsafe.Pointer(ws2)) != 0) { break } - if uint32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(ws2))) >= uint32(0x80) { l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(ws2)), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } n += l } else { @@ -117373,7 +117371,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize return n } for n >= uint64(4) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*uint8)(unsafe.Pointer(s)) = uint8(0) *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117381,20 +117379,20 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, s, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } s += uintptr(l) n -= l } else { v2 = s s++ - *(*uint8)(unsafe.Pointer(v2)) = uint8(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) n-- } *(*uintptr)(unsafe.Pointer(ws)) += 4 } for n != 0 { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-uint32(1) >= uint32(0x7f) { if !(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))) != 0) { *(*uint8)(unsafe.Pointer(s)) = uint8(0) *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) @@ -117402,7 +117400,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } l = Xwcrtomb(tls, bp, *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+Uint64FromInt32(1) != 0) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if l > n { return N - n @@ -117413,7 +117411,7 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n Tsize_t, st uintptr) (r Tsize } else { v3 = s s++ - *(*uint8)(unsafe.Pointer(v3)) = uint8(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) + *(*uint8)(unsafe.Pointer(v3)) = Uint8FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) n-- } *(*uintptr)(unsafe.Pointer(ws)) += 4 @@ -117440,7 +117438,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { var v1 int32 _ = v1 if c < uint32(128) { - return int32(c) + return Int32FromUint32(c) } if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) @@ -117448,7 +117446,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { v1 = int32(1) } if v1 == int32(1) && c-uint32(0xdf80) < uint32(0x80) { - return int32(uint8(c)) + return Int32FromUint8(uint8(c)) } return -int32(1) } @@ -117461,7 +117459,7 @@ func Xwctomb(tls *TLS, s uintptr, wc Twchar_t) (r int32) { if !(s != 0) { return 0 } - return int32(Xwcrtomb(tls, s, wc, uintptr(0))) + return Int32FromUint64(Xwcrtomb(tls, s, wc, uintptr(0))) } func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { @@ -117517,7 +117515,7 @@ func Xaccept(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } type Tucred = struct { @@ -117587,7 +117585,7 @@ func Xaccept4(tls *TLS, fd int32, addr uintptr, len1 uintptr, flg int32) (r1 int v10 = r goto _11 _11: - ret = int32(X__syscall_ret(tls, uint64(v10))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(v10))) if ret >= 0 || *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(ENOSYS) && *(*int32)(unsafe.Pointer(X__errno_location(tls))) != int32(EINVAL) { return ret } @@ -117624,7 +117622,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v3 = 0 v4 = int64(fd) v5 = int64(addr) - v6 = int64(len1) + v6 = Int64FromUint32(len1) v7 = int64(Int32FromInt32(0)) v8 = int64(Int32FromInt32(0)) v9 = int64(Int32FromInt32(0)) @@ -117661,7 +117659,7 @@ func Xbind(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { @@ -117680,7 +117678,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v3 = int32(1) v4 = int64(fd) v5 = int64(addr) - v6 = int64(len1) + v6 = Int64FromUint32(len1) v7 = int64(Int32FromInt32(0)) v8 = int64(Int32FromInt32(0)) v9 = int64(Int32FromInt32(0)) @@ -117717,7 +117715,7 @@ func Xconnect(tls *TLS, fd int32, addr uintptr, len1 Tsocklen_t) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } const ADD = 0 @@ -118627,11 +118625,11 @@ func _getoffs(tls *TLS, offs uintptr, base uintptr, s uintptr) (r int32) { _, _ = i, v2 i = 0 for { - for int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { - if int32(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))&int32(0xc0) != int32(0xc0) { return 0 } - s = base + uintptr(int32(*(*uint8)(unsafe.Pointer(s)))&Int32FromInt32(0x3f)< uint32(62) { + if Uint32FromInt32(j-k)-uint32(1) > uint32(62) { return 0 } v3 = i i++ - *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = uint8(j - k) + *(*uint8)(unsafe.Pointer(lens + uintptr(v3))) = Uint8FromInt32(j - k) if j == l { return i } @@ -118703,12 +118701,12 @@ func _match(tls *TLS, offset uintptr, base uintptr, dn uintptr, end uintptr, len for { nlen-- v2 = nlen - l = int32(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) + l = Int32FromUint8(*(*uint8)(unsafe.Pointer(lens + uintptr(v2)))) noff-- v3 = noff o = int32((*(*[128]int16)(unsafe.Pointer(bp)))[v3]) end -= uintptr(l) - if l != int32(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, uint64(l)) != 0 { + if l != Int32FromUint8(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, Uint64FromInt32(l)) != 0 { return m } *(*int32)(unsafe.Pointer(offset)) = o @@ -118742,7 +118740,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l m = 0 bestlen = 0 l = Xstrnlen(tls, src, uint64(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(l-uint64(1))))) == int32('.') { l-- } if l > uint64(253) || space <= 0 { @@ -118753,7 +118751,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l return int32(1) } end = src + uintptr(l) - n = _getlens(tls, bp+4, src, int32(l)) + n = _getlens(tls, bp+4, src, Int32FromUint64(l)) if !(n != 0) { return -int32(1) } @@ -118768,7 +118766,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l if m > bestlen { bestlen = m bestoff = *(*int32)(unsafe.Pointer(bp)) - if uint64(m) == l { + if Uint64FromInt32(m) == l { break } } @@ -118779,15 +118777,15 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l } } /* encode unmatched part */ - if uint64(space) < l-uint64(bestlen)+uint64(2)+BoolUint64(uint64(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { + if Uint64FromInt32(space) < l-Uint64FromInt32(bestlen)+uint64(2)+BoolUint64(Uint64FromInt32(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { return -int32(1) } - Xmemcpy(tls, dst+uintptr(1), src, l-uint64(bestlen)) + Xmemcpy(tls, dst+uintptr(1), src, l-Uint64FromInt32(bestlen)) v3 = Int32FromInt32(0) j = v3 i = v3 for { - if !(uint64(i) < l-uint64(bestlen)) { + if !(Uint64FromInt32(i) < l-Uint64FromInt32(bestlen)) { break } *(*uint8)(unsafe.Pointer(dst + uintptr(i))) = (*(*[127]uint8)(unsafe.Pointer(bp + 4)))[j] @@ -118796,16 +118794,16 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l ; v4 = j j++ - i += int32((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) + i += Int32FromUint8((*(*[127]uint8)(unsafe.Pointer(bp + 4)))[v4]) + int32(1) } /* add tail */ if bestlen != 0 { v5 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = uint8(int32(0xc0) | bestoff>>int32(8)) + *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = Uint8FromInt32(int32(0xc0) | bestoff>>int32(8)) v6 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(bestoff) + *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = Uint8FromInt32(bestoff) } else { v7 = i i++ @@ -118853,11 +118851,11 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr break } /* loop invariants: p= int64(end)-int64(p) || int64(j) >= int64(dend)-int64(dest) { return -int32(1) } @@ -118926,17 +118924,17 @@ func Xdn_skipname(tls *TLS, s uintptr, end uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { return int32(int64(p) - int64(s) + int64(1)) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { if p+uintptr(1) < end { return int32(int64(p) - int64(s) + int64(2)) } else { break } } else { - if int64(end)-int64(p) < int64(int32(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { + if int64(end)-int64(p) < int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { break } else { - p += uintptr(int32(*(*uint8)(unsafe.Pointer(p))) + int32(1)) + p += uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + int32(1)) } } } @@ -119050,12 +119048,12 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if rlen < int32(12) { return -int32(1) } - if int32(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 3)))&int32(15) != 0 { return 0 } p = r + uintptr(12) - qdcount = int32(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 5))) - ancount = int32(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(r + 7))) + qdcount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 4)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 5))) + ancount = Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 6)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(r + 7))) for { v1 = qdcount qdcount-- @@ -119083,11 +119081,11 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr return -int32(1) } p += uintptr(int32(1) + BoolInt32(!!(*(*uint8)(unsafe.Pointer(p)) != 0))) - len1 = int32(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(p + 9))) + len1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 9))) if int64(len1+int32(10)) > int64(r+uintptr(rlen))-int64(p) { return -int32(1) } - if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, int32(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { + if (*(*func(*TLS, uintptr, int32, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{callback})))(tls, ctx, Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))), p+uintptr(10), len1, r, rlen) < 0 { return -int32(1) } p += uintptr(int32(10) + len1) @@ -119429,7 +119427,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { break } if ii != 0 { - if int32(*(*uint8)(unsafe.Pointer(x))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != int32(':') { return uintptr(0) } else { x++ @@ -119446,7 +119444,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { ; ii++ } - if int32(*(*uint8)(unsafe.Pointer(x))) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(x))) != 0 { return uintptr(0) } /* bad format */ *(*Tether_addr)(unsafe.Pointer(p_a)) = *(*Tether_addr)(unsafe.Pointer(bp)) @@ -119484,7 +119482,7 @@ func Xether_ntoa_r(tls *TLS, p_a uintptr, x uintptr) (r uintptr) { } else { v2 = __ccgo_ts + 1006 } - x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, int32(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) + x += uintptr(Xsprintf(tls, x, v2, VaList(bp+8, Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(p_a + uintptr(ii))))))) goto _1 _1: ; @@ -119706,14 +119704,14 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt return -int32(5) } nais = nservs * naddrs - canon_len = int32(Xstrlen(tls, bp+1352)) - out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(88)+uint64(canon_len)+uint64(1)) + canon_len = Int32FromUint64(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), Uint64FromInt32(nais)*uint64(88)+Uint64FromInt32(canon_len)+uint64(1)) if !(out != 0) { return -int32(10) } if canon_len != 0 { outcanon = out + uintptr(nais)*88 - Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+int32(1))) + Xmemcpy(tls, outcanon, bp+1352, Uint64FromInt32(canon_len+int32(1))) } else { outcanon = uintptr(0) } @@ -119737,8 +119735,8 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*88))).Fai = Taddrinfo{ Fai_family: (*(*[48]Taddress)(unsafe.Pointer(bp + 8)))[i].Ffamily, - Fai_socktype: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), - Fai_protocol: int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), + Fai_socktype: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fsocktype), + Fai_protocol: Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[j].Fproto), Fai_addrlen: uint32(v5), Fai_addr: out + uintptr(k)*88 + 48, Fai_canonname: outcanon, @@ -119936,7 +119934,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu Fsin Tsockaddr_in F__ccgo_pad2 [12]byte }{} - *(*uint16)(unsafe.Pointer(bp)) = uint16(af) + *(*uint16)(unsafe.Pointer(bp)) = Uint16FromInt32(af) if af == int32(PF_INET6) { v1 = uint64(28) } else { @@ -119956,15 +119954,15 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu } } /* Align buffer and check for space for pointers and ip address */ - i = int32(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) + i = Int32FromUint64(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) if !(i != 0) { i = int32(8) } - if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-uint64(i)+uint64(l) { + if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-Uint64FromInt32(i)+uint64(l) { return int32(ERANGE) } - buf += uintptr(uint64(8) - uint64(i)) - buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - uint64(i) + uint64(l) + buf += uintptr(uint64(8) - Uint64FromInt32(i)) + buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - Uint64FromInt32(i) + uint64(l) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(Uint64FromInt32(2) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf @@ -119993,7 +119991,7 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l Tsocklen_t, af int32, h uintptr, bu break } (*Thostent)(unsafe.Pointer(h)).Fh_addrtype = af - (*Thostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*Thostent)(unsafe.Pointer(h)).Fh_length = Int32FromUint32(l) (*Thostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 @@ -120080,7 +120078,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, /* Align buffer */ align = -uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1)) need = Uint64FromInt32(4) * Uint64FromInt64(8) - need += uint64(cnt+Int32FromInt32(1)) * (uint64(8) + uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + need += Uint64FromInt32(cnt+Int32FromInt32(1)) * (uint64(8) + Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) need += Xstrlen(tls, name) + uint64(1) need += Xstrlen(tls, bp+1344) + uint64(1) need += align @@ -120091,7 +120089,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(Uint64FromInt32(3) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf - buf += uintptr(uint64(cnt+Int32FromInt32(1)) * uint64(8)) + buf += uintptr(Uint64FromInt32(cnt+Int32FromInt32(1)) * uint64(8)) i = 0 for { if !(i < cnt) { @@ -120099,7 +120097,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf buf += uintptr((*Thostent)(unsafe.Pointer(h)).Fh_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*Thostent)(unsafe.Pointer(h)).Fh_length)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, Uint64FromInt32((*Thostent)(unsafe.Pointer(h)).Fh_length)) goto _2 _2: ; @@ -120348,17 +120346,17 @@ func _copy_addr(tls *TLS, r uintptr, af int32, sa uintptr, addr uintptr, addrlen case int32(PF_INET6): dst = sa + 8 len1 = int32(16) - if int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { - (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = uint32(ifindex) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(addr + 1)))&int32(0xf) == int32(0x2) { + (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = Uint32FromInt32(ifindex) } default: return } - if addrlen < uint64(len1) { + if addrlen < Uint64FromInt32(len1) { return } - (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(af) - Xmemcpy(tls, dst, addr, uint64(len1)) + (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = Uint16FromInt32(af) + Xmemcpy(tls, dst, addr, Uint64FromInt32(len1)) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -120369,15 +120367,15 @@ func _gen_netmask(tls *TLS, r uintptr, af int32, sa uintptr, prefixlen int32) { var _ /* addr at bp+0 */ [16]Tuint8_t _, _ = i, v1 *(*[16]Tuint8_t)(unsafe.Pointer(bp)) = [16]Tuint8_t{} - if uint64(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { - prefixlen = int32(Uint64FromInt32(8) * Uint64FromInt64(16)) + if Uint64FromInt32(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { + prefixlen = Int32FromUint64(Uint64FromInt32(8) * Uint64FromInt64(16)) } i = prefixlen / int32(8) - Xmemset(tls, bp, int32(0xff), uint64(i)) - if uint64(i) < uint64(16) { + Xmemset(tls, bp, int32(0xff), Uint64FromInt32(i)) + if Uint64FromInt32(i) < uint64(16) { v1 = i i++ - (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = uint8(int32(0xff) << (int32(8) - prefixlen%int32(8))) + (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = Uint8FromInt32(int32(0xff) << (int32(8) - prefixlen%int32(8))) } _copy_addr(tls, r, af, sa, bp, uint64(16), 0) } @@ -120403,21 +120401,21 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { ifi = h + UintptrFromInt64(16) ifa = h + UintptrFromInt64(16) stats_len = 0 - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != int32(IFLA_STATS) { goto _1 } - stats_len = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) + stats_len = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - Uint64FromInt64(4)) break goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } } else { ifs0 = *(*uintptr)(unsafe.Pointer(ctx + 16 + uintptr((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index%uint32(IFADDRS_HASH_SIZE))*8)) @@ -120437,19 +120435,19 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { return 0 } } - ifs = Xcalloc(tls, uint64(1), uint64(200)+uint64(stats_len)) + ifs = Xcalloc(tls, uint64(1), uint64(200)+Uint64FromInt32(stats_len)) if ifs == uintptr(0) { return -int32(1) } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { - (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = uint32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex = Uint32FromInt32((*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index) (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFLA_IFNAME): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120467,7 +120465,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _3 _3: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { bucket = (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Findex % uint32(IFADDRS_HASH_SIZE) @@ -120477,22 +120475,22 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { } else { (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_name (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_flags = (*Tifaddrs_storage)(unsafe.Pointer(ifs0)).Fifa.Fifa_flags - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - switch int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { + switch Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) { case int32(IFA_ADDRESS): /* If ifa_addr is already set we, received an IFA_LOCAL before * so treat this as destination address */ if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } else { - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) } case int32(IFA_BROADCAST): - _copy_addr(tls, ifs+40, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+40, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+136, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LOCAL): /* If ifa_addr is set and we get IFA_LOCAL, assume we have * a point-to-point network. Move address to correct field. */ @@ -120501,7 +120499,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { *(*uintptr)(unsafe.Pointer(ifs + 40)) = ifs + 136 Xmemset(tls, ifs+64, 0, uint64(36)) } - _copy_addr(tls, ifs+24, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) + _copy_addr(tls, ifs+24, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+64, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4), Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index)) case int32(IFA_LABEL): if uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-uint64(4) < uint64(17) { Xmemcpy(tls, ifs+176, rta+UintptrFromInt64(4), uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len)-Uint64FromInt64(4)) @@ -120512,10 +120510,10 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _4 _4: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_addr != 0 { - _gen_netmask(tls, ifs+32, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) + _gen_netmask(tls, ifs+32, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_family), ifs+100, Int32FromUint8((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_prefixlen)) } } if (*Tifaddrs_storage)(unsafe.Pointer(ifs)).Fifa.Fifa_name != 0 { @@ -120575,7 +120573,7 @@ func _itoa(tls *TLS, p uintptr, x uint32) (r uintptr) { func _mkptr4(tls *TLS, s uintptr, ip uintptr) { bp := tls.Alloc(48) defer tls.Free(48) - Xsprintf(tls, s, __ccgo_ts+1012, VaList(bp+8, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) + Xsprintf(tls, s, __ccgo_ts+1012, VaList(bp+8, Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 3))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(ip))))) } func _mkptr6(tls *TLS, s uintptr, ip uintptr) { @@ -120589,13 +120587,13 @@ func _mkptr6(tls *TLS, s uintptr, ip uintptr) { } v2 = s s++ - *(*uint8)(unsafe.Pointer(v2)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] + *(*uint8)(unsafe.Pointer(v2)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&int32(15)] v3 = s s++ *(*uint8)(unsafe.Pointer(v3)) = uint8('.') v4 = s s++ - *(*uint8)(unsafe.Pointer(v4)) = _xdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] + *(*uint8)(unsafe.Pointer(v4)) = _xdigits[Int32FromUint8(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>int32(4)] v5 = s s++ *(*uint8)(unsafe.Pointer(v5)) = uint8('.') @@ -120642,8 +120640,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120674,8 +120672,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } for { if v13 = *(*uint8)(unsafe.Pointer(p)) != 0; v13 { - v10 = int32(*(*uint8)(unsafe.Pointer(p))) - v11 = BoolInt32(v10 == int32(' ') || uint32(v10)-uint32('\t') < uint32(5)) + v10 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v11 = BoolInt32(v10 == int32(' ') || Uint32FromInt32(v10)-uint32('\t') < uint32(5)) goto _12 _12: } @@ -120690,8 +120688,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int z = p for { if v18 = *(*uint8)(unsafe.Pointer(z)) != 0; v18 { - v15 = int32(*(*uint8)(unsafe.Pointer(z))) - v16 = BoolInt32(v15 == int32(' ') || uint32(v15)-uint32('\t') < uint32(5)) + v15 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v16 = BoolInt32(v15 == int32(' ') || Uint32FromInt32(v15)-uint32('\t') < uint32(5)) goto _17 _17: } @@ -120705,7 +120703,7 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int } *(*uint8)(unsafe.Pointer(z)) = uint8(0) if int64(z)-int64(p) < int64(256) { - Xmemcpy(tls, buf, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, buf, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) break } } @@ -120740,8 +120738,8 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p = bp for { if v7 = *(*uint8)(unsafe.Pointer(p)) != 0; v7 { - v4 = int32(*(*uint8)(unsafe.Pointer(p))) - v5 = BoolInt32(v4 == int32(' ') || uint32(v4)-uint32('\t') < uint32(5)) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v5 = BoolInt32(v4 == int32(' ') || Uint32FromInt32(v4)-uint32('\t') < uint32(5)) goto _6 _6: } @@ -120760,7 +120758,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { p++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) svport = Xstrtoul(tls, p, bp+128, int32(10)) - if svport != uint64(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { + if svport != Uint64FromInt32(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { continue } if dgram != 0 && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+1084, uint64(4)) != 0 { @@ -120772,7 +120770,7 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { if int64(p)-t__predefined_ptrdiff_t(bp) > int64(32) { continue } - Xmemcpy(tls, buf, bp, uint64(int64(p)-t__predefined_ptrdiff_t(bp))) + Xmemcpy(tls, buf, bp, Uint64FromInt64(int64(p)-t__predefined_ptrdiff_t(bp))) break } X__fclose_ca(tls, f) @@ -120805,7 +120803,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso var _ /* reply at bp+443 */ [512]uint8 var _ /* tmp at bp+955 */ [17]uint8 _, _, _, _, _, _, _, _, _ = a, af, p, p1, port, qlen, rlen, scopeid, v1 - af = int32((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) + af = Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sa)).Fsa_family) switch af { case int32(PF_INET): a = sa + 4 @@ -120839,7 +120837,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso rlen = X__res_send(tls, bp+347, qlen, bp+443, int32(512)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if rlen > 0 { - if uint64(rlen) > uint64(512) { + if Uint64FromInt32(rlen) > uint64(512) { rlen = int32(512) } X__dns_parse(tls, bp+443, rlen, __ccgo_fp(_dns_parse_callback), bp+78) @@ -120852,7 +120850,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso Xinet_ntop(tls, af, a, bp+78, uint32(256)) if scopeid != 0 { p = uintptr(0) - if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { + if !(flags&Int32FromInt32(NI_NUMERICSCOPE) != 0) && (Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) || Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xf) == int32(0x2)) { p = Xif_indextoname(tls, scopeid, bp+955+uintptr(1)) } if !(p != 0) { @@ -120871,13 +120869,13 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso } if serv != 0 && servlen != 0 { p1 = bp + 78 - port = int32(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) + port = Int32FromUint16(Xntohs(tls, (*Tsockaddr_in)(unsafe.Pointer(sa)).Fsin_port)) (*(*[256]uint8)(unsafe.Pointer(bp + 78)))[0] = uint8(0) if !(flags&Int32FromInt32(NI_NUMERICSERV) != 0) { _reverse_services(tls, bp+78, port, flags&int32(NI_DGRAM)) } if !(*(*uint8)(unsafe.Pointer(p1)) != 0) { - p1 = _itoa(tls, bp+334, uint32(port)) + p1 = _itoa(tls, bp+334, Uint32FromInt32(port)) } if Xstrlen(tls, p1) >= uint64(servlen) { return -int32(12) @@ -120940,7 +120938,7 @@ func Xgetpeername(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func Xgetservbyname(tls *TLS, name uintptr, prots uintptr) (r uintptr) { @@ -120983,8 +120981,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin return int32(ENOENT) } /* Align buffer */ - align = int32(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) - if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+uint64(align) { + align = Int32FromUint64(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) + if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+Uint64FromInt32(align) { return int32(ERANGE) } buf += uintptr(align) @@ -121016,8 +121014,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin (*Tservent)(unsafe.Pointer(se)).Fs_aliases = buf *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases)) = (*Tservent)(unsafe.Pointer(se)).Fs_name *(*uintptr)(unsafe.Pointer((*Tservent)(unsafe.Pointer(se)).Fs_aliases + 1*8)) = uintptr(0) - (*Tservent)(unsafe.Pointer(se)).Fs_port = int32(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) - if int32((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { + (*Tservent)(unsafe.Pointer(se)).Fs_port = Int32FromUint16(Xhtons(tls, (*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fport)) + if Int32FromUint8((*(*[2]Tservice)(unsafe.Pointer(bp)))[0].Fproto) == int32(IPPROTO_TCP) { v1 = __ccgo_ts + 1094 } else { v1 = __ccgo_ts + 1098 @@ -121080,7 +121078,7 @@ func Xgetsockname(tls *TLS, fd int32, addr uintptr, len1 uintptr) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func Xgetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, optlen uintptr) (r2 int32) { @@ -121150,7 +121148,7 @@ _11: break } if uint64(*(*Tsocklen_t)(unsafe.Pointer(optlen))) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -121270,7 +121268,7 @@ _11: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func X__h_errno_location(tls *TLS) (r uintptr) { @@ -121399,14 +121397,14 @@ func Xhtons(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } func Xif_freenameindex(tls *TLS, idx uintptr) { @@ -121431,7 +121429,7 @@ func Xif_indextoname(tls *TLS, index uint32, name uintptr) (r1 uintptr) { if v1 < 0 { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 16)) = int32(index) + *(*int32)(unsafe.Pointer(bp + 16)) = Int32FromUint32(index) r = Xioctl(tls, fd, int32(SIOCGIFNAME), VaList(bp+48, bp)) X__syscall1(tls, int64(SYS_close), int64(fd)) if r < 0 { @@ -121465,25 +121463,25 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { var i, v2 uint32 _, _, _, _, _, _, _, _, _, _, _, _ = a, bucket, ctx, i, ifa, ifi, index, map1, namelen, rta, type1, v2 ctx = pctx - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(RTM_NEWLINK) { ifi = h + UintptrFromInt64(16) index = (*Tifinfomsg)(unsafe.Pointer(ifi)).Fifi_index type1 = int32(IFLA_IFNAME) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(16)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } else { ifa = h + UintptrFromInt64(16) - index = int32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) + index = Int32FromUint32((*Tifaddrmsg)(unsafe.Pointer(ifa)).Fifa_index) type1 = int32(IFA_LABEL) - rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&uint64(^Int32FromInt32(3))) + rta = h + UintptrFromInt64(16) + uintptr((Uint64FromInt64(8)+Uint64FromInt32(3))&Uint64FromInt32(^Int32FromInt32(3))) } for { - if !(uint64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { + if !(Uint64FromInt64(int64(h+uintptr((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len))-int64(rta)) >= uint64(4)) { break } - if int32((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { + if Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_type) != type1 { goto _1 } - namelen = int32(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) + namelen = Int32FromUint64(uint64((*Trtattr)(unsafe.Pointer(rta)).Frta_len) - uint64(4) - uint64(1)) if namelen > int32(IF_NAMESIZE) { return 0 } @@ -121492,7 +121490,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { i = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) for i != 0 { map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr(i-uint32(1))*28 - if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == uint32(index) && int32((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) == 0 { + if (*Tifnamemap)(unsafe.Pointer(map1)).Findex == Uint32FromInt32(index) && Int32FromUint8((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) == 0 { return 0 } i = (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next @@ -121515,10 +121513,10 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fallocated = uint32(a) } map1 = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*28 - (*Tifnamemap)(unsafe.Pointer(map1)).Findex = uint32(index) - (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = uint8(namelen) - Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), uint64(namelen)) - *(*uint32)(unsafe.Pointer(ctx + 8)) += uint32(namelen + int32(1)) + (*Tifnamemap)(unsafe.Pointer(map1)).Findex = Uint32FromInt32(index) + (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = Uint8FromInt32(namelen) + Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), Uint64FromInt32(namelen)) + *(*uint32)(unsafe.Pointer(ctx + 8)) += Uint32FromInt32(namelen + int32(1)) (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum++ (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum @@ -121526,7 +121524,7 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { goto _1 _1: ; - rta = rta + uintptr((int32((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) + rta = rta + uintptr((Int32FromUint16((*Trtattr)(unsafe.Pointer(rta)).Frta_len)+Int32FromInt32(3)) & ^Int32FromInt32(3)) } return 0 } @@ -121555,7 +121553,7 @@ func Xif_nameindex(tls *TLS) (r uintptr) { goto err } p = ifs + uintptr((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum)*16 + UintptrFromInt32(1)*16 - i = int32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) + i = Int32FromUint32((*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum) d = ifs s = (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist for { @@ -121610,7 +121608,7 @@ func Xif_nametoindex(tls *TLS, name uintptr) (r1 uint32) { } else { v2 = *(*int32)(unsafe.Pointer(bp + 16)) } - return uint32(v2) + return Uint32FromInt32(v2) } func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { @@ -121622,7 +121620,7 @@ func Xinet_addr(tls *TLS, p uintptr) (r Tin_addr_t) { defer tls.Free(16) var _ /* a at bp+0 */ Tin_addr if !(X__inet_aton(tls, p, bp) != 0) { - return uint32(-Int32FromInt32(1)) + return Uint32FromInt32(-Int32FromInt32(1)) } return (*(*Tin_addr)(unsafe.Pointer(bp))).Fs_addr } @@ -121648,7 +121646,7 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) (r int32) { break } (*(*[4]uint64)(unsafe.Pointer(bp)))[i] = Xstrtoul(tls, s, bp+32, 0) - if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != int32('.') || !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { return 0 } if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0) { @@ -121773,7 +121771,7 @@ func Xinet_ntoa(tls *TLS, _in Tin_addr) (r uintptr) { var a uintptr _ = a a = bp - Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1110, VaList(bp+16, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3))))) + Xsnprintf(tls, uintptr(unsafe.Pointer(&_buf4)), uint64(16), __ccgo_ts+1110, VaList(bp+16, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))))) return uintptr(unsafe.Pointer(&_buf4)) } @@ -121794,14 +121792,14 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint a = a0 switch af { case int32(PF_INET): - if uint32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1110, VaList(bp+112, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + if Uint32FromInt32(Xsnprintf(tls, s, uint64(l), __ccgo_ts+1110, VaList(bp+112, Int32FromUint8(*(*uint8)(unsafe.Pointer(a))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { return s } case int32(PF_INET6): if Xmemcmp(tls, a, __ccgo_ts+1057, uint64(12)) != 0 { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1122, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1122, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } else { - Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1146, VaList(bp+112, int32(256)*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + Xsnprintf(tls, bp, uint64(100), __ccgo_ts+1146, VaList(bp+112, int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 4)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 5))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 6)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 7))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 8)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 9))), int32(256)*Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 10)))+Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 11))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 12))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 13))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 14))), Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 15))))) } /* Replace longest /(^0|:)[:0]{2,}/ with "::" */ v2 = Int32FromInt32(0) @@ -121812,10 +121810,10 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint if !((*(*[100]uint8)(unsafe.Pointer(bp)))[i] != 0) { break } - if i != 0 && int32((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { + if i != 0 && Int32FromUint8((*(*[100]uint8)(unsafe.Pointer(bp)))[i]) != int32(':') { goto _1 } - j = int32(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1176)) + j = Int32FromUint64(Xstrspn(tls, bp+uintptr(i), __ccgo_ts+1176)) if j > max { best = i max = j @@ -121829,7 +121827,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint v3 = Uint8FromUint8(':') (*(*[100]uint8)(unsafe.Pointer(bp)))[best+int32(1)] = v3 (*(*[100]uint8)(unsafe.Pointer(bp)))[best] = v3 - Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), uint64(i-best-max+int32(1))) + Xmemmove(tls, bp+uintptr(best)+uintptr(2), bp+uintptr(best)+uintptr(max), Uint64FromInt32(i-best-max+int32(1))) } if Xstrlen(tls, bp) < uint64(l) { Xstrcpy(tls, s, bp) @@ -121845,11 +121843,11 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint func _hexval(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -121882,20 +121880,20 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if !(j < int32(3) && BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) != 0) { break } - v = int32(10)*v + int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') + v = int32(10)*v + Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - int32('0') goto _2 _2: ; j++ } - if j == 0 || j > int32(1) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { + if j == 0 || j > int32(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('0') || v > int32(255) { return 0 } - *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = Uint8FromInt32(v) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { return int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') { return 0 } s += uintptr(j + int32(1)) @@ -121911,16 +121909,16 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { return -int32(1) } } - if v5 = int32(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { + if v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':'); v5 { s++ v4 = s } - if v5 && int32(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { + if v5 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32(':') { return 0 } i = 0 for { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(':') && brk < 0 { brk = i (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(0) s++ @@ -121953,15 +121951,15 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { if j == 0 { return 0 } - (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(v) + (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = Uint16FromInt32(v) if !(*(*uint8)(unsafe.Pointer(s + uintptr(j))) != 0) && (brk >= 0 || i == int32(7)) { break } if i == int32(7) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != int32('.') || i < int32(6) && brk < 0 { return 0 } need_v4 = int32(1) @@ -121976,7 +121974,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { i++ } if brk >= 0 { - Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(int32(2)*(i+int32(1)-brk))) + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, Uint64FromInt32(int32(2)*(i+int32(1)-brk))) j = 0 for { if !(j < int32(7)-i) { @@ -121996,7 +121994,7 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) (r int32) { } v14 = a a++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint16((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) >> int32(8)) v15 = a a++ *(*uint8)(unsafe.Pointer(v15)) = uint8((*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[j]) @@ -122064,7 +122062,7 @@ func Xlisten(tls *TLS, fd int32, backlog int32) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r int32) { @@ -122093,7 +122091,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i p = Xstrchr(tls, name, int32('%')) scopeid = uint64(0) if p != 0 && int64(p)-int64(name) < int64(64) { - Xmemcpy(tls, bp+20, name, uint64(int64(p)-int64(name))) + Xmemcpy(tls, bp+20, name, Uint64FromInt64(int64(p)-int64(name))) (*(*[64]uint8)(unsafe.Pointer(bp + 20)))[int64(p)-int64(name)] = uint8(0) name = bp + 20 } @@ -122114,7 +122112,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i *(*uintptr)(unsafe.Pointer(bp + 88)) = p - uintptr(1) } if *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { - if !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && int32(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { + if !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xc0) == int32(0x80)) && !(Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4))) == int32(0xff) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(bp + 4 + 1)))&int32(0xf) == int32(0x2)) { return -int32(2) } scopeid = uint64(Xif_nametoindex(tls, p)) @@ -122145,12 +122143,12 @@ const RR_CNAME = 5 func _is_valid_hostname(tls *TLS, host uintptr) (r int32) { var s uintptr _ = s - if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == uint64(-Int32FromInt32(1)) { + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) || Xmbstowcs(tls, uintptr(0), host, uint64(0)) == Uint64FromInt32(-Int32FromInt32(1)) { return 0 } s = host for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || int32(*(*uint8)(unsafe.Pointer(s))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) >= int32(0x80) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') || Xisalnum(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) != 0) { break } goto _1 @@ -122255,14 +122253,14 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family v4 = Xstrstr(tls, p, name) p = v4 if v12 = v4 != 0; v12 { - v5 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: ; if v11 = !(v6 != 0); !v11 { - v8 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -122282,8 +122280,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family p = bp for { if v17 = *(*uint8)(unsafe.Pointer(p)) != 0; v17 { - v14 = int32(*(*uint8)(unsafe.Pointer(p))) - v15 = BoolInt32(v14 == int32(' ') || uint32(v14)-uint32('\t') < uint32(5)) + v14 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v15 = BoolInt32(v14 == int32(' ') || Uint32FromInt32(v14)-uint32('\t') < uint32(5)) goto _16 _16: } @@ -122313,8 +122311,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family /* Extract first name as canonical name */ for { if v23 = *(*uint8)(unsafe.Pointer(p)) != 0; v23 { - v20 = int32(*(*uint8)(unsafe.Pointer(p))) - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v20 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: } @@ -122329,8 +122327,8 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family z = p for { if v28 = *(*uint8)(unsafe.Pointer(z)) != 0; v28 { - v25 = int32(*(*uint8)(unsafe.Pointer(z))) - v26 = BoolInt32(v25 == int32(' ') || uint32(v25)-uint32('\t') < uint32(5)) + v25 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v26 = BoolInt32(v25 == int32(' ') || Uint32FromInt32(v25)-uint32('\t') < uint32(5)) goto _27 _27: } @@ -122345,7 +122343,7 @@ func _name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family *(*uint8)(unsafe.Pointer(z)) = uint8(0) if _is_valid_hostname(tls, p) != 0 { have_canon = int32(1) - Xmemcpy(tls, canon, p, uint64(int64(z)-int64(p)+int64(1))) + Xmemcpy(tls, canon, p, Uint64FromInt64(int64(z)-int64(p)+int64(1))) } } X__fclose_ca(tls, f) @@ -122402,7 +122400,7 @@ func _dns_parse_callback1(tls *TLS, c uintptr, rr int32, data uintptr, len1 int3 v2 = ctx + 16 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ - Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, uint64(len1)) + Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, Uint64FromInt32(len1)) return 0 } @@ -122445,7 +122443,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i qtypes[nq] = _afrr[i].Frr *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280 + 3)) = uint8(0) /* don't need AD flag */ /* Ensure query IDs are distinct. */ - if nq != 0 && int32(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == int32(*(*uint8)(unsafe.Pointer(bp))) { + if nq != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) { *(*uint8)(unsafe.Pointer(bp + uintptr(nq)*280))++ } nq++ @@ -122463,13 +122461,13 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i if !(i < nq) { break } - if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { + if (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] < int32(4) || Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(2) { return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) == int32(3) { return 0 } - if int32(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 560 + uintptr(i)*4800 + 3)))&int32(15) != 0 { return -int32(4) } goto _2 @@ -122483,7 +122481,7 @@ func _name_from_dns(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i break } (*(*Tdpc_ctx)(unsafe.Pointer(bp + 10208))).Frrtype = qtypes[i] - if uint64((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { + if Uint64FromInt32((*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i]) > uint64(4800) { (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i] = int32(4800) } X__dns_parse(tls, bp+560+uintptr(i)*4800, (*(*[2]int32)(unsafe.Pointer(bp + 10200)))[i], __ccgo_fp(_dns_parse_callback1), bp+10208) @@ -122534,7 +122532,7 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if !(*(*uint8)(unsafe.Pointer(name + uintptr(l))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l)))) == int32('.') { dots++ } goto _1 @@ -122542,14 +122540,14 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f ; l++ } - if dots >= uint64((*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots) || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if dots >= uint64((*(*Tresolvconf)(unsafe.Pointer(bp + 256))).Fndots) || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { *(*uint8)(unsafe.Pointer(bp)) = uint8(0) } /* Strip final dot for canon, fail if multiple trailing dots. */ - if int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { l-- } - if !(l != 0) || int32(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { + if !(l != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(l-uint64(1))))) == int32('.') { return -int32(2) } /* This can never happen; the caller already checked length. */ @@ -122568,8 +122566,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f break } for { - v5 = int32(*(*uint8)(unsafe.Pointer(p))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: if !(v6 != 0) { @@ -122583,8 +122581,8 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f z = p for { if v12 = *(*uint8)(unsafe.Pointer(z)) != 0; v12 { - v9 = int32(*(*uint8)(unsafe.Pointer(z))) - v10 = BoolInt32(v9 == int32(' ') || uint32(v9)-uint32('\t') < uint32(5)) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(z))) + v10 = BoolInt32(v9 == int32(' ') || Uint32FromInt32(v9)-uint32('\t') < uint32(5)) goto _11 _11: } @@ -122599,9 +122597,9 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if z == p { break } - if uint64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { - Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, uint64(int64(z)-int64(p))) - *(*uint8)(unsafe.Pointer(canon + uintptr(uint64(int64(z)-int64(p)+int64(1))+l))) = uint8(0) + if Uint64FromInt64(int64(z)-int64(p)) < uint64(256)-l-uint64(1) { + Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, Uint64FromInt64(int64(z)-int64(p))) + *(*uint8)(unsafe.Pointer(canon + uintptr(Uint64FromInt64(int64(z)-int64(p)+int64(1))+l))) = uint8(0) cnt = _name_from_dns(tls, buf, canon, canon, family, bp+256) if cnt != 0 { return cnt @@ -122673,7 +122671,7 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&_defpolicy))+uintptr(i)*20, uint64(_defpolicy[i].Flen1)) != 0 { goto _1 } - if int32(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&int32(_defpolicy[i].Fmask) != int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + uintptr(_defpolicy[i].Flen1))))&Int32FromUint8(_defpolicy[i].Fmask) != Int32FromUint8(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 + uintptr(_defpolicy[i].Flen1)))) { goto _1 } return uintptr(unsafe.Pointer(&_defpolicy)) + uintptr(i)*20 @@ -122686,20 +122684,20 @@ func _policyof(tls *TLS, a uintptr) (r uintptr) { } func _labelof(tls *TLS, a uintptr) (r int32) { - return int32((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) + return Int32FromUint8((*Tpolicy)(unsafe.Pointer(_policyof(tls, a))).Flabel) } func _scopeof(tls *TLS, a uintptr) (r int32) { - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { - return int32(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xff) { + return Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1))) & int32(15) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0x80) { return int32(2) } - if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { + if *(*Tuint32_t)(unsafe.Pointer(a)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(a + 2*4)) == uint32(0) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 12))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 13))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 14))) == 0 && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 15))) == int32(1) { return int32(2) } - if int32(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && int32(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { + if Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a))) == int32(0xfe) && Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(a + 1)))&int32(0xc0) == int32(0xc0) { return int32(5) } return int32(14) @@ -122710,7 +122708,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { _ = i i = uint32(0) for { - if !(i < uint32(128) && !((int32(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^int32(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { + if !(i < uint32(128) && !((Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(s + uintptr(i/uint32(8)))))^Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(d + uintptr(i/uint32(8))))))&(Int32FromInt32(128)>>(i%Uint32FromInt32(8))) != 0)) { break } goto _1 @@ -122718,7 +122716,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { ; i++ } - return int32(i) + return Int32FromUint32(i) } func _addrcmp(tls *TLS, _a uintptr, _b uintptr) (r int32) { @@ -122903,8 +122901,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } dpolicy = _policyof(tls, bp+32+8) dscope = _scopeof(tls, bp+32+8) - dlabel = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) - dprec = int32((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) + dlabel = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Flabel) + dprec = Int32FromUint8((*Tpolicy)(unsafe.Pointer(dpolicy)).Fprec) prefixlen = 0 fd = Xsocket(tls, family1, Int32FromInt32(SOCK_DGRAM)|Int32FromInt32(SOCK_CLOEXEC), int32(IPPROTO_UDP)) if fd >= 0 { @@ -122935,7 +122933,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i ; i++ } - Xqsort(tls, buf, uint64(cnt), uint64(28), __ccgo_fp(_addrcmp)) + Xqsort(tls, buf, Uint64FromInt32(cnt), uint64(28), __ccgo_fp(_addrcmp)) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) return cnt } @@ -122986,8 +122984,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -int32(8) } (*(*Tservice)(unsafe.Pointer(buf))).Fport = uint16(0) - (*(*Tservice)(unsafe.Pointer(buf))).Fproto = uint8(proto) - (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(socktype) + (*(*Tservice)(unsafe.Pointer(buf))).Fproto = Uint8FromInt32(proto) + (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = Uint8FromInt32(socktype) return int32(1) } if name != 0 { @@ -123051,8 +123049,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i break } if v10 = p > bp; v10 { - v7 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) - v8 = BoolInt32(v7 == int32(' ') || uint32(v7)-uint32('\t') < uint32(5)) + v7 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + v8 = BoolInt32(v7 == int32(' ') || Uint32FromInt32(v7)-uint32('\t') < uint32(5)) goto _9 _9: } @@ -123060,8 +123058,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i goto _5 } if v14 = *(*uint8)(unsafe.Pointer(p + uintptr(l))) != 0; v14 { - v11 = int32(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) - v12 = BoolInt32(v11 == int32(' ') || uint32(v11)-uint32('\t') < uint32(5)) + v11 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(l)))) + v12 = BoolInt32(v11 == int32(' ') || Uint32FromInt32(v11)-uint32('\t') < uint32(5)) goto _13 _13: } @@ -123081,8 +123079,8 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i p = bp for { if v19 = *(*uint8)(unsafe.Pointer(p)) != 0; v19 { - v16 = int32(*(*uint8)(unsafe.Pointer(p))) - v17 = BoolInt32(v16 == int32(' ') || uint32(v16)-uint32('\t') < uint32(5)) + v16 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v17 = BoolInt32(v16 == int32(' ') || Uint32FromInt32(v16)-uint32('\t') < uint32(5)) goto _18 _18: } @@ -123164,7 +123162,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = uint16(type1) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = Uint16FromInt32(type1) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123175,7 +123173,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = uint16(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_flags = Uint16FromInt32(Int32FromInt32(NLM_F_ROOT) | Int32FromInt32(NLM_F_MATCH) | Int32FromInt32(NLM_F_REQUEST)) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123197,7 +123195,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } Freply [0]Tnlmsghdr Fbuf [8192]Tuint8_t - })(unsafe.Pointer(bp))))).Fg.Frtgen_family = uint8(af) + })(unsafe.Pointer(bp))))).Fg.Frtgen_family = Uint8FromInt32(af) r = int32(Xsend(tls, fd, bp, uint64(20), 0)) if r < 0 { return r @@ -123209,13 +123207,13 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, } h = bp for { - if !(uint64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { + if !(Uint64FromInt64(int64(bp+uintptr(r))-int64(h)) >= uint64(16)) { break } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_DONE) { return 0 } - if int32((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { + if Int32FromUint16((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_type) == int32(NLMSG_ERROR) { return -int32(1) } ret = (*(*func(*TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{cb})))(tls, ctx, h) @@ -123225,7 +123223,7 @@ func ___netlink_enumerate(tls *TLS, fd int32, seq uint32, type1 int32, af int32, goto _1 _1: ; - h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&uint32(^Int32FromInt32(3))) + h = h + uintptr(((*Tnlmsghdr)(unsafe.Pointer(h)).Fnlmsg_len+Uint32FromInt32(3))&Uint32FromInt32(^Int32FromInt32(3))) } } return r1 @@ -123271,7 +123269,7 @@ func Xns_get16(tls *TLS, cp uintptr) (r uint32) { trc("tls=%v cp=%v, (%v:)", tls, cp, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(int32(*(*uint8)(unsafe.Pointer(cp)))< %v", r) }() } - return uint64(uint32(*(*uint8)(unsafe.Pointer(cp)))< int64(eom)-int64(p) { goto bad } @@ -123441,7 +123439,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin if rrnum == -int32(1) { rrnum = (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum } - if rrnum < 0 || rrnum >= int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if rrnum < 0 || rrnum >= Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { goto bad } if rrnum < (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum { @@ -123480,7 +123478,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin p4 = handle + 72 *(*uintptr)(unsafe.Pointer(p4)) += uintptr(2) (*Tns_rr)(unsafe.Pointer(rr)).Frdlength = uint16(Xns_get16(tls, *(*uintptr)(unsafe.Pointer(p4))-uintptr(2))) - if int64((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { + if Int64FromUint16((*Tns_rr)(unsafe.Pointer(rr)).Frdlength) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { goto size } (*Tns_rr)(unsafe.Pointer(rr)).Frdata = (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr @@ -123491,7 +123489,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin (*Tns_rr)(unsafe.Pointer(rr)).Frdata = UintptrFromInt32(0) } (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum++ - if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { + if (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum > Int32FromUint16(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(section)*2))) { (*Tns_msg)(unsafe.Pointer(handle)).F_sect = section + int32(1) if (*Tns_msg)(unsafe.Pointer(handle)).F_sect == int32(_ns_s_max) { (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum = -int32(1) @@ -123520,7 +123518,7 @@ func Xns_name_uncompress(tls *TLS, msg uintptr, eom uintptr, src uintptr, dst ui } var r int32 _ = r - r = Xdn_expand(tls, msg, eom, src, dst, int32(dstsiz)) + r = Xdn_expand(tls, msg, eom, src, dst, Int32FromUint64(dstsiz)) if r < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) } @@ -123573,14 +123571,14 @@ func Xntohs(tls *TLS, n Tuint16_t) (r Tuint16_t) { })(unsafe.Pointer(&struct{ f int32 }{f: int32(1)})) if *(*uint8)(unsafe.Pointer(&u)) != 0 { v2 = n - v3 = uint16(int32(v2)<>int32(8)) + v3 = Uint16FromInt32(Int32FromUint16(v2)<>int32(8)) goto _4 _4: - v1 = int32(v3) + v1 = Int32FromUint16(v3) } else { - v1 = int32(n) + v1 = Int32FromUint16(n) } - return uint16(v1) + return Uint16FromInt32(v1) } /* do we really need all these?? */ @@ -123607,10 +123605,10 @@ func Xgetprotoent(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(_idx) >= uint64(239) { + if Uint64FromInt32(_idx) >= uint64(239) { return UintptrFromInt32(0) } - _p.Fp_proto = int32(_protos[_idx]) + _p.Fp_proto = Int32FromUint8(_protos[_idx]) _p.Fp_name = uintptr(unsafe.Pointer(&_protos)) + uintptr(_idx+int32(1)) _p.Fp_aliases = uintptr(unsafe.Pointer(&_aliases)) _idx = int32(uint64(_idx) + (Xstrlen(tls, _p.Fp_name) + Uint64FromInt32(2))) @@ -123673,7 +123671,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v3 = int32(1) v4 = int64(fd) v5 = int64(buf) - v6 = int64(len1) + v6 = Int64FromUint64(len1) v7 = int64(flags) v8 = int64(addr) v9 = int64(alen) @@ -123710,7 +123708,7 @@ func Xrecvfrom(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr v10 = r goto _11 _11: - return X__syscall_ret(tls, uint64(v10)) + return X__syscall_ret(tls, Uint64FromInt64(v10)) } func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, timeout uintptr) (r int32) { @@ -123737,7 +123735,7 @@ func Xrecvmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32, ti i-- mh += 64 } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), int64(vlen), int64(flags), int64(timeout), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_recvmmsg), int64(fd), int64(msgvec), Int64FromUint32(vlen), Int64FromUint32(flags), int64(timeout), 0)))) } func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { @@ -123801,10 +123799,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { goto _1 _1: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(cmsg)) { v6 = uintptr(0) } else { - v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v6 = cmsg + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v6 } @@ -123817,10 +123815,10 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { } p7 = msg + 44 *(*Tsocklen_t)(unsafe.Pointer(p7)) = Tsocklen_t(uint64(*(*Tsocklen_t)(unsafe.Pointer(p7))) + ((Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)) + (Uint64FromInt64(16)+Uint64FromInt64(8)-Uint64FromInt32(1)) & ^(Uint64FromInt64(8)-Uint64FromInt32(1)))) - if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(msg)).Fmsg_controllen))-int64(last)) { v8 = uintptr(0) } else { - v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v8 = last + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(last)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } cmsg = v8 (*Tcmsghdr)(unsafe.Pointer(cmsg)).Fcmsg_level = int32(SOL_SOCKET) @@ -123895,7 +123893,7 @@ func Xrecvmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r2 Tssize_t) { v11 = r goto _12 _12: - r1 = X__syscall_ret(tls, uint64(v11)) + r1 = X__syscall_ret(tls, Uint64FromInt64(v11)) if r1 >= 0 { X__convert_scm_timestamps(tls, msg, orig_controllen) } @@ -123926,19 +123924,19 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, var _ /* ts at bp+280 */ Ttimespec _, _, _, _, _ = i, id, j, l, n l = Xstrnlen(tls, dname, uint64(255)) - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { l-- } - if l != 0 && int32(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { + if l != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(dname + uintptr(l-uint64(1))))) == int32('.') { return -int32(1) } - n = int32(uint64(17) + l + BoolUint64(!!(l != 0))) - if l > uint64(253) || buflen < n || uint32(op) > uint32(15) || uint32(class) > uint32(255) || uint32(type1) > uint32(255) { + n = Int32FromUint64(uint64(17) + l + BoolUint64(!!(l != 0))) + if l > uint64(253) || buflen < n || Uint32FromInt32(op) > uint32(15) || Uint32FromInt32(class) > uint32(255) || Uint32FromInt32(type1) > uint32(255) { return -int32(1) } /* Construct query template - ID will be filled later */ - Xmemset(tls, bp, 0, uint64(n)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(op*int32(8) + int32(1)) + Xmemset(tls, bp, 0, Uint64FromInt32(n)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = Uint8FromInt32(op*int32(8) + int32(1)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(32) /* AD */ (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(5)] = uint8(1) Xmemcpy(tls, bp+uintptr(13), dname, l) @@ -123949,7 +123947,7 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, } j = i for { - if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && int32((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { + if !((*(*[280]uint8)(unsafe.Pointer(bp)))[j] != 0 && Int32FromUint8((*(*[280]uint8)(unsafe.Pointer(bp)))[j]) != int32('.')) { break } goto _2 @@ -123957,23 +123955,23 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, ; j++ } - if uint32(j-i)-uint32(1) > uint32(62) { + if Uint32FromInt32(j-i)-uint32(1) > uint32(62) { return -int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = uint8(j - i) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i-int32(1)] = Uint8FromInt32(j - i) goto _1 _1: ; i = j + int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(type1) - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(class) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = Uint8FromInt32(type1) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = Uint8FromInt32(class) /* Make a reasonably unpredictable id */ Xclock_gettime(tls, CLOCK_REALTIME, bp+280) - id = int32((uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + uint64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = uint8(id / int32(256)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(id) - Xmemcpy(tls, buf, bp, uint64(n)) + id = Int32FromUint64((Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp + 280))).Ftv_nsec)/uint64(65536)) & uint64(0xffff)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[0] = Uint8FromInt32(id / int32(256)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = Uint8FromInt32(id) + Xmemcpy(tls, buf, bp, Uint64FromInt32(n)) return n } @@ -124109,7 +124107,7 @@ func _mtime(tls *TLS) (r uint64) { if Xclock_gettime(tls, int32(CLOCK_MONOTONIC), bp) < 0 && *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOSYS) { Xclock_gettime(tls, CLOCK_REALTIME, bp) } - return uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) + return Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec)*uint64(1000) + Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec/int64(1000000)) } func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, q uintptr, ql int32) (r1 int32) { @@ -124119,8 +124117,8 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, var _ /* mh at bp+40 */ Tmsghdr _, _ = fd, r *(*[2]Tuint8_t)(unsafe.Pointer(bp + 32)) = [2]Tuint8_t{ - 0: uint8(ql >> int32(8)), - 1: uint8(ql), + 0: Uint8FromInt32(ql >> int32(8)), + 1: Uint8FromInt32(ql), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -124129,7 +124127,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, }, 1: { Fiov_base: q, - Fiov_len: uint64(ql), + Fiov_len: Uint64FromInt32(ql), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 40)) = Tmsghdr{ @@ -124238,20 +124236,20 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a sl = uint32(16) nns = 0 family = int32(PF_INET) - v1 = uint64(nqueries+int32(2)) * 8 + v1 = Uint64FromInt32(nqueries+int32(2)) * 8 pfd = Xrealloc(tls, pfd, v1) - v2 = uint64(nqueries) * 4 + v2 = Uint64FromInt32(nqueries) * 4 qpos = Xrealloc(tls, qpos, v2) - v3 = uint64(nqueries) * 4 + v3 = Uint64FromInt32(nqueries) * 4 apos = Xrealloc(tls, apos, v3) - v4 = uint64(nqueries) * 2 + v4 = Uint64FromInt32(nqueries) * 2 alen_buf = Xrealloc(tls, alen_buf, v4) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), bp+200) - timeout = int32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) - attempts = int32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) + timeout = Int32FromUint32(uint32(1000) * (*Tresolvconf)(unsafe.Pointer(conf)).Ftimeout) + attempts = Int32FromUint32((*Tresolvconf)(unsafe.Pointer(conf)).Fattempts) nns = 0 for { - if !(uint32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { + if !(Uint32FromInt32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { break } iplit = conf + uintptr(nns)*28 @@ -124274,7 +124272,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_scope_id = (*Taddress)(unsafe.Pointer(iplit)).Fscopeid v6 = Int32FromInt32(PF_INET6) family = v6 - (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = uint16(v6) + (*(*Tsockaddr_in6)(unsafe.Pointer(bp + 116 + uintptr(nns)*28))).Fsin6_family = Uint16FromInt32(v6) } goto _5 _5: @@ -124312,7 +124310,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(i < nns) { break } - if int32((*(*[3]struct { + if Int32FromUint16((*(*[3]struct { Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte @@ -124334,7 +124332,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a Fsin6 [0]Tsockaddr_in6 Fsin Tsockaddr_in F__ccgo_pad2 [12]byte - })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = uint16(family) + })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = Uint16FromInt32(family) if fd < 0 || Xbind(tls, fd, bp+88, sl) < 0 { if fd >= 0 { Xclose(tls, fd) @@ -124361,15 +124359,15 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), (nqueries+int32(1))*8))).Ffd = -int32(2) __pthread_cleanup_push(tls, bp+208, __ccgo_fp(_cleanup), pfd) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp + 200)), uintptr(0)) - Xmemset(tls, alens, 0, uint64(4)*uint64(nqueries)) + Xmemset(tls, alens, 0, uint64(4)*Uint64FromInt32(nqueries)) retry_interval = timeout / attempts next = 0 v10 = _mtime(tls) t2 = v10 t0 = v10 - t1 = t2 - uint64(retry_interval) + t1 = t2 - Uint64FromInt32(retry_interval) for { - if !(t2-t0 < uint64(timeout)) { + if !(t2-t0 < Uint64FromInt32(timeout)) { break } /* This is the loop exit condition: that all queries @@ -124387,7 +124385,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if i == nqueries { break } - if t2-t1 >= uint64(retry_interval) { + if t2-t1 >= Uint64FromInt32(retry_interval) { /* Query all configured namservers in parallel */ i = 0 for { @@ -124400,7 +124398,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if !(j < nns) { break } - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) goto _14 _14: ; @@ -124416,14 +124414,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry = int32(2) * nqueries } /* Wait for a response, or until time to retry */ - if Xpoll(tls, pfd, uint64(nqueries+int32(1)), int32(t1+uint64(retry_interval)-t2)) <= 0 { + if Xpoll(tls, pfd, Uint64FromInt32(nqueries+int32(1)), Int32FromUint64(t1+Uint64FromInt32(retry_interval)-t2)) <= 0 { goto _11 } for next < nqueries { *(*[1]Tiovec)(unsafe.Pointer(bp + 8)) = [1]Tiovec{ 0: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 232)) = Tmsghdr{ @@ -124457,7 +124455,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Find which query this answer goes with, if any */ i = next for { - if !(i < nqueries && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { + if !(i < nqueries && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8))))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8))))) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 1))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)) + 1))))) { break } goto _16 @@ -124474,7 +124472,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Only accept positive or negative responses; * retry immediately on server failure, and ignore * all other codes such as refusal. */ - switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)) + 3))) & Int32FromInt32(15) { case 0: fallthrough case int32(3): @@ -124484,7 +124482,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a servfail_retry-- } if v18 && v17 != 0 { - Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) + Xsendto(tls, fd, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), int32(MSG_NOSIGNAL), bp+116+uintptr(j)*28, sl) } fallthrough default: @@ -124504,14 +124502,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a next++ } } else { - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), uint64(rlen)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), Uint64FromInt32(rlen)) } /* Ignore further UDP if all slots full or TCP-mode */ if next == nqueries { (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), nqueries*8))).Fevents = 0 } /* If answer is truncated (TC bit), fallback to TCP */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 2)))&int32(2) != 0 || (*(*Tmsghdr)(unsafe.Pointer(bp + 232))).Fmsg_flags&int32(MSG_TRUNC) != 0 { *(*int32)(unsafe.Pointer(alens + uintptr(i)*4)) = -int32(1) _pthread_setcancelstate(tls, int32(PTHREAD_CANCEL_DISABLE), uintptr(0)) r = _start_tcp(tls, pfd+uintptr(i)*8, family, bp+116+uintptr(j)*28, sl, *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), *(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))) @@ -124530,8 +124528,8 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a } if int32((*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Frevents)&int32(POLLOUT) != 0 { *(*[2]Tuint8_t)(unsafe.Pointer(bp + 52)) = [2]Tuint8_t{ - 0: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), - 1: uint8(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + 0: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4)) >> int32(8)), + 1: Uint8FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), } *(*[2]Tiovec)(unsafe.Pointer(bp + 24)) = [2]Tiovec{ 0: { @@ -124540,14 +124538,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(queries + uintptr(i)*8)), - Fiov_len: uint64(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), + Fiov_len: Uint64FromInt32(*(*int32)(unsafe.Pointer(qlens + uintptr(i)*4))), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 288)) = Tmsghdr{ Fmsg_iov: bp + 24, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+288, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) + _step_mh(tls, bp+288, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(qpos), i*4)))) r = int32(Xsendmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+288, int32(MSG_NOSIGNAL))) if r < 0 { goto out @@ -124575,14 +124573,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a }, 1: { Fiov_base: *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), - Fiov_len: uint64(asize), + Fiov_len: Uint64FromInt32(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 344)) = Tmsghdr{ Fmsg_iov: bp + 56, Fmsg_iovlen: int32(2), } - _step_mh(tls, bp+344, uint64(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) + _step_mh(tls, bp+344, Uint64FromInt32(*(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)))) r = int32(Xrecvmsg(tls, (*(*Tpollfd)(unsafe.Add(unsafe.Pointer(pfd), i*8))).Ffd, bp+344, 0)) if r <= 0 { goto out @@ -124591,14 +124589,14 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < int32(2) { goto _21 } - alen = int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + int32(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) + alen = Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2)))*int32(256) + Int32FromUint8(*(*uint8)(unsafe.Pointer(alen_buf + uintptr(i)*2 + 1))) if alen < int32(13) { goto out } if *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < alen+int32(2) && *(*int32)(unsafe.Add(unsafe.Pointer(apos), i*4)) < asize+int32(2) { goto _21 } - rcode = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) + rcode = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)) + 3))) & int32(15) if rcode != 0 && rcode != int32(3) { goto out } @@ -124676,7 +124674,7 @@ func X__res_send(tls *TLS, _msg uintptr, _msglen int32, _answer uintptr, _anslen } else { v1 = *(*int32)(unsafe.Pointer(bp + 24)) } - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, uint64(v1)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28, Uint64FromInt32(v1)) } return r } @@ -124754,8 +124752,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v4 = !(Xstrncmp(tls, bp, __ccgo_ts+1196, uint64(7)) != 0); v4 { - v1 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(7)]) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: } @@ -124787,7 +124785,7 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } } p = Xstrstr(tls, bp, __ccgo_ts+1221) - if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || int32(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { + if p != 0 && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p + 8)))-uint32('0') < uint32(10)) != 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 8))) == int32('.')) { p += uintptr(8) x2 = Xstrtoul(tls, p, bp+744, int32(10)) if *(*uintptr)(unsafe.Pointer(bp + 744)) != p { @@ -124802,8 +124800,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v11 = !(Xstrncmp(tls, bp, __ccgo_ts+1230, uint64(10)) != 0); v11 { - v8 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) - v9 = BoolInt32(v8 == int32(' ') || uint32(v8)-uint32('\t') < uint32(5)) + v8 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(10)]) + v9 = BoolInt32(v8 == int32(' ') || Uint32FromInt32(v8)-uint32('\t') < uint32(5)) goto _10 _10: } @@ -124813,8 +124811,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(11) for { - v13 = int32(*(*uint8)(unsafe.Pointer(p))) - v14 = BoolInt32(v13 == int32(' ') || uint32(v13)-uint32('\t') < uint32(5)) + v13 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v14 = BoolInt32(v13 == int32(' ') || Uint32FromInt32(v13)-uint32('\t') < uint32(5)) goto _15 _15: if !(v14 != 0) { @@ -124828,8 +124826,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ *(*uintptr)(unsafe.Pointer(bp + 744)) = p for { if v20 = *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744)))) != 0; v20 { - v17 = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) - v18 = BoolInt32(v17 == int32(' ') || uint32(v17)-uint32('\t') < uint32(5)) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 744))))) + v18 = BoolInt32(v17 == int32(' ') || Uint32FromInt32(v17)-uint32('\t') < uint32(5)) goto _19 _19: } @@ -124851,8 +124849,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ continue } if v24 = Xstrncmp(tls, bp, __ccgo_ts+1241, uint64(6)) != 0 && Xstrncmp(tls, bp, __ccgo_ts+1248, uint64(6)) != 0; !v24 { - v21 = int32((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) - v22 = BoolInt32(v21 == int32(' ') || uint32(v21)-uint32('\t') < uint32(5)) + v21 = Int32FromUint8((*(*[256]uint8)(unsafe.Pointer(bp)))[int32(6)]) + v22 = BoolInt32(v21 == int32(' ') || Uint32FromInt32(v21)-uint32('\t') < uint32(5)) goto _23 _23: } @@ -124861,8 +124859,8 @@ func X__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_ } p = bp + uintptr(7) for { - v26 = int32(*(*uint8)(unsafe.Pointer(p))) - v27 = BoolInt32(v26 == int32(' ') || uint32(v26)-uint32('\t') < uint32(5)) + v26 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v27 = BoolInt32(v26 == int32(' ') || Uint32FromInt32(v26)-uint32('\t') < uint32(5)) goto _28 _28: if !(v27 != 0) { @@ -124888,7 +124886,7 @@ no_resolv_conf: X__lookup_ipliteral(tls, conf, __ccgo_ts+1255, PF_UNSPEC) nns = int32(1) } - (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(nns) + (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = Uint32FromInt32(nns) return 0 } @@ -124916,18 +124914,18 @@ func Xsendmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32) (r } i = 0 for { - if !(uint32(i) < vlen) { + if !(Uint32FromInt32(i) < vlen) { break } /* As an unfortunate inconsistency, the sendmmsg API uses * unsigned int for the resulting msg_len, despite sendmsg * returning ssize_t. However Linux limits the total bytes * sent by sendmsg to INT_MAX, so the assignment is safe. */ - r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, int32(flags)) + r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, Int32FromUint32(flags)) if r < 0 { goto error } - (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = uint32(r) + (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = Uint32FromInt64(r) goto _1 _1: ; @@ -124986,10 +124984,10 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { goto _2 _2: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= uint64(int64((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_controllen))-int64(c1)) { + if uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+uint64(8)-uint64(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))+uint64(16) >= Uint64FromInt64(int64((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_controllen))-int64(c1)) { v4 = uintptr(0) } else { - v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) + v4 = c1 + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c1)).Fcmsg_len)+Uint64FromInt64(8)-Uint64FromInt32(1))&Uint64FromInt64(^Int64FromUint64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } c1 = v4 } @@ -125037,7 +125035,7 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { v14 = r goto _15 _15: - return X__syscall_ret(tls, uint64(v14)) + return X__syscall_ret(tls, Uint64FromInt64(v14)) } func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr uintptr, alen Tsocklen_t) (r1 Tssize_t) { @@ -125056,10 +125054,10 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v3 = int32(1) v4 = int64(fd) v5 = int64(buf) - v6 = int64(len1) + v6 = Int64FromUint64(len1) v7 = int64(flags) v8 = int64(addr) - v9 = int64(alen) + v9 = Int64FromUint32(alen) if v3 != 0 { r = ___syscall_cp(tls, int64(v1), v4, v5, v6, v7, v8, v9) } else { @@ -125093,7 +125091,7 @@ func Xsendto(tls *TLS, fd int32, buf uintptr, len1 Tsize_t, flags int32, addr ui v10 = r goto _11 _11: - return X__syscall_ret(tls, uint64(v10)) + return X__syscall_ret(tls, Uint64FromInt64(v10)) } func Xendservent(tls *TLS) { @@ -125138,7 +125136,7 @@ func Xsetsockopt(tls *TLS, fd int32, level int32, optname int32, optval uintptr, v5 = int64(level) v6 = int64(optname) v7 = int64(optval) - v8 = int64(optlen) + v8 = Int64FromUint32(optlen) v9 = int64(Int32FromInt32(0)) if v3 != 0 { r = ___syscall_cp(tls, int64(v1), v4, v5, v6, v7, v8, v9) @@ -125185,13 +125183,13 @@ _11: break } if uint64(optlen) < uint64(16) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } tv = optval s = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_sec us = (*Ttimeval)(unsafe.Pointer(tv)).Ftv_usec - if !!((uint64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(s)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } if optname == int32(SO_RCVTIMEO) { optname = int32(SO_RCVTIMEO_OLD) @@ -125199,14 +125197,14 @@ _11: if optname == int32(SO_SNDTIMEO) { optname = int32(SO_SNDTIMEO_OLD) } - if !((uint64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - v12 = uint64(us) + if !((Uint64FromInt64(us)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + v12 = Uint64FromInt64(us) } else { - v12 = uint64(0x7fffffff) + (0+uint64(us))>>int32(63) + v12 = uint64(0x7fffffff) + (0+Uint64FromInt64(us))>>int32(63) } *(*[2]int64)(unsafe.Pointer(bp + 96)) = [2]int64{ 0: s, - 1: int64(int32(v12)), + 1: int64(Int32FromUint64(v12)), } v13 = int32(SYS_setsockopt) v14 = int32(__SC_setsockopt) @@ -125215,7 +125213,7 @@ _11: v17 = int64(level) v18 = int64(optname) v19 = int64(bp + 96) - v20 = int64(Uint64FromInt32(2) * Uint64FromInt64(8)) + v20 = Int64FromUint64(Uint64FromInt32(2) * Uint64FromInt64(8)) v21 = int64(Int32FromInt32(0)) if v15 != 0 { r = ___syscall_cp(tls, int64(v13), v16, v17, v18, v19, v20, v21) @@ -125270,7 +125268,7 @@ _11: v28 = int64(level) v29 = int64(optname) v30 = int64(optval) - v31 = int64(optlen) + v31 = Int64FromUint32(optlen) v32 = int64(Int32FromInt32(0)) if v26 != 0 { r = ___syscall_cp(tls, int64(v24), v27, v28, v29, v30, v31, v32) @@ -125310,7 +125308,7 @@ _11: } } } - return int32(X__syscall_ret(tls, uint64(r1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r1))) } func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { @@ -125366,7 +125364,7 @@ func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { v10 = r goto _11 _11: - return int32(X__syscall_ret(tls, uint64(v10))) + return int32(X__syscall_ret(tls, Uint64FromInt64(v10))) } func Xsockatmark(tls *TLS, s int32) (r int32) { @@ -125482,7 +125480,7 @@ _11: _22: s = int32(v21) if s < 0 { - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } if type1&int32(SOCK_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) @@ -125491,7 +125489,7 @@ _11: X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFL)), int64(Int32FromInt32(O_NONBLOCK))) } } - return int32(X__syscall_ret(tls, uint64(s))) + return int32(X__syscall_ret(tls, Uint64FromInt32(s))) } func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr) (r2 int32) { @@ -125547,7 +125545,7 @@ func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr v10 = r goto _11 _11: - r1 = int32(X__syscall_ret(tls, uint64(v10))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v10))) if r1 < 0 && (*(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EINVAL) || *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(EPROTONOSUPPORT)) && type1&(Int32FromInt32(SOCK_CLOEXEC)|Int32FromInt32(SOCK_NONBLOCK)) != 0 { v12 = int32(SYS_socketpair) v13 = int32(__SC_socketpair) @@ -125591,7 +125589,7 @@ _11: v21 = r goto _22 _22: - r1 = int32(X__syscall_ret(tls, uint64(v21))) + r1 = int32(X__syscall_ret(tls, Uint64FromInt64(v21))) if r1 < 0 { return r1 } @@ -125788,11 +125786,11 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) > uint64(0xffffffffffffffff)-Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) + len1 = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)] + (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) i = 0 for { if !(i < (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]) { @@ -125843,18 +125841,18 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz rv = v8 goto cleanup_f } - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { - if uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > *(*Tsize_t)(unsafe.Pointer(nmem)) { + if Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt64(8) { rv = int32(ENOMEM) goto cleanup_f } - tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) + tmp1 = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(mem)), Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)]+Int32FromInt32(1))*uint64(8)) if !(tmp1 != 0) { rv = *(*int32)(unsafe.Pointer(X__errno_location(tls))) goto cleanup_f } *(*uintptr)(unsafe.Pointer(mem)) = tmp1 - *(*Tsize_t)(unsafe.Pointer(nmem)) = uint64((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) + *(*Tsize_t)(unsafe.Pointer(nmem)) = Uint64FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] + int32(1)) } if (*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRMEMCNT)] != 0 { *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(mem)))) = *(*uintptr)(unsafe.Pointer(buf)) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]) @@ -125884,7 +125882,7 @@ func X__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, siz } (*Tgroup)(unsafe.Pointer(gr)).Fgr_name = *(*uintptr)(unsafe.Pointer(buf)) (*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd = (*Tgroup)(unsafe.Pointer(gr)).Fgr_name + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRNAMELEN)]) - (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = uint32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) + (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = Uint32FromInt32((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRGID)]) (*Tgroup)(unsafe.Pointer(gr)).Fgr_mem = *(*uintptr)(unsafe.Pointer(mem)) if *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr(-Int32FromInt32(1)))) != 0 || *(*uint8)(unsafe.Pointer((*Tgroup)(unsafe.Pointer(gr)).Fgr_passwd + uintptr((*(*[6]Tint32_t)(unsafe.Pointer(bp + 4)))[int32(GRPASSWDLEN)]-int32(1)))) != 0 { rv = int32(EIO) @@ -126059,10 +126057,10 @@ func _atou(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126125,7 +126123,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tgroup)(unsafe.Pointer(gr)).Fgr_gid = _atou(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) @@ -126141,7 +126139,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { *(*Tsize_t)(unsafe.Pointer(nmem))++ } goto _10 @@ -126166,7 +126164,7 @@ func X__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32(',') { v12 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v12)) = uint8(0) @@ -126237,11 +126235,11 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u goto cleanup } if (*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRFOUND)] != 0 { - nscdbuf = Xcalloc(tls, uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) + nscdbuf = Xcalloc(tls, Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]), uint64(4)) if !(nscdbuf != 0) { goto cleanup } - nbytes = uint64(4) * uint64((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) + nbytes = uint64(4) * Uint64FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 44)))[int32(INITGRNGRPS)]) if nbytes != 0 && !(Xfread(tls, nscdbuf, nbytes, uint64(1), f) != 0) { if !(Xferror(tls, f) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EIO) @@ -126452,11 +126450,11 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz rv = int32(EIO) goto cleanup_f } - if uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { + if Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]|(*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) >= Uint64FromUint64(0xffffffffffffffff)/Uint64FromInt32(8) { rv = int32(ENOMEM) goto cleanup_f } - len1 = uint64((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) + len1 = Uint64FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWNAMELEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)] + (*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWSHELLLEN)]) if len1 > *(*Tsize_t)(unsafe.Pointer(size)) || !(*(*uintptr)(unsafe.Pointer(buf)) != 0) { tmp = Xrealloc(tls, *(*uintptr)(unsafe.Pointer(buf)), len1) if !(tmp != 0) { @@ -126480,8 +126478,8 @@ func X__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, siz (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_passwd + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWPASSWDLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gecos + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGECOSLEN)]) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_shell = (*Tpasswd)(unsafe.Pointer(pw)).Fpw_dir + uintptr((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWDIRLEN)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) - (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = uint32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWUID)]) + (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = Uint32FromInt32((*(*[9]Tint32_t)(unsafe.Pointer(bp + 8)))[int32(PWGID)]) /* Don't assume that nscd made sure to null terminate strings. * It's supposed to, but malicious nscd should be ignored * rather than causing a crash. @@ -126629,10 +126627,10 @@ func _atou1(tls *TLS, s uintptr) (r uint32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0')) < uint32(10)) { break } - x = uint32(10)*x + uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) + x = uint32(10)*x + Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-Int32FromUint8('0')) goto _1 _1: ; @@ -126694,14 +126692,14 @@ func X__getpwent_a(tls *TLS, f uintptr, pw uintptr, line uintptr, size uintptr, *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v8)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_uid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v9 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ *(*uint8)(unsafe.Pointer(v9)) = uint8(0) (*Tpasswd)(unsafe.Pointer(pw)).Fpw_gid = _atou1(tls, bp) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32(':') { goto _1 } v10 = *(*uintptr)(unsafe.Pointer(bp)) @@ -126800,7 +126798,7 @@ func X__nscd_query(tls *TLS, req Tint32_t, key uintptr, buf uintptr, len1 Tsize_ *(*[3]Tint32_t)(unsafe.Pointer(bp + 32)) = [3]Tint32_t{ 0: int32(NSCDVERSION), 1: req, - 2: int32(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), + 2: Int32FromUint64(Xstrnlen(tls, key, uint64(LOGIN_NAME_MAX)) + uint64(1)), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -126873,11 +126871,11 @@ retry: if !(i < Uint64FromInt64(12)/Uint64FromInt64(4)) { break } - v3 = uint32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) + v3 = Uint32FromInt32((*(*[3]Tint32_t)(unsafe.Pointer(bp + 32)))[i]) v4 = v3>>int32(24) | v3>>int32(8)&uint32(0xff00) | v3<>int32(24) | v7>>int32(8)&uint32(0xff00) | v7< %v", r) }() } - return int64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) + return Int64FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> int32(17)) } func Xlrand48(tls *TLS) (r int64) { @@ -127166,7 +127164,7 @@ func Xjrand48(tls *TLS, s uintptr) (r int64) { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(int32(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) + return int64(Int32FromUint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2) >> Int32FromInt32(16))) } func Xmrand48(tls *TLS) (r int64) { @@ -127192,7 +127190,7 @@ func Xrand(tls *TLS) (r int32) { defer func() { trc("-> %v", r) }() } _seed = uint64(6364136223846793005)*_seed + uint64(1) - return int32(_seed >> int32(33)) + return Int32FromUint64(_seed >> int32(33)) } func _temper(tls *TLS, x uint32) (r uint32) { @@ -127212,7 +127210,7 @@ func Xrand_r(tls *TLS, seed uintptr) (r int32) { _ = v1 v1 = *(*uint32)(unsafe.Pointer(seed))*Uint32FromInt32(1103515245) + Uint32FromInt32(12345) *(*uint32)(unsafe.Pointer(seed)) = v1 - return int32(_temper(tls, v1) / uint32(2)) + return Int32FromUint32(_temper(tls, v1) / uint32(2)) } /* @@ -127270,15 +127268,15 @@ func _lcg64(tls *TLS, x Tuint64_t) (r Tuint64_t) { } func _savestate(tls *TLS) (r uintptr) { - *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) = uint32(_n<> int32(16)) - _i = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) - _j = int32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) + _n = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> int32(16)) + _i = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) >> Int32FromInt32(8) & uint32(0xff)) + _j = Int32FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(-Int32FromInt32(1))*4)) & uint32(0xff)) } func ___srandom(tls *TLS, seed uint32) { @@ -127385,11 +127383,11 @@ func Xrandom(tls *TLS) (r int64) { if _n == 0 { v1 = _lcg31(tls, *(*Tuint32_t)(unsafe.Pointer(_x1))) *(*Tuint32_t)(unsafe.Pointer(_x1)) = v1 - k = int64(v1) + k = Int64FromUint32(v1) goto end } *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) += *(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_j)*4)) - k = int64(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) + k = Int64FromUint32(*(*Tuint32_t)(unsafe.Pointer(_x1 + uintptr(_i)*4)) >> int32(1)) _i++ v2 = _i if v2 == _n { @@ -127427,8 +127425,8 @@ func Xsrand48(tls *TLS, seed int64) { defer tls.Free(16) *(*[3]uint16)(unsafe.Pointer(bp)) = [3]uint16{ 0: uint16(0x330e), - 1: uint16(seed), - 2: uint16(seed >> int32(16)), + 1: Uint16FromInt64(seed), + 2: Uint16FromInt64(seed >> int32(16)), } Xseed48(tls, bp) } @@ -127456,7 +127454,7 @@ func Xexecl(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127500,7 +127498,7 @@ func Xexecle(tls *TLS, path uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127544,7 +127542,7 @@ func Xexeclp(tls *TLS, file uintptr, argv0 uintptr, va uintptr) (r int32) { argc++ } _ = ap - v2 = uint64(argc+int32(1)) * 8 + v2 = Uint64FromInt32(argc+int32(1)) * 8 argv = Xrealloc(tls, argv, v2) ap = va *(*uintptr)(unsafe.Add(unsafe.Pointer(argv), 0*8)) = argv0 @@ -127579,7 +127577,7 @@ func Xexecve(tls *TLS, path uintptr, argv uintptr, envp uintptr) (r int32) { defer func() { trc("-> %v", r) }() } /* do we need to use environ if envp is null? */ - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_execve), int64(path), int64(argv), int64(envp))))) } func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { @@ -127605,18 +127603,18 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { if !(path != 0) { path = __ccgo_ts + 1396 } - k = Xstrnlen(tls, file, uint64(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) + k = Xstrnlen(tls, file, Uint64FromInt32(Int32FromInt32(NAME_MAX)+Int32FromInt32(1))) if k > uint64(NAME_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENAMETOOLONG) return -int32(1) } - l = Xstrnlen(tls, path, uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) + l = Xstrnlen(tls, path, Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(1))) + uint64(1) p = path for { v2 = l + k + uint64(1) b = Xrealloc(tls, b, v2) z = X__strchrnul(tls, p, int32(':')) - if uint64(int64(z)-int64(p)) >= l { + if Uint64FromInt64(int64(z)-int64(p)) >= l { v3 = z z++ if !(*(*uint8)(unsafe.Pointer(v3)) != 0) { @@ -127624,7 +127622,7 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { } goto _1 } - Xmemcpy(tls, b, p, uint64(int64(z)-int64(p))) + Xmemcpy(tls, b, p, Uint64FromInt64(int64(z)-int64(p))) *(*uint8)(unsafe.Add(unsafe.Pointer(b), int64(z)-int64(p))) = uint8('/') Xmemcpy(tls, b+uintptr(int64(z)-int64(p))+BoolUintptr(z > p), file, k+uint64(1)) Xexecve(tls, b, argv, envp) @@ -127682,9 +127680,9 @@ func Xfexecve(tls *TLS, fd int32, argv uintptr, envp uintptr) (r1 int32) { _ = r r = int32(X__syscall5(tls, int64(SYS_execveat), int64(fd), int64(__ccgo_ts), int64(argv), int64(envp), int64(Int32FromInt32(AT_EMPTY_PATH)))) if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - X__procfdname(tls, bp, uint32(fd)) + X__procfdname(tls, bp, Uint32FromInt32(fd)) Xexecve(tls, bp, argv, envp) if *(*int32)(unsafe.Pointer(X__errno_location(tls))) == int32(ENOENT) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EBADF) @@ -128003,8 +128001,8 @@ func Xposix_spawnattr_setflags(tls *TLS, attr uintptr, flags int16) (r int32) { } var all_flags uint32 _ = all_flags - all_flags = uint32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) - if uint32(flags) & ^all_flags != 0 { + all_flags = Uint32FromInt32(Int32FromInt32(POSIX_SPAWN_RESETIDS) | Int32FromInt32(POSIX_SPAWN_SETPGROUP) | Int32FromInt32(POSIX_SPAWN_SETSIGDEF) | Int32FromInt32(POSIX_SPAWN_SETSIGMASK) | Int32FromInt32(POSIX_SPAWN_SETSCHEDPARAM) | Int32FromInt32(POSIX_SPAWN_SETSCHEDULER) | Int32FromInt32(POSIX_SPAWN_USEVFORK) | Int32FromInt32(POSIX_SPAWN_SETSID)) + if Uint32FromInt16(flags) & ^all_flags != 0 { return int32(EINVAL) } (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(flags) @@ -128044,7 +128042,7 @@ func Xvfork(tls *TLS) (r Tpid_t) { defer func() { trc("-> %v", r) }() } /* vfork syscall cannot be made from C code */ - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_fork))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_fork))))) } func Xwait(tls *TLS, status uintptr) (r Tpid_t) { @@ -128060,7 +128058,7 @@ func Xwaitid(tls *TLS, type1 Tidtype_t, id Tid_t, info uintptr, options int32) ( trc("tls=%v type1=%v id=%v info=%v options=%v, (%v:)", tls, type1, id, info, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), int64(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_waitid), int64(type1), Int64FromUint32(id), int64(info), int64(options), int64(Int32FromInt32(0)), 0)))) } func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { @@ -128068,7 +128066,7 @@ func Xwaitpid(tls *TLS, pid Tpid_t, status uintptr, options int32) (r Tpid_t) { trc("tls=%v pid=%v status=%v options=%v, (%v:)", tls, pid, status, options, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_wait4), int64(pid), int64(status), int64(options), int64(Int32FromInt32(0)), 0, 0)))) } const BRACKET = -3 @@ -128101,11 +128099,11 @@ func _str_next(tls *TLS, str uintptr, n Tsize_t, step uintptr) (r int32) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) return -int32(1) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k) return *(*Twchar_t)(unsafe.Pointer(bp)) } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) - return int32(*(*uint8)(unsafe.Pointer(str))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) } func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r int32) { @@ -128121,35 +128119,35 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i return END } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('\\') && *(*uint8)(unsafe.Pointer(pat + 1)) != 0 && !(flags&Int32FromInt32(FNM_NOESCAPE) != 0) { *(*Tsize_t)(unsafe.Pointer(step)) = uint64(2) pat++ esc = int32(1) goto escaped } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('[') { k = uint64(1) if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('!') { k++ } } if k < m { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32(']') { k++ } } for { - if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + if !(k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { break } - if k+uint64(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1)))) != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('=')) { - z = int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) + if k+uint64(1) < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) == int32('=')) { + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k+uint64(1))))) k += uint64(2) if k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 { k++ } - for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint64(1))))) != z || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { + for k < m && *(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k-uint64(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(k)))) != int32(']')) { k++ } if k == m || !(*(*uint8)(unsafe.Pointer(pat + uintptr(k))) != 0) { @@ -128168,10 +128166,10 @@ func _pat_next(tls *TLS, pat uintptr, m Tsize_t, step uintptr, flags int32) (r i *(*Tsize_t)(unsafe.Pointer(step)) = k + uint64(1) return -int32(3) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('*') { return -int32(5) } - if int32(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('?') { return -int32(4) } goto escaped @@ -128183,23 +128181,23 @@ escaped: *(*Tsize_t)(unsafe.Pointer(step)) = uint64(0) return -int32(2) } - *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k1 + esc) + *(*Tsize_t)(unsafe.Pointer(step)) = Uint64FromInt32(k1 + esc) return *(*Twchar_t)(unsafe.Pointer(bp)) } - return int32(*(*uint8)(unsafe.Pointer(pat))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) } func _casefold(tls *TLS, k int32) (r int32) { var c int32 var v1 uint32 _, _ = c, v1 - c = int32(Xtowupper(tls, uint32(k))) + c = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(k))) if c == k { - v1 = Xtowlower(tls, uint32(k)) + v1 = Xtowlower(tls, Uint32FromInt32(k)) } else { - v1 = uint32(c) + v1 = Uint32FromInt32(c) } - return int32(v1) + return Int32FromUint32(v1) } func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { @@ -128213,59 +128211,59 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { _, _, _, _, _ = inv, l, l1, p0, z inv = 0 p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('^') || int32(*(*uint8)(unsafe.Pointer(p))) == int32('!') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('^') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('!') { inv = int32(1) p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { if k == int32(']') { return BoolInt32(!(inv != 0)) } p++ } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { if k == int32('-') { return BoolInt32(!(inv != 0)) } p++ } } - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { l = Xmbtowc(tls, bp+4, p+uintptr(1), uint64(4)) if l < 0 { return 0 } if *(*Twchar_t)(unsafe.Pointer(bp)) <= *(*Twchar_t)(unsafe.Pointer(bp + 4)) { - if uint32(k)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || uint32(kfold)-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { + if Uint32FromInt32(k)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || Uint32FromInt32(kfold)-Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) <= Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { return BoolInt32(!(inv != 0)) } } p += uintptr(l - int32(1)) goto _1 } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32(':') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('=')) { p0 = p + uintptr(2) - z = int32(*(*uint8)(unsafe.Pointer(p + 1))) + z = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) p += uintptr(3) - for int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || int32(*(*uint8)(unsafe.Pointer(p))) != int32(']') { + for Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']') { p++ } if z == int32(':') && int64(p-uintptr(1))-int64(p0) < int64(16) { - Xmemcpy(tls, bp+8, p0, uint64(int64(p-uintptr(1))-int64(p0))) + Xmemcpy(tls, bp+8, p0, Uint64FromInt64(int64(p-uintptr(1))-int64(p0))) (*(*[16]uint8)(unsafe.Pointer(bp + 8)))[int64(p-uintptr(1))-int64(p0)] = uint8(0) - if Xiswctype(tls, uint32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, uint32(kfold), Xwctype(tls, bp+8)) != 0 { + if Xiswctype(tls, Uint32FromInt32(k), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, Uint32FromInt32(kfold), Xwctype(tls, bp+8)) != 0 { return BoolInt32(!(inv != 0)) } } goto _1 } if uint32(*(*uint8)(unsafe.Pointer(p))) < uint32(128) { - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(*(*uint8)(unsafe.Pointer(p))) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) } else { l1 = Xmbtowc(tls, bp, p, uint64(4)) if l1 < 0 { @@ -128296,7 +128294,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, endpat, endstr, k, kfold, p, ptail, s, stail, tailcnt, v10, v12, v13, v15, v2, v3, v4, v6, v8, v9 tailcnt = uint64(0) if flags&int32(FNM_PERIOD) != 0 { - if int32(*(*uint8)(unsafe.Pointer(str))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(str))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) != int32('.') { return int32(FNM_NOMATCH) } } @@ -128355,7 +128353,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, if !(p < endpat) { break } - switch _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) { + switch _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) { case -int32(2): return int32(FNM_NOMATCH) case -int32(5): @@ -128416,9 +128414,9 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, /* Check that the pat and str tails match */ p = ptail for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) - v12 = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + v12 = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) k = v12 if v12 <= 0 { if c != END { @@ -128453,7 +128451,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, p = pat s = str for { - c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) + c = _pat_next(tls, p, Uint64FromInt64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) /* Encountering * completes/commits a component */ if c == -int32(5) { @@ -128461,7 +128459,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, str = s break } - k = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) + k = _str_next(tls, s, Uint64FromInt64(int64(endstr)-int64(s)), bp+8) if !(k != 0) { return int32(FNM_NOMATCH) } @@ -128489,13 +128487,13 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, } /* If we failed, advance str, by 1 char if it's a valid * char, or past all invalid bytes otherwise. */ - k = _str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) + k = _str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) if k > 0 { str += uintptr(*(*Tsize_t)(unsafe.Pointer(bp + 8))) } else { str++ for { - if !(_str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) < 0) { + if !(_str_next(tls, str, Uint64FromInt64(int64(endstr)-int64(str)), bp+8) < 0) { break } goto _16 @@ -128523,7 +128521,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { for { s = str for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/')) { break } goto _2 @@ -128533,7 +128531,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } p = pat for { - v4 = _pat_next(tls, p, uint64(-Int32FromInt32(1)), bp, flags) + v4 = _pat_next(tls, p, Uint64FromInt32(-Int32FromInt32(1)), bp, flags) c = v4 if !(v4 != END && c != int32('/')) { break @@ -128543,10 +128541,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { ; p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) } - if c != int32(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) && (!(*(*uint8)(unsafe.Pointer(s)) != 0) || !(flags&Int32FromInt32(FNM_LEADING_DIR) != 0)) { return int32(FNM_NOMATCH) } - if _fnmatch_internal(tls, pat, uint64(int64(p)-int64(pat)), str, uint64(int64(s)-int64(str)), flags) != 0 { + if _fnmatch_internal(tls, pat, Uint64FromInt64(int64(p)-int64(pat)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0 { return int32(FNM_NOMATCH) } if !(c != 0) { @@ -128564,10 +128562,10 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { if !(*(*uint8)(unsafe.Pointer(s)) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('/') { goto _5 } - if !(_fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(int64(s)-int64(str)), flags) != 0) { + if !(_fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt64(int64(s)-int64(str)), flags) != 0) { return 0 } goto _5 @@ -128577,7 +128575,7 @@ func Xfnmatch(tls *TLS, pat uintptr, str uintptr, flags int32) (r int32) { } } } - return _fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(-Int32FromInt32(1)), flags) + return _fnmatch_internal(tls, pat, Uint64FromInt32(-Int32FromInt32(1)), str, Uint64FromInt32(-Int32FromInt32(1)), flags) } const GLOB_ABORTED = 2 @@ -128617,7 +128615,7 @@ func _append(tls *TLS, tail uintptr, name uintptr, len1 Tsize_t, mark int32) (r (*Tmatch)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tail)))).Fnext = new1 (*Tmatch)(unsafe.Pointer(new1)).Fnext = UintptrFromInt32(0) Xmemcpy(tls, new1+8, name, len1+uint64(1)) - if mark != 0 && len1 != 0 && int32(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint64(1))))) != int32('/') { + if mark != 0 && len1 != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(name + uintptr(len1-uint64(1))))) != int32('/') { *(*uint8)(unsafe.Pointer(new1 + 8 + uintptr(len1))) = uint8('/') *(*uint8)(unsafe.Pointer(new1 + 8 + uintptr(len1+uint64(1)))) = uint8(0) } @@ -128644,7 +128642,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if *(*uint8)(unsafe.Pointer(pat)) != 0 && type1 != int32(DT_DIR) { type1 = 0 } - for pos+uint64(1) < uint64(PATH_MAX) && int32(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { + for pos+uint64(1) < uint64(PATH_MAX) && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat))) == int32('/') { v1 = pos pos++ v2 = pat @@ -128658,7 +128656,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag in_bracket = 0 overflow = 0 for { - if !(int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('*') && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32('?') && (!(in_bracket != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) != int32(']'))) { break } if !(*(*uint8)(unsafe.Pointer(pat + uintptr(i))) != 0) { @@ -128666,20 +128664,20 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag return 0 } pat += uintptr(i) - pos += uint64(j) + pos += Uint64FromInt64(j) v4 = Int64FromInt32(0) j = v4 i = v4 break } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('[') { in_bracket = int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('\\') && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { /* Backslashes inside a bracket are (at least by * our interpretation) non-special, so if next * char is ']' we have a complete expression. */ - if in_bracket != 0 && int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int64(1))))) == int32(']') { + if in_bracket != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i+int64(1))))) == int32(']') { break } /* Unpaired final backslash never matches. */ @@ -128690,14 +128688,14 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } } } - if int32(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(pat + uintptr(i)))) == int32('/') { if overflow != 0 { return 0 } in_bracket = 0 pat += uintptr(i + int64(1)) i = int64(-int32(1)) - pos += uint64(j + int64(1)) + pos += Uint64FromInt64(j + int64(1)) j = int64(-int32(1)) } /* Only store a character if it fits in the buffer, but if @@ -128705,10 +128703,10 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag * must be remembered and handled later only if the bracket * is unterminated (and thereby a literal), so as not to * disallow long bracket expressions with short matches. */ - if pos+uint64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { + if pos+Uint64FromInt64(j+Int64FromInt32(1)) < uint64(PATH_MAX) { v5 = j j++ - *(*uint8)(unsafe.Pointer(buf + uintptr(pos+uint64(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) + *(*uint8)(unsafe.Pointer(buf + uintptr(pos+Uint64FromInt64(v5)))) = *(*uint8)(unsafe.Pointer(pat + uintptr(i))) } else { if in_bracket != 0 { overflow = int32(1) @@ -128751,7 +128749,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag if p2 != 0 && !(flags&Int32FromInt32(GLOB_NOESCAPE) != 0) { p = p2 for { - if !(p > pat && int32(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { + if !(p > pat && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('\\')) { break } goto _6 @@ -128785,7 +128783,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag break } /* Quickly skip non-directories when there's pattern left. */ - if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && int32((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { + if p2 != 0 && (*Tdirent)(unsafe.Pointer(de)).Fd_type != 0 && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_DIR) && Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type) != int32(DT_LNK) { continue } l = Xstrlen(tls, de+19) @@ -128811,7 +128809,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } /* With GLOB_PERIOD, don't allow matching . or .. unless * fnmatch would match them with FNM_PERIOD rules in effect. */ - if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && int32(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || int32(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { + if p2 != 0 && flags&int32(GLOB_PERIOD) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19))) == int32('.') && (!(*(*uint8)(unsafe.Pointer(de + 19 + 1)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(de + 19 + 1))) == int32('.') && !(*(*uint8)(unsafe.Pointer(de + 19 + 2)) != 0)) && Xfnmatch(tls, pat, de+19, fnm_flags|int32(FNM_PERIOD)) != 0 { continue } Xmemcpy(tls, buf+uintptr(pos), de+19, l+uint64(1)) @@ -128823,7 +128821,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag } else { v11 = __ccgo_ts } - r = _do_glob(tls, buf, pos+l, int32((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) + r = _do_glob(tls, buf, pos+l, Int32FromUint8((*Tdirent)(unsafe.Pointer(de)).Fd_type), v11, flags, errfunc, tail) if r != 0 { Xclosedir(tls, dir) return r @@ -128925,7 +128923,7 @@ func _expand_tilde(tls *TLS, pat uintptr, buf uintptr, pos uintptr) (r int32) { ; home = (*(*Tpasswd)(unsafe.Pointer(bp))).Fpw_dir } - for i < uint64(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { + for i < Uint64FromInt32(Int32FromInt32(PATH_MAX)-Int32FromInt32(2)) && *(*uint8)(unsafe.Pointer(home)) != 0 { v10 = i i++ v11 = home @@ -128990,7 +128988,7 @@ func Xglob(tls *TLS, pat uintptr, flags int32, errfunc uintptr, g uintptr) (r in (*(*[4096]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) *(*Tsize_t)(unsafe.Pointer(bp + 4112)) = uint64(0) *(*uintptr)(unsafe.Pointer(bp + 4120)) = p - if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && int32(*(*uint8)(unsafe.Pointer(p))) == int32('~') { + if flags&(Int32FromInt32(GLOB_TILDE)|Int32FromInt32(GLOB_TILDE_CHECK)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('~') { error1 = _expand_tilde(tls, bp+4120, bp+16, bp+4112) } if !(error1 != 0) { @@ -129388,7 +129386,7 @@ func _tre_ast_new_iter(tls *TLS, mem Ttre_mem_t, arg uintptr, min int32, max int (*Ttre_iteration_t)(unsafe.Pointer(iter)).Farg = arg (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmin = min (*Ttre_iteration_t)(unsafe.Pointer(iter)).Fmax = max - SetBitFieldPtr8Uint32(iter+16, uint32(minimal), 0, 0x1) + SetBitFieldPtr8Uint32(iter+16, Uint32FromInt32(minimal), 0, 0x1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnum_submatches = (*Ttre_ast_node_t)(unsafe.Pointer(arg)).Fnum_submatches return node } @@ -129457,7 +129455,7 @@ func _tre_stack_new(tls *TLS, size int32, max_size int32, increment int32) (r ui _ = s s = Xmalloc(tls, uint64(24)) if s != UintptrFromInt32(0) { - (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*uint64(size)) + (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*Uint64FromInt32(size)) if (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack == UintptrFromInt32(0) { Xfree(tls, s) return UintptrFromInt32(0) @@ -129494,7 +129492,7 @@ func _tre_stack_push(tls *TLS, s uintptr, value Ttre_stack_item) (r Treg_errcode if new_size > (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size { new_size = (*Ttre_stack_t)(unsafe.Pointer(s)).Fmax_size } - new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*uint64(new_size)) + new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*Uint64FromInt32(new_size)) if new_buffer == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -129628,7 +129626,7 @@ func _tre_expand_macro(tls *TLS, s uintptr) (r uintptr) { _ = i i = 0 for { - if !(_tre_macros[i].Fc != 0 && int32(_tre_macros[i].Fc) != int32(*(*uint8)(unsafe.Pointer(s)))) { + if !(_tre_macros[i].Fc != 0 && Int32FromUint8(_tre_macros[i].Fc) != Int32FromUint8(*(*uint8)(unsafe.Pointer(s)))) { break } goto _1 @@ -129664,7 +129662,7 @@ func _tre_new_lit(tls *TLS, p uintptr) (r uintptr) { return uintptr(0) } *(*int32)(unsafe.Pointer(p + 20)) *= int32(2) - a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, uint64((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) + a = Xrealloc(tls, (*Tliterals)(unsafe.Pointer(p)).Fa, Uint64FromInt32((*Tliterals)(unsafe.Pointer(p)).Fcap1)*uint64(8)) if !(a != 0) { return uintptr(0) } @@ -129690,8 +129688,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { /* assumes islower(c) and isupper(c) are exclusive and toupper(c)!=c if islower(c). multiple opposite case characters are not supported */ - if Xiswlower(tls, uint32(c)) != 0 { - v2 = int32(Xtowupper(tls, uint32(c))) + if Xiswlower(tls, Uint32FromInt32(c)) != 0 { + v2 = Int32FromUint32(Xtowupper(tls, Uint32FromInt32(c))) e = v2 b = v2 c++ @@ -129700,7 +129698,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowupper(tls, uint32(c)) != uint32(e) { + if Xtowupper(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _3 @@ -129710,8 +129708,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { e++ } } else { - if Xiswupper(tls, uint32(c)) != 0 { - v4 = int32(Xtowlower(tls, uint32(c))) + if Xiswupper(tls, Uint32FromInt32(c)) != 0 { + v4 = Int32FromUint32(Xtowlower(tls, Uint32FromInt32(c))) e = v4 b = v4 c++ @@ -129720,7 +129718,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowlower(tls, uint32(c)) != uint32(e) { + if Xtowlower(tls, Uint32FromInt32(c)) != Uint32FromInt32(e) { break } goto _5 @@ -129787,7 +129785,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint start = s for { class = uint64(0) - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 <= 0 { if *(*uint8)(unsafe.Pointer(s)) != 0 { v2 = int32(REG_BADPAT) @@ -129796,26 +129794,26 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint } return v2 } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(']') && s != start { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fs = s + uintptr(1) return REG_OK } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || int32(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && s != start && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) == int32(']')) { return int32(REG_ERANGE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('.') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('=')) { /* collating symbols and equivalence classes are not supported */ return int32(REG_ECOLLATE) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('[') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('[') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(':') { s += uintptr(2) len1 = 0 for { if !(len1 < int32(CHARCLASS_NAME_MAX) && *(*uint8)(unsafe.Pointer(s + uintptr(len1))) != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { - Xmemcpy(tls, bp+4, s, uint64(len1)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1)))) == int32(':') { + Xmemcpy(tls, bp+4, s, Uint64FromInt32(len1)) (*(*[15]uint8)(unsafe.Pointer(bp + 4)))[len1] = uint8(0) class = Xwctype(tls, bp+4) break @@ -129825,7 +129823,7 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint ; len1++ } - if !(class != 0) || int32(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { + if !(class != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(len1+int32(1))))) != int32(']') { return int32(REG_ECTYPE) } min = 0 @@ -129836,9 +129834,9 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint max = v4 min = v4 s += uintptr(len1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32(']') { s++ - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) max = *(*Twchar_t)(unsafe.Pointer(bp)) /* XXX - Should use collation order instead of encoding values in character ranges. */ @@ -129898,12 +129896,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*(*Tliterals)(unsafe.Pointer(bp))).Fmem = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem (*(*Tliterals)(unsafe.Pointer(bp))).Flen1 = 0 (*(*Tliterals)(unsafe.Pointer(bp))).Fcap1 = int32(32) - (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) + (*(*Tliterals)(unsafe.Pointer(bp))).Fa = Xmalloc(tls, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Fcap1)*uint64(8)) if !((*(*Tliterals)(unsafe.Pointer(bp))).Fa != 0) { return int32(REG_ESPACE) } (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 = 0 - (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate = BoolInt32(int32(*(*uint8)(unsafe.Pointer(s))) == int32('^')) + (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('^')) if (*(*Tneg)(unsafe.Pointer(bp + 24))).Fnegate != 0 { s++ } @@ -129927,7 +129925,7 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) } /* Sort the array if we need to negate it. */ - Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, uint64((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) + Xqsort(tls, (*(*Tliterals)(unsafe.Pointer(bp))).Fa, Uint64FromInt32((*(*Tliterals)(unsafe.Pointer(bp))).Flen1), uint64(8), __ccgo_fp(_tre_compare_lit)) /* extra lit for the last negated range */ lit = _tre_new_lit(tls, bp) if !(lit != 0) { @@ -129939,12 +129937,12 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) /* negated classes */ if (*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1 != 0 { - nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) + nc = X__tre_mem_alloc_impl(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, 0, UintptrFromInt32(0), 0, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1+Int32FromInt32(1))*uint64(8)) if !(nc != 0) { err = int32(REG_ESPACE) goto parse_bracket_done } - Xmemcpy(tls, nc, bp+24+8, uint64((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) + Xmemcpy(tls, nc, bp+24+8, Uint64FromInt32((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*uint64(8)) *(*Ttre_ctype_t)(unsafe.Pointer(nc + uintptr((*(*Tneg)(unsafe.Pointer(bp + 24))).Flen1)*8)) = uint64(0) } } @@ -130005,7 +130003,7 @@ func _parse_dup_count(tls *TLS, s uintptr, n uintptr) (r uintptr) { } *(*int32)(unsafe.Pointer(n)) = 0 for { - *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (int32(*(*uint8)(unsafe.Pointer(s))) - int32('0')) + *(*int32)(unsafe.Pointer(n)) = int32(10)**(*int32)(unsafe.Pointer(n)) + (Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0')) s++ if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) || *(*int32)(unsafe.Pointer(n)) > int32(RE_DUP_MAX) { break @@ -130025,7 +130023,7 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u var _ /* min at bp+0 */ int32 _, _, _, _, _ = v1, v2, v3, v4, v5 s = _parse_dup_count(tls, s, bp) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(',') { s = _parse_dup_count(tls, s+uintptr(1), bp+4) } else { *(*int32)(unsafe.Pointer(bp + 4)) = *(*int32)(unsafe.Pointer(bp)) @@ -130036,11 +130034,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u s++ } } - if v5 = v3 || v2 && int32(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { + if v5 = v3 || v2 && Int32FromUint8(*(*uint8)(unsafe.Pointer(v1))) != int32('\\'); !v5 { v4 = s s++ } - if v5 || int32(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { + if v5 || Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) != int32('}') { return uintptr(0) } *(*int32)(unsafe.Pointer(pmin)) = *(*int32)(unsafe.Pointer(bp)) @@ -130050,11 +130048,11 @@ func _parse_dup(tls *TLS, s uintptr, ere int32, pmin uintptr, pmax uintptr) (r u func _hexval1(tls *TLS, c uint32) (r int32) { if c-uint32('0') < uint32(10) { - return int32(c - uint32('0')) + return Int32FromUint32(c - uint32('0')) } c |= uint32(32) if c-uint32('a') < uint32(6) { - return int32(c - uint32('a') + uint32(10)) + return Int32FromUint32(c - uint32('a') + uint32(10)) } return -int32(1) } @@ -130107,7 +130105,7 @@ func _parse_atom(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { var _ /* wc at bp+0 */ Twchar_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, ere, err, i, len1, node, p, tmp1, tmp11, tmp2, tmp21, v, val, v14, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26 ere = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags & int32(REG_EXTENDED) - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('['): goto _1 case int32('\\'): @@ -130149,7 +130147,7 @@ _2: /* extensions: \b, \B, \<, \>, \xHH \x{HHHH} */ s++ v14 = s - switch int32(*(*uint8)(unsafe.Pointer(v14))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v14))) { case 0: return int32(REG_EESCAPE) case int32('b'): @@ -130164,7 +130162,7 @@ _2: s++ v = 0 len1 = int32(2) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { len1 = int32(8) s++ } @@ -130185,7 +130183,7 @@ _2: } s += uintptr(i) if len1 == int32(8) { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('}') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('}') { return int32(REG_EBRACE) } s++ @@ -130218,7 +130216,7 @@ _2: default: if !(ere != 0) && uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('1') < uint32(9) { /* back reference */ - val = int32(*(*uint8)(unsafe.Pointer(s))) - int32('0') + val = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) - int32('0') v19 = ctx + 44 v18 = *(*int32)(unsafe.Pointer(v19)) *(*int32)(unsafe.Pointer(v19))++ @@ -130273,7 +130271,7 @@ _4: _5: ; /* '$' is special everywhere in EREs, and at the end of a BRE subexpression. */ - if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && int32(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { + if !(ere != 0) && *(*uint8)(unsafe.Pointer(s + 1)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('\\') || Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32(')') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 2))) != int32('|')) { goto parse_literal } node = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(2), int32(ASSERT_AT_EOL), -int32(1)) @@ -130305,14 +130303,14 @@ _12: goto parse_literal parse_literal: ; - len1 = Xmbtowc(tls, bp, s, uint64(-Int32FromInt32(1))) + len1 = Xmbtowc(tls, bp, s, Uint64FromInt32(-Int32FromInt32(1))) if len1 < 0 { return int32(REG_BADPAT) } - if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { + if (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fcflags&int32(REG_ICASE) != 0 && (Xiswupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0 || Xiswlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp)))) != 0) { /* multiple opposite case characters are not supported */ - tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowupper(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) - tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp11 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowupper(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) + tmp21 = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))))), (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition) if tmp11 != 0 && tmp21 != 0 { node = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, tmp11, tmp21) } else { @@ -130361,7 +130359,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { return err } for { - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('(') { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('(') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('(') { v4 = _tre_stack_push_voidptr(tls, stack, nunion) err = v4 if v4 != REG_OK { @@ -130390,7 +130388,7 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s goto _3 } - if !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { + if !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 { (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn = _tre_ast_new_literal(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, -int32(1), -int32(1), -int32(1)) if !((*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn != 0) { return int32(REG_ESPACE) @@ -130406,33 +130404,33 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { parse_iter: ; for { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('*') { if !(ere != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != int32('{') { break } } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && ere != 0 { break } /* extension: treat \+, \? as repetitions in BRE */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && int32(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('+') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('?') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) != int32('{') { break } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') { s++ } /* handle ^* at the start of a BRE. */ - if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && int32(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { + if !(ere != 0) && s == (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart+uintptr(1) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) == int32('^') { break } /* extension: multiple consecutive *+?{,} is unspecified, but (a+)+ has to be supported so accepting a++ makes sense, note however that the RE_DUP_MAX limit can be circumvented: (a{255}){255} uses a lot of memory.. */ - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('{') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('{') { s = _parse_dup(tls, s+uintptr(1), ere, bp, bp+4) if !(s != 0) { return int32(REG_BADBR) @@ -130440,10 +130438,10 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { } else { *(*int32)(unsafe.Pointer(bp)) = 0 *(*int32)(unsafe.Pointer(bp + 4)) = -int32(1) - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { *(*int32)(unsafe.Pointer(bp)) = int32(1) } - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('?') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('?') { *(*int32)(unsafe.Pointer(bp + 4)) = int32(1) } s++ @@ -130460,13 +130458,13 @@ func _tre_parse(tls *TLS, ctx uintptr) (r Treg_errcode_t) { _9: } nbranch = _tre_ast_new_catenation(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nbranch, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fn) - if ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && int32(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && int32(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { + if ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('|') || ere != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32(')') && depth != 0 || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32(')') || !(ere != 0) && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') || !(*(*uint8)(unsafe.Pointer(s)) != 0) { /* extension: empty branch is unspecified (), (|a), (a|) here they are not rejected but match on empty string */ - c = int32(*(*uint8)(unsafe.Pointer(s))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) nunion = _tre_ast_new_union(tls, (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fmem, nunion, nbranch) nbranch = uintptr(0) - if c == int32('\\') && int32(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { + if c == int32('\\') && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + 1))) == int32('|') { s += uintptr(2) (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fstart = s } else { @@ -130774,7 +130772,7 @@ func _tre_add_tags(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr, tnfa u } (*(*Ttre_submatch_data_t)(unsafe.Pointer((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fsubmatch_data + uintptr(id1)*16))).Fparents = UintptrFromInt32(0) if i2 > 0 { - p = Xmalloc(tls, uint64(4)*uint64(i2+Int32FromInt32(1))) + p = Xmalloc(tls, uint64(4)*Uint64FromInt32(i2+Int32FromInt32(1))) if p == UintptrFromInt32(0) { status = int32(REG_ESPACE) goto _10 @@ -131678,7 +131676,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; s2++ } - new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*uint64(s1+s2+Int32FromInt32(1))) + new_set = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), int32(1), uint64(56)*Uint64FromInt32(s1+s2+Int32FromInt32(1))) if !(new_set != 0) { return UintptrFromInt32(0) } @@ -131707,7 +131705,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*uint64(i+num_tags+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, Uint64FromInt64(4)*Uint64FromInt32(i+num_tags+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -131767,7 +131765,7 @@ func _tre_set_union(tls *TLS, mem Ttre_mem_t, set1 uintptr, set2 uintptr, tags u ; i++ } - new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*uint64(i+Int32FromInt32(1))) + new_tags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(4)*Uint64FromInt32(i+Int32FromInt32(1))) if new_tags == UintptrFromInt32(0) { return UintptrFromInt32(0) } @@ -132085,7 +132083,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -132116,7 +132114,7 @@ func _tre_compute_nfl(tls *TLS, mem Ttre_mem_t, stack uintptr, tree uintptr) (r return status } /* Allocate arrays for the tags and parameters. */ - tags = Xmalloc(tls, uint64(4)*uint64(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) + tags = Xmalloc(tls, uint64(4)*Uint64FromInt32(*(*int32)(unsafe.Pointer(bp))+Int32FromInt32(1))) if !(tags != 0) { return int32(REG_ESPACE) } @@ -132174,8 +132172,8 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun } /* Use the character ranges, assertions, etc. from `p1' for the transition from `p1' to `p2'. */ - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = uint32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_min = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_min) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fcode_max = Uint32FromInt32((*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fcode_max) (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition)*4)))*56 (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fstate_id = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p2)).Fposition if (*Ttre_pos_and_tags_t)(unsafe.Pointer(p1)).Fclass != 0 { @@ -132206,7 +132204,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun ; i++ } - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*uint64(i+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes = Xmalloc(tls, uint64(8)*Uint64FromInt32(i+Int32FromInt32(1))) if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Fneg_classes == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -132245,7 +132243,7 @@ func _tre_make_trans(tls *TLS, p1 uintptr, p2 uintptr, transitions uintptr, coun (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = UintptrFromInt32(0) /* If there were any tags, allocate an array and fill it. */ if i+j > 0 { - (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*uint64(i+j+Int32FromInt32(1))) + (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(i+j+Int32FromInt32(1))) if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans)).Ftags != 0) { return int32(REG_ESPACE) } @@ -132399,10 +132397,10 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) + (*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub = Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id - int32(1)) tree = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fn /* Referring to nonexistent subexpressions is illegal. */ - if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > int32((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { + if (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref > Int32FromUint64((*Tregex_t)(unsafe.Pointer(preg)).Fre_nsub) { errcode = int32(REG_ESUBREG) if int32(1) != 0 { goto error_exit @@ -132418,7 +132416,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs = BoolInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fmax_backref >= 0) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_approx = 0 - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches = Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id) /* Set up tags for submatch addressing. If REG_NOSUB is set and the regexp does not have back references, this can be skipped. */ if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fhave_backrefs != 0 || !(cflags&Int32FromInt32(REG_NOSUB) != 0) { @@ -132431,7 +132429,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 { - tag_directions = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + tag_directions = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) if tag_directions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132439,16 +132437,16 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftag_directions = tag_directions - Xmemset(tls, tag_directions, -int32(1), uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) + Xmemset(tls, tag_directions, -int32(1), uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags+Int32FromInt32(1))) } - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(uint32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags = Xcalloc(tls, uint64(Uint32FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)*uint32(2)+uint32(1)), uint64(4)) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fminimal_tags == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - submatch_data = Xcalloc(tls, uint64(uint32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) + submatch_data = Xcalloc(tls, uint64(Uint32FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fsubmatch_id)), uint64(16)) if submatch_data == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132501,14 +132499,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { goto error_exit } } - counts = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + counts = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if counts == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - offs = Xmalloc(tls, uint64(4)*uint64((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) + offs = Xmalloc(tls, uint64(4)*Uint64FromInt32((*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition)) if offs == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132541,7 +132539,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; i++ } - transitions = Xcalloc(tls, uint64(uint32(add)+uint32(1)), uint64(56)) + transitions = Xcalloc(tls, uint64(Uint32FromInt32(add)+uint32(1)), uint64(56)) if transitions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132549,7 +132547,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { } } (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ftransitions = transitions - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) errcode = _tre_ast_to_tnfa(tls, tree, transitions, counts, offs) if errcode != REG_OK { errcode = errcode @@ -132564,7 +132562,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { i++ p += 56 } - initial = Xcalloc(tls, uint64(uint32(i)+uint32(1)), uint64(56)) + initial = Xcalloc(tls, uint64(Uint32FromInt32(i)+uint32(1)), uint64(56)) if initial == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132594,14 +132592,14 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; j++ } - (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*uint64(j+Int32FromInt32(1))) + (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags = Xmalloc(tls, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) if !((*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags != 0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { goto error_exit } } - Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*uint64(j+Int32FromInt32(1))) + Xmemcpy(tls, (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Ftags, (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Ftags, uint64(4)*Uint64FromInt32(j+Int32FromInt32(1))) } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fassertions = (*Ttre_pos_and_tags_t)(unsafe.Pointer(p)).Fassertions i++ @@ -132611,7 +132609,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { p += 56 } (*(*Ttre_tnfa_transition_t)(unsafe.Pointer(initial + uintptr(i)*56))).Fstate = UintptrFromInt32(0) - (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = Uint32FromInt32(add) (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Ffinal = transitions + uintptr(*(*int32)(unsafe.Pointer(offs + uintptr((*(*Ttre_pos_and_tags_t)(unsafe.Pointer((*Ttre_ast_node_t)(unsafe.Pointer(tree)).Flastpos))).Fposition)*4)))*56 (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states = (*(*Ttre_parse_ctx_t)(unsafe.Pointer(bp))).Fposition (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags = cflags @@ -132748,7 +132746,7 @@ func Xregerror(tls *TLS, e int32, preg uintptr, buf uintptr, size Tsize_t) (r Ts s++ } s = X__lctrans_cur(tls, s) - return uint64(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) + return Uint64FromInt32(int32(1) + Xsnprintf(tls, buf, size, __ccgo_ts+15, VaList(bp+8, s))) } const tre_bt_mem_alloc = 0 @@ -132869,23 +132867,23 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags everything in a single large block with calloc(). */ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */ - if uint64(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { + if Uint64FromInt32(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { return int32(REG_ESPACE) } /* Likewise check rbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+int32(1)) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Likewise check pbytes. */ - if uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { + if Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) > Uint64FromUint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(16)) { return int32(REG_ESPACE) } /* Compute the length of the block we need. */ - tbytes = uint64(8) * uint64(num_tags) - rbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) - pbytes = uint64(16) * uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) - xbytes = uint64(8) * uint64(num_tags) - total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes + tbytes = uint64(8) * Uint64FromInt32(num_tags) + rbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states+Int32FromInt32(1)) + pbytes = uint64(16) * Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states) + xbytes = uint64(8) * Uint64FromInt32(num_tags) + total_bytes = (Uint64FromInt64(8)-Uint64FromInt32(1))*Uint64FromInt32(4) + (rbytes+xbytes*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states))*uint64(2) + tbytes + pbytes /* Allocate the memory. */ buf = Xcalloc(tls, total_bytes, uint64(1)) if buf == UintptrFromInt32(0) { @@ -132894,32 +132892,32 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = buf tmp_buf = buf + uintptr(tbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v1 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v1 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v1 = uint64(0) } tmp_buf += uintptr(v1) reach_next = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v2 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v2 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v2 = uint64(0) } tmp_buf += uintptr(v2) reach = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v3 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v3 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v3 = uint64(0) } tmp_buf += uintptr(v3) reach_pos = tmp_buf tmp_buf += uintptr(pbytes) - if uint64(int64(tmp_buf))%uint64(8) != 0 { - v4 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) + if Uint64FromInt64(int64(tmp_buf))%uint64(8) != 0 { + v4 = uint64(8) - Uint64FromInt64(int64(tmp_buf))%uint64(8) } else { v4 = uint64(0) } @@ -132970,7 +132968,7 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags trans_i = (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Finitial for (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != UintptrFromInt32(0) { if (*(*Ttre_reach_pos_t)(unsafe.Pointer(reach_pos + uintptr((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate_id)*16))).Fpos < pos { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { trans_i += 56 continue } @@ -133109,8 +133107,8 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags break } /* Does this transition match the input symbol? */ - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _14 } /* Compute the tags after this transition. */ @@ -133294,7 +133292,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fprev = UintptrFromInt32(0) (*Ttre_backtrack_struct)(unsafe.Pointer(stack)).Fnext = UintptrFromInt32(0) if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags != 0 { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !(tags != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -133308,7 +133306,7 @@ func _tre_tnfa_run_backtrack(tls *TLS, tnfa uintptr, string1 uintptr, match_tags } } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states != 0 { - states_seen = Xmalloc(tls, uint64(4)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) + states_seen = Xmalloc(tls, uint64(4)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) if !(states_seen != 0) { ret = int32(REG_ESPACE) goto error_exit @@ -133367,7 +133365,7 @@ retry: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0))) { goto _4 } if state == UintptrFromInt32(0) { @@ -133393,7 +133391,7 @@ retry: } (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133491,11 +133489,11 @@ _9: bt = *(*int32)(unsafe.Pointer(&(*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fu)) /* Get the substring we need to match against. Remember to turn off REG_NOSUB temporarily. */ - _tre_fill_pmatch(tls, uint64(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) + _tre_fill_pmatch(tls, Uint64FromInt32(bt+int32(1)), pmatch, (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags & ^Int32FromInt32(REG_NOSUB), tnfa, tags, pos) so = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_so eo = (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(bt)*16))).Frm_eo bt_len = eo - so - result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), uint64(bt_len)) + result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), Uint64FromInt64(bt_len)) if result == 0 { /* Back reference matched. Check for infinite loop. */ if bt_len == 0 { @@ -133551,8 +133549,8 @@ _9: if !((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fstate != 0) { break } - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= uint32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(prev_c) { - if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, uint32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, uint32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, uint32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, uint32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_min <= Uint32FromInt32(prev_c) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= Uint32FromInt32(prev_c) { + if (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions != 0 && ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOL) != 0 && (pos > 0 || reg_notbol != 0) && (prev_c != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOL) != 0 && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') || reg_noteol != 0) && (*(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\n') || !(reg_newline != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_BOW) != 0 && (prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0 || !(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_EOW) != 0 && (!(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) || (*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB) != 0 && (pos != 0 && *(*Ttre_char_t)(unsafe.Pointer(bp)) != int32('\000') && BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) == BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_AT_WB_NEG) != 0 && (pos == 0 || *(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('\000') || BoolInt32(prev_c == int32('_') || Xiswalnum(tls, Uint32FromInt32(prev_c)) != 0) != BoolInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)) == int32('_') || Xiswalnum(tls, Uint32FromInt32(*(*Ttre_char_t)(unsafe.Pointer(bp)))) != 0)) || ((*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && !((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&Int32FromInt32(REG_ICASE) != 0) && !(Xiswctype(tls, Uint32FromInt32(prev_c), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS) != 0 && (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE) != 0 && !(Xiswctype(tls, Xtowlower(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, Uint32FromInt32(prev_c)), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) || (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fassertions&int32(ASSERT_CHAR_CLASS_NEG) != 0 && _tre_neg_char_classes_match(tls, (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fneg_classes, Uint32FromInt32(prev_c), (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fcflags&int32(REG_ICASE)) != 0)) { goto _13 } if next_state == UintptrFromInt32(0) { @@ -133581,7 +133579,7 @@ _9: } (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fprev = stack (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fnext = UintptrFromInt32(0) - (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + (*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags = X__tre_mem_alloc_impl(tls, mem, 0, UintptrFromInt32(0), 0, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if !((*Ttre_backtrack_struct)(unsafe.Pointer(s1)).Fitem.Ftags != 0) { X__tre_mem_destroy(tls, mem) if tags != 0 { @@ -133808,7 +133806,7 @@ func Xregexec(tls *TLS, preg uintptr, string1 uintptr, nmatch Tsize_t, pmatch ui nmatch = uint64(0) } if (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags > 0 && nmatch > uint64(0) { - tags = Xmalloc(tls, uint64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) + tags = Xmalloc(tls, uint64(8)*Uint64FromInt32((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_tags)) if tags == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -133905,7 +133903,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(TRE_MEM_BLOCK_SIZE) } else { if size*uint64(8) > uint64(TRE_MEM_BLOCK_SIZE) { - block_size = int32(size * uint64(8)) + block_size = Int32FromUint64(size * uint64(8)) } else { block_size = int32(TRE_MEM_BLOCK_SIZE) } @@ -133914,7 +133912,7 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) return UintptrFromInt32(0) } - (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, uint64(block_size)) + (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, Uint64FromInt32(block_size)) if (*Ttre_list_t)(unsafe.Pointer(l)).Fdata == UintptrFromInt32(0) { Xfree(tls, l) (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) @@ -133929,12 +133927,12 @@ func X__tre_mem_alloc_impl(tls *TLS, mem Ttre_mem_t, provided int32, provided_bl } (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fcurrent = l (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr = (*Ttre_list_t)(unsafe.Pointer(l)).Fdata - (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(block_size) + (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = Uint64FromInt32(block_size) } } /* Make sure the next pointer will be aligned. */ - if (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { - v1 = uint64(8) - (uint64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) + if (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) != 0 { + v1 = uint64(8) - (Uint64FromInt64(int64((*Ttre_mem_struct)(unsafe.Pointer(mem)).Fptr))+size)%uint64(8) } else { v1 = uint64(0) } @@ -134021,8 +134019,8 @@ func _resize(tls *TLS, nel Tsize_t, htab uintptr) (r int32) { _, _, _, _, _, _, _, _ = e, i, j, newe, newsize, oldsize, oldtab, v4 oldsize = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fmask + uint64(1) oldtab = (*t__tab)(unsafe.Pointer((*Thsearch_data)(unsafe.Pointer(htab)).F__tab)).Fentries - if nel > uint64(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { - nel = uint64(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) + if nel > Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2)+Uint64FromInt32(1) { + nel = Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(2) + Uint64FromInt32(1) } newsize = uint64(MINSIZE) for { @@ -134465,7 +134463,7 @@ func X__tsearch_balance(tls *TLS, p uintptr) (r int32) { n = *(*uintptr)(unsafe.Pointer(p)) h0 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8))) h1 = _height(tls, *(*uintptr)(unsafe.Pointer(n + 8 + 1*8))) - if uint32(h0-h1)+uint32(1) < uint32(3) { + if Uint32FromInt32(h0-h1)+uint32(1) < uint32(3) { old = (*Tnode1)(unsafe.Pointer(n)).Fh if h0 < h1 { v1 = h1 + int32(1) @@ -134563,7 +134561,7 @@ func Xpoll(tls *TLS, fds uintptr, n Tnfds_t, timeout int32) (r int32) { trc("tls=%v fds=%v n=%v timeout=%v, (%v:)", tls, fds, n, timeout, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_poll), int64(fds), int64(n), int64(timeout), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_poll), int64(fds), Int64FromUint64(n), int64(timeout), 0, 0, 0)))) } type t__ucontext3 = Tucontext_t5 @@ -134600,7 +134598,7 @@ func Xppoll(tls *TLS, fds uintptr, n Tnfds_t, to uintptr, mask uintptr) (r int32 } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), int64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ppoll), int64(fds), Int64FromUint64(n), int64(v3), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0)))) } type t__ucontext4 = Tucontext_t4 @@ -134618,7 +134616,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui var _ /* data at bp+16 */ [2]Tsyscall_arg_t _, _, _, _, _ = ns, s, v1, v2, v3 *(*[2]Tsyscall_arg_t)(unsafe.Pointer(bp + 16)) = [2]Tsyscall_arg_t{ - 0: int64(uint64(mask)), + 0: Int64FromUint64(uint64(mask)), 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } if ts != 0 { @@ -134642,7 +134640,7 @@ func Xpselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, ts ui } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pselect6), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), int64(bp+16))))) } type Tucontext_t6 = struct { @@ -134677,9 +134675,9 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin v2 = 0 } us = v2 - max_time = int64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) + max_time = Int64FromUint64(Uint64FromUint64(1)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)) - Uint64FromInt32(1)) if s < 0 || us < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if us/int64(1000000) > max_time-s { s = max_time @@ -134699,7 +134697,7 @@ func Xselect(tls *TLS, n int32, rfds uintptr, wfds uintptr, efds uintptr, tv uin } else { v3 = uintptr(0) } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_select), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_select), int64(n), int64(rfds), int64(wfds), int64(efds), int64(v3), 0)))) } var _all_mask = [1]uint64{ @@ -134749,9 +134747,9 @@ func Xgetitimer(tls *TLS, which int32, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) } func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { @@ -134759,7 +134757,7 @@ func Xkill(tls *TLS, pid Tpid_t, sig int32) (r int32) { trc("tls=%v pid=%v sig=%v, (%v:)", tls, pid, sig, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_kill), int64(pid), int64(sig))))) } func Xkillpg(tls *TLS, pgid Tpid_t, sig int32) (r int32) { @@ -134836,7 +134834,7 @@ func Xraise(tls *TLS, sig int32) (r int32) { var _ /* set at bp+0 */ Tsigset_t _ = ret X__block_app_sigs(tls, bp) - ret = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) X__restore_sigs(tls, bp) return ret } @@ -134872,8 +134870,8 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { vs = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_sec ius = (*Titimerval)(unsafe.Pointer(new1)).Fit_interval.Ftv_usec vus = (*Titimerval)(unsafe.Pointer(new1)).Fit_value.Ftv_usec - if !!((uint64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((uint64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + if !!((Uint64FromInt64(is)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) || !!((Uint64FromInt64(vs)+Uint64FromUint64(0x80000000))>>Int32FromInt32(32) != 0) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } *(*[4]int64)(unsafe.Pointer(bp)) = [4]int64{ 0: is, @@ -134888,9 +134886,9 @@ func Xsetitimer(tls *TLS, which int32, new1 uintptr, old uintptr) (r1 int32) { (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_sec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(2)] (*Titimerval)(unsafe.Pointer(old)).Fit_value.Ftv_usec = (*(*[4]int64)(unsafe.Pointer(bp + 32)))[int32(3)] } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) } type Tk_sigaction = struct { @@ -134929,8 +134927,8 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = old, r, v1, v10, v11, v12, v16, v17, v18, v2, v22, v23, v24, v3, v4, v5, v9 if sa != 0 { if uint64(*(*uintptr)(unsafe.Pointer(sa))) > uint64(1) { - v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(uint64(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 - v2 = int64(uint64(1) << (uint64(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) + v1 = uintptr(unsafe.Pointer(&_handler_set)) + uintptr(Uint64FromInt32(sig-Int32FromInt32(1))/(Uint64FromInt32(8)*Uint64FromInt64(8)))*8 + v2 = Int64FromUint64(uint64(1) << (Uint64FromInt32(sig-Int32FromInt32(1)) % (Uint64FromInt32(8) * Uint64FromInt64(8)))) if Uint64FromInt64(8) == Uint64FromInt64(4) { v3 = v1 for { @@ -134964,7 +134962,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) Fr [0][2]Tuint32_t Fv Tuint64_t }{} - *(*uint64)(unsafe.Pointer(bp + 8)) = uint64(v2) + *(*uint64)(unsafe.Pointer(bp + 8)) = Uint64FromInt64(v2) if *(*Tuint32_t)(unsafe.Pointer(bp + 8)) != 0 { v10 = v9 for { @@ -135031,7 +135029,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) X__syscall4(tls, int64(SYS_rt_sigprocmask), int64(Int32FromInt32(SIG_UNBLOCK)), int64(bp), int64(Int32FromInt32(0)), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) _unmask_done = int32(1) } - if !(uint32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags)&Uint32FromUint32(0x10000000) != 0) { + if !(Uint32FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags)&Uint32FromUint32(0x10000000) != 0) { // __asm__ __volatile__ ("bcr 15,0" : : : "memory"); X__assert_fail(tls, __ccgo_ts+212, __ccgo_ts+247, 23, __ccgo_ts+1517) AtomicStorePInt32(uintptr(unsafe.Pointer(&X__eintr_valid_flag)), int32(1)) @@ -135040,15 +135038,15 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) } } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fhandler = *(*uintptr)(unsafe.Pointer(sa)) - (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = uint64((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) + (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags = Uint64FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags) (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Fflags |= uint64(0x04000000) - if uint32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags)&uint32(4) != 0 { + if Uint32FromInt32((*Tsigaction)(unsafe.Pointer(sa)).Fsa_flags)&uint32(4) != 0 { v22 = __ccgo_fp(X__restore_rt) } else { v22 = __ccgo_fp(X__restore) } (*(*Tk_sigaction)(unsafe.Pointer(bp + 16))).Frestorer = v22 - Xmemcpy(tls, bp+16+24, sa+8, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + Xmemcpy(tls, bp+16+24, sa+8, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } if sa != 0 { v23 = bp + 16 @@ -135063,10 +135061,10 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old1 uintptr) (r1 int32) r = int32(X__syscall4(tls, int64(SYS_rt_sigaction), int64(sig), int64(v23), int64(v24), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if old1 != 0 && !(r != 0) { *(*uintptr)(unsafe.Pointer(old1)) = (*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fhandler - (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = int32((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) - Xmemcpy(tls, old1+8, bp+48+24, uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))) + (*Tsigaction)(unsafe.Pointer(old1)).Fsa_flags = Int32FromUint64((*(*Tk_sigaction)(unsafe.Pointer(bp + 48))).Fflags) + Xmemcpy(tls, old1+8, bp+48+24, Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { @@ -135079,7 +135077,7 @@ func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { var r int32 var _ /* set at bp+0 */ [1]uint64 _ = r - if uint32(sig)-uint32(32) < uint32(3) || uint32(sig)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(sig)-uint32(32) < uint32(3) || Uint32FromInt32(sig)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135113,8 +135111,8 @@ func Xsigaddset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135137,7 +135135,7 @@ func Xsigaltstack(tls *TLS, ss uintptr, old uintptr) (r int32) { return -int32(1) } } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_sigaltstack), int64(ss), int64(old))))) } const SST_SIZE = 8 @@ -135163,7 +135161,7 @@ func Xsigandset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) & *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -135182,8 +135180,8 @@ func Xsigdelset(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || Uint32FromInt32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -135237,7 +135235,7 @@ func Xsigisemptyset(tls *TLS, set uintptr) (r int32) { _ = i i = uint64(0) for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } if *(*uint64)(unsafe.Pointer(set + uintptr(i)*8)) != 0 { @@ -135258,8 +135256,8 @@ func Xsigismember(tls *TLS, set uintptr, sig int32) (r int32) { } var s uint32 _ = s - s = uint32(sig - int32(1)) - if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + s = Uint32FromInt32(sig - int32(1)) + if s >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { return 0 } return BoolInt32(!!(*(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8))&(Uint64FromUint64(1)<<(uint64(s)&(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)))) != 0)) @@ -135278,7 +135276,7 @@ func Xsigorset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) { l = left r = right for { - if !(i < uint64(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { + if !(i < Uint64FromInt32(Int32FromInt32(_NSIG)/Int32FromInt32(8))/Uint64FromInt64(8)) { break } *(*uint64)(unsafe.Pointer(d + uintptr(i)*8)) = *(*uint64)(unsafe.Pointer(l + uintptr(i)*8)) | *(*uint64)(unsafe.Pointer(r + uintptr(i)*8)) @@ -135295,7 +135293,7 @@ func Xsigpending(tls *TLS, set uintptr) (r int32) { trc("tls=%v set=%v, (%v:)", tls, set, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_rt_sigpending), int64(set), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))))) } func Xsigprocmask(tls *TLS, how int32, set uintptr, old uintptr) (r1 int32) { @@ -135331,7 +135329,7 @@ func Xsigqueue(tls *TLS, pid Tpid_t, sig int32, value Tsigval) (r1 int32) { *(*Tuid_t)(unsafe.Pointer(bp + 16 + 4)) = Xgetuid(tls) X__block_app_sigs(tls, bp+128) *(*Tpid_t)(unsafe.Pointer(bp + 16)) = Xgetpid(tls) - r = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) + r = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_rt_sigqueueinfo), int64(pid), int64(sig), int64(bp))))) X__restore_sigs(tls, bp+128) return r } @@ -135391,7 +135389,7 @@ func Xsigsuspend(tls *TLS, mask uintptr) (r int32) { trc("tls=%v mask=%v, (%v:)", tls, mask, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_rt_sigsuspend), int64(mask), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)), 0, 0, 0, 0)))) } func _do_sigtimedwait(tls *TLS, mask uintptr, si uintptr, ts uintptr) (r int32) { @@ -135408,7 +135406,7 @@ func Xsigtimedwait(tls *TLS, mask uintptr, si uintptr, timeout uintptr) (r int32 for cond := true; cond; cond = ret == -int32(EINTR) { ret = _do_sigtimedwait(tls, mask, si, timeout) } - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xsigwait(tls *TLS, mask uintptr, sig uintptr) (r int32) { @@ -135487,7 +135485,7 @@ func Xchmod(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_chmod), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_chmod), int64(path), Int64FromUint32(mode))))) } func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { @@ -135500,12 +135498,12 @@ func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), int64(mode))) + ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), Int64FromUint32(mode))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_chmod), int64(bp), int64(mode))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_chmod), int64(bp), Int64FromUint32(mode))))) } func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r int32) { @@ -135520,36 +135518,36 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in var _ /* st at bp+0 */ Tstat _, _, _ = fd2, ret, v1 if !(flag != 0) { - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(fd), int64(path), Int64FromUint32(mode))))) } - ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), int64(mode), int64(flag))) + ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), Int64FromUint32(mode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag != int32(AT_SYMLINK_NOFOLLOW) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if Xfstatat(tls, fd, path, bp, flag) != 0 { return -int32(1) } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } v1 = int32(X__syscall3(tls, int64(SYS_openat), int64(fd), int64(path), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_PATH)|Int32FromInt32(O_NOFOLLOW)|Int32FromInt32(O_NOCTTY)|Int32FromInt32(O_CLOEXEC)))) fd2 = v1 if v1 < 0 { if fd2 == -int32(ELOOP) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } - return int32(X__syscall_ret(tls, uint64(fd2))) + return int32(X__syscall_ret(tls, Uint64FromInt32(fd2))) } - X__procfdname(tls, bp+144, uint32(fd2)) + X__procfdname(tls, bp+144, Uint32FromInt32(fd2)) ret = Xstat(tls, bp+144, bp) if !(ret != 0) { if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { - ret = int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) + ret = int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EOPNOTSUPP)))) } else { - ret = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+144), int64(mode))))) + ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fchmodat), int64(-Int32FromInt32(100)), int64(bp+144), Int64FromUint32(mode))))) } } X__syscall1(tls, int64(SYS_close), int64(fd2)) @@ -135562,7 +135560,7 @@ func X__fstat(tls *TLS, fd int32, st uintptr) (r int32) { defer func() { trc("-> %v", r) }() } if fd < 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EBADF)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EBADF)))) } return X__fstatat(tls, fd, __ccgo_ts, st, int32(AT_EMPTY_PATH)) } @@ -135634,21 +135632,21 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r Fst_uid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_uid, Fst_gid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_gid, Fst_rdev: uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<= 0 { ret = int32(X__syscall4(tls, int64(SYS_newfstatat), int64(fd), int64(path), int64(bp), int64(flag))) if ret == -int32(EINVAL) { - X__procfdname(tls, bp+144, uint32(fd)) + X__procfdname(tls, bp+144, Uint32FromInt32(fd)) ret = int32(X__syscall2(tls, int64(SYS_stat), int64(bp+144), int64(bp))) } } } else { - if (fd == -int32(100) || int32(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && flag == int32(AT_SYMLINK_NOFOLLOW) { + if (fd == -int32(100) || Int32FromUint8(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && flag == int32(AT_SYMLINK_NOFOLLOW) { ret = int32(X__syscall2(tls, int64(SYS_lstat), int64(path), int64(bp))) } else { - if (fd == -int32(100) || int32(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && !(flag != 0) { + if (fd == -int32(100) || Int32FromUint8(*(*uint8)(unsafe.Pointer(path))) == int32('/')) && !(flag != 0) { ret = int32(X__syscall2(tls, int64(SYS_stat), int64(path), int64(bp))) } else { ret = int32(X__syscall4(tls, int64(SYS_newfstatat), int64(fd), int64(path), int64(bp), int64(flag))) @@ -135740,11 +135738,11 @@ func X__fstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int if uint64(8) < uint64(8) { ret = _fstatat_statx(tls, fd, path, st, flag) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } ret = _fstatat_kstat(tls, fd, path, st, flag) - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } func Xfstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int32) { @@ -135780,8 +135778,8 @@ func X__futimesat(tls *TLS, dirfd int32, pathname uintptr, times uintptr) (r int if !(i < int32(2)) { break } - if uint64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + if Uint64FromInt64((*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec) >= uint64(1000000) { + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_sec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[2]Ttimespec)(unsafe.Pointer(bp)))[i].Ftv_nsec = (*(*Ttimeval)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_usec * int64(1000) @@ -135828,7 +135826,7 @@ func Xmkdir(tls *TLS, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v path=%v mode=%v, (%v:)", tls, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_mkdir), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_mkdir), int64(path), Int64FromUint32(mode))))) } func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { @@ -135836,7 +135834,7 @@ func Xmkdirat(tls *TLS, fd int32, path uintptr, mode Tmode_t) (r int32) { trc("tls=%v fd=%v path=%v mode=%v, (%v:)", tls, fd, path, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), int64(mode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mkdirat), int64(fd), int64(path), Int64FromUint32(mode))))) } func Xmkfifo(tls *TLS, path uintptr, mode Tmode_t) (r int32) { @@ -135860,7 +135858,7 @@ func Xmknod(tls *TLS, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { trc("tls=%v path=%v mode=%v dev=%v, (%v:)", tls, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_mknod), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_mknod), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int32) { @@ -135868,7 +135866,7 @@ func Xmknodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, dev Tdev_t) (r int trc("tls=%v fd=%v path=%v mode=%v dev=%v, (%v:)", tls, fd, path, mode, dev, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), int64(mode), int64(dev))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_mknodat), int64(fd), int64(path), Int64FromUint32(mode), Int64FromUint64(dev))))) } func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { @@ -135881,7 +135879,7 @@ func Xstat(tls *TLS, path uintptr, buf uintptr) (r int32) { func ___statfs(tls *TLS, path uintptr, buf uintptr) (r int32) { *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_statfs64), int64(path), int64(Uint64FromInt64(88)), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_statfs64), int64(path), Int64FromUint64(Uint64FromInt64(88)), int64(buf))))) } func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { @@ -135890,7 +135888,7 @@ func Xfstatfs(tls *TLS, fd int32, buf uintptr) (r int32) { defer func() { trc("-> %v", r) }() } *(*Tstatfs)(unsafe.Pointer(buf)) = Tstatfs{} - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fstatfs64), int64(fd), int64(Uint64FromInt64(88)), int64(buf))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fstatfs64), int64(fd), Int64FromUint64(Uint64FromInt64(88)), int64(buf))))) } func _fixup(tls *TLS, out uintptr, in uintptr) { @@ -135910,7 +135908,7 @@ func _fixup(tls *TLS, out uintptr, in uintptr) { (*Tstatvfs)(unsafe.Pointer(out)).Ff_files = (*Tstatfs)(unsafe.Pointer(in)).Ff_files (*Tstatvfs)(unsafe.Pointer(out)).Ff_ffree = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree (*Tstatvfs)(unsafe.Pointer(out)).Ff_favail = (*Tstatfs)(unsafe.Pointer(in)).Ff_ffree - (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = uint64(*(*int32)(unsafe.Pointer(in + 48))) + (*Tstatvfs)(unsafe.Pointer(out)).Ff_fsid = Uint64FromInt32(*(*int32)(unsafe.Pointer(in + 48))) (*Tstatvfs)(unsafe.Pointer(out)).Ff_flag = uint64((*Tstatfs)(unsafe.Pointer(in)).Ff_flags) (*Tstatvfs)(unsafe.Pointer(out)).Ff_namemax = uint64((*Tstatfs)(unsafe.Pointer(in)).Ff_namelen) (*Tstatvfs)(unsafe.Pointer(out)).Ff_type = (*Tstatfs)(unsafe.Pointer(in)).Ff_type @@ -135951,7 +135949,7 @@ func Xumask(tls *TLS, mode Tmode_t) (r Tmode_t) { trc("tls=%v mode=%v, (%v:)", tls, mode, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_umask), int64(mode))))) + return Uint32FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_umask), Int64FromUint32(mode))))) } func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r1 int32) { @@ -135970,7 +135968,7 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = int32(X__syscall4(tls, int64(SYS_utimensat), int64(fd), int64(path), int64(times), int64(flags))) if r != -int32(ENOSYS) || flags != 0 { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } tv = uintptr(0) if times != 0 { @@ -135980,11 +135978,11 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r if !(i < int32(2)) { break } - if uint64((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { + if Uint64FromInt64((*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec) >= uint64(1000000000) { if (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int64(UTIME_NOW) || (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec == int64(UTIME_OMIT) { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(ENOSYS)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(ENOSYS)))) } - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)*i+0] = (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_sec (*(*[4]int64)(unsafe.Pointer(bp)))[int32(2)*i+int32(1)] = (*(*Ttimespec)(unsafe.Pointer(times + uintptr(i)*16))).Ftv_nsec / int64(1000) @@ -135996,10 +135994,10 @@ func Xutimensat(tls *TLS, fd int32, path uintptr, times uintptr, flags int32) (r } r = int32(X__syscall3(tls, int64(SYS_futimesat), int64(fd), int64(path), int64(tv))) if r != -int32(ENOSYS) || fd != -int32(100) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } r = int32(X__syscall2(tls, int64(SYS_utimes), int64(path), int64(tv))) - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__fclose_ca(tls *TLS, f uintptr) (r int32) { @@ -136022,7 +136020,7 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { var _ /* wsz at bp+0 */ Twinsize _, _, _, _ = f, flags, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1534, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1534, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -136036,19 +136034,19 @@ func X__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr) { Xmemset(tls, f, 0, uint64(232)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(v2) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(v2) } /* Apply close-on-exec flag */ if Xstrchr(tls, mode, int32('e')) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } /* Set append mode on fd if opened for append */ - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { flags = int32(X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFL)))) if !(flags&Int32FromInt32(O_APPEND) != 0) { X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_SETFL)), int64(flags|Int32FromInt32(O_APPEND))) @@ -136093,7 +136091,7 @@ func X__fmodeflags(tls *TLS, mode uintptr) (r int32) { if Xstrchr(tls, mode, int32('+')) != 0 { flags = int32(O_RDWR) } else { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { flags = O_RDONLY } else { flags = int32(O_WRONLY) @@ -136105,13 +136103,13 @@ func X__fmodeflags(tls *TLS, mode uintptr) (r int32) { if Xstrchr(tls, mode, int32('e')) != 0 { flags |= int32(O_CLOEXEC) } - if int32(*(*uint8)(unsafe.Pointer(mode))) != int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) != int32('r') { flags |= int32(O_CREAT) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('w') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('w') { flags |= int32(O_TRUNC) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { flags |= int32(O_APPEND) } return flags @@ -136123,12 +136121,12 @@ func X__fopen_rb_ca(tls *TLS, filename uintptr, f uintptr, buf uintptr, len1 Tsi defer func() { trc("-> %v", r) }() } Xmemset(tls, f, 0, uint64(232)) - (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_open), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) + (*TFILE)(unsafe.Pointer(f)).Ffd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_open), int64(filename), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_LARGEFILE)))))) if (*TFILE)(unsafe.Pointer(f)).Ffd < 0 { return uintptr(0) } X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) - (*TFILE)(unsafe.Pointer(f)).Fflags = uint32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) + (*TFILE)(unsafe.Pointer(f)).Fflags = Uint32FromInt32(Int32FromInt32(F_NOWR) | Int32FromInt32(F_PERM)) (*TFILE)(unsafe.Pointer(f)).Fbuf = buf + uintptr(UNGET) (*TFILE)(unsafe.Pointer(f)).Fbuf_size = len1 - uint64(UNGET) (*TFILE)(unsafe.Pointer(f)).Fread = __ccgo_fp(X__stdio_read) @@ -136149,22 +136147,22 @@ func X__overflow(tls *TLS, f uintptr, _c int32) (r int32) { var v2, v3 uintptr var _ /* c at bp+0 */ uint8 _, _, _ = v1, v2, v3 - *(*uint8)(unsafe.Pointer(bp)) = uint8(_c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(_c) if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return -int32(1) } - if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && int32(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { + if (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend && Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) != (*TFILE)(unsafe.Pointer(f)).Flbf { v1 = *(*uint8)(unsafe.Pointer(bp)) v3 = f + 40 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ *(*uint8)(unsafe.Pointer(v2)) = v1 - return int32(v1) + return Int32FromUint8(v1) } if (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, bp, uint64(1)) != uint64(1) { return -int32(1) } - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } func _dummy9(tls *TLS, fd int32) (r int32) { @@ -136176,7 +136174,7 @@ func X__stdio_close(tls *TLS, f uintptr) (r int32) { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_close), int64(_dummy9(tls, (*TFILE)(unsafe.Pointer(f)).Ffd)))))) } var _dummy_file = uintptr(0) @@ -136249,9 +136247,9 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { }, } if (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len != 0 { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_readv), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(bp), int64(Int32FromInt32(2))))) } else { - v1 = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) + v1 = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_read), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base), Int64FromUint64((*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len)))) } cnt = v1 if cnt <= 0 { @@ -136260,11 +136258,11 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32(F_EOF) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v2) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v2) return uint64(0) } - if uint64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { - return uint64(cnt) + if Uint64FromInt64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { + return Uint64FromInt64(cnt) } cnt = Tssize_t(uint64(cnt) - (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len) (*TFILE)(unsafe.Pointer(f)).Frpos = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -136303,7 +136301,7 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { Fiov_base: (*TFILE)(unsafe.Pointer(f)).Fwbase, - Fiov_len: uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), + Fiov_len: Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)), }, 1: { Fiov_base: buf, @@ -136314,8 +136312,8 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) rem = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len + (*(*Tiovec)(unsafe.Pointer(iov + 1*16))).Fiov_len iovcnt = int32(2) for { - cnt = X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) - if uint64(cnt) == rem { + cnt = X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_writev), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(iov), int64(iovcnt)))) + if Uint64FromInt64(cnt) == rem { (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v2 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fwbase = v2 @@ -136336,14 +136334,14 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) } return v5 } - rem -= uint64(cnt) - if uint64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { + rem -= Uint64FromInt64(cnt) + if Uint64FromInt64(cnt) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { cnt = Tssize_t(uint64(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len) iov += 16 iovcnt-- } (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_base + uintptr(cnt) - (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= uint64(cnt) + (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= Uint64FromInt64(cnt) goto _1 _1: } @@ -136447,7 +136445,7 @@ func X__uflow(tls *TLS, f uintptr) (r int32) { defer tls.Free(16) var _ /* c at bp+0 */ uint8 if !(X__toread(tls, f) != 0) && (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fread})))(tls, f, bp, uint64(1)) == uint64(1) { - return int32(*(*uint8)(unsafe.Pointer(bp))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(bp))) } return -int32(1) } @@ -136478,7 +136476,7 @@ func Xclearerr(tls *TLS, f uintptr) { v1 = 0 } __need_unlock = v1 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^(Int32FromInt32(F_EOF) | Int32FromInt32(F_ERR))) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -136584,7 +136582,7 @@ func X__fpending(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__fpurge(tls *TLS, f uintptr) (r int32) { @@ -136628,7 +136626,7 @@ func X__freadahead(tls *TLS, f uintptr) (r Tsize_t) { } else { v1 = 0 } - return uint64(v1) + return Uint64FromInt64(v1) } func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { @@ -136639,7 +136637,7 @@ func X__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr) { if (*TFILE)(unsafe.Pointer(f)).Frpos == (*TFILE)(unsafe.Pointer(f)).Frend { return uintptr(0) } - *(*Tsize_t)(unsafe.Pointer(sizep)) = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + *(*Tsize_t)(unsafe.Pointer(sizep)) = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) return (*TFILE)(unsafe.Pointer(f)).Frpos } @@ -136887,7 +136885,7 @@ _3: v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, f) } @@ -136945,7 +136943,7 @@ func Xfgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -136981,27 +136979,27 @@ func Xfgetln(tls *TLS, f uintptr, plen uintptr) (r uintptr) { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } Xungetc(tls, v2, f) if v6 = (*TFILE)(unsafe.Pointer(f)).Frend != 0; v6 { - v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + v5 = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) z = v5 } if v6 && v5 != 0 { ret = (*TFILE)(unsafe.Pointer(f)).Frpos z++ v7 = z - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(int64(v7) - int64(ret)) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(int64(v7) - int64(ret)) (*TFILE)(unsafe.Pointer(f)).Frpos = z } else { *(*[1]Tsize_t)(unsafe.Pointer(bp)) = [1]Tsize_t{} v8 = Xgetline(tls, f+168, bp, f) l = v8 if v8 > 0 { - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(l) + *(*Tsize_t)(unsafe.Pointer(plen)) = Uint64FromInt64(l) ret = (*TFILE)(unsafe.Pointer(f)).Fgetln_buf } } @@ -137059,17 +137057,17 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { n-- for n != 0 { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, int32('\n'), Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v2 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v2 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v2) - if k < uint64(n) { + k = Uint64FromInt64(v2) + if k < Uint64FromInt32(n) { v3 = k } else { - v3 = uint64(n) + v3 = Uint64FromInt32(n) } k = v3 Xmemcpy(tls, p, (*TFILE)(unsafe.Pointer(f)).Frpos, k) @@ -137084,7 +137082,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -137097,11 +137095,11 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { break } n-- - v8 = uint8(c) + v8 = Uint8FromInt32(c) v9 = p p++ *(*uint8)(unsafe.Pointer(v9)) = v8 - if int32(v8) == int32('\n') { + if Int32FromUint8(v8) == int32('\n') { break } } @@ -137134,27 +137132,27 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { _, _, _, _, _, _, _ = c, first, l, v1, v2, v3, v4 /* Convert character from buffer if possible */ if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - l = uint64(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) + l = Uint64FromInt32(Xmbtowc(tls, bp, (*TFILE)(unsafe.Pointer(f)).Frpos, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)))) if l+uint64(1) >= uint64(1) { *(*uintptr)(unsafe.Pointer(f + 8)) += uintptr(l + BoolUint64(!(l != 0))) /* l==0 means 1 byte, null */ - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } } /* Convert character byte-by-byte */ *(*Tmbstate_t)(unsafe.Pointer(bp + 8)) = Tmbstate_t{} first = int32(1) - for cond := true; cond; cond = l == uint64(-Int32FromInt32(2)) { + for cond := true; cond; cond = l == Uint64FromInt32(-Int32FromInt32(2)) { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { v4 = f + 8 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ - v2 = int32(*(*uint8)(unsafe.Pointer(v3))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } else { v2 = X__uflow(tls, f) } v1 = v2 c = v1 - *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(v1) + *(*uint8)(unsafe.Pointer(bp + 16)) = Uint8FromInt32(v1) if c < 0 { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) @@ -137163,16 +137161,16 @@ func ___fgetwc_unlocked_internal(tls *TLS, f uintptr) (r Twint_t) { return uint32(0xffffffff) } l = Xmbrtowc(tls, bp, bp+16, uint64(1), bp+8) - if l == uint64(-Int32FromInt32(1)) { + if l == Uint64FromInt32(-Int32FromInt32(1)) { if !(first != 0) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - Xungetc(tls, int32(*(*uint8)(unsafe.Pointer(bp + 16))), f) + Xungetc(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(bp + 16))), f) } return uint32(0xffffffff) } first = 0 } - return uint32(*(*Twchar_t)(unsafe.Pointer(bp))) + return Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(bp))) } func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { @@ -137190,9 +137188,9 @@ func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - wc = int32(___fgetwc_unlocked_internal(tls, f)) + wc = Int32FromUint32(___fgetwc_unlocked_internal(tls, f)) *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(wc) + return Uint32FromInt32(wc) } func Xfgetwc(tls *TLS, f uintptr) (r Twint_t) { @@ -137263,7 +137261,7 @@ func Xfgetws(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { } v4 = p p += 4 - *(*Twchar_t)(unsafe.Pointer(v4)) = int32(c) + *(*Twchar_t)(unsafe.Pointer(v4)) = Int32FromUint32(c) if c == uint32('\n') { break } @@ -137360,7 +137358,7 @@ func _mseek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -137374,13 +137372,13 @@ _1: 1: (*Tcookie)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) - if off < -base || off > int64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + if off < -base || off > Int64FromUint64((*Tcookie)(unsafe.Pointer(c)).Fsize)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _mread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -137414,7 +137412,7 @@ func _mwrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2, rem Tsize_t _, _, _ = c, len2, rem c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _mwrite(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwpos, len2) < len2 { @@ -137458,11 +137456,11 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { var v3 Tsize_t _, _, _, _, _ = f, plus, v1, v2, v3 plus = BoolInt32(!!(Xstrchr(tls, mode, int32('+')) != 0)) - if !(Xstrchr(tls, __ccgo_ts+1534, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1534, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } - if !(buf != 0) && size > uint64(Int64FromInt64(INT64_MAX)) { + if !(buf != 0) && size > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOMEM) return uintptr(0) } @@ -137487,19 +137485,19 @@ func Xfmemopen(tls *TLS, buf uintptr, size Tsize_t, mode uintptr) (r uintptr) { } (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fbuf = buf (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fsize = size - (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = int32(*(*uint8)(unsafe.Pointer(mode))) + (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fmode = Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) if !(plus != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tmem_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = size } else { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('a') { v3 = Xstrnlen(tls, buf, size) (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Fpos = v3 (*Tmem_FILE)(unsafe.Pointer(f)).Fc.Flen1 = v3 @@ -137528,13 +137526,13 @@ func Xfopen(tls *TLS, filename uintptr, mode uintptr) (r uintptr) { var fd, flags int32 _, _, _ = f, fd, flags /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1534, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1534, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } /* Compute the flags to pass to open() */ flags = X__fmodeflags(tls, mode) - fd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open), int64(filename), int64(flags|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0666)))))) if fd < 0 { return uintptr(0) } @@ -137579,8 +137577,8 @@ func _cookieread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { if ret <= 0 { goto bail } - readlen += uint64(ret) - remain -= uint64(ret) + readlen += Uint64FromInt64(ret) + remain -= Uint64FromInt64(ret) } if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) || remain > BoolUint64(!!((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0)) { return readlen @@ -137606,7 +137604,7 @@ bail: } else { v4 = int32(F_ERR) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(v4) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(v4) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Frend = v5 (*TFILE)(unsafe.Pointer(f)).Frpos = v5 @@ -137619,7 +137617,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var ret Tssize_t _, _, _, _, _ = fc, len2, ret, v1, v2 fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if !((*Tfcookie)(unsafe.Pointer(fc)).Fiofuncs.Fwrite != 0) { return len1 } @@ -137639,7 +137637,7 @@ func _cookiewrite(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) return uint64(0) } - return uint64(ret) + return Uint64FromInt64(ret) } func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { @@ -137650,7 +137648,7 @@ func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { var res int32 _, _ = fc, res fc = (*TFILE)(unsafe.Pointer(f)).Fcookie - if uint32(whence) > uint32(2) { + if Uint32FromInt32(whence) > uint32(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -137684,7 +137682,7 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun var v2 int32 _, _, _ = f, v1, v2 /* Check for valid initial mode character */ - if !(Xstrchr(tls, __ccgo_ts+1534, int32(*(*uint8)(unsafe.Pointer(mode)))) != 0) { + if !(Xstrchr(tls, __ccgo_ts+1534, Int32FromUint8(*(*uint8)(unsafe.Pointer(mode)))) != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } @@ -137698,12 +137696,12 @@ func Xfopencookie(tls *TLS, cookie uintptr, mode uintptr, iofuncs Tcookie_io_fun Xmemset(tls, f, 0, uint64(232)) /* Impose mode restrictions */ if !(Xstrchr(tls, mode, int32('+')) != 0) { - if int32(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(mode))) == int32('r') { v2 = int32(F_NOWR) } else { v2 = int32(F_NORD) } - (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = uint32(v2) + (*Tcookie_FILE)(unsafe.Pointer(f)).Ff.Fflags = Uint32FromInt32(v2) } /* Set up our fcookie */ (*Tcookie_FILE)(unsafe.Pointer(f)).Ffc.Fcookie = cookie @@ -137753,15 +137751,15 @@ _3: if v2 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v5 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v5 = Uint8FromInt32(c) v7 = f + 40 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ *(*uint8)(unsafe.Pointer(v6)) = v5 - v4 = int32(v5) + v4 = Int32FromUint8(v5) } else { - v4 = X__overflow(tls, f, int32(uint8(c))) + v4 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v4 v8 = f + 140 @@ -137815,15 +137813,15 @@ func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -137872,16 +137870,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { Xfwide(tls, f, int32(1)) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale - if BoolInt32(uint32(c) < uint32(128)) != 0 { - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if BoolInt32(Uint32FromInt32(c) < uint32(128)) != 0 { + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v1 } else { @@ -137894,16 +137892,16 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { } } else { l = Xwctomb(tls, bp, c) - if l < 0 || X__fwritex(tls, bp, uint64(l), f) < uint64(l) { + if l < 0 || X__fwritex(tls, bp, Uint64FromInt32(l), f) < Uint64FromInt32(l) { c = Int32FromUint32(0xffffffff) } } } - if uint32(c) == uint32(0xffffffff) { + if Uint32FromInt32(c) == uint32(0xffffffff) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137919,11 +137917,11 @@ func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { v1 = 0 } __need_unlock = v1 - c = int32(X__fputwc_unlocked(tls, c, f)) + c = Int32FromUint32(X__fputwc_unlocked(tls, c, f)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return uint32(c) + return Uint32FromInt32(c) } func Xfputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137988,7 +137986,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { ___unlockfile(tls, f) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return int32(l) /* 0 or -1 */ + return Int32FromUint64(l) /* 0 or -1 */ } func Xfputws_unlocked(tls *TLS, _ws uintptr, f uintptr) (r int32) { @@ -138024,8 +138022,8 @@ func Xfread(tls *TLS, destv uintptr, size Tsize_t, nmemb Tsize_t, f uintptr) (r *(*int32)(unsafe.Pointer(f + 136)) |= (*TFILE)(unsafe.Pointer(f)).Fmode - int32(1) if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { /* First exhaust the buffer. */ - if uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { - v2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) + if Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos)) < l { + v2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos)) } else { v2 = l } @@ -138101,7 +138099,7 @@ func Xfreopen(tls *TLS, filename uintptr, mode uintptr, f uintptr) (r uintptr) { X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } fl &= ^(Int32FromInt32(O_CREAT) | Int32FromInt32(O_EXCL) | Int32FromInt32(O_CLOEXEC)) - if X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { + if X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_fcntl), int64((*TFILE)(unsafe.Pointer(f)).Ffd), int64(Int32FromInt32(F_SETFL)), int64(fl)))) < 0 { goto fail } } else { @@ -138199,7 +138197,7 @@ func X__fseeko_unlocked(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32) v3 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v3 (*TFILE)(unsafe.Pointer(f)).Frpos = v3 - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) return 0 } @@ -138504,14 +138502,14 @@ func X__fwritex(tls *TLS, s uintptr, l Tsize_t, f uintptr) (r Tsize_t) { if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return uint64(0) } - if l > uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { + if l > Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwend)-int64((*TFILE)(unsafe.Pointer(f)).Fwpos)) { return (*(*func(*TLS, uintptr, uintptr, Tsize_t) Tsize_t)(unsafe.Pointer(&struct{ uintptr }{(*TFILE)(unsafe.Pointer(f)).Fwrite})))(tls, f, s, l) } if (*TFILE)(unsafe.Pointer(f)).Flbf >= 0 { /* Match /^(.*\n|)/ */ i = l for { - if !(i != 0 && int32(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { + if !(i != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(i-uint64(1))))) != int32('\n')) { break } goto _1 @@ -138614,7 +138612,7 @@ _3: v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, f) } @@ -138672,7 +138670,7 @@ func Xgetc(tls *TLS, f1 uintptr) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138705,7 +138703,7 @@ func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { v3 = f + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, f) } @@ -138748,7 +138746,7 @@ _3: v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, f) } @@ -138806,7 +138804,7 @@ func Xgetchar(tls *TLS) (r int32) { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ - v4 = int32(*(*uint8)(unsafe.Pointer(v5))) + v4 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))) } else { v4 = X__uflow(tls, v1) } @@ -138831,7 +138829,7 @@ func Xgetchar_unlocked(tls *TLS) (r int32) { v3 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v2 = *(*uintptr)(unsafe.Pointer(v3)) *(*uintptr)(unsafe.Pointer(v3))++ - v1 = int32(*(*uint8)(unsafe.Pointer(v2))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) } else { v1 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -138870,13 +138868,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize } for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend { - z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, uint64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) + z = Xmemchr(tls, (*TFILE)(unsafe.Pointer(f)).Frpos, delim, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Frend)-int64((*TFILE)(unsafe.Pointer(f)).Frpos))) if z != 0 { v3 = int64(z) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) } else { v3 = int64((*TFILE)(unsafe.Pointer(f)).Frend) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) } - k = uint64(v3) + k = Uint64FromInt64(v3) } else { z = uintptr(0) k = uint64(0) @@ -138920,7 +138918,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v7 = f + 8 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ - v5 = int32(*(*uint8)(unsafe.Pointer(v6))) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v6))) } else { v5 = X__uflow(tls, f) } @@ -138941,13 +138939,13 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) - *(*uint8)(unsafe.Pointer(v8)) = uint8(c) + *(*uint8)(unsafe.Pointer(v8)) = Uint8FromInt32(c) } else { - v10 = uint8(c) + v10 = Uint8FromInt32(c) v11 = i i++ *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)) + uintptr(v11))) = v10 - if int32(v10) == delim { + if Int32FromUint8(v10) == delim { break } } @@ -138958,7 +138956,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize if __need_unlock != 0 { ___unlockfile(tls, f) } - return int64(i) + return Int64FromUint64(i) } func X__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t) { @@ -138998,7 +138996,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { v5 = uintptr(unsafe.Pointer(&X__stdin_FILE)) + 8 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ - v3 = int32(*(*uint8)(unsafe.Pointer(v4))) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) } else { v3 = X__uflow(tls, uintptr(unsafe.Pointer(&X__stdin_FILE))) } @@ -139009,7 +139007,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { } v6 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v6))) = Uint8FromInt32(c) } *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) if c != int32('\n') && (!((*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdin_FILE)))).Fflags&Uint32FromInt32(F_EOF) != 0) || !(i != 0)) { @@ -139122,7 +139120,7 @@ func _ms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -139136,13 +139134,13 @@ _1: 1: (*Tcookie1)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie1)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > int64(0x7fffffffffffffff)-base { goto fail } - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie1)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -139150,7 +139148,7 @@ func _ms_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _ms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -139256,7 +139254,7 @@ func _wms_seek(tls *TLS, f uintptr, off Toff_t, whence int32) (r Toff_t) { var v2 Tsize_t _, _, _ = base, c, v2 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if !(uint32(whence) > uint32(2)) { + if !(Uint32FromInt32(whence) > uint32(2)) { goto _1 } goto fail @@ -139270,14 +139268,14 @@ _1: 1: (*Tcookie2)(unsafe.Pointer(c)).Fpos, 2: (*Tcookie2)(unsafe.Pointer(c)).Flen1, } - base = int64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) + base = Int64FromUint64(*(*Tsize_t)(unsafe.Pointer(bp + uintptr(whence)*8))) if off < -base || off > Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)-base { goto fail } Xmemset(tls, c+48, 0, uint64(8)) - v2 = uint64(base + off) + v2 = Uint64FromInt64(base + off) (*Tcookie2)(unsafe.Pointer(c)).Fpos = v2 - return int64(v2) + return Int64FromUint64(v2) } func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { @@ -139288,7 +139286,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { var len2 Tsize_t _, _, _, _ = c, len2, newbuf, v1 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - len2 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + len2 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) if len2 != 0 { (*TFILE)(unsafe.Pointer(f)).Fwpos = (*TFILE)(unsafe.Pointer(f)).Fwbase if _wms_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, len2) < len2 { @@ -139297,7 +139295,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { } if len1+(*Tcookie2)(unsafe.Pointer(c)).Fpos >= (*Tcookie2)(unsafe.Pointer(c)).Fspace { len2 = uint64(2)*(*Tcookie2)(unsafe.Pointer(c)).Fspace + uint64(1) | ((*Tcookie2)(unsafe.Pointer(c)).Fpos + len1 + uint64(1)) - if len2 > uint64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { + if len2 > Uint64FromInt64(Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(4)) { return uint64(0) } newbuf = Xrealloc(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf, len2*uint64(4)) @@ -139311,7 +139309,7 @@ func _wms_write(tls *TLS, f uintptr, _buf uintptr, len1 Tsize_t) (r Tsize_t) { (*Tcookie2)(unsafe.Pointer(c)).Fspace = len2 } len2 = Xmbsnrtowcs(tls, (*Tcookie2)(unsafe.Pointer(c)).Fbuf+uintptr((*Tcookie2)(unsafe.Pointer(c)).Fpos)*4, bp, len1, (*Tcookie2)(unsafe.Pointer(c)).Fspace-(*Tcookie2)(unsafe.Pointer(c)).Fpos, c+48) - if len2 == uint64(-Int32FromInt32(1)) { + if len2 == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } *(*Tsize_t)(unsafe.Pointer(c + 16)) += len2 @@ -139397,7 +139395,7 @@ func Xpclose(tls *TLS, f uintptr) (r1 int32) { } } if r < 0 { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } return *(*int32)(unsafe.Pointer(bp)) } @@ -139466,15 +139464,15 @@ _3: if v2 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v5 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v5 = Uint8FromInt32(c) v7 = f + 40 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ *(*uint8)(unsafe.Pointer(v6)) = v5 - v4 = int32(v5) + v4 = Int32FromUint8(v5) } else { - v4 = X__overflow(tls, f, int32(uint8(c))) + v4 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v4 v8 = f + 140 @@ -139528,15 +139526,15 @@ func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { v2 = f1 l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139564,15 +139562,15 @@ func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v2 = Uint8FromInt32(c) v4 = f + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, f, int32(uint8(c))) + v1 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139610,15 +139608,15 @@ _3: if v2 != 0 { ___lockfile(tls, f) } - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { - v5 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(f)).Flbf && (*TFILE)(unsafe.Pointer(f)).Fwpos != (*TFILE)(unsafe.Pointer(f)).Fwend { + v5 = Uint8FromInt32(c) v7 = f + 40 v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7))++ *(*uint8)(unsafe.Pointer(v6)) = v5 - v4 = int32(v5) + v4 = Int32FromUint8(v5) } else { - v4 = X__overflow(tls, f, int32(uint8(c))) + v4 = X__overflow(tls, f, Int32FromUint8(Uint8FromInt32(c))) } c = v4 v8 = f + 140 @@ -139672,15 +139670,15 @@ func Xputchar(tls *TLS, c1 int32) (r int32) { v2 = uintptr(unsafe.Pointer(&X__stdout_FILE)) l = AtomicLoadPInt32(v2 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { - if int32(uint8(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { - v6 = uint8(v1) + if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend { + v6 = Uint8FromInt32(v1) v8 = v2 + 40 v7 = *(*uintptr)(unsafe.Pointer(v8)) *(*uintptr)(unsafe.Pointer(v8))++ *(*uint8)(unsafe.Pointer(v7)) = v6 - v5 = int32(v6) + v5 = Int32FromUint8(v6) } else { - v5 = X__overflow(tls, v2, int32(uint8(v1))) + v5 = X__overflow(tls, v2, Int32FromUint8(Uint8FromInt32(v1))) } v3 = v5 goto _4 @@ -139700,15 +139698,15 @@ func Xputchar_unlocked(tls *TLS, c int32) (r int32) { var v2 uint8 var v3, v4 uintptr _, _, _, _ = v1, v2, v3, v4 - if int32(uint8(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v2 = uint8(c) + if Int32FromUint8(Uint8FromInt32(c)) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v2 = Uint8FromInt32(c) v4 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v3 = *(*uintptr)(unsafe.Pointer(v4)) *(*uintptr)(unsafe.Pointer(v4))++ *(*uint8)(unsafe.Pointer(v3)) = v2 - v1 = int32(v2) + v1 = Int32FromUint8(v2) } else { - v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(c))) + v1 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(c))) } return v1 } @@ -139730,15 +139728,15 @@ func Xputs(tls *TLS, s uintptr) (r1 int32) { } __need_unlock = v1 if v6 = Xfputs(tls, s, uintptr(unsafe.Pointer(&X__stdout_FILE))) < 0; !v6 { - if int32(uint8(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { - v3 = uint8(Int32FromUint8('\n')) + if Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n'))) != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Flbf && (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwpos != (*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdout_FILE)))).Fwend { + v3 = Uint8FromInt32(Int32FromUint8('\n')) v5 = uintptr(unsafe.Pointer(&X__stdout_FILE)) + 40 v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5))++ *(*uint8)(unsafe.Pointer(v4)) = v3 - v2 = int32(v3) + v2 = Int32FromUint8(v3) } else { - v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), int32(uint8(Int32FromUint8('\n')))) + v2 = X__overflow(tls, uintptr(unsafe.Pointer(&X__stdout_FILE)), Int32FromUint8(Uint8FromInt32(Int32FromUint8('\n')))) } } r = -BoolInt32(v6 || v2 < 0) @@ -139756,7 +139754,7 @@ func Xputw(tls *TLS, _x int32, f uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) *(*int32)(unsafe.Pointer(bp)) = _x - return int32(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) + return Int32FromUint64(Xfwrite(tls, bp, uint64(4), uint64(1), f)) - int32(1) } func Xputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -139794,7 +139792,7 @@ func Xremove(tls *TLS, path uintptr) (r1 int32) { if r == -int32(EISDIR) { r = int32(X__syscall1(tls, int64(SYS_rmdir), int64(path))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { @@ -139802,7 +139800,7 @@ func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { trc("tls=%v old=%v new1=%v, (%v:)", tls, old, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_rename), int64(old), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_rename), int64(old), int64(new1))))) } func Xrewind(tls *TLS, f uintptr) { @@ -139818,7 +139816,7 @@ func Xrewind(tls *TLS, f uintptr) { } __need_unlock = v1 X__fseeko_unlocked(tls, f, 0, 0) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -140093,7 +140091,7 @@ func Xtmpfile(tls *TLS) (r uintptr) { break } ___randname(tls, bp+uintptr(13)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_open), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_open), int64(bp), int64(Int32FromInt32(O_RDWR)|Int32FromInt32(O_CREAT)|Int32FromInt32(O_EXCL)|Int32FromInt32(O_LARGEFILE)), int64(Int32FromInt32(0600)))))) if fd >= 0 { X__syscall1(tls, int64(SYS_unlink), int64(bp)) f = X__fdopen(tls, fd, __ccgo_ts+1613) @@ -140177,12 +140175,12 @@ func Xungetc(tls *TLS, c int32, f uintptr) (r int32) { v3 = f + 8 *(*uintptr)(unsafe.Pointer(v3))-- v2 = *(*uintptr)(unsafe.Pointer(v3)) - *(*uint8)(unsafe.Pointer(v2)) = uint8(c) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(c) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(uint8(c)) + return Int32FromUint8(Uint8FromInt32(c)) } func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { @@ -140214,7 +140212,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { X__toread(tls, f) } if v3 = !((*TFILE)(unsafe.Pointer(f)).Frpos != 0) || c == uint32(0xffffffff); !v3 { - v2 = int32(Xwcrtomb(tls, bp, int32(c), uintptr(0))) + v2 = Int32FromUint64(Xwcrtomb(tls, bp, Int32FromUint32(c), uintptr(0))) l = v2 } if v3 || v2 < 0 || (*TFILE)(unsafe.Pointer(f)).Frpos < (*TFILE)(unsafe.Pointer(f)).Fbuf-uintptr(UNGET)+uintptr(l) { @@ -140232,9 +140230,9 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { } else { p6 = f + 8 *(*uintptr)(unsafe.Pointer(p6)) -= uintptr(l) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint64(l)) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, Uint64FromInt32(l)) } - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -140256,13 +140254,13 @@ func Xvasprintf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32) { l = Xvsnprintf(tls, uintptr(0), uint64(0), fmt, ap2) _ = ap2 if v2 = l < 0; !v2 { - v1 = Xmalloc(tls, uint64(uint32(l)+uint32(1))) + v1 = Xmalloc(tls, uint64(Uint32FromInt32(l)+uint32(1))) *(*uintptr)(unsafe.Pointer(s)) = v1 } if v2 || !(v1 != 0) { return -int32(1) } - return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(uint32(l)+uint32(1)), fmt, ap) + return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(Uint32FromInt32(l)+uint32(1)), fmt, ap) } func Xvdprintf(tls *TLS, fd int32, fmt uintptr, ap Tva_list) (r int32) { @@ -140442,33 +140440,33 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -140490,18 +140488,18 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { var v1 uint64 var _ /* pad at bp+0 */ [256]uint8 _ = v1 - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { return } l = w - l - if uint64(l) > uint64(256) { + if Uint64FromInt32(l) > uint64(256) { v1 = uint64(256) } else { - v1 = uint64(l) + v1 = Uint64FromInt32(l) } - Xmemset(tls, bp, int32(c), v1) + Xmemset(tls, bp, Int32FromUint8(c), v1) for { - if !(uint64(l) >= uint64(256)) { + if !(Uint64FromInt32(l) >= uint64(256)) { break } _out(tls, f, bp, uint64(256)) @@ -140510,7 +140508,7 @@ func _pad3(tls *TLS, f uintptr, c uint8, w int32, l int32, fl int32) { ; l = int32(uint64(l) - Uint64FromInt64(256)) } - _out(tls, f, bp, uint64(l)) + _out(tls, f, bp, Uint64FromInt32(l)) } var _xdigits1 = [16]uint8{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} @@ -140524,7 +140522,7 @@ func _fmt_x(tls *TLS, x Tuintmax_t, s uintptr, lower int32) (r uintptr) { } s-- v2 = s - *(*uint8)(unsafe.Pointer(v2)) = uint8(int32(_xdigits1[x&uint64(15)]) | lower) + *(*uint8)(unsafe.Pointer(v2)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x&uint64(15)]) | lower) goto _1 _1: ; @@ -140617,13 +140615,13 @@ func _fmt_fp(tls *TLS, f uintptr, y float64, w int32, p int32, fl int32, t int32 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: - if int32(v1>>Int32FromInt32(63)) != 0 { + if Int32FromUint64(v1>>Int32FromInt32(63)) != 0 { y = -y } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { prefix += uintptr(3) } else { - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { prefix += uintptr(6) } else { prefix++ @@ -140650,10 +140648,10 @@ _4: } s1 = v6 } - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) - _out(tls, f, prefix, uint64(pl)) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) + _out(tls, f, prefix, Uint64FromInt32(pl)) _out(tls, f, s1, uint64(3)) - _pad3(tls, f, uint8(' '), w, int32(3)+pl, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, int32(3)+pl, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > int32(3)+pl { v7 = w } else { @@ -140686,7 +140684,7 @@ _4: } round *= Float64FromInt32(16) } - if int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { y = -y y -= round y += round @@ -140701,7 +140699,7 @@ _4: } else { v9 = *(*int32)(unsafe.Pointer(bp + 512)) } - estr = _fmt_u(tls, uint64(v9), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v9), ebuf) if estr == ebuf { estr-- v10 = estr @@ -140714,18 +140712,18 @@ _4: } else { v12 = int32('+') } - *(*uint8)(unsafe.Pointer(v11)) = uint8(v12) + *(*uint8)(unsafe.Pointer(v11)) = Uint8FromInt32(v12) estr-- v13 = estr - *(*uint8)(unsafe.Pointer(v13)) = uint8(t + (Int32FromUint8('p') - Int32FromUint8('a'))) + *(*uint8)(unsafe.Pointer(v13)) = Uint8FromInt32(t + (Int32FromUint8('p') - Int32FromUint8('a'))) s = bp + 516 for cond := true; cond; cond = y != 0 { x = int32(y) v14 = s s++ - *(*uint8)(unsafe.Pointer(v14)) = uint8(int32(_xdigits1[x]) | t&int32(32)) + *(*uint8)(unsafe.Pointer(v14)) = Uint8FromInt32(Int32FromUint8(_xdigits1[x]) | t&int32(32)) y = Float64FromInt32(16) * (y - float64(x)) - if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if int64(s)-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { v15 = s s++ *(*uint8)(unsafe.Pointer(v15)) = uint8('.') @@ -140740,12 +140738,12 @@ _4: l = int32(int64(s) - t__predefined_ptrdiff_t(bp+516) + (int64(ebuf) - int64(estr))) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) - _out(tls, f, bp+516, uint64(int64(s)-t__predefined_ptrdiff_t(bp+516))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, bp+516, Uint64FromInt64(int64(s)-t__predefined_ptrdiff_t(bp+516))) _pad3(tls, f, uint8('0'), int32(int64(l)-(int64(ebuf)-int64(estr))-(int64(s)-t__predefined_ptrdiff_t(bp+516))), 0, 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v16 = w } else { @@ -140818,15 +140816,15 @@ _4: v25 = -*(*int32)(unsafe.Pointer(bp + 512)) } sh1 = v25 - need = int32(uint32(1) + (uint32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) + need = Int32FromUint32(uint32(1) + (Uint32FromInt32(p)+Uint32FromInt32(LDBL_MANT_DIG)/Uint32FromUint32(3)+uint32(8))/uint32(9)) d = a for { if !(d < z) { break } - rm = *(*Tuint32_t)(unsafe.Pointer(d)) & uint32(int32(1)<>sh1 + carry1 - carry1 = uint32(Int32FromInt32(1000000000)>>sh1) * rm + carry1 = Uint32FromInt32(Int32FromInt32(1000000000)>>sh1) * rm goto _26 _26: ; @@ -140856,7 +140854,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _29 @@ -140887,30 +140885,30 @@ _4: i *= int32(10) j++ } - x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(i) + x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % Uint32FromInt32(i) /* Are there any significant digits past j? */ if x2 != 0 || d+uintptr(1)*4 != z { round1 = Float64FromInt32(2) / Float64FromFloat64(2.22044604925031308085e-16) - if *(*Tuint32_t)(unsafe.Pointer(d))/uint32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { + if *(*Tuint32_t)(unsafe.Pointer(d))/Uint32FromInt32(i)&uint32(1) != 0 || i == int32(1000000000) && d > a && *(*Tuint32_t)(unsafe.Pointer(d + uintptr(-Int32FromInt32(1))*4))&uint32(1) != 0 { round1 += Float64FromInt32(2) } - if x2 < uint32(i/int32(2)) { + if x2 < Uint32FromInt32(i/int32(2)) { small = Float64FromFloat64(0.5) } else { - if x2 == uint32(i/int32(2)) && d+uintptr(1)*4 == z { + if x2 == Uint32FromInt32(i/int32(2)) && d+uintptr(1)*4 == z { small = Float64FromFloat64(1) } else { small = Float64FromFloat64(1.5) } } - if pl != 0 && int32(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { + if pl != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(prefix))) == int32('-') { round1 *= float64(-Int32FromInt32(1)) small *= float64(-Int32FromInt32(1)) } *(*Tuint32_t)(unsafe.Pointer(d)) -= x2 /* Decide whether to round by probing round+small */ if round1+small != round1 { - *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + uint32(i) + *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + Uint32FromInt32(i) for *(*Tuint32_t)(unsafe.Pointer(d)) > uint32(999999999) { v31 = d d -= 4 @@ -140925,7 +140923,7 @@ _4: i = int32(10) e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= Uint32FromInt32(i)) { break } goto _33 @@ -140960,13 +140958,13 @@ _4: t -= int32(2) p-- } - if !(uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if !(Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { /* Count trailing zeros in last place */ if z > a && *(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4)) != 0 { i = int32(10) j = Int32FromInt32(0) for { - if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%uint32(i) == uint32(0)) { + if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%Uint32FromInt32(i) == uint32(0)) { break } goto _35 @@ -141015,10 +141013,10 @@ _4: } } } - if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { return -int32(1) } - l = int32(1) + p + BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) + l = int32(1) + p + BoolInt32(p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) if t|int32(32) == int32('f') { if e > int32(INT_MAX)-l { return -int32(1) @@ -141032,7 +141030,7 @@ _4: } else { v42 = e } - estr = _fmt_u(tls, uint64(v42), ebuf) + estr = _fmt_u(tls, Uint64FromInt32(v42), ebuf) for int64(ebuf)-int64(estr) < int64(2) { estr-- v43 = estr @@ -141045,10 +141043,10 @@ _4: } else { v45 = int32('+') } - *(*uint8)(unsafe.Pointer(v44)) = uint8(v45) + *(*uint8)(unsafe.Pointer(v44)) = Uint8FromInt32(v45) estr-- v46 = estr - *(*uint8)(unsafe.Pointer(v46)) = uint8(t) + *(*uint8)(unsafe.Pointer(v46)) = Uint8FromInt32(t) if int64(ebuf)-int64(estr) > int64(int32(INT_MAX)-l) { return -int32(1) } @@ -141058,8 +141056,8 @@ _4: return -int32(1) } _pad3(tls, f, uint8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) if t|int32(32) == int32('f') { if a > r { a = r @@ -141083,13 +141081,13 @@ _4: *(*uint8)(unsafe.Pointer(v49)) = uint8('0') } } - _out(tls, f, s2, uint64(int64(bp+516+uintptr(9))-int64(s2))) + _out(tls, f, s2, Uint64FromInt64(int64(bp+516+uintptr(9))-int64(s2))) goto _47 _47: ; d += 4 } - if p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p != 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+598, uint64(1)) } for { @@ -141107,7 +141105,7 @@ _4: } else { v52 = p } - _out(tls, f, s3, uint64(v52)) + _out(tls, f, s3, Uint64FromInt32(v52)) goto _50 _50: ; @@ -141140,7 +141138,7 @@ _4: v56 = s4 s4++ _out(tls, f, v56, uint64(1)) - if p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p > 0 || Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+598, uint64(1)) } } @@ -141149,7 +141147,7 @@ _4: } else { v57 = int64(p) } - _out(tls, f, s4, uint64(v57)) + _out(tls, f, s4, Uint64FromInt64(v57)) p = int32(int64(p) - (int64(bp+516+UintptrFromInt32(9)) - int64(s4))) goto _53 _53: @@ -141157,9 +141155,9 @@ _4: d += 4 } _pad3(tls, f, uint8('0'), p+int32(18), int32(18), 0) - _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) + _out(tls, f, estr, Uint64FromInt64(int64(ebuf)-int64(estr))) } - _pad3(tls, f, uint8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+l, Int32FromUint32(Uint32FromInt32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v58 = w } else { @@ -141176,10 +141174,10 @@ func _getint(tls *TLS, s uintptr) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { - i = int32(10)*i + (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) + i = int32(10)*i + (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))) - int32('0')) } goto _1 _1: @@ -141224,7 +141222,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Handle literal text and %% format specifiers */ a = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('%')) { break } goto _2 @@ -141234,7 +141232,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } z = *(*uintptr)(unsafe.Pointer(bp)) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('%') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('%')) { break } goto _3 @@ -141248,14 +141246,14 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32(int64(z) - int64(a)) if f != 0 { - _out(tls, f, a, uint64(l)) + _out(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) - argpos = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') + argpos = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) - int32('0') *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { argpos = -int32(1) @@ -141264,24 +141262,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { + if !(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-int32(' '))) != 0) { break } - fl |= uint32(1) << (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) + fl |= uint32(1) << (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) - int32(' ')) goto _4 _4: ; *(*uintptr)(unsafe.Pointer(bp))++ } /* Read field width */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2))) == int32('$') { l10n = uint32(1) if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*4)) = int32(_INT) w = Int32FromInt32(0) } else { - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(3) } else { @@ -141309,13 +141307,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } /* Read precision */ - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1))) == int32('*') { + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 3))) == int32('$') { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) + *(*int32)(unsafe.Pointer(nl_type + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*4)) = int32(_INT) p = Int32FromInt32(0) } else { - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 2)))-int32('0'))*8))) } *(*uintptr)(unsafe.Pointer(bp)) += uintptr(4) } else { @@ -141333,7 +141331,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } xp = BoolInt32(p >= 0) } else { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('.') { *(*uintptr)(unsafe.Pointer(bp))++ p = _getint(tls, bp) xp = int32(1) @@ -141345,13 +141343,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st v8 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ - st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(int32(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) + st = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_states)) + uintptr(st)*58 + uintptr(Int32FromUint8(*(*uint8)(unsafe.Pointer(v8)))-int32('A'))))) } if !(st != 0) { goto inval @@ -141364,13 +141362,13 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { if argpos >= 0 { if !(f != 0) { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) } else { *(*Targ)(unsafe.Pointer(bp + 8)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } } else { if f != 0 { - _pop_arg(tls, bp+8, int32(st), ap) + _pop_arg(tls, bp+8, Int32FromUint32(st), ap) } else { return 0 } @@ -141386,7 +141384,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, z = bp + 16 + uintptr(24) prefix = __ccgo_ts + 1647 pl = 0 - t = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(-Int32FromInt32(1))))) /* Transform ls,lc -> S,C */ if ps != 0 && t&int32(15) == int32(3) { t &= ^Int32FromInt32(32) @@ -141450,24 +141448,24 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = Uint64FromInt32(cnt) break } goto _1 _10: ; - if uint64(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { - v31 = uint64(p) + if Uint64FromInt32(p) > Uint64FromInt32(2)*Uint64FromInt64(8) { + v31 = Uint64FromInt32(p) } else { v31 = Uint64FromInt32(2) * Uint64FromInt64(8) } - p = int32(v31) + p = Int32FromUint64(v31) t = int32('x') fl |= Uint32FromUint32(1) << (Int32FromUint8('#') - Int32FromUint8(' ')) _12: @@ -141498,7 +141496,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, _14: ; pl = int32(1) - if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > uint64(Int64FromInt64(INT64_MAX)) { + if *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) > Uint64FromInt64(Int64FromInt64(INT64_MAX)) { *(*Tuintmax_t)(unsafe.Pointer(bp + 8)) = -*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) } else { if fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { @@ -141569,7 +141567,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v40 = p } - z = a + uintptr(Xstrnlen(tls, a, uint64(v40))) + z = a + uintptr(Xstrnlen(tls, a, Uint64FromInt32(v40))) if p < 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -141581,7 +141579,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if !(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0) { goto narrow_c } - (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) + (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[0] = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 8))) (*(*[2]Twchar_t)(unsafe.Pointer(bp + 40)))[int32(1)] = 0 *(*uintptr)(unsafe.Pointer(bp + 8)) = bp + 40 p = -int32(1) @@ -141590,21 +141588,21 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, ws = *(*uintptr)(unsafe.Pointer(bp + 8)) v42 = Int32FromInt32(0) l = v42 - i = uint64(v42) + i = Uint64FromInt32(v42) for { - if v45 = i < uint64(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { + if v45 = i < Uint64FromInt32(p) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { v44 = ws ws += 4 v43 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v44))) l = v43 } - if !(v45 && v43 >= 0 && uint64(l) <= uint64(p)-i) { + if !(v45 && v43 >= 0 && Uint64FromInt32(l) <= Uint64FromInt32(p)-i) { break } goto _41 _41: ; - i += uint64(l) + i += Uint64FromInt32(l) } if l < 0 { return -int32(1) @@ -141612,27 +141610,27 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if i > uint64(INT_MAX) { goto overflow } - p = int32(i) - _pad3(tls, f, uint8(' '), w, p, int32(fl)) + p = Int32FromUint64(i) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl)) ws = *(*uintptr)(unsafe.Pointer(bp + 8)) i = uint64(0) for { - if v49 = i < uint64(0+uint32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { + if v49 = i < uint64(0+Uint32FromInt32(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { v48 = ws ws += 4 v47 = Xwctomb(tls, bp+48, *(*Twchar_t)(unsafe.Pointer(v48))) l = v47 } - if !(v49 && i+uint64(v47) <= uint64(p)) { + if !(v49 && i+Uint64FromInt32(v47) <= Uint64FromInt32(p)) { break } - _out(tls, f, bp+48, uint64(l)) + _out(tls, f, bp+48, Uint64FromInt32(l)) goto _46 _46: ; - i += uint64(l) + i += Uint64FromInt32(l) } - _pad3(tls, f, uint8(' '), w, p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > p { v50 = w } else { @@ -141659,7 +141657,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if xp != 0 && p < 0 { goto overflow } - l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, int32(fl), t) + l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, Int32FromUint32(fl), t) if l < 0 { goto overflow } @@ -141678,12 +141676,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w > int32(INT_MAX)-cnt { goto overflow } - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl)) - _out(tls, f, prefix, uint64(pl)) - _pad3(tls, f, uint8('0'), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl)) + _out(tls, f, prefix, Uint64FromInt32(pl)) + _pad3(tls, f, uint8('0'), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) _pad3(tls, f, uint8('0'), p, int32(int64(z)-int64(a)), 0) - _out(tls, f, a, uint64(int64(z)-int64(a))) - _pad3(tls, f, uint8(' '), w, pl+p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _out(tls, f, a, Uint64FromInt64(int64(z)-int64(a))) + _pad3(tls, f, uint8(' '), w, pl+p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 _1: @@ -141758,8 +141756,8 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v1 = 0 } __need_unlock = v1 - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) { saved_buf = (*TFILE)(unsafe.Pointer(f)).Fbuf (*TFILE)(unsafe.Pointer(f)).Fbuf = bp + 128 @@ -141791,7 +141789,7 @@ func Xvfprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -141814,13 +141812,13 @@ func _store_int(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -141887,14 +141885,14 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - v3 = int32(*(*uint8)(unsafe.Pointer(p))) - v4 = BoolInt32(v3 == int32(' ') || uint32(v3)-uint32('\t') < uint32(5)) + v3 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) + v4 = BoolInt32(v3 == int32(' ') || Uint32FromInt32(v3)-uint32('\t') < uint32(5)) goto _5 _5: if v4 != 0 { for { - v6 = int32(*(*uint8)(unsafe.Pointer(p + 1))) - v7 = BoolInt32(v6 == int32(' ') || uint32(v6)-uint32('\t') < uint32(5)) + v6 = Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) + v7 = BoolInt32(v6 == int32(' ') || Uint32FromInt32(v6)-uint32('\t') < uint32(5)) goto _8 _8: if !(v7 != 0) { @@ -141908,12 +141906,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v11 = f + 8 v10 = *(*uintptr)(unsafe.Pointer(v11)) *(*uintptr)(unsafe.Pointer(v11))++ - v9 = int32(*(*uint8)(unsafe.Pointer(v10))) + v9 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v10))) } else { v9 = X__shgetc(tls, f) } v12 = v9 - v13 = BoolInt32(v12 == int32(' ') || uint32(v12)-uint32('\t') < uint32(5)) + v13 = BoolInt32(v12 == int32(' ') || Uint32FromInt32(v12)-uint32('\t') < uint32(5)) goto _14 _14: if !(v13 != 0) { @@ -141926,23 +141924,23 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { pos += (*TFILE)(unsafe.Pointer(f)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(f)).Frpos) - int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) goto _2 } - if int32(*(*uint8)(unsafe.Pointer(p))) != int32('%') || int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32('%') || Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('%') { X__shlim(tls, f, int64(Int32FromInt32(0))) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('%') { p++ for { if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Fshend { v19 = f + 8 v18 = *(*uintptr)(unsafe.Pointer(v19)) *(*uintptr)(unsafe.Pointer(v19))++ - v17 = int32(*(*uint8)(unsafe.Pointer(v18))) + v17 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v18))) } else { v17 = X__shgetc(tls, f) } v16 = v17 c = v16 v20 = v16 - v21 = BoolInt32(v20 == int32(' ') || uint32(v20)-uint32('\t') < uint32(5)) + v21 = BoolInt32(v20 == int32(' ') || Uint32FromInt32(v20)-uint32('\t') < uint32(5)) goto _22 _22: if !(v21 != 0) { @@ -141954,13 +141952,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ - v23 = int32(*(*uint8)(unsafe.Pointer(v24))) + v23 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v24))) } else { v23 = X__shgetc(tls, f) } c = v23 } - if c != int32(*(*uint8)(unsafe.Pointer(p))) { + if c != Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) { if (*TFILE)(unsafe.Pointer(f)).Fshlim >= 0 { (*TFILE)(unsafe.Pointer(f)).Frpos-- } @@ -141973,12 +141971,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto _2 } p++ - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('*') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('*') { dest = uintptr(0) p++ } else { - if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { - dest = _arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) + if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) == int32('$') { + dest = _arg_n(tls, ap, Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))-int32('0'))) p += uintptr(2) } else { dest = VaUintptr(&ap) @@ -141989,13 +141987,13 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !(BoolInt32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } - width = int32(10)*width + int32(*(*uint8)(unsafe.Pointer(p))) - int32('0') + width = int32(10)*width + Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) - int32('0') goto _27 _27: ; p++ } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('m') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('m') { wcs = uintptr(0) s = uintptr(0) alloc = BoolInt32(!!(dest != 0)) @@ -142006,16 +142004,16 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { size = SIZE_def v28 = p p++ - switch int32(*(*uint8)(unsafe.Pointer(v28))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v28))) { case int32('h'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('h') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('h') { p++ size = -Int32FromInt32(2) } else { size = -int32(1) } case int32('l'): - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('l') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('l') { p++ size = Int32FromInt32(SIZE_ll) } else { @@ -142074,7 +142072,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { default: goto fmt_fail } - t = int32(*(*uint8)(unsafe.Pointer(p))) + t = Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) /* C or S */ if t&int32(0x2f) == int32(3) { t |= int32(32) @@ -142088,7 +142086,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { fallthrough case int32('['): case int32('n'): - _store_int(tls, dest, size, uint64(pos)) + _store_int(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 default: @@ -142098,12 +142096,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v31 = f + 8 v30 = *(*uintptr)(unsafe.Pointer(v31)) *(*uintptr)(unsafe.Pointer(v31))++ - v29 = int32(*(*uint8)(unsafe.Pointer(v30))) + v29 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v30))) } else { v29 = X__shgetc(tls, f) } v32 = v29 - v33 = BoolInt32(v32 == int32(' ') || uint32(v32)-uint32('\t') < uint32(5)) + v33 = BoolInt32(v32 == int32(' ') || Uint32FromInt32(v32)-uint32('\t') < uint32(5)) goto _34 _34: if !(v33 != 0) { @@ -142120,7 +142118,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v38 = f + 8 v37 = *(*uintptr)(unsafe.Pointer(v38)) *(*uintptr)(unsafe.Pointer(v38))++ - v36 = int32(*(*uint8)(unsafe.Pointer(v37))) + v36 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v37))) } else { v36 = X__shgetc(tls, f) } @@ -142189,7 +142187,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { p++ v59 = p - if int32(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v59))) == int32('^') { p++ invert = Int32FromInt32(1) } else { @@ -142197,38 +142195,38 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } Xmemset(tls, bp+16, invert, uint64(257)) (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[0] = uint8(0) - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8('-')] = Uint8FromInt32(Int32FromInt32(1) - invert) } else { - if int32(*(*uint8)(unsafe.Pointer(p))) == int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32(']') { p++ - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = uint8(Int32FromInt32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[Int32FromInt32(1)+Int32FromUint8(']')] = Uint8FromInt32(Int32FromInt32(1) - invert) } } for { - if !(int32(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) != int32(']')) { break } if !(*(*uint8)(unsafe.Pointer(p)) != 0) { goto fmt_fail } - if int32(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(p))) == int32('-') && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(p + 1))) != int32(']') { v62 = p p++ - c = int32(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(v62 + uintptr(-Int32FromInt32(1))))) for { - if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + if !(c < Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))) { break } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+c] = Uint8FromInt32(int32(1) - invert) goto _61 _61: ; c++ } } - (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+int32(*(*uint8)(unsafe.Pointer(p)))] = uint8(int32(1) - invert) + (*(*[257]uint8)(unsafe.Pointer(bp + 16)))[int32(1)+Int32FromUint8(*(*uint8)(unsafe.Pointer(p)))] = Uint8FromInt32(int32(1) - invert) goto _60 _60: ; @@ -142239,7 +142237,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { s = uintptr(0) i = uint64(0) if t == int32('c') { - v63 = uint32(width) + uint32(1) + v63 = Uint32FromInt32(width) + uint32(1) } else { v63 = uint32(31) } @@ -142259,7 +142257,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v67 = f + 8 v66 = *(*uintptr)(unsafe.Pointer(v67)) *(*uintptr)(unsafe.Pointer(v67))++ - v65 = int32(*(*uint8)(unsafe.Pointer(v66))) + v65 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v66))) } else { v65 = X__shgetc(tls, f) } @@ -142268,11 +142266,11 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !((*(*[257]uint8)(unsafe.Pointer(bp + 16)))[v64+int32(1)] != 0) { break } - *(*uint8)(unsafe.Pointer(bp)) = uint8(c) + *(*uint8)(unsafe.Pointer(bp)) = Uint8FromInt32(c) switch Xmbrtowc(tls, bp+276, bp, uint64(1), bp+8) { - case uint64(-Int32FromInt32(1)): + case Uint64FromInt32(-Int32FromInt32(1)): goto input_fail - case uint64(-Int32FromInt32(2)): + case Uint64FromInt32(-Int32FromInt32(2)): continue } if wcs != 0 { @@ -142303,7 +142301,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v72 = f + 8 v71 = *(*uintptr)(unsafe.Pointer(v72)) *(*uintptr)(unsafe.Pointer(v72))++ - v70 = int32(*(*uint8)(unsafe.Pointer(v71))) + v70 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v71))) } else { v70 = X__shgetc(tls, f) } @@ -142314,7 +142312,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v73 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v73))) = Uint8FromInt32(c) if i == k { k += k + uint64(1) tmp1 = Xrealloc(tls, s, k) @@ -142333,7 +142331,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v78 = f + 8 v77 = *(*uintptr)(unsafe.Pointer(v78)) *(*uintptr)(unsafe.Pointer(v78))++ - v76 = int32(*(*uint8)(unsafe.Pointer(v77))) + v76 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v77))) } else { v76 = X__shgetc(tls, f) } @@ -142344,7 +142342,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v79 = i i++ - *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + uintptr(v79))) = Uint8FromInt32(c) } } else { for { @@ -142352,7 +142350,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v83 = f + 8 v82 = *(*uintptr)(unsafe.Pointer(v83)) *(*uintptr)(unsafe.Pointer(v83))++ - v81 = int32(*(*uint8)(unsafe.Pointer(v82))) + v81 = Int32FromUint8(*(*uint8)(unsafe.Pointer(v82))) } else { v81 = X__shgetc(tls, f) } @@ -142414,7 +142412,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { goto int_common int_common: ; - x = X__intscan(tls, f, uint32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) + x = X__intscan(tls, f, Uint32FromInt32(base), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) if !((*TFILE)(unsafe.Pointer(f)).Fshcnt+(int64((*TFILE)(unsafe.Pointer(f)).Frpos)-int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) != 0) { goto match_fail } @@ -142619,33 +142617,33 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_PTR): *(*uintptr)(unsafe.Pointer(arg)) = VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_INT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UINT): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint32(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_LONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_ULONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_ULLONG): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_SHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_USHORT): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint16FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_CHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt8(int8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_UCHAR): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(uint8(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) + (*Targ)(unsafe.Pointer(arg)).Fi = uint64(Uint8FromInt32(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap))))) case int32(_LLONG): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_SIZET): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_IMAX): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UMAX): (*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_PDIFF): - (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) + (*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt64(VaInt64(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): @@ -142674,7 +142672,7 @@ func _out1(tls *TLS, f uintptr, s uintptr, l Tsize_t) { func _pad4(tls *TLS, f uintptr, n int32, fl int32) { bp := tls.Alloc(32) defer tls.Free(32) - if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { + if Uint32FromInt32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { return } Xfprintf(tls, f, __ccgo_ts+1664, VaList(bp+8, n, __ccgo_ts)) @@ -142685,10 +142683,10 @@ func _getint1(tls *TLS, s uintptr) (r int32) { _ = i i = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if Uint32FromInt32(i) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { i = -int32(1) } else { i = int32(10)*i + (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))) - int32('0')) @@ -142770,12 +142768,12 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } l = int32((int64(z) - int64(a)) / 4) if f != 0 { - _out1(tls, f, a, uint64(l)) + _out1(tls, f, a, Uint64FromInt32(l)) } if l != 0 { goto _1 } - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) argpos = *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) - int32('0') *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 @@ -142786,7 +142784,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Read modifier flags */ fl = uint32(0) for { - if !(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { + if !(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32(' ') < uint32(32) && (Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('\'')-Int32FromUint8(' ')))&(uint32(1)<<(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))-int32(' '))) != 0) { break } fl |= uint32(1) << (*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) - int32(' ')) @@ -142797,10 +142795,10 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read field width */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)) == int32('$') { l10n = uint32(1) *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*4)) = int32(_INT) - w = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) + w = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(3) * 4 } else { if !(l10n != 0) { @@ -142828,9 +142826,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } /* Read precision */ if *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) == int32('.') && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 1*4)) == int32('*') { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 3*4)) == int32('$') { *(*int32)(unsafe.Pointer(nl_type + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*4)) = int32(_INT) - p = int32(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) + p = Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(nl_arg + uintptr(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 2*4))-int32('0'))*8))) *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(4) * 4 } else { if !(l10n != 0) { @@ -142859,7 +142857,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, /* Format specifier state machine */ st = uint32(0) for cond := true; cond; cond = st-uint32(1) < uint32(_STOP) { - if uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > uint32(Int32FromUint8('z')-Int32FromUint8('A')) { + if Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))-uint32('A') > Uint32FromInt32(Int32FromUint8('z')-Int32FromUint8('A')) { goto inval } ps = st @@ -142877,11 +142875,11 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } } else { if argpos >= 0 { - *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = Int32FromUint32(st) *(*Targ)(unsafe.Pointer(bp + 16)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } else { if f != 0 { - _pop_arg1(tls, bp+16, int32(st), ap) + _pop_arg1(tls, bp+16, Int32FromUint32(st), ap) } else { return 0 } @@ -142908,13 +142906,13 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_LLPRE): *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint16(cnt) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint16FromInt32(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint8(cnt) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint8FromInt32(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = Uint64FromInt32(cnt) break } goto _1 @@ -142924,15 +142922,15 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < int32(1) { w = int32(1) } - _pad4(tls, f, w-int32(1), int32(fl)) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl)) if t == int32('C') { v9 = *(*Tuintmax_t)(unsafe.Pointer(bp + 16)) } else { - v9 = uint64(Xbtowc(tls, int32(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) + v9 = uint64(Xbtowc(tls, Int32FromUint64(*(*Tuintmax_t)(unsafe.Pointer(bp + 16))))) } - *(*Twchar_t)(unsafe.Pointer(bp)) = int32(v9) + *(*Twchar_t)(unsafe.Pointer(bp)) = Int32FromUint64(v9) _out1(tls, f, bp, uint64(1)) - _pad4(tls, f, w-int32(1), int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-int32(1), Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('S'): @@ -142942,7 +142940,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, } else { v10 = p } - z = a + uintptr(Xwcsnlen(tls, a, uint64(v10)))*4 + z = a + uintptr(Xwcsnlen(tls, a, Uint64FromInt32(v10)))*4 if p < 0 && *(*Twchar_t)(unsafe.Pointer(z)) != 0 { goto overflow } @@ -142950,9 +142948,9 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) - _out1(tls, f, a, uint64(p)) - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl)) + _out1(tls, f, a, Uint64FromInt32(p)) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 case int32('m'): @@ -142995,7 +142993,7 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if w < p { w = p } - _pad4(tls, f, w-p, int32(fl)) + _pad4(tls, f, w-p, Int32FromUint32(fl)) bs = *(*uintptr)(unsafe.Pointer(bp + 16)) for { v16 = l @@ -143007,14 +143005,14 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, bs += uintptr(i) _out1(tls, f, bp+40, uint64(1)) } - _pad4(tls, f, w-p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad4(tls, f, w-p, Int32FromUint32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) l = w goto _1 } if xp != 0 && p < 0 { goto overflow } - Xsnprintf(tls, bp+24, uint64(16), __ccgo_ts+1668, VaList(bp+56, __ccgo_ts+1688+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1690+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1692+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+702+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1694+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), int32(_sizeprefix[t|int32(32)-int32('a')]), t)) + Xsnprintf(tls, bp+24, uint64(16), __ccgo_ts+1668, VaList(bp+56, __ccgo_ts+1688+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1690+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1692+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0)), __ccgo_ts+702+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0)), __ccgo_ts+1694+BoolUintptr(!(fl&(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0)), Int32FromUint8(_sizeprefix[t|int32(32)-int32('a')]), t)) switch t | Int32FromInt32(32) { case int32('a'): fallthrough @@ -143109,13 +143107,13 @@ func Xvfwprintf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } __need_unlock = v1 Xfwide(tls, f, int32(1)) - olderr = int32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) - *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_ERR)) + olderr = Int32FromUint32((*TFILE)(unsafe.Pointer(f)).Fflags & uint32(F_ERR)) + *(*uint32)(unsafe.Pointer(f)) &= Uint32FromInt32(^Int32FromInt32(F_ERR)) ret = _wprintf_core(tls, f, fmt, bp, bp+48, bp+8) if (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { ret = -int32(1) } - *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) + *(*uint32)(unsafe.Pointer(f)) |= Uint32FromInt32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -143131,13 +143129,13 @@ func _store_int1(tls *TLS, dest uintptr, size int32, i uint64) { case -int32(2): *(*uint8)(unsafe.Pointer(dest)) = uint8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(i) + *(*int16)(unsafe.Pointer(dest)) = Int16FromUint64(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(i) + *(*int32)(unsafe.Pointer(dest)) = Int32FromUint64(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(i) + *(*int64)(unsafe.Pointer(dest)) = Int64FromUint64(i) break } } @@ -143245,12 +143243,12 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { break } alloc = 0 - if Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { + if Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p + 1*4)))) != 0 { p += 4 } for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v6 = f + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) *(*uintptr)(unsafe.Pointer(v6))++ @@ -143258,20 +143256,20 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v4 = Xgetwc(tls, f) } - v3 = int32(v4) + v3 = Int32FromUint32(v4) c = v3 - if !(Xiswspace(tls, uint32(v3)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v3)) != 0) { break } pos++ } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) _ = *(*uint8)(unsafe.Pointer(v8)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } goto _2 } @@ -143279,7 +143277,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if *(*Twchar_t)(unsafe.Pointer(p)) == int32('%') { p += 4 for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v13 = f + 8 v12 = *(*uintptr)(unsafe.Pointer(v13)) *(*uintptr)(unsafe.Pointer(v13))++ @@ -143287,15 +143285,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v11 = Xgetwc(tls, f) } - v10 = int32(v11) + v10 = Int32FromUint32(v11) c = v10 - if !(Xiswspace(tls, uint32(v10)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v10)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v16 = f + 8 v15 = *(*uintptr)(unsafe.Pointer(v16)) *(*uintptr)(unsafe.Pointer(v16))++ @@ -143303,16 +143301,16 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v14 = Xgetwc(tls, f) } - c = int32(v14) + c = Int32FromUint32(v14) } if c != *(*Twchar_t)(unsafe.Pointer(p)) { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v19 = f + 8 *(*uintptr)(unsafe.Pointer(v19))-- v18 = *(*uintptr)(unsafe.Pointer(v19)) _ = *(*uint8)(unsafe.Pointer(v18)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if c < 0 { goto input_fail @@ -143327,8 +143325,8 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { dest = uintptr(0) p += 4 } else { - if BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { - dest = _arg_n1(tls, ap, uint32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) + if BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0 && *(*Twchar_t)(unsafe.Pointer(p + 1*4)) == int32('$') { + dest = _arg_n1(tls, ap, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p))-int32('0'))) p += uintptr(2) * 4 } else { dest = VaUintptr(&ap) @@ -143336,7 +143334,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } width = 0 for { - if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) != 0) { break } width = int32(10)*width + *(*Twchar_t)(unsafe.Pointer(p)) - int32('0') @@ -143433,7 +143431,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if t != int32('n') { if t != int32('[') && t|int32(32) != int32('c') { for { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v25 = f + 8 v24 = *(*uintptr)(unsafe.Pointer(v25)) *(*uintptr)(unsafe.Pointer(v25))++ @@ -143441,15 +143439,15 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v23 = Xgetwc(tls, f) } - v22 = int32(v23) + v22 = Int32FromUint32(v23) c = v22 - if !(Xiswspace(tls, uint32(v22)) != 0) { + if !(Xiswspace(tls, Uint32FromInt32(v22)) != 0) { break } pos++ } } else { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v28 = f + 8 v27 = *(*uintptr)(unsafe.Pointer(v28)) *(*uintptr)(unsafe.Pointer(v28))++ @@ -143457,23 +143455,23 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v26 = Xgetwc(tls, f) } - c = int32(v26) + c = Int32FromUint32(v26) } if c < 0 { goto input_fail } - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v31 = f + 8 *(*uintptr)(unsafe.Pointer(v31))-- v30 = *(*uintptr)(unsafe.Pointer(v31)) _ = *(*uint8)(unsafe.Pointer(v30)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } } switch t { case int32('n'): - _store_int1(tls, dest, size, uint64(pos)) + _store_int1(tls, dest, size, Uint64FromInt64(pos)) /* do not increment match count, etc! */ goto _2 case int32('s'): @@ -143531,7 +143529,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { i = uint64(0) if alloc != 0 { if t == int32('c') { - v35 = uint32(width) + uint32(1) + v35 = Uint32FromInt32(width) + uint32(1) } else { v35 = uint32(31) } @@ -143549,7 +143547,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } } for width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && int32(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frpos != (*TFILE)(unsafe.Pointer(f)).Frend && Int32FromUint8(*(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos))) < int32(128) { v39 = f + 8 v38 = *(*uintptr)(unsafe.Pointer(v39)) *(*uintptr)(unsafe.Pointer(v39))++ @@ -143557,7 +143555,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } else { v37 = Xgetwc(tls, f) } - v36 = int32(v37) + v36 = Int32FromUint32(v37) c = v36 if v36 < 0 { break @@ -143588,7 +143586,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if l < 0 { goto input_fail } - i += uint64(l) + i += Uint64FromInt32(l) if alloc != 0 && i > k-uint64(4) { k += k + uint64(1) tmp2 = Xrealloc(tls, s, k) @@ -143604,13 +143602,13 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { gotmatch = int32(1) } if width != 0 { - if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && uint32(c) < uint32(128) { + if (*TFILE)(unsafe.Pointer(f)).Frend != 0 && Uint32FromInt32(c) < uint32(128) { v44 = f + 8 *(*uintptr)(unsafe.Pointer(v44))-- v43 = *(*uintptr)(unsafe.Pointer(v44)) _ = *(*uint8)(unsafe.Pointer(v43)) } else { - Xungetwc(tls, uint32(c), f) + Xungetwc(tls, Uint32FromInt32(c), f) } if t == int32('c') || !(gotmatch != 0) { goto match_fail @@ -143795,10 +143793,10 @@ func _sn_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { var v1, v2 uint64 _, _, _, _, _ = c, k, v1, v2, v3 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if (*Tcookie3)(unsafe.Pointer(c)).Fn < uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { + if (*Tcookie3)(unsafe.Pointer(c)).Fn < Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) { v1 = (*Tcookie3)(unsafe.Pointer(c)).Fn } else { - v1 = uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) + v1 = Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos) - int64((*TFILE)(unsafe.Pointer(f)).Fwbase)) } k = v1 if k != 0 { @@ -143889,7 +143887,7 @@ func _string_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { k = len1 + uint64(256) end = Xmemchr(tls, src, 0, k) if end != 0 { - k = uint64(int64(end) - int64(src)) + k = Uint64FromInt64(int64(end) - int64(src)) } if k < len1 { len1 = k @@ -143940,8 +143938,8 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { l0 = l i = 0 c = (*TFILE)(unsafe.Pointer(f)).Fcookie - if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, uint64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == uint64(-Int32FromInt32(1)) { - return uint64(-Int32FromInt32(1)) + if s != (*TFILE)(unsafe.Pointer(f)).Fwbase && _sw_write(tls, f, (*TFILE)(unsafe.Pointer(f)).Fwbase, Uint64FromInt64(int64((*TFILE)(unsafe.Pointer(f)).Fwpos)-int64((*TFILE)(unsafe.Pointer(f)).Fwbase))) == Uint64FromInt32(-Int32FromInt32(1)) { + return Uint64FromInt32(-Int32FromInt32(1)) } for { if v2 = (*Tcookie4)(unsafe.Pointer(c)).Fl != 0 && l != 0; v2 { @@ -143955,7 +143953,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { i = int32(1) } s += uintptr(i) - l -= uint64(i) + l -= Uint64FromInt32(i) (*Tcookie4)(unsafe.Pointer(c)).Fl-- (*Tcookie4)(unsafe.Pointer(c)).Fws += 4 } @@ -143967,7 +143965,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { (*TFILE)(unsafe.Pointer(f)).Fwbase = v3 (*TFILE)(unsafe.Pointer(f)).Fwpos = v3 *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) - return uint64(i) + return Uint64FromInt32(i) } (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -144005,7 +144003,7 @@ func Xvswprintf(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, ap Tva_list) (r1 in } r = Xvfwprintf(tls, bp+272, fmt, ap) _sw_write(tls, bp+272, uintptr(0), uint64(0)) - if uint64(r) >= n { + if Uint64FromInt32(r) >= n { v1 = -int32(1) } else { v1 = r @@ -144025,7 +144023,7 @@ func _wstring_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { return uint64(0) } k = Xwcsrtombs(tls, (*TFILE)(unsafe.Pointer(f)).Fbuf, bp, (*TFILE)(unsafe.Pointer(f)).Fbuf_size, uintptr(0)) - if k == uint64(-Int32FromInt32(1)) { + if k == Uint64FromInt32(-Int32FromInt32(1)) { v1 = UintptrFromInt32(0) (*TFILE)(unsafe.Pointer(f)).Frend = v1 (*TFILE)(unsafe.Pointer(f)).Frpos = v1 @@ -144165,8 +144163,8 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144174,7 +144172,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -144185,7 +144183,7 @@ func Xatoi(tls *TLS, s uintptr) (r int32) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int32(10)*n - (int32(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) + n = int32(10)*n - (Int32FromUint8(*(*uint8)(unsafe.Pointer(v4))) - int32('0')) } if neg != 0 { v5 = n @@ -144207,8 +144205,8 @@ func Xatol(tls *TLS, s uintptr) (r int64) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144216,7 +144214,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -144227,7 +144225,7 @@ func Xatol(tls *TLS, s uintptr) (r int64) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int64(10)*n - int64(int32(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) + n = int64(10)*n - int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -144249,8 +144247,8 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { n = 0 neg = 0 for { - v1 = int32(*(*uint8)(unsafe.Pointer(s))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if !(v2 != 0) { @@ -144258,7 +144256,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { } s++ } - switch int32(*(*uint8)(unsafe.Pointer(s))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) { case int32('-'): neg = int32(1) fallthrough @@ -144269,7 +144267,7 @@ func Xatoll(tls *TLS, s uintptr) (r int64) { for BoolInt32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) != 0 { v4 = s s++ - n = int64(10)*n - int64(int32(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) + n = int64(10)*n - int64(Int32FromUint8(*(*uint8)(unsafe.Pointer(v4)))-Int32FromUint8('0')) } if neg != 0 { v5 = n @@ -144325,16 +144323,16 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, j, v1, v3 int32 var _ /* tmp at bp+0 */ [32]uint8 _, _, _, _ = i, j, v1, v3 - if uint32(n)-uint32(1) > uint32(15) { + if Uint32FromInt32(n)-uint32(1) > uint32(15) { n = int32(15) } Xsprintf(tls, bp, __ccgo_ts+1721, VaList(bp+40, n-int32(1), x)) - v1 = BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) + v1 = BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[0]) == Int32FromUint8('-')) *(*int32)(unsafe.Pointer(sign)) = v1 i = v1 j = 0 for { - if !(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { + if !(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[i]) != int32('e')) { break } _buf8[j] = (*(*[32]uint8)(unsafe.Pointer(bp)))[i] @@ -144343,7 +144341,7 @@ func Xecvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { ; v3 = i i++ - j += BoolInt32(int32((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) + j += BoolInt32(Int32FromUint8((*(*[32]uint8)(unsafe.Pointer(bp)))[v3]) != int32('.')) } _buf8[j] = uint8(0) *(*int32)(unsafe.Pointer(dp)) = Xatoi(tls, bp+uintptr(i)+uintptr(1)) + int32(1) @@ -144362,20 +144360,20 @@ func Xfcvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { var i, lz int32 var _ /* tmp at bp+0 */ [1500]uint8 _, _ = i, lz - if uint32(n) > uint32(1400) { + if Uint32FromInt32(n) > uint32(1400) { n = int32(1400) } Xsprintf(tls, bp, __ccgo_ts+1726, VaList(bp+1512, n, x)) - i = BoolInt32(int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) - if int32((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { - lz = int32(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1694)) + i = BoolInt32(Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[0]) == int32('-')) + if Int32FromUint8((*(*[1500]uint8)(unsafe.Pointer(bp)))[i]) == int32('0') { + lz = Int32FromUint64(Xstrspn(tls, bp+uintptr(i)+uintptr(2), __ccgo_ts+1694)) } else { - lz = -int32(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+598)) + lz = -Int32FromUint64(Xstrcspn(tls, bp+uintptr(i), __ccgo_ts+598)) } if n <= lz { *(*int32)(unsafe.Pointer(sign)) = i *(*int32)(unsafe.Pointer(dp)) = int32(1) - if uint32(n) > uint32(14) { + if Uint32FromInt32(n) > uint32(14) { n = int32(14) } return __ccgo_ts + 1731 + UintptrFromInt32(14) - uintptr(n) @@ -144489,10 +144487,10 @@ _3: v6 = _a_ctz_64(tls, v5) goto _7 _7: - v4 = int32(Uint64FromInt32(8)*Uint64FromInt64(8) + uint64(v6)) + v4 = Int32FromUint64(Uint64FromInt32(8)*Uint64FromInt64(8) + Uint64FromInt32(v6)) r = v4 } - if v8 || uint64(v4) != Uint64FromInt32(8)*Uint64FromInt64(8) { + if v8 || Uint64FromInt32(v4) != Uint64FromInt32(8)*Uint64FromInt64(8) { return r } return 0 @@ -144538,25 +144536,25 @@ func _cycle(tls *TLS, width Tsize_t, ar uintptr, n int32) { // // /* shl() and shr() need n > 0 */ func _shl(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = *(*Tsize_t)(unsafe.Pointer(p)) *(*Tsize_t)(unsafe.Pointer(p)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p)) <<= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) <<= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p)) <<= Uint64FromInt32(n) } func _shr(tls *TLS, p uintptr, n int32) { - if uint64(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if Uint64FromInt32(n) >= Uint64FromInt32(8)*Uint64FromInt64(8) { n = int32(uint64(n) - Uint64FromInt32(8)*Uint64FromInt64(8)) *(*Tsize_t)(unsafe.Pointer(p)) = *(*Tsize_t)(unsafe.Pointer(p + 1*8)) *(*Tsize_t)(unsafe.Pointer(p + 1*8)) = uint64(0) } - *(*Tsize_t)(unsafe.Pointer(p)) >>= uint64(n) - *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= uint64(n) + *(*Tsize_t)(unsafe.Pointer(p)) >>= Uint64FromInt32(n) + *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - Uint64FromInt32(n)) + *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= Uint64FromInt32(n) } func _sift(tls *TLS, head uintptr, width Tsize_t, cmp Tcmpfun, arg uintptr, pshift int32, lp uintptr) { @@ -144674,7 +144672,7 @@ func X__qsort_r(tls *TLS, base uintptr, nel Tsize_t, width Tsize_t, cmp Tcmpfun, _shr(tls, bp+768, int32(2)) pshift += int32(2) } else { - if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= uint64(int64(high)-int64(head)) { + if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= Uint64FromInt64(int64(high)-int64(head)) { _trinkle(tls, head, width, cmp, arg, bp+768, pshift, 0, bp) } else { _sift(tls, head, width, cmp, arg, pshift, bp) @@ -144791,9 +144789,9 @@ func _strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*TFILE)(unsafe.Pointer(bp)).Fbuf = v1 (*TFILE)(unsafe.Pointer(bp)).Frend = uintptr(-Int32FromInt32(1)) X__shlim(tls, bp, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp, uint32(base), int32(1), lim) + y = X__intscan(tls, bp, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp)).Fbuf))) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -144812,7 +144810,7 @@ func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -144828,7 +144826,7 @@ func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144918,7 +144916,7 @@ func _do_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -144957,14 +144955,14 @@ func _wcstox(tls *TLS, s uintptr, p uintptr, prec int32) (r float64) { (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) y = X__floatscan(tls, bp+64, prec, int32(1)) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -145022,7 +145020,7 @@ func _do_read1(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { } else { v2 = int32('@') } - *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = uint8(v2) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr(i))) = Uint8FromInt32(v2) goto _1 _1: ; @@ -145061,14 +145059,14 @@ func _wcstox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) (r uint64) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fbuf_size = Uint64FromInt64(64) - Uint64FromInt32(4) AtomicStorePInt32(bp+64+140, -int32(1)) (*(*TFILE)(unsafe.Pointer(bp + 64))).Fread = __ccgo_fp(_do_read1) - for Xiswspace(tls, uint32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { + for Xiswspace(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(t)))) != 0 { t += 4 } (*(*TFILE)(unsafe.Pointer(bp + 64))).Fcookie = t X__shlim(tls, bp+64, int64(Int32FromInt32(0))) - y = X__intscan(tls, bp+64, uint32(base), int32(1), lim) + y = X__intscan(tls, bp+64, Uint32FromInt32(base), int32(1), lim) if p != 0 { - cnt = uint64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) + cnt = Uint64FromInt64((*TFILE)(unsafe.Pointer(bp+64)).Fshcnt + (int64((*TFILE)(unsafe.Pointer(bp+64)).Frpos) - int64((*TFILE)(unsafe.Pointer(bp+64)).Fbuf))) if cnt != 0 { v3 = t + uintptr(cnt)*4 } else { @@ -145092,7 +145090,7 @@ func Xwcstoll(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { @@ -145108,7 +145106,7 @@ func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) + return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -145189,14 +145187,14 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt _, _, _, _, _, _, _, _, _ = d, k, s, wd, ws, v2, v3, v6, v7 d = dest s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(d)&(Uint64FromInt64(8)-Uint64FromInt32(1)) { for { if v3 = uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v2 } - if !(v3 && int32(v2) != c) { + if !(v3 && Int32FromUint8(v2) != c) { break } goto _1 @@ -145209,11 +145207,11 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 { goto tail } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(ws))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -145232,7 +145230,7 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt v6 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v6 } - if !(v7 && int32(v6) != c) { + if !(v7 && Int32FromUint8(v6) != c) { break } goto _5 @@ -145271,9 +145269,9 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { var s, w, v4 uintptr _, _, _, _ = k, s, w, v4 s = src - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { - if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _1 @@ -145282,11 +145280,11 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s++ n-- } - if n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c { - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + if n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c { + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= Uint64FromInt64(8) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -145298,7 +145296,7 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { s = w } for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -145326,7 +145324,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { l = vl r = vr for { - if !(n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _1 @@ -145337,7 +145335,7 @@ func Xmemcmp(tls *TLS, vl uintptr, vr uintptr, n Tsize_t) (r1 int32) { r++ } if n != 0 { - v2 = int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + v2 = Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } else { v2 = 0 } @@ -145699,15 +145697,15 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145842,13 +145840,13 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -145856,7 +145854,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -145891,7 +145889,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Search loop */ for { /* If remainder of haystack is shorter than needle, done */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } /* Check last byte first; advance by shift on mismatch */ @@ -145918,7 +145916,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin } k = v11 for { - if !(k < l && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(k < l && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -145934,7 +145932,7 @@ func _twoway_memmem(tls *TLS, h uintptr, z uintptr, n uintptr, l Tsize_t) (r uin /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -145971,11 +145969,11 @@ func Xmemmem(tls *TLS, h0 uintptr, k Tsize_t, n0 uintptr, l Tsize_t) (r uintptr) return uintptr(0) } /* Use faster algorithms for short needles */ - h = Xmemchr(tls, h0, int32(*(*uint8)(unsafe.Pointer(n))), k) + h = Xmemchr(tls, h0, Int32FromUint8(*(*uint8)(unsafe.Pointer(n))), k) if !(h != 0) || l == uint64(1) { return h } - k -= uint64(int64(h) - int64(h0)) + k -= Uint64FromInt64(int64(h) - int64(h0)) if k < l { return uintptr(0) } @@ -146008,7 +146006,7 @@ func Xmemmove(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { if d == s { return d } - if uint64(s)-uint64(d)-n <= uint64(-Int32FromInt32(2))*n { + if uint64(s)-uint64(d)-n <= Uint64FromInt32(-Int32FromInt32(2))*n { return Xmemcpy(tls, d, s, n) } if d < s { @@ -146092,14 +146090,14 @@ func X__memrchr(tls *TLS, m uintptr, c int32, n Tsize_t) (r uintptr) { var v1 Tsize_t _, _ = s, v1 s = m - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) for { v1 = n n-- if !(v1 != 0) { break } - if int32(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s + uintptr(n)))) == c { return s + uintptr(n) } } @@ -146131,20 +146129,20 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { if !(n != 0) { return dest } - *(*uint8)(unsafe.Pointer(s)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(1)))) = Uint8FromInt32(c) if n <= uint64(2) { return dest } - *(*uint8)(unsafe.Pointer(s + 1)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + 2)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 1)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + 2)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(2)))) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(3)))) = Uint8FromInt32(c) if n <= uint64(6) { return dest } - *(*uint8)(unsafe.Pointer(s + 3)) = uint8(c) - *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = uint8(c) + *(*uint8)(unsafe.Pointer(s + 3)) = Uint8FromInt32(c) + *(*uint8)(unsafe.Pointer(s + uintptr(n-uint64(4)))) = Uint8FromInt32(c) if n <= uint64(8) { return dest } @@ -146155,8 +146153,8 @@ func Xmemset(tls *TLS, dest uintptr, c int32, n Tsize_t) (r uintptr) { k = -uint64(s) & uint64(3) s += uintptr(k) n -= k - n &= uint64(-Int32FromInt32(4)) - c32 = uint32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(uint8(c)) + n &= Uint64FromInt32(-Int32FromInt32(4)) + c32 = Uint32FromInt32(-Int32FromInt32(1)) / Uint32FromInt32(255) * uint32(Uint8FromInt32(c)) /* In preparation to copy 32 bytes at a time, aligned on * an 8-byte bounary, fill head/tail up to 28 bytes each. * As in the initial byte-based head/tail fill, each @@ -146255,7 +146253,7 @@ func X__stpcpy(tls *TLS, d uintptr, s uintptr) (r uintptr) { wd = d ws = s for { - if !!((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _3 @@ -146344,7 +146342,7 @@ func X__stpncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*uint64)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -146407,7 +146405,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l = _l r = _r for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _1 @@ -146416,7 +146414,7 @@ func Xstrcasecmp(tls *TLS, _l uintptr, _r uintptr) (r1 int32) { l++ r++ } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strcasecmp_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) { @@ -146475,7 +146473,7 @@ func Xstrchr(tls *TLS, s uintptr, c int32) (r1 uintptr) { var r, v1 uintptr _, _ = r, v1 r = X__strchrnul(tls, s, c) - if int32(*(*uint8)(unsafe.Pointer(r))) == int32(uint8(c)) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) == Int32FromUint8(Uint8FromInt32(c)) { v1 = r } else { v1 = uintptr(0) @@ -146502,7 +146500,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { var k Tsize_t var w uintptr _, _ = k, w - c = int32(uint8(c)) + c = Int32FromUint8(Uint8FromInt32(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } @@ -146510,7 +146508,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { if !(uint64(s)%Uint64FromInt64(8) != 0) { break } - if !(*(*uint8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { + if !(*(*uint8)(unsafe.Pointer(s)) != 0) || Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == c { return s } goto _1 @@ -146518,10 +146516,10 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { ; s++ } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) + k = Uint64FromInt32(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * Uint64FromInt32(c) w = s for { - if !(!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } goto _2 @@ -146531,7 +146529,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { } s = w for { - if !(*(*uint8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { + if !(*(*uint8)(unsafe.Pointer(s)) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _3 @@ -146565,7 +146563,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { defer func() { trc("-> %v", r1) }() } for { - if !(int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) && *(*uint8)(unsafe.Pointer(l)) != 0) { break } goto _1 @@ -146574,7 +146572,7 @@ func Xstrcmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { l++ r++ } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrcpy(tls *TLS, dest uintptr, src uintptr) (r uintptr) { @@ -146599,7 +146597,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { _, _, _ = a, v3, p2 a = s if !(*(*uint8)(unsafe.Pointer(c)) != 0) || !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { - return uint64(int64(X__strchrnul(tls, s, int32(*(*uint8)(unsafe.Pointer(c))))) - int64(a)) + return Uint64FromInt64(int64(X__strchrnul(tls, s, Int32FromUint8(*(*uint8)(unsafe.Pointer(c))))) - int64(a)) } Xmemset(tls, bp, 0, uint64(32)) for { @@ -146624,7 +146622,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrdup(tls *TLS, s uintptr) (r uintptr) { @@ -146733,7 +146731,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { wd = d ws = s for { - if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { + if !(n >= uint64(8) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) { break } *(*Tsize_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) @@ -146767,7 +146765,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { goto finish finish: ; - return uint64(int64(d)-int64(d0)) + Xstrlen(tls, s) + return Uint64FromInt64(int64(d)-int64(d0)) + Xstrlen(tls, s) return r } @@ -146795,7 +146793,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { break } if !(*(*uint8)(unsafe.Pointer(s)) != 0) { - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } goto _1 _1: @@ -146804,7 +146802,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { } w = s for { - if !!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*uint64(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { + if !!((*(*uint64)(unsafe.Pointer(w))-Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (Uint64FromInt32(-Int32FromInt32(1))/Uint64FromInt32(UCHAR_MAX)*Uint64FromInt32(Int32FromInt32(UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) { break } goto _2 @@ -146822,7 +146820,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { @@ -146841,7 +146839,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))))) { break } goto _2 @@ -146851,7 +146849,7 @@ func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) + return Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) } func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, loc Tlocale_t) (r1 int32) { @@ -146909,7 +146907,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r)))) { + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r)))) { break } goto _2 @@ -146919,7 +146917,7 @@ func Xstrncmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { r++ n-- } - return int32(*(*uint8)(unsafe.Pointer(l))) - int32(*(*uint8)(unsafe.Pointer(r))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r))) } func Xstrncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { @@ -146959,7 +146957,7 @@ func Xstrnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _, _ = p, v1 p = Xmemchr(tls, s, 0, n) if p != 0 { - v1 = uint64(int64(p) - int64(s)) + v1 = Uint64FromInt64(int64(p) - int64(s)) } else { v1 = n } @@ -147025,7 +147023,7 @@ func Xstrsignal(tls *TLS, signum int32) (r uintptr) { _, _ = s, v2 s = uintptr(unsafe.Pointer(&_strings)) signum = signum - if uint32(signum)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if Uint32FromInt32(signum)-uint32(1) >= Uint32FromInt32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { signum = 0 } for { @@ -147069,7 +147067,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { } if !(*(*uint8)(unsafe.Pointer(c + 1)) != 0) { for { - if !(int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(c)))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(c)))) { break } goto _1 @@ -147077,7 +147075,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } for { if v4 = *(*uint8)(unsafe.Pointer(c)) != 0; v4 { @@ -147101,18 +147099,18 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(s) - int64(a)) + return Uint64FromInt64(int64(s) - int64(a)) } func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { var hw, nw Tuint16_t var v2, v3 uintptr _, _, _, _ = hw, nw, v2, v3 - nw = uint16(int32(*(*uint8)(unsafe.Pointer(n)))< int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) > Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -147240,13 +147238,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 k = v5 for jp+k < l { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { if k == p { jp += p k = uint64(1) @@ -147254,7 +147252,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { k++ } } else { - if int32(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < int32(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(ip+k)))) < Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(jp+k)))) { jp += k k = uint64(1) p = jp - ip @@ -147291,13 +147289,13 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { /* Fast estimate for MAX(l,63) */ grow = l | uint64(63) z2 = Xmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64(int64(z)-int64(h)) < l { + if Uint64FromInt64(int64(z)-int64(h)) < l { return uintptr(0) } } else { @@ -147328,7 +147326,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { } k = v11 for { - if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { + if !(*(*uint8)(unsafe.Pointer(n + uintptr(k))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k))))) { break } goto _10 @@ -147344,7 +147342,7 @@ func _twoway_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Compare left half */ k = ms + uint64(1) for { - if !(k > mem && int32(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == int32(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { + if !(k > mem && Int32FromUint8(*(*uint8)(unsafe.Pointer(n + uintptr(k-uint64(1))))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(h + uintptr(k-uint64(1)))))) { break } goto _12 @@ -147373,7 +147371,7 @@ func Xstrstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return h } /* Use faster algorithms for short needles */ - h = Xstrchr(tls, h, int32(*(*uint8)(unsafe.Pointer(n)))) + h = Xstrchr(tls, h, Int32FromUint8(*(*uint8)(unsafe.Pointer(n)))) if !(h != 0) || !(*(*uint8)(unsafe.Pointer(n + 1)) != 0) { return h } @@ -147483,14 +147481,14 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { i = v2 dp = v2 for { - if !(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) == Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))) { break } - c = int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) + c = Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) if !(c != 0) { return 0 } - if !(BoolInt32(uint32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { + if !(BoolInt32(Uint32FromInt32(c)-Uint32FromUint8('0') < Uint32FromInt32(10)) != 0) { dp = i + uint64(1) z = Int32FromInt32(1) } else { @@ -147503,7 +147501,7 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { ; i++ } - if uint32(int32(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && uint32(int32(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { + if Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(dp))))-int32('1')) < uint32(9) && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(dp))))-int32('1')) < uint32(9) { /* If we're looking at non-degenerate digit sequences starting * with nonzero digits, longest digit string is greater. */ j = i @@ -147526,10 +147524,10 @@ func Xstrverscmp(tls *TLS, l0 uintptr, r0 uintptr) (r1 int32) { if z != 0 && dp < i && (BoolInt32(uint32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-uint32('0') < uint32(10)) != 0 || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-uint32('0') < uint32(10)) != 0) { /* Otherwise, if common prefix of digit sequence is * all zeros, digits order less than non-digits. */ - return int32(uint8(int32(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - int32(uint8(int32(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) + return Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i))))-Int32FromUint8('0'))) - Int32FromUint8(Uint8FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i))))-Int32FromUint8('0'))) } } - return int32(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - int32(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) + return Int32FromUint8(*(*uint8)(unsafe.Pointer(l + uintptr(i)))) - Int32FromUint8(*(*uint8)(unsafe.Pointer(r + uintptr(i)))) } func Xswab(tls *TLS, _src uintptr, _dest uintptr, n Tssize_t) { @@ -147576,7 +147574,7 @@ func Xwcscasecmp(tls *TLS, l uintptr, r uintptr) (r1 int32) { trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2)) defer func() { trc("-> %v", r1) }() } - return Xwcsncasecmp(tls, l, r, uint64(-Int32FromInt32(1))) + return Xwcsncasecmp(tls, l, r, Uint64FromInt32(-Int32FromInt32(1))) } func Xwcscasecmp_l(tls *TLS, l uintptr, r uintptr, locale Tlocale_t) (r1 int32) { @@ -147688,7 +147686,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { v2 = Xwcschr(tls, v3, *(*Twchar_t)(unsafe.Pointer(c))) s = v2 if v2 != 0 { - v1 = uint64((int64(s) - int64(a)) / 4) + v1 = Uint64FromInt64((int64(s) - int64(a)) / 4) } else { v1 = Xwcslen(tls, a) } @@ -147704,7 +147702,7 @@ func Xwcscspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsdup(tls *TLS, s uintptr) (r uintptr) { @@ -147740,7 +147738,7 @@ func Xwcslen(tls *TLS, s uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { @@ -147756,7 +147754,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { return 0 } for { - if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r)))))) { + if !(*(*Twchar_t)(unsafe.Pointer(l)) != 0 && *(*Twchar_t)(unsafe.Pointer(r)) != 0 && n != 0 && (*(*Twchar_t)(unsafe.Pointer(l)) == *(*Twchar_t)(unsafe.Pointer(r)) || Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) == Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r)))))) { break } goto _2 @@ -147766,7 +147764,7 @@ func Xwcsncasecmp(tls *TLS, l uintptr, r uintptr, n Tsize_t) (r1 int32) { r += 4 n-- } - return int32(Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, uint32(*(*Twchar_t)(unsafe.Pointer(r))))) + return Int32FromUint32(Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(l)))) - Xtowlower(tls, Uint32FromInt32(*(*Twchar_t)(unsafe.Pointer(r))))) } func Xwcsncasecmp_l(tls *TLS, l uintptr, r uintptr, n Tsize_t, locale Tlocale_t) (r1 int32) { @@ -147860,7 +147858,7 @@ func Xwcsnlen(tls *TLS, s uintptr, n Tsize_t) (r Tsize_t) { _ = z z = Xwmemchr(tls, s, 0, n) if z != 0 { - n = uint64((int64(z) - int64(s)) / 4) + n = Uint64FromInt64((int64(z) - int64(s)) / 4) } return n } @@ -147923,7 +147921,7 @@ func Xwcsspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s += 4 } - return uint64((int64(s) - int64(a)) / 4) + return Uint64FromInt64((int64(s) - int64(a)) / 4) } func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { @@ -147946,7 +147944,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { return uintptr(0) } /* hit the end of h */ /* Compute maximal suffix */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v2 = Uint64FromInt32(1) p = v2 @@ -147977,7 +147975,7 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { ms = ip p0 = p /* And with the opposite comparison */ - ip = uint64(-Int32FromInt32(1)) + ip = Uint64FromInt32(-Int32FromInt32(1)) jp = uint64(0) v5 = Uint64FromInt32(1) p = v5 @@ -148028,13 +148026,13 @@ func _twoway_wcsstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { /* Search loop */ for { /* Update incremental end-of-haystack pointer */ - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { /* Fast estimate for MIN(l,63) */ grow = l | uint64(63) z2 = Xwmemchr(tls, z, 0, grow) if z2 != 0 { z = z2 - if uint64((int64(z)-int64(h))/4) < l { + if Uint64FromInt64((int64(z)-int64(h))/4) < l { return uintptr(0) } } else { @@ -148339,7 +148337,7 @@ func X__mkostemps(tls *TLS, template uintptr, len1 int32, flags int32) (r int32) var l Tsize_t _, _, _, _, _ = fd, l, retries, v1, v3 l = Xstrlen(tls, template) - if l < uint64(6) || uint64(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1760, uint64(6)) != 0 { + if l < uint64(6) || Uint64FromInt32(len1) > l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1760, uint64(6)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -148449,10 +148447,10 @@ func Xcfmakeraw(tls *TLS, t uintptr) { if __ccgo_strace { trc("tls=%v t=%v, (%v:)", tls, t, origin(2)) } - *(*Ttcflag_t)(unsafe.Pointer(t)) &= uint32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) - *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= uint32(^Int32FromInt32(OPOST)) - *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= uint32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) - *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= uint32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) + *(*Ttcflag_t)(unsafe.Pointer(t)) &= Uint32FromInt32(^(Int32FromInt32(IGNBRK) | Int32FromInt32(BRKINT) | Int32FromInt32(PARMRK) | Int32FromInt32(ISTRIP) | Int32FromInt32(INLCR) | Int32FromInt32(IGNCR) | Int32FromInt32(ICRNL) | Int32FromInt32(IXON))) + *(*Ttcflag_t)(unsafe.Pointer(t + 4)) &= Uint32FromInt32(^Int32FromInt32(OPOST)) + *(*Ttcflag_t)(unsafe.Pointer(t + 12)) &= Uint32FromInt32(^(Int32FromInt32(ECHO) | Int32FromInt32(ECHONL) | Int32FromInt32(ICANON) | Int32FromInt32(ISIG) | Int32FromInt32(IEXTEN))) + *(*Ttcflag_t)(unsafe.Pointer(t + 8)) &= Uint32FromInt32(^(Int32FromInt32(CSIZE) | Int32FromInt32(PARENB))) *(*Ttcflag_t)(unsafe.Pointer(t + 8)) |= uint32(CS8) *(*Tcc_t)(unsafe.Pointer(t + 17 + 6)) = uint8(1) *(*Tcc_t)(unsafe.Pointer(t + 17 + 5)) = uint8(0) @@ -148463,11 +148461,11 @@ func Xcfsetospeed(tls *TLS, tio uintptr, speed Tspeed_t) (r int32) { trc("tls=%v tio=%v speed=%v, (%v:)", tls, tio, speed, origin(2)) defer func() { trc("-> %v", r) }() } - if speed&uint32(^Int32FromInt32(CBAUD)) != 0 { + if speed&Uint32FromInt32(^Int32FromInt32(CBAUD)) != 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= uint32(^Int32FromInt32(CBAUD)) + *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) &= Uint32FromInt32(^Int32FromInt32(CBAUD)) *(*Ttcflag_t)(unsafe.Pointer(tio + 8)) |= speed return 0 } @@ -148500,7 +148498,7 @@ func Xtcdrain(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TCSBRK)), int64(Int32FromInt32(1)), 0, 0, 0)))) } func Xtcflow(tls *TLS, fd int32, action int32) (r int32) { @@ -148555,7 +148553,7 @@ func Xtcgetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(wsz))))) } func Xtcsendbreak(tls *TLS, fd int32, dur int32) (r int32) { @@ -148588,7 +148586,7 @@ func Xtcsetwinsize(tls *TLS, fd int32, wsz uintptr) (r int32) { trc("tls=%v fd=%v wsz=%v, (%v:)", tls, fd, wsz, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCSWINSZ)), int64(wsz))))) } func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { @@ -148603,13 +148601,13 @@ func X__map_file(tls *TLS, pathname uintptr, size uintptr) (r uintptr) { var _ /* st at bp+0 */ Tstat _, _, _ = fd, map1, v1 map1 = uintptr(-Int32FromInt32(1)) - fd = int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_open), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) + fd = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_open), int64(pathname), int64(Int32FromInt32(O_RDONLY)|Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)|Int32FromInt32(O_LARGEFILE)))))) if fd < 0 { return uintptr(0) } if !(X__fstat(tls, fd, bp) != 0) { - map1 = ___mmap(tls, uintptr(0), uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) - *(*Tsize_t)(unsafe.Pointer(size)) = uint64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) + map1 = ___mmap(tls, uintptr(0), Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size), int32(PROT_READ), int32(MAP_SHARED), fd, 0) + *(*Tsize_t)(unsafe.Pointer(size)) = Uint64FromInt64((*(*Tstat)(unsafe.Pointer(bp))).Fst_size) } X__syscall1(tls, int64(SYS_close), int64(fd)) if map1 == uintptr(-Int32FromInt32(1)) { @@ -148716,10 +148714,10 @@ func X__secs_to_tm(tls *TLS, t int64, tm uintptr) (r int32) { years = int64(remyears+int32(4)*q_cycles+int32(100)*c_cycles) + int64(400)*int64(qc_cycles) months = 0 for { - if !(int32(_days_in_month[months]) <= remdays) { + if !(Int32FromUint8(_days_in_month[months]) <= remdays) { break } - remdays -= int32(_days_in_month[months]) + remdays -= Int32FromUint8(_days_in_month[months]) goto _1 _1: ; @@ -148815,35 +148813,35 @@ func _getint2(tls *TLS, p uintptr) (r int32) { _ = x x = uint32(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) < uint32(10)) { break } - x = uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x + x = Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)))))-int32('0')) + uint32(10)*x goto _1 _1: ; *(*uintptr)(unsafe.Pointer(p))++ } - return int32(x) + return Int32FromUint32(x) } func _getoff(tls *TLS, p uintptr) (r int32) { var neg, off, v1 int32 _, _, _ = neg, off, v1 neg = 0 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('-') { *(*uintptr)(unsafe.Pointer(p))++ neg = int32(1) } else { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('+') { *(*uintptr)(unsafe.Pointer(p))++ } } off = int32(3600) * _getint2(tls, p) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { *(*uintptr)(unsafe.Pointer(p))++ off += int32(60) * _getint2(tls, p) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32(':') { *(*uintptr)(unsafe.Pointer(p))++ off += _getint2(tls, p) } @@ -148859,7 +148857,7 @@ func _getoff(tls *TLS, p uintptr) (r int32) { func _getrule(tls *TLS, p uintptr, rule uintptr) { var r, v1 int32 _, _ = r, v1 - v1 = int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) *(*int32)(unsafe.Pointer(rule)) = v1 r = v1 if r != int32('M') { @@ -148877,7 +148875,7 @@ func _getrule(tls *TLS, p uintptr, rule uintptr) { *(*uintptr)(unsafe.Pointer(p))++ *(*int32)(unsafe.Pointer(rule + 3*4)) = _getint2(tls, p) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('/') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('/') { *(*uintptr)(unsafe.Pointer(p))++ *(*int32)(unsafe.Pointer(rule + 4*4)) = _getoff(tls, p) } else { @@ -148888,11 +148886,11 @@ func _getrule(tls *TLS, p uintptr, rule uintptr) { func _getname(tls *TLS, d uintptr, p uintptr) { var i, v3 int32 _, _ = i, v3 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('<') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p))))) == int32('<') { *(*uintptr)(unsafe.Pointer(p))++ i = 0 for { - if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i)))) != int32('>')) { + if !(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))) != 0 && Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i)))) != int32('>')) { break } if i < int32(TZNAME_MAX) { @@ -148909,7 +148907,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } else { i = 0 for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p)) + uintptr(i))))|int32(32)-int32('a')) < uint32(26)) { break } if i < int32(TZNAME_MAX) { @@ -148931,7 +148929,7 @@ func _getname(tls *TLS, d uintptr, p uintptr) { } func _zi_read32(tls *TLS, z uintptr) (r Tuint32_t) { - return uint32(*(*uint8)(unsafe.Pointer(z)))< uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { + if i > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(1)) { *(*uintptr)(unsafe.Pointer(bp + 288)) = uintptr(unsafe.Pointer(&X__utc)) i = Uint64FromInt32(3) } @@ -149008,8 +149006,8 @@ func _do_tzset(tls *TLS) { if i >= _old_tz_size { _old_tz_size = i + uint64(1) } - if _old_tz_size > uint64(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { - _old_tz_size = uint64(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) + if _old_tz_size > Uint64FromInt32(Int32FromInt32(PATH_MAX)+Int32FromInt32(2)) { + _old_tz_size = Uint64FromInt32(Int32FromInt32(PATH_MAX) + Int32FromInt32(2)) } _old_tz = Xmalloc(tls, _old_tz_size) } @@ -149017,10 +149015,10 @@ func _do_tzset(tls *TLS) { Xmemcpy(tls, _old_tz, *(*uintptr)(unsafe.Pointer(bp + 288)), i+uint64(1)) } posix_form = 0 - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32(':') { *(*uintptr)(unsafe.Pointer(bp + 296)) = *(*uintptr)(unsafe.Pointer(bp + 288)) _getname(tls, bp+308, bp+296) - if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1785) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1789) != 0)) { + if *(*uintptr)(unsafe.Pointer(bp + 296)) != *(*uintptr)(unsafe.Pointer(bp + 288)) && (Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296))))) == int32('-') || BoolInt32(uint32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296)))))-uint32('0') < uint32(10)) != 0 || !(Xstrcmp(tls, bp+308, __ccgo_ts+1785) != 0) || !(Xstrcmp(tls, bp+308, __ccgo_ts+1789) != 0)) { posix_form = int32(1) } } @@ -149028,10 +149026,10 @@ func _do_tzset(tls *TLS) { * pathame beginning with "."; in secure mode, only the * standard path will be searched. */ if !(posix_form != 0) { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(':') { *(*uintptr)(unsafe.Pointer(bp + 288))++ } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('/') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('.') { if !(X__libc.Fsecure != 0) || !(Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), __ccgo_ts+1770) != 0) { map1 = X__map_file(tls, *(*uintptr)(unsafe.Pointer(bp + 288)), uintptr(unsafe.Pointer(&_map_size))) } @@ -149067,7 +149065,7 @@ func _do_tzset(tls *TLS) { _zi = map1 if map1 != 0 { scale = int32(2) - if int32(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(map1 + 4))) != int32('1') { *(*[6]uint8)(unsafe.Pointer(bp)) = [6]uint8{ 0: uint8(1), 1: uint8(1), @@ -149086,10 +149084,10 @@ func _do_tzset(tls *TLS) { _types = _index + uintptr(_zi_read32(tls, _trans-uintptr(12))) _abbrevs = _types + uintptr(uint32(6)*_zi_read32(tls, _trans-uintptr(8))) _abbrevs_end = _abbrevs + uintptr(_zi_read32(tls, _trans-uintptr(4))) - if int32(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(_zi + uintptr(_map_size-uint64(1))))) == int32('\n') { *(*uintptr)(unsafe.Pointer(bp + 288)) = _zi + uintptr(_map_size) - uintptr(2) for { - if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) != int32('\n')) { break } goto _4 @@ -149114,11 +149112,11 @@ func _do_tzset(tls *TLS) { } if !(*(*uint8)(unsafe.Pointer(p1 + 4)) != 0) && !(Xtzname[0] != 0) { Xtzname[0] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - Xtimezone = int64(-_zi_read32(tls, p1)) + Xtimezone = Int64FromUint32(-_zi_read32(tls, p1)) } if *(*uint8)(unsafe.Pointer(p1 + 4)) != 0 && !(Xtzname[int32(1)] != 0) { Xtzname[int32(1)] = _abbrevs + uintptr(*(*uint8)(unsafe.Pointer(p1 + 5))) - _dst_off = int32(-_zi_read32(tls, p1)) + _dst_off = Int32FromUint32(-_zi_read32(tls, p1)) Xdaylight = int32(1) } goto _8 @@ -149149,7 +149147,7 @@ func _do_tzset(tls *TLS) { Xtzname[int32(1)] = uintptr(unsafe.Pointer(&_dst_name)) if _dst_name[0] != 0 { Xdaylight = int32(1) - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || uint32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32('-') || Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288)))))-int32('0')) < uint32(10) { _dst_off = _getoff(tls, bp+288) } else { _dst_off = int32(Xtimezone - int64(3600)) @@ -149158,11 +149156,11 @@ func _do_tzset(tls *TLS) { Xdaylight = 0 _dst_off = int32(Xtimezone) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r0))) } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ _getrule(tls, bp+288, uintptr(unsafe.Pointer(&_r12))) } @@ -149181,7 +149179,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { scale = int32(3) - BoolInt32(_trans == _zi+uintptr(44)) off = 0 a = uint64(0) - n = uint64((int64(_index) - int64(_trans)) >> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if !(n != 0) { if alt != 0 { *(*Tsize_t)(unsafe.Pointer(alt)) = uint64(0) @@ -149195,12 +149193,12 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<> scale) + n = Uint64FromInt64((int64(_index) - int64(_trans)) >> scale) if a == n-uint64(1) { - return uint64(-Int32FromInt32(1)) + return Uint64FromInt32(-Int32FromInt32(1)) } if a == uint64(0) { x = uint64(_zi_read32(tls, _trans)) if scale == int32(3) { x = x<= uint64(int64(_abbrevs_end)-int64(_abbrevs))) { + if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint64(p)-uint64(_abbrevs) >= Uint64FromInt64(int64(_abbrevs_end)-int64(_abbrevs))) { p = __ccgo_ts } ___unlock(tls, uintptr(unsafe.Pointer(&_lock4))) @@ -149423,7 +149421,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { var centuries, cycles, leaps, leaps1, rem, y int32 var _ /* dummy at bp+0 */ int32 _, _, _, _, _, _ = centuries, cycles, leaps, leaps1, rem, y - if uint64(year)-uint64(2) <= uint64(136) { + if Uint64FromInt64(year)-uint64(2) <= uint64(136) { y = int32(year) leaps = (y - int32(68)) >> int32(2) if !((y-Int32FromInt32(68))&Int32FromInt32(3) != 0) { @@ -149472,7 +149470,7 @@ func X__year_to_secs(tls *TLS, year int64, is_leap uintptr) (r int64) { *(*int32)(unsafe.Pointer(is_leap)) = 0 leaps1 = 0 } else { - leaps1 = int32(uint32(rem) / uint32(4)) + leaps1 = Int32FromUint32(Uint32FromInt32(rem) / uint32(4)) rem = int32(uint32(rem) % Uint32FromUint32(4)) *(*int32)(unsafe.Pointer(is_leap)) = BoolInt32(!(rem != 0)) } @@ -149557,7 +149555,7 @@ func Xclock_getcpuclockid(tls *TLS, pid Tpid_t, clk uintptr) (r int32) { var ret int32 var _ /* ts at bp+0 */ Ttimespec _, _ = id, ret - id = int32(uint32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) + id = Int32FromUint32(Uint32FromInt32(-pid-Int32FromInt32(1))*uint32(8) + uint32(2)) ret = int32(X__syscall2(tls, int64(SYS_clock_getres), int64(id), int64(bp))) if ret == -int32(EINVAL) { ret = -int32(ESRCH) @@ -149576,7 +149574,7 @@ func Xclock_getres(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { } /* If reaching this point, it's a 64-bit arch or time64-only * 32-bit arch and we can get result directly into timespec. */ - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_getres), int64(clk), int64(ts))))) } func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { @@ -149595,7 +149593,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { } r = -int32(EINVAL) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xclock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { @@ -149633,7 +149631,7 @@ func Xclock_settime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { trc("tls=%v clk=%v ts=%v, (%v:)", tls, clk, ts, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_clock_settime), int64(clk), int64(ts))))) } func Xctime(tls *TLS, t uintptr) (r uintptr) { @@ -149696,7 +149694,7 @@ func Xftime(tls *TLS, tp uintptr) (r int32) { _ = v1 Xclock_gettime(tls, CLOCK_REALTIME, bp) (*Ttimeb)(unsafe.Pointer(tp)).Ftime = (*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec - (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = uint16((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) + (*Ttimeb)(unsafe.Pointer(tp)).Fmillitm = Uint16FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec / int64(1000000)) v1 = Int16FromInt32(0) (*Ttimeb)(unsafe.Pointer(tp)).Fdstflag = v1 (*Ttimeb)(unsafe.Pointer(tp)).Ftimezone = v1 @@ -149898,7 +149896,7 @@ func Xnanosleep(tls *TLS, req uintptr, rem uintptr) (r int32) { trc("tls=%v req=%v rem=%v, (%v:)", tls, req, rem, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-X__clock_nanosleep(tls, CLOCK_REALTIME, 0, req, rem)))) } func _is_leap(tls *TLS, y int32) (r int32) { @@ -149913,10 +149911,10 @@ func _is_leap(tls *TLS, y int32) (r int32) { func _week_num(tls *TLS, tm uintptr) (r int32) { var dec31, jan1, val int32 _, _, _ = dec31, jan1, val - val = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) /* If 1 Jan is just 1-3 days past Monday, * the previous week is also in this year. */ - if (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { + if (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(371)-Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)-uint32(2))%uint32(7) <= uint32(2) { val++ } if !(val != 0) { @@ -149924,7 +149922,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 31 December of prev year a Thursday, * or Friday of a leap year, then the * prev year has 53 weeks. */ - dec31 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) + dec31 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) - uint32(1)) % uint32(7)) if dec31 == int32(4) || dec31 == int32(5) && _is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year%int32(400)-int32(1)) != 0 { val++ } @@ -149933,7 +149931,7 @@ func _week_num(tls *TLS, tm uintptr) (r int32) { /* If 1 January is not a Thursday, and not * a Wednesday of a leap year, then this * year has only 52 weeks. */ - jan1 = int32((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) + jan1 = Int32FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) + uint32(371) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday)) % uint32(7)) if jan1 != int32(4) && (jan1 != int32(3) || !(_is_leap(tls, (*Ttm)(unsafe.Pointer(tm)).Ftm_year) != 0)) { val = int32(1) } @@ -149959,13 +149957,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc def_pad = int32('0') switch f { case int32('a'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(ABDAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday goto nl_strcat case int32('A'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday) > uint32(6) { goto string } item = int32(DAY_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_wday @@ -149973,13 +149971,13 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('h'): fallthrough case int32('b'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(ABMON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon goto nl_strcat case int32('B'): - if uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { + if Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_mon) > uint32(11) { goto string } item = int32(MON_1) + (*Ttm)(unsafe.Pointer(tm)).Ftm_mon @@ -150078,7 +150076,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc d++ v5 = fmt fmt++ - *(*uint8)(unsafe.Pointer(v4)) = uint8(Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(v5))))) + *(*uint8)(unsafe.Pointer(v4)) = Uint8FromInt32(Xtolower(tls, Int32FromUint8(*(*uint8)(unsafe.Pointer(v5))))) goto _3 _3: ; @@ -150114,10 +150112,10 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc width = int32(1) goto number case int32('U'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)) / uint32(7)) goto number case int32('W'): - val = int64((uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (uint32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) + val = Int64FromUint32((Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_yday) + uint32(7) - (Uint32FromInt32((*Ttm)(unsafe.Pointer(tm)).Ftm_wday)+uint32(6))%uint32(7)) / uint32(7)) goto number case int32('V'): val = int64(_week_num(tls, tm)) @@ -150141,7 +150139,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc case int32('Y'): val = int64((*Ttm)(unsafe.Pointer(tm)).Ftm_year) + int64(1900) if val >= int64(10000) { - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1883, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1883, VaList(bp+8, val))) return s } width = int32(4) @@ -150151,7 +150149,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc *(*Tsize_t)(unsafe.Pointer(l)) = uint64(0) return __ccgo_ts } - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1889, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1889, VaList(bp+8, (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff/int64(3600)*int64(100)+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff%int64(3600)/int64(60)))) return s case int32('Z'): if (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst < 0 { @@ -150176,13 +150174,13 @@ number: } switch v7 { case int32('-'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1896, VaList(bp+8, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1896, VaList(bp+8, val))) case int32('_'): - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1901, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1901, VaList(bp+8, width, val))) case int32('0'): fallthrough default: - *(*Tsize_t)(unsafe.Pointer(l)) = uint64(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1907, VaList(bp+8, width, val))) + *(*Tsize_t)(unsafe.Pointer(l)) = Uint64FromInt32(Xsnprintf(tls, s, uint64(100), __ccgo_ts+1907, VaList(bp+8, width, val))) break } return s @@ -150234,7 +150232,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl *(*uint8)(unsafe.Pointer(s + uintptr(l))) = uint8(0) return l } - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { v2 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v2))) = *(*uint8)(unsafe.Pointer(f)) @@ -150242,12 +150240,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } f++ pad = 0 - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('-') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('_') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('0') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('-') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('_') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('0') { v3 = f f++ - pad = int32(*(*uint8)(unsafe.Pointer(v3))) + pad = Int32FromUint8(*(*uint8)(unsafe.Pointer(v3))) } - v4 = BoolInt32(int32(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) + v4 = BoolInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == Int32FromUint8('+')) plus = v4 if v4 != 0 { f++ @@ -150258,7 +150256,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint64(0) *(*uintptr)(unsafe.Pointer(bp + 112)) = f } - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('F') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('G') || int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('Y') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('F') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('G') || Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('Y') { if !(width != 0) && *(*uintptr)(unsafe.Pointer(bp + 112)) != f { width = uint64(1) } @@ -150266,10 +150264,10 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width = uint64(0) } f = *(*uintptr)(unsafe.Pointer(bp + 112)) - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('E') || int32(*(*uint8)(unsafe.Pointer(f))) == int32('O') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('E') || Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('O') { f++ } - t = X__strftime_fmt_1(tls, bp+8, bp, int32(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) + t = X__strftime_fmt_1(tls, bp+8, bp, Int32FromUint8(*(*uint8)(unsafe.Pointer(f))), tm, loc, pad) if !(t != 0) { break } @@ -150277,12 +150275,12 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl /* Trim off any sign and leading zeros, then * count remaining digits to determine behavior * for the + flag. */ - if int32(*(*uint8)(unsafe.Pointer(t))) == int32('+') || int32(*(*uint8)(unsafe.Pointer(t))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('+') || Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('-') { t++ *(*Tsize_t)(unsafe.Pointer(bp))-- } for { - if !(int32(*(*uint8)(unsafe.Pointer(t))) == int32('0') && uint32(int32(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { + if !(Int32FromUint8(*(*uint8)(unsafe.Pointer(t))) == int32('0') && Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + 1)))-int32('0')) < uint32(10)) { break } goto _5 @@ -150296,7 +150294,7 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl } d = uint64(0) for { - if !(uint32(int32(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { + if !(Uint32FromInt32(Int32FromUint8(*(*uint8)(unsafe.Pointer(t + uintptr(d))))-int32('0')) < uint32(10)) { break } goto _6 @@ -150311,13 +150309,13 @@ func X__strftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl width-- } else { if v9 = plus != 0; v9 { - if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == int32('C') { v8 = int32(3) } else { v8 = int32(5) } } - if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= uint64(v8) { + if v9 && d+(width-*(*Tsize_t)(unsafe.Pointer(bp))) >= Uint64FromInt32(v8) { v10 = l l++ *(*uint8)(unsafe.Pointer(s + uintptr(v10))) = uint8('+') @@ -150392,16 +150390,16 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { *(*int32)(unsafe.Pointer(bp + 4)) = 0 *(*int32)(unsafe.Pointer(bp + 8)) = 0 for *(*uint8)(unsafe.Pointer(f)) != 0 { - if int32(*(*uint8)(unsafe.Pointer(f))) != int32('%') { - v1 = int32(*(*uint8)(unsafe.Pointer(f))) - v2 = BoolInt32(v1 == int32(' ') || uint32(v1)-uint32('\t') < uint32(5)) + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) != int32('%') { + v1 = Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) + v2 = BoolInt32(v1 == int32(' ') || Uint32FromInt32(v1)-uint32('\t') < uint32(5)) goto _3 _3: if v2 != 0 { for { if v8 = *(*uint8)(unsafe.Pointer(s)) != 0; v8 { - v5 = int32(*(*uint8)(unsafe.Pointer(s))) - v6 = BoolInt32(v5 == int32(' ') || uint32(v5)-uint32('\t') < uint32(5)) + v5 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v6 = BoolInt32(v5 == int32(' ') || Uint32FromInt32(v5)-uint32('\t') < uint32(5)) goto _7 _7: } @@ -150414,7 +150412,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { s++ } } else { - if int32(*(*uint8)(unsafe.Pointer(s))) != int32(*(*uint8)(unsafe.Pointer(f))) { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) != Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) { return uintptr(0) } else { s++ @@ -150424,11 +150422,11 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { continue } f++ - if int32(*(*uint8)(unsafe.Pointer(f))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(f))) == int32('+') { f++ } if BoolInt32(uint32(*(*uint8)(unsafe.Pointer(f)))-uint32('0') < uint32(10)) != 0 { - w = int32(Xstrtoul(tls, f, bp+16, int32(10))) + w = Int32FromUint64(Xstrtoul(tls, f, bp+16, int32(10))) f = *(*uintptr)(unsafe.Pointer(bp + 16)) } else { w = -int32(1) @@ -150436,7 +150434,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { adj = 0 v9 = f f++ - switch int32(*(*uint8)(unsafe.Pointer(v9))) { + switch Int32FromUint8(*(*uint8)(unsafe.Pointer(v9))) { case int32('A'): goto _10 case int32('a'): @@ -150588,8 +150586,8 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { _44: ; if v48 = *(*uint8)(unsafe.Pointer(s)) != 0; v48 { - v45 = int32(*(*uint8)(unsafe.Pointer(s))) - v46 = BoolInt32(v45 == int32(' ') || uint32(v45)-uint32('\t') < uint32(5)) + v45 = Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) + v46 = BoolInt32(v45 == int32(' ') || Uint32FromInt32(v45)-uint32('\t') < uint32(5)) goto _47 _47: } @@ -150698,7 +150696,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; v49 = s s++ - if int32(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(v49))) != int32('%') { return uintptr(0) } goto _41 @@ -150719,28 +150717,28 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v51 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v51))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v51))) - int32('0') goto _50 _50: ; i *= int32(10) } - if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(range1) { + if Uint32FromInt32(*(*int32)(unsafe.Pointer(dest))-min) >= Uint32FromInt32(range1) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) -= adj switch int64(dest) - int64(tm) { - case int64(uint64(UintptrFromInt32(0) + 28)): + case Int64FromUint64(uint64(UintptrFromInt32(0) + 28)): } goto update goto numeric_digits numeric_digits: ; neg = 0 - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('+') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('+') { s++ } else { - if int32(*(*uint8)(unsafe.Pointer(s))) == int32('-') { + if Int32FromUint8(*(*uint8)(unsafe.Pointer(s))) == int32('-') { neg = int32(1) s++ } @@ -150757,7 +150755,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { } v54 = s s++ - *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + int32(*(*uint8)(unsafe.Pointer(v54))) - int32('0') + *(*int32)(unsafe.Pointer(dest)) = *(*int32)(unsafe.Pointer(dest))*int32(10) + Int32FromUint8(*(*uint8)(unsafe.Pointer(v54))) - int32('0') goto _52 _52: ; @@ -150878,9 +150876,9 @@ func Xtimer_getoverrun(tls *TLS, t Ttimer_t) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) } func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { @@ -150892,9 +150890,9 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) } func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) (r int32) { @@ -150906,9 +150904,9 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) _ = td if int64(t) < 0 { td = uintptr(uint64(t) << Int32FromInt32(1)) - t = uintptr(uint64(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) + t = uintptr(Uint64FromInt32(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_timer_settime), int64(t), int64(flags), int64(val), int64(old))))) } type Ttms = struct { @@ -151039,7 +151037,7 @@ func X__wcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tl break } *(*Tsize_t)(unsafe.Pointer(bp)) = Xmbstowcs(tls, bp+108, t_mb, Uint64FromInt64(400)/Uint64FromInt64(4)) - if *(*Tsize_t)(unsafe.Pointer(bp)) == uint64(-Int32FromInt32(1)) { + if *(*Tsize_t)(unsafe.Pointer(bp)) == Uint64FromInt32(-Int32FromInt32(1)) { return uint64(0) } t = bp + 108 @@ -151128,7 +151126,7 @@ func Xaccess(tls *TLS, filename uintptr, amode int32) (r int32) { trc("tls=%v filename=%v amode=%v, (%v:)", tls, filename, amode, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_access), int64(filename), int64(amode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_access), int64(filename), int64(amode))))) } func Xacct(tls *TLS, filename uintptr) (r int32) { @@ -151136,7 +151134,7 @@ func Xacct(tls *TLS, filename uintptr) (r int32) { trc("tls=%v filename=%v, (%v:)", tls, filename, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_acct), int64(filename))))) } func Xalarm(tls *TLS, seconds uint32) (r uint32) { @@ -151150,12 +151148,12 @@ func Xalarm(tls *TLS, seconds uint32) (r uint32) { var _ /* old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_value: Ttimeval{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), }, } *(*Titimerval)(unsafe.Pointer(bp + 32)) = Titimerval{} Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec + BoolInt64(!!((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec != 0))) } func Xchdir(tls *TLS, path uintptr) (r int32) { @@ -151163,7 +151161,7 @@ func Xchdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(path))))) } func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { @@ -151171,7 +151169,7 @@ func Xchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_chown), int64(path), int64(uid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_chown), int64(path), Int64FromUint32(uid), Int64FromUint32(gid))))) } func _dummy12(tls *TLS, fd int32) (r int32) { @@ -151190,7 +151188,7 @@ func Xclose(tls *TLS, fd int32) (r1 int32) { if r == -int32(EINTR) { r = 0 } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xctermid(tls *TLS, s uintptr) (r uintptr) { @@ -151213,7 +151211,7 @@ func Xdup(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_dup), int64(fd))))) } func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { @@ -151230,7 +151228,7 @@ func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { break } } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { @@ -151241,7 +151239,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { var r, v1, v2 int32 _, _, _ = r, v1, v2 if old == new1 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } if flags != 0 { for { @@ -151252,10 +151250,10 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { } } if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } if flags & ^Int32FromInt32(O_CLOEXEC) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } } for { @@ -151268,7 +151266,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { if r >= 0 && flags&int32(O_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(new1), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) } - return int32(X__syscall_ret(tls, uint64(r))) + return int32(X__syscall_ret(tls, Uint64FromInt32(r))) } func Xdup3(tls *TLS, old int32, new1 int32, flags int32) (r int32) { @@ -151297,7 +151295,7 @@ func _checker(tls *TLS, p uintptr) (r int32) { X__syscall1(tls, int64(SYS_exit), int64(Int32FromInt32(1))) } *(*int32)(unsafe.Pointer(bp)) = int32(X__syscall4(tls, int64(SYS_faccessat), int64((*Tctx1)(unsafe.Pointer(c)).Ffd), int64((*Tctx1)(unsafe.Pointer(c)).Ffilename), int64((*Tctx1)(unsafe.Pointer(c)).Famode), int64(Int32FromInt32(0)))) - X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), int64(Uint64FromInt64(4))) + X__syscall3(tls, int64(SYS_write), int64((*Tctx1)(unsafe.Pointer(c)).Fp), int64(bp), Int64FromUint64(Uint64FromInt64(4))) return 0 } @@ -151311,13 +151309,13 @@ func Xfaccessat(tls *TLS, fd int32, filename uintptr, amode int32, flag int32) ( if flag != 0 { ret = int32(X__syscall4(tls, int64(SYS_faccessat2), int64(fd), int64(filename), int64(amode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } } if flag & ^Int32FromInt32(AT_EACCESS) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_faccessat), int64(fd), int64(filename), int64(amode))))) } func Xfchdir(tls *TLS, fd int32) (r int32) { @@ -151332,10 +151330,10 @@ func Xfchdir(tls *TLS, fd int32) (r int32) { _ = ret ret = int32(X__syscall1(tls, int64(SYS_fchdir), int64(fd))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) } func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { @@ -151348,12 +151346,12 @@ func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { var ret int32 var _ /* buf at bp+0 */ [27]uint8 _ = ret - ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), int64(uid), int64(gid))) + ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), Int64FromUint32(uid), Int64FromUint32(gid))) if ret != -int32(EBADF) || X__syscall2(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_GETFD))) < 0 { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } - X__procfdname(tls, bp, uint32(fd)) - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_chown), int64(bp), int64(uid), int64(gid))))) + X__procfdname(tls, bp, Uint32FromInt32(fd)) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_chown), int64(bp), Int64FromUint32(uid), Int64FromUint32(gid))))) } func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag int32) (r int32) { @@ -151361,7 +151359,7 @@ func Xfchownat(tls *TLS, fd int32, path uintptr, uid Tuid_t, gid Tgid_t, flag in trc("tls=%v fd=%v path=%v uid=%v gid=%v flag=%v, (%v:)", tls, fd, path, uid, gid, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), int64(uid), int64(gid), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_fchownat), int64(fd), int64(path), Int64FromUint32(uid), Int64FromUint32(gid), int64(flag))))) } func Xfdatasync(tls *TLS, fd int32) (r int32) { @@ -151369,7 +151367,7 @@ func Xfdatasync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fdatasync), int64(fd), 0, 0, 0, 0, 0)))) } func Xfsync(tls *TLS, fd int32) (r int32) { @@ -151377,7 +151375,7 @@ func Xfsync(tls *TLS, fd int32) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_fsync), int64(fd), 0, 0, 0, 0, 0)))) } func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { @@ -151385,7 +151383,7 @@ func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { trc("tls=%v fd=%v length=%v, (%v:)", tls, fd, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_ftruncate), int64(fd), length)))) } func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { @@ -151404,7 +151402,7 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { } else { v2 = int32(PATH_MAX) } - v1 = uint64(v2) + v1 = Uint64FromInt32(v2) tmp = Xrealloc(tls, tmp, v1) if !(buf != 0) { buf = tmp @@ -151415,11 +151413,11 @@ func Xgetcwd(tls *TLS, buf uintptr, size Tsize_t) (r uintptr) { return uintptr(0) } } - ret = X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), int64(size)))) + ret = X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getcwd), int64(buf), Int64FromUint64(size)))) if ret < 0 { return uintptr(0) } - if ret == 0 || int32(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { + if ret == 0 || Int32FromUint8(*(*uint8)(unsafe.Pointer(buf))) != int32('/') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENOENT) return uintptr(0) } @@ -151436,7 +151434,7 @@ func Xgetegid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getegid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getegid))) } func Xgeteuid(tls *TLS) (r Tuid_t) { @@ -151444,7 +151442,7 @@ func Xgeteuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_geteuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_geteuid))) } func Xgetgid(tls *TLS) (r Tgid_t) { @@ -151452,7 +151450,7 @@ func Xgetgid(tls *TLS) (r Tgid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getgid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getgid))) } func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { @@ -151460,7 +151458,7 @@ func Xgetgroups(tls *TLS, count int32, list uintptr) (r int32) { trc("tls=%v count=%v list=%v, (%v:)", tls, count, list, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_getgroups), int64(count), int64(list))))) } func Xgethostname(tls *TLS, name uintptr, len1 Tsize_t) (r int32) { @@ -151532,7 +151530,7 @@ func Xgetpgid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getpgid), int64(pid))))) } func Xgetpgrp(tls *TLS) (r Tpid_t) { @@ -151564,7 +151562,7 @@ func Xgetsid(tls *TLS, pid Tpid_t) (r Tpid_t) { trc("tls=%v pid=%v, (%v:)", tls, pid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_getsid), int64(pid))))) } func Xgetuid(tls *TLS) (r Tuid_t) { @@ -151572,7 +151570,7 @@ func Xgetuid(tls *TLS) (r Tuid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return uint32(X__syscall0(tls, int64(SYS_getuid))) + return Uint32FromInt64(X__syscall0(tls, int64(SYS_getuid))) } func Xisatty(tls *TLS, fd int32) (r1 int32) { @@ -151585,7 +151583,7 @@ func Xisatty(tls *TLS, fd int32) (r1 int32) { var r uint64 var _ /* wsz at bp+0 */ Twinsize _ = r - r = uint64(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) + r = Uint64FromInt64(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_ioctl), int64(fd), int64(Int32FromInt32(TIOCGWINSZ)), int64(bp))))) if r == uint64(0) { return int32(1) } @@ -151600,7 +151598,7 @@ func Xlchown(tls *TLS, path uintptr, uid Tuid_t, gid Tgid_t) (r int32) { trc("tls=%v path=%v uid=%v gid=%v, (%v:)", tls, path, uid, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_lchown), int64(path), int64(uid), int64(gid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_lchown), int64(path), Int64FromUint32(uid), Int64FromUint32(gid))))) } func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { @@ -151608,7 +151606,7 @@ func Xlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_link), int64(existing), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_link), int64(existing), int64(new1))))) } func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, flag int32) (r int32) { @@ -151616,7 +151614,7 @@ func Xlinkat(tls *TLS, fd1 int32, existing uintptr, fd2 int32, new1 uintptr, fla trc("tls=%v fd1=%v existing=%v fd2=%v new1=%v flag=%v, (%v:)", tls, fd1, existing, fd2, new1, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall5(tls, int64(SYS_linkat), int64(fd1), int64(existing), int64(fd2), int64(new1), int64(flag))))) } func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151624,7 +151622,7 @@ func X__lseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { trc("tls=%v fd=%v offset=%v whence=%v, (%v:)", tls, fd, offset, whence, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_lseek), int64(fd), offset, int64(whence)))) + return X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_lseek), int64(fd), offset, int64(whence)))) } func Xlseek(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) { @@ -151670,7 +151668,7 @@ func Xpause(tls *TLS) (r int32) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pause), 0, 0, 0, 0, 0, 0)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pause), 0, 0, 0, 0, 0, 0)))) } func Xpipe(tls *TLS, fd uintptr) (r int32) { @@ -151678,7 +151676,7 @@ func Xpipe(tls *TLS, fd uintptr) (r int32) { trc("tls=%v fd=%v, (%v:)", tls, fd, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_pipe), int64(fd))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_pipe), int64(fd))))) } func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { @@ -151693,10 +151691,10 @@ func Xpipe2(tls *TLS, fd uintptr, flag int32) (r int32) { } ret = int32(X__syscall2(tls, int64(SYS_pipe2), int64(fd), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(ret))) + return int32(X__syscall_ret(tls, Uint64FromInt32(ret))) } if flag & ^(Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)) != 0 { - return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) + return int32(X__syscall_ret(tls, Uint64FromInt32(-Int32FromInt32(EINVAL)))) } ret = Xpipe(tls, fd) if ret != 0 { @@ -151726,7 +151724,7 @@ func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pread64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151734,7 +151732,7 @@ func Xpreadv(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_preadv), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { @@ -151742,7 +151740,7 @@ func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), int64(size), ofs, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwrite64), int64(fd), int64(buf), Int64FromUint64(size), ofs, 0, 0))) } func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssize_t) { @@ -151750,7 +151748,7 @@ func Xpwritev(tls *TLS, fd int32, iov uintptr, count int32, ofs Toff_t) (r Tssiz trc("tls=%v fd=%v iov=%v count=%v ofs=%v, (%v:)", tls, fd, iov, count, ofs, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_pwritev), int64(fd), int64(iov), int64(count), ofs, ofs>>Int32FromInt32(32), 0))) } func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { @@ -151758,7 +151756,7 @@ func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_read), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151775,11 +151773,11 @@ func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_ buf = bp bufsize = uint64(1) } - r = int32(X__syscall3(tls, int64(SYS_readlink), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall3(tls, int64(SYS_readlink), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151796,11 +151794,11 @@ func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) buf = bp bufsize = uint64(1) } - r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), int64(bufsize))) + r = int32(X__syscall4(tls, int64(SYS_readlinkat), int64(fd), int64(path), int64(buf), Int64FromUint64(bufsize))) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(r)) + return X__syscall_ret(tls, Uint64FromInt32(r)) } func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151808,7 +151806,7 @@ func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_readv), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r int32) { @@ -151816,7 +151814,7 @@ func Xrenameat(tls *TLS, oldfd int32, old uintptr, newfd int32, new1 uintptr) (r trc("tls=%v oldfd=%v old=%v newfd=%v new1=%v, (%v:)", tls, oldfd, old, newfd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall4(tls, int64(SYS_renameat), int64(oldfd), int64(old), int64(newfd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall4(tls, int64(SYS_renameat), int64(oldfd), int64(old), int64(newfd), int64(new1))))) } func Xrmdir(tls *TLS, path uintptr) (r int32) { @@ -151824,7 +151822,7 @@ func Xrmdir(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_rmdir), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_rmdir), int64(path))))) } func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { @@ -151832,7 +151830,7 @@ func Xsetgid(tls *TLS, gid Tgid_t) (r int32) { trc("tls=%v gid=%v, (%v:)", tls, gid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setgid), int32(gid), 0, 0) + return X__setxid(tls, int32(SYS_setgid), Int32FromUint32(gid), 0, 0) } func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { @@ -151840,7 +151838,7 @@ func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { trc("tls=%v pid=%v pgid=%v, (%v:)", tls, pid, pgid, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_setpgid), int64(pid), int64(pgid))))) } func Xsetpgrp(tls *TLS) (r Tpid_t) { @@ -151856,7 +151854,7 @@ func Xsetsid(tls *TLS) (r Tpid_t) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall0(tls, int64(SYS_setsid))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall0(tls, int64(SYS_setsid))))) } func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { @@ -151864,7 +151862,7 @@ func Xsetuid(tls *TLS, uid Tuid_t) (r int32) { trc("tls=%v uid=%v, (%v:)", tls, uid, origin(2)) defer func() { trc("-> %v", r) }() } - return X__setxid(tls, int32(SYS_setuid), int32(uid), 0, 0) + return X__setxid(tls, int32(SYS_setuid), Int32FromUint32(uid), 0, 0) } type Tctx2 = struct { @@ -151920,7 +151918,7 @@ func X__setxid(tls *TLS, nr int32, id int32, eid int32, sid int32) (r int32) { } else { v1 = (*(*Tctx2)(unsafe.Pointer(bp))).Fret } - return int32(X__syscall_ret(tls, uint64(v1))) + return int32(X__syscall_ret(tls, Uint64FromInt32(v1))) } func Xsleep(tls *TLS, seconds uint32) (r uint32) { @@ -151932,10 +151930,10 @@ func Xsleep(tls *TLS, seconds uint32) (r uint32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(seconds), + Ftv_sec: Int64FromUint32(seconds), } if Xnanosleep(tls, bp, bp) != 0 { - return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) + return Uint32FromInt64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) } return uint32(0) } @@ -151945,7 +151943,7 @@ func Xsymlink(tls *TLS, existing uintptr, new1 uintptr) (r int32) { trc("tls=%v existing=%v new1=%v, (%v:)", tls, existing, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_symlink), int64(existing), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_symlink), int64(existing), int64(new1))))) } func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { @@ -151953,7 +151951,7 @@ func Xsymlinkat(tls *TLS, existing uintptr, fd int32, new1 uintptr) (r int32) { trc("tls=%v existing=%v fd=%v new1=%v, (%v:)", tls, existing, fd, new1, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_symlinkat), int64(existing), int64(fd), int64(new1))))) } func Xsync(tls *TLS) { @@ -151994,7 +151992,7 @@ func Xtruncate(tls *TLS, path uintptr, length Toff_t) (r int32) { trc("tls=%v path=%v length=%v, (%v:)", tls, path, length, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_truncate), int64(path), length)))) } /* Support signed or unsigned plain-char */ @@ -152039,12 +152037,12 @@ func Xttyname_r(tls *TLS, fd int32, name uintptr, size Tsize_t) (r int32) { if !(Xisatty(tls, fd) != 0) { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } - X__procfdname(tls, bp+288, uint32(fd)) + X__procfdname(tls, bp+288, Uint32FromInt32(fd)) l = Xreadlink(tls, bp+288, name, size) if l < 0 { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } else { - if uint64(l) == size { + if Uint64FromInt64(l) == size { return int32(ERANGE) } } @@ -152069,14 +152067,14 @@ func Xualarm(tls *TLS, value uint32, interval uint32) (r uint32) { var _ /* it_old at bp+32 */ Titimerval *(*Titimerval)(unsafe.Pointer(bp)) = Titimerval{ Fit_interval: Ttimeval{ - Ftv_usec: int64(interval), + Ftv_usec: Int64FromUint32(interval), }, Fit_value: Ttimeval{ - Ftv_usec: int64(value), + Ftv_usec: Int64FromUint32(value), }, } Xsetitimer(tls, ITIMER_REAL, bp, bp+32) - return uint32((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) + return Uint32FromInt64((*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_sec*int64(1000000) + (*(*Titimerval)(unsafe.Pointer(bp + 32))).Fit_value.Ftv_usec) } func Xunlink(tls *TLS, path uintptr) (r int32) { @@ -152084,7 +152082,7 @@ func Xunlink(tls *TLS, path uintptr) (r int32) { trc("tls=%v path=%v, (%v:)", tls, path, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_unlink), int64(path))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall1(tls, int64(SYS_unlink), int64(path))))) } func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { @@ -152092,7 +152090,7 @@ func Xunlinkat(tls *TLS, fd int32, path uintptr, flag int32) (r int32) { trc("tls=%v fd=%v path=%v flag=%v, (%v:)", tls, fd, path, flag, origin(2)) defer func() { trc("-> %v", r) }() } - return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) + return int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall3(tls, int64(SYS_unlinkat), int64(fd), int64(path), int64(flag))))) } func Xusleep(tls *TLS, useconds uint32) (r int32) { @@ -152104,8 +152102,8 @@ func Xusleep(tls *TLS, useconds uint32) (r int32) { defer tls.Free(16) var _ /* tv at bp+0 */ Ttimespec *(*Ttimespec)(unsafe.Pointer(bp)) = Ttimespec{ - Ftv_sec: int64(useconds / uint32(1000000)), - Ftv_nsec: int64(useconds % uint32(1000000) * uint32(1000)), + Ftv_sec: Int64FromUint32(useconds / uint32(1000000)), + Ftv_nsec: Int64FromUint32(useconds % uint32(1000000) * uint32(1000)), } return Xnanosleep(tls, bp, bp) } @@ -152115,7 +152113,7 @@ func Xwrite(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_write), int64(fd), int64(buf), Int64FromUint64(count), 0, 0, 0))) } func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -152123,7 +152121,7 @@ func Xwritev(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { trc("tls=%v fd=%v iov=%v count=%v, (%v:)", tls, fd, iov, count, origin(2)) defer func() { trc("-> %v", r) }() } - return X__syscall_ret(tls, uint64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) + return X__syscall_ret(tls, Uint64FromInt64(___syscall_cp(tls, int64(SYS_writev), int64(fd), int64(iov), int64(count), 0, 0, 0))) } func __ccgo_fp(f interface{}) uintptr { @@ -152498,22 +152496,22 @@ var X__fsmu8 = [51]Tuint32_t{ 11: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x0), 31: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x1), 32: (Uint32FromUint32(0x40)-Uint32FromInt32(0xc0))<>Int32FromInt32(6) | Uint32FromInt32(0x2), @@ -154420,7 +154418,7 @@ var Xsigngam int32 var X__stack_chk_guard Tuintptr_t var X__stderr_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf5)) + uintptr(UNGET), Ffd: int32(2), Flock: -int32(1), @@ -154430,7 +154428,7 @@ var X__stderr_FILE = TFILE{ var X__stderr_used = uintptr(unsafe.Pointer(&X__stderr_FILE)) var X__stdin_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NOWR)), Fbuf: uintptr(unsafe.Pointer(&_buf6)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Flock: -int32(1), @@ -154441,7 +154439,7 @@ var X__stdin_used = uintptr(unsafe.Pointer(&X__stdin_FILE)) var X__stdio_ofl_lockptr = uintptr(unsafe.Pointer(&_ofl_lock)) var X__stdout_FILE = TFILE{ - Fflags: uint32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), + Fflags: Uint32FromInt32(Int32FromInt32(F_PERM) | Int32FromInt32(F_NORD)), Fbuf: uintptr(unsafe.Pointer(&_buf7)) + uintptr(UNGET), Fbuf_size: Uint64FromInt64(1032) - Uint64FromInt32(UNGET), Ffd: int32(1), diff --git a/vendor/modernc.org/libc/libc.go b/vendor/modernc.org/libc/libc.go index e825782c..2a7988bd 100644 --- a/vendor/modernc.org/libc/libc.go +++ b/vendor/modernc.org/libc/libc.go @@ -722,7 +722,12 @@ func X__builtin_object_size(t *TLS, p uintptr, typ int32) types.Size_t { if __ccgo_strace { trc("t=%v p=%v typ=%v, (%v:)", t, p, typ, origin(2)) } - return ^types.Size_t(0) //TODO frontend magic + switch typ { + case 0, 1: + return ^types.Size_t(0) + default: + return 0 + } } var atomicLoadStore16 sync.Mutex diff --git a/vendor/modernc.org/libc/libc_all.go b/vendor/modernc.org/libc/libc_all.go index 196b81bc..6e3b9776 100644 --- a/vendor/modernc.org/libc/libc_all.go +++ b/vendor/modernc.org/libc/libc_all.go @@ -5,8 +5,8 @@ package libc // import "modernc.org/libc" import ( - "unsafe" "sync/atomic" + "unsafe" "golang.org/x/exp/constraints" ) diff --git a/vendor/modernc.org/libc/libc_linux_386.go b/vendor/modernc.org/libc/libc_linux_386.go new file mode 100644 index 00000000..5d6d0895 --- /dev/null +++ b/vendor/modernc.org/libc/libc_linux_386.go @@ -0,0 +1,38 @@ +// Copyright 2024 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package libc // import "modernc.org/libc" + +import ( + "syscall" + "unsafe" +) + +func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { + if __ccgo_strace { + trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) + defer func() { trc("-> %v", r) }() + } + n, err := syscall.Pread(int(fd), unsafe.Slice((*byte)(unsafe.Pointer(buf)), size), ofs) + if err != nil { + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(err.(syscall.Errno)) + return -1 + } + + return Tssize_t(n) +} + +func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { + if __ccgo_strace { + trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) + defer func() { trc("-> %v", r) }() + } + n, err := syscall.Pwrite(int(fd), unsafe.Slice((*byte)(unsafe.Pointer(buf)), size), ofs) + if err != nil { + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(err.(syscall.Errno)) + return -1 + } + + return Tssize_t(n) +} diff --git a/vendor/modernc.org/libc/libc_linux_arm.go b/vendor/modernc.org/libc/libc_linux_arm.go new file mode 100644 index 00000000..a3aef14e --- /dev/null +++ b/vendor/modernc.org/libc/libc_linux_arm.go @@ -0,0 +1,91 @@ +// Copyright 2024 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package libc // import "modernc.org/libc" + +import ( + "unsafe" + + "golang.org/x/sys/unix" +) + +func Xpread(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { + if __ccgo_strace { + trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) + defer func() { trc("-> %v", r) }() + } + n, err := unix.Pread(int(fd), unsafe.Slice((*byte)(unsafe.Pointer(buf)), size), ofs) + if err != nil { + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(err.(unix.Errno)) + return -1 + } + + return Tssize_t(n) +} + +func Xpwrite(tls *TLS, fd int32, buf uintptr, size Tsize_t, ofs Toff_t) (r Tssize_t) { + if __ccgo_strace { + trc("tls=%v fd=%v buf=%v size=%v ofs=%v, (%v:)", tls, fd, buf, size, ofs, origin(2)) + defer func() { trc("-> %v", r) }() + } + n, err := unix.Pwrite(int(fd), unsafe.Slice((*byte)(unsafe.Pointer(buf)), size), ofs) + if err != nil { + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(err.(unix.Errno)) + return -1 + } + + return Tssize_t(n) +} + +func Xftruncate(tls *TLS, fd int32, length Toff_t) (r int32) { + if __ccgo_strace { + trc("tls=%v fd=%v length=%v, (%v:)", tls, fd, length, origin(2)) + defer func() { trc("-> %v", r) }() + } + //return X__syscall_ret(tls, uint32(X__syscall2(tls, int32(SYS_ftruncate64), fd, int32(length)))) + if err := unix.Ftruncate(int(fd), length); err != nil { + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(err.(unix.Errno)) + return -1 + } + + return 0 +} + +func _read(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { + return Xread(tls, fd, buf, count) +} + +func Xread(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { + if __ccgo_strace { + trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) + defer func() { trc("-> %v", r) }() + } + // return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_read), fd, int32(buf), int32(count), 0, 0, 0))) + n, err := unix.Read(int(fd), unsafe.Slice((*byte)(unsafe.Pointer(buf)), count)) + if err != nil { + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(err.(unix.Errno)) + return -1 + } + + return Tssize_t(n) +} + +func _write(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { + return Xwrite(tls, fd, buf, count) +} + +func Xwrite(tls *TLS, fd int32, buf uintptr, count Tsize_t) (r Tssize_t) { + if __ccgo_strace { + trc("tls=%v fd=%v buf=%v count=%v, (%v:)", tls, fd, buf, count, origin(2)) + defer func() { trc("-> %v", r) }() + } + // return X__syscall_ret(tls, uint32(___syscall_cp(tls, int32(SYS_write), fd, int32(buf), int32(count), 0, 0, 0))) + n, err := unix.Write(int(fd), unsafe.Slice((*byte)(unsafe.Pointer(buf)), count)) + if err != nil { + *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(err.(unix.Errno)) + return -1 + } + + return Tssize_t(n) +} diff --git a/vendor/modernc.org/libc/libc_musl_linux_arm.go b/vendor/modernc.org/libc/libc_musl_linux_arm.go index 2d89c0ea..2fe28c70 100644 --- a/vendor/modernc.org/libc/libc_musl_linux_arm.go +++ b/vendor/modernc.org/libc/libc_musl_linux_arm.go @@ -61,8 +61,8 @@ func _a_sc(*TLS, uintptr, int32) int32 { } // static inline int a_ll(volatile int *p) -func _a_ll(*TLS, uintptr) int32 { - panic(todo("")) +func _a_ll(tls *TLS, p uintptr) int32 { + return atomic.LoadInt32((*int32)(unsafe.Pointer(p))) } func _a_clz_32(tls *TLS, x uint32) int32 { diff --git a/vendor/modernc.org/libc/unconvert.sh b/vendor/modernc.org/libc/unconvert.sh index 757e6f47..93fba250 100644 --- a/vendor/modernc.org/libc/unconvert.sh +++ b/vendor/modernc.org/libc/unconvert.sh @@ -3,3 +3,4 @@ until unconvert -fastmath ./... do unconvert -fastmath -apply ./... done +git checkout -f pthread_musl.go diff --git a/vendor/modernc.org/mathutil/Makefile b/vendor/modernc.org/mathutil/Makefile index 879017db..0e144134 100644 --- a/vendor/modernc.org/mathutil/Makefile +++ b/vendor/modernc.org/mathutil/Makefile @@ -28,7 +28,7 @@ cpu: clean go tool pprof -lines *.test cpu.out edit: - @ 1>/dev/null 2>/dev/null gvim -p Makefile *.go & + @ 1>/dev/null 2>/dev/null gvim -p Makefile go.mod builder.json *.go & editor: gofmt -l -s -w *.go diff --git a/vendor/modernc.org/mathutil/builder.json b/vendor/modernc.org/mathutil/builder.json new file mode 100644 index 00000000..029d1414 --- /dev/null +++ b/vendor/modernc.org/mathutil/builder.json @@ -0,0 +1,6 @@ +{ + "autogen": "", + "autoupdate": ".", + "autotag": ".", + "test": "." +} diff --git a/vendor/modernc.org/mathutil/mathutil.go b/vendor/modernc.org/mathutil/mathutil.go index 6db66409..a73c8a6e 100644 --- a/vendor/modernc.org/mathutil/mathutil.go +++ b/vendor/modernc.org/mathutil/mathutil.go @@ -5,7 +5,7 @@ // Package mathutil provides utilities supplementing the standard 'math' and // 'math/rand' packages. // -// Release history and compatibility issues +// # Release history and compatibility issues // // 2020-12-20 v1.2.1 fixes MulOverflowInt64. // @@ -14,50 +14,52 @@ // 2018-10-21 Added BinaryLog // // 2018-04-25: New functions for determining Max/Min of nullable values. Ex: -// func MaxPtr(a, b *int) *int { -// func MinPtr(a, b *int) *int { -// func MaxBytePtr(a, b *byte) *byte { -// func MinBytePtr(a, b *byte) *byte { -// ... +// +// func MaxPtr(a, b *int) *int { +// func MinPtr(a, b *int) *int { +// func MaxBytePtr(a, b *byte) *byte { +// func MinBytePtr(a, b *byte) *byte { +// ... // // 2017-10-14: New variadic functions for Max/Min. Ex: -// func MaxVal(val int, vals ...int) int { -// func MinVal(val int, vals ...int) int { -// func MaxByteVal(val byte, vals ...byte) byte { -// func MinByteVal(val byte, vals ...byte) byte { -// ... +// +// func MaxVal(val int, vals ...int) int { +// func MinVal(val int, vals ...int) int { +// func MaxByteVal(val byte, vals ...byte) byte { +// func MinByteVal(val byte, vals ...byte) byte { +// ... // // 2016-10-10: New functions QuadPolyDiscriminant and QuadPolyFactors. // // 2013-12-13: The following functions have been REMOVED // -// func Uint64ToBigInt(n uint64) *big.Int -// func Uint64FromBigInt(n *big.Int) (uint64, bool) +// func Uint64ToBigInt(n uint64) *big.Int +// func Uint64FromBigInt(n *big.Int) (uint64, bool) // // 2013-05-13: The following functions are now DEPRECATED // -// func Uint64ToBigInt(n uint64) *big.Int -// func Uint64FromBigInt(n *big.Int) (uint64, bool) +// func Uint64ToBigInt(n uint64) *big.Int +// func Uint64FromBigInt(n *big.Int) (uint64, bool) // // These functions will be REMOVED with Go release 1.1+1. // // 2013-01-21: The following functions have been REMOVED // -// func MaxInt() int -// func MinInt() int -// func MaxUint() uint -// func UintPtrBits() int +// func MaxInt() int +// func MinInt() int +// func MaxUint() uint +// func UintPtrBits() int // // They are now replaced by untyped constants // -// MaxInt -// MinInt -// MaxUint -// UintPtrBits +// MaxInt +// MinInt +// MaxUint +// UintPtrBits // // Additionally one more untyped constant was added // -// IntBits +// IntBits // // This change breaks any existing code depending on the above removed // functions. They should have not been published in the first place, that was @@ -71,8 +73,8 @@ // 1.0.3+1 and REMOVED with Go release 1.0.3+2, b/c of // http://code.google.com/p/go/source/detail?r=954a79ee3ea8 // -// func Uint64ToBigInt(n uint64) *big.Int -// func Uint64FromBigInt(n *big.Int) (uint64, bool) +// func Uint64ToBigInt(n uint64) *big.Int +// func Uint64FromBigInt(n *big.Int) (uint64, bool) package mathutil // import "modernc.org/mathutil" import ( @@ -507,20 +509,20 @@ k == 1. Wrt pseudocode shown at http://en.wikipedia.org/wiki/Miller-Rabin_primality_test#Algorithm_and_running_time - Input: n > 3, an odd integer to be tested for primality; - Input: k, a parameter that determines the accuracy of the test - Output: composite if n is composite, otherwise probably prime - write n − 1 as 2^s·d with d odd by factoring powers of 2 from n − 1 - LOOP: repeat k times: - pick a random integer a in the range [2, n − 2] - x ← a^d mod n - if x = 1 or x = n − 1 then do next LOOP - for r = 1 .. s − 1 - x ← x^2 mod n - if x = 1 then return composite - if x = n − 1 then do next LOOP - return composite - return probably prime + Input: n > 3, an odd integer to be tested for primality; + Input: k, a parameter that determines the accuracy of the test + Output: composite if n is composite, otherwise probably prime + write n − 1 as 2^s·d with d odd by factoring powers of 2 from n − 1 + LOOP: repeat k times: + pick a random integer a in the range [2, n − 2] + x ← a^d mod n + if x = 1 or x = n − 1 then do next LOOP + for r = 1 .. s − 1 + x ← x^2 mod n + if x = 1 then return composite + if x = n − 1 then do next LOOP + return composite + return probably prime ... this function behaves like passing 1 for 'k' and additionally a fixed/non-random 'a'. Otherwise it's the same algorithm. @@ -1385,7 +1387,7 @@ func ClampInt64(v, lo, hi int64) int64 { // ToBase produces n in base b. For example // -// ToBase(2047, 22) -> [1, 5, 4] +// ToBase(2047, 22) -> [1, 5, 4] // // 1 * 22^0 1 // 5 * 22^1 110 diff --git a/vendor/modernc.org/mathutil/rat.go b/vendor/modernc.org/mathutil/rat.go index 2f3742f7..a4829ec1 100644 --- a/vendor/modernc.org/mathutil/rat.go +++ b/vendor/modernc.org/mathutil/rat.go @@ -6,10 +6,9 @@ package mathutil // import "modernc.org/mathutil" // QCmpUint32 compares a/b and c/d and returns: // -// -1 if a/b < c/d -// 0 if a/b == c/d -// +1 if a/b > c/d -// +// -1 if a/b < c/d +// 0 if a/b == c/d +// +1 if a/b > c/d func QCmpUint32(a, b, c, d uint32) int { switch x, y := uint64(a)*uint64(d), uint64(b)*uint64(c); { case x < y: diff --git a/vendor/modernc.org/mathutil/rnd.go b/vendor/modernc.org/mathutil/rnd.go index 598bad4f..08454cd8 100644 --- a/vendor/modernc.org/mathutil/rnd.go +++ b/vendor/modernc.org/mathutil/rnd.go @@ -15,12 +15,12 @@ import ( // this code doesn't produce values at constant delta (mod cycle length). // The 32 bit limit is per this implementation, the algorithm used has no intrinsic limit on the cycle size. // Properties include: -// - Adjustable limits on creation (hi, lo). -// - Positionable/randomly accessible (Pos, Seek). -// - Repeatable (deterministic). -// - Can run forward or backward (Next, Prev). -// - For a billion numbers cycle the Next/Prev PRN can be produced in cca 100-150ns. -// That's like 5-10 times slower compared to PRNs generated using the (non FC) rand package. +// - Adjustable limits on creation (hi, lo). +// - Positionable/randomly accessible (Pos, Seek). +// - Repeatable (deterministic). +// - Can run forward or backward (Next, Prev). +// - For a billion numbers cycle the Next/Prev PRN can be produced in cca 100-150ns. +// That's like 5-10 times slower compared to PRNs generated using the (non FC) rand package. type FC32 struct { cycle int64 // On average: 3 * delta / 2, (HQ: 2 * delta) delta int64 // hi - lo diff --git a/vendor/modernc.org/memory/AUTHORS b/vendor/modernc.org/memory/AUTHORS index 599ec406..1c9e7bf3 100644 --- a/vendor/modernc.org/memory/AUTHORS +++ b/vendor/modernc.org/memory/AUTHORS @@ -8,6 +8,7 @@ # # Please keep the list sorted. +Chris Waldon Gleb Sakhnov Jan Mercl <0xjnml@gmail.com> Scot C Bontrager diff --git a/vendor/modernc.org/memory/CONTRIBUTORS b/vendor/modernc.org/memory/CONTRIBUTORS index e26a49e0..df91c088 100644 --- a/vendor/modernc.org/memory/CONTRIBUTORS +++ b/vendor/modernc.org/memory/CONTRIBUTORS @@ -7,6 +7,7 @@ # Please keep the list sorted. Anup Kodlekere +Chris Waldon Gleb Sakhnov Jan Mercl <0xjnml@gmail.com> Scot C Bontrager diff --git a/vendor/modernc.org/memory/Makefile b/vendor/modernc.org/memory/Makefile index 1c033fc5..f844f131 100644 --- a/vendor/modernc.org/memory/Makefile +++ b/vendor/modernc.org/memory/Makefile @@ -30,7 +30,7 @@ cpu: clean go tool pprof -lines *.test cpu.out edit: - @ 1>/dev/null 2>/dev/null gvim -p Makefile *.go & + @ 1>/dev/null 2>/dev/null gvim -p Makefile go.mod builder.json *.go & editor: gofmt -l -s -w *.go diff --git a/vendor/modernc.org/memory/builder.json b/vendor/modernc.org/memory/builder.json index c84be24e..029d1414 100644 --- a/vendor/modernc.org/memory/builder.json +++ b/vendor/modernc.org/memory/builder.json @@ -1,6 +1,6 @@ { - "autogen": "none", - "autotag": "darwin/(amd64|arm64)|freebsd/(amd64|arm64)|linux/(386|amd64|arm|arm64|loong64|ppc64le|riscv64|s390x)|openbsd/amd64|windows/(amd64|arm64)", - "autoupdate": "darwin/(amd64|arm64)|freebsd/(amd64|arm64)|linux/(386|amd64|arm|arm64|loong64|ppc64le|riscv64|s390x)|openbsd/amd64|windows/(amd64|arm64)", - "test": "darwin/(amd64|arm64)|freebsd/(amd64|arm64)|linux/(386|amd64|arm|arm64|loong64|ppc64le|riscv64|s390x)|openbsd/amd64|windows/(amd64|arm64)" + "autogen": "", + "autoupdate": ".", + "autotag": ".", + "test": "." } diff --git a/vendor/modernc.org/memory/mmap_windows.go b/vendor/modernc.org/memory/mmap_windows.go index 3c402039..f085a22c 100644 --- a/vendor/modernc.org/memory/mmap_windows.go +++ b/vendor/modernc.org/memory/mmap_windows.go @@ -6,7 +6,7 @@ package memory // import "modernc.org/memory" import ( "os" - "syscall" + syscall "golang.org/x/sys/windows" ) const ( @@ -22,7 +22,7 @@ const ( const pageSizeLog = 16 var ( - modkernel32 = syscall.NewLazyDLL("kernel32.dll") + modkernel32 = syscall.NewLazySystemDLL("kernel32.dll") osPageMask = osPageSize - 1 osPageSize = os.Getpagesize() procVirtualAlloc = modkernel32.NewProc("VirtualAlloc") diff --git a/vendor/modernc.org/sqlite/CONTRIBUTORS b/vendor/modernc.org/sqlite/CONTRIBUTORS index 853cbb56..e9ea3aff 100644 --- a/vendor/modernc.org/sqlite/CONTRIBUTORS +++ b/vendor/modernc.org/sqlite/CONTRIBUTORS @@ -37,3 +37,4 @@ Steffen Butzer Toni Spets W. Michael Petullo Yaacov Akiba Slama +Prathyush PV diff --git a/vendor/modernc.org/sqlite/lib/hooks.go b/vendor/modernc.org/sqlite/lib/hooks.go index 9bedb87a..4bd919b8 100644 --- a/vendor/modernc.org/sqlite/lib/hooks.go +++ b/vendor/modernc.org/sqlite/lib/hooks.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !(linux && arm64) + package sqlite3 import ( @@ -12,3 +14,7 @@ import ( func X__ccgo_sqlite3_log(t *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:29405:17: */ libc.X__ccgo_sqlite3_log(t, iErrCode, zFormat, va) } + +func PatchIssue199() { + // nop +} diff --git a/vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go b/vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go new file mode 100644 index 00000000..be3873bf --- /dev/null +++ b/vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go @@ -0,0 +1,30 @@ +// Copyright 2019 The Sqlite Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sqlite3 + +import ( + "syscall" + "unsafe" + + "modernc.org/libc" +) + +// Format and write a message to the log if logging is enabled. +func X__ccgo_sqlite3_log(t *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:29405:17: */ + libc.X__ccgo_sqlite3_log(t, iErrCode, zFormat, va) +} + +// https://gitlab.com/cznic/sqlite/-/issues/199 +// +// We are currently stuck on libc@v1.55.3. Until that is resolved - fix the +// problem at runtime. +func PatchIssue199() { + p := unsafe.Pointer(&_aSyscall) + *(*uintptr)(unsafe.Add(p, 608)) = __ccgo_fp(_unixGetpagesizeIssue199) +} + +func _unixGetpagesizeIssue199(tls *libc.TLS) (r int32) { + return int32(syscall.Getpagesize()) +} diff --git a/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go index 827d9b06..e856b001 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go @@ -230897,4 +230897,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go b/vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go index 97211c80..78f2aeb3 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go @@ -230452,4 +230452,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go index 5b7a7293..695a5b8c 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go @@ -225512,4 +225512,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go index ce9ed9cc..1883ce6b 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go @@ -225523,4 +225523,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go index a454f237..a099d036 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go @@ -231929,4 +231929,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go index 172b9f29..e52d6a89 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go @@ -225728,4 +225728,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go index 49eb1ec1..964a2676 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go @@ -232454,4 +232454,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go index 57386d72..15ba9a25 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go @@ -231974,4 +231974,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_loong64.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_loong64.go index 2888a1c3..83675cad 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_loong64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_loong64.go @@ -225817,4 +225817,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go index e4915c3b..a851859b 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go @@ -231955,4 +231955,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go index 3aedd92b..dd2bf77e 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go @@ -231918,4 +231918,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go index 2c276e6c..81f1426a 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go @@ -231852,4 +231852,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_windows.go b/vendor/modernc.org/sqlite/lib/sqlite_windows.go index 49ff6d6d..6afacb32 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_windows.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_windows.go @@ -94277,7 +94277,7 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bArgList, base, bufpt, c, cThousand, ch, ch1, cset, done, e2, escarg, exp, flag_alternateform, flag_altform2, flag_dp, flag_leftjustify, flag_long, flag_prefix, flag_rtz, flag_zeropad, i, i1, iRound, idx, ii, infop, isnull, ix, j, j1, k, length, longvalue, n, n1, nCopyBytes, nOut, nPad, nPrior, needQuote, nn, pArgList, pExpr, pItem, pSel, pToken, pre, precision, prefix, px, q, realvalue, szBufNeeded, v, width, wx, x, x1, xtype, z, zExtra, zOut, v10, v100, v101, v102, v103, v104, v106, v107, v108, v109, v11, v110, v111, v12, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v3, v4, v45, v46, v47, v48, v49, v5, v51, v52, v54, v55, v56, v57, v58, v59, v6, v60, v61, v62, v64, v65, v66, v67, v68, v7, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v8, v80, v81, v82, v83, v85, v86, v87, v88, v89, v9, v90, v91, v93, v94, v96, v97, v98, p92 /* Thousands separator for %d and %u */ xtype = uint8(etINVALID) /* Size of the rendering buffer */ zExtra = uintptr(0) /* True if trailing zeros should be removed */ - pArgList = uintptr(0) /* Conversion buffer */ + pArgList = uintptr(0) /* Conversion buffer */ /* pAccum never starts out with an empty buffer that was obtained from ** malloc(). This precondition is required by the mprintf("%z...") ** optimization. */ @@ -97796,14 +97796,14 @@ func _sqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc T var _ /* rr at bp+0 */ [2]float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, e, eType, eValid, esign, i, incr, nDigit, r, s, s2, sign, zEnd, v2, v3, v4 /* sign * significand * (10 ^ (esign * exponent)) */ - sign = int32(1) /* sign of significand */ - s = uint64(0) /* significand */ - d = 0 /* adjust exponent for shifting decimal point */ - esign = int32(1) /* sign of exponent */ - e = 0 /* exponent */ - eValid = int32(1) /* True exponent is either not used or is well-formed */ - nDigit = 0 /* Number of digits processed */ - eType = int32(1) /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */ + sign = int32(1) /* sign of significand */ + s = uint64(0) /* significand */ + d = 0 /* adjust exponent for shifting decimal point */ + esign = int32(1) /* sign of exponent */ + e = 0 /* exponent */ + eValid = int32(1) /* True exponent is either not used or is well-formed */ + nDigit = 0 /* Number of digits processed */ + eType = int32(1) /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */ *(*float64)(unsafe.Pointer(pResult)) = float64(0) /* Default return value, in case of an error */ if length == 0 { return 0 @@ -103328,7 +103328,7 @@ func _winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int3 ** a temporary file. Use this buffer to store the file name in. */ *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) /* For temporary filename, if necessary. */ - rc = SQLITE_OK /* Function Return Code */ + rc = SQLITE_OK /* Function Return Code */ isExclusive = flags & int32(SQLITE_OPEN_EXCLUSIVE) isDelete = flags & int32(SQLITE_OPEN_DELETEONCLOSE) isCreate = flags & int32(SQLITE_OPEN_CREATE) @@ -111336,7 +111336,7 @@ func _readDbPage(tls *libc.TLS, pPg uintptr) (r int32) { _, _, _, _ = dbFileVers, iOffset, pPager, rc pPager = (*TPgHdr)(unsafe.Pointer(pPg)).FpPager /* Pager object associated with page pPg */ rc = SQLITE_OK /* Return code */ - *(*Tu32)(unsafe.Pointer(bp)) = uint32(0) /* Frame of WAL containing pgno */ + *(*Tu32)(unsafe.Pointer(bp)) = uint32(0) /* Frame of WAL containing pgno */ if (*TPager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { rc = _sqlite3WalFindFrame(tls, (*TPager)(unsafe.Pointer(pPager)).FpWal, (*TPgHdr)(unsafe.Pointer(pPg)).Fpgno, bp) if rc != 0 { @@ -130461,7 +130461,7 @@ func _btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags var _ /* pgnoRoot at bp+8 */ TPgno var _ /* rc at bp+12 */ int32 _, _ = pBt, ptfFlags - pBt = (*TBtree)(unsafe.Pointer(p)).FpBt /* Page-type flags for the root page of new table */ + pBt = (*TBtree)(unsafe.Pointer(p)).FpBt /* Page-type flags for the root page of new table */ if (*TBtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { /* The page to move to. */ /* Creating a new table may probably require moving an existing database ** to make room for the new tables root page. In case this page turns @@ -136679,8 +136679,8 @@ func _sqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { ** opcode array. This extra memory will be reallocated for other elements ** of the prepared statement. */ - n = int32(libc.Uint64FromInt64(24) * uint64((*TVdbe)(unsafe.Pointer(p)).FnOp)) /* Bytes of opcode memory used */ - (*(*TReusableSpace)(unsafe.Pointer(bp + 8))).FpSpace = (*TVdbe)(unsafe.Pointer(p)).FaOp + uintptr(n) /* Unused opcode memory */ + n = int32(libc.Uint64FromInt64(24) * uint64((*TVdbe)(unsafe.Pointer(p)).FnOp)) /* Bytes of opcode memory used */ + (*(*TReusableSpace)(unsafe.Pointer(bp + 8))).FpSpace = (*TVdbe)(unsafe.Pointer(p)).FaOp + uintptr(n) /* Unused opcode memory */ (*(*TReusableSpace)(unsafe.Pointer(bp + 8))).FnFree = int64(((*TParse)(unsafe.Pointer(pParse)).FszOpAlloc - n) & ^libc.Int32FromInt32(7)) /* Bytes of unused memory */ _resolveP2Values(tls, p, bp) libc.SetBitFieldPtr16Uint32(p+200, uint32(libc.BoolUint8((*TParse)(unsafe.Pointer(pParse)).FisMultiWrite != 0 && (*TParse)(unsafe.Pointer(pParse)).FmayAbort != 0)), 5, 0x20) @@ -167288,7 +167288,7 @@ func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nColUp = nCol nKeyCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) /* Allocate the space required for the StatAccum object */ - n = int32(uint64(136) + uint64(8)*uint64(uint64(nColUp))) /* StatAccum.anDLt */ + n = int32(uint64(136) + uint64(8)*uint64(uint64(nColUp))) /* StatAccum.anDLt */ n = int32(uint64(n) + libc.Uint64FromInt64(8)*uint64(uint64(nColUp))) /* StatAccum.anEq */ if mxSample != 0 { n = int32(uint64(n) + (libc.Uint64FromInt64(8)*uint64(uint64(nColUp)) + libc.Uint64FromInt64(48)*uint64(nCol+mxSample) + libc.Uint64FromInt64(8)*libc.Uint64FromInt32(3)*uint64(uint64(nColUp))*uint64(nCol+mxSample))) @@ -174242,7 +174242,7 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP func _sqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol Ti16, nExtra int32, ppExtra uintptr) (r uintptr) { var nByte int32 var p, pExtra uintptr - _, _, _ = nByte, p, pExtra /* Bytes of space for Index object + arrays */ + _, _, _ = nByte, p, pExtra /* Bytes of space for Index object + arrays */ nByte = int32((libc.Uint64FromInt64(160)+libc.Uint64FromInt32(7))&uint64(^libc.Int32FromInt32(7)) + (uint64(8)*uint64(uint64(nCol))+uint64(7))&uint64(^libc.Int32FromInt32(7)) + (uint64(2)*uint64(int32(int32(nCol))+libc.Int32FromInt32(1))+uint64(2)*uint64(uint64(nCol))+uint64(1)*uint64(uint64(nCol))+uint64(7))&uint64(^libc.Int32FromInt32(7))) /* Index.aSortOrder */ p = _sqlite3DbMallocZero(tls, db, uint64(nByte+nExtra)) if p != 0 { @@ -183673,7 +183673,7 @@ func _autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) (r in v3 = pToplevel + 56 *(*int32)(unsafe.Pointer(v3))++ v2 = *(*int32)(unsafe.Pointer(v3)) - (*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr = v2 /* Max rowid register */ + (*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr = v2 /* Max rowid register */ *(*int32)(unsafe.Pointer(pToplevel + 56)) += int32(2) /* Rowid in sqlite_sequence + orig max val */ } memId = (*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr @@ -209650,7 +209650,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iCovCur = v44 v47 = pParse + 56 *(*int32)(unsafe.Pointer(v47))++ - v46 = *(*int32)(unsafe.Pointer(v47)) /* Cursor used for index scans (if any) */ + v46 = *(*int32)(unsafe.Pointer(v47)) /* Cursor used for index scans (if any) */ regReturn = v46 /* Register used with OP_Gosub */ regRowset = 0 /* Register for RowSet object */ regRowid = 0 /* Register holding rowid */ @@ -232092,14 +232092,14 @@ _137: *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)) = _sqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+uintptr(-libc.Int32FromInt32(2))*24+8, yymsp+8) /*A-overwrites-X*/ goto _346 _138: - ; /* xfullname ::= nm DOT nm AS nm */ + ; /* xfullname ::= nm DOT nm AS nm */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8)) = _sqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+uintptr(-libc.Int32FromInt32(4))*24+8, yymsp+uintptr(-libc.Int32FromInt32(2))*24+8) /*A-overwrites-X*/ if *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8)) != 0 { (*(*TSrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8)) + 8))).FzAlias = _sqlite3NameFromToken(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, yymsp+8) } goto _346 _139: - ; /* xfullname ::= nm AS nm */ + ; /* xfullname ::= nm AS nm */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)) = _sqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+uintptr(-libc.Int32FromInt32(2))*24+8, uintptr(0)) /*A-overwrites-X*/ if *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)) != 0 { (*(*TSrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)) + 8))).FzAlias = _sqlite3NameFromToken(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, yymsp+8) @@ -232157,7 +232157,7 @@ _151: _sqlite3ExprListSetSortOrder(tls, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8))) goto _346 _152: - ; /* sortlist ::= expr sortorder nulls */ + ; /* sortlist ::= expr sortorder nulls */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)) = _sqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8))) /*A-overwrites-Y*/ _sqlite3ExprListSetSortOrder(tls, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8))) goto _346 @@ -232736,7 +232736,7 @@ _253: *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8)) = _parserAddExprIdListTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8)), yymsp+uintptr(-libc.Int32FromInt32(2))*24+8, *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8))) goto _346 _254: - ; /* eidlist ::= nm collate sortorder */ + ; /* eidlist ::= nm collate sortorder */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)) = _parserAddExprIdListTerm(tls, pParse, uintptr(0), yymsp+uintptr(-libc.Int32FromInt32(2))*24+8, *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8))) /*A-overwrites-Y*/ goto _346 _255: @@ -232851,7 +232851,7 @@ _280: *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(8))*24 + 8)) = *(*uintptr)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) goto _346 _281: - ; /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ + ; /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ *(*uintptr)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) = _sqlite3TriggerInsertStep(tls, pParse, yymsp+uintptr(-libc.Int32FromInt32(4))*24+8, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(3))*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)), uint8(*(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(6))*24 + 8))), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(7))*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) /*yylhsminor.yy427-overwrites-yymsp[-6].minor.yy144*/ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(7))*24 + 8)) = *(*uintptr)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) goto _346 @@ -232980,7 +232980,7 @@ _311: *(*Tu8)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)) = uint8(M10d_No) goto _346 _312: - ; /* wqitem ::= withnm eidlist_opt wqas LP select RP */ + ; /* wqitem ::= withnm eidlist_opt wqas LP select RP */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(5))*24 + 8)) = _sqlite3CteNew(tls, pParse, yymsp+uintptr(-libc.Int32FromInt32(5))*24+8, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)), *(*Tu8)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(3))*24 + 8))) /*A-overwrites-X*/ goto _346 _313: @@ -232988,7 +232988,7 @@ _313: (*TParse)(unsafe.Pointer(pParse)).FbHasWith = uint8(1) goto _346 _314: - ; /* wqlist ::= wqitem */ + ; /* wqlist ::= wqitem */ *(*uintptr)(unsafe.Pointer(yymsp + 8)) = _sqlite3WithAdd(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 8))) /*A-overwrites-X*/ goto _346 _315: @@ -263572,7 +263572,7 @@ func _sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite var _ /* i at bp+0 */ Tu64 var _ /* r at bp+8 */ float64 _, _, _, _, _ = eType, n, nByte, nVarint, z /* Size of serialized value in bytes */ - if pValue != 0 { /* Value type (SQLITE_NULL, TEXT etc.) */ + if pValue != 0 { /* Value type (SQLITE_NULL, TEXT etc.) */ eType = Xsqlite3_value_type(tls, pValue) if aBuf != 0 { *(*Tu8)(unsafe.Pointer(aBuf)) = uint8(uint8(eType)) @@ -291297,7 +291297,7 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr var nByte Tsqlite3_int64 var p, zCols, zDefn, v1 uintptr _, _, _, _, _, _, _, _, _ = i, iOff, nByte, nDefn, p, rc, zCols, zDefn, v1 - rc = SQLITE_OK /* Bytes of space to allocate */ + rc = SQLITE_OK /* Bytes of space to allocate */ nByte = int64(uint64(128) + uint64((*TFts5Config)(unsafe.Pointer(pConfig)).FnCol)*uint64(8)) /* Fts5Storage.aTotalSize[] */ v1 = Xsqlite3_malloc64(tls, uint64(uint64(nByte))) p = v1 @@ -300917,4 +300917,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modernc.org/sqlite/lib/sqlite_windows_386.go b/vendor/modernc.org/sqlite/lib/sqlite_windows_386.go index 2b71621c..c0d66b91 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_windows_386.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_windows_386.go @@ -94062,7 +94062,7 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bArgList, base, bufpt, c, cThousand, ch, ch1, cset, done, e2, escarg, exp, flag_alternateform, flag_altform2, flag_dp, flag_leftjustify, flag_long, flag_prefix, flag_rtz, flag_zeropad, i, i1, iRound, idx, ii, infop, isnull, ix, j, j1, k, length, longvalue, n, n1, nCopyBytes, nOut, nPad, nPrior, needQuote, nn, pArgList, pExpr, pItem, pSel, pToken, pre, precision, prefix, px, q, realvalue, szBufNeeded, v, width, wx, x, x1, xtype, z, zExtra, zOut, v10, v100, v101, v102, v103, v104, v106, v107, v108, v109, v11, v110, v111, v12, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v3, v4, v45, v46, v47, v48, v49, v5, v51, v52, v54, v55, v56, v57, v58, v59, v6, v60, v61, v62, v64, v65, v66, v67, v68, v7, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v8, v80, v81, v82, v83, v85, v86, v87, v88, v89, v9, v90, v91, v93, v94, v96, v97, v98, p92 /* Thousands separator for %d and %u */ xtype = uint8(etINVALID) /* Size of the rendering buffer */ zExtra = uintptr(0) /* True if trailing zeros should be removed */ - pArgList = uintptr(0) /* Conversion buffer */ + pArgList = uintptr(0) /* Conversion buffer */ /* pAccum never starts out with an empty buffer that was obtained from ** malloc(). This precondition is required by the mprintf("%z...") ** optimization. */ @@ -97585,14 +97585,14 @@ func _sqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc T var _ /* rr at bp+0 */ [2]float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, e, eType, eValid, esign, i, incr, nDigit, r, s, s2, sign, zEnd, v2, v3, v4 /* sign * significand * (10 ^ (esign * exponent)) */ - sign = int32(1) /* sign of significand */ - s = uint64(0) /* significand */ - d = 0 /* adjust exponent for shifting decimal point */ - esign = int32(1) /* sign of exponent */ - e = 0 /* exponent */ - eValid = int32(1) /* True exponent is either not used or is well-formed */ - nDigit = 0 /* Number of digits processed */ - eType = int32(1) /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */ + sign = int32(1) /* sign of significand */ + s = uint64(0) /* significand */ + d = 0 /* adjust exponent for shifting decimal point */ + esign = int32(1) /* sign of exponent */ + e = 0 /* exponent */ + eValid = int32(1) /* True exponent is either not used or is well-formed */ + nDigit = 0 /* Number of digits processed */ + eType = int32(1) /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */ *(*float64)(unsafe.Pointer(pResult)) = float64(0) /* Default return value, in case of an error */ if length == 0 { return 0 @@ -103121,7 +103121,7 @@ func _winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int3 ** a temporary file. Use this buffer to store the file name in. */ *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) /* For temporary filename, if necessary. */ - rc = SQLITE_OK /* Function Return Code */ + rc = SQLITE_OK /* Function Return Code */ isExclusive = flags & int32(SQLITE_OPEN_EXCLUSIVE) isDelete = flags & int32(SQLITE_OPEN_DELETEONCLOSE) isCreate = flags & int32(SQLITE_OPEN_CREATE) @@ -111142,7 +111142,7 @@ func _readDbPage(tls *libc.TLS, pPg uintptr) (r int32) { _, _, _, _ = dbFileVers, iOffset, pPager, rc pPager = (*TPgHdr)(unsafe.Pointer(pPg)).FpPager /* Pager object associated with page pPg */ rc = SQLITE_OK /* Return code */ - *(*Tu32)(unsafe.Pointer(bp)) = uint32(0) /* Frame of WAL containing pgno */ + *(*Tu32)(unsafe.Pointer(bp)) = uint32(0) /* Frame of WAL containing pgno */ if (*TPager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { rc = _sqlite3WalFindFrame(tls, (*TPager)(unsafe.Pointer(pPager)).FpWal, (*TPgHdr)(unsafe.Pointer(pPg)).Fpgno, bp) if rc != 0 { @@ -130278,7 +130278,7 @@ func _btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags var _ /* pgnoRoot at bp+4 */ TPgno var _ /* rc at bp+8 */ int32 _, _ = pBt, ptfFlags - pBt = (*TBtree)(unsafe.Pointer(p)).FpBt /* Page-type flags for the root page of new table */ + pBt = (*TBtree)(unsafe.Pointer(p)).FpBt /* Page-type flags for the root page of new table */ if (*TBtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { /* The page to move to. */ /* Creating a new table may probably require moving an existing database ** to make room for the new tables root page. In case this page turns @@ -136500,7 +136500,7 @@ func _sqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { */ n = int32((libc.Uint32FromInt64(20)*uint32((*TVdbe)(unsafe.Pointer(p)).FnOp) + libc.Uint32FromInt32(7)) & uint32(^libc.Int32FromInt32(7))) /* Bytes of opcode memory used */ (*(*TReusableSpace)(unsafe.Pointer(bp + 8))).FpSpace = (*TVdbe)(unsafe.Pointer(p)).FaOp + uintptr(n) /* Unused opcode memory */ - (*(*TReusableSpace)(unsafe.Pointer(bp + 8))).FnFree = int64(((*TParse)(unsafe.Pointer(pParse)).FszOpAlloc - n) & ^libc.Int32FromInt32(7)) /* Bytes of unused memory */ + (*(*TReusableSpace)(unsafe.Pointer(bp + 8))).FnFree = int64(((*TParse)(unsafe.Pointer(pParse)).FszOpAlloc - n) & ^libc.Int32FromInt32(7)) /* Bytes of unused memory */ _resolveP2Values(tls, p, bp) libc.SetBitFieldPtr16Uint32(p+152, uint32(libc.BoolUint8((*TParse)(unsafe.Pointer(pParse)).FisMultiWrite != 0 && (*TParse)(unsafe.Pointer(pParse)).FmayAbort != 0)), 5, 0x20) if (*TParse)(unsafe.Pointer(pParse)).Fexplain != 0 { @@ -167158,7 +167158,7 @@ func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nColUp = nCol nKeyCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) /* Allocate the space required for the StatAccum object */ - n = int32(uint32(120) + uint32(8)*uint32(uint32(nColUp))) /* StatAccum.anDLt */ + n = int32(uint32(120) + uint32(8)*uint32(uint32(nColUp))) /* StatAccum.anDLt */ n = int32(uint32(n) + libc.Uint32FromInt64(8)*uint32(uint32(nColUp))) /* StatAccum.anEq */ if mxSample != 0 { n = int32(uint32(n) + (libc.Uint32FromInt64(8)*uint32(uint32(nColUp)) + libc.Uint32FromInt64(40)*uint32(nCol+mxSample) + libc.Uint32FromInt64(8)*libc.Uint32FromInt32(3)*uint32(uint32(nColUp))*uint32(nCol+mxSample))) @@ -174112,7 +174112,7 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP func _sqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol Ti16, nExtra int32, ppExtra uintptr) (r uintptr) { var nByte int32 var p, pExtra uintptr - _, _, _ = nByte, p, pExtra /* Bytes of space for Index object + arrays */ + _, _, _ = nByte, p, pExtra /* Bytes of space for Index object + arrays */ nByte = int32((libc.Uint32FromInt64(104)+libc.Uint32FromInt32(7))&uint32(^libc.Int32FromInt32(7)) + (uint32(4)*uint32(uint32(nCol))+uint32(7))&uint32(^libc.Int32FromInt32(7)) + (uint32(2)*uint32(int32(int32(nCol))+libc.Int32FromInt32(1))+uint32(2)*uint32(uint32(nCol))+uint32(1)*uint32(uint32(nCol))+uint32(7))&uint32(^libc.Int32FromInt32(7))) /* Index.aSortOrder */ p = _sqlite3DbMallocZero(tls, db, uint64(nByte+nExtra)) if p != 0 { @@ -183549,7 +183549,7 @@ func _autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) (r in v3 = pToplevel + 44 *(*int32)(unsafe.Pointer(v3))++ v2 = *(*int32)(unsafe.Pointer(v3)) - (*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr = v2 /* Max rowid register */ + (*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr = v2 /* Max rowid register */ *(*int32)(unsafe.Pointer(pToplevel + 44)) += int32(2) /* Rowid in sqlite_sequence + orig max val */ } memId = (*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr @@ -209563,7 +209563,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iCovCur = v44 v47 = pParse + 44 *(*int32)(unsafe.Pointer(v47))++ - v46 = *(*int32)(unsafe.Pointer(v47)) /* Cursor used for index scans (if any) */ + v46 = *(*int32)(unsafe.Pointer(v47)) /* Cursor used for index scans (if any) */ regReturn = v46 /* Register used with OP_Gosub */ regRowset = 0 /* Register for RowSet object */ regRowid = 0 /* Register holding rowid */ @@ -232009,14 +232009,14 @@ _137: *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)) = _sqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+uintptr(-libc.Int32FromInt32(2))*12+4, yymsp+4) /*A-overwrites-X*/ goto _346 _138: - ; /* xfullname ::= nm DOT nm AS nm */ + ; /* xfullname ::= nm DOT nm AS nm */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)) = _sqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+uintptr(-libc.Int32FromInt32(4))*12+4, yymsp+uintptr(-libc.Int32FromInt32(2))*12+4) /*A-overwrites-X*/ if *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)) != 0 { (*(*TSrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)) + 8))).FzAlias = _sqlite3NameFromToken(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, yymsp+4) } goto _346 _139: - ; /* xfullname ::= nm AS nm */ + ; /* xfullname ::= nm AS nm */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)) = _sqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+uintptr(-libc.Int32FromInt32(2))*12+4, uintptr(0)) /*A-overwrites-X*/ if *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)) != 0 { (*(*TSrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)) + 8))).FzAlias = _sqlite3NameFromToken(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, yymsp+4) @@ -232074,7 +232074,7 @@ _151: _sqlite3ExprListSetSortOrder(tls, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)), *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)), *(*int32)(unsafe.Pointer(yymsp + 4))) goto _346 _152: - ; /* sortlist ::= expr sortorder nulls */ + ; /* sortlist ::= expr sortorder nulls */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)) = _sqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4))) /*A-overwrites-Y*/ _sqlite3ExprListSetSortOrder(tls, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)), *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)), *(*int32)(unsafe.Pointer(yymsp + 4))) goto _346 @@ -232653,7 +232653,7 @@ _253: *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)) = _parserAddExprIdListTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)), yymsp+uintptr(-libc.Int32FromInt32(2))*12+4, *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)), *(*int32)(unsafe.Pointer(yymsp + 4))) goto _346 _254: - ; /* eidlist ::= nm collate sortorder */ + ; /* eidlist ::= nm collate sortorder */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)) = _parserAddExprIdListTerm(tls, pParse, uintptr(0), yymsp+uintptr(-libc.Int32FromInt32(2))*12+4, *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)), *(*int32)(unsafe.Pointer(yymsp + 4))) /*A-overwrites-Y*/ goto _346 _255: @@ -232768,7 +232768,7 @@ _280: *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(8))*12 + 4)) = *(*uintptr)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) goto _346 _281: - ; /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ + ; /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ *(*uintptr)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) = _sqlite3TriggerInsertStep(tls, pParse, yymsp+uintptr(-libc.Int32FromInt32(4))*12+4, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(3))*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)), uint8(*(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(6))*12 + 4))), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(7))*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4))) /*yylhsminor.yy427-overwrites-yymsp[-6].minor.yy144*/ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(7))*12 + 4)) = *(*uintptr)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) goto _346 @@ -232897,7 +232897,7 @@ _311: *(*Tu8)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)) = uint8(M10d_No) goto _346 _312: - ; /* wqitem ::= withnm eidlist_opt wqas LP select RP */ + ; /* wqitem ::= withnm eidlist_opt wqas LP select RP */ *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(5))*12 + 4)) = _sqlite3CteNew(tls, pParse, yymsp+uintptr(-libc.Int32FromInt32(5))*12+4, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)), *(*Tu8)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(3))*12 + 4))) /*A-overwrites-X*/ goto _346 _313: @@ -232905,7 +232905,7 @@ _313: (*TParse)(unsafe.Pointer(pParse)).FbHasWith = uint8(1) goto _346 _314: - ; /* wqlist ::= wqitem */ + ; /* wqlist ::= wqitem */ *(*uintptr)(unsafe.Pointer(yymsp + 4)) = _sqlite3WithAdd(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 4))) /*A-overwrites-X*/ goto _346 _315: @@ -263543,7 +263543,7 @@ func _sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite var _ /* i at bp+0 */ Tu64 var _ /* r at bp+8 */ float64 _, _, _, _, _ = eType, n, nByte, nVarint, z /* Size of serialized value in bytes */ - if pValue != 0 { /* Value type (SQLITE_NULL, TEXT etc.) */ + if pValue != 0 { /* Value type (SQLITE_NULL, TEXT etc.) */ eType = Xsqlite3_value_type(tls, pValue) if aBuf != 0 { *(*Tu8)(unsafe.Pointer(aBuf)) = uint8(uint8(eType)) @@ -291384,7 +291384,7 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr var nByte Tsqlite3_int64 var p, zCols, zDefn, v1 uintptr _, _, _, _, _, _, _, _, _ = i, iOff, nByte, nDefn, p, rc, zCols, zDefn, v1 - rc = SQLITE_OK /* Bytes of space to allocate */ + rc = SQLITE_OK /* Bytes of space to allocate */ nByte = int64(uint32(72) + uint32((*TFts5Config)(unsafe.Pointer(pConfig)).FnCol)*uint32(8)) /* Fts5Storage.aTotalSize[] */ v1 = Xsqlite3_malloc64(tls, uint64(uint64(nByte))) p = v1 @@ -301017,4 +301017,3 @@ type Sqlite3_index_info = sqlite3_index_info type Sqlite3_module = sqlite3_module type Sqlite3_vtab = sqlite3_vtab type Sqlite3_vtab_cursor = sqlite3_vtab_cursor - diff --git a/vendor/modules.txt b/vendor/modules.txt index e9502985..d497c073 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# filippo.io/age v1.2.0 +# filippo.io/age v1.2.1 ## explicit; go 1.19 filippo.io/age filippo.io/age/agessh @@ -9,10 +9,6 @@ filippo.io/age/internal/stream ## explicit; go 1.20 filippo.io/edwards25519 filippo.io/edwards25519/field -# github.com/allegro/bigcache/v3 v3.1.0 -## explicit; go 1.16 -github.com/allegro/bigcache/v3 -github.com/allegro/bigcache/v3/queue # github.com/aws/aws-sdk-go-v2 v1.32.4 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/aws @@ -41,7 +37,7 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 +# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi @@ -78,7 +74,7 @@ github.com/aws/aws-sdk-go-v2/internal/ini github.com/aws/aws-sdk-go-v2/internal/v4a github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4 -# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 +# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding # github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4 @@ -114,7 +110,7 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc/types github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.22.0 +# github.com/aws/smithy-go v1.22.1 ## explicit; go 1.21 github.com/aws/smithy-go github.com/aws/smithy-go/auth @@ -146,8 +142,8 @@ github.com/aws/smithy-go/waiter # github.com/benbjohnson/clock v1.3.5 ## explicit; go 1.15 github.com/benbjohnson/clock -# github.com/conductorone/baton-sdk v0.2.51 -## explicit; go 1.21 +# github.com/conductorone/baton-sdk v0.2.65 +## explicit; go 1.22.10 github.com/conductorone/baton-sdk/internal/connector github.com/conductorone/baton-sdk/pb/c1/c1z/v1 github.com/conductorone/baton-sdk/pb/c1/connector/v2 @@ -190,9 +186,12 @@ github.com/conductorone/baton-sdk/pkg/uhttp github.com/conductorone/baton-sdk/pkg/us3 github.com/conductorone/baton-sdk/pkg/ustrings github.com/conductorone/baton-sdk/pkg/utls -# github.com/deckarep/golang-set/v2 v2.6.0 +# github.com/deckarep/golang-set/v2 v2.7.0 ## explicit; go 1.18 github.com/deckarep/golang-set/v2 +# github.com/dolthub/maphash v0.1.0 +## explicit; go 1.18 +github.com/dolthub/maphash # github.com/doug-martin/goqu/v9 v9.19.0 ## explicit; go 1.12 github.com/doug-martin/goqu/v9 @@ -214,6 +213,9 @@ github.com/envoyproxy/protoc-gen-validate/validate ## explicit; go 1.17 github.com/fsnotify/fsnotify github.com/fsnotify/fsnotify/internal +# github.com/gammazero/deque v1.0.0 +## explicit; go 1.22 +github.com/gammazero/deque # github.com/georgysavva/scany v1.2.2 ## explicit; go 1.14 github.com/georgysavva/scany/dbscan @@ -306,12 +308,26 @@ github.com/klauspost/compress/zstd/internal/xxhash # github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 ## explicit; go 1.16 github.com/lufia/plan9stats -# github.com/magiconair/properties v1.8.7 +# github.com/magiconair/properties v1.8.9 ## explicit; go 1.19 github.com/magiconair/properties # github.com/mattn/go-isatty v0.0.20 ## explicit; go 1.15 github.com/mattn/go-isatty +# github.com/maypok86/otter v1.2.4 +## explicit; go 1.19 +github.com/maypok86/otter +github.com/maypok86/otter/internal/core +github.com/maypok86/otter/internal/expiry +github.com/maypok86/otter/internal/generated/node +github.com/maypok86/otter/internal/hashtable +github.com/maypok86/otter/internal/lossy +github.com/maypok86/otter/internal/queue +github.com/maypok86/otter/internal/s3fifo +github.com/maypok86/otter/internal/stats +github.com/maypok86/otter/internal/unixtime +github.com/maypok86/otter/internal/xmath +github.com/maypok86/otter/internal/xruntime # github.com/mitchellh/mapstructure v1.5.0 ## explicit; go 1.14 github.com/mitchellh/mapstructure @@ -366,7 +382,7 @@ github.com/sourcegraph/conc/panics github.com/spf13/afero github.com/spf13/afero/internal/common github.com/spf13/afero/mem -# github.com/spf13/cast v1.7.0 +# github.com/spf13/cast v1.7.1 ## explicit; go 1.19 github.com/spf13/cast # github.com/spf13/cobra v1.8.1 @@ -399,13 +415,13 @@ github.com/tklauser/numcpus # github.com/yusufpapurcu/wmi v1.2.4 ## explicit; go 1.16 github.com/yusufpapurcu/wmi -# go.opentelemetry.io/otel v1.31.0 -## explicit; go 1.22 +# go.opentelemetry.io/otel v1.33.0 +## explicit; go 1.22.0 go.opentelemetry.io/otel/attribute go.opentelemetry.io/otel/internal go.opentelemetry.io/otel/internal/attribute -# go.opentelemetry.io/otel/metric v1.31.0 -## explicit; go 1.22 +# go.opentelemetry.io/otel/metric v1.33.0 +## explicit; go 1.22.0 go.opentelemetry.io/otel/metric go.opentelemetry.io/otel/metric/embedded # go.uber.org/multierr v1.11.0 @@ -425,7 +441,7 @@ go.uber.org/zap/internal/exit go.uber.org/zap/internal/pool go.uber.org/zap/internal/stacktrace go.uber.org/zap/zapcore -# golang.org/x/crypto v0.28.0 +# golang.org/x/crypto v0.32.0 ## explicit; go 1.20 golang.org/x/crypto/blowfish golang.org/x/crypto/chacha20 @@ -436,18 +452,17 @@ golang.org/x/crypto/hkdf golang.org/x/crypto/internal/alias golang.org/x/crypto/internal/poly1305 golang.org/x/crypto/pbkdf2 -golang.org/x/crypto/poly1305 golang.org/x/crypto/scrypt golang.org/x/crypto/ssh golang.org/x/crypto/ssh/internal/bcrypt_pbkdf -# golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c +# golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 ## explicit; go 1.22.0 golang.org/x/exp/constraints golang.org/x/exp/slices golang.org/x/exp/slog golang.org/x/exp/slog/internal golang.org/x/exp/slog/internal/buffer -# golang.org/x/net v0.30.0 +# golang.org/x/net v0.34.0 ## explicit; go 1.18 golang.org/x/net/http/httpguts golang.org/x/net/http2 @@ -455,17 +470,17 @@ golang.org/x/net/http2/hpack golang.org/x/net/idna golang.org/x/net/internal/timeseries golang.org/x/net/trace -# golang.org/x/oauth2 v0.24.0 +# golang.org/x/oauth2 v0.25.0 ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/clientcredentials golang.org/x/oauth2/internal golang.org/x/oauth2/jws golang.org/x/oauth2/jwt -# golang.org/x/sync v0.9.0 +# golang.org/x/sync v0.10.0 ## explicit; go 1.18 golang.org/x/sync/semaphore -# golang.org/x/sys v0.27.0 +# golang.org/x/sys v0.29.0 ## explicit; go 1.18 golang.org/x/sys/cpu golang.org/x/sys/unix @@ -475,7 +490,7 @@ golang.org/x/sys/windows/svc golang.org/x/sys/windows/svc/debug golang.org/x/sys/windows/svc/eventlog golang.org/x/sys/windows/svc/mgr -# golang.org/x/text v0.19.0 +# golang.org/x/text v0.21.0 ## explicit; go 1.18 golang.org/x/text/cases golang.org/x/text/encoding @@ -495,8 +510,8 @@ golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width -# google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 -## explicit; go 1.21 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f +## explicit; go 1.22 google.golang.org/genproto/googleapis/rpc/status # google.golang.org/grpc v1.68.0 ## explicit; go 1.22.7 @@ -557,7 +572,7 @@ google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status google.golang.org/grpc/tap -# google.golang.org/protobuf v1.35.1 +# google.golang.org/protobuf v1.36.3 ## explicit; go 1.21 google.golang.org/protobuf/encoding/protojson google.golang.org/protobuf/encoding/prototext @@ -580,6 +595,7 @@ google.golang.org/protobuf/internal/genid google.golang.org/protobuf/internal/impl google.golang.org/protobuf/internal/order google.golang.org/protobuf/internal/pragma +google.golang.org/protobuf/internal/protolazy google.golang.org/protobuf/internal/set google.golang.org/protobuf/internal/strs google.golang.org/protobuf/internal/version @@ -612,8 +628,8 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# modernc.org/libc v1.61.0 -## explicit; go 1.20 +# modernc.org/libc v1.61.8 +## explicit; go 1.21 modernc.org/libc modernc.org/libc/errno modernc.org/libc/fcntl @@ -640,12 +656,12 @@ modernc.org/libc/utime modernc.org/libc/uuid modernc.org/libc/uuid/uuid modernc.org/libc/wctype -# modernc.org/mathutil v1.6.0 -## explicit; go 1.18 +# modernc.org/mathutil v1.7.1 +## explicit; go 1.21 modernc.org/mathutil -# modernc.org/memory v1.8.0 -## explicit; go 1.18 +# modernc.org/memory v1.8.2 +## explicit; go 1.21 modernc.org/memory -# modernc.org/sqlite v1.33.1 -## explicit; go 1.20 +# modernc.org/sqlite v1.34.4 +## explicit; go 1.21 modernc.org/sqlite/lib