From 9089bf33080206fc44d8be1298ffd78713f777bf Mon Sep 17 00:00:00 2001 From: ucwong Date: Tue, 30 Apr 2024 07:53:54 +0800 Subject: [PATCH] deps --- go.mod | 32 +- go.sum | 67 +- .../CortexFoundation/torrentfs/interfaces.go | 2 + .../anacrolix/torrent/peer-conn-msg-writer.go | 13 +- .../anacrolix/torrent/peer_protocol/msg.go | 69 +- .../anacrolix/torrent/requesting.go | 14 +- .../anacrolix/torrent/storage/file.go | 24 + .../anacrolix/torrent/webseed/client.go | 55 +- .../cloudflare/cloudflare-go/CHANGELOG.md | 15 +- .../cloudflare-go/access_application.go | 3 + .../cloudflare-go/teams_accounts.go | 9 + .../cloudflare-go/teams_locations.go | 1 + .../cloudflare/cloudflare-go/workers.go | 7 + .../github.com/go-llsqlite/crawshaw/README.md | 2 +- .../github.com/go-llsqlite/crawshaw/auth.go | 6 +- .../github.com/go-llsqlite/crawshaw/func.go | 22 +- .../go-llsqlite/crawshaw/session.go | 3 - .../github.com/go-llsqlite/crawshaw/sqlite.go | 11 +- .../go-llsqlite/crawshaw/wrappers.c | 29 + .../go-llsqlite/crawshaw/wrappers.h | 8 + vendor/github.com/pion/rtp/.golangci.yml | 7 +- .../github.com/pion/rtp/codecs/av1_packet.go | 32 +- vendor/github.com/pion/rtp/codecs/common.go | 12 +- .../github.com/pion/rtp/codecs/h264_packet.go | 26 +- vendor/github.com/pion/rtp/depacketizer.go | 4 + .../pion/transport/v2/deadline/deadline.go | 97 +- .../pion/transport/v2/deadline/timer.go | 13 + .../transport/v2/deadline/timer_generic.go | 15 + .../pion/transport/v2/deadline/timer_js.go | 67 + .../pion/transport/v2/packetio/buffer.go | 45 +- .../github.com/pion/transport/v2/udp/conn.go | 19 +- .../github.com/pion/webrtc/v3/rtpreceiver.go | 4 + .../github.com/pion/webrtc/v3/track_remote.go | 6 + vendor/github.com/rs/cors/README.md | 26 +- vendor/github.com/rs/cors/cors.go | 91 +- .../github.com/rs/cors/internal/sortedset.go | 113 + vendor/github.com/rs/cors/utils.go | 66 +- .../tklauser/go-sysconf/.cirrus.yml | 10 +- .../tklauser/go-sysconf/sysconf_bsd.go | 1 - .../tklauser/go-sysconf/sysconf_darwin.go | 37 +- .../tklauser/go-sysconf/sysconf_generic.go | 1 - .../tklauser/go-sysconf/sysconf_posix.go | 1 - .../go-sysconf/sysconf_unsupported.go | 1 - .../go-sysconf/zsysconf_defs_darwin.go | 2 - .../go-sysconf/zsysconf_defs_dragonfly.go | 1 - .../go-sysconf/zsysconf_defs_freebsd.go | 1 - .../go-sysconf/zsysconf_defs_linux.go | 1 - .../go-sysconf/zsysconf_defs_netbsd.go | 1 - .../go-sysconf/zsysconf_defs_openbsd.go | 1 - .../go-sysconf/zsysconf_defs_solaris.go | 1 - .../go-sysconf/zsysconf_values_freebsd_386.go | 1 - .../zsysconf_values_freebsd_amd64.go | 1 - .../go-sysconf/zsysconf_values_freebsd_arm.go | 1 - .../zsysconf_values_freebsd_arm64.go | 1 - .../zsysconf_values_freebsd_riscv64.go | 1 - .../go-sysconf/zsysconf_values_linux_386.go | 1 - .../go-sysconf/zsysconf_values_linux_amd64.go | 1 - .../go-sysconf/zsysconf_values_linux_arm.go | 1 - .../go-sysconf/zsysconf_values_linux_arm64.go | 1 - .../zsysconf_values_linux_loong64.go | 1 - .../go-sysconf/zsysconf_values_linux_mips.go | 1 - .../zsysconf_values_linux_mips64.go | 1 - .../zsysconf_values_linux_mips64le.go | 1 - .../zsysconf_values_linux_mipsle.go | 1 - .../go-sysconf/zsysconf_values_linux_ppc64.go | 1 - .../zsysconf_values_linux_ppc64le.go | 1 - .../zsysconf_values_linux_riscv64.go | 1 - .../go-sysconf/zsysconf_values_linux_s390x.go | 1 - .../go-sysconf/zsysconf_values_netbsd_386.go | 1 - .../zsysconf_values_netbsd_amd64.go | 1 - .../go-sysconf/zsysconf_values_netbsd_arm.go | 1 - .../zsysconf_values_netbsd_arm64.go | 1 - .../github.com/tklauser/numcpus/.cirrus.yml | 20 +- .../tklauser/numcpus/numcpus_bsd.go | 1 - .../tklauser/numcpus/numcpus_solaris.go | 1 - .../tklauser/numcpus/numcpus_unsupported.go | 1 - vendor/github.com/urfave/cli/v2/app.go | 4 - vendor/github.com/urfave/cli/v2/category.go | 4 +- vendor/github.com/urfave/cli/v2/command.go | 3 - vendor/github.com/urfave/cli/v2/template.go | 2 +- vendor/go.opentelemetry.io/otel/CHANGELOG.md | 29 +- vendor/go.opentelemetry.io/otel/Makefile | 36 +- .../otel/baggage/baggage.go | 211 +- .../otel/propagation/trace_context.go | 2 +- vendor/go.opentelemetry.io/otel/version.go | 2 +- vendor/go.opentelemetry.io/otel/versions.yaml | 11 +- vendor/modernc.org/libc/ccgo_linux_amd64.go | 3590 ++++++++--------- vendor/modernc.org/libc/ccgo_linux_loong64.go | 1306 +++--- vendor/modules.txt | 33 +- 89 files changed, 3460 insertions(+), 2912 deletions(-) create mode 100644 vendor/github.com/pion/transport/v2/deadline/timer.go create mode 100644 vendor/github.com/pion/transport/v2/deadline/timer_generic.go create mode 100644 vendor/github.com/pion/transport/v2/deadline/timer_js.go create mode 100644 vendor/github.com/rs/cors/internal/sortedset.go diff --git a/go.mod b/go.mod index 7b739a6eb2..8645c7a0af 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 github.com/CortexFoundation/inference v1.0.2-0.20230307032835-9197d586a4e8 github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66 - github.com/CortexFoundation/torrentfs v1.0.63-0.20240423105601-55f365eb8c9e + github.com/CortexFoundation/torrentfs v1.0.63-0.20240429143930-cd54f430d284 github.com/VictoriaMetrics/fastcache v1.12.2 github.com/arsham/figurine v1.3.0 github.com/aws/aws-sdk-go-v2 v1.26.1 @@ -16,7 +16,7 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.3 github.com/cespare/cp v1.1.1 github.com/charmbracelet/bubbletea v0.25.0 - github.com/cloudflare/cloudflare-go v0.93.0 + github.com/cloudflare/cloudflare-go v0.94.0 github.com/cockroachdb/pebble v1.1.0 github.com/consensys/gnark-crypto v0.12.1 github.com/crate-crypto/go-kzg-4844 v1.0.0 @@ -52,14 +52,14 @@ require ( github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 github.com/olekukonko/tablewriter v0.0.5 github.com/peterh/liner v1.2.2 - github.com/rs/cors v1.10.1 + github.com/rs/cors v1.11.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/status-im/keycard-go v0.3.2 github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 github.com/stretchr/testify v1.9.0 github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d github.com/ucwong/color v1.10.1-0.20200624105241-fba1e010fe1e - github.com/urfave/cli/v2 v2.27.1 + github.com/urfave/cli/v2 v2.27.2 go.uber.org/automaxprocs v1.5.3 golang.org/x/crypto v0.22.0 golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f @@ -99,7 +99,7 @@ require ( github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 // indirect github.com/anacrolix/stm v0.5.0 // indirect github.com/anacrolix/sync v0.5.1 // indirect - github.com/anacrolix/torrent v1.55.1-0.20240419234247-505551d27de2 // indirect + github.com/anacrolix/torrent v1.55.1-0.20240426070649-41fc76adf87d // indirect github.com/anacrolix/upnp v0.1.4 // indirect github.com/anacrolix/utp v0.2.0 // indirect github.com/antlabs/stl v0.0.2 // indirect @@ -145,7 +145,7 @@ require ( github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-llsqlite/adapter v0.1.0 // indirect - github.com/go-llsqlite/crawshaw v0.5.1 // indirect + github.com/go-llsqlite/crawshaw v0.5.2-0.20240425034140-f30eb7704568 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect @@ -159,7 +159,7 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/pprof v0.0.0-20240422182052-72c8669ad3e7 // indirect + github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect @@ -195,14 +195,14 @@ require ( github.com/pion/mdns v0.0.12 // indirect github.com/pion/randutil v0.1.0 // indirect github.com/pion/rtcp v1.2.14 // indirect - github.com/pion/rtp v1.8.5 // indirect + github.com/pion/rtp v1.8.6 // indirect github.com/pion/sctp v1.8.16 // indirect github.com/pion/sdp/v3 v3.0.9 // indirect github.com/pion/srtp/v2 v2.0.18 // indirect github.com/pion/stun v0.6.1 // indirect - github.com/pion/transport/v2 v2.2.4 // indirect + github.com/pion/transport/v2 v2.2.5 // indirect github.com/pion/turn/v2 v2.1.6 // indirect - github.com/pion/webrtc/v3 v3.2.38 // indirect + github.com/pion/webrtc/v3 v3.2.39 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect @@ -220,8 +220,8 @@ require ( github.com/supranational/blst v0.3.11 // indirect github.com/tidwall/btree v1.7.0 // indirect github.com/tidwall/hashmap v1.8.1 // indirect - github.com/tklauser/go-sysconf v0.3.13 // indirect - github.com/tklauser/numcpus v0.7.0 // indirect + github.com/tklauser/go-sysconf v0.3.14 // indirect + github.com/tklauser/numcpus v0.8.0 // indirect github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd // indirect github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb // indirect github.com/ucwong/golang-kv v1.0.24-0.20240420125514-98cc44499984 // indirect @@ -233,16 +233,16 @@ require ( github.com/zeebo/xxh3 v1.0.3-0.20230502181907-3808c706a06a // indirect go.etcd.io/bbolt v1.3.9 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.25.0 // indirect - go.opentelemetry.io/otel/metric v1.25.0 // indirect - go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.24.0 // indirect golang.org/x/term v0.19.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.2 // indirect - modernc.org/libc v1.50.2 // indirect + modernc.org/libc v1.50.4 // indirect modernc.org/mathutil v1.6.0 // indirect modernc.org/memory v1.8.0 // indirect modernc.org/sqlite v1.29.8 // indirect diff --git a/go.sum b/go.sum index f68b4db87f..59d08fb175 100644 --- a/go.sum +++ b/go.sum @@ -70,8 +70,8 @@ github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66/go.mod h1: github.com/CortexFoundation/torrentfs v1.0.13-0.20200623060705-ce027f43f2f8/go.mod h1:Ma+tGhPPvz4CEZHaqEJQMOEGOfHeQBiAoNd1zyc/w3Q= github.com/CortexFoundation/torrentfs v1.0.14-0.20200703071639-3fcabcabf274/go.mod h1:qnb3YlIJmuetVBtC6Lsejr0Xru+1DNmDCdTqnwy7lhk= github.com/CortexFoundation/torrentfs v1.0.20-0.20200810031954-d36d26f82fcc/go.mod h1:N5BsicP5ynjXIi/Npl/SRzlJ630n1PJV2sRj0Z0t2HA= -github.com/CortexFoundation/torrentfs v1.0.63-0.20240423105601-55f365eb8c9e h1:I+wmnCp7jIn7B6rkRlzlPFhDwACZcC1qyejSXkgpVik= -github.com/CortexFoundation/torrentfs v1.0.63-0.20240423105601-55f365eb8c9e/go.mod h1:uTEBqJuFUx7F0tj8DO1/6/Extr6G8u2xAu+Qn/UeaII= +github.com/CortexFoundation/torrentfs v1.0.63-0.20240429143930-cd54f430d284 h1:N65Nmsdm61Sw7/WI8PoR/H1eLfN9vJNWs8Cw60eLDzE= +github.com/CortexFoundation/torrentfs v1.0.63-0.20240429143930-cd54f430d284/go.mod h1:oIo6XO4U4AA7NJjOubaoEHeZEI7CVYj/CkmaRU3UWfs= github.com/CortexFoundation/wormhole v0.0.2-0.20240227124914-18b022401519 h1:Jc+lmeXDNHb953H1tvJOYM89mYyGKcPE+ZiZ6OSiPEk= github.com/CortexFoundation/wormhole v0.0.2-0.20240227124914-18b022401519/go.mod h1:ipzmPabDgzYKUbXkGVe2gTkBEp+MsDx6pXGiuYzmP6s= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -216,8 +216,8 @@ github.com/anacrolix/torrent v1.15.0/go.mod h1:MFc6KcbpAyfwGqOyRkdarUK9QnKA/FkVg github.com/anacrolix/torrent v1.15.1-0.20200504230043-cc5d2abe18e5/go.mod h1:QlOfgrCz5kbvhOz8M58dUwHY5SfZ9VbIvReZ0z0MdIk= github.com/anacrolix/torrent v1.15.1-0.20200619022403-dd51e99b88cc/go.mod h1:wuopQPC5+/M+zHYvhcA2vp5UCTm9rUc+VqjyBa882Q8= github.com/anacrolix/torrent v1.15.1-0.20200715061614-dd906f8fa72e/go.mod h1:XWo/fJN1oKgcjgxM+pUZpvalHfqHDs27BY5mBZjIQWo= -github.com/anacrolix/torrent v1.55.1-0.20240419234247-505551d27de2 h1:bsID2JwoIILQdWmaXFS2W+KhcV1sorBiQbVOdFZeBak= -github.com/anacrolix/torrent v1.55.1-0.20240419234247-505551d27de2/go.mod h1:NltbHZfJYSqDjHl6c3iOP+jymdUe0Fqk0d4xBSHMUxI= +github.com/anacrolix/torrent v1.55.1-0.20240426070649-41fc76adf87d h1:+On5kTkCplx0bFqowoRUPI0yx4RXCiuu63ToMJxX74Y= +github.com/anacrolix/torrent v1.55.1-0.20240426070649-41fc76adf87d/go.mod h1:MsIikhT44vf1MpylScIy9q1cbtgFvr+fNCLV28SG5D8= github.com/anacrolix/upnp v0.1.1/go.mod h1:LXsbsp5h+WGN7YR+0A7iVXm5BL1LYryDev1zuJMWYQo= github.com/anacrolix/upnp v0.1.2-0.20200416075019-5e9378ed1425/go.mod h1:Pz94W3kl8rf+wxH3IbCa9Sq+DTJr8OSbV2Q3/y51vYs= github.com/anacrolix/upnp v0.1.4 h1:+2t2KA6QOhm/49zeNyeVwDu1ZYS9dB9wfxyVvh/wk7U= @@ -350,8 +350,8 @@ github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMn github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.11.7/go.mod h1:GyEn0B58Zvn/XOrkE/R31DrKqjTsBQ9E5ICzRlE09hk= -github.com/cloudflare/cloudflare-go v0.93.0 h1:rV0eHb42NUewfK5qa2+LKAD4v4oFA0QGDABn/lMyF78= -github.com/cloudflare/cloudflare-go v0.93.0/go.mod h1:N1u1cLZ4lG6NeezGOWi7P6aq1DK2iVYg9ze7GZbUmZE= +github.com/cloudflare/cloudflare-go v0.94.0 h1:WADmVhCdnn1A9sm5NU08by49Vbh4Lj/JBgTWTr7q7Qc= +github.com/cloudflare/cloudflare-go v0.94.0/go.mod h1:N1u1cLZ4lG6NeezGOWi7P6aq1DK2iVYg9ze7GZbUmZE= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= @@ -514,8 +514,8 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-llsqlite/adapter v0.1.0 h1:wGSQNsu/rtYeu/lqZNZQMjwUdEF3OW66xTLvsFwJQUw= github.com/go-llsqlite/adapter v0.1.0/go.mod h1:DADrR88ONKPPeSGjFp5iEN55Arx3fi2qXZeKCYDpbmU= -github.com/go-llsqlite/crawshaw v0.5.1 h1:dIYQG2qHrGjWXVXvl00JxIHBuwD+h8VXgNubLiMoPNU= -github.com/go-llsqlite/crawshaw v0.5.1/go.mod h1:/YJdV7uBQaYDE0fwe4z3wwJIZBJxdYzd38ICggWqtaE= +github.com/go-llsqlite/crawshaw v0.5.2-0.20240425034140-f30eb7704568 h1:3EpZo8LxIzF4q3BT+vttQQlRfA6uTtTb/cxVisWa5HM= +github.com/go-llsqlite/crawshaw v0.5.2-0.20240425034140-f30eb7704568/go.mod h1:/YJdV7uBQaYDE0fwe4z3wwJIZBJxdYzd38ICggWqtaE= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -625,8 +625,8 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= -github.com/google/pprof v0.0.0-20240422182052-72c8669ad3e7 h1:3q13T5NW3mlTJZM6B5UAsf2N5NYFbYWIyI3W8DlvBDU= -github.com/google/pprof v0.0.0-20240422182052-72c8669ad3e7/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -1005,8 +1005,8 @@ github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9 github.com/pion/rtp v1.3.2/go.mod h1:q9wPnA96pu2urCcW/sK/RiDn597bhGoAQQ+y2fDwHuY= github.com/pion/rtp v1.4.0/go.mod h1:/l4cvcKd0D3u9JLs2xSVI95YkfXW87a3br3nqmVtSlE= github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= -github.com/pion/rtp v1.8.5 h1:uYzINfaK+9yWs7r537z/Rc1SvT8ILjBcmDOpJcTB+OU= -github.com/pion/rtp v1.8.5/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/rtp v1.8.6 h1:MTmn/b0aWWsAzux2AmP8WGllusBVw4NPYPVFFd7jUPw= +github.com/pion/rtp v1.8.6/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/sctp v1.7.6/go.mod h1:ichkYQ5tlgCQwEwvgfdcAolqx1nHbYCxo4D7zK/K0X8= github.com/pion/sctp v1.8.13/go.mod h1:YKSgO/bO/6aOMP9LCie1DuD7m+GamiK2yIiPM6vH+GA= github.com/pion/sctp v1.8.16 h1:PKrMs+o9EMLRvFfXq59WFsC+V8mN1wnKzqrv+3D/gYY= @@ -1028,8 +1028,9 @@ github.com/pion/transport v0.13.1 h1:/UH5yLeQtwm2VZIPjxwnNFxjS4DFhyLfS4GlfuKUzfA github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= github.com/pion/transport/v2 v2.2.2/go.mod h1:OJg3ojoBJopjEeECq2yJdXH9YVrUJ1uQ++NjXLOUorc= github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= -github.com/pion/transport/v2 v2.2.4 h1:41JJK6DZQYSeVLxILA2+F4ZkKb4Xd/tFJZRFZQ9QAlo= github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= +github.com/pion/transport/v2 v2.2.5 h1:iyi25i/21gQck4hfRhomF6SktmUQjRsRW4WJdhfc3Kc= +github.com/pion/transport/v2 v2.2.5/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= github.com/pion/transport/v3 v3.0.2 h1:r+40RJR25S9w3jbA6/5uEPTzcdn7ncyU44RWCbHkLg4= github.com/pion/transport/v3 v3.0.2/go.mod h1:nIToODoOlb5If2jF9y2Igfx3PFYWfuXi37m0IlWa/D0= @@ -1039,8 +1040,8 @@ github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc= github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= github.com/pion/webrtc/v2 v2.2.7/go.mod h1:EfCuvKjzMgX4F/aSryRUC7L9o3u2N8WNUgnzd6wOO+8= github.com/pion/webrtc/v2 v2.2.9/go.mod h1:TcArPDphZIBtZ+mh8J/qOREyY3ca7ihQrenulOIvfPQ= -github.com/pion/webrtc/v3 v3.2.38 h1:oA52VJAJhOjSi1JpKjf0CM+cCiZ3b7jBxvsoOiajeDU= -github.com/pion/webrtc/v3 v3.2.38/go.mod h1:AQ8p56OLbm3MjhYovYdgPuyX6oc+JcKx/HFoCGFcYzA= +github.com/pion/webrtc/v3 v3.2.39 h1:Lf2SIMGdE3M9VNm48KpoX5pR8SJ6TsMnktzOkc/oB0o= +github.com/pion/webrtc/v3 v3.2.39/go.mod h1:AQ8p56OLbm3MjhYovYdgPuyX6oc+JcKx/HFoCGFcYzA= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -1119,8 +1120,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= -github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= +github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 h1:18kd+8ZUlt/ARXhljq+14TwAoKa61q6dX8jtwOf6DH8= github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529/go.mod h1:qe5TWALJ8/a1Lqznoc5BDHpYX/8HU60Hm2AwRmqzxqA= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -1239,10 +1240,10 @@ github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW github.com/tinylib/msgp v1.1.1/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tjfoc/gmsm v1.3.0/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= -github.com/tklauser/go-sysconf v0.3.13 h1:GBUpcahXSpR2xN01jhkNAbTLRk2Yzgggk8IM08lq3r4= -github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5IJePewFCGVEa0= -github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr4= -github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY= +github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= +github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= +github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= +github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= @@ -1270,8 +1271,8 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= -github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= +github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= @@ -1320,12 +1321,12 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= -go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= -go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= -go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= -go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= -go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= 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= @@ -1792,14 +1793,14 @@ lukechampine.com/blake3 v1.2.2 h1:wEAbSg0IVU4ih44CVlpMqMZMpzr5hf/6aqodLlevd/w= lukechampine.com/blake3 v1.2.2/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= modernc.org/cc/v4 v4.21.0 h1:D/gLKtcztomvWbsbvBKo3leKQv+86f+DdqEZBBXhnag= modernc.org/cc/v4 v4.21.0/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ= -modernc.org/ccgo/v4 v4.17.0 h1:cX97L5Bv/7PEmyk1oEAD890fQu5/yUQRYeYBsCSnzww= -modernc.org/ccgo/v4 v4.17.0/go.mod h1:keES1eiOIBJhbA5qKrV7ADG3w8DsX8G7jfHAT76riOg= +modernc.org/ccgo/v4 v4.17.3 h1:t2CQci84jnxKw3GGnHvjGKjiNZeZqyQx/023spkk4hU= +modernc.org/ccgo/v4 v4.17.3/go.mod h1:1FCbAtWYJoKuc+AviS+dH+vGNtYmFJqBeRWjmnDWsIg= 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.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw= modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= -modernc.org/libc v1.50.2 h1:I0+3wlRvXmAEjAJvD7BhP1kmKHwkzV0rOcqFcD85u+0= -modernc.org/libc v1.50.2/go.mod h1:Fd8TZdfRorOd1vB0QCtYSHYAuzobS4xS3mhMGUkeVcA= +modernc.org/libc v1.50.4 h1:GeqBes21PQHbVitLewzkhLXLFnQ1AWxOlHI+g5InUnQ= +modernc.org/libc v1.50.4/go.mod h1:rhzrUx5oePTSTIzBgM0mTftwWHK8tiT9aNFUt1mldl0= 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= diff --git a/vendor/github.com/CortexFoundation/torrentfs/interfaces.go b/vendor/github.com/CortexFoundation/torrentfs/interfaces.go index 77c9ba3f5f..a828fa445d 100644 --- a/vendor/github.com/CortexFoundation/torrentfs/interfaces.go +++ b/vendor/github.com/CortexFoundation/torrentfs/interfaces.go @@ -27,6 +27,8 @@ type CortexStorage interface { Stop() error Download(ctx context.Context, ih string, request uint64) error + + // File uploaded SeedingLocal(ctx context.Context, filePath string, isLinkMode bool) (string, error) PauseLocalSeed(ctx context.Context, ih string) error ResumeLocalSeed(ctx context.Context, ih string) error diff --git a/vendor/github.com/anacrolix/torrent/peer-conn-msg-writer.go b/vendor/github.com/anacrolix/torrent/peer-conn-msg-writer.go index 1bacc59d18..4f17e5edec 100644 --- a/vendor/github.com/anacrolix/torrent/peer-conn-msg-writer.go +++ b/vendor/github.com/anacrolix/torrent/peer-conn-msg-writer.go @@ -117,10 +117,21 @@ func (cn *peerConnMsgWriter) run(keepAliveTimeout time.Duration) { } } +func (cn *peerConnMsgWriter) writeToBuffer(msg pp.Message) (err error) { + originalLen := cn.writeBuffer.Len() + defer func() { + if err != nil { + // Since an error occurred during buffer write, revert buffer to its original state before the write. + cn.writeBuffer.Truncate(originalLen) + } + }() + return msg.WriteTo(cn.writeBuffer) +} + func (cn *peerConnMsgWriter) write(msg pp.Message) bool { cn.mu.Lock() defer cn.mu.Unlock() - cn.writeBuffer.Write(msg.MustMarshalBinary()) + cn.writeToBuffer(msg) cn.writeCond.Broadcast() return !cn.writeBufferFull() } diff --git a/vendor/github.com/anacrolix/torrent/peer_protocol/msg.go b/vendor/github.com/anacrolix/torrent/peer_protocol/msg.go index b08bb5380e..2ce2b9565c 100644 --- a/vendor/github.com/anacrolix/torrent/peer_protocol/msg.go +++ b/vendor/github.com/anacrolix/torrent/peer_protocol/msg.go @@ -6,6 +6,7 @@ import ( "encoding" "encoding/binary" "fmt" + "io" ) // This is a lazy union representing all the possible fields for messages. Go doesn't have ADTs, and @@ -61,13 +62,14 @@ func (msg Message) MustMarshalBinary() []byte { return b } -func (msg Message) MarshalBinary() (data []byte, err error) { - // It might look like you could have a pool of buffers and preallocate the message length - // prefix, but because we have to return []byte, it becomes non-trivial to make this fast. You - // will need a benchmark. - var buf bytes.Buffer +type MessageWriter interface { + io.ByteWriter + io.Writer +} + +func (msg *Message) writePayloadTo(buf MessageWriter) (err error) { mustWrite := func(data any) { - err := binary.Write(&buf, binary.BigEndian, data) + err := binary.Write(buf, binary.BigEndian, data) if err != nil { panic(err) } @@ -85,10 +87,10 @@ func (msg Message) MarshalBinary() (data []byte, err error) { switch msg.Type { case Choke, Unchoke, Interested, NotInterested, HaveAll, HaveNone: case Have, AllowedFast, Suggest: - err = binary.Write(&buf, binary.BigEndian, msg.Index) + err = binary.Write(buf, binary.BigEndian, msg.Index) case Request, Cancel, Reject: for _, i := range []Integer{msg.Index, msg.Begin, msg.Length} { - err = binary.Write(&buf, binary.BigEndian, i) + err = binary.Write(buf, binary.BigEndian, i) if err != nil { break } @@ -97,7 +99,7 @@ func (msg Message) MarshalBinary() (data []byte, err error) { _, err = buf.Write(marshalBitfield(msg.Bitfield)) case Piece: for _, i := range []Integer{msg.Index, msg.Begin} { - err = binary.Write(&buf, binary.BigEndian, i) + err = binary.Write(buf, binary.BigEndian, i) if err != nil { return } @@ -116,7 +118,7 @@ func (msg Message) MarshalBinary() (data []byte, err error) { } _, err = buf.Write(msg.ExtendedPayload) case Port: - err = binary.Write(&buf, binary.BigEndian, msg.Port) + err = binary.Write(buf, binary.BigEndian, msg.Port) case HashRequest: buf.Write(msg.PiecesRoot[:]) writeConsecutive(msg.BaseLayer, msg.Index, msg.Length, msg.ProofLayers) @@ -124,11 +126,35 @@ func (msg Message) MarshalBinary() (data []byte, err error) { err = fmt.Errorf("unknown message type: %v", msg.Type) } } - data = make([]byte, 4+buf.Len()) - binary.BigEndian.PutUint32(data, uint32(buf.Len())) - if buf.Len() != copy(data[4:], buf.Bytes()) { - panic("bad copy") + return +} + +func (msg *Message) WriteTo(w MessageWriter) (err error) { + length, err := msg.getPayloadLength() + if err != nil { + return + } + err = binary.Write(w, binary.BigEndian, length) + if err != nil { + return } + return msg.writePayloadTo(w) +} + +func (msg *Message) getPayloadLength() (length Integer, err error) { + var lw lengthWriter + err = msg.writePayloadTo(&lw) + length = lw.n + return +} + +func (msg Message) MarshalBinary() (data []byte, err error) { + // It might look like you could have a pool of buffers and preallocate the message length + // prefix, but because we have to return []byte, it becomes non-trivial to make this fast. You + // will need a benchmark. + var buf bytes.Buffer + err = msg.WriteTo(&buf) + data = buf.Bytes() return } @@ -158,3 +184,18 @@ func (me *Message) UnmarshalBinary(b []byte) error { } return nil } + +type lengthWriter struct { + n Integer +} + +func (l *lengthWriter) WriteByte(c byte) error { + l.n++ + return nil +} + +func (l *lengthWriter) Write(p []byte) (n int, err error) { + n = len(p) + l.n += Integer(n) + return +} diff --git a/vendor/github.com/anacrolix/torrent/requesting.go b/vendor/github.com/anacrolix/torrent/requesting.go index 51419a3599..7ecb4e2221 100644 --- a/vendor/github.com/anacrolix/torrent/requesting.go +++ b/vendor/github.com/anacrolix/torrent/requesting.go @@ -9,9 +9,8 @@ import ( "time" "unsafe" - g "github.com/anacrolix/generics" - "github.com/RoaringBitmap/roaring" + g "github.com/anacrolix/generics" "github.com/anacrolix/generics/heap" "github.com/anacrolix/log" "github.com/anacrolix/multiless" @@ -312,13 +311,22 @@ func (p *Peer) applyRequestState(next desiredRequestState) { if cap(next.Requests.requestIndexes) != cap(orig) { panic("changed") } + + if p.needRequestUpdate == "Peer.remoteRejectedRequest" { + continue + } + existing := t.requestingPeer(req) if existing != nil && existing != p { + if p.needRequestUpdate == "Peer.cancel" { + continue + } + // Don't steal from the poor. diff := int64(current.Requests.GetCardinality()) + 1 - (int64(existing.uncancelledRequests()) - 1) // Steal a request that leaves us with one more request than the existing peer // connection if the stealer more recently received a chunk. - if diff > 1 || (diff == 1 && p.lastUsefulChunkReceived.Before(existing.lastUsefulChunkReceived)) { + if diff > 1 || (diff == 1 && !p.lastUsefulChunkReceived.After(existing.lastUsefulChunkReceived)) { continue } t.cancelRequest(req) diff --git a/vendor/github.com/anacrolix/torrent/storage/file.go b/vendor/github.com/anacrolix/torrent/storage/file.go index d15e579d7e..54d1a62b72 100644 --- a/vendor/github.com/anacrolix/torrent/storage/file.go +++ b/vendor/github.com/anacrolix/torrent/storage/file.go @@ -90,6 +90,7 @@ func (fs fileClientImpl) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash return TorrentImpl{ Piece: t.Piece, Close: t.Close, + Flush: t.Flush, }, nil } @@ -122,6 +123,29 @@ func (fs *fileTorrentImpl) Close() error { return nil } +func fsync(filePath string) (err error) { + _ = os.MkdirAll(filepath.Dir(filePath), 0o777) + var f *os.File + f, err = os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE, 0o666) + if err != nil { + return err + } + defer f.Close() + if err = f.Sync(); err != nil { + return err + } + return f.Close() +} + +func (fts *fileTorrentImpl) Flush() error { + for _, f := range fts.files { + if err := fsync(f.path); err != nil { + return err + } + } + return nil +} + // A helper to create zero-length files which won't appear for file-orientated storage since no // writes will ever occur to them (no torrent data is associated with a zero-length file). The // caller should make sure the file name provided is safe/sanitized. diff --git a/vendor/github.com/anacrolix/torrent/webseed/client.go b/vendor/github.com/anacrolix/torrent/webseed/client.go index 4614a3e407..5e3c28b885 100644 --- a/vendor/github.com/anacrolix/torrent/webseed/client.go +++ b/vendor/github.com/anacrolix/torrent/webseed/client.go @@ -19,16 +19,10 @@ import ( type RequestSpec = segments.Extent -type requestPartResult struct { - resp *http.Response - err error -} - type requestPart struct { - req *http.Request - e segments.Extent - result chan requestPartResult - start func() + req *http.Request + e segments.Extent + do func() (*http.Response, error) // Wrap http response bodies for such things as download rate limiting. responseBodyWrapper ResponseBodyWrapper } @@ -88,18 +82,11 @@ func (ws *Client) NewRequest(r RequestSpec) Request { } part := requestPart{ req: req, - result: make(chan requestPartResult, 1), e: e, responseBodyWrapper: ws.ResponseBodyWrapper, } - part.start = func() { - go func() { - resp, err := ws.HttpClient.Do(req) - part.result <- requestPartResult{ - resp: resp, - err: err, - } - }() + part.do = func() (*http.Response, error) { + return ws.HttpClient.Do(req) } requestParts = append(requestParts, part) return true @@ -129,24 +116,18 @@ func (me ErrBadResponse) Error() string { return me.Msg } -func recvPartResult(ctx context.Context, buf io.Writer, part requestPart) error { - result := <-part.result - // Make sure there's no further results coming, it should be a one-shot channel. - close(part.result) - if result.err != nil { - return result.err - } - defer result.resp.Body.Close() - var body io.Reader = result.resp.Body +func recvPartResult(ctx context.Context, buf io.Writer, part requestPart, resp *http.Response) error { + defer resp.Body.Close() + var body io.Reader = resp.Body if part.responseBodyWrapper != nil { body = part.responseBodyWrapper(body) } // Prevent further accidental use - result.resp.Body = nil + resp.Body = nil if ctx.Err() != nil { return ctx.Err() } - switch result.resp.StatusCode { + switch resp.StatusCode { case http.StatusPartialContent: copied, err := io.Copy(buf, body) if err != nil { @@ -178,14 +159,14 @@ func recvPartResult(ctx context.Context, buf io.Writer, part requestPart) error _, err := io.CopyN(buf, body, part.e.Length) return err } else { - return ErrBadResponse{"resp status ok but requested range", result.resp} + return ErrBadResponse{"resp status ok but requested range", resp} } case http.StatusServiceUnavailable: return ErrTooFast default: return ErrBadResponse{ - fmt.Sprintf("unhandled response status code (%v)", result.resp.StatusCode), - result.resp, + fmt.Sprintf("unhandled response status code (%v)", resp.StatusCode), + resp, } } } @@ -195,12 +176,16 @@ var ErrTooFast = errors.New("making requests too fast") func readRequestPartResponses(ctx context.Context, parts []requestPart) (_ []byte, err error) { var buf bytes.Buffer for _, part := range parts { - part.start() - err = recvPartResult(ctx, &buf, part) + result, err := part.do() + + if err == nil { + err = recvPartResult(ctx, &buf, part, result) + } + if err != nil { err = fmt.Errorf("reading %q at %q: %w", part.req.URL, part.req.Header.Get("Range"), err) break } } return buf.Bytes(), err -} +} \ No newline at end of file diff --git a/vendor/github.com/cloudflare/cloudflare-go/CHANGELOG.md b/vendor/github.com/cloudflare/cloudflare-go/CHANGELOG.md index ffea2fc8c3..33dfc8b0d2 100644 --- a/vendor/github.com/cloudflare/cloudflare-go/CHANGELOG.md +++ b/vendor/github.com/cloudflare/cloudflare-go/CHANGELOG.md @@ -1,4 +1,17 @@ -## 0.94.0 (Unreleased) +## 0.95.0 (Unreleased) + +## 0.94.0 (April 24th, 2024) + +ENHANCEMENTS: + +* access_application: support options_preflight_bypass for access_application ([#1790](https://github.com/cloudflare/cloudflare-go/issues/1790)) +* gateway: added ecs_support field to teams_location resource ([#1826](https://github.com/cloudflare/cloudflare-go/issues/1826)) +* teams_account: adds custom certificate setting to teams account configuration ([#1811](https://github.com/cloudflare/cloudflare-go/issues/1811)) +* workers: support deleting namespaced Workers ([#1737](https://github.com/cloudflare/cloudflare-go/issues/1737)) + +DEPENDENCIES: + +* deps: bumps golang.org/x/net from 0.19.0 to 0.23.0 ([#1825](https://github.com/cloudflare/cloudflare-go/issues/1825)) ## 0.93.0 (April 10th, 2024) diff --git a/vendor/github.com/cloudflare/cloudflare-go/access_application.go b/vendor/github.com/cloudflare/cloudflare-go/access_application.go index 8776e18598..fa426643ed 100644 --- a/vendor/github.com/cloudflare/cloudflare-go/access_application.go +++ b/vendor/github.com/cloudflare/cloudflare-go/access_application.go @@ -53,6 +53,7 @@ type AccessApplication struct { ServiceAuth401Redirect *bool `json:"service_auth_401_redirect,omitempty"` PathCookieAttribute *bool `json:"path_cookie_attribute,omitempty"` AllowAuthenticateViaWarp *bool `json:"allow_authenticate_via_warp,omitempty"` + OptionsPreflightBypass *bool `json:"options_preflight_bypass,omitempty"` CustomPages []string `json:"custom_pages,omitempty"` Tags []string `json:"tags,omitempty"` AccessAppLauncherCustomization @@ -181,6 +182,7 @@ type CreateAccessApplicationParams struct { ServiceAuth401Redirect *bool `json:"service_auth_401_redirect,omitempty"` SessionDuration string `json:"session_duration,omitempty"` SkipInterstitial *bool `json:"skip_interstitial,omitempty"` + OptionsPreflightBypass *bool `json:"options_preflight_bypass,omitempty"` Type AccessApplicationType `json:"type,omitempty"` AllowAuthenticateViaWarp *bool `json:"allow_authenticate_via_warp,omitempty"` CustomPages []string `json:"custom_pages,omitempty"` @@ -214,6 +216,7 @@ type UpdateAccessApplicationParams struct { SkipInterstitial *bool `json:"skip_interstitial,omitempty"` Type AccessApplicationType `json:"type,omitempty"` AllowAuthenticateViaWarp *bool `json:"allow_authenticate_via_warp,omitempty"` + OptionsPreflightBypass *bool `json:"options_preflight_bypass,omitempty"` CustomPages []string `json:"custom_pages,omitempty"` Tags []string `json:"tags,omitempty"` AccessAppLauncherCustomization diff --git a/vendor/github.com/cloudflare/cloudflare-go/teams_accounts.go b/vendor/github.com/cloudflare/cloudflare-go/teams_accounts.go index fc8fbb984f..a027dbee9b 100644 --- a/vendor/github.com/cloudflare/cloudflare-go/teams_accounts.go +++ b/vendor/github.com/cloudflare/cloudflare-go/teams_accounts.go @@ -46,6 +46,7 @@ type TeamsAccountSettings struct { ProtocolDetection *TeamsProtocolDetection `json:"protocol_detection,omitempty"` BodyScanning *TeamsBodyScanning `json:"body_scanning,omitempty"` ExtendedEmailMatching *TeamsExtendedEmailMatching `json:"extended_email_matching,omitempty"` + CustomCertificate *TeamsCustomCertificate `json:"custom_certificate,omitempty"` } type BrowserIsolation struct { @@ -103,6 +104,14 @@ type TeamsExtendedEmailMatching struct { Enabled *bool `json:"enabled,omitempty"` } +type TeamsCustomCertificate struct { + Enabled *bool `json:"enabled,omitempty"` + ID string `json:"id,omitempty"` + BindingStatus string `json:"binding_status,omitempty"` + QsPackId string `json:"qs_pack_id,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + type TeamsRuleType = string const ( diff --git a/vendor/github.com/cloudflare/cloudflare-go/teams_locations.go b/vendor/github.com/cloudflare/cloudflare-go/teams_locations.go index 296d98b13a..b6c58304e6 100644 --- a/vendor/github.com/cloudflare/cloudflare-go/teams_locations.go +++ b/vendor/github.com/cloudflare/cloudflare-go/teams_locations.go @@ -35,6 +35,7 @@ type TeamsLocation struct { AnonymizedLogsEnabled bool `json:"anonymized_logs_enabled"` IPv4Destination string `json:"ipv4_destination"` ClientDefault bool `json:"client_default"` + ECSSupport *bool `json:"ecs_support,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` diff --git a/vendor/github.com/cloudflare/cloudflare-go/workers.go b/vendor/github.com/cloudflare/cloudflare-go/workers.go index c904d9421c..2ffc492dde 100644 --- a/vendor/github.com/cloudflare/cloudflare-go/workers.go +++ b/vendor/github.com/cloudflare/cloudflare-go/workers.go @@ -216,6 +216,9 @@ type ListWorkersParams struct{} type DeleteWorkerParams struct { ScriptName string + + // DispatchNamespaceName is the dispatch namespace the Worker is uploaded to. + DispatchNamespace *string } type PlacementMode string @@ -242,6 +245,10 @@ func (api *API) DeleteWorker(ctx context.Context, rc *ResourceContainer, params } uri := fmt.Sprintf("/accounts/%s/workers/scripts/%s", rc.Identifier, params.ScriptName) + if params.DispatchNamespace != nil && *params.DispatchNamespace != "" { + uri = fmt.Sprintf("/accounts/%s/workers/dispatch/namespaces/%s/scripts/%s", rc.Identifier, *params.DispatchNamespace, params.ScriptName) + } + res, err := api.makeRequestContext(ctx, http.MethodDelete, uri, nil) var r WorkerScriptResponse diff --git a/vendor/github.com/go-llsqlite/crawshaw/README.md b/vendor/github.com/go-llsqlite/crawshaw/README.md index 67261c156f..8d585da811 100644 --- a/vendor/github.com/go-llsqlite/crawshaw/README.md +++ b/vendor/github.com/go-llsqlite/crawshaw/README.md @@ -55,4 +55,4 @@ https://pkg.go.dev/github.com/go-llsqlite/llsqlite ## Platform specific considerations -By default it requires some pthreads DLL on Windows. To avoid it, supply `CGOLDFLAGS="-static"` when building your application. +By default it requires some pthreads DLL on Windows. To avoid it, supply `CGO_LDFLAGS="-static"` when building your application. diff --git a/vendor/github.com/go-llsqlite/crawshaw/auth.go b/vendor/github.com/go-llsqlite/crawshaw/auth.go index ec29a9c5d8..22d31e762a 100644 --- a/vendor/github.com/go-llsqlite/crawshaw/auth.go +++ b/vendor/github.com/go-llsqlite/crawshaw/auth.go @@ -2,10 +2,8 @@ package sqlite // #include // #include -// extern int go_sqlite_auth_tramp(uintptr_t, int, char*, char*, char*, char*); -// static int c_auth_tramp(void *userData, int action, const char* arg1, const char* arg2, const char* db, const char* trigger) { -// return go_sqlite_auth_tramp((uintptr_t)userData, action, (char*)arg1, (char*)arg2, (char*)db, (char*)trigger); -// } +// #include "wrappers.h" +// // static int sqlite3_go_set_authorizer(sqlite3* conn, uintptr_t id) { // return sqlite3_set_authorizer(conn, c_auth_tramp, (void*)id); // } diff --git a/vendor/github.com/go-llsqlite/crawshaw/func.go b/vendor/github.com/go-llsqlite/crawshaw/func.go index 75421d94b8..c7656c6000 100644 --- a/vendor/github.com/go-llsqlite/crawshaw/func.go +++ b/vendor/github.com/go-llsqlite/crawshaw/func.go @@ -19,10 +19,6 @@ package sqlite // #include // #include "wrappers.h" // -// extern void func_tramp(sqlite3_context*, int, sqlite3_value**); -// extern void step_tramp(sqlite3_context*, int, sqlite3_value**); -// extern void final_tramp(sqlite3_context*); -// // static int go_sqlite3_create_function_v2( // sqlite3 *db, // const char *zFunctionName, @@ -170,10 +166,10 @@ func (conn *Conn) CreateFunction(name string, deterministic bool, numArgs int, x var funcfn, stepfn, finalfn *[0]byte if xFunc == nil { - stepfn = (*[0]byte)(C.step_tramp) - finalfn = (*[0]byte)(C.final_tramp) + stepfn = (*[0]byte)(C.c_step_tramp) + finalfn = (*[0]byte)(C.c_final_tramp) } else { - funcfn = (*[0]byte)(C.func_tramp) + funcfn = (*[0]byte)(C.c_func_tramp) } res := C.go_sqlite3_create_function_v2( @@ -200,8 +196,8 @@ func getxfuncs(ctx *C.sqlite3_context) *xfunc { return x } -//export func_tramp -func func_tramp(ctx *C.sqlite3_context, n C.int, valarray **C.sqlite3_value) { +//export go_func_tramp +func go_func_tramp(ctx *C.sqlite3_context, n C.int, valarray **C.sqlite3_value) { x := getxfuncs(ctx) var vals []Value if n > 0 { @@ -210,8 +206,8 @@ func func_tramp(ctx *C.sqlite3_context, n C.int, valarray **C.sqlite3_value) { x.xFunc(Context{ptr: ctx}, vals...) } -//export step_tramp -func step_tramp(ctx *C.sqlite3_context, n C.int, valarray **C.sqlite3_value) { +//export go_step_tramp +func go_step_tramp(ctx *C.sqlite3_context, n C.int, valarray **C.sqlite3_value) { x := getxfuncs(ctx) var vals []Value if n > 0 { @@ -220,8 +216,8 @@ func step_tramp(ctx *C.sqlite3_context, n C.int, valarray **C.sqlite3_value) { x.xStep(Context{ptr: ctx}, vals...) } -//export final_tramp -func final_tramp(ctx *C.sqlite3_context) { +//export go_final_tramp +func go_final_tramp(ctx *C.sqlite3_context) { x := getxfuncs(ctx) x.xFinal(Context{ptr: ctx}) } diff --git a/vendor/github.com/go-llsqlite/crawshaw/session.go b/vendor/github.com/go-llsqlite/crawshaw/session.go index eecfb848ab..8d00978113 100644 --- a/vendor/github.com/go-llsqlite/crawshaw/session.go +++ b/vendor/github.com/go-llsqlite/crawshaw/session.go @@ -19,9 +19,6 @@ package sqlite // #include // #include "wrappers.h" // -// extern int go_strm_w_tramp(uintptr_t, char*, int); -// extern int go_strm_r_tramp(uintptr_t, char*, int*); -// // static int go_sqlite3session_changeset_strm( // sqlite3_session *pSession, // int (*xOutput)(void *pOut, const void *pData, int nData), diff --git a/vendor/github.com/go-llsqlite/crawshaw/sqlite.go b/vendor/github.com/go-llsqlite/crawshaw/sqlite.go index b937db3f4d..69549c886b 100644 --- a/vendor/github.com/go-llsqlite/crawshaw/sqlite.go +++ b/vendor/github.com/go-llsqlite/crawshaw/sqlite.go @@ -68,16 +68,13 @@ static int transient_bind_blob(sqlite3_stmt* stmt, int col, unsigned char* p, in return sqlite3_bind_blob(stmt, col, p, n, SQLITE_TRANSIENT); } -extern void log_fn(void* pArg, int code, char* msg); static void enable_logging() { - sqlite3_config(SQLITE_CONFIG_LOG, log_fn, NULL); + sqlite3_config(SQLITE_CONFIG_LOG, c_log_fn, NULL); } static int db_config_onoff(sqlite3* db, int op, int onoff) { return sqlite3_db_config(db, op, onoff, NULL); } - -extern int goBusyHandlerCallback(void *, int); */ import "C" @@ -399,7 +396,7 @@ func (c *Conn) setBusyHandler(handler func(count int) bool) { return } busyHandlers.Store(c.conn, handler) - C.sqlite3_busy_handler(c.conn, (*[0]byte)(C.goBusyHandlerCallback), unsafe.Pointer(c.conn)) + C.sqlite3_busy_handler(c.conn, (*[0]byte)(C.c_goBusyHandlerCallback), unsafe.Pointer(c.conn)) } //export goBusyHandlerCallback @@ -1328,8 +1325,8 @@ func sqliteInitFn() { } } -//export log_fn -func log_fn(_ unsafe.Pointer, code C.int, msg *C.char) { +//export go_log_fn +func go_log_fn(_ unsafe.Pointer, code C.int, msg *C.char) { var msgBytes []byte if msg != nil { str := C.GoString(msg) // TODO: do not copy msg. diff --git a/vendor/github.com/go-llsqlite/crawshaw/wrappers.c b/vendor/github.com/go-llsqlite/crawshaw/wrappers.c index cbe5d3baa7..3db6c64e14 100644 --- a/vendor/github.com/go-llsqlite/crawshaw/wrappers.c +++ b/vendor/github.com/go-llsqlite/crawshaw/wrappers.c @@ -42,8 +42,37 @@ int c_xapply_filter_tramp(void* pCtx, const char* zTab) { return go_xapply_filter_tramp((uintptr_t)pCtx, (char*)zTab); } +extern void go_func_tramp(sqlite3_context*, int, sqlite3_value**); +void c_func_tramp(sqlite3_context* ctx, int n, sqlite3_value** valarray) { + return go_func_tramp(ctx, n, valarray); +} + +extern void go_step_tramp(sqlite3_context*, int, sqlite3_value**); +void c_step_tramp(sqlite3_context* ctx, int n, sqlite3_value** valarray) { + return go_step_tramp(ctx, n, valarray); +} + +extern void go_final_tramp(sqlite3_context*); +void c_final_tramp(sqlite3_context* ctx) { + return go_final_tramp(ctx); +} + extern void go_destroy_tramp(uintptr_t); void c_destroy_tramp(void* ptr) { return go_destroy_tramp((uintptr_t)ptr); } +extern int go_sqlite_auth_tramp(uintptr_t, int, char*, char*, char*, char*); +int c_auth_tramp(void *userData, int action, const char* arg1, const char* arg2, const char* db, const char* trigger) { + return go_sqlite_auth_tramp((uintptr_t)userData, action, (char*)arg1, (char*)arg2, (char*)db, (char*)trigger); +} + +extern void go_log_fn(void*, int, char*); +void c_log_fn(void* pArg, int code, char* msg) { + return go_log_fn(pArg, code, msg); +} + +extern int goBusyHandlerCallback(void *, int); +int c_goBusyHandlerCallback(void *pArg, int count) { + return goBusyHandlerCallback(pArg, count); +} \ No newline at end of file diff --git a/vendor/github.com/go-llsqlite/crawshaw/wrappers.h b/vendor/github.com/go-llsqlite/crawshaw/wrappers.h index 4dc38fcd8c..988f2cd699 100644 --- a/vendor/github.com/go-llsqlite/crawshaw/wrappers.h +++ b/vendor/github.com/go-llsqlite/crawshaw/wrappers.h @@ -26,6 +26,14 @@ int c_strm_r_tramp(void*, const void*, int*); int c_xapply_conflict_tramp(void*, int, sqlite3_changeset_iter*); int c_xapply_filter_tramp(void*, const char*); +void c_log_fn(void*, int, char*); +int c_auth_tramp(void*, int, const char*, const char*, const char*, const char*); + +void c_func_tramp(sqlite3_context*, int, sqlite3_value**); +void c_step_tramp(sqlite3_context*, int, sqlite3_value**); +void c_final_tramp(sqlite3_context*); void c_destroy_tramp(void*); +int c_goBusyHandlerCallback(void*, int); + #endif // WRAPPERS_H diff --git a/vendor/github.com/pion/rtp/.golangci.yml b/vendor/github.com/pion/rtp/.golangci.yml index 6dd80c805c..e06de4d3c0 100644 --- a/vendor/github.com/pion/rtp/.golangci.yml +++ b/vendor/github.com/pion/rtp/.golangci.yml @@ -3,7 +3,8 @@ linters-settings: govet: - check-shadowing: true + enable: + - shadow misspell: locale: US exhaustive: @@ -110,6 +111,7 @@ linters: issues: exclude-use-default: false + exclude-dirs-use-default: false exclude-rules: # Allow complex tests and examples, better to be self contained - path: (examples|main\.go|_test\.go) @@ -121,6 +123,3 @@ issues: - path: cmd linters: - forbidigo - -run: - skip-dirs-use-default: false diff --git a/vendor/github.com/pion/rtp/codecs/av1_packet.go b/vendor/github.com/pion/rtp/codecs/av1_packet.go index 3a78b90e28..bcea6905da 100644 --- a/vendor/github.com/pion/rtp/codecs/av1_packet.go +++ b/vendor/github.com/pion/rtp/codecs/av1_packet.go @@ -134,6 +134,8 @@ type AV1Packet struct { // Each AV1 RTP Packet is a collection of OBU Elements. Each OBU Element may be a full OBU, or just a fragment of one. // AV1Frame provides the tools to construct a collection of OBUs from a collection of OBU Elements OBUElements [][]byte + + videoDepacketizer } // Unmarshal parses the passed byte slice and stores the result in the AV1Packet this method is called upon @@ -153,13 +155,26 @@ func (p *AV1Packet) Unmarshal(payload []byte) ([]byte, error) { return nil, errIsKeyframeAndFragment } - currentIndex := uint(1) - p.OBUElements = [][]byte{} + if !p.zeroAllocation { + obuElements, err := p.parseBody(payload[1:]) + if err != nil { + return nil, err + } + p.OBUElements = obuElements + } + + return payload[1:], nil +} + +func (p *AV1Packet) parseBody(payload []byte) ([][]byte, error) { + if p.OBUElements != nil { + return p.OBUElements, nil + } + + obuElements := [][]byte{} - var ( - obuElementLength, bytesRead uint - err error - ) + var obuElementLength, bytesRead uint + currentIndex := uint(0) for i := 1; ; i++ { if currentIndex == uint(len(payload)) { break @@ -170,6 +185,7 @@ func (p *AV1Packet) Unmarshal(payload []byte) ([]byte, error) { bytesRead = 0 obuElementLength = uint(len(payload)) - currentIndex } else { + var err error obuElementLength, bytesRead, err = obu.ReadLeb128(payload[currentIndex:]) if err != nil { return nil, err @@ -180,9 +196,9 @@ func (p *AV1Packet) Unmarshal(payload []byte) ([]byte, error) { if uint(len(payload)) < currentIndex+obuElementLength { return nil, errShortPacket } - p.OBUElements = append(p.OBUElements, payload[currentIndex:currentIndex+obuElementLength]) + obuElements = append(obuElements, payload[currentIndex:currentIndex+obuElementLength]) currentIndex += obuElementLength } - return payload[1:], nil + return obuElements, nil } diff --git a/vendor/github.com/pion/rtp/codecs/common.go b/vendor/github.com/pion/rtp/codecs/common.go index 5da8aaf6a8..e807a0ac52 100644 --- a/vendor/github.com/pion/rtp/codecs/common.go +++ b/vendor/github.com/pion/rtp/codecs/common.go @@ -22,8 +22,18 @@ func (d *audioDepacketizer) IsPartitionHead(_ []byte) bool { } // videoDepacketizer is a mixin for video codec depacketizers -type videoDepacketizer struct{} +type videoDepacketizer struct { + zeroAllocation bool +} func (d *videoDepacketizer) IsPartitionTail(marker bool, _ []byte) bool { return marker } + +// SetZeroAllocation enables Zero Allocation mode for the depacketizer +// By default the Depacketizers will allocate as they parse. These allocations +// are needed for Metadata and other optional values. If you don't need this information +// enabling SetZeroAllocation gives you higher performance at a reduced feature set. +func (d *videoDepacketizer) SetZeroAllocation(zeroAllocation bool) { + d.zeroAllocation = zeroAllocation +} diff --git a/vendor/github.com/pion/rtp/codecs/h264_packet.go b/vendor/github.com/pion/rtp/codecs/h264_packet.go index 583e18926e..3021fc0fcb 100644 --- a/vendor/github.com/pion/rtp/codecs/h264_packet.go +++ b/vendor/github.com/pion/rtp/codecs/h264_packet.go @@ -188,14 +188,16 @@ type H264Packet struct { videoDepacketizer } -func (p *H264Packet) doPackaging(nalu []byte) []byte { +func (p *H264Packet) doPackaging(buf, nalu []byte) []byte { if p.IsAVC { - naluLength := make([]byte, 4) - binary.BigEndian.PutUint32(naluLength, uint32(len(nalu))) - return append(naluLength, nalu...) + buf = binary.BigEndian.AppendUint32(buf, uint32(len(nalu))) + buf = append(buf, nalu...) + return buf } - return append(annexbNALUStartCode, nalu...) + buf = append(buf, annexbNALUStartCode...) + buf = append(buf, nalu...) + return buf } // IsDetectedFinalPacketInSequence returns true of the packet passed in has the @@ -206,6 +208,14 @@ func (p *H264Packet) IsDetectedFinalPacketInSequence(rtpPacketMarketBit bool) bo // Unmarshal parses the passed byte slice and stores the result in the H264Packet this method is called upon func (p *H264Packet) Unmarshal(payload []byte) ([]byte, error) { + if p.zeroAllocation { + return payload, nil + } + + return p.parseBody(payload) +} + +func (p *H264Packet) parseBody(payload []byte) ([]byte, error) { if len(payload) == 0 { return nil, fmt.Errorf("%w: %d <=0", errShortPacket, len(payload)) } @@ -215,7 +225,7 @@ func (p *H264Packet) Unmarshal(payload []byte) ([]byte, error) { naluType := payload[0] & naluTypeBitmask switch { case naluType > 0 && naluType < 24: - return p.doPackaging(payload), nil + return p.doPackaging(nil, payload), nil case naluType == stapaNALUType: currOffset := int(stapaHeaderSize) @@ -228,7 +238,7 @@ func (p *H264Packet) Unmarshal(payload []byte) ([]byte, error) { return nil, fmt.Errorf("%w STAP-A declared size(%d) is larger than buffer(%d)", errShortPacket, naluSize, len(payload)-currOffset) } - result = append(result, p.doPackaging(payload[currOffset:currOffset+naluSize])...) + result = p.doPackaging(result, payload[currOffset:currOffset+naluSize]) currOffset += naluSize } return result, nil @@ -251,7 +261,7 @@ func (p *H264Packet) Unmarshal(payload []byte) ([]byte, error) { nalu := append([]byte{}, naluRefIdc|fragmentedNaluType) nalu = append(nalu, p.fuaBuffer...) p.fuaBuffer = nil - return p.doPackaging(nalu), nil + return p.doPackaging(nil, nalu), nil } return []byte{}, nil diff --git a/vendor/github.com/pion/rtp/depacketizer.go b/vendor/github.com/pion/rtp/depacketizer.go index 0439a531a2..d10ad89b8f 100644 --- a/vendor/github.com/pion/rtp/depacketizer.go +++ b/vendor/github.com/pion/rtp/depacketizer.go @@ -5,11 +5,15 @@ package rtp // Depacketizer depacketizes a RTP payload, removing any RTP specific data from the payload type Depacketizer interface { + // Unmarshal parses the RTP payload and returns media. + // Metadata may be stored on the Depacketizer itself Unmarshal(packet []byte) ([]byte, error) + // Checks if the packet is at the beginning of a partition. This // should return false if the result could not be determined, in // which case the caller will detect timestamp discontinuities. IsPartitionHead(payload []byte) bool + // Checks if the packet is at the end of a partition. This should // return false if the result could not be determined. IsPartitionTail(marker bool, payload []byte) bool diff --git a/vendor/github.com/pion/transport/v2/deadline/deadline.go b/vendor/github.com/pion/transport/v2/deadline/deadline.go index abd39f06de..f49b908dba 100644 --- a/vendor/github.com/pion/transport/v2/deadline/deadline.go +++ b/vendor/github.com/pion/transport/v2/deadline/deadline.go @@ -11,25 +11,46 @@ import ( "time" ) +type deadlineState uint8 + +const ( + deadlineStopped deadlineState = iota + deadlineStarted + deadlineExceeded +) + +var _ context.Context = (*Deadline)(nil) + // Deadline signals updatable deadline timer. // Also, it implements context.Context. type Deadline struct { - exceeded chan struct{} - stop chan struct{} - stopped chan bool - deadline time.Time mu sync.RWMutex + timer timer + done chan struct{} + deadline time.Time + state deadlineState + pending uint8 } // New creates new deadline timer. func New() *Deadline { - d := &Deadline{ - exceeded: make(chan struct{}), - stop: make(chan struct{}), - stopped: make(chan bool, 1), + return &Deadline{ + done: make(chan struct{}), } - d.stopped <- true - return d +} + +func (d *Deadline) timeout() { + d.mu.Lock() + if d.pending--; d.pending != 0 || d.state != deadlineStarted { + d.mu.Unlock() + return + } + + d.state = deadlineExceeded + done := d.done + d.mu.Unlock() + + close(done) } // Set new deadline. Zero value means no deadline. @@ -37,55 +58,43 @@ func (d *Deadline) Set(t time.Time) { d.mu.Lock() defer d.mu.Unlock() - d.deadline = t + if d.state == deadlineStarted && d.timer.Stop() { + d.pending-- + } - close(d.stop) + d.deadline = t + d.pending++ - select { - case <-d.exceeded: - d.exceeded = make(chan struct{}) - default: - stopped := <-d.stopped - if !stopped { - d.exceeded = make(chan struct{}) - } + if d.state == deadlineExceeded { + d.done = make(chan struct{}) } - d.stop = make(chan struct{}) - d.stopped = make(chan bool, 1) if t.IsZero() { - d.stopped <- true + d.pending-- + d.state = deadlineStopped return } if dur := time.Until(t); dur > 0 { - exceeded := d.exceeded - stopped := d.stopped - go func() { - timer := time.NewTimer(dur) - select { - case <-timer.C: - close(exceeded) - stopped <- false - case <-d.stop: - if !timer.Stop() { - <-timer.C - } - stopped <- true - } - }() + d.state = deadlineStarted + if d.timer == nil { + d.timer = afterFunc(dur, d.timeout) + } else { + d.timer.Reset(dur) + } return } - close(d.exceeded) - d.stopped <- false + d.pending-- + d.state = deadlineExceeded + close(d.done) } // Done receives deadline signal. func (d *Deadline) Done() <-chan struct{} { d.mu.RLock() defer d.mu.RUnlock() - return d.exceeded + return d.done } // Err returns context.DeadlineExceeded if the deadline is exceeded. @@ -93,12 +102,10 @@ func (d *Deadline) Done() <-chan struct{} { func (d *Deadline) Err() error { d.mu.RLock() defer d.mu.RUnlock() - select { - case <-d.exceeded: + if d.state == deadlineExceeded { return context.DeadlineExceeded - default: - return nil } + return nil } // Deadline returns current deadline. diff --git a/vendor/github.com/pion/transport/v2/deadline/timer.go b/vendor/github.com/pion/transport/v2/deadline/timer.go new file mode 100644 index 0000000000..5a39724787 --- /dev/null +++ b/vendor/github.com/pion/transport/v2/deadline/timer.go @@ -0,0 +1,13 @@ +// SPDX-FileCopyrightText: 2023 The Pion community +// SPDX-License-Identifier: MIT + +package deadline + +import ( + "time" +) + +type timer interface { + Stop() bool + Reset(time.Duration) bool +} diff --git a/vendor/github.com/pion/transport/v2/deadline/timer_generic.go b/vendor/github.com/pion/transport/v2/deadline/timer_generic.go new file mode 100644 index 0000000000..0c8f87ca0d --- /dev/null +++ b/vendor/github.com/pion/transport/v2/deadline/timer_generic.go @@ -0,0 +1,15 @@ +// SPDX-FileCopyrightText: 2023 The Pion community +// SPDX-License-Identifier: MIT + +//go:build !js +// +build !js + +package deadline + +import ( + "time" +) + +func afterFunc(d time.Duration, f func()) timer { + return time.AfterFunc(d, f) +} diff --git a/vendor/github.com/pion/transport/v2/deadline/timer_js.go b/vendor/github.com/pion/transport/v2/deadline/timer_js.go new file mode 100644 index 0000000000..b77e31e09c --- /dev/null +++ b/vendor/github.com/pion/transport/v2/deadline/timer_js.go @@ -0,0 +1,67 @@ +// SPDX-FileCopyrightText: 2023 The Pion community +// SPDX-License-Identifier: MIT + +//go:build js +// +build js + +package deadline + +import ( + "sync" + "time" +) + +// jsTimer is a timer utility for wasm with a working Reset function. +type jsTimer struct { + f func() + mu sync.Mutex + timer *time.Timer + version uint64 + started bool +} + +func afterFunc(d time.Duration, f func()) timer { + t := &jsTimer{f: f} + t.Reset(d) + return t +} + +func (t *jsTimer) Stop() bool { + t.mu.Lock() + defer t.mu.Unlock() + + t.version++ + t.timer.Stop() + + started := t.started + t.started = false + return started +} + +func (t *jsTimer) Reset(d time.Duration) bool { + t.mu.Lock() + defer t.mu.Unlock() + + if t.timer != nil { + t.timer.Stop() + } + + t.version++ + version := t.version + t.timer = time.AfterFunc(d, func() { + t.mu.Lock() + if version != t.version { + t.mu.Unlock() + return + } + + t.started = false + t.mu.Unlock() + + t.f() + }) + + started := t.started + t.started = true + return started +} diff --git a/vendor/github.com/pion/transport/v2/packetio/buffer.go b/vendor/github.com/pion/transport/v2/packetio/buffer.go index 2d46d796a1..b487457bec 100644 --- a/vendor/github.com/pion/transport/v2/packetio/buffer.go +++ b/vendor/github.com/pion/transport/v2/packetio/buffer.go @@ -38,8 +38,9 @@ type Buffer struct { data []byte head, tail int - notify chan struct{} // non-nil when we have blocked readers - closed bool + notify chan struct{} + waiting bool + closed bool count int limitCount, limitSize int @@ -56,6 +57,7 @@ const ( // NewBuffer creates a new Buffer. func NewBuffer() *Buffer { return &Buffer{ + notify: make(chan struct{}, 1), readDeadline: deadline.New(), } } @@ -149,14 +151,6 @@ func (b *Buffer) Write(packet []byte) (int, error) { } } - var notify chan struct{} - if b.notify != nil { - // Prepare to notify readers, but only - // actually do it after we release the lock. - notify = b.notify - b.notify = nil - } - // store the length of the packet b.data[b.tail] = uint8(len(packet) >> 8) b.tail++ @@ -178,10 +172,17 @@ func (b *Buffer) Write(packet []byte) (int, error) { b.tail = m } b.count++ + + waiting := b.waiting + b.waiting = false + b.mutex.Unlock() - if notify != nil { - close(notify) + if waiting { + select { + case b.notify <- struct{}{}: + default: + } } return len(packet), nil @@ -244,7 +245,7 @@ func (b *Buffer) Read(packet []byte) (n int, err error) { //nolint:gocognit } b.count-- - + b.waiting = false b.mutex.Unlock() if copied < count { @@ -258,16 +259,13 @@ func (b *Buffer) Read(packet []byte) (n int, err error) { //nolint:gocognit return 0, io.EOF } - if b.notify == nil { - b.notify = make(chan struct{}) - } - notify := b.notify + b.waiting = true b.mutex.Unlock() select { case <-b.readDeadline.Done(): return 0, &netError{ErrTimeout, true, true} - case <-notify: + case <-b.notify: } } } @@ -282,14 +280,17 @@ func (b *Buffer) Close() (err error) { return nil } - notify := b.notify - b.notify = nil + waiting := b.waiting + b.waiting = false b.closed = true b.mutex.Unlock() - if notify != nil { - close(notify) + if waiting { + select { + case b.notify <- struct{}{}: + default: + } } return nil diff --git a/vendor/github.com/pion/transport/v2/udp/conn.go b/vendor/github.com/pion/transport/v2/udp/conn.go index e2378f8827..c2f257eaf4 100644 --- a/vendor/github.com/pion/transport/v2/udp/conn.go +++ b/vendor/github.com/pion/transport/v2/udp/conn.go @@ -12,6 +12,7 @@ import ( "sync/atomic" "time" + "github.com/pion/logging" "github.com/pion/transport/v2/deadline" "github.com/pion/transport/v2/packetio" "golang.org/x/net/ipv4" @@ -51,6 +52,8 @@ type listener struct { readDoneCh chan struct{} errRead atomic.Value // error + + logger logging.LeveledLogger } // Accept waits for and returns the next connection to the listener. @@ -151,6 +154,8 @@ type ListenConfig struct { WriteBufferSize int Batch BatchIOConfig + + LoggerFactory logging.LoggerFactory } // Listen creates a new listener based on the ListenConfig. @@ -175,6 +180,13 @@ func (lc *ListenConfig) Listen(network string, laddr *net.UDPAddr) (net.Listener _ = conn.SetWriteBuffer(lc.WriteBufferSize) } + loggerFactory := lc.LoggerFactory + if loggerFactory == nil { + loggerFactory = logging.NewDefaultLoggerFactory() + } + + logger := loggerFactory.NewLogger("transport") + l := &listener{ pConn: conn, acceptCh: make(chan *Conn, lc.Backlog), @@ -183,6 +195,7 @@ func (lc *ListenConfig) Listen(network string, laddr *net.UDPAddr) (net.Listener acceptFilter: lc.AcceptFilter, connWG: &sync.WaitGroup{}, readDoneCh: make(chan struct{}), + logger: logger, } if lc.Batch.Enable { @@ -251,6 +264,7 @@ func (l *listener) read() { n, raddr, err := l.pConn.ReadFrom(buf) if err != nil { l.errRead.Store(err) + l.logger.Tracef("error reading from connection err=%v", err) return } l.dispatchMsg(raddr, buf[:n]) @@ -263,7 +277,10 @@ func (l *listener) dispatchMsg(addr net.Addr, buf []byte) { return } if ok { - _, _ = conn.buffer.Write(buf) + _, err := conn.buffer.Write(buf) + if err != nil { + l.logger.Tracef("error dispatching message addr=%v err=%v", addr, err) + } } } diff --git a/vendor/github.com/pion/webrtc/v3/rtpreceiver.go b/vendor/github.com/pion/webrtc/v3/rtpreceiver.go index 8481a09f27..ec7c79bce2 100644 --- a/vendor/github.com/pion/webrtc/v3/rtpreceiver.go +++ b/vendor/github.com/pion/webrtc/v3/rtpreceiver.go @@ -409,6 +409,10 @@ func (r *RTPReceiver) receiveForRtx(ssrc SSRC, rsid string, streamInfo *intercep for i := range r.tracks { if r.tracks[i].track.RID() == rsid { track = &r.tracks[i] + if track.track.RtxSSRC() == 0 { + track.track.setRtxSSRC(SSRC(streamInfo.SSRC)) + } + break } } } diff --git a/vendor/github.com/pion/webrtc/v3/track_remote.go b/vendor/github.com/pion/webrtc/v3/track_remote.go index dfdb12b959..e2d8d70df2 100644 --- a/vendor/github.com/pion/webrtc/v3/track_remote.go +++ b/vendor/github.com/pion/webrtc/v3/track_remote.go @@ -223,3 +223,9 @@ func (t *TrackRemote) HasRTX() bool { defer t.mu.RUnlock() return t.rtxSsrc != 0 } + +func (t *TrackRemote) setRtxSSRC(ssrc SSRC) { + t.mu.Lock() + defer t.mu.Unlock() + t.rtxSsrc = ssrc +} diff --git a/vendor/github.com/rs/cors/README.md b/vendor/github.com/rs/cors/README.md index fe12fa671d..c7fbea0034 100644 --- a/vendor/github.com/rs/cors/README.md +++ b/vendor/github.com/rs/cors/README.md @@ -88,11 +88,14 @@ handler = c.Handler(handler) * **AllowedOrigins** `[]string`: A list of origins a cross-domain request can be executed from. If the special `*` value is present in the list, all origins will be allowed. An origin may contain a wildcard (`*`) to replace 0 or more characters (i.e.: `http://*.domain.com`). Usage of wildcards implies a small performance penality. Only one wildcard can be used per origin. The default value is `*`. * **AllowOriginFunc** `func (origin string) bool`: A custom function to validate the origin. It takes the origin as an argument and returns true if allowed, or false otherwise. If this option is set, the content of `AllowedOrigins` is ignored. -* **AllowOriginRequestFunc** `func (r *http.Request, origin string) bool`: A custom function to validate the origin. It takes the HTTP Request object and the origin as argument and returns true if allowed or false otherwise. If this option is set, the content of `AllowedOrigins` and `AllowOriginFunc` is ignored +* **AllowOriginRequestFunc** `func (r *http.Request, origin string) bool`: A custom function to validate the origin. It takes the HTTP Request object and the origin as argument and returns true if allowed or false otherwise. If this option is set, the contents of `AllowedOrigins` and `AllowOriginFunc` are ignored. +Deprecated: use `AllowOriginVaryRequestFunc` instead. +* **AllowOriginVaryRequestFunc** `func(r *http.Request, origin string) (bool, []string)`: A custom function to validate the origin. It takes the HTTP Request object and the origin as argument and returns true if allowed or false otherwise with a list of headers used to take that decision if any so they can be added to the Vary header. If this option is set, the contents of `AllowedOrigins`, `AllowOriginFunc` and `AllowOriginRequestFunc` are ignored. * **AllowedMethods** `[]string`: A list of methods the client is allowed to use with cross-domain requests. Default value is simple methods (`GET` and `POST`). * **AllowedHeaders** `[]string`: A list of non simple headers the client is allowed to use with cross-domain requests. -* **ExposedHeaders** `[]string`: Indicates which headers are safe to expose to the API of a CORS API specification +* **ExposedHeaders** `[]string`: Indicates which headers are safe to expose to the API of a CORS API specification. * **AllowCredentials** `bool`: Indicates whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates. The default is `false`. +* **AllowPrivateNetwork** `bool`: Indicates whether to accept cross-origin requests over a private network. * **MaxAge** `int`: Indicates how long (in seconds) the results of a preflight request can be cached. The default is `0` which stands for no max age. * **OptionsPassthrough** `bool`: Instructs preflight to let other potential next handlers to process the `OPTIONS` method. Turn this on if your application handles `OPTIONS`. * **OptionsSuccessStatus** `int`: Provides a status code to use for successful OPTIONS requests. Default value is `http.StatusNoContent` (`204`). @@ -102,18 +105,21 @@ See [API documentation](http://godoc.org/github.com/rs/cors) for more info. ## Benchmarks +``` goos: darwin goarch: arm64 pkg: github.com/rs/cors -BenchmarkWithout-10 352671961 3.317 ns/op 0 B/op 0 allocs/op -BenchmarkDefault-10 18261723 65.63 ns/op 0 B/op 0 allocs/op -BenchmarkAllowedOrigin-10 13309591 90.21 ns/op 0 B/op 0 allocs/op -BenchmarkPreflight-10 7247728 166.9 ns/op 0 B/op 0 allocs/op -BenchmarkPreflightHeader-10 5915437 202.9 ns/op 0 B/op 0 allocs/op -BenchmarkWildcard/match-10 250336476 4.784 ns/op 0 B/op 0 allocs/op -BenchmarkWildcard/too_short-10 1000000000 0.6354 ns/op 0 B/op 0 allocs/op +BenchmarkWithout-10 135325480 8.124 ns/op 0 B/op 0 allocs/op +BenchmarkDefault-10 24082140 51.40 ns/op 0 B/op 0 allocs/op +BenchmarkAllowedOrigin-10 16424518 88.25 ns/op 0 B/op 0 allocs/op +BenchmarkPreflight-10 8010259 147.3 ns/op 0 B/op 0 allocs/op +BenchmarkPreflightHeader-10 6850962 175.0 ns/op 0 B/op 0 allocs/op +BenchmarkWildcard/match-10 253275342 4.714 ns/op 0 B/op 0 allocs/op +BenchmarkWildcard/too_short-10 1000000000 0.6235 ns/op 0 B/op 0 allocs/op PASS -ok github.com/rs/cors 9.613s +ok github.com/rs/cors 99.131s +``` + ## Licenses All source code is licensed under the [MIT License](https://raw.github.com/rs/cors/master/LICENSE). diff --git a/vendor/github.com/rs/cors/cors.go b/vendor/github.com/rs/cors/cors.go index 69f89d8f94..da80d343b3 100644 --- a/vendor/github.com/rs/cors/cors.go +++ b/vendor/github.com/rs/cors/cors.go @@ -26,6 +26,8 @@ import ( "os" "strconv" "strings" + + "github.com/rs/cors/internal" ) var headerVaryOrigin = []string{"Origin"} @@ -49,13 +51,15 @@ type Options struct { // takes the HTTP Request object and the origin as argument and returns true // if allowed or false otherwise. If headers are used take the decision, // consider using AllowOriginVaryRequestFunc instead. If this option is set, - // the content of `AllowedOrigins`, `AllowOriginFunc` are ignored. + // the contents of `AllowedOrigins`, `AllowOriginFunc` are ignored. + // + // Deprecated: use `AllowOriginVaryRequestFunc` instead. AllowOriginRequestFunc func(r *http.Request, origin string) bool // AllowOriginVaryRequestFunc is a custom function to validate the origin. // It takes the HTTP Request object and the origin as argument and returns // true if allowed or false otherwise with a list of headers used to take // that decision if any so they can be added to the Vary header. If this - // option is set, the content of `AllowedOrigins`, `AllowOriginFunc` and + // option is set, the contents of `AllowedOrigins`, `AllowOriginFunc` and // `AllowOriginRequestFunc` are ignored. AllowOriginVaryRequestFunc func(r *http.Request, origin string) (bool, []string) // AllowedMethods is a list of methods the client is allowed to use with @@ -109,7 +113,11 @@ type Cors struct { // Optional origin validator function allowOriginFunc func(r *http.Request, origin string) (bool, []string) // Normalized list of allowed headers - allowedHeaders []string + // Note: the Fetch standard guarantees that CORS-unsafe request-header names + // (i.e. the values listed in the Access-Control-Request-Headers header) + // are unique and sorted; + // see https://fetch.spec.whatwg.org/#cors-unsafe-request-header-names. + allowedHeaders internal.SortedSet // Normalized list of allowed methods allowedMethods []string // Pre-computed normalized list of exposed headers @@ -140,33 +148,29 @@ func New(options Options) *Cors { c.Log = log.New(os.Stdout, "[cors] ", log.LstdFlags) } - if options.AllowOriginVaryRequestFunc != nil { + // Allowed origins + switch { + case options.AllowOriginVaryRequestFunc != nil: c.allowOriginFunc = options.AllowOriginVaryRequestFunc - } else if options.AllowOriginRequestFunc != nil { + case options.AllowOriginRequestFunc != nil: c.allowOriginFunc = func(r *http.Request, origin string) (bool, []string) { return options.AllowOriginRequestFunc(r, origin), nil } - } else if options.AllowOriginFunc != nil { + case options.AllowOriginFunc != nil: c.allowOriginFunc = func(r *http.Request, origin string) (bool, []string) { return options.AllowOriginFunc(origin), nil } - } - - // Normalize options - // Note: for origins matching, the spec requires a case-sensitive matching. - // As it may error prone, we chose to ignore the spec here. - - // Allowed Origins - if len(options.AllowedOrigins) == 0 { + case len(options.AllowedOrigins) == 0: if c.allowOriginFunc == nil { // Default is all origins c.allowedOriginsAll = true } - } else { + default: c.allowedOrigins = []string{} c.allowedWOrigins = []wildcard{} for _, origin := range options.AllowedOrigins { - // Normalize + // Note: for origins matching, the spec requires a case-sensitive matching. + // As it may error prone, we chose to ignore the spec here. origin = strings.ToLower(origin) if origin == "*" { // If "*" is present in the list, turn the whole list into a match all @@ -185,15 +189,19 @@ func New(options Options) *Cors { } // Allowed Headers + // Note: the Fetch standard guarantees that CORS-unsafe request-header names + // (i.e. the values listed in the Access-Control-Request-Headers header) + // are lowercase; see https://fetch.spec.whatwg.org/#cors-unsafe-request-header-names. if len(options.AllowedHeaders) == 0 { // Use sensible defaults - c.allowedHeaders = []string{"Accept", "Content-Type", "X-Requested-With"} + c.allowedHeaders = internal.NewSortedSet("accept", "content-type", "x-requested-with") } else { - c.allowedHeaders = convert(options.AllowedHeaders, http.CanonicalHeaderKey) + normalized := convert(options.AllowedHeaders, strings.ToLower) + c.allowedHeaders = internal.NewSortedSet(normalized...) for _, h := range options.AllowedHeaders { if h == "*" { c.allowedHeadersAll = true - c.allowedHeaders = nil + c.allowedHeaders = internal.SortedSet{} break } } @@ -353,10 +361,12 @@ func (c *Cors) handlePreflight(w http.ResponseWriter, r *http.Request) { c.logf(" Preflight aborted: method '%s' not allowed", reqMethod) return } - reqHeadersRaw := r.Header["Access-Control-Request-Headers"] - reqHeaders, reqHeadersEdited := convertDidCopy(splitHeaderValues(reqHeadersRaw), http.CanonicalHeaderKey) - if !c.areHeadersAllowed(reqHeaders) { - c.logf(" Preflight aborted: headers '%v' not allowed", reqHeaders) + // Note: the Fetch standard guarantees that at most one + // Access-Control-Request-Headers header is present in the preflight request; + // see step 5.2 in https://fetch.spec.whatwg.org/#cors-preflight-fetch-0. + reqHeaders, found := first(r.Header, "Access-Control-Request-Headers") + if found && !c.allowedHeadersAll && !c.allowedHeaders.Subsumes(reqHeaders[0]) { + c.logf(" Preflight aborted: headers '%v' not allowed", reqHeaders[0]) return } if c.allowedOriginsAll { @@ -367,14 +377,10 @@ func (c *Cors) handlePreflight(w http.ResponseWriter, r *http.Request) { // Spec says: Since the list of methods can be unbounded, simply returning the method indicated // by Access-Control-Request-Method (if supported) can be enough headers["Access-Control-Allow-Methods"] = r.Header["Access-Control-Request-Method"] - if len(reqHeaders) > 0 { + if found && len(reqHeaders[0]) > 0 { // Spec says: Since the list of headers can be unbounded, simply returning supported headers // from Access-Control-Request-Headers can be enough - if reqHeadersEdited || len(reqHeaders) != len(reqHeadersRaw) { - headers.Set("Access-Control-Allow-Headers", strings.Join(reqHeaders, ", ")) - } else { - headers["Access-Control-Allow-Headers"] = reqHeadersRaw - } + headers["Access-Control-Allow-Headers"] = reqHeaders } if c.allowCredentials { headers["Access-Control-Allow-Credentials"] = headerTrue @@ -398,10 +404,10 @@ func (c *Cors) handleActualRequest(w http.ResponseWriter, r *http.Request) { allowed, additionalVaryHeaders := c.isOriginAllowed(r, origin) // Always set Vary, see https://github.com/rs/cors/issues/10 - if vary, found := headers["Vary"]; found { - headers["Vary"] = append(vary, headerVaryOrigin[0]) - } else { + if vary := headers["Vary"]; vary == nil { headers["Vary"] = headerVaryOrigin + } else { + headers["Vary"] = append(vary, headerVaryOrigin[0]) } if len(additionalVaryHeaders) > 0 { headers.Add("Vary", strings.Join(convert(additionalVaryHeaders, http.CanonicalHeaderKey), ", ")) @@ -494,24 +500,3 @@ func (c *Cors) isMethodAllowed(method string) bool { } return false } - -// areHeadersAllowed checks if a given list of headers are allowed to used within -// a cross-domain request. -func (c *Cors) areHeadersAllowed(requestedHeaders []string) bool { - if c.allowedHeadersAll || len(requestedHeaders) == 0 { - return true - } - for _, header := range requestedHeaders { - found := false - for _, h := range c.allowedHeaders { - if h == header { - found = true - break - } - } - if !found { - return false - } - } - return true -} diff --git a/vendor/github.com/rs/cors/internal/sortedset.go b/vendor/github.com/rs/cors/internal/sortedset.go new file mode 100644 index 0000000000..513da20f7d --- /dev/null +++ b/vendor/github.com/rs/cors/internal/sortedset.go @@ -0,0 +1,113 @@ +// adapted from github.com/jub0bs/cors +package internal + +import ( + "sort" + "strings" +) + +// A SortedSet represents a mathematical set of strings sorted in +// lexicographical order. +// Each element has a unique position ranging from 0 (inclusive) +// to the set's cardinality (exclusive). +// The zero value represents an empty set. +type SortedSet struct { + m map[string]int + maxLen int +} + +// NewSortedSet returns a SortedSet that contains all of elems, +// but no other elements. +func NewSortedSet(elems ...string) SortedSet { + sort.Strings(elems) + m := make(map[string]int) + var maxLen int + i := 0 + for _, s := range elems { + if _, exists := m[s]; exists { + continue + } + m[s] = i + i++ + maxLen = max(maxLen, len(s)) + } + return SortedSet{ + m: m, + maxLen: maxLen, + } +} + +// Size returns the cardinality of set. +func (set SortedSet) Size() int { + return len(set.m) +} + +// String sorts joins the elements of set (in lexicographical order) +// with a comma and returns the resulting string. +func (set SortedSet) String() string { + elems := make([]string, len(set.m)) + for elem, i := range set.m { + elems[i] = elem // safe indexing, by construction of SortedSet + } + return strings.Join(elems, ",") +} + +// Subsumes reports whether csv is a sequence of comma-separated names that are +// - all elements of set, +// - sorted in lexicographically order, +// - unique. +func (set SortedSet) Subsumes(csv string) bool { + if csv == "" { + return true + } + posOfLastNameSeen := -1 + chunkSize := set.maxLen + 1 // (to accommodate for at least one comma) + for { + // As a defense against maliciously long names in csv, + // we only process at most chunkSize bytes per iteration. + end := min(len(csv), chunkSize) + comma := strings.IndexByte(csv[:end], ',') + var name string + if comma == -1 { + name = csv + } else { + name = csv[:comma] + } + pos, found := set.m[name] + if !found { + return false + } + // The names in csv are expected to be sorted in lexicographical order + // and appear at most once in csv. + // Therefore, the positions (in set) of the names that + // appear in csv should form a strictly increasing sequence. + // If that's not actually the case, bail out. + if pos <= posOfLastNameSeen { + return false + } + posOfLastNameSeen = pos + if comma < 0 { // We've now processed all the names in csv. + break + } + csv = csv[comma+1:] + } + return true +} + +// TODO: when updating go directive to 1.21 or later, +// use min builtin instead. +func min(a, b int) int { + if a < b { + return a + } + return b +} + +// TODO: when updating go directive to 1.21 or later, +// use max builtin instead. +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/vendor/github.com/rs/cors/utils.go b/vendor/github.com/rs/cors/utils.go index ca9983d3f7..7019f45cd9 100644 --- a/vendor/github.com/rs/cors/utils.go +++ b/vendor/github.com/rs/cors/utils.go @@ -1,72 +1,34 @@ package cors import ( + "net/http" "strings" ) -type converter func(string) string - type wildcard struct { prefix string suffix string } func (w wildcard) match(s string) bool { - return len(s) >= len(w.prefix)+len(w.suffix) && strings.HasPrefix(s, w.prefix) && strings.HasSuffix(s, w.suffix) -} - -// split compounded header values ["foo, bar", "baz"] -> ["foo", "bar", "baz"] -func splitHeaderValues(values []string) []string { - out := values - copied := false - for i, v := range values { - needsSplit := strings.IndexByte(v, ',') != -1 - if !copied { - if needsSplit { - split := strings.Split(v, ",") - out = make([]string, i, len(values)+len(split)-1) - copy(out, values[:i]) - for _, s := range split { - out = append(out, strings.TrimSpace(s)) - } - copied = true - } - } else { - if needsSplit { - split := strings.Split(v, ",") - for _, s := range split { - out = append(out, strings.TrimSpace(s)) - } - } else { - out = append(out, v) - } - } - } - return out + return len(s) >= len(w.prefix)+len(w.suffix) && + strings.HasPrefix(s, w.prefix) && + strings.HasSuffix(s, w.suffix) } // convert converts a list of string using the passed converter function -func convert(s []string, c converter) []string { - out, _ := convertDidCopy(s, c) +func convert(s []string, f func(string) string) []string { + out := make([]string, len(s)) + for i := range s { + out[i] = f(s[i]) + } return out } -// convertDidCopy is same as convert but returns true if it copied the slice -func convertDidCopy(s []string, c converter) ([]string, bool) { - out := s - copied := false - for i, v := range s { - if !copied { - v2 := c(v) - if v2 != v { - out = make([]string, len(s)) - copy(out, s[:i]) - out[i] = v2 - copied = true - } - } else { - out[i] = c(v) - } +func first(hdrs http.Header, k string) ([]string, bool) { + v, found := hdrs[k] + if !found || len(v) == 0 { + return nil, false } - return out, copied + return v[:1], true } diff --git a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml b/vendor/github.com/tklauser/go-sysconf/.cirrus.yml index 45cab03e21..33e6595cca 100644 --- a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml +++ b/vendor/github.com/tklauser/go-sysconf/.cirrus.yml @@ -1,10 +1,10 @@ env: CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.21.3 + GO_VERSION: go1.22.2 -freebsd_12_task: +freebsd_13_task: freebsd_instance: - image_family: freebsd-12-3 + image_family: freebsd-13-2 install_script: | pkg install -y go GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest @@ -12,9 +12,9 @@ freebsd_12_task: build_script: bin/${GO_VERSION} build -v ./... test_script: bin/${GO_VERSION} test -race ./... -freebsd_13_task: +freebsd_14_task: freebsd_instance: - image_family: freebsd-13-0 + image_family: freebsd-14-0 install_script: | pkg install -y go GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go index 7c96157bb7..ec81c02ac8 100644 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go +++ b/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || netbsd || openbsd -// +build darwin dragonfly freebsd netbsd openbsd package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go b/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go index 3f5d83f692..b471ec1044 100644 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go +++ b/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go @@ -16,6 +16,10 @@ const ( _HOST_NAME_MAX = _MAXHOSTNAMELEN - 1 _LOGIN_NAME_MAX = _MAXLOGNAME _SYMLOOP_MAX = _MAXSYMLINKS + + // _PTHREAD_STACK_MIN changed in macOS 14 + _PTHREAD_STACK_MIN_LT_MACOS14 = 0x2000 + _PTHREAD_STACK_MIN_GE_MACOS14 = 0x4000 ) var uname struct { @@ -23,6 +27,21 @@ var uname struct { macOSMajor int } +func getMacOSMajor() int { + uname.Once.Do(func() { + var u unix.Utsname + err := unix.Uname(&u) + if err != nil { + return + } + rel := unix.ByteSliceToString(u.Release[:]) + ver := strings.Split(rel, ".") + maj, _ := strconv.Atoi(ver[0]) + uname.macOSMajor = maj + }) + return uname.macOSMajor +} + // sysconf implements sysconf(4) as in the Darwin libc (derived from the FreeBSD // libc), version 1534.81.1. // See https://github.com/apple-oss-distributions/Libc/tree/Libc-1534.81.1. @@ -91,7 +110,10 @@ func sysconf(name int) (int64, error) { case SC_THREAD_PRIO_PROTECT: return _POSIX_THREAD_PRIO_PROTECT, nil case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil + if getMacOSMajor() < 23 { + return _PTHREAD_STACK_MIN_LT_MACOS14, nil + } + return _PTHREAD_STACK_MIN_GE_MACOS14, nil case SC_THREAD_THREADS_MAX: return -1, nil case SC_TIMER_MAX: @@ -140,18 +162,7 @@ func sysconf(name int) (int64, error) { } return _POSIX_SEMAPHORES, nil case SC_SPAWN: - uname.Once.Do(func() { - var u unix.Utsname - err := unix.Uname(&u) - if err != nil { - return - } - rel := unix.ByteSliceToString(u.Release[:]) - ver := strings.Split(rel, ".") - maj, _ := strconv.Atoi(ver[0]) - uname.macOSMajor = maj - }) - if uname.macOSMajor < 22 { + if getMacOSMajor() < 22 { return -1, nil } // macOS 13 (Ventura) and later diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go b/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go index 248bdc99cd..7dcc6f4cab 100644 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go +++ b/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd -// +build darwin dragonfly freebsd linux netbsd openbsd package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go b/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go index e61c0bc73e..830d8220b5 100644 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go +++ b/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || linux || openbsd -// +build darwin dragonfly freebsd linux openbsd package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go b/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go index 478d692005..5aa9119db7 100644 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go +++ b/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go index 6fadf3db1f..80b64393bc 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_defs_darwin.go //go:build darwin -// +build darwin package sysconf @@ -235,7 +234,6 @@ const ( _PTHREAD_DESTRUCTOR_ITERATIONS = 0x4 _PTHREAD_KEYS_MAX = 0x200 - _PTHREAD_STACK_MIN = 0x2000 ) const ( diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go index 0864cd4482..dae56570c0 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_defs_dragonfly.go //go:build dragonfly -// +build dragonfly package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go index 9885411acb..068f8a7eda 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_defs_freebsd.go //go:build freebsd -// +build freebsd package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go index 8545a342b9..12f289d76f 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_defs_linux.go //go:build linux -// +build linux package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go index d2aaf07770..772af475a4 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_defs_netbsd.go //go:build netbsd -// +build netbsd package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go index badc66cbda..625b098f91 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_defs_openbsd.go //go:build openbsd -// +build openbsd package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go index 29b6f8746a..c155cf5796 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_defs_solaris.go //go:build solaris -// +build solaris package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go index 478fe63a98..b5d4807482 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_freebsd.go //go:build freebsd && 386 -// +build freebsd,386 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go index 7f58a4d8ba..89c880aae2 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_freebsd.go //go:build freebsd && amd64 -// +build freebsd,amd64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go index deb47595ba..7b65fdd6fb 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_freebsd.go //go:build freebsd && arm -// +build freebsd,arm package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go index 556ba3da21..a86cb32bdf 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_freebsd.go //go:build freebsd && arm64 -// +build freebsd,arm64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go index b7cff760b1..6c847aeeaa 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_freebsd.go //go:build freebsd && riscv64 -// +build freebsd,riscv64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go index 16ee7ea64c..90963eb422 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && 386 -// +build linux,386 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go index 39aee349f2..28ad6f1838 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && amd64 -// +build linux,amd64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go index 2e401164e3..ffbcf37d40 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && arm -// +build linux,arm package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go index 362403abcc..cc9f4d88d4 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && arm64 -// +build linux,arm64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go index 95a71f4a2c..f62b15a697 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && loong64 -// +build linux,loong64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go index 868b0ffb33..37f492a81f 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && mips -// +build linux,mips package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go index 5949f3d71f..ae7b7f9c23 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && mips64 -// +build linux,mips64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go index 1853419a32..fe14670f2a 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && mips64le -// +build linux,mips64le package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go index ff41b3469b..d204585be9 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && mipsle -// +build linux,mipsle package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go index 388743728a..9ec78d335e 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && ppc64 -// +build linux,ppc64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go index 6d76929a64..a542067298 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && ppc64le -// +build linux,ppc64le package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go index 3d7d71b322..bfb923920a 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && riscv64 -// +build linux,riscv64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go index 9cf8529f53..6e935c8735 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_linux.go //go:build linux && s390x -// +build linux,s390x package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go index 3cd64dd662..ea0b24a822 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_netbsd.go //go:build netbsd && 386 -// +build netbsd,386 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go index 02fc1d0ef9..2d377e253c 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_netbsd.go //go:build netbsd && amd64 -// +build netbsd,amd64 package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go index 16f9b6e71e..4a6d83670a 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_netbsd.go //go:build netbsd && arm -// +build netbsd,arm package sysconf diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go index e530339ca7..49fb6725ef 100644 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go +++ b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go @@ -2,7 +2,6 @@ // cgo -godefs sysconf_values_netbsd.go //go:build netbsd && arm64 -// +build netbsd,arm64 package sysconf diff --git a/vendor/github.com/tklauser/numcpus/.cirrus.yml b/vendor/github.com/tklauser/numcpus/.cirrus.yml index 9ea6787bc1..33e6595cca 100644 --- a/vendor/github.com/tklauser/numcpus/.cirrus.yml +++ b/vendor/github.com/tklauser/numcpus/.cirrus.yml @@ -1,13 +1,23 @@ env: CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.21.3 + GO_VERSION: go1.22.2 -freebsd_12_task: +freebsd_13_task: freebsd_instance: - image_family: freebsd-12-3 + image_family: freebsd-13-2 install_script: | pkg install -y go GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest bin/${GO_VERSION} download - build_script: bin/${GO_VERSION} build -buildvcs=false -v ./... - test_script: bin/${GO_VERSION} test -buildvcs=false -race ./... + build_script: bin/${GO_VERSION} build -v ./... + test_script: bin/${GO_VERSION} test -race ./... + +freebsd_14_task: + freebsd_instance: + image_family: freebsd-14-0 + install_script: | + pkg install -y go + GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest + bin/${GO_VERSION} download + build_script: bin/${GO_VERSION} build -v ./... + test_script: bin/${GO_VERSION} test -race ./... diff --git a/vendor/github.com/tklauser/numcpus/numcpus_bsd.go b/vendor/github.com/tklauser/numcpus/numcpus_bsd.go index 9e77e38e6e..efd8db0f1c 100644 --- a/vendor/github.com/tklauser/numcpus/numcpus_bsd.go +++ b/vendor/github.com/tklauser/numcpus/numcpus_bsd.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build darwin || dragonfly || freebsd || netbsd || openbsd -// +build darwin dragonfly freebsd netbsd openbsd package numcpus diff --git a/vendor/github.com/tklauser/numcpus/numcpus_solaris.go b/vendor/github.com/tklauser/numcpus/numcpus_solaris.go index a264323781..f3b632fe74 100644 --- a/vendor/github.com/tklauser/numcpus/numcpus_solaris.go +++ b/vendor/github.com/tklauser/numcpus/numcpus_solaris.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build solaris -// +build solaris package numcpus diff --git a/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go b/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go index 4a0b7c43d2..e72355eca5 100644 --- a/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go +++ b/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows package numcpus diff --git a/vendor/github.com/urfave/cli/v2/app.go b/vendor/github.com/urfave/cli/v2/app.go index 6e6f6d0d63..af072e7699 100644 --- a/vendor/github.com/urfave/cli/v2/app.go +++ b/vendor/github.com/urfave/cli/v2/app.go @@ -229,8 +229,6 @@ func (a *App) Setup() { a.separator.disabled = true } - var newCommands []*Command - for _, c := range a.Commands { cname := c.Name if c.HelpName != "" { @@ -239,9 +237,7 @@ func (a *App) Setup() { c.separator = a.separator c.HelpName = fmt.Sprintf("%s %s", a.HelpName, cname) c.flagCategories = newFlagCategoriesFromFlags(c.Flags) - newCommands = append(newCommands, c) } - a.Commands = newCommands if a.Command(helpCommand.Name) == nil && !a.HideHelp { if !a.HideHelpCommand { diff --git a/vendor/github.com/urfave/cli/v2/category.go b/vendor/github.com/urfave/cli/v2/category.go index b1847eca18..0986fffca7 100644 --- a/vendor/github.com/urfave/cli/v2/category.go +++ b/vendor/github.com/urfave/cli/v2/category.go @@ -104,7 +104,7 @@ func newFlagCategoriesFromFlags(fs []Flag) FlagCategories { var categorized bool for _, fl := range fs { if cf, ok := fl.(CategorizableFlag); ok { - if cat := cf.GetCategory(); cat != "" { + if cat := cf.GetCategory(); cat != "" && cf.IsVisible() { fc.AddFlag(cat, cf) categorized = true } @@ -114,7 +114,7 @@ func newFlagCategoriesFromFlags(fs []Flag) FlagCategories { if categorized { for _, fl := range fs { if cf, ok := fl.(CategorizableFlag); ok { - if cf.GetCategory() == "" { + if cf.GetCategory() == "" && cf.IsVisible() { fc.AddFlag("", fl) } } diff --git a/vendor/github.com/urfave/cli/v2/command.go b/vendor/github.com/urfave/cli/v2/command.go index c20a571ee7..472c1ff446 100644 --- a/vendor/github.com/urfave/cli/v2/command.go +++ b/vendor/github.com/urfave/cli/v2/command.go @@ -132,15 +132,12 @@ func (c *Command) setup(ctx *Context) { } sort.Sort(c.categories.(*commandCategories)) - var newCmds []*Command for _, scmd := range c.Subcommands { if scmd.HelpName == "" { scmd.HelpName = fmt.Sprintf("%s %s", c.HelpName, scmd.Name) } scmd.separator = c.separator - newCmds = append(newCmds, scmd) } - c.Subcommands = newCmds if c.BashComplete == nil { c.BashComplete = DefaultCompleteWithFlags(c) diff --git a/vendor/github.com/urfave/cli/v2/template.go b/vendor/github.com/urfave/cli/v2/template.go index daad470022..5748f4c201 100644 --- a/vendor/github.com/urfave/cli/v2/template.go +++ b/vendor/github.com/urfave/cli/v2/template.go @@ -1,7 +1,7 @@ package cli var helpNameTemplate = `{{$v := offset .HelpName 6}}{{wrap .HelpName 3}}{{if .Usage}} - {{wrap .Usage $v}}{{end}}` -var usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}}[arguments...]{{end}}[arguments...]{{end}}{{end}}` +var usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}}{{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}} [arguments...]{{end}}{{end}}{{end}}` var descriptionTemplate = `{{wrap .Description 3}}` var authorsTemplate = `{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}: {{range $index, $author := .Authors}}{{if $index}} diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md index b2ffbe0181..cb28b36b99 100644 --- a/vendor/go.opentelemetry.io/otel/CHANGELOG.md +++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md @@ -8,6 +8,32 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [1.26.0/0.48.0/0.2.0-alpha] 2024-04-24 + +### Added + +- Add `Recorder` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing the log bridge implementations. (#5134) +- Add span flags to OTLP spans and links exported by `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#5194) +- Make the initial alpha release of `go.opentelemetry.io/otel/sdk/log`. + This new module contains the Go implementation of the OpenTelemetry Logs SDK. + This module is unstable and breaking changes may be introduced. + See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) +- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. + This new module contains an OTLP exporter that transmits log telemetry using HTTP. + This module is unstable and breaking changes may be introduced. + See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) +- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. + This new module contains an exporter prints log records to STDOUT. + This module is unstable and breaking changes may be introduced. + See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) +- The `go.opentelemetry.io/otel/semconv/v1.25.0` package. + The package contains semantic conventions from the `v1.25.0` version of the OpenTelemetry Semantic Conventions. (#5254) + +### Changed + +- Update `go.opentelemetry.io/proto/otlp` from v1.1.0 to v1.2.0. (#5177) +- Improve performance of baggage member character validation in `go.opentelemetry.io/otel/baggage`. (#5214) + ## [1.25.0/0.47.0/0.0.8/0.1.0-alpha] 2024-04-05 ### Added @@ -2895,7 +2921,8 @@ It contains api and sdk for trace and meter. - CircleCI build CI manifest files. - CODEOWNERS file to track owners of this project. -[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.25.0...HEAD +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.26.0...HEAD +[1.26.0/0.48.0/0.2.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.26.0 [1.25.0/0.47.0/0.0.8/0.1.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.25.0 [1.24.0/0.46.0/0.0.1-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.24.0 [1.23.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1 diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile index 8b3d8816ea..ca2f0ad037 100644 --- a/vendor/go.opentelemetry.io/otel/Makefile +++ b/vendor/go.opentelemetry.io/otel/Makefile @@ -23,7 +23,7 @@ TOOLS = $(CURDIR)/.tools $(TOOLS): @mkdir -p $@ -$(TOOLS)/%: | $(TOOLS) +$(TOOLS)/%: $(TOOLS_MOD_DIR)/go.mod | $(TOOLS) cd $(TOOLS_MOD_DIR) && \ $(GO) build -o $@ $(PACKAGE) @@ -99,7 +99,7 @@ $(PYTOOLS): @$(DOCKERPY) bash -c "python3 -m venv $(VENVDIR) && $(PIP) install --upgrade pip" # Install python packages into the virtual environment. -$(PYTOOLS)/%: | $(PYTOOLS) +$(PYTOOLS)/%: $(PYTOOLS) @$(DOCKERPY) $(PIP) install -r requirements.txt CODESPELL = $(PYTOOLS)/codespell @@ -113,18 +113,18 @@ generate: go-generate vanity-import-fix .PHONY: go-generate go-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%) go-generate/%: DIR=$* -go-generate/%: | $(STRINGER) $(GOTMPL) +go-generate/%: $(STRINGER) $(GOTMPL) @echo "$(GO) generate $(DIR)/..." \ && cd $(DIR) \ && PATH="$(TOOLS):$${PATH}" $(GO) generate ./... .PHONY: vanity-import-fix -vanity-import-fix: | $(PORTO) +vanity-import-fix: $(PORTO) @$(PORTO) --include-internal -w . # Generate go.work file for local development. .PHONY: go-work -go-work: | $(CROSSLINK) +go-work: $(CROSSLINK) $(CROSSLINK) work --root=$(shell pwd) # Build @@ -167,7 +167,7 @@ test/%: COVERAGE_MODE = atomic COVERAGE_PROFILE = coverage.out .PHONY: test-coverage -test-coverage: | $(GOCOVMERGE) +test-coverage: $(GOCOVMERGE) @set -e; \ printf "" > coverage.txt; \ for dir in $(ALL_COVERAGE_MOD_DIRS); do \ @@ -198,20 +198,20 @@ golangci-lint-fix: ARGS=--fix golangci-lint-fix: golangci-lint golangci-lint: $(OTEL_GO_MOD_DIRS:%=golangci-lint/%) golangci-lint/%: DIR=$* -golangci-lint/%: | $(GOLANGCI_LINT) +golangci-lint/%: $(GOLANGCI_LINT) @echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \ && cd $(DIR) \ && $(GOLANGCI_LINT) run --allow-serial-runners $(ARGS) .PHONY: crosslink -crosslink: | $(CROSSLINK) +crosslink: $(CROSSLINK) @echo "Updating intra-repository dependencies in all go modules" \ && $(CROSSLINK) --root=$(shell pwd) --prune .PHONY: go-mod-tidy go-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%) go-mod-tidy/%: DIR=$* -go-mod-tidy/%: | crosslink +go-mod-tidy/%: crosslink @echo "$(GO) mod tidy in $(DIR)" \ && cd $(DIR) \ && $(GO) mod tidy -compat=1.21 @@ -223,23 +223,23 @@ lint-modules: go-mod-tidy lint: misspell lint-modules golangci-lint govulncheck .PHONY: vanity-import-check -vanity-import-check: | $(PORTO) +vanity-import-check: $(PORTO) @$(PORTO) --include-internal -l . || ( echo "(run: make vanity-import-fix)"; exit 1 ) .PHONY: misspell -misspell: | $(MISSPELL) +misspell: $(MISSPELL) @$(MISSPELL) -w $(ALL_DOCS) .PHONY: govulncheck govulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%) govulncheck/%: DIR=$* -govulncheck/%: | $(GOVULNCHECK) +govulncheck/%: $(GOVULNCHECK) @echo "govulncheck ./... in $(DIR)" \ && cd $(DIR) \ && $(GOVULNCHECK) ./... .PHONY: codespell -codespell: | $(CODESPELL) +codespell: $(CODESPELL) @$(DOCKERPY) $(CODESPELL) .PHONY: license-check @@ -254,11 +254,11 @@ license-check: DEPENDABOT_CONFIG = .github/dependabot.yml .PHONY: dependabot-check -dependabot-check: | $(DBOTCONF) +dependabot-check: $(DBOTCONF) @$(DBOTCONF) verify $(DEPENDABOT_CONFIG) || ( echo "(run: make dependabot-generate)"; exit 1 ) .PHONY: dependabot-generate -dependabot-generate: | $(DBOTCONF) +dependabot-generate: $(DBOTCONF) @$(DBOTCONF) generate > $(DEPENDABOT_CONFIG) .PHONY: check-clean-work-tree @@ -273,7 +273,7 @@ check-clean-work-tree: SEMCONVPKG ?= "semconv/" .PHONY: semconv-generate -semconv-generate: | $(SEMCONVGEN) $(SEMCONVKIT) +semconv-generate: $(SEMCONVGEN) $(SEMCONVKIT) [ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry semantic-conventions tag"; exit 1 ) [ "$(OTEL_SEMCONV_REPO)" ] || ( echo "OTEL_SEMCONV_REPO unset: missing path to opentelemetry semantic-conventions repo"; exit 1 ) $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=span -p conventionType=trace -f trace.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" @@ -293,13 +293,13 @@ gorelease/%:| $(GORELEASE) || echo "" .PHONY: prerelease -prerelease: | $(MULTIMOD) +prerelease: $(MULTIMOD) @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) $(MULTIMOD) verify && $(MULTIMOD) prerelease -m ${MODSET} COMMIT ?= "HEAD" .PHONY: add-tags -add-tags: | $(MULTIMOD) +add-tags: $(MULTIMOD) @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) $(MULTIMOD) verify && $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT} diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go index 94285d9593..75773bc1ce 100644 --- a/vendor/go.opentelemetry.io/otel/baggage/baggage.go +++ b/vendor/go.opentelemetry.io/otel/baggage/baggage.go @@ -8,6 +8,7 @@ import ( "fmt" "net/url" "strings" + "unicode/utf8" "go.opentelemetry.io/otel/internal/baggage" ) @@ -221,7 +222,7 @@ type Member struct { hasData bool } -// NewMemberRaw returns a new Member from the passed arguments. +// NewMember returns a new Member from the passed arguments. // // The passed key must be compliant with W3C Baggage specification. // The passed value must be percent-encoded as defined in W3C Baggage specification. @@ -630,6 +631,95 @@ func skipSpace(s string, offset int) int { return i } +var safeKeyCharset = [utf8.RuneSelf]bool{ + // 0x23 to 0x27 + '#': true, + '$': true, + '%': true, + '&': true, + '\'': true, + + // 0x30 to 0x39 + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + + // 0x41 to 0x5a + 'A': true, + 'B': true, + 'C': true, + 'D': true, + 'E': true, + 'F': true, + 'G': true, + 'H': true, + 'I': true, + 'J': true, + 'K': true, + 'L': true, + 'M': true, + 'N': true, + 'O': true, + 'P': true, + 'Q': true, + 'R': true, + 'S': true, + 'T': true, + 'U': true, + 'V': true, + 'W': true, + 'X': true, + 'Y': true, + 'Z': true, + + // 0x5e to 0x7a + '^': true, + '_': true, + '`': true, + 'a': true, + 'b': true, + 'c': true, + 'd': true, + 'e': true, + 'f': true, + 'g': true, + 'h': true, + 'i': true, + 'j': true, + 'k': true, + 'l': true, + 'm': true, + 'n': true, + 'o': true, + 'p': true, + 'q': true, + 'r': true, + 's': true, + 't': true, + 'u': true, + 'v': true, + 'w': true, + 'x': true, + 'y': true, + 'z': true, + + // remainder + '!': true, + '*': true, + '+': true, + '-': true, + '.': true, + '|': true, + '~': true, +} + func validateKey(s string) bool { if len(s) == 0 { return false @@ -645,17 +735,7 @@ func validateKey(s string) bool { } func validateKeyChar(c int32) bool { - return (c >= 0x23 && c <= 0x27) || - (c >= 0x30 && c <= 0x39) || - (c >= 0x41 && c <= 0x5a) || - (c >= 0x5e && c <= 0x7a) || - c == 0x21 || - c == 0x2a || - c == 0x2b || - c == 0x2d || - c == 0x2e || - c == 0x7c || - c == 0x7e + return c >= 0 && c <= int32(utf8.RuneSelf) && safeKeyCharset[c] } func validateValue(s string) bool { @@ -668,12 +748,109 @@ func validateValue(s string) bool { return true } +var safeValueCharset = [utf8.RuneSelf]bool{ + '!': true, // 0x21 + + // 0x23 to 0x2b + '#': true, + '$': true, + '%': true, + '&': true, + '\'': true, + '(': true, + ')': true, + '*': true, + '+': true, + + // 0x2d to 0x3a + '-': true, + '.': true, + '/': true, + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + ':': true, + + // 0x3c to 0x5b + '<': true, // 0x3C + '=': true, // 0x3D + '>': true, // 0x3E + '?': true, // 0x3F + '@': true, // 0x40 + 'A': true, // 0x41 + 'B': true, // 0x42 + 'C': true, // 0x43 + 'D': true, // 0x44 + 'E': true, // 0x45 + 'F': true, // 0x46 + 'G': true, // 0x47 + 'H': true, // 0x48 + 'I': true, // 0x49 + 'J': true, // 0x4A + 'K': true, // 0x4B + 'L': true, // 0x4C + 'M': true, // 0x4D + 'N': true, // 0x4E + 'O': true, // 0x4F + 'P': true, // 0x50 + 'Q': true, // 0x51 + 'R': true, // 0x52 + 'S': true, // 0x53 + 'T': true, // 0x54 + 'U': true, // 0x55 + 'V': true, // 0x56 + 'W': true, // 0x57 + 'X': true, // 0x58 + 'Y': true, // 0x59 + 'Z': true, // 0x5A + '[': true, // 0x5B + + // 0x5d to 0x7e + ']': true, // 0x5D + '^': true, // 0x5E + '_': true, // 0x5F + '`': true, // 0x60 + 'a': true, // 0x61 + 'b': true, // 0x62 + 'c': true, // 0x63 + 'd': true, // 0x64 + 'e': true, // 0x65 + 'f': true, // 0x66 + 'g': true, // 0x67 + 'h': true, // 0x68 + 'i': true, // 0x69 + 'j': true, // 0x6A + 'k': true, // 0x6B + 'l': true, // 0x6C + 'm': true, // 0x6D + 'n': true, // 0x6E + 'o': true, // 0x6F + 'p': true, // 0x70 + 'q': true, // 0x71 + 'r': true, // 0x72 + 's': true, // 0x73 + 't': true, // 0x74 + 'u': true, // 0x75 + 'v': true, // 0x76 + 'w': true, // 0x77 + 'x': true, // 0x78 + 'y': true, // 0x79 + 'z': true, // 0x7A + '{': true, // 0x7B + '|': true, // 0x7C + '}': true, // 0x7D + '~': true, // 0x7E +} + func validateValueChar(c int32) bool { - return c == 0x21 || - (c >= 0x23 && c <= 0x2b) || - (c >= 0x2d && c <= 0x3a) || - (c >= 0x3c && c <= 0x5b) || - (c >= 0x5d && c <= 0x7e) + return c >= 0 && c <= int32(utf8.RuneSelf) && safeValueCharset[c] } // valueEscape escapes the string so it can be safely placed inside a baggage value, diff --git a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go index 347ffe2b31..6870e316dc 100644 --- a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go +++ b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go @@ -35,7 +35,7 @@ var ( versionPart = fmt.Sprintf("%.2X", supportedVersion) ) -// Inject set tracecontext from the Context into the carrier. +// Inject injects the trace context from ctx into carrier. func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) { sc := trace.SpanContextFromContext(ctx) if !sc.IsValid() { diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go index 7b83388454..ef97d30f9f 100644 --- a/vendor/go.opentelemetry.io/otel/version.go +++ b/vendor/go.opentelemetry.io/otel/version.go @@ -5,5 +5,5 @@ package otel // import "go.opentelemetry.io/otel" // Version is the current release version of OpenTelemetry in use. func Version() string { - return "1.25.0" + return "1.26.0" } diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml index 265ce8ad7a..ecd2734e0e 100644 --- a/vendor/go.opentelemetry.io/otel/versions.yaml +++ b/vendor/go.opentelemetry.io/otel/versions.yaml @@ -3,7 +3,7 @@ module-sets: stable-v1: - version: v1.25.0 + version: v1.26.0 modules: - go.opentelemetry.io/otel - go.opentelemetry.io/otel/bridge/opencensus @@ -29,19 +29,20 @@ module-sets: - go.opentelemetry.io/otel/sdk/metric - go.opentelemetry.io/otel/trace experimental-metrics: - version: v0.47.0 + version: v0.48.0 modules: - go.opentelemetry.io/otel/example/prometheus - go.opentelemetry.io/otel/exporters/prometheus experimental-logs: - version: v0.1.0-alpha + version: v0.2.0-alpha modules: - go.opentelemetry.io/otel/log + - go.opentelemetry.io/otel/sdk/log + - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp + - go.opentelemetry.io/otel/exporters/stdout/stdoutlog experimental-schema: version: v0.0.8 modules: - go.opentelemetry.io/otel/schema excluded-modules: - go.opentelemetry.io/otel/internal/tools - - go.opentelemetry.io/otel/sdk/log - - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp diff --git a/vendor/modernc.org/libc/ccgo_linux_amd64.go b/vendor/modernc.org/libc/ccgo_linux_amd64.go index d01d173fe7..f5ead62768 100644 --- a/vendor/modernc.org/libc/ccgo_linux_amd64.go +++ b/vendor/modernc.org/libc/ccgo_linux_amd64.go @@ -702,7 +702,7 @@ func Xcabsl(tls *TLS, z complex128) (r float64) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xcabs(tls, Complex128FromComplex128(complex128(z)))) + return Xcabs(tls, Complex128FromComplex128(z)) } const M_PI_21 = 1.5707963267948966 @@ -828,7 +828,7 @@ func Xcacoshl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcacosh(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcacosh(tls, Complex128FromComplex128(z))) } func Xcacosl(tls *TLS, z complex128) (r complex128) { @@ -836,7 +836,7 @@ func Xcacosl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcacos(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcacos(tls, Complex128FromComplex128(z))) } func Xcarg(tls *TLS, z complex128) (r float64) { @@ -860,7 +860,7 @@ func Xcargl(tls *TLS, z complex128) (r float64) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xcarg(tls, Complex128FromComplex128(complex128(z)))) + return Xcarg(tls, Complex128FromComplex128(z)) } // FIXME @@ -910,7 +910,7 @@ func Xcasinf(tls *TLS, z complex64) (r1 complex64) { y = +(*(*[2]float32)(unsafe.Pointer(&z)))[int32(1)] v1 = [2]float32{ 0: float32(Float64FromFloat64(1) - float64((x-y)*(x+y))), - 1: float32(-Float64FromFloat64(2) * float64(float64(x)) * float64(float64(y))), + 1: float32(-Float64FromFloat64(2) * float64(x) * float64(y)), } w = *(*complex64)(unsafe.Pointer(&v1)) v2 = [2]float32{ @@ -970,7 +970,7 @@ func Xcasinhl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcasinh(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcasinh(tls, Complex128FromComplex128(z))) } func Xcasinl(tls *TLS, z complex128) (r complex128) { @@ -978,7 +978,7 @@ func Xcasinl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcasin(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcasin(tls, Complex128FromComplex128(z))) } const MAXNUM = 0 @@ -998,8 +998,8 @@ func __redupi(tls *TLS, x float64) (r float64) { } else { t -= float64(0.5) } - i = int64(int64(t)) /* the multiple */ - t = float64(float64(i)) + i = int64(t) /* the multiple */ + t = float64(i) t = x - t*_DP1 - t*_DP2 - t*_DP3 return t } @@ -1050,9 +1050,9 @@ func __redupif(tls *TLS, xx float32) (r float32) { } else { t -= Float32FromFloat32(0.5) } - i = int64(int64(t)) /* the multiple */ - t = float32(float32(i)) - t = float32(float64(float64(x)) - float64(float64(t))*_DP11 - float64(float64(t))*_DP21 - float64(float64(t))*_DP31) + i = int64(t) /* the multiple */ + t = float32(i) + t = float32(float64(x) - float64(t)*_DP11 - float64(t)*_DP21 - float64(t)*_DP31) return t } @@ -1130,7 +1130,7 @@ func Xcatanhl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcatanh(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcatanh(tls, Complex128FromComplex128(z))) } func Xcatanl(tls *TLS, z complex128) (r complex128) { @@ -1138,7 +1138,7 @@ func Xcatanl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcatan(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcatan(tls, Complex128FromComplex128(z))) } /* cos(z) = cosh(i z) */ @@ -1187,10 +1187,10 @@ func Xccosh(tls *TLS, z complex128) (r complex128) { y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) hx = int32(__u >> int32(32)) - lx = int32(uint32(uint32(__u))) + lx = int32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) hy = int32(__u1 >> int32(32)) - ly = int32(uint32(uint32(__u1))) + ly = int32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -1456,7 +1456,7 @@ func Xccoshl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xccosh(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xccosh(tls, Complex128FromComplex128(z))) } func Xccosl(tls *TLS, z complex128) (r complex128) { @@ -1464,7 +1464,7 @@ func Xccosl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xccos(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xccos(tls, Complex128FromComplex128(z))) } var _exp_ovfl = uint32(0x40862e42) /* high bits of MAX_EXP * ln2 ~= 710 */ @@ -1484,7 +1484,7 @@ func Xcexp(tls *TLS, z complex128) (r complex128) { y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&y)) hy = uint32(__u >> int32(32)) - ly = uint32(uint32(__u)) + ly = uint32(__u) hy &= uint32(0x7fffffff) /* cexp(x + I 0) = exp(x) + I 0 */ if hy|ly == uint32(0) { @@ -1496,7 +1496,7 @@ func Xcexp(tls *TLS, z complex128) (r complex128) { } __u1 = *(*Tuint64_t)(unsafe.Pointer(&x)) hx = uint32(__u1 >> int32(32)) - lx = uint32(uint32(__u1)) + lx = uint32(__u1) /* cexp(0 + I y) = cos(y) + I sin(y) */ if hx&uint32(0x7fffffff)|lx == uint32(0) { v2 = [2]float64{ @@ -1640,7 +1640,7 @@ func Xcexpl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcexp(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcexp(tls, Complex128FromComplex128(z))) } func Xcimag(tls *TLS, z complex128) (r float64) { @@ -1712,7 +1712,7 @@ func Xclogl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xclog(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xclog(tls, Complex128FromComplex128(z))) } func Xconj(tls *TLS, z complex128) (r complex128) { @@ -1780,7 +1780,7 @@ func Xcpowl(tls *TLS, z complex128, c complex128) (r complex128) { trc("tls=%v z=%v c=%v, (%v:)", tls, z, c, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcpow(tls, Complex128FromComplex128(complex128(z)), Complex128FromComplex128(complex128(c)))) + return Complex128FromComplex128(Xcpow(tls, Complex128FromComplex128(z), Complex128FromComplex128(c))) } func Xcproj(tls *TLS, z complex128) (r complex128) { @@ -1860,7 +1860,7 @@ func Xcprojl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcproj(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcproj(tls, Complex128FromComplex128(z))) } func Xcreal(tls *TLS, z complex128) (r float64) { @@ -1943,10 +1943,10 @@ func Xcsinh(tls *TLS, z complex128) (r complex128) { y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u = *(*Tuint64_t)(unsafe.Pointer(&x)) hx = int32(__u >> int32(32)) - lx = int32(uint32(uint32(__u))) + lx = int32(uint32(__u)) __u1 = *(*Tuint64_t)(unsafe.Pointer(&y)) hy = int32(__u1 >> int32(32)) - ly = int32(uint32(uint32(__u1))) + ly = int32(uint32(__u1)) ix = int32(0x7fffffff) & hx iy = int32(0x7fffffff) & hy /* Handle the nearly-non-exceptional cases where x and y are finite. */ @@ -2213,7 +2213,7 @@ func Xcsinhl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcsinh(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcsinh(tls, Complex128FromComplex128(z))) } func Xcsinl(tls *TLS, z complex128) (r complex128) { @@ -2221,7 +2221,7 @@ func Xcsinl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcsin(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcsin(tls, Complex128FromComplex128(z))) } const THRESH = 7.446288774449766e+307 @@ -2444,17 +2444,17 @@ _9: * This is Algorithm 312, CACM vol 10, Oct 1967. */ if a >= Float32FromInt32(0) { - t = Xsqrt(tls, (float64(float64(a))+Xhypot(tls, float64(float64(a)), float64(float64(b))))*float64(0.5)) + t = Xsqrt(tls, (float64(a)+Xhypot(tls, float64(a), float64(b)))*float64(0.5)) v14 = [2]float32{ 0: float32(t), - 1: float32(float64(float64(b)) / (Float64FromFloat64(2) * t)), + 1: float32(float64(b) / (Float64FromFloat64(2) * t)), } return *(*complex64)(unsafe.Pointer(&v14)) } else { - t = Xsqrt(tls, (float64(-a)+Xhypot(tls, float64(float64(a)), float64(float64(b))))*float64(0.5)) + t = Xsqrt(tls, (float64(-a)+Xhypot(tls, float64(a), float64(b)))*float64(0.5)) v15 = [2]float32{ 0: float32(float64(Xfabsf(tls, b)) / (Float64FromFloat64(2) * t)), - 1: Xcopysignf(tls, float32(float32(t)), b), + 1: Xcopysignf(tls, float32(t), b), } return *(*complex64)(unsafe.Pointer(&v15)) } @@ -2469,7 +2469,7 @@ func Xcsqrtl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xcsqrt(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xcsqrt(tls, Complex128FromComplex128(z))) } /* tan(z) = -i tanh(i z) */ @@ -2533,7 +2533,7 @@ func Xctanh(tls *TLS, z complex128) (r complex128) { y = +(*(*[2]float64)(unsafe.Pointer(&z)))[int32(1)] __u1 = *(*Tuint64_t)(unsafe.Pointer(&x)) hx = uint32(__u1 >> int32(32)) - lx = uint32(uint32(__u1)) + lx = uint32(__u1) ix = hx & uint32(0x7fffffff) /* * ctanh(NaN + i 0) = NaN + i 0 @@ -2723,7 +2723,7 @@ func Xctanhl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xctanh(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xctanh(tls, Complex128FromComplex128(z))) } func Xctanl(tls *TLS, z complex128) (r complex128) { @@ -2731,7 +2731,7 @@ func Xctanl(tls *TLS, z complex128) (r complex128) { trc("tls=%v z=%v, (%v:)", tls, z, origin(2)) defer func() { trc("-> %v", r) }() } - return Complex128FromComplex128(Xctan(tls, Complex128FromComplex128(complex128(z)))) + return Complex128FromComplex128(Xctan(tls, Complex128FromComplex128(z))) } const BUFSIZ = 1024 @@ -3182,7 +3182,7 @@ func Xconfstr(tls *TLS, name int32, buf uintptr, len1 Tsize_t) (r Tsize_t) { if !(name != 0) { s = __ccgo_ts + 1 } else { - if uint32(uint32(name)) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { + if uint32(name) & ^Uint32FromUint32(4) != uint32(1) && uint32(name-int32(_CS_POSIX_V6_ILP32_OFF32_CFLAGS)) > uint32(35) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uint64(0) } @@ -3309,7 +3309,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(uint64(name)) >= Uint64FromInt64(42)/Uint64FromInt64(2) { + if uint64(name) >= Uint64FromInt64(42)/Uint64FromInt64(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -7458,7 +7458,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(uint64(name)) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { + if uint64(name) >= Uint64FromInt64(502)/Uint64FromInt64(2) || !(_values1[name] != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } else { @@ -7503,7 +7503,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { cnt = v3 i = v3 for { - if !(uint64(uint64(i)) < uint64(128)) { + if !(uint64(i) < uint64(128)) { break } for { @@ -7522,7 +7522,7 @@ func Xsysconf(tls *TLS, name int32) (r int64) { ; i++ } - return int64(int64(cnt)) + return int64(cnt) case (-Int32FromInt32(256) | Int32FromInt32(8)) & Int32FromInt32(255): fallthrough case (-Int32FromInt32(256) | Int32FromInt32(9)) & Int32FromInt32(255): @@ -7531,9 +7531,9 @@ func Xsysconf(tls *TLS, name int32) (r int64) { (*(*Tsysinfo)(unsafe.Pointer(bp + 144))).Fmem_unit = uint32(1) } if name == int32(_SC_PHYS_PAGES) { - mem = uint64((*(*Tsysinfo)(unsafe.Pointer(bp + 144))).Ftotalram) + mem = (*(*Tsysinfo)(unsafe.Pointer(bp + 144))).Ftotalram } else { - mem = uint64((*(*Tsysinfo)(unsafe.Pointer(bp + 144))).Ffreeram + (*(*Tsysinfo)(unsafe.Pointer(bp + 144))).Fbufferram) + mem = (*(*Tsysinfo)(unsafe.Pointer(bp + 144))).Ffreeram + (*(*Tsysinfo)(unsafe.Pointer(bp + 144))).Fbufferram } mem *= uint64((*(*Tsysinfo)(unsafe.Pointer(bp + 144))).Fmem_unit) mem /= uint64(PAGESIZE) @@ -9176,8 +9176,8 @@ 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(int32(flags)) & int32(1)) - safety = uint32(uint32(flags)) & uint32(2) << int32(15) + bug = uint32(int32(flags) & int32(1)) + safety = uint32(flags) & uint32(2) << int32(15) v1 = Uint32FromInt32(0) diff = v1 sign = v1 @@ -9197,7 +9197,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(*(*int8)(unsafe.Pointer(ptr)))) /* correct */ *(*TBF_word)(unsafe.Pointer(bp + 1*4)) <<= uint32(8) - *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(int8(*(*int8)(unsafe.Pointer(ptr)))) /* bug */ + *(*TBF_word)(unsafe.Pointer(bp + 1*4)) |= uint32(*(*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 @@ -11259,7 +11259,7 @@ func _ascii_to_bin(tls *TLS, ch int32) (r Tuint32_t) { } } retval &= int32(0x3f) - return uint32(uint32(retval)) + return uint32(retval) } // C documentation @@ -11269,7 +11269,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(int32(ch)) == int32('\n') || int32(int32(ch)) == int32(':')) + return BoolInt32(!(ch != 0) || int32(ch) == int32('\n') || int32(ch) == int32(':')) } func _setup_salt(tls *TLS, salt Tuint32_t) (r Tuint32_t) { @@ -12023,17 +12023,17 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt slen = i /* md5(key salt key) */ _md5_init(tls, bp) - _md5_update(tls, bp, key, uint64(uint64(klen))) - _md5_update(tls, bp, salt, uint64(uint64(slen))) - _md5_update(tls, bp, key, uint64(uint64(klen))) + _md5_update(tls, bp, key, uint64(klen)) + _md5_update(tls, bp, salt, uint64(slen)) + _md5_update(tls, bp, key, uint64(klen)) _md5_sum(tls, bp, bp+88) /* md5(key $1$ salt repeated-md weird-key[0]-0) */ _md5_init(tls, bp) - _md5_update(tls, bp, key, uint64(uint64(klen))) + _md5_update(tls, bp, key, uint64(klen)) _md5_update(tls, bp, setting, uint64(uint32(3)+slen)) i = klen for { - if !(uint64(uint64(i)) > uint64(16)) { + if !(uint64(i) > uint64(16)) { break } _md5_update(tls, bp, bp+88, uint64(16)) @@ -12042,7 +12042,7 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt ; i = uint32(uint64(i) - Uint64FromInt64(16)) } - _md5_update(tls, bp, bp+88, uint64(uint64(i))) + _md5_update(tls, bp, bp+88, uint64(i)) (*(*[16]uint8)(unsafe.Pointer(bp + 88)))[0] = uint8(0) i = klen for { @@ -12068,20 +12068,20 @@ func _md5crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintpt } _md5_init(tls, bp) if i%uint32(2) != 0 { - _md5_update(tls, bp, key, uint64(uint64(klen))) + _md5_update(tls, bp, key, uint64(klen)) } else { _md5_update(tls, bp, bp+88, uint64(16)) } if i%uint32(3) != 0 { - _md5_update(tls, bp, salt, uint64(uint64(slen))) + _md5_update(tls, bp, salt, uint64(slen)) } if i%uint32(7) != 0 { - _md5_update(tls, bp, key, uint64(uint64(klen))) + _md5_update(tls, bp, key, uint64(klen)) } if i%uint32(2) != 0 { _md5_update(tls, bp, bp+88, uint64(16)) } else { - _md5_update(tls, bp, key, uint64(uint64(klen))) + _md5_update(tls, bp, key, uint64(klen)) } _md5_sum(tls, bp, bp+88) goto _4 @@ -12483,7 +12483,7 @@ func _hashmd(tls *TLS, s uintptr, n uint32, md uintptr) { ; i -= uint32(32) } - _sha256_update(tls, s, md, uint64(uint64(i))) + _sha256_update(tls, s, md, uint64(i)) } func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 uintptr) { @@ -12539,7 +12539,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if u > uint64(ROUNDS_MAX) { return uintptr(0) } else { - r = uint32(uint32(u)) + r = uint32(u) } } /* needed when rounds is zero prefixed or out of bounds */ @@ -12562,14 +12562,14 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui slen = i /* B = sha(key salt key) */ _sha256_init(tls, bp) - _sha256_update(tls, bp, key, uint64(uint64(klen))) - _sha256_update(tls, bp, salt, uint64(uint64(slen))) - _sha256_update(tls, bp, key, uint64(uint64(klen))) + _sha256_update(tls, bp, key, uint64(klen)) + _sha256_update(tls, bp, salt, uint64(slen)) + _sha256_update(tls, bp, key, uint64(klen)) _sha256_sum(tls, bp, bp+104) /* A = sha(key salt repeat-B alternate-B-key) */ _sha256_init(tls, bp) - _sha256_update(tls, bp, key, uint64(uint64(klen))) - _sha256_update(tls, bp, salt, uint64(uint64(slen))) + _sha256_update(tls, bp, key, uint64(klen)) + _sha256_update(tls, bp, salt, uint64(slen)) _hashmd(tls, bp, klen, bp+104) i = klen for { @@ -12579,7 +12579,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if i&uint32(1) != 0 { _sha256_update(tls, bp, bp+104, uint64(32)) } else { - _sha256_update(tls, bp, key, uint64(uint64(klen))) + _sha256_update(tls, bp, key, uint64(klen)) } goto _2 _2: @@ -12594,7 +12594,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < klen) { break } - _sha256_update(tls, bp, key, uint64(uint64(klen))) + _sha256_update(tls, bp, key, uint64(klen)) goto _3 _3: ; @@ -12608,7 +12608,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(int32(16)+int32((*(*[32]uint8)(unsafe.Pointer(bp + 104)))[0]))) { break } - _sha256_update(tls, bp, salt, uint64(uint64(slen))) + _sha256_update(tls, bp, salt, uint64(slen)) goto _4 _4: ; @@ -12628,7 +12628,7 @@ func _sha256crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha256_update(tls, bp, bp+104, uint64(32)) } if i%uint32(3) != 0 { - _sha256_update(tls, bp, bp+168, uint64(uint64(slen))) + _sha256_update(tls, bp, bp+168, uint64(slen)) } if i%uint32(7) != 0 { _hashmd(tls, bp, klen, bp+136) @@ -13042,7 +13042,7 @@ func _hashmd1(tls *TLS, s uintptr, n uint32, md uintptr) { ; i -= uint32(64) } - _sha512_update(tls, s, md, uint64(uint64(i))) + _sha512_update(tls, s, md, uint64(i)) } func _sha512crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 uintptr) { @@ -13108,7 +13108,7 @@ func _sha512crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if u > uint64(ROUNDS_MAX) { return uintptr(0) } else { - r = uint32(uint32(u)) + r = uint32(u) } } /* needed when rounds is zero prefixed or out of bounds */ @@ -13131,14 +13131,14 @@ func _sha512crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui slen = i /* B = sha(key salt key) */ _sha512_init(tls, bp) - _sha512_update(tls, bp, key, uint64(uint64(klen))) - _sha512_update(tls, bp, salt, uint64(uint64(slen))) - _sha512_update(tls, bp, key, uint64(uint64(klen))) + _sha512_update(tls, bp, key, uint64(klen)) + _sha512_update(tls, bp, salt, uint64(slen)) + _sha512_update(tls, bp, key, uint64(klen)) _sha512_sum(tls, bp, bp+200) /* A = sha(key salt repeat-B alternate-B-key) */ _sha512_init(tls, bp) - _sha512_update(tls, bp, key, uint64(uint64(klen))) - _sha512_update(tls, bp, salt, uint64(uint64(slen))) + _sha512_update(tls, bp, key, uint64(klen)) + _sha512_update(tls, bp, salt, uint64(slen)) _hashmd1(tls, bp, klen, bp+200) i = klen for { @@ -13148,7 +13148,7 @@ func _sha512crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if i&uint32(1) != 0 { _sha512_update(tls, bp, bp+200, uint64(64)) } else { - _sha512_update(tls, bp, key, uint64(uint64(klen))) + _sha512_update(tls, bp, key, uint64(klen)) } goto _3 _3: @@ -13163,7 +13163,7 @@ func _sha512crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < klen) { break } - _sha512_update(tls, bp, key, uint64(uint64(klen))) + _sha512_update(tls, bp, key, uint64(klen)) goto _4 _4: ; @@ -13177,7 +13177,7 @@ func _sha512crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui if !(i < uint32(int32(16)+int32((*(*[64]uint8)(unsafe.Pointer(bp + 200)))[0]))) { break } - _sha512_update(tls, bp, salt, uint64(uint64(slen))) + _sha512_update(tls, bp, salt, uint64(slen)) goto _5 _5: ; @@ -13197,7 +13197,7 @@ func _sha512crypt(tls *TLS, key uintptr, setting uintptr, output uintptr) (r1 ui _sha512_update(tls, bp, bp+200, uint64(64)) } if i%uint32(3) != 0 { - _sha512_update(tls, bp, bp+328, uint64(uint64(slen))) + _sha512_update(tls, bp, bp+328, uint64(slen)) } if i%uint32(7) != 0 { _hashmd1(tls, bp, klen, bp+264) @@ -13943,7 +13943,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) { } var v1 int32 _ = v1 - if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { + if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) } else { v1 = int32(1) @@ -14260,7 +14260,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(uint32(c))|uint32(32)-uint32('a') < uint32(26)) + return BoolInt32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14316,7 +14316,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(uint32(c)) < uint32(0x20) || c == int32(0x7f)) + return BoolInt32(uint32(c) < uint32(0x20) || c == int32(0x7f)) } func X__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14340,7 +14340,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(uint32(c))-uint32('0') < uint32(10)) + return BoolInt32(uint32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14364,7 +14364,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(uint32(c))-uint32(0x21) < uint32(0x5e)) + return BoolInt32(uint32(c)-uint32(0x21) < uint32(0x5e)) } func X__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14388,7 +14388,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(uint32(c))-uint32('a') < uint32(26)) + return BoolInt32(uint32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14412,7 +14412,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(uint32(c))-uint32(0x20) < uint32(0x5f)) + return BoolInt32(uint32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14460,7 +14460,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(uint32(c))-uint32('\t') < uint32(5)) + return BoolInt32(c == int32(' ') || uint32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -14484,7 +14484,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(uint32(c))-uint32('A') < uint32(26)) + return BoolInt32(uint32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -17406,7 +17406,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(int32(wc))) + return Xisblank(tls, int32(wc)) } func X__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32) { @@ -17511,7 +17511,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(uint64(i)) + return uint64(i) } goto _1 _1: @@ -19265,7 +19265,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(int32(wc))) != 0) + return BoolInt32(wc != 0 && Xwcschr(tls, uintptr(unsafe.Pointer(&_spaces)), int32(wc)) != 0) } var _spaces = [22]Twchar_t{ @@ -19361,7 +19361,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(uint32(c))|uint32(32)-uint32('a') < uint32(6)) + return BoolInt32(BoolInt32(uint32(c)-uint32('0') < uint32(10)) != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32) { @@ -22229,9 +22229,9 @@ 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(int32(c)) + c0 = int32(c) if c >= uint32(0x20000) { - return int32(int32(c)) + return int32(c) } b = c >> int32(8) c &= uint32(255) @@ -22249,12 +22249,12 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { /* rules 0/1 are simple lower/upper case with a delta. * apply according to desired mapping direction. */ if rt < uint32(2) { - return int32(uint32(uint32(c0)) + uint32(uint32(rd))&-(rt^uint32(uint32(dir)))) + return int32(uint32(c0) + uint32(rd)&-(rt^uint32(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(uint32(rd)) >> int32(8) + xb = uint32(rd) >> int32(8) for xn != 0 { try = uint32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_exceptions)) + uintptr(xb+xn/uint32(2))*2))) if try == c { @@ -22262,7 +22262,7 @@ func _casemap(tls *TLS, c uint32, dir int32) (r1 int32) { rt = uint32(r & int32(255)) rd = r >> int32(8) if rt < uint32(2) { - return int32(uint32(uint32(c0)) + uint32(uint32(rd))&-(rt^uint32(uint32(dir)))) + return int32(uint32(c0) + uint32(rd)&-(rt^uint32(dir))) } /* Hard-coded for the four exceptional titlecase */ if dir != 0 { @@ -24501,7 +24501,7 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } var v1, v2 int32 _, _ = v1, v2 - if uint32(uint32(wc)) < uint32(0xff) { + if uint32(wc) < uint32(0xff) { if (wc+int32(1))&int32(0x7f) >= int32(0x21) { v1 = int32(1) } else { @@ -24514,7 +24514,7 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { } return v1 } - if uint32(uint32(wc))&uint32(0xfffeffff) < uint32(0xfffe) { + 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 { return 0 } @@ -24526,10 +24526,10 @@ func Xwcwidth(tls *TLS, wc Twchar_t) (r int32) { if wc&int32(0xfffe) == int32(0xfffe) { return -int32(1) } - if uint32(uint32(wc))-uint32(0x20000) < uint32(0x20000) { + if uint32(wc)-uint32(0x20000) < uint32(0x20000) { return int32(2) } - if wc == int32(0xe0001) || uint32(uint32(wc))-uint32(0xe0020) < uint32(0x5f) || uint32(uint32(wc))-uint32(0xe0100) < uint32(0xef) { + if wc == int32(0xe0001) || uint32(wc)-uint32(0xe0020) < uint32(0x5f) || uint32(wc)-uint32(0xe0100) < uint32(0xef) { return 0 } return int32(1) @@ -24982,7 +24982,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(int32(cnt)) + return int32(cnt) } func Xseekdir(tls *TLS, dir uintptr, off int64) { @@ -25023,7 +25023,7 @@ func X__reset_tls(tls *TLS) { var mem, p uintptr var self Tpthread_t _, _, _, _, _ = i, mem, n, p, self - self = uintptr(___get_tp(tls)) + self = ___get_tp(tls) n = *(*Tuintptr_t)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(self)).Fdtv)) if n != 0 { p = X__libc.Ftls_head @@ -25059,7 +25059,7 @@ func X__init_ssp(tls *TLS, entropy uintptr) { * still be detected. Endianness is taken care of * automatically. */ *(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stack_chk_guard)) + 1)) = 0 - (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Fcanary = X__stack_chk_guard + (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Fcanary = X__stack_chk_guard } func X__stack_chk_fail(tls *TLS) { @@ -25111,7 +25111,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(int64(name))) + l = uint64(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 +25200,7 @@ func Xputenv(tls *TLS, s uintptr) (r int32) { } var l Tsize_t _ = l - l = uint64(int64(X__strchrnul(tls, s, int32('='))) - int64(int64(s))) + l = uint64(int64(X__strchrnul(tls, s, int32('='))) - int64(s)) if !(l != 0) || !(*(*int8)(unsafe.Pointer(s + uintptr(l))) != 0) { return Xunsetenv(tls, s) } @@ -25289,7 +25289,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(int64(var1))) + v1 = uint64(int64(X__strchrnul(tls, var1, int32('='))) - int64(var1)) l1 = v1 } if v2 || !(v1 != 0) || *(*int8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { @@ -25321,7 +25321,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(int64(name))) + l = uint64(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 +25656,7 @@ func X__strerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { } var s uintptr _ = s - if uint64(uint64(e)) >= Uint64FromInt64(264)/Uint64FromInt64(2) { + if uint64(e) >= Uint64FromInt64(264)/Uint64FromInt64(2) { e = 0 } s = uintptr(unsafe.Pointer(&_errmsgstr)) + uintptr(_errmsgidx[e]) @@ -25668,7 +25668,7 @@ func Xstrerror(tls *TLS, e int32) (r uintptr) { trc("tls=%v e=%v, (%v:)", tls, e, origin(2)) defer func() { trc("-> %v", r) }() } - return X__strerror_l(tls, e, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale) + return X__strerror_l(tls, e, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale) } func Xstrerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) { @@ -25793,7 +25793,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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } if (*(*Tf_owner_ex)(unsafe.Pointer(bp))).Ftype1 == int32(F_OWNER_PGRP) { v1 = -(*(*Tf_owner_ex)(unsafe.Pointer(bp))).Fpid @@ -25808,7 +25808,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { 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(uint64(ret1)))) + return int32(X__syscall_ret(tls, uint64(ret1))) } ret1 = int32(X__syscall3(tls, int64(SYS_fcntl), int64(fd), int64(Int32FromInt32(F_DUPFD_CLOEXEC)), int64(Int32FromInt32(0)))) if ret1 != -int32(EINVAL) { @@ -25821,7 +25821,7 @@ func Xfcntl(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) { 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(uint64(ret1)))) + return int32(X__syscall_ret(tls, uint64(ret1))) } switch cmd { case int32(F_SETLK): @@ -25857,7 +25857,7 @@ func Xopen(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) { 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(uint64(fd)))) + return int32(X__syscall_ret(tls, uint64(fd))) } func Xopenat(tls *TLS, fd int32, filename uintptr, flags int32, va uintptr) (r int32) { @@ -26106,12 +26106,12 @@ func _scanexp(tls *TLS, f uintptr, pok int32) (r int64) { } c = v10 } - y = int64(int64(x)) + y = int64(x) for { if !(uint32(c-int32('0')) < uint32(10) && y < Int64FromInt64(0x7fffffffffffffff)/Int64FromInt32(100)) { break } - y = int64(10)*y + int64(int64(c)) - int64('0') + y = int64(10)*y + int64(c) - int64('0') goto _13 _13: ; @@ -26241,10 +26241,10 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if k < Int32FromInt32(KMAX)-Int32FromInt32(3) { dc++ if c != int32('0') { - lnz = int32(int32(dc)) + lnz = int32(dc) } if j != 0 { - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(uint32(c)) - uint32('0') + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]*uint32(10) + uint32(c) - uint32('0') } else { (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(c - int32('0')) } @@ -26307,19 +26307,19 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } /* Handle zero specially to avoid nasty special cases later */ if !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0] != 0) { - return float64(float64(float64(sign)) * float64(0)) + return float64(sign) * float64(0) } /* Optimize small integers (w/no exponent) and over/under-flow */ if lrp == dc && dc < int64(10) && (bits > int32(30) || (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]>>bits == uint32(0)) { - return float64(float64(sign)) * float64((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]) + return float64(sign) * float64((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]) } if lrp > int64(-emin/int32(2)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ERANGE) - return float64(float64(sign)) * Float64FromFloat64(1.79769313486231570815e+308) * Float64FromFloat64(1.79769313486231570815e+308) + return float64(sign) * Float64FromFloat64(1.79769313486231570815e+308) * Float64FromFloat64(1.79769313486231570815e+308) } if lrp < int64(emin-Int32FromInt32(2)*Int32FromInt32(LDBL_MANT_DIG)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ERANGE) - return float64(float64(sign)) * Float64FromFloat64(2.22507385850720138309e-308) * Float64FromFloat64(2.22507385850720138309e-308) + return float64(sign) * Float64FromFloat64(2.22507385850720138309e-308) * Float64FromFloat64(2.22507385850720138309e-308) } /* Align incomplete final B1B digit */ if j != 0 { @@ -26339,18 +26339,18 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, a = 0 z = k e2 = 0 - rp = int32(int32(lrp)) + rp = int32(lrp) /* Optimize small to mid-size integers (even in exp. notation) */ if lnz < int32(9) && lnz <= rp && rp < int32(18) { if rp == int32(9) { - return float64(float64(sign)) * float64((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]) + return float64(sign) * float64((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]) } if rp < int32(9) { - return float64(float64(sign)) * float64((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]) / float64(_p10s[int32(8)-rp]) + return float64(sign) * float64((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]) / float64(_p10s[int32(8)-rp]) } bitlim = bits - int32(3)*(rp-Int32FromInt32(9)) if bitlim > int32(30) || (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]>>bitlim == uint32(0) { - return float64(float64(sign)) * float64((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]) * float64(_p10s[rp-int32(10)]) + return float64(sign) * float64((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[0]) * float64(_p10s[rp-int32(10)]) } } /* Drop trailing zeros */ @@ -26378,8 +26378,8 @@ 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(uint32(p10)) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k]/uint32(uint32(p10)) + carry + 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 if k == a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { a = (a + int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) @@ -26403,13 +26403,13 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, e2 -= int32(29) k = (z - int32(1)) & (Int32FromInt32(KMAX) - Int32FromInt32(1)) for { - tmp1 = uint64((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k])< uint64(1000000000) { carry1 = uint32(tmp1 / uint64(1000000000)) (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(tmp1 % uint64(1000000000)) } else { carry1 = uint32(0) - (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(uint32(tmp1)) + (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] = uint32(tmp1) } if k == (z-int32(1))&(Int32FromInt32(KMAX)-Int32FromInt32(1)) && k != a && !((*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[k] != 0) { z = k @@ -26510,7 +26510,7 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, ; i++ } - y *= float64(float64(sign)) + y *= float64(sign) /* Limit precision for denormal results */ if bits > int32(LDBL_MANT_DIG)+e2-emin { bits = int32(LDBL_MANT_DIG) + e2 - emin @@ -26521,8 +26521,8 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } /* Calculate bias term to force rounding, move out lower bits */ if bits < int32(LDBL_MANT_DIG) { - bias = Xcopysignl(tls, float64(Xscalbn(tls, Float64FromInt32(1), Int32FromInt32(2)*Int32FromInt32(LDBL_MANT_DIG)-bits-int32(1))), y) - frac = Xfmodl(tls, y, float64(Xscalbn(tls, Float64FromInt32(1), int32(LDBL_MANT_DIG)-bits))) + bias = Xcopysignl(tls, Xscalbn(tls, Float64FromInt32(1), Int32FromInt32(2)*Int32FromInt32(LDBL_MANT_DIG)-bits-int32(1)), y) + frac = Xfmodl(tls, y, Xscalbn(tls, Float64FromInt32(1), int32(LDBL_MANT_DIG)-bits)) y -= frac y += bias } @@ -26530,16 +26530,16 @@ func _decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if (a+i)&(Int32FromInt32(KMAX)-Int32FromInt32(1)) != z { t = (*(*[128]Tuint32_t)(unsafe.Pointer(bp)))[(a+i)&(Int32FromInt32(KMAX)-Int32FromInt32(1))] if t < uint32(500000000) && (t != 0 || (a+i+int32(1))&(Int32FromInt32(KMAX)-Int32FromInt32(1)) != z) { - frac += float64(float64(0.25) * float64(float64(sign))) + frac += float64(0.25) * float64(sign) } else { if t > uint32(500000000) { - frac += float64(float64(0.75) * float64(float64(sign))) + frac += float64(0.75) * float64(sign) } else { if t == uint32(500000000) { if (a+i+int32(1))&(Int32FromInt32(KMAX)-Int32FromInt32(1)) == z { - frac += float64(float64(0.5) * float64(float64(sign))) + frac += float64(0.5) * float64(sign) } else { - frac += float64(float64(0.75) * float64(float64(sign))) + frac += float64(0.75) * float64(sign) } } } @@ -26677,11 +26677,11 @@ 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(uint32(d)) + x = x*uint32(16) + uint32(d) } else { if dc < int64(Int32FromInt32(LDBL_MANT_DIG)/Int32FromInt32(4)+Int32FromInt32(1)) { scale /= Float64FromInt32(16) - y += float64(float64(d)) * scale + y += float64(d) * scale } else { if d != 0 && !(gottail != 0) { y += Float64FromFloat64(0.5) * scale @@ -26720,7 +26720,7 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } else { X__shlim(tls, f, int64(Int32FromInt32(0))) } - return float64(float64(float64(sign)) * float64(0)) + return float64(sign) * float64(0) } if !(gotrad != 0) { rp = dc @@ -26749,15 +26749,15 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } e2 += int64(4)*rp - int64(32) if !(x != 0) { - return float64(float64(float64(sign)) * float64(0)) + return float64(sign) * float64(0) } if e2 > int64(-emin) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ERANGE) - return float64(float64(sign)) * Float64FromFloat64(1.79769313486231570815e+308) * Float64FromFloat64(1.79769313486231570815e+308) + return float64(sign) * Float64FromFloat64(1.79769313486231570815e+308) * Float64FromFloat64(1.79769313486231570815e+308) } if e2 < int64(emin-Int32FromInt32(2)*Int32FromInt32(LDBL_MANT_DIG)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ERANGE) - return float64(float64(sign)) * Float64FromFloat64(2.22507385850720138309e-308) * Float64FromFloat64(2.22507385850720138309e-308) + return float64(sign) * Float64FromFloat64(2.22507385850720138309e-308) * Float64FromFloat64(2.22507385850720138309e-308) } for x < uint32(0x80000000) { if y >= Float64FromFloat64(0.5) { @@ -26769,25 +26769,25 @@ func _hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int3 } e2-- } - if int64(int64(bits)) > int64(32)+e2-int64(int64(emin)) { - bits = int32(int64(32) + e2 - int64(int64(emin))) + if int64(bits) > int64(32)+e2-int64(emin) { + bits = int32(int64(32) + e2 - int64(emin)) if bits < 0 { bits = 0 } } if bits < int32(LDBL_MANT_DIG) { - bias = Xcopysignl(tls, float64(Xscalbn(tls, Float64FromInt32(1), Int32FromInt32(32)+Int32FromInt32(LDBL_MANT_DIG)-bits-int32(1))), float64(float64(sign))) + bias = Xcopysignl(tls, Xscalbn(tls, Float64FromInt32(1), Int32FromInt32(32)+Int32FromInt32(LDBL_MANT_DIG)-bits-int32(1)), float64(sign)) } if bits < int32(32) && y != 0 && !(x&Uint32FromInt32(1) != 0) { x++ y = Float64FromInt32(0) } - y = bias + float64(float64(sign))*float64(float64(x)) + float64(float64(sign))*y + y = bias + float64(sign)*float64(x) + float64(sign)*y y -= bias if !(y != 0) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ERANGE) } - return Xscalbnl(tls, y, int32(int32(e2))) + return Xscalbnl(tls, y, int32(e2)) } func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { @@ -26885,7 +26885,7 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64) { } } } - return float64(float32(float32(sign)) * X__builtin_inff(tls)) + return float64(float32(sign) * X__builtin_inff(tls)) } if !(i != 0) { i = uint64(0) @@ -27378,7 +27378,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } c = v21 } - y = uint64(uint64(x)) + 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'))) { break @@ -27422,7 +27422,7 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } c = v29 } - y = uint64(uint64(x)) + y = uint64(x) for { if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))>>bs) { break @@ -27461,12 +27461,12 @@ func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint } c = v37 } - y = uint64(uint64(x)) + y = uint64(x) for { - if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/uint64(uint64(base)) && uint64(uint64(base))*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c))))) { + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= (Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))/uint64(base) && uint64(base)*y <= Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)-uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c))))) { break } - y = y*uint64(uint64(base)) + uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + y = y*uint64(base) + uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) goto _40 _40: ; @@ -27522,7 +27522,7 @@ done: } } } - return y ^ uint64(uint64(neg)) - uint64(uint64(neg)) + return y ^ uint64(neg) - uint64(neg) } func X__procfdname(tls *TLS, buf uintptr, fd uint32) { @@ -27622,7 +27622,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(uint8(c)) + *(*uint8)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Frpos + uintptr(-Int32FromInt32(1)))) = uint8(c) } return c } @@ -27636,7 +27636,7 @@ func X__syscall_ret(tls *TLS, r uint64) (r1 int64) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(-r) return int64(-int32(1)) } - return int64(int64(r)) + return int64(r) } type TElf_Symndx = uint32 @@ -27708,7 +27708,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 { - if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || uint64(uint64(l)) == uint64(128) { + if l > 0 && int32(_password[l-int64(1)]) == int32('\n') || uint64(l) == uint64(128) { l-- } _password[l] = 0 @@ -28787,7 +28787,7 @@ 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(uint64(val)) + (*(*Trlimit)(unsafe.Pointer(bp))).Frlim_cur = uint64(512) * uint64(val) if Xsetrlimit(tls, int32(RLIMIT_FSIZE), bp) != 0 { return int64(-int32(1)) } @@ -29212,7 +29212,7 @@ 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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } if clock_id == CLOCK_REALTIME { return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_adjtimex), int64(utx))))) @@ -29294,7 +29294,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xepoll_ctl(tls *TLS, fd int32, op int32, fd2 int32, ev uintptr) (r int32) { @@ -29316,7 +29316,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xepoll_wait(tls *TLS, fd int32, ev uintptr, cnt int32, to int32) (r int32) { @@ -29344,7 +29344,7 @@ func Xeventfd(tls *TLS, count uint32, flags int32) (r1 int32) { if r == -int32(ENOSYS) && !(flags != 0) { r = int32(X__syscall1(tls, int64(SYS_eventfd), int64(count))) } - return int32(X__syscall_ret(tls, uint64(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xeventfd_read(tls *TLS, fd int32, value uintptr) (r int32) { @@ -29631,7 +29631,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xinotify_add_watch(tls *TLS, fd int32, pathname uintptr, mask Tuint32_t) (r int32) { @@ -30475,11 +30475,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(uint32(req))-uint32(1) < uint32(3) { + if uint32(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(uint32(req))-uint32(1) >= uint32(3) { + if ret < 0 || uint32(req)-uint32(1) >= uint32(3) { return ret } return *(*int64)(unsafe.Pointer(bp)) @@ -30754,7 +30754,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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } ret = int32(X__syscall3(tls, int64(SYS_signalfd), int64(fd), int64(sigs), int64(Int32FromInt32(_NSIG)/Int32FromInt32(8)))) if ret >= 0 { @@ -30765,7 +30765,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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(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) { @@ -30788,7 +30788,7 @@ func Xstatx(tls *TLS, dirfd int32, path uintptr, flags int32, mask uint32, stx u _ = ret ret = int32(X__syscall5(tls, int64(SYS_statx), int64(dirfd), int64(path), int64(flags), int64(mask), int64(stx))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } ret = Xfstatat(tls, dirfd, path, bp, flags) if ret != 0 { @@ -31097,7 +31097,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } const XATTR_CREATE = 1 @@ -31226,7 +31226,7 @@ func X__lctrans_cur(tls *TLS, msg uintptr) (r uintptr) { trc("tls=%v msg=%v, (%v:)", tls, msg, origin(2)) defer func() { trc("-> %v", r) }() } - return X__lctrans_impl(tls, msg, *(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale + 5*8))) + return X__lctrans_impl(tls, msg, *(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale + 5*8))) } func _swapc(tls *TLS, x Tuint32_t, c int32) (r Tuint32_t) { @@ -31255,7 +31255,7 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { n = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 2*4)), sw) o = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 3*4)), sw) t = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + 4*4)), sw) - if uint64(uint64(n)) >= size/uint64(4) || uint64(uint64(o)) >= size-uint64(uint32(4)*n) || uint64(uint64(t)) >= size-uint64(uint32(4)*n) || (o|t)%uint32(4) != 0 { + if uint64(n) >= size/uint64(4) || uint64(o) >= size-uint64(uint32(4)*n) || uint64(t) >= size-uint64(uint32(4)*n) || (o|t)%uint32(4) != 0 { return uintptr(0) } o /= uint32(4) @@ -31263,14 +31263,14 @@ func X__mo_lookup(tls *TLS, p uintptr, size Tsize_t, s uintptr) (r uintptr) { for { ol = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + uintptr(o+uint32(2)*(b+n/uint32(2)))*4)), sw) os = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + uintptr(o+uint32(2)*(b+n/uint32(2))+uint32(1))*4)), sw) - if uint64(uint64(os)) >= size || uint64(uint64(ol)) >= size-uint64(uint64(os)) || *(*int8)(unsafe.Pointer(p + uintptr(os+ol))) != 0 { + if uint64(os) >= size || uint64(ol) >= size-uint64(os) || *(*int8)(unsafe.Pointer(p + uintptr(os+ol))) != 0 { return uintptr(0) } sign = Xstrcmp(tls, s, p+uintptr(os)) if !(sign != 0) { tl = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + uintptr(t+uint32(2)*(b+n/uint32(2)))*4)), sw) ts = _swapc(tls, *(*Tuint32_t)(unsafe.Pointer(mo + uintptr(t+uint32(2)*(b+n/uint32(2))+uint32(1))*4)), sw) - if uint64(uint64(ts)) >= size || uint64(uint64(tl)) >= size-uint64(uint64(ts)) || *(*int8)(unsafe.Pointer(p + uintptr(ts+tl))) != 0 { + if uint64(ts) >= size || uint64(tl) >= size-uint64(ts) || *(*int8)(unsafe.Pointer(p + uintptr(ts+tl))) != 0 { return uintptr(0) } return p + uintptr(ts) @@ -31392,17 +31392,17 @@ _6: goto _9 _9: strings = map1 + uintptr(20) + uintptr(v8) - v10 = uint32(uint32(set_id)) + v10 = uint32(set_id) v11 = v10>>int32(24) | v10>>int32(8)&uint32(0xff00) | v10<>int32(24) | v13>>int32(8)&uint32(0xff00) | v13<= uint32(LC_ALL) { + if uint32(category) >= uint32(LC_ALL) { goto notrans } if !(domainname != 0) { @@ -31853,20 +31853,20 @@ notrans: return v3 _2: ; - p = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) + p1 = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) for { - if !(p != 0) { + if !(p1 != 0) { break } - if (*Tmsgcat)(unsafe.Pointer(p)).Fbinding == q && (*Tmsgcat)(unsafe.Pointer(p)).Flm == lm && (*Tmsgcat)(unsafe.Pointer(p)).Fcat == category { + if (*Tmsgcat)(unsafe.Pointer(p1)).Fbinding == q && (*Tmsgcat)(unsafe.Pointer(p1)).Flm == lm && (*Tmsgcat)(unsafe.Pointer(p1)).Fcat == category { break } goto _4 _4: ; - p = (*Tmsgcat)(unsafe.Pointer(p)).Fnext + p1 = (*Tmsgcat)(unsafe.Pointer(p1)).Fnext } - if !(p != 0) { + if !(p1 != 0) { dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 16 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 @@ -31878,19 +31878,19 @@ _2: if !(modname != 0) { modname = locname + uintptr(loclen) } - v5 = loclen - uint64(int64(int64(modname))-int64(int64(locname))) + v5 = loclen - uint64(int64(modname)-int64(locname)) modlen = v5 alt_modlen = v5 - loclen = uint64(int64(int64(modname)) - int64(int64(locname))) + loclen = uint64(int64(modname) - int64(locname)) /* Drop .charset identifier; it is not used. */ csp = Xmemchr(tls, locname, int32('.'), loclen) if csp != 0 { - loclen = uint64(int64(int64(csp)) - int64(int64(locname))) + loclen = uint64(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(int32(loclen)), locname, int32(int32(alt_modlen)), modname, catname, domainname)) + Xsnprintf(tls, name, v6, __ccgo_ts+440, VaList(bp+24, dirname, int32(loclen), locname, int32(alt_modlen), modname, catname, domainname)) v8 = X__map_file(tls, name, bp) map1 = v8 if v8 != 0 { @@ -31903,7 +31903,7 @@ _2: v9 = Xmemchr(tls, locname, int32('_'), loclen) locp = v9 if v9 != 0 { - loclen = uint64(int64(int64(locp)) - int64(int64(locname))) + loclen = uint64(int64(locp) - int64(locname)) alt_modlen = modlen } else { break @@ -31915,19 +31915,19 @@ _2: if !(map1 != 0) { goto notrans } - p = Xcalloc(tls, uint64(64), uint64(1)) - if !(p != 0) { + p1 = Xcalloc(tls, uint64(64), uint64(1)) + if !(p1 != 0) { X__munmap(tls, map1, *(*Tsize_t)(unsafe.Pointer(bp))) goto notrans } - (*Tmsgcat)(unsafe.Pointer(p)).Fcat = category - (*Tmsgcat)(unsafe.Pointer(p)).Fbinding = q - (*Tmsgcat)(unsafe.Pointer(p)).Flm = lm - (*Tmsgcat)(unsafe.Pointer(p)).Fmap1 = map1 - (*Tmsgcat)(unsafe.Pointer(p)).Fmap_size = *(*Tsize_t)(unsafe.Pointer(bp)) + (*Tmsgcat)(unsafe.Pointer(p1)).Fcat = category + (*Tmsgcat)(unsafe.Pointer(p1)).Fbinding = q + (*Tmsgcat)(unsafe.Pointer(p1)).Flm = lm + (*Tmsgcat)(unsafe.Pointer(p1)).Fmap1 = map1 + (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size = *(*Tsize_t)(unsafe.Pointer(bp)) rule = __ccgo_ts + 462 np = uint64(2) - r = X__mo_lookup(tls, (*Tmsgcat)(unsafe.Pointer(p)).Fmap1, (*Tmsgcat)(unsafe.Pointer(p)).Fmap_size, __ccgo_ts) + r = X__mo_lookup(tls, (*Tmsgcat)(unsafe.Pointer(p1)).Fmap1, (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size, __ccgo_ts) for r != 0 && Xstrncmp(tls, r, __ccgo_ts+468, uint64(13)) != 0 { *(*uintptr)(unsafe.Pointer(bp + 8)) = Xstrchr(tls, r, int32('\n')) if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { @@ -31973,11 +31973,11 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p)).Fnplurals = int32(int32(np)) - (*Tmsgcat)(unsafe.Pointer(p)).Fplural_rule = rule + (*Tmsgcat)(unsafe.Pointer(p1)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p1)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) - (*Tmsgcat)(unsafe.Pointer(p)).Fnext = old_cats + (*Tmsgcat)(unsafe.Pointer(p1)).Fnext = old_cats goto _20 _20: ; @@ -31996,15 +31996,15 @@ _2: } } } - trans = X__mo_lookup(tls, (*Tmsgcat)(unsafe.Pointer(p)).Fmap1, (*Tmsgcat)(unsafe.Pointer(p)).Fmap_size, msgid1) + trans = X__mo_lookup(tls, (*Tmsgcat)(unsafe.Pointer(p1)).Fmap1, (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size, msgid1) if !(trans != 0) { goto notrans } /* Non-plural-processing gettext forms pass a null pointer as * msgid2 to request that dcngettext suppress plural processing. */ - if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p)).Fnplurals != 0 { - plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p)).Fplural_rule, n) - if plural > uint64((*Tmsgcat)(unsafe.Pointer(p)).Fnplurals) { + 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) { goto notrans } for { @@ -32013,7 +32013,7 @@ _2: if !(v21 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p)).Fmap_size - uint64(int64(int64(trans))-int64((*Tmsgcat)(unsafe.Pointer(p)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p1)).Fmap_size - uint64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p1)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint64(1) >= rem { goto notrans @@ -98304,11 +98304,11 @@ func _combine_to_from(tls *TLS, t Tsize_t, f Tsize_t) (r Ticonv_t) { } func _extract_from(tls *TLS, cd Ticonv_t) (r Tsize_t) { - return uint64(uint64(cd)) >> int32(16) + return uint64(cd) >> int32(16) } func _extract_to(tls *TLS, cd Ticonv_t) (r Tsize_t) { - return uint64(uint64(cd)) >> int32(1) & uint64(0x7fff) + return uint64(cd) >> int32(1) & uint64(0x7fff) } func Xiconv_open(tls *TLS, to uintptr, from uintptr) (r Ticonv_t) { @@ -98359,7 +98359,7 @@ func _get_16(tls *TLS, s uintptr, e int32) (r uint32) { func _put_16(tls *TLS, s uintptr, c uint32, e int32) { e &= int32(1) *(*uint8)(unsafe.Pointer(s + uintptr(e))) = uint8(c >> int32(8)) - *(*uint8)(unsafe.Pointer(s + uintptr(int32(1)-e))) = uint8(uint8(c)) + *(*uint8)(unsafe.Pointer(s + uintptr(int32(1)-e))) = uint8(c) } func _get_32(tls *TLS, s uintptr, e int32) (r uint32) { @@ -98372,7 +98372,7 @@ func _put_32(tls *TLS, s uintptr, c uint32, e int32) { *(*uint8)(unsafe.Pointer(s + uintptr(e^0))) = uint8(c >> int32(24)) *(*uint8)(unsafe.Pointer(s + uintptr(e^int32(1)))) = uint8(c >> int32(16)) *(*uint8)(unsafe.Pointer(s + uintptr(e^int32(2)))) = uint8(c >> int32(8)) - *(*uint8)(unsafe.Pointer(s + uintptr(e^int32(3)))) = uint8(uint8(c)) + *(*uint8)(unsafe.Pointer(s + uintptr(e^int32(3)))) = uint8(c) } /* Adapt as needed */ @@ -98446,7 +98446,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, d, err, from, i, i1, j, j1, k, l, loc, map1, ploc, scd, tmplen, tmpx, to, tomap, totype, type1, x, v100, v101, v102, v103, v104, v25, v26, v27, v28, v54, v55, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66, v67, v68, v69, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v80, v81, v82, v83, v84, v85, v86, v87, v88, v89, v90, v91, v92, v93, v94, v95, v96, v97, v98, v99 x = uint64(0) scd = uintptr(0) - if !(uint64(uint64(cd))&Uint64FromInt32(1) != 0) { + if !(uint64(cd)&Uint64FromInt32(1) != 0) { scd = cd cd = (*Tstateful_cd)(unsafe.Pointer(scd)).Fbase_cd } @@ -98457,7 +98457,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui *(*Tmbstate_t)(unsafe.Pointer(bp + 24)) = Tmbstate_t{} type1 = *(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1)))) totype = *(*uint8)(unsafe.Pointer(tomap + uintptr(-Int32FromInt32(1)))) - ploc = uintptr(___get_tp(tls)) + 168 + ploc = ___get_tp(tls) + 168 loc = *(*Tlocale_t)(unsafe.Pointer(ploc)) if !(in != 0) || !(*(*uintptr)(unsafe.Pointer(in)) != 0) || !(*(*Tsize_t)(unsafe.Pointer(inb)) != 0) { return uint64(0) @@ -98469,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(int32(type1)) { + switch int32(type1) { case int32(UTF_8): goto _2 case int32(US_ASCII): @@ -98552,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(int32(type1))) + c = _get_32(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) _24: ; if c-uint32(0xd800) < uint32(0x800) || c >= uint32(0x110000) { @@ -98571,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(int32(type1))) + c = _get_16(tls, *(*uintptr)(unsafe.Pointer(in)), int32(type1)) if c-Uint32FromInt32(0xdc00) < uint32(0x400) { goto ilseq } if c-Uint32FromInt32(0xd800) < uint32(0x400) { - if uint32(int32(int32(type1))-int32(UCS2BE)) < uint32(2) { + if uint32(int32(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(int32(type1))) + d = _get_16(tls, *(*uintptr)(unsafe.Pointer(in))+UintptrFromInt32(2), int32(type1)) if d-Uint32FromInt32(0xdc00) >= uint32(0x400) { goto ilseq } @@ -98600,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(int32(type1)) == int32(UCS2) { + if int32(type1) == int32(UCS2) { if c == uint32(0xfffe) { v26 = int32(UCS2LE) } else { @@ -98813,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(int32(type1)) == int32(GB2312) { + if d < uint32(0xa1) && int32(type1) == int32(GB2312) { goto ilseq } if d-uint32(0x40) >= uint32(191) || d == uint32(127) { - if d-uint32('0') > uint32(9) || int32(int32(type1)) != int32(GB18030) { + if d-uint32('0') > uint32(9) || int32(type1) != int32(GB18030) { goto ilseq } l = uint64(4) @@ -98914,7 +98914,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui *(*uintptr)(unsafe.Pointer(bp)) = __ccgo_ts + 511 + uintptr(c%uint32(256)) *(*Tsize_t)(unsafe.Pointer(bp + 8)) = uint64(4) *(*Tsize_t)(unsafe.Pointer(bp + 16)) = uint64(8) - tmpx = Xiconv(tls, _combine_to_from(tls, uint64(uint64(to)), _find_charmap(tls, __ccgo_ts+528)), bp, bp+8, bp+48, bp+16) + tmpx = Xiconv(tls, _combine_to_from(tls, uint64(to), _find_charmap(tls, __ccgo_ts+528)), bp, bp+8, bp+48, bp+16) tmplen = uint64(int64(*(*uintptr)(unsafe.Pointer(bp + 48))) - t__predefined_ptrdiff_t(bp+40)) if tmplen > *(*Tsize_t)(unsafe.Pointer(outb)) { goto toobig @@ -99027,7 +99027,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui } _23: ; - switch int32(int32(totype)) { + switch int32(totype) { case int32(WCHAR_T): goto _35 case int32(UTF_8): @@ -99067,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(int32(c)) + *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(out)))) = int32(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(int32(c)))) + k = uint64(Xwctomb(tls, bp+56, int32(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(int32(c)))) + k = uint64(Xwctomb(tls, *(*uintptr)(unsafe.Pointer(out)), int32(c))) } *(*uintptr)(unsafe.Pointer(out)) += uintptr(k) *(*Tsize_t)(unsafe.Pointer(outb)) -= k @@ -99112,13 +99112,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(int8(c)) + *(*int8)(unsafe.Pointer(v54)) = int8(c) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(1) goto _51 _53: ; d = c - c = uint32(int32(4) * int32(int32(totype))) + c = uint32(int32(4) * int32(totype)) for { if !(c < uint32(256)) { break @@ -99322,14 +99322,14 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui ; _43: ; - if c < uint32(0x10000) || uint32(int32(int32(totype))-int32(UCS2BE)) < uint32(2) { + if c < uint32(0x10000) || uint32(int32(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(int32(totype))) + _put_16(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(2) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(2) goto _51 @@ -99338,8 +99338,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(int32(totype))) - _put_16(tls, *(*uintptr)(unsafe.Pointer(out))+UintptrFromInt32(2), c&uint32(0x3ff)|uint32(0xdc00), int32(int32(totype))) + _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)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99353,7 +99353,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(int32(totype))) + _put_32(tls, *(*uintptr)(unsafe.Pointer(out)), c, int32(totype)) *(*uintptr)(unsafe.Pointer(out)) += uintptr(4) *(*Tsize_t)(unsafe.Pointer(outb)) -= uint64(4) goto _51 @@ -99393,7 +99393,7 @@ func Xiconv_close(tls *TLS, cd Ticonv_t) (r int32) { trc("tls=%v cd=%v, (%v:)", tls, cd, origin(2)) defer func() { trc("-> %v", r) }() } - if !(uint64(uint64(cd))&Uint64FromInt32(1) != 0) { + if !(uint64(cd)&Uint64FromInt32(1) != 0) { Xfree(tls, cd) } return 0 @@ -99485,7 +99485,7 @@ func X__nl_langinfo(tls *TLS, item Tnl_item) (r uintptr) { trc("tls=%v item=%v, (%v:)", tls, item, origin(2)) defer func() { trc("-> %v", r) }() } - return X__nl_langinfo_l(tls, item, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale) + return X__nl_langinfo_l(tls, item, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale) } func Xnl_langinfo(tls *TLS, item Tnl_item) (r uintptr) { @@ -99609,7 +99609,7 @@ func X__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr) { break } z = X__strchrnul(tls, path, int32(':')) - l = uint64(int64(int64(z)) - int64(int64(path))) + l = uint64(int64(z) - int64(path)) if l >= uint64(256)-n-uint64(2) { goto _10 } @@ -100094,7 +100094,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(uint32(cat)) > uint32(LC_ALL) { + if uint32(cat) > uint32(LC_ALL) { return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&X__locale_lock))) @@ -100113,9 +100113,9 @@ func Xsetlocale(tls *TLS, cat int32, name uintptr) (r uintptr) { break } z = X__strchrnul(tls, p, int32(';')) - if int64(int64(z))-int64(int64(p)) <= int64(LOCALE_NAME_MAX) { - Xmemcpy(tls, bp+48, p, uint64(int64(int64(z))-int64(int64(p)))) - (*(*[24]int8)(unsafe.Pointer(bp + 48)))[int64(int64(z))-int64(int64(p))] = 0 + if int64(z)-int64(p) <= int64(LOCALE_NAME_MAX) { + Xmemcpy(tls, bp+48, p, uint64(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) } @@ -100203,7 +100203,7 @@ func Xstrcoll(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 X__strcoll_l(tls, l, r, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale) + return X__strcoll_l(tls, l, r, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale) } func Xstrcoll_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) { @@ -100342,7 +100342,7 @@ _2: goto _1 _1: ; - return int64(int64(s)) - int64(int64(s0)) + return int64(s) - int64(s0) } func Xstrfmon_l(tls *TLS, s uintptr, n Tsize_t, loc Tlocale_t, fmt uintptr, va uintptr) (r Tssize_t) { @@ -100368,7 +100368,7 @@ func Xstrfmon(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, va uintptr) (r Tssize var ret Tssize_t _, _ = ap, ret ap = va - ret = _vstrfmon_l(tls, s, n, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale, fmt, ap) + ret = _vstrfmon_l(tls, s, n, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale, fmt, ap) _ = ap return ret } @@ -100443,7 +100443,7 @@ func Xstrxfrm(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r Tsize_t) { trc("tls=%v dest=%v src=%v n=%v, (%v:)", tls, dest, src, n, origin(2)) defer func() { trc("-> %v", r) }() } - return X__strxfrm_l(tls, dest, src, n, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale) + return X__strxfrm_l(tls, dest, src, n, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale) } // C documentation @@ -100532,7 +100532,7 @@ func X__uselocale(tls *TLS, new1 Tlocale_t) (r Tlocale_t) { var global, old, v1, v2 Tlocale_t var self Tpthread_t _, _, _, _, _ = global, old, self, v1, v2 - self = uintptr(___get_tp(tls)) + self = ___get_tp(tls) old = (*t__pthread)(unsafe.Pointer(self)).Flocale global = uintptr(unsafe.Pointer(&X__libc)) + 56 if new1 != 0 { @@ -100575,7 +100575,7 @@ func Xwcscoll(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 X__wcscoll_l(tls, l, r, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale) + return X__wcscoll_l(tls, l, r, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale) } // C documentation @@ -100616,7 +100616,7 @@ func Xwcsxfrm(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r Tsize_t) { trc("tls=%v dest=%v src=%v n=%v, (%v:)", tls, dest, src, n, origin(2)) defer func() { trc("-> %v", r) }() } - return X__wcsxfrm_l(tls, dest, src, n, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale) + return X__wcsxfrm_l(tls, dest, src, n, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale) } // C documentation @@ -100828,7 +100828,7 @@ func X__fpclassifyl(tls *TLS, x float64) (r int32) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return X__fpclassify(tls, float64(float64(x))) + return X__fpclassify(tls, x) } const pio2_hi = 0 @@ -101092,7 +101092,7 @@ medium: ; /* rint(x/(pi/2)) */ fn = x*_invpio2 + _toint - _toint - n = int32(int32(fn)) + n = int32(fn) r = x - fn*_pio2_1 w = fn * _pio2_1t /* 1st round, good to 85 bits */ /* Matters with directed rounding. */ @@ -101152,7 +101152,7 @@ _1: if !(i < int32(2)) { break } - (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] = float64(int32(int32(z))) + (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i] = float64(int32(z)) z = (z - (*(*[3]float64)(unsafe.Pointer(bp + 8)))[i]) * float64(1.6777216e+07) goto _3 _3: @@ -101368,8 +101368,8 @@ recompute: /* compute n */ z = Xscalbn(tls, z, q0) /* actual value of z */ z -= float64(8) * Xfloor(tls, z*float64(0.125)) /* trim off integer >= 8 */ - n = int32(int32(z)) - z -= float64(float64(n)) + n = int32(z) + z -= float64(n) ih = 0 if q0 > 0 { /* need iq[jz-1] to determine n */ i = (*(*[20]Tint32_t)(unsafe.Pointer(bp)))[jz-int32(1)] >> (int32(24) - q0) @@ -101491,9 +101491,9 @@ recompute: (*(*[20]Tint32_t)(unsafe.Pointer(bp)))[jz] = int32(z - Float64FromFloat64(1.6777216e+07)*fw) jz += int32(1) q0 += int32(24) - (*(*[20]Tint32_t)(unsafe.Pointer(bp)))[jz] = int32(int32(fw)) + (*(*[20]Tint32_t)(unsafe.Pointer(bp)))[jz] = int32(fw) } else { - (*(*[20]Tint32_t)(unsafe.Pointer(bp)))[jz] = int32(int32(z)) + (*(*[20]Tint32_t)(unsafe.Pointer(bp)))[jz] = int32(z) } } /* convert integer "bit" chunk to floating-point value */ @@ -101713,19 +101713,19 @@ func X__rem_pio2f(tls *TLS, x float32, y uintptr) (r int32) { /* 25+53 bit pi is good enough for medium size */ if ix < uint32(0x4dc90fdb) { /* |x| ~< 2^28*(pi/2), medium size */ /* Use a specialized rint() to get fn. */ - fn = float64(float64(x))*_invpio21 + _toint1 - _toint1 - n = int32(int32(fn)) - *(*float64)(unsafe.Pointer(y)) = float64(float64(x)) - fn*_pio2_11 - fn*_pio2_1t1 + fn = float64(x)*_invpio21 + _toint1 - _toint1 + n = int32(fn) + *(*float64)(unsafe.Pointer(y)) = float64(x) - fn*_pio2_11 - fn*_pio2_1t1 /* Matters with directed rounding. */ if *(*float64)(unsafe.Pointer(y)) < -_pio41 { n-- fn-- - *(*float64)(unsafe.Pointer(y)) = float64(float64(x)) - fn*_pio2_11 - fn*_pio2_1t1 + *(*float64)(unsafe.Pointer(y)) = float64(x) - fn*_pio2_11 - fn*_pio2_1t1 } else { if *(*float64)(unsafe.Pointer(y)) > _pio41 { n++ fn++ - *(*float64)(unsafe.Pointer(y)) = float64(float64(x)) - fn*_pio2_11 - fn*_pio2_1t1 + *(*float64)(unsafe.Pointer(y)) = float64(x) - fn*_pio2_11 - fn*_pio2_1t1 } } return n @@ -101805,7 +101805,7 @@ func X__signbitl(tls *TLS, x float64) (r int32) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return X__signbit(tls, float64(float64(x))) + return X__signbit(tls, x) } var _S1 = -Float64FromFloat64(0.16666666666666632) /* 0xBFC55555, 0x55555549 */ @@ -102195,7 +102195,7 @@ func Xacoshl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xacosh(tls, float64(float64(x)))) + return Xacosh(tls, x) } func Xacosl(tls *TLS, x float64) (r float64) { @@ -102203,7 +102203,7 @@ func Xacosl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xacos(tls, float64(float64(x)))) + return Xacos(tls, x) } var _pio2_hi2 = float64(1.5707963267948966) /* 0x3FF921FB, 0x54442D18 */ @@ -102305,7 +102305,7 @@ func Xasinf(tls *TLS, x float32) (r float32) { ix = hx & uint32(0x7fffffff) if ix >= uint32(0x3f800000) { /* |x| >= 1 */ if ix == uint32(0x3f800000) { /* |x| == 1 */ - return float32(float64(float64(x))*_pio2 + Float64FromFloat32(7.52316384526264e-37)) + return float32(float64(x)*_pio2 + Float64FromFloat32(7.52316384526264e-37)) } /* asin(+-1) = +-pi/2 with inexact */ return Float32FromInt32(0) / (x - x) /* asin(|x|>1) is NaN */ } @@ -102318,7 +102318,7 @@ func Xasinf(tls *TLS, x float32) (r float32) { } /* 1 > |x| >= 0.5 */ z = (Float32FromInt32(1) - Xfabsf(tls, x)) * Float32FromFloat32(0.5) - s = Xsqrt(tls, float64(float64(z))) + s = Xsqrt(tls, float64(z)) x = float32(_pio2 - Float64FromInt32(2)*(s+s*float64(_R3(tls, z)))) if hx>>int32(31) != 0 { return -x @@ -102329,9 +102329,9 @@ func Xasinf(tls *TLS, x float32) (r float32) { // C documentation // // /* asinh(x) = sign(x)*log(|x|+sqrt(x*x+1)) ~= x - x^3/6 + o(x^5) */ -func Xasinh(tls *TLS, x float64) (r float64) { +func Xasinh(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102351,41 +102351,41 @@ func Xasinh(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) - x = *(*float64)(unsafe.Pointer(bp)) + x3 = *(*float64)(unsafe.Pointer(bp)) if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ - x = Xlog(tls, x) + float64(0.6931471805599453) + x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ - x = Xlog(tls, Float64FromInt32(2)*x+Float64FromInt32(1)/(Xsqrt(tls, x*x+Float64FromInt32(1))+x)) + x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ - x = Xlog1p(tls, x+x*x/(Xsqrt(tls, x*x+Float64FromInt32(1))+Float64FromInt32(1))) + x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { /* |x| < 0x1p-26, raise inexact if x != 0 */ if uint64(8) == uint64(4) { - y = float32(x + Float64FromFloat32(1.329227995784916e+36)) + y = float32(x3 + Float64FromFloat32(1.329227995784916e+36)) } else { if uint64(8) == uint64(8) { - y1 = x + Float64FromFloat32(1.329227995784916e+36) + y1 = x3 + Float64FromFloat32(1.329227995784916e+36) } else { - y2 = float64(x + Float64FromFloat32(1.329227995784916e+36)) + y2 = x3 + Float64FromFloat32(1.329227995784916e+36) } } } } } if s != 0 { - v1 = -x + v1 = -x3 } else { - v1 = x + v1 = x3 } return v1 } @@ -102393,9 +102393,9 @@ func Xasinh(tls *TLS, x float64) (r float64) { // C documentation // // /* asinh(x) = sign(x)*log(|x|+sqrt(x*x+1)) ~= x - x^3/6 + o(x^5) */ -func Xasinhf(tls *TLS, x float32) (r float32) { +func Xasinhf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102416,41 +102416,41 @@ func Xasinhf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) s = *(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31) /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i - x = *(*float32)(unsafe.Pointer(bp)) + x3 = *(*float32)(unsafe.Pointer(bp)) if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ - x = Xlogf(tls, x) + Float32FromFloat32(0.6931471805599453) + x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ - x = Xlogf(tls, Float32FromInt32(2)*x+Float32FromInt32(1)/(Xsqrtf(tls, x*x+Float32FromInt32(1))+x)) + x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ - x = Xlog1pf(tls, x+x*x/(Xsqrtf(tls, x*x+Float32FromInt32(1))+Float32FromInt32(1))) + x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { /* |x| < 0x1p-12, raise inexact if x!=0 */ if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } } } } if s != 0 { - v1 = -x + v1 = -x3 } else { - v1 = x + v1 = x3 } return v1 } @@ -102460,7 +102460,7 @@ func Xasinhl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xasinh(tls, float64(float64(x)))) + return Xasinh(tls, x) } func Xasinl(tls *TLS, x float64) (r float64) { @@ -102468,7 +102468,7 @@ func Xasinl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xasin(tls, float64(float64(x)))) + return Xasin(tls, x) } var _atanhi = [4]float64{ @@ -102499,9 +102499,9 @@ var _aT = [11]float64{ 10: float64(0.016285820115365782), } -func Xatan(tls *TLS, x float64) (r float64) { +func Xatan(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102517,16 +102517,16 @@ func Xatan(tls *TLS, x float64) (r float64) { F__f float64 } _, _, _, _, _, _, _, _, _, _, _, _, _ = id, ix, s1, s2, sign, w, y, y1, y2, z, v1, v3, v4 - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) if ix >= uint32(0x44100000) { /* if |x| >= 2^66 */ - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: if BoolInt32(v1&(-Uint64FromUint64(1)>>Int32FromInt32(1)) > Uint64FromUint64(0x7ff)<> int32(32)) - lx = uint32(uint32(__u1)) + lx = uint32(__u1) __u2 = *(*Tuint64_t)(unsafe.Pointer(&y)) iy = uint32(__u2 >> int32(32)) - ly = uint32(uint32(__u2)) + ly = uint32(__u2) if ix-uint32(0x3ff00000)|lx == uint32(0) { /* x = 1.0 */ return Xatan(tls, y) } @@ -102835,7 +102835,7 @@ func Xatan2l(tls *TLS, y float64, x float64) (r float64) { trc("tls=%v y=%v x=%v, (%v:)", tls, y, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xatan2(tls, float64(float64(y)), float64(float64(x)))) + return Xatan2(tls, y, x) } var _atanhi1 = [4]float32{ @@ -102860,9 +102860,9 @@ var _aT1 = [5]float32{ 4: float32(0.061687607318), } -func Xatanf(tls *TLS, x float32) (r float32) { +func Xatanf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102878,16 +102878,16 @@ func Xatanf(tls *TLS, x float32) (r float32) { F__f float32 } _, _, _, _, _, _, _, _, _, _, _, _, _ = id, ix, s1, s2, sign, w, y, y1, y2, z, v1, v3, v4 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) if ix >= uint32(0x4c800000) { /* if |x| >= 2**26 */ - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: if BoolInt32(v1&uint32(0x7fffffff) > uint32(0x7f800000)) != 0 { - return x + return x3 } z = _atanhi1[int32(3)] + Float32FromFloat32(7.52316384526264e-37) if sign != 0 { @@ -102902,48 +102902,48 @@ func Xatanf(tls *TLS, x float32) (r float32) { if ix < uint32(0x00800000) { /* raise underflow for subnormal x */ if uint64(4) == uint64(4) { - y = x * x + y = x3 * x3 } else { if uint64(4) == uint64(8) { - y1 = float64(x * x) + y1 = float64(x3 * x3) } else { - y2 = float64(x * x) + y2 = float64(x3 * x3) } } } - return x + return x3 } id = -int32(1) } else { - x = Xfabsf(tls, x) + x3 = Xfabsf(tls, x3) if ix < uint32(0x3f980000) { /* |x| < 1.1875 */ if ix < uint32(0x3f300000) { /* 7/16 <= |x| < 11/16 */ id = 0 - x = (Float32FromFloat32(2)*x - Float32FromFloat32(1)) / (Float32FromFloat32(2) + x) + x3 = (Float32FromFloat32(2)*x3 - Float32FromFloat32(1)) / (Float32FromFloat32(2) + x3) } else { /* 11/16 <= |x| < 19/16 */ id = int32(1) - x = (x - Float32FromFloat32(1)) / (x + Float32FromFloat32(1)) + x3 = (x3 - Float32FromFloat32(1)) / (x3 + Float32FromFloat32(1)) } } else { if ix < uint32(0x401c0000) { /* |x| < 2.4375 */ id = int32(2) - x = (x - Float32FromFloat32(1.5)) / (Float32FromFloat32(1) + Float32FromFloat32(1.5)*x) + x3 = (x3 - Float32FromFloat32(1.5)) / (Float32FromFloat32(1) + Float32FromFloat32(1.5)*x3) } else { /* 2.4375 <= |x| < 2**26 */ id = int32(3) - x = -Float32FromFloat32(1) / x + x3 = -Float32FromFloat32(1) / x3 } } } /* end of argument reduction */ - z = x * x + z = x3 * x3 w = z * z /* break sum from i=0 to 10 aT[i]z**(i+1) into odd and even poly */ s1 = z * (_aT1[0] + w*(_aT1[int32(2)]+w*_aT1[int32(4)])) s2 = w * (_aT1[int32(1)] + w*_aT1[int32(3)]) if id < 0 { - return x - x*(s1+s2) + return x3 - x3*(s1+s2) } - z = _atanhi1[id] - (x*(s1+s2) - _atanlo1[id] - x) + z = _atanhi1[id] - (x3*(s1+s2) - _atanlo1[id] - x3) if sign != 0 { v4 = -z } else { @@ -102955,9 +102955,9 @@ func Xatanf(tls *TLS, x float32) (r float32) { // C documentation // // /* atanh(x) = log((1+x)/(1-x))/2 = log1p(2x/(1-x))/2 ~= x + x^3/3 + o(x^5) */ -func Xatanh(tls *TLS, x float64) (r float64) { +func Xatanh(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102978,7 +102978,7 @@ func Xatanh(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ @@ -102989,12 +102989,12 @@ func Xatanh(tls *TLS, x float64) (r float64) { /* handle underflow */ if e == uint32(0) { if uint64(4) == uint64(4) { - y = float32(float32(y3)) + y = float32(y3) } else { if uint64(4) == uint64(8) { - y1 = float64(float32(float32(y3))) + y1 = float64(float32(y3)) } else { - y2 = float64(float32(float32(y3))) + y2 = float64(float32(y3)) } } } @@ -103017,9 +103017,9 @@ func Xatanh(tls *TLS, x float64) (r float64) { // C documentation // // /* atanh(x) = log((1+x)/(1-x))/2 = log1p(2x/(1-x))/2 ~= x + x^3/3 + o(x^5) */ -func Xatanhf(tls *TLS, x float32) (r float32) { +func Xatanhf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103040,7 +103040,7 @@ func Xatanhf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 s = *(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31) /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) @@ -103080,7 +103080,7 @@ func Xatanhl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xatanh(tls, float64(float64(x)))) + return Xatanh(tls, x) } func Xatanl(tls *TLS, x float64) (r float64) { @@ -103088,7 +103088,7 @@ func Xatanl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xatan(tls, float64(float64(x)))) + return Xatan(tls, x) } var _B1 = uint32(715094163) /* B1 = (1023-1023/3-0.03306235651)*2**20 */ @@ -103157,8 +103157,8 @@ func Xcbrt(tls *TLS, x float64) (r1 float64) { hx = hx/uint32(3) + _B1 } p1 = bp - *(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p1))) & (Uint64FromUint64(1) << Int32FromInt32(63))) - *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(uint64(hx)) << int32(32) + *(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (Uint64FromUint64(1) << Int32FromInt32(63)) + *(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(hx) << int32(32) t = *(*float64)(unsafe.Pointer(bp)) /* * New cbrt to 23 bits: @@ -103183,7 +103183,7 @@ func Xcbrt(tls *TLS, x float64) (r1 float64) { * before the final error is larger than 0.667 ulps. */ *(*float64)(unsafe.Pointer(bp)) = t - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(uint64(*(*Tuint64_t)(unsafe.Pointer(bp))+Uint64FromUint32(0x80000000)) & uint64(0xffffffffc0000000)) + *(*Tuint64_t)(unsafe.Pointer(bp)) = (*(*Tuint64_t)(unsafe.Pointer(bp)) + Uint64FromUint32(0x80000000)) & uint64(0xffffffffc0000000) t = *(*float64)(unsafe.Pointer(bp)) /* one step Newton iteration to 53 bits with error < 0.667 ulps */ s = t * t /* t*t is exact */ @@ -103243,15 +103243,15 @@ func Xcbrtf(tls *TLS, x float32) (r1 float32) { */ T = float64(*(*float32)(unsafe.Pointer(bp))) r = T * T * T - T = T * (float64(float64(x)) + float64(float64(x)) + r) / (float64(float64(x)) + r + r) + T = T * (float64(x) + float64(x) + r) / (float64(x) + r + r) /* * Second step Newton iteration to 47 bits. In double precision for * efficiency and accuracy. */ r = T * T * T - T = T * (float64(float64(x)) + float64(float64(x)) + r) / (float64(float64(x)) + r + r) + T = T * (float64(x) + float64(x) + r) / (float64(x) + r + r) /* rounding to 24 bits is perfect in round-to-nearest mode */ - return float32(float32(T)) + return float32(T) } func Xcbrtl(tls *TLS, x float64) (r float64) { @@ -103259,16 +103259,16 @@ func Xcbrtl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xcbrt(tls, float64(float64(x)))) + return Xcbrt(tls, x) } const DBL_EPSILON5 = 2.220446049250313e-16 var _toint2 = Float64FromInt32(1) / Float64FromFloat64(2.220446049250313e-16) -func Xceil(tls *TLS, x float64) (r float64) { +func Xceil(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103289,26 +103289,26 @@ func Xceil(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x == Float64FromInt32(0) { - return x + if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { + return x3 } /* y = int(x) - x, where int(x) is an integer neighbor of x */ if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { - y3 = x - _toint2 + _toint2 - x + y3 = x3 - _toint2 + _toint2 - x3 } else { - y3 = x + _toint2 - _toint2 - x + y3 = x3 + _toint2 - _toint2 - x3 } /* special case because of non-nearest rounding modes */ if e <= Int32FromInt32(0x3ff)-Int32FromInt32(1) { if uint64(8) == uint64(4) { - y = float32(float32(y3)) + y = float32(y3) } else { if uint64(8) == uint64(8) { y1 = y3 } else { - y2 = float64(float64(y3)) + y2 = y3 } } if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { @@ -103319,16 +103319,16 @@ func Xceil(tls *TLS, x float64) (r float64) { return v1 } if y3 < Float64FromInt32(0) { - return x + y3 + Float64FromInt32(1) + return x3 + y3 + Float64FromInt32(1) } - return x + y3 + return x3 + y3 } const DBL_EPSILON6 = 0 -func Xceilf(tls *TLS, x float32) (r float32) { +func Xceilf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103349,23 +103349,23 @@ func Xceilf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { - return x + return x3 } if e >= 0 { m = uint32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { - return x + return x3 } if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) == uint32(0) { @@ -103374,12 +103374,12 @@ func Xceilf(tls *TLS, x float32) (r float32) { *(*Tuint32_t)(unsafe.Pointer(bp)) &= ^m } else { if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) != 0 { @@ -103398,7 +103398,7 @@ func Xceill(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xceil(tls, float64(float64(x)))) + return Xceil(tls, x) } func Xcopysign(tls *TLS, x float64, y float64) (r float64) { @@ -103435,9 +103435,9 @@ func Xcopysign(tls *TLS, x float64, y float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp + 8)) = y p1 = bp - *(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p1))) & (-Uint64FromUint64(1) / Uint64FromInt32(2))) + *(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (-Uint64FromUint64(1) / Uint64FromInt32(2)) p2 = bp - *(*Tuint64_t)(unsafe.Pointer(p2)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p2))) | uint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)))&(Uint64FromUint64(1)< %v", r) }() } - return float64(Xcopysign(tls, float64(float64(x)), float64(float64(y)))) + return Xcopysign(tls, x, y) } -func Xcos(tls *TLS, x float64) (r float64) { +func Xcos(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103498,31 +103498,31 @@ func Xcos(tls *TLS, x float64) (r float64) { var y1, y2 float64 var _ /* y at bp+0 */ [2]float64 _, _, _, _, _ = ix, n, y, y1, y2 - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) ix &= uint32(0x7fffffff) /* |x| ~< pi/4 */ if ix <= uint32(0x3fe921fb) { if ix < uint32(0x3e46a09e) { /* |x| < 2**-27 * sqrt(2) */ /* raise inexact if x!=0 */ if uint64(8) == uint64(4) { - y = float32(x + Float64FromFloat32(1.329227995784916e+36)) + y = float32(x3 + Float64FromFloat32(1.329227995784916e+36)) } else { if uint64(8) == uint64(8) { - y1 = x + Float64FromFloat32(1.329227995784916e+36) + y1 = x3 + Float64FromFloat32(1.329227995784916e+36) } else { - y2 = float64(x + Float64FromFloat32(1.329227995784916e+36)) + y2 = x3 + Float64FromFloat32(1.329227995784916e+36) } } return float64(1) } - return X__cos(tls, x, Float64FromInt32(0)) + return X__cos(tls, x3, Float64FromInt32(0)) } /* cos(Inf or NaN) is NaN */ if ix >= uint32(0x7ff00000) { - return x - x + return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x, bp)) + n = uint32(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)]) @@ -103547,9 +103547,9 @@ var _c2pio2 = Float64FromInt32(2) * Float64FromFloat64(1.5707963267948966) /* 0x var _c3pio2 = Float64FromInt32(3) * Float64FromFloat64(1.5707963267948966) /* 0x4012D97C, 0x7F3321D2 */ var _c4pio2 = Float64FromInt32(4) * Float64FromFloat64(1.5707963267948966) /* 0x401921FB, 0x54442D18 */ -func Xcosf(tls *TLS, x float32) (r float32) { +func Xcosf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103560,63 +103560,63 @@ func Xcosf(tls *TLS, x float32) (r float32) { var y1, y2, v1, v2 float64 var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ /* raise inexact if x != 0 */ if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } return Float32FromFloat32(1) } - return X__cosdf(tls, float64(float64(x))) + return X__cosdf(tls, float64(x3)) } if ix <= uint32(0x407b53d1) { /* |x| ~<= 5*pi/4 */ if ix > uint32(0x4016cbe3) { /* |x| ~> 3*pi/4 */ if sign != 0 { - v1 = float64(float64(x)) + _c2pio2 + v1 = float64(x3) + _c2pio2 } else { - v1 = float64(float64(x)) - _c2pio2 + v1 = float64(x3) - _c2pio2 } return -X__cosdf(tls, v1) } else { if sign != 0 { - return X__sindf(tls, float64(float64(x))+_c1pio2) + return X__sindf(tls, float64(x3)+_c1pio2) } else { - return X__sindf(tls, _c1pio2-float64(float64(x))) + return X__sindf(tls, _c1pio2-float64(x3)) } } } if ix <= uint32(0x40e231d5) { /* |x| ~<= 9*pi/4 */ if ix > uint32(0x40afeddf) { /* |x| ~> 7*pi/4 */ if sign != 0 { - v2 = float64(float64(x)) + _c4pio2 + v2 = float64(x3) + _c4pio2 } else { - v2 = float64(float64(x)) - _c4pio2 + v2 = float64(x3) - _c4pio2 } return X__cosdf(tls, v2) } else { if sign != 0 { - return X__sindf(tls, float64(-x)-_c3pio2) + return X__sindf(tls, float64(-x3)-_c3pio2) } else { - return X__sindf(tls, float64(float64(x))-_c3pio2) + return X__sindf(tls, float64(x3)-_c3pio2) } } } /* cos(Inf or NaN) is NaN */ if ix >= uint32(0x7f800000) { - return x - x + return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x, bp)) + n = uint32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -103638,9 +103638,9 @@ const M_PI_24 = 0 // * = 1 + 0.5*(exp(x)-1)*(exp(x)-1)/exp(x) // * = 1 + x*x/2 + o(x^4) // */ -func Xcosh(tls *TLS, x float64) (r float64) { +func Xcosh(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103660,44 +103660,44 @@ func Xcosh(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) - x = *(*float64)(unsafe.Pointer(bp)) + 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)<log(0x1p26) then the 1/t is not needed */ return float64(0.5) * (t + Float64FromInt32(1)/t) } /* |x| > log(DBL_MAX) or nan */ /* note: the result is stored to handle overflow */ - t = X__expo2(tls, x, float64(1)) + t = X__expo2(tls, x3, float64(1)) return t } -func Xcoshf(tls *TLS, x float32) (r float32) { +func Xcoshf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103717,35 +103717,35 @@ func Xcoshf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) - x = *(*float32)(unsafe.Pointer(bp)) + x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) /* |x| < log(2) */ if w < uint32(0x3f317217) { if w < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)< log(FLT_MAX) or nan */ - t = X__expo2f(tls, x, Float32FromFloat32(1)) + t = X__expo2f(tls, x3, Float32FromFloat32(1)) return t } @@ -103754,7 +103754,7 @@ func Xcoshl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xcosh(tls, float64(float64(x)))) + return Xcosh(tls, x) } func Xcosl(tls *TLS, x float64) (r float64) { @@ -103762,7 +103762,7 @@ func Xcosl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xcos(tls, float64(float64(x)))) + return Xcos(tls, x) } var _erx = float64(0.8450629115104675) /* 0x3FEB0AC1, 0x60000000 */ @@ -104140,7 +104140,7 @@ func Xerfl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xerf(tls, float64(float64(x)))) + return Xerf(tls, x) } func Xerfcl(tls *TLS, x float64) (r float64) { @@ -104148,7 +104148,7 @@ func Xerfcl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xerfc(tls, float64(float64(x)))) + return Xerfc(tls, x) } const EXP2_POLY_ORDER = 5 @@ -104172,7 +104172,7 @@ func _specialcase(tls *TLS, tmp Tdouble_t, sbits Tuint64_t, ki Tuint64_t) (r flo _, _, _, _, _, _, _, _, _, _, _ = hi, lo, scale, y, y1, y2, y3, v1, v3, v5, v7 if ki&uint64(0x80000000) == uint64(0) { /* k > 0, the exponent of scale might have overflowed by <= 460. */ - sbits = Tuint64_t(uint64(sbits) - Uint64FromUint64(1009)<> int32(52)) } -func Xexp(tls *TLS, x float64) (r1 float64) { +func Xexp(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var abstop Tuint32_t @@ -104230,22 +104230,22 @@ func Xexp(tls *TLS, x float64) (r1 float64) { var kd, r, r2, scale, tail, tmp, z Tdouble_t var y, v1, v2, v4, v6 float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = abstop, idx, kd, ki, r, r2, sbits, scale, tail, tmp, top, y, z, v1, v2, v4, v5, v6 - abstop = _top12(tls, x) & uint32(0x7ff) + abstop = _top12(tls, x1) & uint32(0x7ff) if abstop-_top12(tls, float64(5.551115123125783e-17)) >= _top12(tls, float64(512))-_top12(tls, float64(5.551115123125783e-17)) { if abstop-_top12(tls, float64(5.551115123125783e-17)) >= uint32(0x80000000) { /* Avoid spurious underflow for tiny x. */ /* Note: 0 is common input. */ - return float64(1) + x + return float64(1) + x1 } if abstop >= _top12(tls, float64(1024)) { v1 = float64(-X__builtin_inff(tls)) - if *(*Tuint64_t)(unsafe.Pointer(&x)) == *(*Tuint64_t)(unsafe.Pointer(&v1)) { + if *(*Tuint64_t)(unsafe.Pointer(&x1)) == *(*Tuint64_t)(unsafe.Pointer(&v1)) { return float64(0) } if abstop >= _top12(tls, float64(X__builtin_inff(tls))) { - return float64(1) + x + return float64(1) + x1 } - if *(*Tuint64_t)(unsafe.Pointer(&x))>>int32(63) != 0 { + if *(*Tuint64_t)(unsafe.Pointer(&x1))>>int32(63) != 0 { return X__math_uflow(tls, uint32(0)) } else { return X__math_oflow(tls, uint32(0)) @@ -104256,7 +104256,7 @@ func Xexp(tls *TLS, x float64) (r1 float64) { } /* exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)]. */ /* x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N]. */ - z = X__exp_data.Finvln2N * x + z = X__exp_data.Finvln2N * x1 /* z - kd is in [-1, 1] in non-nearest rounding modes. */ y = z + X__exp_data.Fshift v2 = y @@ -104266,7 +104266,7 @@ _3: v4 = kd ki = *(*Tuint64_t)(unsafe.Pointer(&v4)) kd -= X__exp_data.Fshift - r = x + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN + 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)< %v", r) }() } - return float64(Xexp10(tls, float64(float64(x)))) + return Xexp10(tls, x) } func Xpow10l(tls *TLS, x float64) (r float64) { @@ -104462,7 +104462,7 @@ func _specialcase1(tls *TLS, tmp Tdouble_t, sbits Tuint64_t, ki Tuint64_t) (r fl _, _, _, _, _, _, _, _, _, _, _ = hi, lo, scale, y, y1, y2, y3, v1, v3, v5, v7 if ki&uint64(0x80000000) == uint64(0) { /* k > 0, the exponent of scale might have overflowed by 1. */ - sbits = Tuint64_t(uint64(sbits) - Uint64FromUint64(1)<> int32(52)) } -func Xexp2(tls *TLS, x float64) (r1 float64) { +func Xexp2(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var abstop Tuint32_t @@ -104520,39 +104520,39 @@ func Xexp2(tls *TLS, x float64) (r1 float64) { var kd, r, r2, scale, tail, tmp Tdouble_t var y, v1, v2, v3, v4, v6, v8 float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = abstop, idx, kd, ki, r, r2, sbits, scale, tail, tmp, top, y, v1, v2, v3, v4, v6, v7, v8 - abstop = _top121(tls, x) & uint32(0x7ff) + abstop = _top121(tls, x1) & uint32(0x7ff) if abstop-_top121(tls, float64(5.551115123125783e-17)) >= _top121(tls, float64(512))-_top121(tls, float64(5.551115123125783e-17)) { if abstop-_top121(tls, float64(5.551115123125783e-17)) >= uint32(0x80000000) { /* Avoid spurious underflow for tiny x. */ /* Note: 0 is common input. */ - return float64(1) + x + return float64(1) + x1 } if abstop >= _top121(tls, float64(1024)) { v1 = float64(-X__builtin_inff(tls)) - if *(*Tuint64_t)(unsafe.Pointer(&x)) == *(*Tuint64_t)(unsafe.Pointer(&v1)) { + if *(*Tuint64_t)(unsafe.Pointer(&x1)) == *(*Tuint64_t)(unsafe.Pointer(&v1)) { return float64(0) } if abstop >= _top121(tls, float64(X__builtin_inff(tls))) { - return float64(1) + x + return float64(1) + x1 } - if !(*(*Tuint64_t)(unsafe.Pointer(&x))>>Int32FromInt32(63) != 0) { + if !(*(*Tuint64_t)(unsafe.Pointer(&x1))>>Int32FromInt32(63) != 0) { return X__math_oflow(tls, uint32(0)) } else { v2 = -Float64FromFloat64(1075) - if *(*Tuint64_t)(unsafe.Pointer(&x)) >= *(*Tuint64_t)(unsafe.Pointer(&v2)) { + if *(*Tuint64_t)(unsafe.Pointer(&x1)) >= *(*Tuint64_t)(unsafe.Pointer(&v2)) { return X__math_uflow(tls, uint32(0)) } } } v3 = float64(928) - if uint64(2)**(*Tuint64_t)(unsafe.Pointer(&x)) > uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v3)) { + if uint64(2)**(*Tuint64_t)(unsafe.Pointer(&x1)) > uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v3)) { /* Large x is special cased below. */ abstop = uint32(0) } } /* exp2(x) = 2^(k/N) * 2^r, with 2^r in [2^(-1/2N),2^(1/2N)]. */ /* x = k/N + r, with int k and r in [-1/2N, 1/2N]. */ - y = x + X__exp_data.Fexp2_shift + y = x1 + X__exp_data.Fexp2_shift v4 = y goto _5 _5: @@ -104560,7 +104560,7 @@ _5: v6 = kd ki = *(*Tuint64_t)(unsafe.Pointer(&v6)) /* k. */ kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ - r = x - kd + r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(20) } -func Xexp2f(tls *TLS, x float32) (r1 float32) { +func Xexp2f(tls *TLS, x2 float32) (r1 float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x2=%v, (%v:)", tls, x2, origin(2)) defer func() { trc("-> %v", r1) }() } var abstop Tuint32_t @@ -104616,21 +104616,21 @@ func Xexp2f(tls *TLS, x float32) (r1 float32) { var y, v1, v5 float32 var y1, v2, v4 float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = abstop, kd, ki, r, r2, s, t, xd, y, y1, y2, z, v1, v2, v4, v5 - xd = float64(float64(x)) - abstop = _top122(tls, x) & uint32(0x7ff) + xd = float64(x2) + abstop = _top122(tls, x2) & uint32(0x7ff) if abstop >= _top122(tls, Float32FromFloat32(128)) { /* |x| >= 128 or x is nan. */ v1 = -X__builtin_inff(tls) - if *(*Tuint32_t)(unsafe.Pointer(&x)) == *(*Tuint32_t)(unsafe.Pointer(&v1)) { + if *(*Tuint32_t)(unsafe.Pointer(&x2)) == *(*Tuint32_t)(unsafe.Pointer(&v1)) { return Float32FromFloat32(0) } if abstop >= _top122(tls, X__builtin_inff(tls)) { - return x + x + return x2 + x2 } - if x > Float32FromFloat32(0) { + if x2 > Float32FromFloat32(0) { return X__math_oflowf(tls, uint32(0)) } - if x <= -Float32FromFloat32(150) { + if x2 <= -Float32FromFloat32(150) { return X__math_uflowf(tls, uint32(0)) } } @@ -104653,7 +104653,7 @@ _3: y2 = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + 264 + 2*8))*r + Float64FromInt32(1) y2 = z*r2 + y2 y2 = y2 * s - y = float32(float32(y2)) + y = float32(y2) v5 = y goto _6 _6: @@ -104674,7 +104674,7 @@ func Xexp2l(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xexp2(tls, float64(float64(x)))) + return Xexp2(tls, x) } const N2 = 128 @@ -104706,9 +104706,9 @@ func _top123(tls *TLS, x float32) (r Tuint32_t) { return *(*Tuint32_t)(unsafe.Pointer(&x)) >> int32(20) } -func Xexpf(tls *TLS, x float32) (r1 float32) { +func Xexpf(tls *TLS, x2 float32) (r1 float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x2=%v, (%v:)", tls, x2, origin(2)) defer func() { trc("-> %v", r1) }() } var abstop Tuint32_t @@ -104717,21 +104717,21 @@ func Xexpf(tls *TLS, x float32) (r1 float32) { var y, v1, v5 float32 var y1, v2, v4 float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = abstop, kd, ki, r, r2, s, t, xd, y, y1, y2, z, v1, v2, v4, v5 - xd = float64(float64(x)) - abstop = _top123(tls, x) & uint32(0x7ff) + xd = float64(x2) + abstop = _top123(tls, x2) & uint32(0x7ff) if abstop >= _top123(tls, Float32FromFloat32(88)) { /* |x| >= 88 or x is nan. */ v1 = -X__builtin_inff(tls) - if *(*Tuint32_t)(unsafe.Pointer(&x)) == *(*Tuint32_t)(unsafe.Pointer(&v1)) { + if *(*Tuint32_t)(unsafe.Pointer(&x2)) == *(*Tuint32_t)(unsafe.Pointer(&v1)) { return Float32FromFloat32(0) } if abstop >= _top123(tls, X__builtin_inff(tls)) { - return x + x + return x2 + x2 } - if x > Float32FromFloat32(88.72283172607422) { /* x > log(0x1p128) ~= 88.72 */ + if x2 > Float32FromFloat32(88.72283172607422) { /* x > log(0x1p128) ~= 88.72 */ return X__math_oflowf(tls, uint32(0)) } - if x < -Float32FromFloat32(103.97207641601562) { /* x < log(0x1p-150) ~= -103.97 */ + if x2 < -Float32FromFloat32(103.97207641601562) { /* x < log(0x1p-150) ~= -103.97 */ return X__math_uflowf(tls, uint32(0)) } } @@ -104758,7 +104758,7 @@ _3: y2 = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__exp2f_data)) + 304 + 2*8))*r + Float64FromInt32(1) y2 = z*r2 + y2 y2 = y2 * s - y = float32(float32(y2)) + y = float32(y2) v5 = y goto _6 _6: @@ -104770,7 +104770,7 @@ func Xexpl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xexp(tls, float64(float64(x)))) + return Xexp(tls, x) } var _o_threshold = float64(709.782712893384) /* 0x40862E42, 0xFEFA39EF */ @@ -104784,9 +104784,9 @@ var _Q3 = -Float64FromFloat64(7.93650757867488e-05) /* BF14CE19 9EAADBB7 */ var _Q4 = float64(4.008217827329362e-06) /* 3ED0CFCA 86E65239 */ var _Q5 = -Float64FromFloat64(2.0109921818362437e-07) /* BE8AFDB7 6E09C32D */ -func Xexpm1(tls *TLS, x float64) (r float64) { +func Xexpm1(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -104813,35 +104813,35 @@ func Xexpm1(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp + 8)) = x + *(*float64)(unsafe.Pointer(bp + 8)) = x3 hx = uint32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(32) & uint64(0x7fffffff)) sign = int32(*(*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)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: if BoolInt32(v1&(-Uint64FromUint64(1)>>Int32FromInt32(1)) > Uint64FromUint64(0x7ff)< _o_threshold { - x *= float64(8.98846567431158e+307) - return x + if x3 > _o_threshold { + x3 *= float64(8.98846567431158e+307) + return x3 } } /* argument reduction */ if hx > uint32(0x3fd62e42) { /* if |x| > 0.5 ln2 */ if hx < uint32(0x3FF0A2B2) { /* and |x| < 1.5 ln2 */ if !(sign != 0) { - hi = x - _ln2_hi + hi = x3 - _ln2_hi lo = _ln2_lo k = int32(1) } else { - hi = x + _ln2_hi + hi = x3 + _ln2_hi lo = -_ln2_lo k = -int32(1) } @@ -104851,56 +104851,56 @@ func Xexpm1(tls *TLS, x float64) (r float64) { } else { v3 = float64(0.5) } - k = int32(_invln2*x + v3) - t = float64(float64(k)) - hi = x - t*_ln2_hi /* t*ln2_hi is exact here */ + k = int32(_invln2*x3 + v3) + t = float64(k) + hi = x3 - t*_ln2_hi /* t*ln2_hi is exact here */ lo = t * _ln2_lo } - x = hi - lo - c = hi - x - lo + x3 = hi - lo + c = hi - x3 - lo } else { if hx < uint32(0x3c900000) { /* |x| < 2**-54, return x */ if hx < uint32(0x00100000) { if uint64(4) == uint64(4) { - y = float32(float32(x)) + y = float32(x3) } else { if uint64(4) == uint64(8) { - y1 = float64(float32(float32(x))) + y1 = float64(float32(x3)) } else { - y2 = float64(float32(float32(x))) + y2 = float64(float32(x3)) } } } - return x + return x3 } else { k = 0 } } /* x is now in primary range */ - hfx = float64(0.5) * x - hxs = x * hfx + hfx = float64(0.5) * x3 + hxs = x3 * hfx r1 = float64(1) + hxs*(_Q1+hxs*(_Q2+hxs*(_Q3+hxs*(_Q4+hxs*_Q5)))) t = float64(3) - r1*hfx - e = hxs * ((r1 - t) / (Float64FromFloat64(6) - x*t)) + e = hxs * ((r1 - t) / (Float64FromFloat64(6) - x3*t)) if k == 0 { /* c is 0 */ - return x - (x*e - hxs) + return x3 - (x3*e - hxs) } - e = x*(e-c) - c + e = x3*(e-c) - c e -= hxs /* exp(x) ~ 2^k (Xreduced - e + 1) */ if k == -int32(1) { - return float64(0.5)*(x-e) - float64(0.5) + return float64(0.5)*(x3-e) - float64(0.5) } if k == int32(1) { - if x < -Float64FromFloat64(0.25) { - return -Float64FromFloat64(2) * (e - (x + Float64FromFloat64(0.5))) + if x3 < -Float64FromFloat64(0.25) { + return -Float64FromFloat64(2) * (e - (x3 + Float64FromFloat64(0.5))) } - return float64(1) + float64(2)*(x-e) + return float64(1) + float64(2)*(x3-e) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(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 = x - e + float64(1) + y3 = x3 - e + float64(1) if k == int32(1024) { y3 = y3 * float64(2) * float64(8.98846567431158e+307) } else { @@ -104910,9 +104910,9 @@ func Xexpm1(tls *TLS, x float64) (r float64) { } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { - y3 = (x - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk + y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { - y3 = (x - (e + *(*float64)(unsafe.Pointer(bp + 8))) + Float64FromInt32(1)) * twopk + y3 = (x3 - (e + *(*float64)(unsafe.Pointer(bp + 8))) + Float64FromInt32(1)) * twopk } return y3 } @@ -104928,9 +104928,9 @@ var _invln21 = float32(1.4426950216) /* 0x3fb8aa3b */ var _Q11 = float32(-Float64FromFloat64(0.033333212137)) /* -0x888868.0p-28 */ var _Q21 = float32(0.0015807170421) /* 0xcf3010.0p-33 */ -func Xexpm1f(tls *TLS, x float32) (r float32) { +func Xexpm1f(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -104952,31 +104952,31 @@ func Xexpm1f(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) sign = int32(*(*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 */ - return x + return x3 } if sign != 0 { return float32(-Int32FromInt32(1)) } if hx > uint32(0x42b17217) { /* x > log(FLT_MAX) */ - x *= Float32FromFloat32(1.7014118346046923e+38) - return x + x3 *= Float32FromFloat32(1.7014118346046923e+38) + return x3 } } /* argument reduction */ if hx > uint32(0x3eb17218) { /* if |x| > 0.5 ln2 */ if hx < uint32(0x3F851592) { /* and |x| < 1.5 ln2 */ if !(sign != 0) { - hi = x - _ln2_hi1 + hi = x3 - _ln2_hi1 lo = _ln2_lo1 k = int32(1) } else { - hi = x + _ln2_hi1 + hi = x3 + _ln2_hi1 lo = -_ln2_lo1 k = -int32(1) } @@ -104986,56 +104986,56 @@ func Xexpm1f(tls *TLS, x float32) (r float32) { } else { v1 = Float32FromFloat32(0.5) } - k = int32(_invln21*x + v1) - t = float32(float32(k)) - hi = x - t*_ln2_hi1 /* t*ln2_hi is exact here */ + k = int32(_invln21*x3 + v1) + t = float32(k) + hi = x3 - t*_ln2_hi1 /* t*ln2_hi is exact here */ lo = t * _ln2_lo1 } - x = hi - lo - c = hi - x - lo + x3 = hi - lo + c = hi - x3 - lo } else { if hx < uint32(0x33000000) { /* when |x|<2**-25, return x */ if hx < uint32(0x00800000) { if uint64(4) == uint64(4) { - y = x * x + y = x3 * x3 } else { if uint64(4) == uint64(8) { - y1 = float64(x * x) + y1 = float64(x3 * x3) } else { - y2 = float64(x * x) + y2 = float64(x3 * x3) } } } - return x + return x3 } else { k = 0 } } /* x is now in primary range */ - hfx = Float32FromFloat32(0.5) * x - hxs = x * hfx + hfx = Float32FromFloat32(0.5) * x3 + hxs = x3 * hfx r1 = Float32FromFloat32(1) + hxs*(_Q11+hxs*_Q21) t = Float32FromFloat32(3) - r1*hfx - e = hxs * ((r1 - t) / (Float32FromFloat32(6) - x*t)) + e = hxs * ((r1 - t) / (Float32FromFloat32(6) - x3*t)) if k == 0 { /* c is 0 */ - return x - (x*e - hxs) + return x3 - (x3*e - hxs) } - e = x*(e-c) - c + e = x3*(e-c) - c e -= hxs /* exp(x) ~ 2^k (Xreduced - e + 1) */ if k == -int32(1) { - return Float32FromFloat32(0.5)*(x-e) - Float32FromFloat32(0.5) + return Float32FromFloat32(0.5)*(x3-e) - Float32FromFloat32(0.5) } if k == int32(1) { - if x < -Float32FromFloat32(0.25) { - return -Float32FromFloat32(2) * (e - (x + Float32FromFloat32(0.5))) + if x3 < -Float32FromFloat32(0.25) { + return -Float32FromFloat32(2) * (e - (x3 + Float32FromFloat32(0.5))) } - return Float32FromFloat32(1) + Float32FromFloat32(2)*(x-e) + return Float32FromFloat32(1) + Float32FromFloat32(2)*(x3-e) } *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((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 = x - e + Float32FromFloat32(1) + y3 = x3 - e + Float32FromFloat32(1) if k == int32(128) { y3 = y3 * Float32FromFloat32(2) * Float32FromFloat32(1.7014118346046923e+38) } else { @@ -105045,9 +105045,9 @@ func Xexpm1f(tls *TLS, x float32) (r float32) { } *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { - y3 = (x - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk + y3 = (x3 - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk } else { - y3 = (x - (e + *(*float32)(unsafe.Pointer(bp))) + Float32FromInt32(1)) * twopk + y3 = (x3 - (e + *(*float32)(unsafe.Pointer(bp))) + Float32FromInt32(1)) * twopk } return y3 } @@ -105057,7 +105057,7 @@ func Xexpm1l(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xexpm1(tls, float64(float64(x)))) + return Xexpm1(tls, x) } func Xfabs(tls *TLS, x float64) (r float64) { @@ -105082,7 +105082,7 @@ func Xfabs(tls *TLS, x float64) (r float64) { }{} *(*float64)(unsafe.Pointer(bp)) = x p1 = bp - *(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p1))) & (-Uint64FromUint64(1) / Uint64FromInt32(2))) + *(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (-Uint64FromUint64(1) / Uint64FromInt32(2)) return *(*float64)(unsafe.Pointer(bp)) } @@ -105114,7 +105114,7 @@ func Xfabsl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xfabs(tls, float64(float64(x)))) + return Xfabs(tls, x) } func Xfdim(tls *TLS, x float64, y float64) (r float64) { @@ -105194,7 +105194,7 @@ func Xfdiml(tls *TLS, x float64, y float64) (r float64) { trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xfdim(tls, float64(float64(x)), float64(float64(y)))) + return Xfdim(tls, x, y) } func Xfinite(tls *TLS, x float64) (r int32) { @@ -105241,9 +105241,9 @@ const DBL_EPSILON7 = 2.220446049250313e-16 var _toint3 = Float64FromInt32(1) / Float64FromFloat64(2.220446049250313e-16) -func Xfloor(tls *TLS, x float64) (r float64) { +func Xfloor(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -105264,26 +105264,26 @@ func Xfloor(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x == Float64FromInt32(0) { - return x + if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { + return x3 } /* y = int(x) - x, where int(x) is an integer neighbor of x */ if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { - y3 = x - _toint3 + _toint3 - x + y3 = x3 - _toint3 + _toint3 - x3 } else { - y3 = x + _toint3 - _toint3 - x + y3 = x3 + _toint3 - _toint3 - x3 } /* special case because of non-nearest rounding modes */ if e <= Int32FromInt32(0x3ff)-Int32FromInt32(1) { if uint64(8) == uint64(4) { - y = float32(float32(y3)) + y = float32(y3) } else { if uint64(8) == uint64(8) { y1 = y3 } else { - y2 = float64(float64(y3)) + y2 = y3 } } if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { @@ -105294,16 +105294,16 @@ func Xfloor(tls *TLS, x float64) (r float64) { return float64(v1) } if y3 > Float64FromInt32(0) { - return x + y3 - Float64FromInt32(1) + return x3 + y3 - Float64FromInt32(1) } - return x + y3 + return x3 + y3 } const DBL_EPSILON8 = 0 -func Xfloorf(tls *TLS, x float32) (r float32) { +func Xfloorf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -105324,23 +105324,23 @@ func Xfloorf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { - return x + return x3 } if e >= 0 { m = uint32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { - return x + return x3 } if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) != 0 { @@ -105349,12 +105349,12 @@ func Xfloorf(tls *TLS, x float32) (r float32) { *(*Tuint32_t)(unsafe.Pointer(bp)) &= ^m } else { if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) == uint32(0) { @@ -105373,7 +105373,7 @@ func Xfloorl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xfloor(tls, float64(float64(x)))) + return Xfloor(tls, x) } const DBL_MIN1 = 2.2250738585072014e-308 @@ -105406,8 +105406,8 @@ func _normalize(tls *TLS, x float64) (r Tnum) { } e = v2 } - ix = Tuint64_t(uint64(ix) & (Uint64FromUint64(1)<> int32(32) - ylo = uint64(uint32(uint32(y))) + ylo = uint64(uint32(y)) yhi = y >> int32(32) t1 = xlo * ylo t2 = xlo*yhi + xhi*ylo @@ -105431,9 +105431,9 @@ func _mul(tls *TLS, hi uintptr, lo uintptr, x Tuint64_t, y Tuint64_t) { *(*Tuint64_t)(unsafe.Pointer(hi)) = t3 + t2>>Int32FromInt32(32) + BoolUint64(t1 > *(*Tuint64_t)(unsafe.Pointer(lo))) } -func Xfma(tls *TLS, x float64, y float64, z float64) (r1 float64) { +func Xfma(tls *TLS, x1 float64, y float64, z float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v y=%v z=%v, (%v:)", tls, x, y, z, origin(2)) + trc("tls=%v x1=%v y=%v z=%v, (%v:)", tls, x1, y, z, origin(2)) defer func() { trc("-> %v", r1) }() } bp := tls.Alloc(16) @@ -105448,15 +105448,15 @@ func Xfma(tls *TLS, x float64, y float64, z float64) (r1 float64) { var _ /* rhi at bp+0 */ Tuint64_t var _ /* rlo at bp+8 */ Tuint64_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, d, e, fltmin, i, nonzero, nx, ny, nz, r, samesign, sign, t, tiny, zhi, zlo, v1, v2, v4, v5 - nx = _normalize(tls, x) + nx = _normalize(tls, x1) ny = _normalize(tls, y) nz = _normalize(tls, z) if nx.Fe >= Int32FromInt32(0x7ff)-Int32FromInt32(0x3ff)-Int32FromInt32(52)-Int32FromInt32(1) || ny.Fe >= Int32FromInt32(0x7ff)-Int32FromInt32(0x3ff)-Int32FromInt32(52)-Int32FromInt32(1) { - return x*y + z + return x1*y + z } if nz.Fe >= Int32FromInt32(0x7ff)-Int32FromInt32(0x3ff)-Int32FromInt32(52)-Int32FromInt32(1) { if nz.Fe > Int32FromInt32(0x7ff)-Int32FromInt32(0x3ff)-Int32FromInt32(52)-Int32FromInt32(1) { /* z==0 */ - return x*y + z + return x1*y + z } return z } @@ -105547,7 +105547,7 @@ func Xfma(tls *TLS, x float64, y float64, z float64) (r1 float64) { } } else { /* exact +-0 */ - return x*y + z + return x1*y + z } } e -= d @@ -105556,7 +105556,7 @@ func Xfma(tls *TLS, x float64, y float64, z float64) (r1 float64) { if sign != 0 { i = -i } - r = float64(float64(i)) /* |r| is in [0x1p62,0x1p63] */ + r = float64(i) /* |r| is in [0x1p62,0x1p63] */ if e < -Int32FromInt32(1022)-Int32FromInt32(62) { /* result is subnormal before rounding */ if e == -Int32FromInt32(1022)-Int32FromInt32(63) { @@ -105569,16 +105569,16 @@ func Xfma(tls *TLS, x float64, y float64, z float64) (r1 float64) { on arch behaviour which can be imitated by a double to float conversion */ fltmin = float32(Float64FromFloat64(1.0842021401737618e-19) * Float64FromFloat32(1.1754943508222875e-38) * r) - return Float64FromFloat64(2.2250738585072014e-308) / Float64FromFloat32(1.1754943508222875e-38) * float64(float64(fltmin)) + return Float64FromFloat64(2.2250738585072014e-308) / Float64FromFloat32(1.1754943508222875e-38) * float64(fltmin) } /* 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)< %v", r) }() } - return float64(Xfma(tls, float64(float64(x)), float64(float64(y)), float64(float64(z)))) + return Xfma(tls, x, y, z) } func Xfmax(tls *TLS, x float64, y float64) (r float64) { @@ -105728,7 +105728,7 @@ func Xfmaxl(tls *TLS, x float64, y float64) (r float64) { trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xfmax(tls, float64(float64(x)), float64(float64(y)))) + return Xfmax(tls, x, y) } func Xfmin(tls *TLS, x float64, y float64) (r float64) { @@ -105850,7 +105850,7 @@ func Xfminl(tls *TLS, x float64, y float64) (r float64) { trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xfmin(tls, float64(float64(x)), float64(float64(y)))) + return Xfmin(tls, x, y) } func Xfmod(tls *TLS, x float64, y float64) (r float64) { @@ -105930,8 +105930,8 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) { } uxi <<= uint64(-ex + int32(1)) } else { - uxi = Tuint64_t(uint64(uxi) & (-Uint64FromUint64(1) >> Int32FromInt32(12))) - uxi = Tuint64_t(uint64(uxi) | Uint64FromUint64(1)<> Int32FromInt32(12)) + uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12))) + *(*Tuint64_t)(unsafe.Pointer(p6)) = *(*Tuint64_t)(unsafe.Pointer(p6)) & (-Uint64FromUint64(1) >> Int32FromInt32(12)) p7 = bp + 16 - *(*Tuint64_t)(unsafe.Pointer(p7)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p7))) | Uint64FromUint64(1)< 0 { - uxi = Tuint64_t(uint64(uxi) - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) } - uxi |= uint64(uint64(sx)) << int32(63) + uxi |= uint64(sx) << int32(63) *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uxi return *(*float64)(unsafe.Pointer(bp + 8)) } @@ -106131,7 +106131,7 @@ func Xfmodf(tls *TLS, x float32, y float32) (r float32) { /* scale result up */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(uint32(ex)) << int32(23) + uxi |= uint32(ex) << int32(23) } else { uxi >>= uint32(-ex + int32(1)) } @@ -106145,7 +106145,7 @@ func Xfmodl(tls *TLS, x float64, y float64) (r float64) { trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xfmod(tls, float64(float64(x)), float64(float64(y)))) + return Xfmod(tls, x, y) } func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { @@ -106186,9 +106186,9 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) { } *(*int32)(unsafe.Pointer(e)) = ee - int32(0x3fe) p1 = bp - *(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p1))) & Uint64FromUint64(0x800fffffffffffff)) + *(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & Uint64FromUint64(0x800fffffffffffff) p2 = bp - *(*Tuint64_t)(unsafe.Pointer(p2)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p2))) | Uint64FromUint64(0x3fe0000000000000)) + *(*Tuint64_t)(unsafe.Pointer(p2)) = *(*Tuint64_t)(unsafe.Pointer(p2)) | Uint64FromUint64(0x3fe0000000000000) return *(*float64)(unsafe.Pointer(bp)) } @@ -106217,7 +106217,7 @@ func Xfrexpf(tls *TLS, x float32, e uintptr) (r float32) { ee = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if !(ee != 0) { if x != 0 { - x = Xfrexpf(tls, float32(float64(float64(x))*float64(1.8446744073709552e+19)), e) + x = Xfrexpf(tls, float32(float64(x)*float64(1.8446744073709552e+19)), e) *(*int32)(unsafe.Pointer(e)) -= int32(64) } else { *(*int32)(unsafe.Pointer(e)) = 0 @@ -106241,7 +106241,7 @@ func Xfrexpl(tls *TLS, x float64, e uintptr) (r float64) { trc("tls=%v x=%v e=%v, (%v:)", tls, x, e, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xfrexp(tls, float64(float64(x)), e)) + return Xfrexp(tls, x, e) } const SPLIT = 1 @@ -106301,9 +106301,9 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) { *(*float64)(unsafe.Pointer(bp + 8)) = y /* arrange |x| >= |y| */ p1 = bp - *(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p1))) & (-Uint64FromUint64(1) >> Int32FromInt32(1))) + *(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (-Uint64FromUint64(1) >> Int32FromInt32(1)) p2 = bp + 8 - *(*Tuint64_t)(unsafe.Pointer(p2)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p2))) & (-Uint64FromUint64(1) >> Int32FromInt32(1))) + *(*Tuint64_t)(unsafe.Pointer(p2)) = *(*Tuint64_t)(unsafe.Pointer(p2)) & (-Uint64FromUint64(1) >> Int32FromInt32(1)) if *(*Tuint64_t)(unsafe.Pointer(bp)) < *(*Tuint64_t)(unsafe.Pointer(bp + 8)) { ut = *(*struct { Fi [0]Tuint64_t @@ -106433,7 +106433,7 @@ func Xhypotf(tls *TLS, x float32, y float32) (r float32) { y *= Float32FromFloat32(1.2379400392853803e+27) } } - return z * Xsqrtf(tls, float32(float64(float64(x))*float64(float64(x))+float64(float64(y))*float64(float64(y)))) + return z * Xsqrtf(tls, float32(float64(x)*float64(x)+float64(y)*float64(y))) } func Xhypotl(tls *TLS, x float64, y float64) (r float64) { @@ -106441,12 +106441,12 @@ func Xhypotl(tls *TLS, x float64, y float64) (r float64) { trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xhypot(tls, float64(float64(x)), float64(float64(y)))) + return Xhypot(tls, x, y) } -func Xilogb(tls *TLS, x float64) (r int32) { +func Xilogb(tls *TLS, x3 float64) (r int32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -106467,7 +106467,7 @@ func Xilogb(tls *TLS, x float64) (r int32) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 i = *(*Tuint64_t)(unsafe.Pointer(bp)) e = int32(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { @@ -106518,9 +106518,9 @@ func Xilogb(tls *TLS, x float64) (r int32) { return e - int32(0x3ff) } -func Xilogbf(tls *TLS, x float32) (r int32) { +func Xilogbf(tls *TLS, x3 float32) (r int32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -106541,7 +106541,7 @@ func Xilogbf(tls *TLS, x float32) (r int32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) e = int32(i >> int32(23) & uint32(0xff)) if !(e != 0) { @@ -106597,7 +106597,7 @@ func Xilogbl(tls *TLS, x float64) (r int32) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return Xilogb(tls, float64(float64(x))) + return Xilogb(tls, x) } var _invsqrtpi = float64(0.5641895835477563) /* 0x3FE20DD7, 0x50429B6D */ @@ -106714,7 +106714,7 @@ func Xy0(tls *TLS, x float64) (r float64) { _, _, _, _, _, _ = __u, ix, lx, u, v, z __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) - lx = uint32(uint32(__u)) + lx = uint32(__u) /* y0(nan)=nan, y0(<0)=nan, y0(0)=-inf, y0(inf)=0 */ if ix<> int32(32)) - lx = uint32(uint32(__u)) + lx = uint32(__u) /* y1(nan)=nan, y1(<0)=nan, y1(0)=-inf, y1(inf)=0 */ if ix<> int32(32)) - lx = uint32(uint32(__u)) + lx = uint32(__u) sign = int32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ @@ -108003,7 +108003,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { if ix|lx == uint32(0) || ix == uint32(0x7ff00000) { /* if x is 0 or inf */ b = float64(0) } else { - if float64(float64(nm1)) < x { + if float64(nm1) < x { /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */ if ix >= uint32(0x52d00000) { /* x > 2**302 */ /* (x >> n**2) @@ -108043,7 +108043,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { } i++ temp = b - b = b*(float64(2)*float64(float64(i))/x) - a /* avoid underflow */ + b = b*(float64(2)*float64(i)/x) - a /* avoid underflow */ a = temp goto _1 _1: @@ -108065,8 +108065,8 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { if !(i <= nm1+int32(1)) { break } - a *= float64(float64(i)) /* a = n! */ - b *= temp /* b = (x/2)^n */ + a *= float64(i) /* a = n! */ + b *= temp /* b = (x/2)^n */ goto _2 _2: ; @@ -108075,7 +108075,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { b = b / a } } else { - nf = float64(float64(nm1)) + float64(1) + nf = float64(nm1) + float64(1) w = Float64FromInt32(2) * nf / x h = Float64FromInt32(2) / x z = w + h @@ -108095,7 +108095,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { if !(i >= 0) { break } - t = Float64FromInt32(1) / (Float64FromInt32(2)*(float64(float64(i))+nf)/x - t) + t = Float64FromInt32(1) / (Float64FromInt32(2)*(float64(i)+nf)/x - t) goto _3 _3: ; @@ -108119,7 +108119,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { break } temp = b - b = b*(float64(2)*float64(float64(i)))/x - a + b = b*(float64(2)*float64(i))/x - a a = temp goto _4 _4: @@ -108133,7 +108133,7 @@ func Xjn(tls *TLS, n int32, x float64) (r float64) { break } temp = b - b = b*(float64(2)*float64(float64(i)))/x - a + b = b*(float64(2)*float64(i))/x - a a = temp /* scale b to avoid spurious overflow */ if b > float64(3.273390607896142e+150) { @@ -108177,7 +108177,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { _, _, _, _, _, _, _, _, _, _, _, _ = __u, a, b, i, ib, ix, lx, nm1, sign, temp, v1, v3 __u = *(*Tuint64_t)(unsafe.Pointer(&x)) ix = uint32(__u >> int32(32)) - lx = uint32(uint32(__u)) + lx = uint32(__u) sign = int32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix|(lx|-lx)>>int32(31) > uint32(0x7ff00000) { /* nan */ @@ -108247,7 +108247,7 @@ func Xyn(tls *TLS, n int32, x float64) (r float64) { } i++ temp = b - b = float64(2)*float64(float64(i))/x*b - a + b = float64(2)*float64(i)/x*b - a ib = uint32(*(*Tuint64_t)(unsafe.Pointer(&b)) >> int32(32)) a = temp goto _2 @@ -108296,7 +108296,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { if ix == uint32(0) || ix == uint32(0x7f800000) { /* if x is 0 or inf */ b = Float32FromFloat32(0) } else { - if float32(float32(nm1)) < x { + if float32(nm1) < x { /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */ a = Xj0f(tls, x) b = Xj1f(tls, x) @@ -108307,7 +108307,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { } i++ temp = b - b = b*(Float32FromFloat32(2)*float32(float32(i))/x) - a + b = b*(Float32FromFloat32(2)*float32(i)/x) - a a = temp goto _1 _1: @@ -108328,8 +108328,8 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { if !(i <= nm1+int32(1)) { break } - a *= float32(float32(i)) /* a = n! */ - b *= temp /* b = (x/2)^n */ + a *= float32(i) /* a = n! */ + b *= temp /* b = (x/2)^n */ goto _2 _2: ; @@ -108337,7 +108337,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { } b = b / a } else { - nf = float32(float32(nm1)) + Float32FromFloat32(1) + nf = float32(nm1) + Float32FromFloat32(1) w = Float32FromInt32(2) * nf / x h = Float32FromInt32(2) / x z = w + h @@ -108357,7 +108357,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { if !(i >= 0) { break } - t = Float32FromFloat32(1) / (Float32FromInt32(2)*(float32(float32(i))+nf)/x - t) + t = Float32FromFloat32(1) / (Float32FromInt32(2)*(float32(i)+nf)/x - t) goto _3 _3: ; @@ -108381,7 +108381,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { break } temp = b - b = Float32FromFloat32(2)*float32(float32(i))*b/x - a + b = Float32FromFloat32(2)*float32(i)*b/x - a a = temp goto _4 _4: @@ -108395,7 +108395,7 @@ func Xjnf(tls *TLS, n int32, x float32) (r float32) { break } temp = b - b = Float32FromFloat32(2)*float32(float32(i))*b/x - a + b = Float32FromFloat32(2)*float32(i)*b/x - a a = temp /* scale b to avoid spurious overflow */ if b > Float32FromFloat32(1.152921504606847e+18) { @@ -108477,7 +108477,7 @@ func Xynf(tls *TLS, n int32, x float32) (r float32) { } i++ temp = b - b = Float32FromFloat32(2)*float32(float32(i))/x*b - a + b = Float32FromFloat32(2)*float32(i)/x*b - a ib = *(*Tuint32_t)(unsafe.Pointer(&b)) a = temp goto _2 @@ -108597,7 +108597,7 @@ func _sin_pi(tls *TLS, x float64) (r float64) { x = float64(2) * (x*float64(0.5) - Xfloor(tls, x*float64(0.5))) /* x mod 2.0 */ n = int32(x * Float64FromFloat64(4)) n = (n + int32(1)) / int32(2) - x -= float64(float32(float32(n)) * Float32FromFloat32(0.5)) + x -= float64(float32(n) * Float32FromFloat32(0.5)) x *= _pi2 switch n { default: /* case 4: */ @@ -108720,8 +108720,8 @@ func X__lgamma_r(tls *TLS, x float64, signgamp uintptr) (r1 float64) { } } else { if ix < uint32(0x40200000) { /* x < 8.0 */ - i = int32(int32(x)) - y = x - float64(float64(i)) + i = int32(x) + y = x - float64(i) p = y * (_s0 + y*(_s1+y*(_s2+y*(_s3+y*(_s4+y*(_s5+y*_s6)))))) q = float64(1) + y*(_r1+y*(_r2+y*(_r3+y*(_r4+y*(_r5+y*_r6))))) r = float64(0.5)*y + p/q @@ -108854,7 +108854,7 @@ func _sin_pi1(tls *TLS, x float32) (r float32) { x = Float32FromInt32(2) * (x*Float32FromFloat32(0.5) - Xfloorf(tls, x*Float32FromFloat32(0.5))) /* x mod 2.0 */ n = int32(x * Float32FromInt32(4)) n = (n + int32(1)) / int32(2) - y = float64(x - float32(float32(n))*Float32FromFloat32(0.5)) + y = float64(x - float32(n)*Float32FromFloat32(0.5)) y *= float64(3.141592653589793) switch n { default: /* case 4: */ @@ -108977,8 +108977,8 @@ func X__lgammaf_r(tls *TLS, x float32, signgamp uintptr) (r1 float32) { } } else { if ix < uint32(0x41000000) { /* x < 8.0 */ - i = int32(int32(x)) - y = x - float32(float32(i)) + i = int32(x) + y = x - float32(i) p = y * (_s06 + y*(_s11+y*(_s21+y*(_s31+y*(_s41+y*(_s51+y*_s61)))))) q = Float32FromFloat32(1) + y*(_r11+y*(_r21+y*(_r31+y*(_r41+y*(_r51+y*_r61))))) r = Float32FromFloat32(0.5)*y + p/q @@ -109033,7 +109033,7 @@ func X__lgammal_r(tls *TLS, x float64, sg uintptr) (r float64) { trc("tls=%v x=%v sg=%v, (%v:)", tls, x, sg, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(X__lgamma_r(tls, float64(float64(x)), sg)) + return X__lgamma_r(tls, x, sg) } func Xlgammal(tls *TLS, x float64) (r float64) { @@ -109077,7 +109077,7 @@ func Xllrintl(tls *TLS, x float64) (r int64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return Xllrint(tls, float64(float64(x))) + return Xllrint(tls, x) } func Xllround(tls *TLS, x float64) (r int64) { @@ -109117,9 +109117,9 @@ func _top16(tls *TLS, x float64) (r Tuint32_t) { return uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(48)) } -func Xlog(tls *TLS, x float64) (r1 float64) { +func Xlog(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var hi, invc, kd, lo, logc, r, r2, r3, rhi, rlo, w, y1, z Tdouble_t @@ -109129,8 +109129,8 @@ func Xlog(tls *TLS, x float64) (r1 float64) { var y, v1, v10, v2, v3, v4, v6, v8, v9 float64 var v5 bool _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hi, i, invc, ix, iz, k, kd, lo, logc, r, r2, r3, rhi, rlo, tmp, top, w, y, y1, z, v1, v10, v2, v3, v4, v5, v6, v8, v9 - ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - top = _top16(tls, x) + ix = *(*Tuint64_t)(unsafe.Pointer(&x1)) + top = _top16(tls, x1) v1 = Float64FromFloat64(1) - Float64FromFloat64(0.0625) v2 = Float64FromFloat64(1) + Float64FromFloat64(0.064697265625) v3 = Float64FromFloat64(1) - Float64FromFloat64(0.0625) @@ -109143,7 +109143,7 @@ func Xlog(tls *TLS, x float64) (r1 float64) { if v5 && ix == *(*Tuint64_t)(unsafe.Pointer(&v4)) { return Float64FromInt32(0) } - r = x - float64(1) + r = x1 - float64(1) r2 = r * r r3 = r * r2 y1 = r3 * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 1*8)) + r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 2*8)) + r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 3*8)) + r3*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 4*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 5*8))+r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 6*8))+r3*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 7*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 8*8))+r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 9*8))+r3**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 10*8))))) @@ -109170,23 +109170,23 @@ func Xlog(tls *TLS, x float64) (r1 float64) { } v8 = float64(X__builtin_inff(tls)) if ix == *(*Tuint64_t)(unsafe.Pointer(&v8)) { /* log(inf) == inf. */ - return x + return x1 } if top&uint32(0x8000) != 0 || top&uint32(0x7ff0) == uint32(0x7ff0) { - return X__math_invalid(tls, x) + return X__math_invalid(tls, x1) } /* x is subnormal, normalize it. */ - v9 = x * float64(4.503599627370496e+15) + v9 = x1 * float64(4.503599627370496e+15) ix = *(*Tuint64_t)(unsafe.Pointer(&v9)) - ix = Tuint64_t(uint64(ix) - Uint64FromUint64(52)<> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ - iz = uint64(uint64(uint64(ix)) - uint64(uint64(tmp))&(Uint64FromUint64(0xfff)<> int32(52)) /* arithmetic shift */ + iz = ix - tmp&(Uint64FromUint64(0xfff)<>Int32FromInt32(20)) - int32(0x3ff) hx = hx&uint32(0x000fffff) + uint32(0x3fe6a09e) - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(uint64(hx))< %v", r) }() } - return float64(Xlog10(tls, float64(float64(x)))) + return Xlog10(tls, x) } var _ln2_hi2 = float64(0.6931471803691238) /* 3fe62e42 fee00000 */ @@ -109418,9 +109418,9 @@ var _Lg51 = float64(0.1818357216161805) /* 3FC74664 96CB03DE */ var _Lg61 = float64(0.15313837699209373) /* 3FC39A09 D078C69F */ var _Lg71 = float64(0.14798198605116586) /* 3FC2F112 DF3E5244 */ -func Xlog1p(tls *TLS, x float64) (r float64) { +func Xlog1p(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -109442,52 +109442,52 @@ func Xlog1p(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 hx = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) k = int32(1) if hx < uint32(0x3fda827a) || hx>>int32(31) != 0 { /* 1+x < sqrt(2)+ */ if hx >= uint32(0xbff00000) { /* x <= -1.0 */ - if x == float64(-Int32FromInt32(1)) { - return x / float64(0) + if x3 == float64(-Int32FromInt32(1)) { + return x3 / float64(0) } /* log1p(-1) = -inf */ - return (x - x) / float64(0) /* log1p(x<-1) = NaN */ + return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } if hx<= uint32(0x7ff00000) { - return x + return x3 } } if k != 0 { - *(*float64)(unsafe.Pointer(bp)) = Float64FromInt32(1) + x + *(*float64)(unsafe.Pointer(bp)) = Float64FromInt32(1) + x3 hu = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) k = int32(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) { - v1 = Float64FromInt32(1) - (*(*float64)(unsafe.Pointer(bp)) - x) + v1 = Float64FromInt32(1) - (*(*float64)(unsafe.Pointer(bp)) - x3) } else { - v1 = x - (*(*float64)(unsafe.Pointer(bp)) - Float64FromInt32(1)) + v1 = x3 - (*(*float64)(unsafe.Pointer(bp)) - Float64FromInt32(1)) } c = v1 c /= *(*float64)(unsafe.Pointer(bp)) @@ -109496,7 +109496,7 @@ func Xlog1p(tls *TLS, x float64) (r float64) { } /* reduce u into [sqrt(2)/2, sqrt(2)] */ hu = hu&uint32(0x000fffff) + uint32(0x3fe6a09e) - *(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(uint64(hu))< %v", r) }() } bp := tls.Alloc(16) @@ -109542,52 +109542,52 @@ func Xlog1pf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 ix = *(*Tuint32_t)(unsafe.Pointer(bp)) k = int32(1) if ix < uint32(0x3ed413d0) || ix>>int32(31) != 0 { /* 1+x < sqrt(2)+ */ if ix >= uint32(0xbf800000) { /* x <= -1.0 */ - if x == float32(-Int32FromInt32(1)) { - return x / Float32FromFloat32(0) + if x3 == float32(-Int32FromInt32(1)) { + return x3 / Float32FromFloat32(0) } /* log1p(-1)=+inf */ - return (x - x) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ + return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } if ix<= uint32(0x7f800000) { - return x + return x3 } } if k != 0 { - *(*float32)(unsafe.Pointer(bp)) = Float32FromInt32(1) + x + *(*float32)(unsafe.Pointer(bp)) = Float32FromInt32(1) + x3 iu = *(*Tuint32_t)(unsafe.Pointer(bp)) iu += uint32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) k = int32(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) { - v1 = Float32FromInt32(1) - (*(*float32)(unsafe.Pointer(bp)) - x) + v1 = Float32FromInt32(1) - (*(*float32)(unsafe.Pointer(bp)) - x3) } else { - v1 = x - (*(*float32)(unsafe.Pointer(bp)) - Float32FromInt32(1)) + v1 = x3 - (*(*float32)(unsafe.Pointer(bp)) - Float32FromInt32(1)) } c = v1 c /= *(*float32)(unsafe.Pointer(bp)) @@ -109606,7 +109606,7 @@ func Xlog1pf(tls *TLS, x float32) (r float32) { t2 = z * (_Lg13 + w*_Lg33) R = t2 + t1 hfsq = Float32FromFloat32(0.5) * f * f - dk = float32(float32(k)) + dk = float32(k) return s*(hfsq+R) + (dk*_ln2_lo3 + c) - hfsq + f + dk*_ln2_hi3 } @@ -109615,7 +109615,7 @@ func Xlog1pl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xlog1p(tls, float64(float64(x)))) + return Xlog1p(tls, x) } const LOG2_POLY1_ORDER = 11 @@ -109630,9 +109630,9 @@ func _top161(tls *TLS, x float64) (r Tuint32_t) { return uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(48)) } -func Xlog2(tls *TLS, x float64) (r1 float64) { +func Xlog2(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var hi, invc, kd, lo, logc, p, r, r2, r4, rhi, rhi1, rlo, rlo1, t1, t2, t3, y1, z Tdouble_t @@ -109642,8 +109642,8 @@ func Xlog2(tls *TLS, x float64) (r1 float64) { var y, v1, v10, v11, v13, v14, v2, v3, v4, v7, v8 float64 var v5 bool _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hi, i, invc, ix, iz, k, kd, lo, logc, p, r, r2, r4, rhi, rhi1, rlo, rlo1, t1, t2, t3, tmp, top, y, y1, z, v1, v10, v11, v12, v13, v14, v2, v3, v4, v5, v6, v7, v8 - ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - top = _top161(tls, x) + ix = *(*Tuint64_t)(unsafe.Pointer(&x1)) + top = _top161(tls, x1) v1 = Float64FromFloat64(1) - Float64FromFloat64(0.04239702224731445) v2 = Float64FromFloat64(1) + Float64FromFloat64(0.044274330139160156) v3 = Float64FromFloat64(1) - Float64FromFloat64(0.04239702224731445) @@ -109656,9 +109656,9 @@ func Xlog2(tls *TLS, x float64) (r1 float64) { if v5 && ix == *(*Tuint64_t)(unsafe.Pointer(&v4)) { return Float64FromInt32(0) } - r = x - float64(1) + r = x1 - float64(1) v7 = r - v6 = uint64(uint64(*(*Tuint64_t)(unsafe.Pointer(&v7))) & (-Uint64FromUint64(1) << Int32FromInt32(32))) + v6 = *(*Tuint64_t)(unsafe.Pointer(&v7)) & (-Uint64FromUint64(1) << Int32FromInt32(32)) rhi = *(*float64)(unsafe.Pointer(&v6)) rlo = r - rhi hi = rhi * X__log2_data.Finvln2hi @@ -109684,23 +109684,23 @@ func Xlog2(tls *TLS, x float64) (r1 float64) { } v10 = float64(X__builtin_inff(tls)) if ix == *(*Tuint64_t)(unsafe.Pointer(&v10)) { /* log(inf) == inf. */ - return x + return x1 } if top&uint32(0x8000) != 0 || top&uint32(0x7ff0) == uint32(0x7ff0) { - return X__math_invalid(tls, x) + return X__math_invalid(tls, x1) } /* x is subnormal, normalize it. */ - v11 = x * float64(4.503599627370496e+15) + v11 = x1 * float64(4.503599627370496e+15) ix = *(*Tuint64_t)(unsafe.Pointer(&v11)) - ix = Tuint64_t(uint64(ix) - Uint64FromUint64(52)<> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ - iz = uint64(uint64(uint64(ix)) - uint64(uint64(tmp))&(Uint64FromUint64(0xfff)<> int32(52)) /* arithmetic shift */ + iz = ix - tmp&(Uint64FromUint64(0xfff)< %v", r1) }() } var i, k int32 @@ -109782,7 +109782,7 @@ func Xlog2f(tls *TLS, x float32) (r1 float32) { var ix, iz, tmp, top Tuint32_t var y, v1, v2 float32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, invc, ix, iz, k, logc, p, r, r2, tmp, top, y, y0, y1, z, v1, v2 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) /* Fix sign of zero with downward rounding when x==1. */ if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) @@ -109793,13 +109793,13 @@ func Xlog2f(tls *TLS, x float32) (r1 float32) { return X__math_divzerof(tls, uint32(1)) } if ix == uint32(0x7f800000) { /* log2(inf) == inf. */ - return x + return x1 } if ix&uint32(0x80000000) != 0 || ix*uint32(2) >= uint32(0xff000000) { - return X__math_invalidf(tls, x) + return X__math_invalidf(tls, x1) } /* x is subnormal, normalize it. */ - v1 = x * Float32FromFloat32(8.388608e+06) + v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) } @@ -109810,7 +109810,7 @@ func Xlog2f(tls *TLS, x float32) (r1 float32) { i = int32(tmp >> (Int32FromInt32(23) - Int32FromInt32(LOG2F_TABLE_BITS)) % uint32(Int32FromInt32(1)<> int32(23) /* arithmetic shift */ + k = int32(tmp) >> int32(23) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -109822,14 +109822,14 @@ func Xlog2f(tls *TLS, x float32) (r1 float32) { z = float64(*(*float32)(unsafe.Pointer(&iz))) /* log2(x) = log1p(z/c-1)/ln2 + log2(c) + k */ r = z*invc - Float64FromInt32(1) - y0 = logc + float64(float64(k)) + y0 = logc + float64(k) /* Pipelined polynomial evaluation to approximate log1p(r)/ln2. */ r2 = r * r y1 = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log2f_data)) + 256 + 1*8))*r + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log2f_data)) + 256 + 2*8)) y1 = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log2f_data)) + 256))*r2 + y1 p = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log2f_data)) + 256 + 3*8))*r + y0 y1 = y1*r2 + p - y = float32(float32(y1)) + y = float32(y1) v2 = y goto _3 _3: @@ -109849,7 +109849,7 @@ func Xlog2l(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xlog2(tls, float64(float64(x)))) + return Xlog2(tls, x) } const N7 = 128 @@ -109941,7 +109941,7 @@ func Xlogbl(tls *TLS, x float64) (r float64) { F__f float64 } _ = v1 - *(*float64)(unsafe.Pointer(bp)) = float64(float64(x)) + *(*float64)(unsafe.Pointer(bp)) = x v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: @@ -109966,9 +109966,9 @@ ULP error: 0.818 (nearest rounding.) Relative error: 1.957 * 2^-26 (before rounding.) */ -func Xlogf(tls *TLS, x float32) (r1 float32) { +func Xlogf(tls *TLS, x1 float32) (r1 float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var i, k int32 @@ -109976,7 +109976,7 @@ func Xlogf(tls *TLS, x float32) (r1 float32) { var ix, iz, tmp Tuint32_t var y, v1, v2 float32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, invc, ix, iz, k, logc, r, r2, tmp, y, y0, y1, z, v1, v2 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) /* Fix sign of zero with downward rounding when x==1. */ if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) @@ -109987,13 +109987,13 @@ func Xlogf(tls *TLS, x float32) (r1 float32) { return X__math_divzerof(tls, uint32(1)) } if ix == uint32(0x7f800000) { /* log(inf) == inf. */ - return x + return x1 } if ix&uint32(0x80000000) != 0 || ix*uint32(2) >= uint32(0xff000000) { - return X__math_invalidf(tls, x) + return X__math_invalidf(tls, x1) } /* x is subnormal, normalize it. */ - v1 = x * Float32FromFloat32(8.388608e+06) + v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) } @@ -110002,7 +110002,7 @@ func Xlogf(tls *TLS, x float32) (r1 float32) { 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 */ + k = int32(tmp) >> int32(23) /* arithmetic shift */ iz = ix - tmp&uint32(0xff800000) invc = (*(*struct { Finvc float64 @@ -110015,13 +110015,13 @@ func Xlogf(tls *TLS, x float32) (r1 float32) { z = float64(*(*float32)(unsafe.Pointer(&iz))) /* log(x) = log1p(z/c-1) + log(c) + k*Ln2 */ r = z*invc - Float64FromInt32(1) - y0 = logc + float64(float64(k))*X__logf_data.Fln2 + y0 = logc + float64(k)*X__logf_data.Fln2 /* Pipelined polynomial evaluation to approximate log1p(r). */ r2 = r * r y1 = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__logf_data)) + 264 + 1*8))*r + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__logf_data)) + 264 + 2*8)) y1 = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__logf_data)) + 264))*r2 + y1 y1 = y1*r2 + (y0 + r) - y = float32(float32(y1)) + y = float32(y1) v2 = y goto _3 _3: @@ -110042,7 +110042,7 @@ func Xlogl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xlog(tls, float64(float64(x)))) + return Xlog(tls, x) } /* @@ -110091,7 +110091,7 @@ func Xlrintl(tls *TLS, x float64) (r int64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return Xlrint(tls, float64(float64(x))) + return Xlrint(tls, x) } func Xlround(tls *TLS, x float64) (r int64) { @@ -110149,21 +110149,21 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) { return x } p1 = bp - *(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p1))) & (Uint64FromUint64(1) << Int32FromInt32(63))) + *(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (Uint64FromUint64(1) << Int32FromInt32(63)) return *(*float64)(unsafe.Pointer(bp)) } /* no integral part*/ if e < 0 { p2 = bp - *(*Tuint64_t)(unsafe.Pointer(p2)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p2))) & (Uint64FromUint64(1) << Int32FromInt32(63))) + *(*Tuint64_t)(unsafe.Pointer(p2)) = *(*Tuint64_t)(unsafe.Pointer(p2)) & (Uint64FromUint64(1) << Int32FromInt32(63)) *(*float64)(unsafe.Pointer(iptr)) = *(*float64)(unsafe.Pointer(bp)) return x } - mask = uint64(-Uint64FromUint64(1) >> Int32FromInt32(12) >> e) + mask = -Uint64FromUint64(1) >> Int32FromInt32(12) >> e if *(*Tuint64_t)(unsafe.Pointer(bp))&mask == uint64(0) { *(*float64)(unsafe.Pointer(iptr)) = x p3 = bp - *(*Tuint64_t)(unsafe.Pointer(p3)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p3))) & (Uint64FromUint64(1) << Int32FromInt32(63))) + *(*Tuint64_t)(unsafe.Pointer(p3)) = *(*Tuint64_t)(unsafe.Pointer(p3)) & (Uint64FromUint64(1) << Int32FromInt32(63)) return *(*float64)(unsafe.Pointer(bp)) } *(*Tuint64_t)(unsafe.Pointer(bp)) &= ^mask @@ -110230,8 +110230,8 @@ func Xmodfl(tls *TLS, x float64, iptr uintptr) (r1 float64) { var r float64 var _ /* d at bp+0 */ float64 _ = r - r = float64(Xmodf(tls, float64(float64(x)), bp)) - *(*float64)(unsafe.Pointer(iptr)) = float64(*(*float64)(unsafe.Pointer(bp))) + r = Xmodf(tls, x, bp) + *(*float64)(unsafe.Pointer(iptr)) = *(*float64)(unsafe.Pointer(bp)) return r } @@ -110259,9 +110259,9 @@ func Xnanl(tls *TLS, s uintptr) (r float64) { return float64(X__builtin_nanf(tls, __ccgo_ts)) } -func Xnextafter(tls *TLS, x float64, y3 float64) (r float64) { +func Xnextafter(tls *TLS, x3 float64, y3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v y3=%v, (%v:)", tls, x, y3, origin(2)) + trc("tls=%v x3=%v y3=%v, (%v:)", tls, x3, y3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(32) @@ -110292,7 +110292,7 @@ func Xnextafter(tls *TLS, x float64, y3 float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp + 8)) = x + *(*float64)(unsafe.Pointer(bp + 8)) = x3 *(*struct { Fi [0]Tuint64_t Ff float64 @@ -110301,7 +110301,7 @@ func Xnextafter(tls *TLS, x float64, y3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y3 - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: @@ -110313,20 +110313,20 @@ _2: _4: } if v5 || BoolInt32(v3&(-Uint64FromUint64(1)>>Int32FromInt32(1)) > Uint64FromUint64(0x7ff)< ay || uint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8))^*(*Tuint64_t)(unsafe.Pointer(bp + 16)))&(Uint64FromUint64(1)< ay || (*(*Tuint64_t)(unsafe.Pointer(bp + 8))^*(*Tuint64_t)(unsafe.Pointer(bp + 16)))&(Uint64FromUint64(1)< %v", r) }() } bp := tls.Alloc(16) @@ -110392,7 +110392,7 @@ func Xnextafterf(tls *TLS, x float32, y3 float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp + 4)) = x + *(*float32)(unsafe.Pointer(bp + 4)) = x3 *(*struct { Fi [0]Tuint32_t Ff float32 @@ -110401,7 +110401,7 @@ func Xnextafterf(tls *TLS, x float32, y3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y3 - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: @@ -110413,7 +110413,7 @@ _2: _4: } if v5 || BoolInt32(v3&uint32(0x7fffffff) > uint32(0x7f800000)) != 0 { - return x + y3 + return x3 + y3 } if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == *(*Tuint32_t)(unsafe.Pointer(bp + 8)) { return y3 @@ -110436,24 +110436,24 @@ _2: /* raise overflow if ux.f is infinite and x is finite */ if e == uint32(0x7f800000) { if uint64(4) == uint64(4) { - y = x + x + y = x3 + x3 } else { if uint64(4) == uint64(8) { - y1 = float64(x + x) + y1 = float64(x3 + x3) } else { - y2 = float64(x + x) + y2 = float64(x3 + x3) } } } /* raise underflow if ux.f is subnormal or zero */ if e == uint32(0) { if uint64(4) == uint64(4) { - y = x*x + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4)) + y = x3*x3 + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4)) } else { if uint64(4) == uint64(8) { - y1 = float64(x*x + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4))) + y1 = float64(x3*x3 + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4))) } else { - y2 = float64(x*x + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4))) + y2 = float64(x3*x3 + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4))) } } } @@ -110465,7 +110465,7 @@ func Xnextafterl(tls *TLS, x float64, y float64) (r float64) { trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xnextafter(tls, float64(float64(x)), float64(float64(y)))) + return Xnextafter(tls, x, y) } func Xnexttoward(tls *TLS, x float64, y float64) (r float64) { @@ -110473,12 +110473,12 @@ func Xnexttoward(tls *TLS, x float64, y float64) (r float64) { trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2)) defer func() { trc("-> %v", r) }() } - return Xnextafter(tls, x, float64(float64(y))) + return Xnextafter(tls, x, y) } -func Xnexttowardf(tls *TLS, x float32, y3 float64) (r float32) { +func Xnexttowardf(tls *TLS, x3 float32, y3 float64) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v y3=%v, (%v:)", tls, x, y3, origin(2)) + trc("tls=%v x3=%v y3=%v, (%v:)", tls, x3, y3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(32) @@ -110509,27 +110509,27 @@ func Xnexttowardf(tls *TLS, x float32, y3 float64) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp + 16)) = x - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp + 16)) = x3 + *(*float32)(unsafe.Pointer(bp)) = x3 v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: ; if v5 = BoolInt32(v1&uint32(0x7fffffff) > uint32(0x7f800000)) != 0; !v5 { - *(*float64)(unsafe.Pointer(bp + 8)) = float64(float64(y3)) + *(*float64)(unsafe.Pointer(bp + 8)) = y3 v3 = *(*uint64)(unsafe.Pointer(bp + 8)) goto _4 _4: } if v5 || BoolInt32(v3&(-Uint64FromUint64(1)>>Int32FromInt32(1)) > Uint64FromUint64(0x7ff)<> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % uint64(Int32FromInt32(1)<> int32(52)) /* arithmetic shift */ - iz = uint64(uint64(uint64(ix)) - uint64(uint64(tmp))&(Uint64FromUint64(0xfff)<> int32(52)) /* arithmetic shift */ + iz = ix - tmp&(Uint64FromUint64(0xfff)< 0, the exponent of scale might have overflowed by <= 460. */ - sbits = Tuint64_t(uint64(sbits) - Uint64FromUint64(1009)<= _top124(tls, float64(512))-_top124(tls, float64(5.551115123125783e-17)) { if abstop-_top124(tls, float64(5.551115123125783e-17)) >= uint32(0x80000000) { /* Avoid spurious underflow for tiny x. */ /* Note: 0 is common input. */ - one = float64(1) + x + one = float64(1) + x1 if sign_bias != 0 { v1 = -one } else { @@ -110770,7 +110770,7 @@ func _exp_inline(tls *TLS, x Tdouble_t, xtail Tdouble_t, sign_bias Tuint32_t) (r } if abstop >= _top124(tls, float64(1024)) { /* Note: inf and nan are already handled. */ - v2 = x + v2 = x1 if *(*Tuint64_t)(unsafe.Pointer(&v2))>>int32(63) != 0 { return X__math_uflow(tls, sign_bias) } else { @@ -110782,7 +110782,7 @@ func _exp_inline(tls *TLS, x Tdouble_t, xtail Tdouble_t, sign_bias Tuint32_t) (r } /* exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)]. */ /* x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N]. */ - z = X__exp_data.Finvln2N * x + z = X__exp_data.Finvln2N * x1 /* z - kd is in [-1, 1] in non-nearest rounding modes. */ y = z + X__exp_data.Fshift v3 = y @@ -110792,12 +110792,12 @@ _4: v5 = kd ki = *(*Tuint64_t)(unsafe.Pointer(&v5)) kd -= X__exp_data.Fshift - r = x + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN + r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* The code assumes 2^-200 < |xtail| < 2^-8/N. */ r += xtail /* 2^(k/N) ~= scale * (1 + tail). */ idx = uint64(2) * (ki % uint64(Int32FromInt32(1)< Int32FromInt32(0x3ff)+Int32FromInt32(52) { return int32(2) } - if uint64(uint64(iy))&(uint64(1)<<(Int32FromInt32(0x3ff)+Int32FromInt32(52)-e)-uint64(1)) != 0 { + if iy&(uint64(1)<<(Int32FromInt32(0x3ff)+Int32FromInt32(52)-e)-uint64(1)) != 0 { return 0 } - if uint64(uint64(iy))&(uint64(1)<<(Int32FromInt32(0x3ff)+Int32FromInt32(52)-e)) != 0 { + if iy&(uint64(1)<<(Int32FromInt32(0x3ff)+Int32FromInt32(52)-e)) != 0 { return int32(1) } return int32(2) @@ -110854,9 +110854,9 @@ func _zeroinfnan(tls *TLS, i Tuint64_t) (r int32) { return BoolInt32(uint64(2)*i-uint64(1) >= uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v1))-uint64(1)) } -func Xpow(tls *TLS, x float64, y1 float64) (r float64) { +func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v y1=%v, (%v:)", tls, x, y1, origin(2)) + trc("tls=%v x1=%v y1=%v, (%v:)", tls, x1, y1, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -110870,9 +110870,9 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { var _ /* lo at bp+0 */ Tdouble_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = ehi, elo, hi, ix, iy, lhi, llo, sign_bias, topx, topy, x2, y, yhi, yint, ylo, v1, v10, v11, v12, v13, v14, v15, v16, v17, v18, v2, v3, v4, v5, v6, v7, v8 sign_bias = uint32(0) - ix = *(*Tuint64_t)(unsafe.Pointer(&x)) + ix = *(*Tuint64_t)(unsafe.Pointer(&x1)) iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) - topx = _top124(tls, x) + 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)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 @@ -110892,7 +110892,7 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { v3 = float64(X__builtin_inff(tls)) } if v4 || uint64(2)*iy > uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v3)) { - return x + y1 + return x1 + y1 } v5 = float64(1) if uint64(2)*ix == uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v5)) { @@ -110905,7 +110905,7 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { return y1 * y1 } if _zeroinfnan(tls, ix) != 0 { - x2 = x * x + x2 = x1 * x1 if ix>>int32(63) != 0 && _checkint(tls, iy) == int32(1) { x2 = -x2 } @@ -110927,7 +110927,7 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { /* Finite x < 0. */ yint = _checkint(tls, iy) if yint == 0 { - return X__math_invalid(tls, x) + return X__math_invalid(tls, x1) } if yint == int32(1) { sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) @@ -110965,18 +110965,18 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { } if topx == uint32(0) { /* Normalize subnormal x so exponent becomes negative. */ - v15 = x * float64(4.503599627370496e+15) + v15 = x1 * float64(4.503599627370496e+15) ix = *(*Tuint64_t)(unsafe.Pointer(&v15)) ix &= uint64(0x7fffffffffffffff) - ix = Tuint64_t(uint64(ix) - Uint64FromUint64(52)<> (Int32FromInt32(23) - Int32FromInt32(POWF_LOG2_TABLE_BITS)) % uint32(Int32FromInt32(1)<> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ + k = int32(top) >> (Int32FromInt32(23) - Int32FromInt32(POWF_SCALE_BITS)) /* arithmetic shift */ invc = (*(*struct { Finvc float64 Flogc float64 @@ -111042,7 +111042,7 @@ func _log2_inline(tls *TLS, ix Tuint32_t) (r1 Tdouble_t) { z = float64(*(*float32)(unsafe.Pointer(&iz))) /* log2(x) = log1p(z/c-1)/ln2 + log2(c) + k */ r = z*invc - Float64FromInt32(1) - y0 = logc + float64(float64(k)) + y0 = logc + float64(k) /* Pipelined polynomial evaluation to approximate log1p(r)/ln2. */ r2 = r * r y = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__powf_log2_data)) + 256))*r + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__powf_log2_data)) + 256 + 1*8)) @@ -111077,7 +111077,7 @@ _2: 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)<= Uint32FromUint32(2)*Uint32FromInt32(0x7f800000)-Uint32FromInt32(1)) } -func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { +func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v y1=%v, (%v:)", tls, x, y1, origin(2)) + trc("tls=%v x1=%v y1=%v, (%v:)", tls, x1, y1, origin(2)) defer func() { trc("-> %v", r) }() } var ix, iy, sign_bias Tuint32_t @@ -111132,7 +111132,7 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { var v5, v6 float64 _, _, _, _, _, _, _, _, _, _, _, _, _ = ix, iy, logx, sign_bias, x2, y, yint, ylogx, v1, v2, v4, v5, v6 sign_bias = uint32(0) - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + 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 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ @@ -111144,7 +111144,7 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { return Float32FromFloat32(1) } if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { - return x + y1 + return x1 + y1 } if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) @@ -111155,7 +111155,7 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { return y1 * y1 } if _zeroinfnan1(tls, ix) != 0 { - x2 = x * x + x2 = x1 * x1 if ix&uint32(0x80000000) != 0 && _checkint1(tls, iy) == int32(1) { x2 = -x2 } @@ -111177,7 +111177,7 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { /* Finite x < 0. */ yint = _checkint1(tls, iy) if yint == 0 { - return X__math_invalidf(tls, x) + return X__math_invalidf(tls, x1) } if yint == int32(1) { sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) @@ -111186,14 +111186,14 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { } if ix < uint32(0x00800000) { /* Normalize subnormal x so exponent becomes negative. */ - v4 = x * Float32FromFloat32(8.388608e+06) + v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) } } logx = _log2_inline(tls, ix) - ylogx = float64(float64(y1)) * logx /* cannot overflow, y is single prec. */ + ylogx = float64(y1) * logx /* cannot overflow, y is single prec. */ v5 = ylogx v6 = float64(126) * float64(Int32FromInt32(1)<>int32(47)&uint64(0xffff) >= *(*Tuint64_t)(unsafe.Pointer(&v6))>>int32(47) { @@ -111221,7 +111221,7 @@ func Xpowl(tls *TLS, x float64, y float64) (r float64) { trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xpow(tls, float64(float64(x)), float64(float64(y)))) + return Xpow(tls, x, y) } func Xremainder(tls *TLS, x float64, y float64) (r float64) { @@ -111267,7 +111267,7 @@ func Xremainderl(tls *TLS, x float64, y float64) (r float64) { trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xremainder(tls, float64(float64(x)), float64(float64(y)))) + return Xremainder(tls, x, y) } func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { @@ -111346,8 +111346,8 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) { } uxi <<= uint64(-ex + int32(1)) } else { - uxi = Tuint64_t(uint64(uxi) & (-Uint64FromUint64(1) >> Int32FromInt32(12))) - uxi = Tuint64_t(uint64(uxi) | Uint64FromUint64(1)<> Int32FromInt32(12)) + uxi = uxi | Uint64FromUint64(1)<> Int32FromInt32(12))) + *(*Tuint64_t)(unsafe.Pointer(p6)) = *(*Tuint64_t)(unsafe.Pointer(p6)) & (-Uint64FromUint64(1) >> Int32FromInt32(12)) p7 = bp + 16 - *(*Tuint64_t)(unsafe.Pointer(p7)) = Tuint64_t(uint64(*(*Tuint64_t)(unsafe.Pointer(p7))) | Uint64FromUint64(1)< 0 { - uxi = Tuint64_t(uint64(uxi) - Uint64FromUint64(1)<>= uint64(-ex + int32(1)) } @@ -111431,9 +111431,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v10 = -int32(int32(q)) + v10 = -int32(q) } else { - v10 = int32(int32(q)) + v10 = int32(q) } *(*int32)(unsafe.Pointer(quo)) = v10 if sx != 0 { @@ -111586,7 +111586,7 @@ end: /* scale result and decide between |x| and |x|-|y| */ if ex > 0 { uxi -= Uint32FromUint32(1) << Int32FromInt32(23) - uxi |= uint32(uint32(ex)) << int32(23) + uxi |= uint32(ex) << int32(23) } else { uxi >>= uint32(-ex + int32(1)) } @@ -111601,9 +111601,9 @@ end: } q &= uint32(0x7fffffff) if sx^sy != 0 { - v8 = -int32(int32(q)) + v8 = -int32(q) } else { - v8 = int32(int32(q)) + v8 = int32(q) } *(*int32)(unsafe.Pointer(quo)) = v8 if sx != 0 { @@ -111619,7 +111619,7 @@ func Xremquol(tls *TLS, x float64, y float64, quo uintptr) (r float64) { trc("tls=%v x=%v y=%v quo=%v, (%v:)", tls, x, y, quo, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xremquo(tls, float64(float64(x)), float64(float64(y)), quo)) + return Xremquo(tls, x, y, quo) } const DBL_EPSILON9 = 2.220446049250313e-16 @@ -111726,16 +111726,16 @@ func Xrintl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xrint(tls, float64(float64(x)))) + return Xrint(tls, x) } const DBL_EPSILON11 = 2.220446049250313e-16 var _toint6 = Float64FromInt32(1) / Float64FromFloat64(2.220446049250313e-16) -func Xround(tls *TLS, x float64) (r float64) { +func Xround(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -111756,35 +111756,35 @@ func Xround(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { - return x + return x3 } if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { - x = -x + x3 = -x3 } if e < Int32FromInt32(0x3ff)-Int32FromInt32(1) { /* raise inexact if x!=0 */ if uint64(8) == uint64(4) { - y = float32(x + _toint6) + y = float32(x3 + _toint6) } else { if uint64(8) == uint64(8) { - y1 = x + _toint6 + y1 = x3 + _toint6 } else { - y2 = float64(x + _toint6) + y2 = x3 + _toint6 } } return Float64FromInt32(0) * *(*float64)(unsafe.Pointer(bp)) } - y3 = x + _toint6 - _toint6 - x + y3 = x3 + _toint6 - _toint6 - x3 if y3 > float64(0.5) { - y3 = y3 + x - Float64FromInt32(1) + y3 = y3 + x3 - Float64FromInt32(1) } else { if y3 <= -Float64FromFloat64(0.5) { - y3 = y3 + x + Float64FromInt32(1) + y3 = y3 + x3 + Float64FromInt32(1) } else { - y3 = y3 + x + y3 = y3 + x3 } } if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { @@ -111798,9 +111798,9 @@ const FLT_EPSILON3 = 1.1920928955078125e-07 var _toint7 = Float32FromInt32(1) / Float32FromFloat32(1.1920928955078125e-07) -func Xroundf(tls *TLS, x float32) (r float32) { +func Xroundf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -111821,34 +111821,34 @@ func Xroundf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { - return x + return x3 } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) != 0 { - x = -x + x3 = -x3 } if e < Int32FromInt32(0x7f)-Int32FromInt32(1) { if uint64(4) == uint64(4) { - y = x + _toint7 + y = x3 + _toint7 } else { if uint64(4) == uint64(8) { - y1 = float64(x + _toint7) + y1 = float64(x3 + _toint7) } else { - y2 = float64(x + _toint7) + y2 = float64(x3 + _toint7) } } return Float32FromInt32(0) * *(*float32)(unsafe.Pointer(bp)) } - y3 = x + _toint7 - _toint7 - x + y3 = x3 + _toint7 - _toint7 - x3 if y3 > Float32FromFloat32(0.5) { - y3 = y3 + x - Float32FromInt32(1) + y3 = y3 + x3 - Float32FromInt32(1) } else { if y3 <= -Float32FromFloat32(0.5) { - y3 = y3 + x + Float32FromInt32(1) + y3 = y3 + x3 + Float32FromInt32(1) } else { - y3 = y3 + x + y3 = y3 + x3 } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) != 0 { @@ -111864,7 +111864,7 @@ func Xroundl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xround(tls, float64(float64(x)))) + return Xround(tls, x) } func Xscalb(tls *TLS, x float64, fn float64) (r float64) { @@ -111915,7 +111915,7 @@ _7: if -fn > float64(65000) { return Xscalbn(tls, x, -int32(65000)) } - return Xscalbn(tls, x, int32(int32(fn))) + return Xscalbn(tls, x, int32(fn)) } func Xscalbf(tls *TLS, x float32, fn float32) (r float32) { @@ -111966,7 +111966,7 @@ _7: if -fn > Float32FromFloat32(65000) { return Xscalbnf(tls, x, -int32(65000)) } - return Xscalbnf(tls, x, int32(int32(fn))) + return Xscalbnf(tls, x, int32(fn)) } func Xscalbln(tls *TLS, x float64, n int64) (r float64) { @@ -111981,7 +111981,7 @@ func Xscalbln(tls *TLS, x float64, n int64) (r float64) { n = int64(-Int32FromInt32(1) - Int32FromInt32(0x7fffffff)) } } - return Xscalbn(tls, x, int32(int32(n))) + return Xscalbn(tls, x, int32(n)) } func Xscalblnf(tls *TLS, x float32, n int64) (r float32) { @@ -111996,7 +111996,7 @@ func Xscalblnf(tls *TLS, x float32, n int64) (r float32) { n = int64(-Int32FromInt32(1) - Int32FromInt32(0x7fffffff)) } } - return Xscalbnf(tls, x, int32(int32(n))) + return Xscalbnf(tls, x, int32(n)) } func Xscalblnl(tls *TLS, x float64, n int64) (r float64) { @@ -112004,7 +112004,7 @@ func Xscalblnl(tls *TLS, x float64, n int64) (r float64) { trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xscalbln(tls, float64(float64(x)), n)) + return Xscalbln(tls, x, n) } func Xscalbn(tls *TLS, x float64, n int32) (r float64) { @@ -112098,7 +112098,7 @@ func Xscalbnl(tls *TLS, x float64, n int32) (r float64) { trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xscalbn(tls, float64(float64(x)), n)) + return Xscalbn(tls, x, n) } func Xsignificand(tls *TLS, x float64) (r float64) { @@ -112117,9 +112117,9 @@ func Xsignificandf(tls *TLS, x float32) (r float32) { return Xscalbnf(tls, x, -Xilogbf(tls, x)) } -func Xsin(tls *TLS, x float64) (r float64) { +func Xsin(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -112131,7 +112131,7 @@ func Xsin(tls *TLS, x float64) (r float64) { var _ /* y at bp+0 */ [2]float64 _, _, _, _, _, _, _, _ = ix, n, y, y1, y2, v1, v2, v3 /* High word of x. */ - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) ix &= uint32(0x7fffffff) /* |x| ~< pi/4 */ if ix <= uint32(0x3fe921fb) { @@ -112139,38 +112139,38 @@ func Xsin(tls *TLS, x float64) (r float64) { /* raise inexact if x != 0 and underflow if subnormal*/ if uint64(8) == uint64(4) { if ix < uint32(0x00100000) { - v1 = x / Float64FromFloat32(1.329227995784916e+36) + v1 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float64FromFloat32(1.329227995784916e+36) + v1 = x3 + Float64FromFloat32(1.329227995784916e+36) } y = float32(v1) } else { if uint64(8) == uint64(8) { if ix < uint32(0x00100000) { - v2 = x / Float64FromFloat32(1.329227995784916e+36) + v2 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float64FromFloat32(1.329227995784916e+36) + v2 = x3 + Float64FromFloat32(1.329227995784916e+36) } y1 = v2 } else { if ix < uint32(0x00100000) { - v3 = x / Float64FromFloat32(1.329227995784916e+36) + v3 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float64FromFloat32(1.329227995784916e+36) + v3 = x3 + Float64FromFloat32(1.329227995784916e+36) } - y2 = float64(v3) + y2 = v3 } } - return x + return x3 } - return X__sin(tls, x, float64(0), 0) + return X__sin(tls, x3, float64(0), 0) } /* sin(Inf or NaN) is NaN */ if ix >= uint32(0x7ff00000) { - return x - x + return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x, bp)) + n = uint32(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)) @@ -112184,9 +112184,9 @@ func Xsin(tls *TLS, x float64) (r float64) { return r } -func Xsincos(tls *TLS, x float64, sin uintptr, cos uintptr) { +func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { if __ccgo_strace { - trc("tls=%v x=%v sin=%v cos=%v, (%v:)", tls, x, sin, cos, origin(2)) + trc("tls=%v x3=%v sin=%v cos=%v, (%v:)", tls, x3, sin, cos, origin(2)) } bp := tls.Alloc(16) defer tls.Free(16) @@ -112196,7 +112196,7 @@ func Xsincos(tls *TLS, x float64, sin uintptr, cos uintptr) { var y float32 var _ /* y at bp+0 */ [2]float64 _, _, _, _, _, _, _, _, _, _, _ = c, ix, n, s, y, y1, y2, v1, v2, v3, v4 - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) ix &= uint32(0x7fffffff) /* |x| ~< pi/4 */ if ix <= uint32(0x3fe921fb) { @@ -112205,45 +112205,45 @@ func Xsincos(tls *TLS, x float64, sin uintptr, cos uintptr) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(8) == uint64(4) { if ix < uint32(0x00100000) { - v1 = x / Float64FromFloat32(1.329227995784916e+36) + v1 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float64FromFloat32(1.329227995784916e+36) + v1 = x3 + Float64FromFloat32(1.329227995784916e+36) } y = float32(v1) } else { if uint64(8) == uint64(8) { if ix < uint32(0x00100000) { - v2 = x / Float64FromFloat32(1.329227995784916e+36) + v2 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float64FromFloat32(1.329227995784916e+36) + v2 = x3 + Float64FromFloat32(1.329227995784916e+36) } y1 = v2 } else { if ix < uint32(0x00100000) { - v3 = x / Float64FromFloat32(1.329227995784916e+36) + v3 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float64FromFloat32(1.329227995784916e+36) + v3 = x3 + Float64FromFloat32(1.329227995784916e+36) } - y2 = float64(v3) + y2 = v3 } } - *(*float64)(unsafe.Pointer(sin)) = x + *(*float64)(unsafe.Pointer(sin)) = x3 *(*float64)(unsafe.Pointer(cos)) = float64(1) return } - *(*float64)(unsafe.Pointer(sin)) = X__sin(tls, x, float64(0), 0) - *(*float64)(unsafe.Pointer(cos)) = X__cos(tls, x, float64(0)) + *(*float64)(unsafe.Pointer(sin)) = X__sin(tls, x3, float64(0), 0) + *(*float64)(unsafe.Pointer(cos)) = X__cos(tls, x3, float64(0)) return } /* sincos(Inf or NaN) is NaN */ if ix >= uint32(0x7ff00000) { - v4 = x - x + v4 = x3 - x3 *(*float64)(unsafe.Pointer(cos)) = v4 *(*float64)(unsafe.Pointer(sin)) = v4 return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x, bp)) + n = uint32(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) { @@ -112276,9 +112276,9 @@ var _s2pio2 = Float64FromInt32(2) * Float64FromFloat64(1.5707963267948966) /* 0x var _s3pio2 = Float64FromInt32(3) * Float64FromFloat64(1.5707963267948966) /* 0x4012D97C, 0x7F3321D2 */ var _s4pio2 = Float64FromInt32(4) * Float64FromFloat64(1.5707963267948966) /* 0x401921FB, 0x54442D18 */ -func Xsincosf(tls *TLS, x float32, sin uintptr, cos uintptr) { +func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { if __ccgo_strace { - trc("tls=%v x=%v sin=%v cos=%v, (%v:)", tls, x, sin, cos, origin(2)) + trc("tls=%v x3=%v sin=%v cos=%v, (%v:)", tls, x3, sin, cos, origin(2)) } bp := tls.Alloc(16) defer tls.Free(16) @@ -112289,7 +112289,7 @@ func Xsincosf(tls *TLS, x float32, sin uintptr, cos uintptr) { var y1, y2, v4, v5, v6, v7 float64 var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, ix, n, s, sign, y, y1, y2, v1, v2, v3, v4, v5, v6, v7, v8 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) /* |x| ~<= pi/4 */ @@ -112299,59 +112299,59 @@ func Xsincosf(tls *TLS, x float32, sin uintptr, cos uintptr) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(4) == uint64(4) { if ix < uint32(0x00100000) { - v1 = x / Float32FromFloat32(1.329227995784916e+36) + v1 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float32FromFloat32(1.329227995784916e+36) + v1 = x3 + Float32FromFloat32(1.329227995784916e+36) } y = v1 } else { if uint64(4) == uint64(8) { if ix < uint32(0x00100000) { - v2 = x / Float32FromFloat32(1.329227995784916e+36) + v2 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float32FromFloat32(1.329227995784916e+36) + v2 = x3 + Float32FromFloat32(1.329227995784916e+36) } y1 = float64(v2) } else { if ix < uint32(0x00100000) { - v3 = x / Float32FromFloat32(1.329227995784916e+36) + v3 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float32FromFloat32(1.329227995784916e+36) + v3 = x3 + Float32FromFloat32(1.329227995784916e+36) } y2 = float64(v3) } } - *(*float32)(unsafe.Pointer(sin)) = x + *(*float32)(unsafe.Pointer(sin)) = x3 *(*float32)(unsafe.Pointer(cos)) = Float32FromFloat32(1) return } - *(*float32)(unsafe.Pointer(sin)) = X__sindf(tls, float64(float64(x))) - *(*float32)(unsafe.Pointer(cos)) = X__cosdf(tls, float64(float64(x))) + *(*float32)(unsafe.Pointer(sin)) = X__sindf(tls, float64(x3)) + *(*float32)(unsafe.Pointer(cos)) = X__cosdf(tls, float64(x3)) return } /* |x| ~<= 5*pi/4 */ if ix <= uint32(0x407b53d1) { if ix <= uint32(0x4016cbe3) { /* |x| ~<= 3pi/4 */ if sign != 0 { - *(*float32)(unsafe.Pointer(sin)) = -X__cosdf(tls, float64(float64(x))+_s1pio2) - *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, float64(float64(x))+_s1pio2) + *(*float32)(unsafe.Pointer(sin)) = -X__cosdf(tls, float64(x3)+_s1pio2) + *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, float64(x3)+_s1pio2) } else { - *(*float32)(unsafe.Pointer(sin)) = X__cosdf(tls, _s1pio2-float64(float64(x))) - *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, _s1pio2-float64(float64(x))) + *(*float32)(unsafe.Pointer(sin)) = X__cosdf(tls, _s1pio2-float64(x3)) + *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, _s1pio2-float64(x3)) } return } /* -sin(x+c) is not correct if x+c could be 0: -0 vs +0 */ if sign != 0 { - v4 = float64(float64(x)) + _s2pio2 + v4 = float64(x3) + _s2pio2 } else { - v4 = float64(float64(x)) - _s2pio2 + v4 = float64(x3) - _s2pio2 } *(*float32)(unsafe.Pointer(sin)) = -X__sindf(tls, v4) if sign != 0 { - v5 = float64(float64(x)) + _s2pio2 + v5 = float64(x3) + _s2pio2 } else { - v5 = float64(float64(x)) - _s2pio2 + v5 = float64(x3) - _s2pio2 } *(*float32)(unsafe.Pointer(cos)) = -X__cosdf(tls, v5) return @@ -112360,37 +112360,37 @@ func Xsincosf(tls *TLS, x float32, sin uintptr, cos uintptr) { if ix <= uint32(0x40e231d5) { if ix <= uint32(0x40afeddf) { /* |x| ~<= 7*pi/4 */ if sign != 0 { - *(*float32)(unsafe.Pointer(sin)) = X__cosdf(tls, float64(float64(x))+_s3pio2) - *(*float32)(unsafe.Pointer(cos)) = -X__sindf(tls, float64(float64(x))+_s3pio2) + *(*float32)(unsafe.Pointer(sin)) = X__cosdf(tls, float64(x3)+_s3pio2) + *(*float32)(unsafe.Pointer(cos)) = -X__sindf(tls, float64(x3)+_s3pio2) } else { - *(*float32)(unsafe.Pointer(sin)) = -X__cosdf(tls, float64(float64(x))-_s3pio2) - *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, float64(float64(x))-_s3pio2) + *(*float32)(unsafe.Pointer(sin)) = -X__cosdf(tls, float64(x3)-_s3pio2) + *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, float64(x3)-_s3pio2) } return } if sign != 0 { - v6 = float64(float64(x)) + _s4pio2 + v6 = float64(x3) + _s4pio2 } else { - v6 = float64(float64(x)) - _s4pio2 + v6 = float64(x3) - _s4pio2 } *(*float32)(unsafe.Pointer(sin)) = X__sindf(tls, v6) if sign != 0 { - v7 = float64(float64(x)) + _s4pio2 + v7 = float64(x3) + _s4pio2 } else { - v7 = float64(float64(x)) - _s4pio2 + v7 = float64(x3) - _s4pio2 } *(*float32)(unsafe.Pointer(cos)) = X__cosdf(tls, v7) return } /* sin(Inf or NaN) is NaN */ if ix >= uint32(0x7f800000) { - v8 = x - x + v8 = x3 - x3 *(*float32)(unsafe.Pointer(cos)) = v8 *(*float32)(unsafe.Pointer(sin)) = v8 return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x, bp)) + n = uint32(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) { @@ -112422,9 +112422,9 @@ func Xsincosl(tls *TLS, x float64, sin uintptr, cos uintptr) { defer tls.Free(16) var _ /* cosd at bp+8 */ float64 var _ /* sind at bp+0 */ float64 - Xsincos(tls, float64(float64(x)), bp, bp+8) - *(*float64)(unsafe.Pointer(sin)) = float64(*(*float64)(unsafe.Pointer(bp))) - *(*float64)(unsafe.Pointer(cos)) = float64(*(*float64)(unsafe.Pointer(bp + 8))) + Xsincos(tls, x, bp, bp+8) + *(*float64)(unsafe.Pointer(sin)) = *(*float64)(unsafe.Pointer(bp)) + *(*float64)(unsafe.Pointer(cos)) = *(*float64)(unsafe.Pointer(bp + 8)) } const M_PI_27 = 1.5707963267948966 @@ -112438,9 +112438,9 @@ var _s2pio21 = Float64FromInt32(2) * Float64FromFloat64(1.5707963267948966) /* 0 var _s3pio21 = Float64FromInt32(3) * Float64FromFloat64(1.5707963267948966) /* 0x4012D97C, 0x7F3321D2 */ var _s4pio21 = Float64FromInt32(4) * Float64FromFloat64(1.5707963267948966) /* 0x401921FB, 0x54442D18 */ -func Xsinf(tls *TLS, x float32) (r float32) { +func Xsinf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -112451,7 +112451,7 @@ func Xsinf(tls *TLS, x float32) (r float32) { var y1, y2, v4, v5 float64 var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = int32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ @@ -112459,68 +112459,68 @@ func Xsinf(tls *TLS, x float32) (r float32) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(4) == uint64(4) { if ix < uint32(0x00800000) { - v1 = x / Float32FromFloat32(1.329227995784916e+36) + v1 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float32FromFloat32(1.329227995784916e+36) + v1 = x3 + Float32FromFloat32(1.329227995784916e+36) } y = v1 } else { if uint64(4) == uint64(8) { if ix < uint32(0x00800000) { - v2 = x / Float32FromFloat32(1.329227995784916e+36) + v2 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float32FromFloat32(1.329227995784916e+36) + v2 = x3 + Float32FromFloat32(1.329227995784916e+36) } y1 = float64(v2) } else { if ix < uint32(0x00800000) { - v3 = x / Float32FromFloat32(1.329227995784916e+36) + v3 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float32FromFloat32(1.329227995784916e+36) + v3 = x3 + Float32FromFloat32(1.329227995784916e+36) } y2 = float64(v3) } } - return x + return x3 } - return X__sindf(tls, float64(float64(x))) + return X__sindf(tls, float64(x3)) } if ix <= uint32(0x407b53d1) { /* |x| ~<= 5*pi/4 */ if ix <= uint32(0x4016cbe3) { /* |x| ~<= 3pi/4 */ if sign != 0 { - return -X__cosdf(tls, float64(float64(x))+_s1pio21) + return -X__cosdf(tls, float64(x3)+_s1pio21) } else { - return X__cosdf(tls, float64(float64(x))-_s1pio21) + return X__cosdf(tls, float64(x3)-_s1pio21) } } if sign != 0 { - v4 = -(float64(float64(x)) + _s2pio21) + v4 = -(float64(x3) + _s2pio21) } else { - v4 = -(float64(float64(x)) - _s2pio21) + v4 = -(float64(x3) - _s2pio21) } return X__sindf(tls, v4) } if ix <= uint32(0x40e231d5) { /* |x| ~<= 9*pi/4 */ if ix <= uint32(0x40afeddf) { /* |x| ~<= 7*pi/4 */ if sign != 0 { - return X__cosdf(tls, float64(float64(x))+_s3pio21) + return X__cosdf(tls, float64(x3)+_s3pio21) } else { - return -X__cosdf(tls, float64(float64(x))-_s3pio21) + return -X__cosdf(tls, float64(x3)-_s3pio21) } } if sign != 0 { - v5 = float64(float64(x)) + _s4pio21 + v5 = float64(x3) + _s4pio21 } else { - v5 = float64(float64(x)) - _s4pio21 + v5 = float64(x3) - _s4pio21 } return X__sindf(tls, v5) } /* sin(Inf or NaN) is NaN */ if ix >= uint32(0x7f800000) { - return x - x + return x3 - x3 } /* general argument reduction needed */ - n = X__rem_pio2f(tls, x, bp) + n = X__rem_pio2f(tls, x3, bp) switch n & Int32FromInt32(3) { case 0: return X__sindf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -112643,7 +112643,7 @@ func Xsinhl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xsinh(tls, float64(float64(x)))) + return Xsinh(tls, x) } func Xsinl(tls *TLS, x float64) (r float64) { @@ -112651,7 +112651,7 @@ func Xsinl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xsin(tls, float64(float64(x)))) + return Xsin(tls, x) } const FENV_SUPPORT = 1 @@ -112660,7 +112660,7 @@ const FENV_SUPPORT = 1 // // /* returns a*b*2^-32 - e, with error 0 <= e < 1. */ func _mul32(tls *TLS, a Tuint32_t, b Tuint32_t) (r Tuint32_t) { - return uint32(uint64(uint64(a)) * uint64(uint64(b)) >> int32(32)) + return uint32(uint64(a) * uint64(b) >> int32(32)) } // C documentation @@ -112676,9 +112676,9 @@ func _mul64(tls *TLS, a Tuint64_t, b Tuint64_t) (r Tuint64_t) { return ahi*bhi + ahi*blo>>int32(32) + alo*bhi>>int32(32) } -func Xsqrt(tls *TLS, x float64) (r1 float64) { +func Xsqrt(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var d, d0, d1, d2, i, ix, m, r, s, tiny, top, u Tuint64_t @@ -112687,21 +112687,21 @@ func Xsqrt(tls *TLS, x float64) (r1 float64) { var v2 int64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, i, ix, m, r, s, t, tiny, top, u, y, y1, v1, v2, v3 /* special case handling. */ - ix = *(*Tuint64_t)(unsafe.Pointer(&x)) + ix = *(*Tuint64_t)(unsafe.Pointer(&x1)) top = ix >> int32(52) if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { - return x + return x1 } if ix == uint64(0x7ff0000000000000) { - return x + return x1 } if ix > uint64(0x7ff0000000000000) { - return X__math_invalid(tls, x) + return X__math_invalid(tls, x1) } /* x is subnormal, normalize it. */ - v1 = x * float64(4.503599627370496e+15) + v1 = x1 * float64(4.503599627370496e+15) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) top = ix >> int32(52) top -= uint64(52) @@ -112719,17 +112719,17 @@ func Xsqrt(tls *TLS, x float64) (r1 float64) { i = ix >> Int32FromInt32(46) % uint64(128) r = uint64(uint32(X__rsqrt_tab[i]) << int32(16)) /* |r sqrt(m) - 1| < 0x1.fdp-9 */ - s = uint64(_mul32(tls, uint32(m>>int32(32)), uint32(uint32(r)))) + s = uint64(_mul32(tls, uint32(m>>int32(32)), uint32(r))) /* |s/sqrt(m) - 1| < 0x1.fdp-9 */ - d = uint64(_mul32(tls, uint32(uint32(s)), uint32(uint32(r)))) + d = uint64(_mul32(tls, uint32(s), uint32(r))) u = _three - d - r = uint64(_mul32(tls, uint32(uint32(r)), uint32(uint32(u))) << int32(1)) + r = uint64(_mul32(tls, uint32(r), uint32(u)) << int32(1)) /* |r sqrt(m) - 1| < 0x1.7bp-16 */ - s = uint64(_mul32(tls, uint32(uint32(s)), uint32(uint32(u))) << int32(1)) + s = uint64(_mul32(tls, uint32(s), uint32(u)) << int32(1)) /* |s/sqrt(m) - 1| < 0x1.7bp-16 */ - d = uint64(_mul32(tls, uint32(uint32(s)), uint32(uint32(r)))) + d = uint64(_mul32(tls, uint32(s), uint32(r))) u = _three - d - r = uint64(_mul32(tls, uint32(uint32(r)), uint32(uint32(u))) << int32(1)) + r = uint64(_mul32(tls, uint32(r), uint32(u)) << int32(1)) /* |r sqrt(m) - 1| < 0x1.3704p-29 (measured worst-case) */ r = r << int32(32) s = _mul64(tls, m, r) @@ -112823,14 +112823,14 @@ func Xsqrt(tls *TLS, x float64) (r1 float64) { var _three = uint64(0xc0000000) func _mul321(tls *TLS, a Tuint32_t, b Tuint32_t) (r Tuint32_t) { - return uint32(uint64(uint64(a)) * uint64(uint64(b)) >> int32(32)) + return uint32(uint64(a) * uint64(b) >> int32(32)) } /* see sqrt.c for more detailed comments. */ -func Xsqrtf(tls *TLS, x float32) (r1 float32) { +func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, tiny, u Tuint32_t @@ -112838,20 +112838,20 @@ func Xsqrtf(tls *TLS, x float32) (r1 float32) { var v2 uint32 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(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { - return x + return x1 } if ix == uint32(0x7f800000) { - return x + return x1 } if ix > uint32(0x7f800000) { - return X__math_invalidf(tls, x) + return X__math_invalidf(tls, x1) } /* x is subnormal, normalize it. */ - v1 = x * Float32FromFloat32(8.388608e+06) + v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) } @@ -112919,12 +112919,12 @@ func Xsqrtl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xsqrt(tls, float64(float64(x)))) + return Xsqrt(tls, x) } -func Xtan(tls *TLS, x float64) (r float64) { +func Xtan(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -112935,7 +112935,7 @@ func Xtan(tls *TLS, x float64) (r float64) { var y1, y2, v1, v2, v3 float64 var _ /* y at bp+0 */ [2]float64 _, _, _, _, _, _, _, _ = ix, n, y, y1, y2, v1, v2, v3 - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) ix &= uint32(0x7fffffff) /* |x| ~< pi/4 */ if ix <= uint32(0x3fe921fb) { @@ -112943,38 +112943,38 @@ func Xtan(tls *TLS, x float64) (r float64) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(8) == uint64(4) { if ix < uint32(0x00100000) { - v1 = x / Float64FromFloat32(1.329227995784916e+36) + v1 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float64FromFloat32(1.329227995784916e+36) + v1 = x3 + Float64FromFloat32(1.329227995784916e+36) } y = float32(v1) } else { if uint64(8) == uint64(8) { if ix < uint32(0x00100000) { - v2 = x / Float64FromFloat32(1.329227995784916e+36) + v2 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float64FromFloat32(1.329227995784916e+36) + v2 = x3 + Float64FromFloat32(1.329227995784916e+36) } y1 = v2 } else { if ix < uint32(0x00100000) { - v3 = x / Float64FromFloat32(1.329227995784916e+36) + v3 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float64FromFloat32(1.329227995784916e+36) + v3 = x3 + Float64FromFloat32(1.329227995784916e+36) } - y2 = float64(v3) + y2 = v3 } } - return x + return x3 } - return X__tan(tls, x, float64(0), 0) + return X__tan(tls, x3, float64(0), 0) } /* tan(Inf or NaN) is NaN */ if ix >= uint32(0x7ff00000) { - return x - x + return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x, bp)) + 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))) } @@ -112989,9 +112989,9 @@ var _t2pio2 = Float64FromInt32(2) * Float64FromFloat64(1.5707963267948966) /* 0x var _t3pio2 = Float64FromInt32(3) * Float64FromFloat64(1.5707963267948966) /* 0x4012D97C, 0x7F3321D2 */ var _t4pio2 = Float64FromInt32(4) * Float64FromFloat64(1.5707963267948966) /* 0x401921FB, 0x54442D18 */ -func Xtanf(tls *TLS, x float32) (r float32) { +func Xtanf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -113002,7 +113002,7 @@ func Xtanf(tls *TLS, x float32) (r float32) { var y1, y2, v4, v5, v6, v7 float64 var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5, v6, v7 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ @@ -113010,45 +113010,45 @@ func Xtanf(tls *TLS, x float32) (r float32) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(4) == uint64(4) { if ix < uint32(0x00800000) { - v1 = x / Float32FromFloat32(1.329227995784916e+36) + v1 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float32FromFloat32(1.329227995784916e+36) + v1 = x3 + Float32FromFloat32(1.329227995784916e+36) } y = v1 } else { if uint64(4) == uint64(8) { if ix < uint32(0x00800000) { - v2 = x / Float32FromFloat32(1.329227995784916e+36) + v2 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float32FromFloat32(1.329227995784916e+36) + v2 = x3 + Float32FromFloat32(1.329227995784916e+36) } y1 = float64(v2) } else { if ix < uint32(0x00800000) { - v3 = x / Float32FromFloat32(1.329227995784916e+36) + v3 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float32FromFloat32(1.329227995784916e+36) + v3 = x3 + Float32FromFloat32(1.329227995784916e+36) } y2 = float64(v3) } } - return x + return x3 } - return X__tandf(tls, float64(float64(x)), 0) + return X__tandf(tls, float64(x3), 0) } if ix <= uint32(0x407b53d1) { /* |x| ~<= 5*pi/4 */ if ix <= uint32(0x4016cbe3) { /* |x| ~<= 3pi/4 */ if sign != 0 { - v4 = float64(float64(x)) + _t1pio2 + v4 = float64(x3) + _t1pio2 } else { - v4 = float64(float64(x)) - _t1pio2 + v4 = float64(x3) - _t1pio2 } return X__tandf(tls, v4, int32(1)) } else { if sign != 0 { - v5 = float64(float64(x)) + _t2pio2 + v5 = float64(x3) + _t2pio2 } else { - v5 = float64(float64(x)) - _t2pio2 + v5 = float64(x3) - _t2pio2 } return X__tandf(tls, v5, 0) } @@ -113056,26 +113056,26 @@ func Xtanf(tls *TLS, x float32) (r float32) { if ix <= uint32(0x40e231d5) { /* |x| ~<= 9*pi/4 */ if ix <= uint32(0x40afeddf) { /* |x| ~<= 7*pi/4 */ if sign != 0 { - v6 = float64(float64(x)) + _t3pio2 + v6 = float64(x3) + _t3pio2 } else { - v6 = float64(float64(x)) - _t3pio2 + v6 = float64(x3) - _t3pio2 } return X__tandf(tls, v6, int32(1)) } else { if sign != 0 { - v7 = float64(float64(x)) + _t4pio2 + v7 = float64(x3) + _t4pio2 } else { - v7 = float64(float64(x)) - _t4pio2 + v7 = float64(x3) - _t4pio2 } return X__tandf(tls, v7, 0) } } /* tan(Inf or NaN) is NaN */ if ix >= uint32(0x7f800000) { - return x - x + return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x, bp)) + n = uint32(X__rem_pio2f(tls, x3, bp)) return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) } @@ -113087,9 +113087,9 @@ const M_PI_210 = 0 // * = (exp(2*x) - 1)/(exp(2*x) - 1 + 2) // * = (1 - exp(-2*x))/(exp(-2*x) - 1 + 2) // */ -func Xtanh(tls *TLS, x float64) (r float64) { +func Xtanh(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -113111,45 +113111,45 @@ func Xtanh(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*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) - x = *(*float64)(unsafe.Pointer(bp)) + x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { /* |x| > log(3)/2 ~= 0.5493 or nan */ if w > uint32(0x40340000) { /* |x| > 20 or nan */ /* note: this branch avoids raising overflow */ - t = Float64FromInt32(1) - Float64FromInt32(0)/x + t = Float64FromInt32(1) - Float64FromInt32(0)/x3 } else { - t = Xexpm1(tls, Float64FromInt32(2)*x) + t = Xexpm1(tls, Float64FromInt32(2)*x3) t = Float64FromInt32(1) - Float64FromInt32(2)/(t+Float64FromInt32(2)) } } else { if w > uint32(0x3fd058ae) { /* |x| > log(5/3)/2 ~= 0.2554 */ - t = Xexpm1(tls, Float64FromInt32(2)*x) + t = Xexpm1(tls, Float64FromInt32(2)*x3) t = t / (t + Float64FromInt32(2)) } else { if w >= uint32(0x00100000) { /* |x| >= 0x1p-1022, up to 2ulp error in [0.1,0.2554] */ - t = Xexpm1(tls, float64(-Int32FromInt32(2))*x) + t = Xexpm1(tls, float64(-Int32FromInt32(2))*x3) t = -t / (t + Float64FromInt32(2)) } else { /* |x| is subnormal */ /* note: the branch above would not raise underflow in [0x1p-1023,0x1p-1022) */ if uint64(4) == uint64(4) { - y = float32(float32(x)) + y = float32(x3) } else { if uint64(4) == uint64(8) { - y1 = float64(float32(float32(x))) + y1 = float64(float32(x3)) } else { - y2 = float64(float32(float32(x))) + y2 = float64(float32(x3)) } } - t = x + t = x3 } } } @@ -113161,9 +113161,9 @@ func Xtanh(tls *TLS, x float64) (r float64) { return v1 } -func Xtanhf(tls *TLS, x float32) (r float32) { +func Xtanhf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -113184,43 +113184,43 @@ func Xtanhf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) - x = *(*float32)(unsafe.Pointer(bp)) + x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) if w > uint32(0x3f0c9f54) { /* |x| > log(3)/2 ~= 0.5493 or nan */ if w > uint32(0x41200000) { /* |x| > 10 */ - t = Float32FromInt32(1) + Float32FromInt32(0)/x + t = Float32FromInt32(1) + Float32FromInt32(0)/x3 } else { - t = Xexpm1f(tls, Float32FromInt32(2)*x) + t = Xexpm1f(tls, Float32FromInt32(2)*x3) t = Float32FromInt32(1) - Float32FromInt32(2)/(t+Float32FromInt32(2)) } } else { if w > uint32(0x3e82c578) { /* |x| > log(5/3)/2 ~= 0.2554 */ - t = Xexpm1f(tls, Float32FromInt32(2)*x) + t = Xexpm1f(tls, Float32FromInt32(2)*x3) t = t / (t + Float32FromInt32(2)) } else { if w >= uint32(0x00800000) { /* |x| >= 0x1p-126 */ - t = Xexpm1f(tls, float32(-Int32FromInt32(2))*x) + t = Xexpm1f(tls, float32(-Int32FromInt32(2))*x3) t = -t / (t + Float32FromInt32(2)) } else { /* |x| is subnormal */ if uint64(4) == uint64(4) { - y = x * x + y = x3 * x3 } else { if uint64(4) == uint64(8) { - y1 = float64(x * x) + y1 = float64(x3 * x3) } else { - y2 = float64(x * x) + y2 = float64(x3 * x3) } } - t = x + t = x3 } } } @@ -113237,7 +113237,7 @@ func Xtanhl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xtanh(tls, float64(float64(x)))) + return Xtanh(tls, x) } func Xtanl(tls *TLS, x float64) (r float64) { @@ -113245,7 +113245,7 @@ func Xtanl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xtan(tls, float64(float64(x)))) + return Xtan(tls, x) } const N10 = 12 @@ -113265,7 +113265,7 @@ func _sinpi(tls *TLS, x float64) (r float64) { /* reduce x into [-.25,.25] */ n = int32(Float64FromInt32(4) * x) n = (n + int32(1)) / int32(2) - x -= float64(float64(n)) * float64(0.5) + x -= float64(n) * float64(0.5) x *= _pi4 switch n { default: /* case 4 */ @@ -113385,9 +113385,9 @@ func _S(tls *TLS, x float64) (r float64) { return num / den } -func Xtgamma(tls *TLS, x float64) (r1 float64) { +func Xtgamma(tls *TLS, x3 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r1) }() } bp := tls.Alloc(16) @@ -113409,26 +113409,26 @@ func Xtgamma(tls *TLS, x float64) (r1 float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*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)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ - return x + float64(X__builtin_inff(tls)) + return x3 + float64(X__builtin_inff(tls)) } if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<= 172: tgamma(x)=inf with overflow */ @@ -113436,26 +113436,26 @@ func Xtgamma(tls *TLS, x float64) (r1 float64) { if ix >= uint32(0x40670000) { /* |x| >= 184 */ if sign != 0 { if uint64(4) == uint64(4) { - y = float32(Float64FromFloat64(1.1754943508222875e-38) / x) + y = float32(Float64FromFloat64(1.1754943508222875e-38) / x3) } else { if uint64(4) == uint64(8) { - y1 = float64(float32(Float64FromFloat64(1.1754943508222875e-38) / x)) + y1 = float64(float32(Float64FromFloat64(1.1754943508222875e-38) / x3)) } else { - y2 = float64(float32(Float64FromFloat64(1.1754943508222875e-38) / x)) + y2 = float64(float32(Float64FromFloat64(1.1754943508222875e-38) / x3)) } } - if Xfloor(tls, x)*float64(0.5) == Xfloor(tls, x*float64(0.5)) { + if Xfloor(tls, x3)*float64(0.5) == Xfloor(tls, x3*float64(0.5)) { return Float64FromInt32(0) } return -Float64FromFloat64(0) } - x *= float64(8.98846567431158e+307) - return x + x3 *= float64(8.98846567431158e+307) + return x3 } if sign != 0 { - v1 = -x + v1 = -x3 } else { - v1 = x + v1 = x3 } absx = v1 /* handle the error of x + g - 0.5 */ @@ -113469,7 +113469,7 @@ func Xtgamma(tls *TLS, x float64) (r1 float64) { } z = absx - float64(0.5) r = _S(tls, absx) * Xexp(tls, -y3) - if x < Float64FromInt32(0) { + if x3 < Float64FromInt32(0) { /* reflection formula for negative x */ /* sinpi(absx) is not 0, integers are already handled */ r = -_pi4 / (_sinpi(tls, absx) * absx * r) @@ -113487,7 +113487,7 @@ func Xtgammaf(tls *TLS, x float32) (r float32) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float32(Xtgamma(tls, float64(float64(x)))) + return float32(Xtgamma(tls, float64(x))) } func Xtgammal(tls *TLS, x float64) (r float64) { @@ -113495,12 +113495,12 @@ func Xtgammal(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xtgamma(tls, float64(float64(x)))) + return Xtgamma(tls, x) } -func Xtrunc(tls *TLS, x float64) (r float64) { +func Xtrunc(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -113521,34 +113521,34 @@ func Xtrunc(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { - return x + return x3 } if e < int32(12) { e = int32(1) } - m = uint64(-Uint64FromUint64(1) >> e) + m = -Uint64FromUint64(1) >> e if *(*Tuint64_t)(unsafe.Pointer(bp))&m == uint64(0) { - return x + return x3 } if uint64(8) == uint64(4) { - y = float32(x + Float64FromFloat32(1.329227995784916e+36)) + y = float32(x3 + Float64FromFloat32(1.329227995784916e+36)) } else { if uint64(8) == uint64(8) { - y1 = x + Float64FromFloat32(1.329227995784916e+36) + y1 = x3 + Float64FromFloat32(1.329227995784916e+36) } else { - y2 = float64(x + Float64FromFloat32(1.329227995784916e+36)) + y2 = x3 + Float64FromFloat32(1.329227995784916e+36) } } *(*Tuint64_t)(unsafe.Pointer(bp)) &= ^m return *(*float64)(unsafe.Pointer(bp)) } -func Xtruncf(tls *TLS, x float32) (r float32) { +func Xtruncf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -113569,25 +113569,25 @@ func Xtruncf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { - return x + return x3 } if e < int32(9) { e = int32(1) } m = -Uint32FromUint32(1) >> e if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { - return x + return x3 } if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } *(*Tuint32_t)(unsafe.Pointer(bp)) &= ^m @@ -113599,7 +113599,7 @@ func Xtruncl(tls *TLS, x float64) (r float64) { trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(Xtrunc(tls, float64(float64(x)))) + return Xtrunc(tls, x) } var _digits = [65]int8{'.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'} @@ -113623,14 +113623,14 @@ func Xa64l(tls *TLS, s uintptr) (r int64) { if !(d != 0) { break } - x |= uint32(int64(int64(d))-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e + x |= uint32(int64(d)-t__predefined_ptrdiff_t(uintptr(unsafe.Pointer(&_digits)))) << e goto _1 _1: ; e += int32(6) s++ } - return int64(int32(int32(x))) + return int64(int32(x)) } func Xl64a(tls *TLS, x0 int64) (r uintptr) { @@ -113641,7 +113641,7 @@ func Xl64a(tls *TLS, x0 int64) (r uintptr) { var p uintptr var x Tuint32_t _, _ = p, x - x = uint32(uint32(x0)) + x = uint32(x0) p = uintptr(unsafe.Pointer(&_s)) for { if !(x != 0) { @@ -113760,7 +113760,7 @@ func Xffs(tls *TLS, i int32) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_l(tls, uint64(uint64(i))) + int32(1) + v1 = _a_ctz_l(tls, uint64(i)) + int32(1) } else { v1 = 0 } @@ -113775,7 +113775,7 @@ func Xffsl(tls *TLS, i int64) (r int32) { var v1 int32 _ = v1 if i != 0 { - v1 = _a_ctz_l(tls, uint64(uint64(i))) + int32(1) + v1 = _a_ctz_l(tls, uint64(i)) + int32(1) } else { v1 = 0 } @@ -113791,7 +113791,7 @@ func Xffsll(tls *TLS, i int64) (r int32) { var v2 Tuint64_t _, _, _ = v1, v2, v3 if i != 0 { - v2 = uint64(uint64(i)) + v2 = uint64(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) @@ -114124,7 +114124,7 @@ func Xgetentropy(tls *TLS, buffer uintptr, len1 Tsize_t) (r int32) { } } pos += uintptr(ret) - len1 -= uint64(uint64(ret)) + len1 -= uint64(ret) ret = 0 } _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) @@ -114240,7 +114240,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(uint64(k))) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+713, optchar, uint64(k)) } return int32('?') } @@ -114261,7 +114261,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(uint64(k))) + X__getopt_msg(tls, *(*uintptr)(unsafe.Pointer(argv)), __ccgo_ts+737, optchar, uint64(k)) } return int32('?') } @@ -114395,8 +114395,8 @@ func ___getopt_long_core(tls *TLS, argc int32, argv uintptr, optstring uintptr, ; i++ } - if cnt == int32(1) && longonly != 0 && int64(int64(arg))-int64(int64(start)) == int64(Xmblen(tls, start, uint64(MB_LEN_MAX))) { - l = int32(int64(int64(arg)) - int64(int64(start))) + if cnt == int32(1) && longonly != 0 && int64(arg)-int64(start) == int64(Xmblen(tls, start, uint64(MB_LEN_MAX))) { + l = int32(int64(arg) - int64(start)) i = 0 for { if !(*(*int8)(unsafe.Pointer(optstring + uintptr(i))) != 0) { @@ -114555,13 +114555,13 @@ func Xgetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { if (*(*[2]uint64)(unsafe.Pointer(bp)))[0] == -Uint64FromUint64(1) { v1 = ^Uint64FromUint64(0) } else { - v1 = uint64((*(*[2]uint64)(unsafe.Pointer(bp)))[0]) + v1 = (*(*[2]uint64)(unsafe.Pointer(bp)))[0] } (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur = v1 if (*(*[2]uint64)(unsafe.Pointer(bp)))[int32(1)] == -Uint64FromUint64(1) { v2 = ^Uint64FromUint64(0) } else { - v2 = uint64((*(*[2]uint64)(unsafe.Pointer(bp)))[int32(1)]) + v2 = (*(*[2]uint64)(unsafe.Pointer(bp)))[int32(1)] } (*Trlimit)(unsafe.Pointer(rlim)).Frlim_max = v2 if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur >= ^Uint64FromUint64(0) { @@ -114597,7 +114597,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xgetsubopt(tls *TLS, opt uintptr, keys uintptr, val uintptr) (r int32) { @@ -114924,9 +114924,9 @@ func _convert_ioctl_struct(tls *TLS, map1 uintptr, old uintptr, new1 uintptr, di ts_offset = int32(*(*uint8)(unsafe.Pointer(map1 + 12 + uintptr(i)))) len1 = ts_offset - old_offset if dir == int32(W) { - Xmemcpy(tls, old+uintptr(old_offset), new1+uintptr(new_offset), uint64(uint64(len1))) + Xmemcpy(tls, old+uintptr(old_offset), new1+uintptr(new_offset), uint64(len1)) } else { - Xmemcpy(tls, new1+uintptr(new_offset), old+uintptr(old_offset), uint64(uint64(len1))) + Xmemcpy(tls, new1+uintptr(new_offset), old+uintptr(old_offset), uint64(len1)) } new_offset += len1 old_offset += len1 @@ -114939,11 +114939,11 @@ func _convert_ioctl_struct(tls *TLS, map1 uintptr, old uintptr, new1 uintptr, di new_offset += (align - int32(1)) & -new_offset if dir == int32(W) { Xmemcpy(tls, bp, new1+uintptr(new_offset), uint64(8)) - *(*int64)(unsafe.Pointer(bp + 8)) = int64(*(*int64)(unsafe.Pointer(bp))) + *(*int64)(unsafe.Pointer(bp + 8)) = *(*int64)(unsafe.Pointer(bp)) Xmemcpy(tls, old+uintptr(old_offset), bp+8, uint64(8)) } else { Xmemcpy(tls, bp+8, old+uintptr(old_offset), uint64(8)) - *(*int64)(unsafe.Pointer(bp)) = int64(*(*int64)(unsafe.Pointer(bp + 8))) + *(*int64)(unsafe.Pointer(bp)) = *(*int64)(unsafe.Pointer(bp + 8)) Xmemcpy(tls, new1+uintptr(new_offset), bp, uint64(8)) } new_offset = int32(uint64(new_offset) + Uint64FromInt64(8)) @@ -114983,7 +114983,7 @@ func Xioctl(tls *TLS, fd int32, req int32, va uintptr) (r1 int32) { if Bool(Bool(int32(SIOCGSTAMP) != int32(SIOCGSTAMP_OLD)) && req != 0) && r == -int32(ENOTTY) { i = 0 for { - if !(uint64(uint64(i)) < Uint64FromInt64(400)/Uint64FromInt64(20)) { + if !(uint64(i) < Uint64FromInt64(400)/Uint64FromInt64(20)) { break } if _compat_map[i].Fnew_req != req { @@ -115002,7 +115002,7 @@ func Xioctl(tls *TLS, fd int32, req int32, va uintptr) (r1 int32) { i++ } } - return int32(X__syscall_ret(tls, uint64(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xissetugid(tls *TLS) (r int32) { @@ -115188,7 +115188,7 @@ func _unescape_ent(tls *TLS, beg uintptr) (r uintptr) { if cval != 0 { v7 = dest dest++ - *(*int8)(unsafe.Pointer(v7)) = int8(int8(cval)) + *(*int8)(unsafe.Pointer(v7)) = int8(cval) src = val } else { v8 = dest @@ -115240,7 +115240,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(int32(len1)) + (*(*[8]int32)(unsafe.Pointer(bp)))[i] = int32(len1) goto _1 _1: ; @@ -115391,7 +115391,7 @@ func _do_nftw(tls *TLS, path uintptr, fn uintptr, fd_limit int32, flags int32, h ; k-- } - (*(*TFTW)(unsafe.Pointer(bp + 176))).Fbase = int32(int32(k)) + (*(*TFTW)(unsafe.Pointer(bp + 176))).Fbase = int32(k) } if type1 == int32(FTW_D) || type1 == int32(FTW_DP) { dfd = Xopen(tls, path, O_RDONLY, 0) @@ -115635,7 +115635,7 @@ func _slash_len(tls *TLS, s uintptr) (r Tsize_t) { for int32(*(*int8)(unsafe.Pointer(s))) == int32('/') { s++ } - return uint64(int64(int64(s)) - int64(int64(s0))) + return uint64(int64(s) - int64(s0)) } func Xrealpath(tls *TLS, filename uintptr, resolved uintptr) (r uintptr) { @@ -115697,7 +115697,7 @@ _3: goto _2 } z = X__strchrnul(tls, bp+uintptr(p), int32('/')) - v6 = uint64(int64(int64(z)) - int64(bp+uintptr(p))) + v6 = uint64(int64(z) - int64(bp+uintptr(p))) l = v6 l0 = v6 if !(l != 0) && !(check_dir != 0) { @@ -115745,7 +115745,7 @@ _3: } } k = Xreadlink(tls, bp+4097, bp, p) - if uint64(uint64(k)) == p { + if uint64(k) == p { goto toolong } if !(k != 0) { @@ -115790,8 +115790,8 @@ _8: p++ } } - p -= uint64(uint64(k)) - Xmemmove(tls, bp+uintptr(p), bp, uint64(uint64(k))) + p -= uint64(k) + Xmemmove(tls, bp+uintptr(p), bp, uint64(k)) /* Skip the stack advancement in case we have a new * absolute base path. */ goto restart @@ -115907,7 +115907,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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } if (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur < ^Uint64FromUint64(0) { v1 = (*Trlimit)(unsafe.Pointer(rlim)).Frlim_cur @@ -115921,8 +115921,8 @@ func Xsetrlimit(tls *TLS, resource int32, rlim uintptr) (r int32) { } *(*Tctx)(unsafe.Pointer(bp + 16)) = Tctx{ Flim: [2]uint64{ - 0: uint64(v1), - 1: uint64(v2), + 0: v1, + 1: v2, }, Fres: resource, Ferr: -int32(1), @@ -116381,9 +116381,9 @@ 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(uint64(l)), message, ap) + l2 = Xvsnprintf(tls, bp+80+uintptr(l), uint64(1024)-uint64(l), message, ap) if l2 >= 0 { - if uint64(uint64(l2)) >= uint64(1024)-uint64(uint64(l)) { + if uint64(l2) >= uint64(1024)-uint64(l) { l = int32(Uint64FromInt64(1024) - Uint64FromInt32(1)) } else { l += l2 @@ -116393,7 +116393,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(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(uint64(l)), 0) < 0) && _log_opt&int32(LOG_CONS) != 0 { + 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 { 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))))) @@ -116501,7 +116501,7 @@ func X__mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd } var ret int64 _ = ret - if uint64(uint64(off))&(-Uint64FromUint64(0x2000)<<(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1))|(Uint64FromUint64(4096)-Uint64FromInt32(1))) != 0 { + if uint64(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)) } @@ -116517,7 +116517,7 @@ func X__mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd 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(uint64(ret)))) + return uintptr(X__syscall_ret(tls, uint64(ret))) } func Xmmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { @@ -116535,7 +116535,7 @@ func X__mprotect(tls *TLS, addr uintptr, len1 Tsize_t, prot int32) (r int32) { } var end, start Tsize_t _, _ = end, start - start = uint64(uint64(addr)) & uint64(-Int32FromInt32(PAGESIZE)) + 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))))) } @@ -116648,16 +116648,16 @@ func X__shm_mapname(tls *TLS, name uintptr, buf uintptr) (r uintptr) { } v1 = X__strchrnul(tls, name, int32('/')) p = v1 - if *(*int8)(unsafe.Pointer(v1)) != 0 || p == name || int64(int64(p))-int64(int64(name)) <= int64(2) && int32(*(*int8)(unsafe.Pointer(name))) == int32('.') && int32(*(*int8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { + if *(*int8)(unsafe.Pointer(v1)) != 0 || p == name || int64(p)-int64(name) <= int64(2) && int32(*(*int8)(unsafe.Pointer(name))) == int32('.') && int32(*(*int8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) == int32('.') { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return uintptr(0) } - if int64(int64(p))-int64(int64(name)) > int64(NAME_MAX) { + if int64(p)-int64(name) > int64(NAME_MAX) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(ENAMETOOLONG) return uintptr(0) } Xmemcpy(tls, buf, __ccgo_ts+978, uint64(9)) - Xmemcpy(tls, buf+uintptr(9), name, uint64(int64(int64(p))-int64(int64(name))+int64(1))) + Xmemcpy(tls, buf+uintptr(9), name, uint64(int64(p)-int64(name)+int64(1))) return buf } @@ -116723,11 +116723,11 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) { var b, v3 int32 var v1, v2 uint32 _, _, _, _ = b, v1, v2, v3 - b = int32(uint8(uint8(c))) - if uint32(uint32(b)) < uint32(128) { - v1 = uint32(uint32(b)) + b = int32(uint8(c)) + if uint32(b) < uint32(128) { + v1 = uint32(b) } else { - if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { + if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v3 = int32(4) } else { v3 = int32(1) @@ -116764,19 +116764,19 @@ func Xc16rtomb(tls *TLS, s uintptr, c16 Tchar16_t, ps uintptr) (r Tsize_t) { } return uint64(1) } - if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(uint32(c16))-uint32(0xd800) < uint32(0x400) { - *(*uint32)(unsafe.Pointer(x)) = uint32((int32(int32(c16)) - int32(0xd7c0)) << int32(10)) + if !(*(*uint32)(unsafe.Pointer(x)) != 0) && uint32(c16)-uint32(0xd800) < uint32(0x400) { + *(*uint32)(unsafe.Pointer(x)) = uint32((int32(c16) - int32(0xd7c0)) << int32(10)) return uint64(0) } if *(*uint32)(unsafe.Pointer(x)) != 0 { - if uint32(uint32(c16))-uint32(0xdc00) >= uint32(0x400) { + if uint32(c16)-uint32(0xdc00) >= uint32(0x400) { goto ilseq } else { - wc = int32(*(*uint32)(unsafe.Pointer(x)) + uint32(uint32(c16)) - uint32(0xdc00)) + wc = int32(*(*uint32)(unsafe.Pointer(x)) + uint32(c16) - uint32(0xdc00)) } *(*uint32)(unsafe.Pointer(x)) = uint32(0) } else { - wc = int32(int32(c16)) + wc = int32(c16) } return Xwcrtomb(tls, s, wc, uintptr(0)) ilseq: @@ -116793,7 +116793,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(int32(c32)), ps) + return Xwcrtomb(tls, s, int32(c32), ps) } func Xmblen(tls *TLS, s uintptr, n Tsize_t) (r int32) { @@ -116927,7 +116927,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolUint64(!!(v1 != 0)) } - if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { + if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v2 = int32(4) } else { v2 = int32(1) @@ -116956,7 +116956,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize n-- if !(c&(Uint32FromUint32(1)<= uint64(5) && !((*(*uint32)(unsafe.Pointer(s))|(*(*uint32)(unsafe.Pointer(s))-Uint32FromInt32(0x01010101)))&Uint32FromUint32(0x80808080) != 0) { v16 = ws ws += 4 @@ -117257,7 +117257,7 @@ resume: } v30 = ws ws += 4 - *(*Twchar_t)(unsafe.Pointer(v30)) = int32(int32(c)) + *(*Twchar_t)(unsafe.Pointer(v30)) = int32(c) wn-- c = uint32(0) goto _14 @@ -117322,7 +117322,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { *(*Twchar_t)(unsafe.Pointer(wc)) = v1 return BoolInt32(!!(v1 != 0)) } - if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { + if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v2 = int32(4) } else { v2 = int32(1) @@ -117350,7 +117350,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { s++ c = c<= uint32(0x40) { @@ -117360,7 +117360,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) { s++ c = c<= uint32(0x40) { @@ -117387,11 +117387,11 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) { if !(s != 0) { return uint64(1) } - if uint32(uint32(wc)) < uint32(0x80) { - *(*int8)(unsafe.Pointer(s)) = int8(int8(wc)) + if uint32(wc) < uint32(0x80) { + *(*int8)(unsafe.Pointer(s)) = int8(wc) return uint64(1) } else { - if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { + if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) } else { v1 = int32(1) @@ -117401,17 +117401,17 @@ 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)) } - *(*int8)(unsafe.Pointer(s)) = int8(int8(wc)) + *(*int8)(unsafe.Pointer(s)) = int8(wc) return uint64(1) } else { - if uint32(uint32(wc)) < uint32(0x800) { + if uint32(wc) < uint32(0x800) { v2 = s s++ *(*int8)(unsafe.Pointer(v2)) = int8(int32(0xc0) | wc>>Int32FromInt32(6)) *(*int8)(unsafe.Pointer(s)) = int8(int32(0x80) | wc&int32(0x3f)) return uint64(2) } else { - if uint32(uint32(wc)) < uint32(0xd800) || uint32(uint32(wc))-uint32(0xe000) < uint32(0x2000) { + if uint32(wc) < uint32(0xd800) || uint32(wc)-uint32(0xe000) < uint32(0x2000) { v3 = s s++ *(*int8)(unsafe.Pointer(v3)) = int8(int32(0xe0) | wc>>Int32FromInt32(12)) @@ -117421,7 +117421,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(uint32(wc))-uint32(0x10000) < uint32(0x100000) { + if uint32(wc)-uint32(0x10000) < uint32(0x100000) { v5 = s s++ *(*int8)(unsafe.Pointer(v5)) = int8(int32(0xf0) | wc>>Int32FromInt32(18)) @@ -117596,15 +117596,15 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) { var v1 int32 _ = v1 if c < uint32(128) { - return int32(int32(c)) + return int32(c) } - if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { + if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v1 = int32(4) } else { v1 = int32(1) } if v1 == int32(1) && c-uint32(0xdf80) < uint32(0x80) { - return int32(uint8(uint8(c))) + return int32(uint8(c)) } return -int32(1) } @@ -118696,12 +118696,12 @@ func _getoffs(tls *TLS, offs uintptr, base uintptr, s uintptr) (r int32) { if !(*(*uint8)(unsafe.Pointer(s)) != 0) { return i } - if int64(int64(s))-int64(int64(base)) >= int64(0x4000) { + if int64(s)-int64(base) >= int64(0x4000) { return 0 } v2 = i i++ - *(*int16)(unsafe.Pointer(offs + uintptr(v2)*2)) = int16(int64(int64(s)) - int64(int64(base))) + *(*int16)(unsafe.Pointer(offs + uintptr(v2)*2)) = int16(int64(s) - int64(base)) s += uintptr(int32(*(*uint8)(unsafe.Pointer(s))) + int32(1)) goto _1 _1: @@ -118768,7 +118768,7 @@ func _match(tls *TLS, offset uintptr, base uintptr, dn uintptr, end uintptr, len 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(uint64(l))) != 0 { + if l != int32(*(*uint8)(unsafe.Pointer(base + uintptr(o)))) || Xmemcmp(tls, base+uintptr(o)+uintptr(1), end, uint64(l)) != 0 { return m } *(*int32)(unsafe.Pointer(offset)) = o @@ -118813,7 +118813,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(int32(l))) + n = _getlens(tls, bp+4, src, int32(l)) if !(n != 0) { return -int32(1) } @@ -118828,7 +118828,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(uint64(m)) == l { + if uint64(m) == l { break } } @@ -118839,15 +118839,15 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l } } /* encode unmatched part */ - if uint64(uint64(space)) < l-uint64(uint64(bestlen))+uint64(2)+BoolUint64(uint64(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { + if uint64(space) < l-uint64(bestlen)+uint64(2)+BoolUint64(uint64(bestlen-Int32FromInt32(1)) < l-Uint64FromInt32(1)) { return -int32(1) } - Xmemcpy(tls, dst+uintptr(1), src, l-uint64(uint64(bestlen))) + Xmemcpy(tls, dst+uintptr(1), src, l-uint64(bestlen)) v3 = Int32FromInt32(0) j = v3 i = v3 for { - if !(uint64(uint64(i)) < l-uint64(uint64(bestlen))) { + if !(uint64(i) < l-uint64(bestlen)) { break } *(*uint8)(unsafe.Pointer(dst + uintptr(i))) = (*(*[127]uint8)(unsafe.Pointer(bp + 4)))[j] @@ -118865,7 +118865,7 @@ func Xdn_comp(tls *TLS, src uintptr, dst uintptr, space int32, dnptrs uintptr, l *(*uint8)(unsafe.Pointer(dst + uintptr(v5))) = uint8(int32(0xc0) | bestoff>>int32(8)) v6 = i i++ - *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(uint8(bestoff)) + *(*uint8)(unsafe.Pointer(dst + uintptr(v6))) = uint8(bestoff) } else { v7 = i i++ @@ -118909,7 +118909,7 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr /* detect reference loop using an iteration counter */ i = 0 for { - if !(int64(int64(i)) < int64(int64(end))-int64(int64(base))) { + if !(int64(i) < int64(end)-int64(base)) { break } /* loop invariants: p= int64(int64(end))-int64(int64(base)) { + if int64(j) >= int64(end)-int64(base) { return -int32(1) } p = base + uintptr(j) @@ -118935,7 +118935,7 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr v4 = p p++ j = int32(*(*uint8)(unsafe.Pointer(v4))) - if int64(int64(j)) >= int64(int64(end))-int64(int64(p)) || int64(int64(j)) >= int64(int64(dend))-int64(int64(dest)) { + if int64(j) >= int64(end)-int64(p) || int64(j) >= int64(dend)-int64(dest) { return -int32(1) } for { @@ -118953,7 +118953,7 @@ func X__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr } else { *(*int8)(unsafe.Pointer(dest)) = 0 if len1 < 0 { - len1 = int32(int64(p+uintptr(1)) - int64(int64(src))) + len1 = int32(int64(p+uintptr(1)) - int64(src)) } return len1 } @@ -118984,16 +118984,16 @@ func Xdn_skipname(tls *TLS, s uintptr, end uintptr) (r int32) { p = s for p < end { if !(*(*uint8)(unsafe.Pointer(p)) != 0) { - return int32(int64(int64(p)) - int64(int64(s)) + int64(1)) + return int32(int64(p) - int64(s) + int64(1)) } else { if int32(*(*uint8)(unsafe.Pointer(p))) >= int32(192) { if p+uintptr(1) < end { - return int32(int64(int64(p)) - int64(int64(s)) + int64(2)) + return int32(int64(p) - int64(s) + int64(2)) } else { break } } else { - if int64(int64(end))-int64(int64(p)) < int64(int32(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { + if int64(end)-int64(p) < int64(int32(*(*uint8)(unsafe.Pointer(p)))+int32(1)) { break } else { p += uintptr(int32(*(*uint8)(unsafe.Pointer(p))) + int32(1)) @@ -119122,7 +119122,7 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if !(v1 != 0) { break } - for int64(int64(p))-int64(int64(r)) < int64(int64(rlen)) && uint32(*(*uint8)(unsafe.Pointer(p)))-uint32(1) < uint32(127) { + for int64(p)-int64(r) < int64(rlen) && uint32(*(*uint8)(unsafe.Pointer(p)))-uint32(1) < uint32(127) { p++ } if p > r+uintptr(rlen)-uintptr(6) { @@ -119136,7 +119136,7 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr if !(v2 != 0) { break } - for int64(int64(p))-int64(int64(r)) < int64(int64(rlen)) && uint32(*(*uint8)(unsafe.Pointer(p)))-uint32(1) < uint32(127) { + for int64(p)-int64(r) < int64(rlen) && uint32(*(*uint8)(unsafe.Pointer(p)))-uint32(1) < uint32(127) { p++ } if p > r+uintptr(rlen)-uintptr(12) { @@ -119144,7 +119144,7 @@ func X__dns_parse(tls *TLS, r uintptr, rlen int32, callback uintptr, ctx uintptr } 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))) - if int64(len1+int32(10)) > int64(r+uintptr(rlen))-int64(int64(p)) { + 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 { @@ -119500,7 +119500,7 @@ func Xether_aton_r(tls *TLS, x uintptr, p_a uintptr) (r uintptr) { if n > uint64(0xFF) { return uintptr(0) } /* bad byte */ - *(*Tuint8_t)(unsafe.Pointer(bp + uintptr(ii))) = uint8(uint8(n)) + *(*Tuint8_t)(unsafe.Pointer(bp + uintptr(ii))) = uint8(n) goto _1 _1: ; @@ -119767,7 +119767,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } nais = nservs * naddrs canon_len = int32(Xstrlen(tls, bp+1352)) - out = Xcalloc(tls, uint64(1), uint64(uint64(nais))*uint64(88)+uint64(uint64(canon_len))+uint64(1)) + out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(88)+uint64(canon_len)+uint64(1)) if !(out != 0) { return -int32(10) } @@ -119789,7 +119789,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt if !(j < nservs) { break } - (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*88))).Fslot = int16(int16(k)) + (*(*Taibuf)(unsafe.Pointer(out + uintptr(k)*88))).Fslot = int16(k) if (*(*[48]Taddress)(unsafe.Pointer(bp + 8)))[i].Ffamily == int32(PF_INET) { v5 = uint64(16) } else { @@ -119829,7 +119829,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt ; i++ } - (*(*Taibuf)(unsafe.Pointer(out))).Fref = int16(int16(nais)) + (*(*Taibuf)(unsafe.Pointer(out))).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } @@ -119996,7 +119996,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(uint16(af)) + *(*uint16)(unsafe.Pointer(bp)) = uint16(af) if af == int32(PF_INET6) { v1 = uint64(28) } else { @@ -120016,26 +120016,26 @@ 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(uint64(buf)) & (Uint64FromInt64(8) - Uint64FromInt32(1))) + i = int32(uint64(buf) & (Uint64FromInt64(8) - Uint64FromInt32(1))) if !(i != 0) { i = int32(8) } - if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-uint64(uint64(i))+uint64(uint64(l)) { + if buflen <= Uint64FromInt32(5)*Uint64FromInt64(8)-uint64(i)+uint64(l) { return int32(ERANGE) } - buf += uintptr(uint64(8) - uint64(uint64(i))) - buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - uint64(uint64(i)) + uint64(uint64(l)) + buf += uintptr(uint64(8) - uint64(i)) + buflen -= Uint64FromInt32(5)*Uint64FromInt64(8) - uint64(i) + uint64(l) (*Thostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(Uint64FromInt32(2) * Uint64FromInt64(8)) (*Thostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(Uint64FromInt32(2) * Uint64FromInt64(8)) *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list)) = buf - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list)), a, uint64(uint64(l))) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list)), a, uint64(l)) buf += uintptr(l) *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_addr_list + 1*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) = buf *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) - switch Xgetnameinfo(tls, bp, sl, buf, uint32(uint32(buflen)), uintptr(0), uint32(0), 0) { + switch Xgetnameinfo(tls, bp, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { case -int32(3): *(*int32)(unsafe.Pointer(err)) = int32(TRY_AGAIN) return int32(EAGAIN) @@ -120053,7 +120053,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(int32(l)) + (*Thostent)(unsafe.Pointer(h)).Fh_length = int32(l) (*Thostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*Thostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 @@ -120138,7 +120138,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } (*Thostent)(unsafe.Pointer(h)).Fh_length = v1 /* Align buffer */ - align = -uint64(uint64(buf)) & (Uint64FromInt64(8) - Uint64FromInt32(1)) + 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 += Xstrlen(tls, name) + uint64(1) @@ -120409,16 +120409,16 @@ func _copy_addr(tls *TLS, r uintptr, af int32, sa uintptr, addr uintptr, addrlen 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(uint32(ifindex)) + (*(*Tsockaddr_in6)(unsafe.Pointer(sa))).Fsin6_scope_id = uint32(ifindex) } default: return } - if addrlen < uint64(uint64(len1)) { + if addrlen < uint64(len1) { return } - (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(uint16(af)) - Xmemcpy(tls, dst, addr, uint64(uint64(len1))) + (*Tsockany)(unsafe.Pointer(sa)).Fsa.Fsa_family = uint16(af) + Xmemcpy(tls, dst, addr, uint64(len1)) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -120429,12 +120429,12 @@ 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(uint64(prefixlen)) > Uint64FromInt32(8)*Uint64FromInt64(16) { + if uint64(prefixlen) > Uint64FromInt32(8)*Uint64FromInt64(16) { prefixlen = int32(Uint64FromInt32(8) * Uint64FromInt64(16)) } i = prefixlen / int32(8) - Xmemset(tls, bp, int32(0xff), uint64(uint64(i))) - if uint64(uint64(i)) < uint64(16) { + Xmemset(tls, bp, int32(0xff), uint64(i)) + if uint64(i) < uint64(16) { v1 = i i++ (*(*[16]Tuint8_t)(unsafe.Pointer(bp)))[v1] = uint8(int32(0xff) << (int32(8) - prefixlen%int32(8))) @@ -120449,7 +120449,7 @@ func _copy_lladdr(tls *TLS, r uintptr, sa uintptr, addr uintptr, addrlen Tsize_t (*(*Tsockaddr_ll_hack)(unsafe.Pointer(sa))).Fsll_family = uint16(PF_PACKET) (*(*Tsockaddr_ll_hack)(unsafe.Pointer(sa))).Fsll_ifindex = ifindex (*(*Tsockaddr_ll_hack)(unsafe.Pointer(sa))).Fsll_hatype = hatype - (*(*Tsockaddr_ll_hack)(unsafe.Pointer(sa))).Fsll_halen = uint8(uint8(addrlen)) + (*(*Tsockaddr_ll_hack)(unsafe.Pointer(sa))).Fsll_halen = uint8(addrlen) Xmemcpy(tls, sa+12, addr, addrlen) *(*uintptr)(unsafe.Pointer(r)) = sa } @@ -120497,7 +120497,7 @@ func _netlink_msg_to_ifaddr(tls *TLS, pctx uintptr, h uintptr) (r int32) { return 0 } } - ifs = Xcalloc(tls, uint64(1), uint64(200)+uint64(uint64(stats_len))) + ifs = Xcalloc(tls, uint64(1), uint64(200)+uint64(stats_len)) if ifs == uintptr(0) { return -int32(1) } @@ -120764,8 +120764,8 @@ func _reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int z++ } *(*int8)(unsafe.Pointer(z)) = 0 - if int64(int64(z))-int64(int64(p)) < int64(256) { - Xmemcpy(tls, buf, p, uint64(int64(int64(z))-int64(int64(p))+int64(1))) + if int64(z)-int64(p) < int64(256) { + Xmemcpy(tls, buf, p, uint64(int64(z)-int64(p)+int64(1))) break } } @@ -120820,7 +120820,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(uint64(port)) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { + if svport != uint64(port) || *(*uintptr)(unsafe.Pointer(bp + 128)) == p { continue } if dgram != 0 && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+1071, uint64(4)) != 0 { @@ -120829,10 +120829,10 @@ func _reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { if !(dgram != 0) && Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(bp + 128)), __ccgo_ts+1076, uint64(4)) != 0 { continue } - if int64(int64(p))-t__predefined_ptrdiff_t(bp) > int64(32) { + if int64(p)-t__predefined_ptrdiff_t(bp) > int64(32) { continue } - Xmemcpy(tls, buf, bp, uint64(int64(int64(p))-t__predefined_ptrdiff_t(bp))) + Xmemcpy(tls, buf, bp, uint64(int64(p)-t__predefined_ptrdiff_t(bp))) break } X__fclose_ca(tls, f) @@ -120869,14 +120869,14 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso switch af { case int32(PF_INET): a = sa + 4 - if uint64(uint64(sl)) < uint64(16) { + if uint64(sl) < uint64(16) { return -int32(6) } _mkptr4(tls, bp, a) scopeid = uint32(0) case int32(PF_INET6): a = sa + 8 - if uint64(uint64(sl)) < uint64(28) { + if uint64(sl) < uint64(28) { return -int32(6) } if Xmemcmp(tls, a, __ccgo_ts+1044, uint64(12)) != 0 { @@ -120899,7 +120899,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(uint64(rlen)) > uint64(512) { + if uint64(rlen) > uint64(512) { rlen = int32(512) } X__dns_parse(tls, bp+443, rlen, __ccgo_fp(_dns_parse_callback), bp+78) @@ -120924,7 +120924,7 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso Xstrcat(tls, bp+78, p) } } - if Xstrlen(tls, bp+78) >= uint64(uint64(nodelen)) { + if Xstrlen(tls, bp+78) >= uint64(nodelen) { return -int32(12) } Xstrcpy(tls, node, bp+78) @@ -120937,9 +120937,9 @@ func Xgetnameinfo(tls *TLS, sa uintptr, sl Tsocklen_t, node uintptr, nodelen Tso _reverse_services(tls, bp+78, port, flags&int32(NI_DGRAM)) } if !(*(*int8)(unsafe.Pointer(p1)) != 0) { - p1 = _itoa(tls, bp+334, uint32(uint32(port))) + p1 = _itoa(tls, bp+334, uint32(port)) } - if Xstrlen(tls, p1) >= uint64(uint64(servlen)) { + if Xstrlen(tls, p1) >= uint64(servlen) { return -int32(12) } Xstrcpy(tls, serv, p1) @@ -121019,8 +121019,8 @@ func Xgetservbyname_r(tls *TLS, name uintptr, prots uintptr, se uintptr, buf uin return int32(ENOENT) } /* Align buffer */ - align = int32(-uint64(uint64(buf)) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) - if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+uint64(uint64(align)) { + align = int32(-uint64(buf) & (Uint64FromInt64(16) - Uint64FromInt64(8) - Uint64FromInt32(1))) + if buflen < Uint64FromInt32(2)*Uint64FromInt64(8)+uint64(align) { return int32(ERANGE) } buf += uintptr(align) @@ -121216,7 +121216,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(uint64(r1)))) + return int32(X__syscall_ret(tls, uint64(r1))) } func X__h_errno_location(tls *TLS) (r uintptr) { @@ -121224,10 +121224,10 @@ func X__h_errno_location(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if !((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Fstack != 0) { + if !((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Fstack != 0) { return uintptr(unsafe.Pointer(&Xh_errno)) } - return uintptr(___get_tp(tls)) + 160 + return ___get_tp(tls) + 160 } func Xherror(tls *TLS, msg uintptr) { @@ -121351,7 +121351,7 @@ func Xhtons(tls *TLS, n Tuint16_t) (r Tuint16_t) { _4: v1 = int32(v3) } else { - v1 = int32(int32(n)) + v1 = int32(n) } return uint16(v1) } @@ -121378,7 +121378,7 @@ func Xif_indextoname(tls *TLS, index uint32, name uintptr) (r1 uintptr) { if v1 < 0 { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 16)) = int32(int32(index)) + *(*int32)(unsafe.Pointer(bp + 16)) = int32(index) r = Xioctl(tls, fd, int32(SIOCGIFNAME), VaList(bp+48, bp)) X__syscall1(tls, int64(SYS_close), int64(fd)) if r < 0 { @@ -121439,7 +121439,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(uint32(index)) && int32((*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen) == namelen && Xmemcmp(tls, map1+9, rta+UintptrFromInt64(4), uint64(uint64(namelen))) == 0 { + 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 { return 0 } i = (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next @@ -121459,12 +121459,12 @@ func _netlink_msg_to_nameindex(tls *TLS, pctx uintptr, h uintptr) (r int32) { return -int32(1) } (*Tifnameindexctx)(unsafe.Pointer(ctx)).Flist = map1 - (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fallocated = uint32(uint32(a)) + (*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(uint32(index)) - (*Tifnamemap)(unsafe.Pointer(map1)).Fnamelen = uint8(uint8(namelen)) - Xmemcpy(tls, map1+9, rta+UintptrFromInt64(4), uint64(uint64(namelen))) + (*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)) (*Tifnameindexctx)(unsafe.Pointer(ctx)).Fnum++ (*Tifnamemap)(unsafe.Pointer(map1)).Fhash_next = *(*uint32)(unsafe.Pointer(ctx + 24 + uintptr(bucket)*4)) @@ -121740,7 +121740,7 @@ 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(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 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 { return s } case int32(PF_INET6): @@ -121777,7 +121777,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l Tsocklen_t) (r uint (*(*[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))) } - if Xstrlen(tls, bp) < uint64(uint64(l)) { + if Xstrlen(tls, bp) < uint64(l) { Xstrcpy(tls, s, bp) return s } @@ -121837,7 +121837,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(uint8(v)) + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == int32(3) { return int32(1) } @@ -121899,7 +121899,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(uint16(v)) + (*(*[8]Tuint16_t)(unsafe.Pointer(bp)))[i&int32(7)] = uint16(v) if !(*(*int8)(unsafe.Pointer(s + uintptr(j))) != 0) && (brk >= 0 || i == int32(7)) { break } @@ -122014,9 +122014,9 @@ 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(int64(p))-int64(int64(name)) < int64(64) { - Xmemcpy(tls, bp+20, name, uint64(int64(int64(p))-int64(int64(name)))) - (*(*[64]int8)(unsafe.Pointer(bp + 20)))[int64(int64(p))-int64(int64(name))] = 0 + if p != 0 && int64(p)-int64(name) < int64(64) { + Xmemcpy(tls, bp+20, name, uint64(int64(p)-int64(name))) + (*(*[64]int8)(unsafe.Pointer(bp + 20)))[int64(p)-int64(name)] = 0 name = bp + 20 } if Xinet_pton(tls, int32(PF_INET6), name, bp+4) <= 0 { @@ -122048,7 +122048,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) (r i return -int32(2) } } - (*(*Taddress)(unsafe.Pointer(buf))).Fscopeid = uint32(uint32(scopeid)) + (*(*Taddress)(unsafe.Pointer(buf))).Fscopeid = uint32(scopeid) return int32(1) } @@ -122267,7 +122267,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(int64(z))-int64(int64(p))+int64(1))) + Xmemcpy(tls, canon, p, uint64(int64(z)-int64(p)+int64(1))) } } X__fclose_ca(tls, f) @@ -122324,7 +122324,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(uint64(len1))) + Xmemcpy(tls, (*Tdpc_ctx)(unsafe.Pointer(ctx)).Faddrs+uintptr(v1)*28+8, data, uint64(len1)) return 0 } @@ -122521,9 +122521,9 @@ func _name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, f if z == p { break } - if uint64(int64(int64(z))-int64(int64(p))) < uint64(256)-l-uint64(1) { - Xmemcpy(tls, canon+uintptr(l)+uintptr(1), p, uint64(int64(int64(z))-int64(int64(p)))) - *(*int8)(unsafe.Pointer(canon + uintptr(uint64(int64(int64(z))-int64(int64(p))+int64(1))+l))) = 0 + 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 cnt = _name_from_dns(tls, buf, canon, canon, family, bp+256) if cnt != 0 { return cnt @@ -122640,7 +122640,7 @@ func _prefixmatch(tls *TLS, s uintptr, d uintptr) (r int32) { ; i++ } - return int32(int32(i)) + return int32(i) } func _addrcmp(tls *TLS, _a uintptr, _b uintptr) (r int32) { @@ -122857,7 +122857,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i ; i++ } - Xqsort(tls, buf, uint64(uint64(cnt)), uint64(28), __ccgo_fp(_addrcmp)) + Xqsort(tls, buf, uint64(cnt), uint64(28), __ccgo_fp(_addrcmp)) _pthread_setcancelstate(tls, *(*int32)(unsafe.Pointer(bp)), uintptr(0)) return cnt } @@ -122908,8 +122908,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(uint8(proto)) - (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(uint8(socktype)) + (*(*Tservice)(unsafe.Pointer(buf))).Fproto = uint8(proto) + (*(*Tservice)(unsafe.Pointer(buf))).Fsocktype = uint8(socktype) return int32(1) } if name != 0 { @@ -122923,14 +122923,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -int32(8) } if proto != int32(IPPROTO_UDP) { - (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fport = uint16(uint16(port)) + (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fport = uint16(port) (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fsocktype = uint8(SOCK_STREAM) v1 = cnt cnt++ (*(*Tservice)(unsafe.Pointer(buf + uintptr(v1)*4))).Fproto = uint8(IPPROTO_TCP) } if proto != int32(IPPROTO_TCP) { - (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fport = uint16(uint16(port)) + (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fport = uint16(port) (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fsocktype = uint8(SOCK_DGRAM) v2 = cnt cnt++ @@ -123024,7 +123024,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i if proto == int32(IPPROTO_TCP) { continue } - (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fport = uint16(uint16(port)) + (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fport = uint16(port) (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fsocktype = uint8(SOCK_DGRAM) v20 = cnt cnt++ @@ -123034,7 +123034,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i if proto == int32(IPPROTO_UDP) { continue } - (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fport = uint16(uint16(port)) + (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fport = uint16(port) (*(*Tservice)(unsafe.Pointer(buf + uintptr(cnt)*4))).Fsocktype = uint8(SOCK_STREAM) v21 = cnt cnt++ @@ -123086,7 +123086,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(uint16(type1)) + })(unsafe.Pointer(bp))))).Fnlh.Fnlmsg_type = uint16(type1) (*(*struct { Fnlh Tnlmsghdr Fg Trtgenmsg @@ -123119,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))))).Fg.Frtgen_family = uint8(uint8(af)) + })(unsafe.Pointer(bp))))).Fg.Frtgen_family = uint8(af) r = int32(Xsend(tls, fd, bp, uint64(20), 0)) if r < 0 { return r @@ -123215,7 +123215,7 @@ func Xns_put16(tls *TLS, s uint32, cp uintptr) { *(*uint8)(unsafe.Pointer(v1)) = uint8(s >> int32(8)) v2 = cp cp++ - *(*uint8)(unsafe.Pointer(v2)) = uint8(uint8(s)) + *(*uint8)(unsafe.Pointer(v2)) = uint8(s) } func Xns_put32(tls *TLS, l uint64, cp uintptr) { @@ -123235,7 +123235,7 @@ func Xns_put32(tls *TLS, l uint64, cp uintptr) { *(*uint8)(unsafe.Pointer(v3)) = uint8(l >> int32(8)) v4 = cp cp++ - *(*uint8)(unsafe.Pointer(v4)) = uint8(uint8(l)) + *(*uint8)(unsafe.Pointer(v4)) = uint8(l) } func Xns_initparse(tls *TLS, msg uintptr, msglen int32, handle uintptr) (r1 int32) { @@ -123273,7 +123273,7 @@ func Xns_initparse(tls *TLS, msg uintptr, msglen int32, handle uintptr) (r1 int3 } if *(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(i)*2)) != 0 { *(*uintptr)(unsafe.Pointer(handle + 32 + uintptr(i)*8)) = msg - r = Xns_skiprr(tls, msg, (*Tns_msg)(unsafe.Pointer(handle)).F_eom, int32(i), int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(i)*2)))) + r = Xns_skiprr(tls, msg, (*Tns_msg)(unsafe.Pointer(handle)).F_eom, i, int32(*(*Tuint16_t)(unsafe.Pointer(handle + 20 + uintptr(i)*2)))) if r < 0 { return -int32(1) } @@ -123318,24 +123318,24 @@ func Xns_skiprr(tls *TLS, ptr uintptr, eom uintptr, section Tns_sect, count int3 if r < 0 { goto bad } - if int64(r+Int32FromInt32(2)*Int32FromInt32(NS_INT16SZ)) > int64(int64(eom))-int64(int64(p)) { + if int64(r+Int32FromInt32(2)*Int32FromInt32(NS_INT16SZ)) > int64(eom)-int64(p) { goto bad } p += uintptr(r + Int32FromInt32(2)*Int32FromInt32(NS_INT16SZ)) - if int32(section) != int32(_ns_s_qd) { - if int64(Int32FromInt32(NS_INT32SZ)+Int32FromInt32(NS_INT16SZ)) > int64(int64(eom))-int64(int64(p)) { + if section != int32(_ns_s_qd) { + if int64(Int32FromInt32(NS_INT32SZ)+Int32FromInt32(NS_INT16SZ)) > int64(eom)-int64(p) { goto bad } p += uintptr(NS_INT32SZ) p += uintptr(2) r = int32(Xns_get16(tls, p-uintptr(2))) - if int64(int64(r)) > int64(int64(eom))-int64(int64(p)) { + if int64(r) > int64(eom)-int64(p) { goto bad } p += uintptr(r) } } - return int32(int64(int64(p)) - int64(int64(ptr))) + return int32(int64(p) - int64(ptr)) bad: ; *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) @@ -123350,10 +123350,10 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin var r int32 var p1, p2, p3, p4 uintptr _, _, _, _, _ = r, p1, p2, p3, p4 - if int32(section) < 0 || int32(section) >= int32(_ns_s_max) { + if section < 0 || section >= int32(_ns_s_max) { goto bad } - if int32(section) != (*Tns_msg)(unsafe.Pointer(handle)).F_sect { + if section != (*Tns_msg)(unsafe.Pointer(handle)).F_sect { (*Tns_msg)(unsafe.Pointer(handle)).F_sect = section (*Tns_msg)(unsafe.Pointer(handle)).F_rrnum = 0 (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr = *(*uintptr)(unsafe.Pointer(handle + 32 + uintptr(section)*8)) @@ -123390,7 +123390,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin p2 = handle + 72 *(*uintptr)(unsafe.Pointer(p2)) += uintptr(2) (*Tns_rr)(unsafe.Pointer(rr)).Frr_class = uint16(Xns_get16(tls, *(*uintptr)(unsafe.Pointer(p2))-uintptr(2))) - if int32(section) != int32(_ns_s_qd) { + if section != int32(_ns_s_qd) { if int64(Int32FromInt32(NS_INT32SZ)+Int32FromInt32(NS_INT16SZ)) > int64((*Tns_msg)(unsafe.Pointer(handle)).F_eom)-int64((*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr) { goto size } @@ -123412,7 +123412,7 @@ func Xns_parserr(tls *TLS, handle uintptr, section Tns_sect, rrnum int32, rr uin } (*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))) { - (*Tns_msg)(unsafe.Pointer(handle)).F_sect = int32(section) + int32(1) + (*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) (*Tns_msg)(unsafe.Pointer(handle)).F_msg_ptr = UintptrFromInt32(0) @@ -123438,7 +123438,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(int32(dstsiz))) + r = Xdn_expand(tls, msg, eom, src, dst, int32(dstsiz)) if r < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EMSGSIZE) } @@ -123496,7 +123496,7 @@ func Xntohs(tls *TLS, n Tuint16_t) (r Tuint16_t) { _4: v1 = int32(v3) } else { - v1 = int32(int32(n)) + v1 = int32(n) } return uint16(v1) } @@ -123525,7 +123525,7 @@ func Xgetprotoent(tls *TLS) (r uintptr) { trc("tls=%v, (%v:)", tls, origin(2)) defer func() { trc("-> %v", r) }() } - if uint64(uint64(_idx)) >= uint64(239) { + if uint64(_idx) >= uint64(239) { return UintptrFromInt32(0) } _p.Fp_proto = int32(_protos[_idx]) @@ -123684,9 +123684,9 @@ func X__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t) { common: ; Xmemcpy(tls, bp, cmsg+UintptrFromInt32(1)*16, uint64(8)) - (*(*[2]int64)(unsafe.Pointer(bp + 8)))[0] = int64(*(*int64)(unsafe.Pointer(bp))) + (*(*[2]int64)(unsafe.Pointer(bp + 8)))[0] = *(*int64)(unsafe.Pointer(bp)) Xmemcpy(tls, bp, cmsg+UintptrFromInt32(1)*16+uintptr(8), uint64(8)) - (*(*[2]int64)(unsafe.Pointer(bp + 8)))[int32(1)] = int64(*(*int64)(unsafe.Pointer(bp))) + (*(*[2]int64)(unsafe.Pointer(bp + 8)))[int32(1)] = *(*int64)(unsafe.Pointer(bp)) goto _5 _5: } @@ -123804,11 +123804,11 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, return -int32(1) } n = int32(uint64(17) + l + BoolUint64(!!(l != 0))) - if l > uint64(253) || buflen < n || uint32(uint32(op)) > uint32(15) || uint32(uint32(class)) > uint32(255) || uint32(uint32(type1)) > uint32(255) { + if l > uint64(253) || buflen < n || uint32(op) > uint32(15) || uint32(class) > uint32(255) || uint32(type1) > uint32(255) { return -int32(1) } /* Construct query template - ID will be filled later */ - Xmemset(tls, bp, 0, uint64(uint64(n))) + Xmemset(tls, bp, 0, uint64(n)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(op*int32(8) + int32(1)) (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(32) /* AD */ (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(5)] = uint8(1) @@ -123837,14 +123837,14 @@ func X__res_mkquery(tls *TLS, op int32, dname uintptr, class int32, type1 int32, ; i = j + int32(1) } - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(uint8(type1)) - (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(uint8(class)) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(1)] = uint8(type1) + (*(*[280]uint8)(unsafe.Pointer(bp)))[i+int32(3)] = uint8(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(uint8(id)) - Xmemcpy(tls, buf, bp, uint64(uint64(n))) + (*(*[280]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(id) + Xmemcpy(tls, buf, bp, uint64(n)) return n } @@ -123991,7 +123991,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, _, _ = fd, r *(*[2]Tuint8_t)(unsafe.Pointer(bp + 32)) = [2]Tuint8_t{ 0: uint8(ql >> int32(8)), - 1: uint8(uint8(ql)), + 1: uint8(ql), } *(*[2]Tiovec)(unsafe.Pointer(bp)) = [2]Tiovec{ 0: { @@ -124000,7 +124000,7 @@ func _start_tcp(tls *TLS, pfd uintptr, family int32, sa uintptr, sl Tsocklen_t, }, 1: { Fiov_base: q, - Fiov_len: uint64(uint64(ql)), + Fiov_len: uint64(ql), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 40)) = Tmsghdr{ @@ -124111,18 +124111,18 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a family = int32(PF_INET) v1 = uint64(nqueries+int32(2)) * 8 pfd = Xrealloc(tls, pfd, v1) - v2 = uint64(uint64(nqueries)) * 4 + v2 = uint64(nqueries) * 4 qpos = Xrealloc(tls, qpos, v2) - v3 = uint64(uint64(nqueries)) * 4 + v3 = uint64(nqueries) * 4 apos = Xrealloc(tls, apos, v3) - v4 = uint64(uint64(nqueries)) * 2 + v4 = uint64(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) nns = 0 for { - if !(uint32(uint32(nns)) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { + if !(uint32(nns) < (*Tresolvconf)(unsafe.Pointer(conf)).Fnns) { break } iplit = conf + uintptr(nns)*28 @@ -124205,7 +124205,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(uint16(family)) + })(unsafe.Pointer(bp + 88))).Fsin.Fsin_family = uint16(family) if fd < 0 || Xbind(tls, fd, bp+88, sl) < 0 { if fd >= 0 { Xclose(tls, fd) @@ -124232,15 +124232,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(uint64(nqueries))) + Xmemset(tls, alens, 0, uint64(4)*uint64(nqueries)) retry_interval = timeout / attempts next = 0 v10 = _mtime(tls) t2 = v10 t0 = v10 - t1 = t2 - uint64(uint64(retry_interval)) + t1 = t2 - uint64(retry_interval) for { - if !(t2-t0 < uint64(uint64(timeout))) { + if !(t2-t0 < uint64(timeout)) { break } /* This is the loop exit condition: that all queries @@ -124258,7 +124258,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a if i == nqueries { break } - if t2-t1 >= uint64(uint64(retry_interval)) { + if t2-t1 >= uint64(retry_interval) { /* Query all configured namservers in parallel */ i = 0 for { @@ -124287,14 +124287,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(uint64(retry_interval))-t2)) <= 0 { + if Xpoll(tls, pfd, uint64(nqueries+int32(1)), int32(t1+uint64(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(uint64(asize)), + Fiov_len: uint64(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 232)) = Tmsghdr{ @@ -124314,7 +124314,7 @@ func X__res_msend_rc(tls *TLS, nqueries int32, queries uintptr, qlens uintptr, a /* Ignore replies from addresses we didn't send to */ j = 0 for { - if !(j < nns && Xmemcmp(tls, bp+116+uintptr(j)*28, bp+88, uint64(uint64(sl))) != 0) { + if !(j < nns && Xmemcmp(tls, bp+116+uintptr(j)*28, bp+88, uint64(sl)) != 0) { break } goto _15 @@ -124375,7 +124375,7 @@ 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(uint64(rlen))) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(answers + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(answers + uintptr(next)*8)), uint64(rlen)) } /* Ignore further UDP if all slots full or TCP-mode */ if next == nqueries { @@ -124446,7 +124446,7 @@ 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(uint64(asize)), + Fiov_len: uint64(asize), }, } *(*Tmsghdr)(unsafe.Pointer(bp + 344)) = Tmsghdr{ @@ -124757,7 +124757,7 @@ no_resolv_conf: X__lookup_ipliteral(tls, conf, __ccgo_ts+1242, PF_UNSPEC) nns = int32(1) } - (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(uint32(nns)) + (*Tresolvconf)(unsafe.Pointer(conf)).Fnns = uint32(nns) return 0 } @@ -124785,18 +124785,18 @@ func Xsendmmsg(tls *TLS, fd int32, msgvec uintptr, vlen uint32, flags uint32) (r } i = 0 for { - if !(uint32(uint32(i)) < vlen) { + if !(uint32(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(int32(flags))) + r = Xsendmsg(tls, fd, msgvec+uintptr(i)*64, int32(flags)) if r < 0 { goto error } - (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = uint32(uint32(r)) + (*(*Tmmsghdr)(unsafe.Pointer(msgvec + uintptr(i)*64))).Fmsg_len = uint32(r) goto _1 _1: ; @@ -124820,13 +124820,13 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { } bp := tls.Alloc(1120) defer tls.Free(1120) - var c, v3, v4 uintptr + var c1, v3, v4 uintptr var r, v12 int64 var v1, v5 int32 var v10, v11, v6, v7, v8, v9 Tsyscall_arg_t var _ /* chbuf at bp+56 */ [66]Tcmsghdr var _ /* h at bp+0 */ Tmsghdr - _, _, _, _, _, _, _, _, _, _, _, _, _ = c, r, v1, v10, v11, v12, v3, v4, v5, v6, v7, v8, v9 + _, _, _, _, _, _, _, _, _, _, _, _, _ = c1, r, v1, v10, v11, v12, v3, v4, v5, v6, v7, v8, v9 if msg != 0 { *(*Tmsghdr)(unsafe.Pointer(bp)) = *(*Tmsghdr)(unsafe.Pointer(msg)) v1 = Int32FromInt32(0) @@ -124845,21 +124845,21 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { } else { v3 = UintptrFromInt32(0) } - c = v3 + c1 = v3 for { - if !(c != 0) { + if !(c1 != 0) { break } - (*Tcmsghdr)(unsafe.Pointer(c)).F__pad1 = 0 + (*Tcmsghdr)(unsafe.Pointer(c1)).F__pad1 = 0 goto _2 _2: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(c)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c)).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(c)) { + 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)) { v4 = uintptr(0) } else { - v4 = c + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c)).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))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } - c = v4 + c1 = v4 } } } @@ -124984,7 +124984,7 @@ _9: if true { break } - if uint64(uint64(optlen)) < uint64(16) { + if uint64(optlen) < uint64(16) { return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) } tv = optval @@ -125066,7 +125066,7 @@ _9: } } } - return int32(X__syscall_ret(tls, uint64(uint64(r1)))) + return int32(X__syscall_ret(tls, uint64(r1))) } func Xshutdown(tls *TLS, fd int32, how int32) (r1 int32) { @@ -125168,7 +125168,7 @@ _9: _18: s = int32(v17) if s < 0 { - return int32(X__syscall_ret(tls, uint64(uint64(s)))) + return int32(X__syscall_ret(tls, uint64(s))) } if type1&int32(SOCK_CLOEXEC) != 0 { X__syscall3(tls, int64(SYS_fcntl), int64(s), int64(Int32FromInt32(F_SETFD)), int64(Int32FromInt32(FD_CLOEXEC))) @@ -125177,7 +125177,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(uint64(s)))) + return int32(X__syscall_ret(tls, uint64(s))) } func Xsocketpair(tls *TLS, domain int32, type1 int32, protocol int32, fd uintptr) (r2 int32) { @@ -125572,7 +125572,7 @@ func _getgr_r(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, size rv = int32(ERANGE) } if *(*uintptr)(unsafe.Pointer(res)) != 0 { - buf += uintptr((uint64(16) - uint64(uint64(buf))) % uint64(16)) + buf += uintptr((uint64(16) - uint64(buf)) % uint64(16)) (*Tgroup)(unsafe.Pointer(gr)).Fgr_mem = buf buf += uintptr((*(*Tsize_t)(unsafe.Pointer(bp + 24)) + uint64(1)) * uint64(8)) Xmemcpy(tls, buf, *(*uintptr)(unsafe.Pointer(bp)), *(*Tsize_t)(unsafe.Pointer(bp + 8))) @@ -125945,7 +125945,7 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u } n++ v9 = n - if v9 <= int64(int64(nlim)) { + if v9 <= int64(nlim) { v10 = groups groups += 4 *(*Tgid_t)(unsafe.Pointer(v10)) = (*(*Tgroup)(unsafe.Pointer(bp))).Fgr_gid @@ -125965,7 +125965,7 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u if *(*Tuint32_t)(unsafe.Pointer(nscdbuf + uintptr(i)*4)) != gid { n++ v12 = n - if v12 <= int64(int64(nlim)) { + if v12 <= int64(nlim) { v13 = groups groups += 4 *(*Tgid_t)(unsafe.Pointer(v13)) = *(*Tuint32_t)(unsafe.Pointer(nscdbuf + uintptr(i)*4)) @@ -125977,13 +125977,13 @@ func Xgetgrouplist(tls *TLS, user uintptr, gid Tgid_t, groups uintptr, ngroups u i++ } } - if n > int64(int64(nlim)) { + if n > int64(nlim) { v14 = int64(-int32(1)) } else { v14 = n } ret = int32(v14) - *(*int32)(unsafe.Pointer(ngroups)) = int32(int32(n)) + *(*int32)(unsafe.Pointer(ngroups)) = int32(n) cleanup: ; if f != 0 { @@ -126730,13 +126730,13 @@ func X__rand48_step(tls *TLS, xi uintptr, lc uintptr) (r Tuint64_t) { } var a, x Tuint64_t _, _ = a, x - x = uint64(uint64(uint32(*(*uint16)(unsafe.Pointer(xi)))|(uint32(*(*uint16)(unsafe.Pointer(xi + 1*2)))+0)<> int32(16)) *(*uint16)(unsafe.Pointer(xi + 2*2)) = uint16(x >> int32(32)) - return uint64(uint64(uint64(x)) & uint64(0xffffffffffff)) + return x & uint64(0xffffffffffff) } func Xerand48(tls *TLS, s uintptr) (r float64) { @@ -126757,7 +126757,7 @@ func Xerand48(tls *TLS, s uintptr) (r float64) { Ff [0]float64 Fu Tuint64_t }{} - *(*uint64)(unsafe.Pointer(bp)) = uint64(uint64(0x3ff0000000000000) | uint64(X__rand48_step(tls, s, uintptr(unsafe.Pointer(&X__seed48))+uintptr(3)*2)< %v", r) }() } - _seed = uint64(uint64(6364136223846793005)*uint64(uint64(_seed)) + uint64(1)) + _seed = uint64(6364136223846793005)*_seed + uint64(1) return int32(_seed >> int32(33)) } @@ -126897,7 +126897,7 @@ func _lcg31(tls *TLS, x Tuint32_t) (r Tuint32_t) { } func _lcg64(tls *TLS, x Tuint64_t) (r Tuint64_t) { - return uint64(uint64(6364136223846793005)*uint64(uint64(x)) + uint64(1)) + return uint64(6364136223846793005)*x + uint64(1) } func _savestate(tls *TLS) (r uintptr) { @@ -126916,9 +126916,9 @@ func ___srandom(tls *TLS, seed uint32) { var k, v1 int32 var s Tuint64_t _, _, _ = k, s, v1 - s = uint64(uint64(seed)) + s = uint64(seed) if _n == 0 { - *(*Tuint32_t)(unsafe.Pointer(_x1)) = uint32(uint32(s)) + *(*Tuint32_t)(unsafe.Pointer(_x1)) = uint32(s) return } if _n == int32(31) || _n == int32(7) { @@ -127057,7 +127057,7 @@ func Xsrand48(tls *TLS, seed int64) { defer tls.Free(16) *(*[3]uint16)(unsafe.Pointer(bp)) = [3]uint16{ 0: uint16(0x330e), - 1: uint16(uint16(seed)), + 1: uint16(seed), 2: uint16(seed >> int32(16)), } Xseed48(tls, bp) @@ -127246,7 +127246,7 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { v2 = l + k + uint64(1) b = Xrealloc(tls, b, v2) z = X__strchrnul(tls, p, int32(':')) - if uint64(int64(int64(z))-int64(int64(p))) >= l { + if uint64(int64(z)-int64(p)) >= l { v3 = z z++ if !(*(*int8)(unsafe.Pointer(v3)) != 0) { @@ -127254,9 +127254,9 @@ func X__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32) { } goto _1 } - Xmemcpy(tls, b, p, uint64(int64(int64(z))-int64(int64(p)))) - *(*int8)(unsafe.Add(unsafe.Pointer(b), int64(int64(z))-int64(int64(p)))) = int8('/') - Xmemcpy(tls, b+uintptr(int64(int64(z))-int64(int64(p)))+BoolUintptr(z > p), file, k+uint64(1)) + Xmemcpy(tls, b, p, uint64(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) switch *(*int32)(unsafe.Pointer(X__errno_location(tls))) { case int32(EACCES): @@ -127312,9 +127312,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } - X__procfdname(tls, bp, uint32(uint32(fd))) + X__procfdname(tls, bp, uint32(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) @@ -127634,10 +127634,10 @@ 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(uint32(flags)) & ^all_flags != 0 { + if uint32(flags) & ^all_flags != 0 { return int32(EINVAL) } - (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(int32(flags)) + (*Tposix_spawnattr_t)(unsafe.Pointer(attr)).F__flags = int32(flags) return 0 } @@ -127731,7 +127731,7 @@ 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(uint64(k)) + *(*Tsize_t)(unsafe.Pointer(step)) = uint64(k) return *(*Twchar_t)(unsafe.Pointer(bp)) } *(*Tsize_t)(unsafe.Pointer(step)) = uint64(1) @@ -127822,11 +127822,11 @@ func _casefold(tls *TLS, k int32) (r int32) { var c int32 var v1 uint32 _, _ = c, v1 - c = int32(Xtowupper(tls, uint32(uint32(k)))) + c = int32(Xtowupper(tls, uint32(k))) if c == k { - v1 = Xtowlower(tls, uint32(uint32(k))) + v1 = Xtowlower(tls, uint32(k)) } else { - v1 = uint32(uint32(c)) + v1 = uint32(c) } return int32(v1) } @@ -127870,7 +127870,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(uint32(k))-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) || uint32(uint32(kfold))-uint32(*(*Twchar_t)(unsafe.Pointer(bp))) <= uint32(*(*Twchar_t)(unsafe.Pointer(bp + 4))-*(*Twchar_t)(unsafe.Pointer(bp))) { + 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))) { return BoolInt32(!(inv != 0)) } } @@ -127884,10 +127884,10 @@ func _match_bracket(tls *TLS, p uintptr, k int32, kfold int32) (r int32) { for int32(*(*int8)(unsafe.Pointer(p + uintptr(-Int32FromInt32(1))))) != z || int32(*(*int8)(unsafe.Pointer(p))) != int32(']') { p++ } - if z == int32(':') && int64(p-uintptr(1))-int64(int64(p0)) < int64(16) { - Xmemcpy(tls, bp+8, p0, uint64(int64(p-uintptr(1))-int64(int64(p0)))) - (*(*[16]int8)(unsafe.Pointer(bp + 8)))[int64(p-uintptr(1))-int64(int64(p0))] = 0 - if Xiswctype(tls, uint32(uint32(k)), Xwctype(tls, bp+8)) != 0 || Xiswctype(tls, uint32(uint32(kfold)), Xwctype(tls, bp+8)) != 0 { + if z == int32(':') && int64(p-uintptr(1))-int64(p0) < int64(16) { + Xmemcpy(tls, bp+8, p0, uint64(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 { return BoolInt32(!(inv != 0)) } } @@ -127984,7 +127984,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(int64(endpat))-int64(int64(p))), bp, flags) { + switch _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) { case -int32(2): return int32(FNM_NOMATCH) case -int32(5): @@ -128016,7 +128016,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t, break } if v9 = uint32(*(*int8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) < uint32(128); !v9 { - if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { + if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v8 = int32(4) } else { v8 = int32(1) @@ -128045,9 +128045,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(int64(endpat))-int64(int64(p))), bp, flags) + c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) - v12 = _str_next(tls, s, uint64(int64(int64(endstr))-int64(int64(s))), bp+8) + v12 = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) k = v12 if v12 <= 0 { if c != END { @@ -128082,7 +128082,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(int64(endpat))-int64(int64(p))), bp, flags) + c = _pat_next(tls, p, uint64(int64(endpat)-int64(p)), bp, flags) p += uintptr(*(*Tsize_t)(unsafe.Pointer(bp))) /* Encountering * completes/commits a component */ if c == -int32(5) { @@ -128090,7 +128090,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(int64(endstr))-int64(int64(s))), bp+8) + k = _str_next(tls, s, uint64(int64(endstr)-int64(s)), bp+8) if !(k != 0) { return int32(FNM_NOMATCH) } @@ -128118,13 +128118,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(int64(endstr))-int64(int64(str))), bp+8) + k = _str_next(tls, str, uint64(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(int64(endstr))-int64(int64(str))), bp+8) < 0) { + if !(_str_next(tls, str, uint64(int64(endstr)-int64(str)), bp+8) < 0) { break } goto _16 @@ -128175,7 +128175,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(int64(p))-int64(int64(pat))), str, uint64(int64(int64(s))-int64(int64(str))), flags) != 0 { + if _fnmatch_internal(tls, pat, uint64(int64(p)-int64(pat)), str, uint64(int64(s)-int64(str)), flags) != 0 { return int32(FNM_NOMATCH) } if !(c != 0) { @@ -128196,7 +128196,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(int64(s))-int64(int64(str))), flags) != 0) { + if !(_fnmatch_internal(tls, pat, uint64(-Int32FromInt32(1)), str, uint64(int64(s)-int64(str)), flags) != 0) { return 0 } goto _5 @@ -128295,7 +128295,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag return 0 } pat += uintptr(i) - pos += uint64(uint64(j)) + pos += uint64(j) v4 = Int64FromInt32(0) j = v4 i = v4 @@ -128388,7 +128388,7 @@ func _do_glob(tls *TLS, buf uintptr, pos Tsize_t, type1 int32, pat uintptr, flag ; p-- } - if (int64(int64(p2))-int64(int64(p)))%int64(2) != 0 { + if (int64(p2)-int64(p))%int64(2) != 0 { p2-- saved_sep = int8('\\') } @@ -128986,7 +128986,7 @@ func _tre_ast_new_node(tls *TLS, mem Ttre_mem_t, type1 int32, obj uintptr) (r ui return uintptr(0) } (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fobj = obj - (*Ttre_ast_node_t)(unsafe.Pointer(node)).Ftype1 = int32(type1) + (*Ttre_ast_node_t)(unsafe.Pointer(node)).Ftype1 = type1 (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnullable = -int32(1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fsubmatch_id = -int32(1) return node @@ -129000,8 +129000,8 @@ func _tre_ast_new_literal(tls *TLS, mem Ttre_mem_t, code_min int32, code_max int if !(node != 0) { return uintptr(0) } - (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_min = int64(int64(code_min)) - (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_max = int64(int64(code_max)) + (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_min = int64(code_min) + (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_max = int64(code_max) (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = position return node } @@ -129017,7 +129017,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(uint32(minimal)), 0, 0x1) + SetBitFieldPtr8Uint32(iter+16, uint32(minimal), 0, 0x1) (*Ttre_ast_node_t)(unsafe.Pointer(node)).Fnum_submatches = (*Ttre_ast_node_t)(unsafe.Pointer(arg)).Fnum_submatches return node } @@ -129086,7 +129086,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(uint64(size))) + (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack = Xmalloc(tls, uint64(8)*uint64(size)) if (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack == UintptrFromInt32(0) { Xfree(tls, s) return UintptrFromInt32(0) @@ -129123,7 +129123,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(uint64(new_size))) + new_buffer = Xrealloc(tls, (*Ttre_stack_t)(unsafe.Pointer(s)).Fstack, uint64(8)*uint64(new_size)) if new_buffer == UintptrFromInt32(0) { return int32(REG_ESPACE) } @@ -129319,8 +129319,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(uint32(c))) != 0 { - v2 = int32(Xtowupper(tls, uint32(uint32(c)))) + if Xiswlower(tls, uint32(c)) != 0 { + v2 = int32(Xtowupper(tls, uint32(c))) e = v2 b = v2 c++ @@ -129329,7 +129329,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowupper(tls, uint32(uint32(c))) != uint32(uint32(e)) { + if Xtowupper(tls, uint32(c)) != uint32(e) { break } goto _3 @@ -129339,8 +129339,8 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { e++ } } else { - if Xiswupper(tls, uint32(uint32(c))) != 0 { - v4 = int32(Xtowlower(tls, uint32(uint32(c)))) + if Xiswupper(tls, uint32(c)) != 0 { + v4 = int32(Xtowlower(tls, uint32(c))) e = v4 b = v4 c++ @@ -129349,7 +129349,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(c <= max) { break } - if Xtowlower(tls, uint32(uint32(c))) != uint32(uint32(e)) { + if Xtowlower(tls, uint32(c)) != uint32(e) { break } goto _5 @@ -129367,7 +129367,7 @@ func _add_icase_literals(tls *TLS, ls uintptr, min int32, max int32) (r int32) { if !(lit != 0) { return -int32(1) } - (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_min = int64(int64(b)) + (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_min = int64(b) (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_max = int64(e - int32(1)) (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) goto _1 @@ -129444,7 +129444,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(uint64(len1))) + Xmemcpy(tls, bp+4, s, uint64(len1)) (*(*[15]int8)(unsafe.Pointer(bp + 4)))[len1] = 0 class = Xwctype(tls, bp+4) break @@ -129490,8 +129490,8 @@ func _parse_bracket_terms(tls *TLS, ctx uintptr, s uintptr, ls uintptr, neg uint if !(lit != 0) { return int32(REG_ESPACE) } - (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_min = int64(int64(min)) - (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_max = int64(int64(max)) + (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_min = int64(min) + (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_max = int64(max) (*Ttre_literal_t)(unsafe.Pointer(lit)).Fclass = class (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = -int32(1) /* Add opposite-case codepoints if REG_ICASE is present. @@ -129601,8 +129601,8 @@ func _parse_bracket(tls *TLS, ctx uintptr, s uintptr) (r Treg_errcode_t) { goto _2 } negmax = min - int32(1) - (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_min = int64(int64(negmin)) - (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_max = int64(int64(negmax)) + (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_min = int64(negmin) + (*Ttre_literal_t)(unsafe.Pointer(lit)).Fcode_max = int64(negmax) negmin = max + int32(1) } (*Ttre_literal_t)(unsafe.Pointer(lit)).Fposition = (*Ttre_parse_ctx_t)(unsafe.Pointer(ctx)).Fposition @@ -132166,7 +132166,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { ; i++ } - transitions = Xcalloc(tls, uint64(uint32(uint32(add))+uint32(1)), uint64(56)) + transitions = Xcalloc(tls, uint64(uint32(add)+uint32(1)), uint64(56)) if transitions == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132174,7 +132174,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(uint32(add)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(add) errcode = _tre_ast_to_tnfa(tls, tree, transitions, counts, offs) if errcode != REG_OK { errcode = errcode @@ -132189,7 +132189,7 @@ func Xregcomp(tls *TLS, preg uintptr, regex uintptr, cflags int32) (r int32) { i++ p += 56 } - initial = Xcalloc(tls, uint64(uint32(uint32(i))+uint32(1)), uint64(56)) + initial = Xcalloc(tls, uint64(uint32(i)+uint32(1)), uint64(56)) if initial == UintptrFromInt32(0) { errcode = int32(REG_ESPACE) if int32(1) != 0 { @@ -132236,7 +132236,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(uint32(add)) + (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_transitions = uint32(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 @@ -132493,7 +132493,7 @@ 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(uint64(num_tags)) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { + if uint64(num_tags) > uint64(0xffffffffffffffff)/(Uint64FromInt32(8)*Uint64FromInt64(8)*uint64((*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_states)) { return int32(REG_ESPACE) } /* Likewise check rbytes. */ @@ -132505,10 +132505,10 @@ func _tre_tnfa_run_parallel(tls *TLS, tnfa uintptr, string1 uintptr, match_tags return int32(REG_ESPACE) } /* Compute the length of the block we need. */ - tbytes = uint64(8) * uint64(uint64(num_tags)) + 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(uint64(num_tags)) + 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 /* Allocate the memory. */ buf = Xcalloc(tls, total_bytes, uint64(1)) @@ -132518,32 +132518,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(int64(tmp_buf)))%uint64(8) != 0 { - v1 = uint64(8) - uint64(int64(int64(tmp_buf)))%uint64(8) + if uint64(int64(tmp_buf))%uint64(8) != 0 { + v1 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) } else { v1 = uint64(0) } tmp_buf += uintptr(v1) reach_next = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(int64(tmp_buf)))%uint64(8) != 0 { - v2 = uint64(8) - uint64(int64(int64(tmp_buf)))%uint64(8) + if uint64(int64(tmp_buf))%uint64(8) != 0 { + v2 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) } else { v2 = uint64(0) } tmp_buf += uintptr(v2) reach = tmp_buf tmp_buf += uintptr(rbytes) - if uint64(int64(int64(tmp_buf)))%uint64(8) != 0 { - v3 = uint64(8) - uint64(int64(int64(tmp_buf)))%uint64(8) + if uint64(int64(tmp_buf))%uint64(8) != 0 { + v3 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) } else { v3 = uint64(0) } tmp_buf += uintptr(v3) reach_pos = tmp_buf tmp_buf += uintptr(pbytes) - if uint64(int64(int64(tmp_buf)))%uint64(8) != 0 { - v4 = uint64(8) - uint64(int64(int64(tmp_buf)))%uint64(8) + if uint64(int64(tmp_buf))%uint64(8) != 0 { + v4 = uint64(8) - uint64(int64(tmp_buf))%uint64(8) } else { v4 = uint64(0) } @@ -132594,7 +132594,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(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(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(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(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, 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))) { trans_i += 56 continue } @@ -132733,8 +132733,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(uint32(prev_c)) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(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(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(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(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(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(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(uint32(prev_c))), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(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(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 <= 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)) { goto _14 } /* Compute the tags after this transition. */ @@ -132989,7 +132989,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(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(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(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(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, 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))) { goto _4 } if state == UintptrFromInt32(0) { @@ -133117,7 +133117,7 @@ _9: 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(uint64(bt_len))) + result = Xstrncmp(tls, string1+uintptr(so), str_byte-uintptr(1), uint64(bt_len)) if result == 0 { /* Back reference matched. Check for infinite loop. */ if bt_len == 0 { @@ -133173,8 +133173,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(uint32(prev_c)) && (*Ttre_tnfa_transition_t)(unsafe.Pointer(trans_i)).Fcode_max >= uint32(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(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(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(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(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(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(uint32(prev_c))), *(*Ttre_ctype_t)(unsafe.Pointer(trans_i + 40))) != 0) && !(Xiswctype(tls, Xtowupper(tls, uint32(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(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 <= 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)) { goto _13 } if next_state == UintptrFromInt32(0) { @@ -133353,7 +133353,7 @@ func _tre_fill_pmatch(tls *TLS, nmatch Tsize_t, pmatch uintptr, cflags int32, tn if match_eo >= 0 && !(cflags&Int32FromInt32(REG_NOSUB) != 0) { /* Construct submatch offsets from the tags. */ submatch_data = (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fsubmatch_data - for i < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches && uint64(uint64(i)) < nmatch { + for i < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches && uint64(i) < nmatch { if (*(*Ttre_submatch_data_t)(unsafe.Pointer(submatch_data + uintptr(i)*16))).Fso_tag == (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fend_tag { (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(i)*16))).Frm_so = match_eo } else { @@ -133376,7 +133376,7 @@ func _tre_fill_pmatch(tls *TLS, nmatch Tsize_t, pmatch uintptr, cflags int32, tn /* Reset all submatches that are not within all of their parent submatches. */ i = uint32(0) - for i < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches && uint64(uint64(i)) < nmatch { + for i < (*Ttre_tnfa_t)(unsafe.Pointer(tnfa)).Fnum_submatches && uint64(i) < nmatch { if (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(i)*16))).Frm_eo == int64(-int32(1)) { } parents = (*(*Ttre_submatch_data_t)(unsafe.Pointer(submatch_data + uintptr(i)*16))).Fparents @@ -133400,7 +133400,7 @@ func _tre_fill_pmatch(tls *TLS, nmatch Tsize_t, pmatch uintptr, cflags int32, tn i++ } } - for uint64(uint64(i)) < nmatch { + for uint64(i) < nmatch { (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(i)*16))).Frm_so = int64(-int32(1)) (*(*Tregmatch_t)(unsafe.Pointer(pmatch + uintptr(i)*16))).Frm_eo = int64(-int32(1)) i++ @@ -133534,7 +133534,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(uint64(block_size))) + (*Ttre_list_t)(unsafe.Pointer(l)).Fdata = Xmalloc(tls, uint64(block_size)) if (*Ttre_list_t)(unsafe.Pointer(l)).Fdata == UintptrFromInt32(0) { Xfree(tls, l) (*Ttre_mem_struct)(unsafe.Pointer(mem)).Ffailed = int32(1) @@ -133549,7 +133549,7 @@ 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(uint64(block_size)) + (*Ttre_mem_struct)(unsafe.Pointer(mem)).Fn = uint64(block_size) } } /* Make sure the next pointer will be aligned. */ @@ -133775,7 +133775,7 @@ func ___hsearch_r(tls *TLS, item TENTRY, action TACTION, retval uintptr, htab ui *(*uintptr)(unsafe.Pointer(retval)) = e return int32(1) } - if int32(action) == int32(_FIND) { + if action == int32(_FIND) { *(*uintptr)(unsafe.Pointer(retval)) = uintptr(0) return 0 } @@ -134238,7 +134238,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(uint64(mask))), + 0: int64(uint64(mask)), 1: int64(Int32FromInt32(_NSIG) / Int32FromInt32(8)), } if ts != 0 { @@ -134370,7 +134370,7 @@ 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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_getitimer), int64(which), int64(old))))) } @@ -134457,7 +134457,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, uint64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig))))) X__restore_sigs(tls, bp) return ret } @@ -134509,7 +134509,7 @@ 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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } return int32(X__syscall_ret(tls, uint64(X__syscall3(tls, int64(SYS_setitimer), int64(which), int64(new1), int64(old))))) } @@ -134613,7 +134613,7 @@ func X__libc_sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) (*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))) } - return int32(X__syscall_ret(tls, uint64(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func X__sigaction(tls *TLS, sig int32, sa uintptr, old uintptr) (r1 int32) { @@ -134626,7 +134626,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(uint32(sig))-uint32(32) < uint32(3) || uint32(uint32(sig))-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if uint32(sig)-uint32(32) < uint32(3) || uint32(sig)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } @@ -134661,11 +134661,11 @@ 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(uint32(sig))-uint32(32) < uint32(3) { + if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8)) |= uint64(1) << (uint64(uint64(s)) & (Uint64FromInt32(8)*Uint64FromInt64(8) - Uint64FromInt32(1))) + *(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8)) |= uint64(1) << (uint64(s) & (Uint64FromInt32(8)*Uint64FromInt64(8) - Uint64FromInt32(1))) return 0 } @@ -134731,11 +134731,11 @@ 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(uint32(sig))-uint32(32) < uint32(3) { + if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) || uint32(sig)-uint32(32) < uint32(3) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return -int32(1) } - *(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8)) &= ^(Uint64FromUint64(1) << (uint64(uint64(s)) & (Uint64FromInt32(8)*Uint64FromInt64(8) - Uint64FromInt32(1)))) + *(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8)) &= ^(Uint64FromUint64(1) << (uint64(s) & (Uint64FromInt32(8)*Uint64FromInt64(8) - Uint64FromInt32(1)))) return 0 } @@ -134810,7 +134810,7 @@ func Xsigismember(tls *TLS, set uintptr, sig int32) (r int32) { if s >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { return 0 } - return BoolInt32(!!(*(*uint64)(unsafe.Pointer(set + uintptr(uint64(s/uint32(8))/uint64(8))*8))&(Uint64FromUint64(1)<<(uint64(uint64(s))&(Uint64FromInt32(8)*Uint64FromInt64(8)-Uint64FromInt32(1)))) != 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)) } func Xsigorset(tls *TLS, dest uintptr, left uintptr, right uintptr) (r1 int32) { @@ -134956,7 +134956,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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } func Xsigwait(tls *TLS, mask uintptr, sig uintptr) (r int32) { @@ -135050,9 +135050,9 @@ func Xfchmod(tls *TLS, fd int32, mode Tmode_t) (r int32) { _ = ret ret = int32(X__syscall2(tls, int64(SYS_fchmod), int64(fd), int64(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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } - X__procfdname(tls, bp, uint32(uint32(fd))) + X__procfdname(tls, bp, uint32(fd)) return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_chmod), int64(bp), int64(mode))))) } @@ -135072,7 +135072,7 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in } ret = int32(X__syscall4(tls, int64(SYS_fchmodat2), int64(fd), int64(path), int64(mode), int64(flag))) if ret != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } if flag != int32(AT_SYMLINK_NOFOLLOW) { return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) @@ -135089,9 +135089,9 @@ func Xfchmodat(tls *TLS, fd int32, path uintptr, mode Tmode_t, flag int32) (r in if fd2 == -int32(ELOOP) { return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EOPNOTSUPP)))) } - return int32(X__syscall_ret(tls, uint64(uint64(fd2)))) + return int32(X__syscall_ret(tls, uint64(fd2))) } - X__procfdname(tls, bp+144, uint32(uint32(fd2))) + X__procfdname(tls, bp+144, uint32(fd2)) ret = Xstat(tls, bp+144, bp) if !(ret != 0) { if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) { @@ -135175,13 +135175,13 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r return ret } *(*Tstat)(unsafe.Pointer(st)) = Tstat{ - Fst_dev: uint64(uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_dev_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(uint32(fd))) + X__procfdname(tls, bp+144, uint32(fd)) ret = int32(X__syscall2(tls, int64(SYS_stat), int64(bp+144), int64(bp))) } } @@ -135289,11 +135289,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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } } ret = _fstatat_kstat(tls, fd, path, st, flag) - return int32(X__syscall_ret(tls, uint64(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } func Xfstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int32) { @@ -135519,7 +135519,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } tv = uintptr(0) if times != 0 { @@ -135545,10 +135545,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } r = int32(X__syscall2(tls, int64(SYS_utimes), int64(path), int64(tv))) - return int32(X__syscall_ret(tls, uint64(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func X__fclose_ca(tls *TLS, f uintptr) (r int32) { @@ -135698,7 +135698,7 @@ 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(uint8(_c)) + *(*uint8)(unsafe.Pointer(bp)) = uint8(_c) if !((*TFILE)(unsafe.Pointer(f)).Fwend != 0) && X__towrite(tls, f) != 0 { return -int32(1) } @@ -135812,8 +135812,8 @@ func X__stdio_read(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { *(*uint32)(unsafe.Pointer(f)) |= uint32(v2) return uint64(0) } - if uint64(uint64(cnt)) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { - return uint64(uint64(cnt)) + if uint64(cnt) <= (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len { + return uint64(cnt) } cnt = Tssize_t(uint64(cnt) - (*(*[2]Tiovec)(unsafe.Pointer(bp)))[0].Fiov_len) (*TFILE)(unsafe.Pointer(f)).Frpos = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -135864,7 +135864,7 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) 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(uint64(cnt)) == rem { + if uint64(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 @@ -135885,14 +135885,14 @@ func X__stdio_write(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) } return v5 } - rem -= uint64(uint64(cnt)) - if uint64(uint64(cnt)) > (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len { + rem -= uint64(cnt) + if uint64(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(uint64(cnt)) + (*(*Tiovec)(unsafe.Pointer(iov))).Fiov_len -= uint64(cnt) goto _1 _1: } @@ -136465,17 +136465,17 @@ _9: return c } -func Xfgetc(tls *TLS, f uintptr) (r int32) { +func Xfgetc(tls *TLS, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) + trc("tls=%v f1=%v, (%v:)", tls, f1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v2, v4 int32 var v1, v5, v6 uintptr _, _, _, _, _, _ = l, v1, v2, v4, v5, v6 - v1 = f + v1 = f1 l = AtomicLoadPInt32(v1 + 140) - if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid { + if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { if (*TFILE)(unsafe.Pointer(v1)).Frpos != (*TFILE)(unsafe.Pointer(v1)).Frend { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) @@ -136529,14 +136529,14 @@ func Xfgetln(tls *TLS, f uintptr, plen uintptr) (r uintptr) { ret = (*TFILE)(unsafe.Pointer(f)).Frpos z++ v7 = z - *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(int64(v7) - int64(int64(ret))) + *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(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(uint64(l)) + *(*Tsize_t)(unsafe.Pointer(plen)) = uint64(l) ret = (*TFILE)(unsafe.Pointer(f)).Fgetln_buf } } @@ -136557,7 +136557,7 @@ func Xfgetpos(tls *TLS, f uintptr, pos uintptr) (r int32) { if off < 0 { return -int32(1) } - *(*int64)(unsafe.Pointer(pos)) = int64(int64(off)) + *(*int64)(unsafe.Pointer(pos)) = off return 0 } @@ -136596,7 +136596,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { 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))) if z != 0 { - v2 = int64(int64(z)) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) + 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) } @@ -136632,7 +136632,7 @@ func Xfgets(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { break } n-- - v8 = int8(int8(c)) + v8 = int8(c) v9 = p p++ *(*int8)(unsafe.Pointer(v9)) = v8 @@ -136719,7 +136719,7 @@ func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { var ploc uintptr var wc Twchar_t _, _, _ = loc, ploc, wc - ploc = uintptr(___get_tp(tls)) + 168 + ploc = ___get_tp(tls) + 168 loc = *(*Tlocale_t)(unsafe.Pointer(ploc)) if (*TFILE)(unsafe.Pointer(f)).Fmode <= 0 { Xfwide(tls, f, int32(1)) @@ -136727,7 +136727,7 @@ func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) { *(*Tlocale_t)(unsafe.Pointer(ploc)) = (*TFILE)(unsafe.Pointer(f)).Flocale wc = int32(___fgetwc_unlocked_internal(tls, f)) *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(uint32(wc)) + return uint32(wc) } func Xfgetwc(tls *TLS, f uintptr) (r Twint_t) { @@ -136798,7 +136798,7 @@ func Xfgetws(tls *TLS, s uintptr, n int32, f uintptr) (r uintptr) { } v4 = p p += 4 - *(*Twchar_t)(unsafe.Pointer(v4)) = int32(int32(c)) + *(*Twchar_t)(unsafe.Pointer(v4)) = int32(c) if c == uint32('\n') { break } @@ -136870,7 +136870,7 @@ func Xflockfile(tls *TLS, f uintptr) { return } ___lockfile(tls, f) - X__register_locked_file(tls, f, uintptr(___get_tp(tls))) + X__register_locked_file(tls, f, ___get_tp(tls)) } type Tcookie = struct { @@ -136895,7 +136895,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(uint32(whence)) > uint32(2)) { + if !(uint32(whence) > uint32(2)) { goto _1 } fail: @@ -137113,8 +137113,8 @@ func _cookieread(tls *TLS, f uintptr, buf uintptr, len1 Tsize_t) (r Tsize_t) { if ret <= 0 { goto bail } - readlen += uint64(uint64(ret)) - remain -= uint64(uint64(ret)) + readlen += uint64(ret) + remain -= uint64(ret) } if !((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0) || remain > BoolUint64(!!((*TFILE)(unsafe.Pointer(f)).Fbuf_size != 0)) { return readlen @@ -137172,7 +137172,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(uint64(ret)) + return uint64(ret) } func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { @@ -137183,7 +137183,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(uint32(whence)) > uint32(2) { + if uint32(whence) > uint32(2) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EINVAL) return int64(-int32(1)) } @@ -137193,7 +137193,7 @@ func _cookieseek(tls *TLS, f uintptr, _off Toff_t, whence int32) (r Toff_t) { } res = (*(*func(*TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tfcookie)(unsafe.Pointer(fc)).Fiofuncs.Fseek})))(tls, (*Tfcookie)(unsafe.Pointer(fc)).Fcookie, bp, whence) if res < 0 { - return int64(int64(res)) + return int64(res) } return *(*Toff_t)(unsafe.Pointer(bp)) } @@ -137321,19 +137321,19 @@ _10: return c } -func Xfputc(tls *TLS, c int32, f uintptr) (r int32) { +func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v c=%v f=%v, (%v:)", tls, c, f, origin(2)) + trc("tls=%v c1=%v f1=%v, (%v:)", tls, c1, f1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v1, v3, v5 int32 var v2, v7, v8 uintptr var v6 uint8 _, _, _, _, _, _, _, _ = l, v1, v2, v3, v5, v6, v7, v8 - v1 = c - v2 = f + v1 = c1 + 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 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) v8 = v2 + 40 @@ -137385,7 +137385,7 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { var v2 uint8 var _ /* mbc at bp+0 */ [4]int8 _, _, _, _, _, _, _ = l, loc, ploc, v1, v2, v3, v4 - ploc = uintptr(___get_tp(tls)) + 168 + ploc = ___get_tp(tls) + 168 loc = *(*Tlocale_t)(unsafe.Pointer(ploc)) if (*TFILE)(unsafe.Pointer(f)).Fmode <= 0 { Xfwide(tls, f, int32(1)) @@ -137413,16 +137413,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(uint64(l)), f) < uint64(uint64(l)) { + if l < 0 || X__fwritex(tls, bp, uint64(l), f) < uint64(l) { c = Int32FromUint32(0xffffffff) } } } - if uint32(uint32(c)) == uint32(0xffffffff) { + if uint32(c) == uint32(0xffffffff) { *(*uint32)(unsafe.Pointer(f)) |= uint32(F_ERR) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return uint32(uint32(c)) + return uint32(c) } func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137442,7 +137442,7 @@ func Xfputwc(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { if __need_unlock != 0 { ___unlockfile(tls, f) } - return uint32(uint32(c)) + return uint32(c) } func Xfputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) { @@ -137477,7 +137477,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { var _ /* buf at bp+8 */ [1024]uint8 _, _, _, _, _, _, _ = __need_unlock, l, loc, ploc, v1, v2, v3 l = uint64(0) - ploc = uintptr(___get_tp(tls)) + 168 + ploc = ___get_tp(tls) + 168 loc = *(*Tlocale_t)(unsafe.Pointer(ploc)) if AtomicLoadPInt32(f+140) >= 0 { v1 = ___lockfile(tls, f) @@ -137507,7 +137507,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) { ___unlockfile(tls, f) } *(*Tlocale_t)(unsafe.Pointer(ploc)) = loc - return int32(int32(l)) /* 0 or -1 */ + return int32(l) /* 0 or -1 */ } func Xfputws_unlocked(tls *TLS, _ws uintptr, f uintptr) (r int32) { @@ -137761,7 +137761,7 @@ func Xfsetpos(tls *TLS, f uintptr, pos uintptr) (r int32) { trc("tls=%v f=%v pos=%v, (%v:)", tls, f, pos, origin(2)) defer func() { trc("-> %v", r) }() } - return X__fseeko(tls, f, int64(*(*int64)(unsafe.Pointer(pos))), 0) + return X__fseeko(tls, f, *(*int64)(unsafe.Pointer(pos)), 0) } /* Support signed or unsigned plain-char */ @@ -137851,7 +137851,7 @@ func X__do_orphaned_stdio_locks(tls *TLS) { } var f uintptr _ = f - f = (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Fstdio_locks + f = (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Fstdio_locks for { if !(f != 0) { break @@ -137879,7 +137879,7 @@ func X__unlist_locked_file(tls *TLS, f uintptr) { if (*TFILE)(unsafe.Pointer(f)).Fprev_locked != 0 { (*TFILE)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fprev_locked)).Fnext_locked = (*TFILE)(unsafe.Pointer(f)).Fnext_locked } else { - (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Fstdio_locks = (*TFILE)(unsafe.Pointer(f)).Fnext_locked + (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Fstdio_locks = (*TFILE)(unsafe.Pointer(f)).Fnext_locked } } } @@ -137906,7 +137906,7 @@ func Xftrylockfile(tls *TLS, f uintptr) (r int32) { var self Tpthread_t var v5 bool _, _, _, _, _, _, _ = owner, self, tid, v1, v2, v3, v5 - self = uintptr(___get_tp(tls)) + self = ___get_tp(tls) tid = (*t__pthread)(unsafe.Pointer(self)).Ftid owner = AtomicLoadPInt32(f + 140) if owner & ^Int32FromInt32(MAYBE_WAITERS) == tid { @@ -137968,7 +137968,7 @@ func Xfwide(tls *TLS, f uintptr, mode int32) (r int32) { __need_unlock = v1 if mode != 0 { if !((*TFILE)(unsafe.Pointer(f)).Flocale != 0) { - if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) { + if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) { v3 = int32(4) } else { v3 = int32(1) @@ -138160,17 +138160,17 @@ _9: return c } -func Xgetc(tls *TLS, f uintptr) (r int32) { +func Xgetc(tls *TLS, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) + trc("tls=%v f1=%v, (%v:)", tls, f1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v2, v4 int32 var v1, v5, v6 uintptr _, _, _, _, _, _ = l, v1, v2, v4, v5, v6 - v1 = f + v1 = f1 l = AtomicLoadPInt32(v1 + 140) - if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid { + if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { if (*TFILE)(unsafe.Pointer(v1)).Frpos != (*TFILE)(unsafe.Pointer(v1)).Frend { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) @@ -138188,12 +138188,12 @@ _3: return v2 } -func X_IO_getc(tls *TLS, f uintptr) (r int32) { +func X_IO_getc(tls *TLS, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) + trc("tls=%v f1=%v, (%v:)", tls, f1, origin(2)) defer func() { trc("-> %v", r) }() } - return Xgetc(tls, f) + return Xgetc(tls, f1) } func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { @@ -138290,7 +138290,7 @@ func Xgetchar(tls *TLS) (r int32) { _, _, _, _, _, _ = l, v1, v2, v4, v5, v6 v1 = uintptr(unsafe.Pointer(&X__stdin_FILE)) l = AtomicLoadPInt32(v1 + 140) - if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid { + if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { if (*TFILE)(unsafe.Pointer(v1)).Frpos != (*TFILE)(unsafe.Pointer(v1)).Frend { v6 = v1 + 8 v5 = *(*uintptr)(unsafe.Pointer(v6)) @@ -138361,7 +138361,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize 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))) if z != 0 { - v3 = int64(int64(z)) - int64((*TFILE)(unsafe.Pointer(f)).Frpos) + int64(1) + 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) } @@ -138430,9 +138430,9 @@ 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(uint8(c)) + *(*uint8)(unsafe.Pointer(v8)) = uint8(c) } else { - v10 = int8(int8(c)) + v10 = int8(c) v11 = i i++ *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)) + uintptr(v11))) = v10 @@ -138447,7 +138447,7 @@ func Xgetdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize if __need_unlock != 0 { ___unlockfile(tls, f) } - return int64(int64(i)) + return int64(i) } func X__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t) { @@ -138498,7 +138498,7 @@ func Xgets(tls *TLS, s uintptr) (r uintptr) { } v6 = i i++ - *(*int8)(unsafe.Pointer(s + uintptr(v6))) = int8(int8(c)) + *(*int8)(unsafe.Pointer(s + uintptr(v6))) = int8(c) } *(*int8)(unsafe.Pointer(s + uintptr(i))) = 0 if c != int32('\n') && (!((*TFILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stdin_FILE)))).Fflags&Uint32FromInt32(F_EOF) != 0) || !(i != 0)) { @@ -138611,7 +138611,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(uint32(whence)) > uint32(2)) { + if !(uint32(whence) > uint32(2)) { goto _1 } fail: @@ -138744,7 +138744,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(uint32(whence)) > uint32(2)) { + if !(uint32(whence) > uint32(2)) { goto _1 } fail: @@ -138884,7 +138884,7 @@ func Xpclose(tls *TLS, f uintptr) (r1 int32) { } } if r < 0 { - return int32(X__syscall_ret(tls, uint64(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } return *(*int32)(unsafe.Pointer(bp)) } @@ -138988,19 +138988,19 @@ _10: return c } -func Xputc(tls *TLS, c int32, f uintptr) (r int32) { +func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v c=%v f=%v, (%v:)", tls, c, f, origin(2)) + trc("tls=%v c1=%v f1=%v, (%v:)", tls, c1, f1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v1, v3, v5 int32 var v2, v7, v8 uintptr var v6 uint8 _, _, _, _, _, _, _, _ = l, v1, v2, v3, v5, v6, v7, v8 - v1 = c - v2 = f + v1 = c1 + 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 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) v8 = v2 + 40 @@ -139020,12 +139020,12 @@ _4: return v3 } -func X_IO_putc(tls *TLS, c int32, f uintptr) (r int32) { +func X_IO_putc(tls *TLS, c1 int32, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v c=%v f=%v, (%v:)", tls, c, f, origin(2)) + trc("tls=%v c1=%v f1=%v, (%v:)", tls, c1, f1, origin(2)) defer func() { trc("-> %v", r) }() } - return Xputc(tls, c, f) + return Xputc(tls, c1, f1) } func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { @@ -139118,19 +139118,19 @@ _10: return c } -func Xputchar(tls *TLS, c int32) (r int32) { +func Xputchar(tls *TLS, c1 int32) (r int32) { if __ccgo_strace { - trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) + trc("tls=%v c1=%v, (%v:)", tls, c1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v1, v3, v5 int32 var v2, v7, v8 uintptr var v6 uint8 _, _, _, _, _, _, _, _ = l, v1, v2, v3, v5, v6, v7, v8 - v1 = c + v1 = c1 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 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) v8 = v2 + 40 @@ -139253,7 +139253,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xrename(tls *TLS, old uintptr, new1 uintptr) (r int32) { @@ -139636,12 +139636,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(uint8(c)) + *(*uint8)(unsafe.Pointer(v2)) = uint8(c) *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { ___unlockfile(tls, f) } - return int32(uint8(uint8(c))) + return int32(uint8(c)) } func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { @@ -139657,7 +139657,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { var v3 bool var _ /* mbc at bp+0 */ [4]uint8 _, _, _, _, _, _, _, _, _, _ = __need_unlock, l, loc, ploc, v1, v2, v3, v4, v5, p6 - ploc = uintptr(___get_tp(tls)) + 168 + ploc = ___get_tp(tls) + 168 loc = *(*Tlocale_t)(unsafe.Pointer(ploc)) if AtomicLoadPInt32(f+140) >= 0 { v1 = ___lockfile(tls, f) @@ -139673,7 +139673,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(int32(c)), uintptr(0))) + v2 = int32(Xwcrtomb(tls, bp, int32(c), uintptr(0))) l = v2 } if v3 || v2 < 0 || (*TFILE)(unsafe.Pointer(f)).Frpos < (*TFILE)(unsafe.Pointer(f)).Fbuf-uintptr(UNGET)+uintptr(l) { @@ -139687,11 +139687,11 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) { v5 = f + 8 *(*uintptr)(unsafe.Pointer(v5))-- v4 = *(*uintptr)(unsafe.Pointer(v5)) - *(*uint8)(unsafe.Pointer(v4)) = uint8(uint8(c)) + *(*uint8)(unsafe.Pointer(v4)) = uint8(c) } else { p6 = f + 8 *(*uintptr)(unsafe.Pointer(p6)) -= uintptr(l) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint64(uint64(l))) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p6)), bp, uint64(l)) } *(*uint32)(unsafe.Pointer(f)) &= uint32(^Int32FromInt32(F_EOF)) if __need_unlock != 0 { @@ -139715,13 +139715,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(uint32(l))+uint32(1))) + v1 = Xmalloc(tls, uint64(uint32(l)+uint32(1))) *(*uintptr)(unsafe.Pointer(s)) = v1 } if v2 || !(v1 != 0) { return -int32(1) } - return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(uint32(uint32(l))+uint32(1)), fmt, ap) + return Xvsnprintf(tls, *(*uintptr)(unsafe.Pointer(s)), uint64(uint32(l)+uint32(1)), fmt, ap) } func Xvdprintf(tls *TLS, fd int32, fmt uintptr, ap Tva_list) (r int32) { @@ -139909,7 +139909,7 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { 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)))) + (*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))))) case int32(_USHORT): @@ -139931,7 +139931,7 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): - *(*float64)(unsafe.Pointer(arg)) = float64(VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap)))) + *(*float64)(unsafe.Pointer(arg)) = VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_LDBL): *(*float64)(unsafe.Pointer(arg)) = VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap))) } @@ -139949,18 +139949,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(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { + if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))|Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))) != 0 || l >= w { return } l = w - l - if uint64(uint64(l)) > uint64(256) { + if uint64(l) > uint64(256) { v1 = uint64(256) } else { - v1 = uint64(uint64(l)) + v1 = uint64(l) } - Xmemset(tls, bp, int32(int32(c)), v1) + Xmemset(tls, bp, int32(c), v1) for { - if !(uint64(uint64(l)) >= uint64(256)) { + if !(uint64(l) >= uint64(256)) { break } _out(tls, f, bp, uint64(256)) @@ -139969,7 +139969,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(uint64(l))) + _out(tls, f, bp, uint64(l)) } var _xdigits1 = [16]int8{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} @@ -140072,17 +140072,17 @@ func _fmt_fp(tls *TLS, f uintptr, y float64, w int32, p int32, fl int32, t int32 prefix = __ccgo_ts + 1603 ebuf = bp + 538 + uintptr(Uint64FromInt32(3)*Uint64FromInt64(4)) pl = int32(1) - *(*float64)(unsafe.Pointer(bp)) = float64(float64(y)) + *(*float64)(unsafe.Pointer(bp)) = y v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: if int32(v1>>Int32FromInt32(63)) != 0 { y = -y } else { - if uint32(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { + if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('+')-Int32FromUint8(' '))) != 0 { prefix += uintptr(3) } else { - if uint32(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { + if uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8(' ')-Int32FromUint8(' '))) != 0 { prefix += uintptr(6) } else { prefix++ @@ -140090,7 +140090,7 @@ _2: } } } - *(*float64)(unsafe.Pointer(bp)) = float64(float64(y)) + *(*float64)(unsafe.Pointer(bp)) = y v3 = *(*uint64)(unsafe.Pointer(bp)) goto _4 _4: @@ -140109,10 +140109,10 @@ _4: } s1 = v6 } - _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(uint32(fl)) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) - _out(tls, f, prefix, uint64(uint64(pl))) + _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(fl) & ^(Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' '))))) + _out(tls, f, prefix, uint64(pl)) _out(tls, f, s1, uint64(3)) - _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(uint32(fl))^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, int32(3)+pl, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > int32(3)+pl { v7 = w } else { @@ -140179,32 +140179,32 @@ _4: *(*int8)(unsafe.Pointer(v13)) = int8(t + (Int32FromUint8('p') - Int32FromUint8('a'))) s = bp + 516 for cond := true; cond; cond = y != 0 { - x = int32(int32(y)) + x = int32(y) v14 = s s++ *(*int8)(unsafe.Pointer(v14)) = int8(int32(_xdigits1[x]) | t&int32(32)) - y = Float64FromInt32(16) * (y - float64(float64(x))) - if int64(int64(s))-t__predefined_ptrdiff_t(bp+516) == int64(1) && (y != 0 || p > 0 || uint32(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + 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) { v15 = s s++ *(*int8)(unsafe.Pointer(v15)) = int8('.') } } - if int64(int64(p)) > int64(Int32FromInt32(INT_MAX)-Int32FromInt32(2))-(int64(int64(ebuf))-int64(int64(estr)))-int64(int64(pl)) { + if int64(p) > int64(Int32FromInt32(INT_MAX)-Int32FromInt32(2))-(int64(ebuf)-int64(estr))-int64(pl) { return -int32(1) } - if p != 0 && int64(int64(s))-t__predefined_ptrdiff_t(bp+516)-int64(2) < int64(int64(p)) { - l = int32(int64(p+Int32FromInt32(2)) + (int64(int64(ebuf)) - int64(int64(estr)))) + if p != 0 && int64(s)-t__predefined_ptrdiff_t(bp+516)-int64(2) < int64(p) { + l = int32(int64(p+Int32FromInt32(2)) + (int64(ebuf) - int64(estr))) } else { - l = int32(int64(int64(s)) - t__predefined_ptrdiff_t(bp+516) + (int64(int64(ebuf)) - int64(int64(estr)))) + 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(uint64(pl))) - _pad3(tls, f, int8('0'), w, pl+l, int32(uint32(uint32(fl))^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) - _out(tls, f, bp+516, uint64(int64(int64(s))-t__predefined_ptrdiff_t(bp+516))) - _pad3(tls, f, int8('0'), int32(int64(int64(l))-(int64(int64(ebuf))-int64(int64(estr)))-(int64(int64(s))-t__predefined_ptrdiff_t(bp+516))), 0, 0) - _out(tls, f, estr, uint64(int64(int64(ebuf))-int64(int64(estr)))) - _pad3(tls, f, int8(' '), w, pl+l, int32(uint32(uint32(fl))^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _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))) + _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(' ')))) if w > pl+l { v16 = w } else { @@ -140233,7 +140233,7 @@ _4: a = v19 } for cond := true; cond; cond = y != 0 { - *(*Tuint32_t)(unsafe.Pointer(z)) = uint32(uint32(y)) + *(*Tuint32_t)(unsafe.Pointer(z)) = uint32(y) v21 = z z += 4 y = Float64FromInt32(1000000000) * (y - float64(*(*Tuint32_t)(unsafe.Pointer(v21)))) @@ -140251,7 +140251,7 @@ _4: if !(d >= a) { break } - x1 = uint64(*(*Tuint32_t)(unsafe.Pointer(d)))< int64(int64(need)) { + if (int64(z)-int64(b))/4 > int64(need) { z = b + uintptr(need)*4 } *(*int32)(unsafe.Pointer(bp + 512)) += sh1 } if a < z { i = int32(10) - e = int32(Int64FromInt32(9) * ((int64(int64(r)) - int64(int64(a))) / 4)) + e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(uint32(i))) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { break } goto _29 @@ -140329,7 +140329,7 @@ _4: } /* Perform rounding: j is precision after the radix (possibly neg) */ j = p - BoolInt32(t|int32(32) != int32('f'))*e - BoolInt32(t|int32(32) == int32('g') && p != 0) - if int64(int64(j)) < int64(9)*((int64(int64(z))-int64(int64(r)))/4-int64(1)) { + if int64(j) < int64(9)*((int64(z)-int64(r))/4-int64(1)) { /* We avoid C's broken division of negative numbers */ d = r + uintptr(1)*4 + uintptr((j+Int32FromInt32(9)*Int32FromInt32(LDBL_MAX_EXP))/Int32FromInt32(9)-Int32FromInt32(LDBL_MAX_EXP))*4 j += Int32FromInt32(9) * Int32FromInt32(LDBL_MAX_EXP) @@ -140346,11 +140346,11 @@ _4: i *= int32(10) j++ } - x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(uint32(i)) + x2 = *(*Tuint32_t)(unsafe.Pointer(d)) % uint32(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(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))/uint32(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)) { @@ -140369,7 +140369,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(uint32(i)) + *(*Tuint32_t)(unsafe.Pointer(d)) = *(*Tuint32_t)(unsafe.Pointer(d)) + uint32(i) for *(*Tuint32_t)(unsafe.Pointer(d)) > uint32(999999999) { v31 = d d -= 4 @@ -140382,9 +140382,9 @@ _4: *(*Tuint32_t)(unsafe.Pointer(d))++ } i = int32(10) - e = int32(Int64FromInt32(9) * ((int64(int64(r)) - int64(int64(a))) / 4)) + e = int32(Int64FromInt32(9) * ((int64(r) - int64(a)) / 4)) for { - if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(uint32(i))) { + if !(*(*Tuint32_t)(unsafe.Pointer(a)) >= uint32(i)) { break } goto _33 @@ -140419,13 +140419,13 @@ _4: t -= int32(2) p-- } - if !(uint32(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if !(uint32(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(uint32(i)) == uint32(0)) { + if !(*(*Tuint32_t)(unsafe.Pointer(z + uintptr(-Int32FromInt32(1))*4))%uint32(i) == uint32(0)) { break } goto _35 @@ -140438,35 +140438,35 @@ _4: j = int32(9) } if t|int32(32) == int32('f') { - if int64(Int32FromInt32(0)) > int64(9)*((int64(int64(z))-int64(int64(r)))/4-int64(1))-int64(int64(j)) { + if int64(Int32FromInt32(0)) > int64(9)*((int64(z)-int64(r))/4-int64(1))-int64(j) { v37 = int64(Int32FromInt32(0)) } else { - v37 = int64(9)*((int64(int64(z))-int64(int64(r)))/4-int64(1)) - int64(int64(j)) + v37 = int64(9)*((int64(z)-int64(r))/4-int64(1)) - int64(j) } if int64(p) < v37 { v36 = int64(p) } else { - if int64(Int32FromInt32(0)) > int64(9)*((int64(int64(z))-int64(int64(r)))/4-int64(1))-int64(int64(j)) { + if int64(Int32FromInt32(0)) > int64(9)*((int64(z)-int64(r))/4-int64(1))-int64(j) { v38 = int64(Int32FromInt32(0)) } else { - v38 = int64(9)*((int64(int64(z))-int64(int64(r)))/4-int64(1)) - int64(int64(j)) + v38 = int64(9)*((int64(z)-int64(r))/4-int64(1)) - int64(j) } v36 = v38 } p = int32(v36) } else { - if int64(Int32FromInt32(0)) > int64(9)*((int64(int64(z))-int64(int64(r)))/4-int64(1))+int64(int64(e))-int64(int64(j)) { + if int64(Int32FromInt32(0)) > int64(9)*((int64(z)-int64(r))/4-int64(1))+int64(e)-int64(j) { v40 = int64(Int32FromInt32(0)) } else { - v40 = int64(9)*((int64(int64(z))-int64(int64(r)))/4-int64(1)) + int64(int64(e)) - int64(int64(j)) + v40 = int64(9)*((int64(z)-int64(r))/4-int64(1)) + int64(e) - int64(j) } if int64(p) < v40 { v39 = int64(p) } else { - if int64(Int32FromInt32(0)) > int64(9)*((int64(int64(z))-int64(int64(r)))/4-int64(1))+int64(int64(e))-int64(int64(j)) { + if int64(Int32FromInt32(0)) > int64(9)*((int64(z)-int64(r))/4-int64(1))+int64(e)-int64(j) { v41 = int64(Int32FromInt32(0)) } else { - v41 = int64(9)*((int64(int64(z))-int64(int64(r)))/4-int64(1)) + int64(int64(e)) - int64(int64(j)) + v41 = int64(9)*((int64(z)-int64(r))/4-int64(1)) + int64(e) - int64(j) } v39 = v41 } @@ -140474,10 +140474,10 @@ _4: } } } - if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { + if p > Int32FromInt32(INT_MAX)-Int32FromInt32(1)-BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) { return -int32(1) } - l = int32(1) + p + BoolInt32(p != 0 || uint32(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) + l = int32(1) + p + BoolInt32(p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0) if t|int32(32) == int32('f') { if e > int32(INT_MAX)-l { return -int32(1) @@ -140492,7 +140492,7 @@ _4: v42 = e } estr = _fmt_u(tls, uint64(v42), ebuf) - for int64(int64(ebuf))-int64(int64(estr)) < int64(2) { + for int64(ebuf)-int64(estr) < int64(2) { estr-- v43 = estr *(*int8)(unsafe.Pointer(v43)) = int8('0') @@ -140507,18 +140507,18 @@ _4: *(*int8)(unsafe.Pointer(v44)) = int8(v45) estr-- v46 = estr - *(*int8)(unsafe.Pointer(v46)) = int8(int8(t)) - if int64(int64(ebuf))-int64(int64(estr)) > int64(int32(INT_MAX)-l) { + *(*int8)(unsafe.Pointer(v46)) = int8(t) + if int64(ebuf)-int64(estr) > int64(int32(INT_MAX)-l) { return -int32(1) } - l = int32(int64(l) + (int64(int64(ebuf)) - int64(int64(estr)))) + l = int32(int64(l) + (int64(ebuf) - int64(estr))) } if l > int32(INT_MAX)-pl { return -int32(1) } _pad3(tls, f, int8(' '), w, pl+l, fl) - _out(tls, f, prefix, uint64(uint64(pl))) - _pad3(tls, f, int8('0'), w, pl+l, int32(uint32(uint32(fl))^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) + _out(tls, f, prefix, uint64(pl)) + _pad3(tls, f, int8('0'), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('0')-Int32FromUint8(' ')))) if t|int32(32) == int32('f') { if a > r { a = r @@ -140542,13 +140542,13 @@ _4: *(*int8)(unsafe.Pointer(v49)) = int8('0') } } - _out(tls, f, s2, uint64(int64(bp+516+uintptr(9))-int64(int64(s2)))) + _out(tls, f, s2, uint64(int64(bp+516+uintptr(9))-int64(s2))) goto _47 _47: ; d += 4 } - if p != 0 || uint32(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p != 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+575, uint64(1)) } for { @@ -140599,26 +140599,26 @@ _4: v56 = s4 s4++ _out(tls, f, v56, uint64(1)) - if p > 0 || uint32(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { + if p > 0 || uint32(fl)&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 { _out(tls, f, __ccgo_ts+575, uint64(1)) } } - if int64(bp+516+UintptrFromInt32(9))-int64(int64(s4)) < int64(p) { - v57 = int64(bp+516+UintptrFromInt32(9)) - int64(int64(s4)) + if int64(bp+516+UintptrFromInt32(9))-int64(s4) < int64(p) { + v57 = int64(bp+516+UintptrFromInt32(9)) - int64(s4) } else { v57 = int64(p) } _out(tls, f, s4, uint64(v57)) - p = int32(int64(p) - (int64(bp+516+UintptrFromInt32(9)) - int64(int64(s4)))) + p = int32(int64(p) - (int64(bp+516+UintptrFromInt32(9)) - int64(s4))) goto _53 _53: ; d += 4 } _pad3(tls, f, int8('0'), p+int32(18), int32(18), 0) - _out(tls, f, estr, uint64(int64(int64(ebuf))-int64(int64(estr)))) + _out(tls, f, estr, uint64(int64(ebuf)-int64(estr))) } - _pad3(tls, f, int8(' '), w, pl+l, int32(uint32(uint32(fl))^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) + _pad3(tls, f, int8(' '), w, pl+l, int32(uint32(fl)^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > pl+l { v58 = w } else { @@ -140635,7 +140635,7 @@ func _getint(tls *TLS, s uintptr) (r int32) { if !(BoolInt32(uint32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(uint32(i)) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if uint32(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')) @@ -140702,12 +140702,12 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, z++ *(*uintptr)(unsafe.Pointer(bp)) += uintptr(2) } - if int64(int64(z))-int64(int64(a)) > int64(int32(INT_MAX)-cnt) { + if int64(z)-int64(a) > int64(int32(INT_MAX)-cnt) { goto overflow } - l = int32(int64(int64(z)) - int64(int64(a))) + l = int32(int64(z) - int64(a)) if f != 0 { - _out(tls, f, a, uint64(uint64(l))) + _out(tls, f, a, uint64(l)) } if l != 0 { goto _1 @@ -140823,13 +140823,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(int32(st)) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(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(int32(st)), ap) + _pop_arg(tls, bp+8, int32(st), ap) } else { return 0 } @@ -140905,17 +140905,17 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_BARE): *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = cnt case uint32(_LPRE): - *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(int64(cnt)) + *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(cnt) case uint32(_LLPRE): - *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(int64(cnt)) + *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint16(uint16(cnt)) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint16(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint8(uint8(cnt)) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint8(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(uint64(cnt)) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(uint64(cnt)) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) = uint64(cnt) break } goto _1 @@ -140944,8 +140944,8 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, _13: ; a = _fmt_o(tls, *(*Tuintmax_t)(unsafe.Pointer(bp + 8)), z) - if fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 && int64(int64(p)) < int64(int64(z))-int64(int64(a))+int64(1) { - p = int32(int64(int64(z)) - int64(int64(a)) + int64(1)) + if fl&(Uint32FromUint32(1)<<(Int32FromUint8('#')-Int32FromUint8(' '))) != 0 && int64(p) < int64(z)-int64(a)+int64(1) { + p = int32(int64(z) - int64(a) + int64(1)) } _32: ; @@ -140985,10 +140985,10 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, a = z goto _30 } - if int64(p) > int64(int64(z))-int64(int64(a))+BoolInt64(!(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0)) { + if int64(p) > int64(z)-int64(a)+BoolInt64(!(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0)) { v34 = int64(p) } else { - v34 = int64(int64(z)) - int64(int64(a)) + BoolInt64(!(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0)) + v34 = int64(z) - int64(a) + BoolInt64(!(*(*Tuintmax_t)(unsafe.Pointer(bp + 8)) != 0)) } p = int32(v34) goto _30 @@ -141031,7 +141031,7 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if p < 0 && *(*int8)(unsafe.Pointer(z)) != 0 { goto overflow } - p = int32(int64(int64(z)) - int64(int64(a))) + p = int32(int64(z) - int64(a)) fl &= ^(Uint32FromUint32(1) << (Int32FromUint8('0') - Int32FromUint8(' '))) goto _30 _20: @@ -141050,19 +141050,19 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, l = v42 i = uint64(v42) for { - if v45 = i < uint64(uint64(p)) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v45 { + if v45 = i < uint64(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(uint64(l)) <= uint64(uint64(p))-i) { + if !(v45 && v43 >= 0 && uint64(l) <= uint64(p)-i) { break } goto _41 _41: ; - i += uint64(uint64(l)) + i += uint64(l) } if l < 0 { return -int32(1) @@ -141070,25 +141070,25 @@ func _printf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if i > uint64(INT_MAX) { goto overflow } - p = int32(int32(i)) - _pad3(tls, f, int8(' '), w, p, int32(int32(fl))) + p = int32(i) + _pad3(tls, f, int8(' '), w, p, int32(fl)) ws = *(*uintptr)(unsafe.Pointer(bp + 8)) i = uint64(0) for { - if v49 = i < uint64(0+uint32(uint32(p))) && *(*Twchar_t)(unsafe.Pointer(ws)) != 0; v49 { + if v49 = i < uint64(0+uint32(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(uint64(p))) { + if !(v49 && i+uint64(v47) <= uint64(p)) { break } - _out(tls, f, bp+48, uint64(uint64(l))) + _out(tls, f, bp+48, uint64(l)) goto _46 _46: ; - i += uint64(uint64(l)) + i += uint64(l) } _pad3(tls, f, int8(' '), w, p, int32(fl^Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' ')))) if w > p { @@ -141117,15 +141117,15 @@ 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(int32(fl)), t) + l = _fmt_fp(tls, f, *(*float64)(unsafe.Pointer(bp + 8)), w, p, int32(fl), t) if l < 0 { goto overflow } goto _1 _30: ; - if int64(int64(p)) < int64(int64(z))-int64(int64(a)) { - p = int32(int64(int64(z)) - int64(int64(a))) + if int64(p) < int64(z)-int64(a) { + p = int32(int64(z) - int64(a)) } if p > int32(INT_MAX)-pl { goto overflow @@ -141136,11 +141136,11 @@ 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(int32(fl))) - _out(tls, f, prefix, uint64(uint64(pl))) + _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('0'), p, int32(int64(int64(z))-int64(int64(a))), 0) - _out(tls, f, a, uint64(int64(int64(z))-int64(int64(a)))) + _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(' ')))) l = w goto _1 @@ -141247,7 +141247,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(uint32(olderr)) + *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -141268,15 +141268,15 @@ func _store_int(tls *TLS, dest uintptr, size int32, i uint64) { } switch size { case -int32(2): - *(*int8)(unsafe.Pointer(dest)) = int8(int8(i)) + *(*int8)(unsafe.Pointer(dest)) = int8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(int16(i)) + *(*int16)(unsafe.Pointer(dest)) = int16(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(int32(i)) + *(*int32)(unsafe.Pointer(dest)) = int32(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(int64(i)) + *(*int64)(unsafe.Pointer(dest)) = int64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(int64(i)) + *(*int64)(unsafe.Pointer(dest)) = int64(i) break } } @@ -141544,7 +141544,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(uint64(pos))) + _store_int(tls, dest, size, uint64(pos)) /* do not increment match count, etc! */ goto _2 default: @@ -141695,7 +141695,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(uint32(width)) + uint32(1) + v63 = uint32(width) + uint32(1) } else { v63 = uint32(31) } @@ -141724,7 +141724,7 @@ 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 } - *(*int8)(unsafe.Pointer(bp)) = int8(int8(c)) + *(*int8)(unsafe.Pointer(bp)) = int8(c) switch Xmbrtowc(tls, bp+276, bp, uint64(1), bp+8) { case uint64(-Int32FromInt32(1)): goto input_fail @@ -141770,7 +141770,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v73 = i i++ - *(*int8)(unsafe.Pointer(s + uintptr(v73))) = int8(int8(c)) + *(*int8)(unsafe.Pointer(s + uintptr(v73))) = int8(c) if i == k { k += k + uint64(1) tmp1 = Xrealloc(tls, s, k) @@ -141800,7 +141800,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { } v79 = i i++ - *(*int8)(unsafe.Pointer(s + uintptr(v79))) = int8(int8(c)) + *(*int8)(unsafe.Pointer(s + uintptr(v79))) = int8(c) } } else { for { @@ -141827,7 +141827,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if !((*TFILE)(unsafe.Pointer(f)).Fshcnt+(int64((*TFILE)(unsafe.Pointer(f)).Frpos)-int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) != 0) { goto match_fail } - if t == int32('c') && (*TFILE)(unsafe.Pointer(f)).Fshcnt+(int64((*TFILE)(unsafe.Pointer(f)).Frpos)-int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) != int64(int64(width)) { + if t == int32('c') && (*TFILE)(unsafe.Pointer(f)).Fshcnt+(int64((*TFILE)(unsafe.Pointer(f)).Frpos)-int64((*TFILE)(unsafe.Pointer(f)).Fbuf)) != int64(width) { goto match_fail } if alloc != 0 { @@ -141869,12 +141869,12 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { base = 0 int_common: ; - x = X__intscan(tls, f, uint32(uint32(base)), 0, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) + x = X__intscan(tls, f, uint32(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 } if t == int32('p') && dest != 0 { - *(*uintptr)(unsafe.Pointer(dest)) = uintptr(uint64(uint64(x))) + *(*uintptr)(unsafe.Pointer(dest)) = uintptr(x) } else { _store_int(tls, dest, size, x) } @@ -141902,9 +141902,9 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if dest != 0 { switch size { case SIZE_def: - *(*float32)(unsafe.Pointer(dest)) = float32(float32(y)) + *(*float32)(unsafe.Pointer(dest)) = float32(y) case int32(SIZE_l): - *(*float64)(unsafe.Pointer(dest)) = float64(float64(y)) + *(*float64)(unsafe.Pointer(dest)) = y case int32(SIZE_L): *(*float64)(unsafe.Pointer(dest)) = y break @@ -142078,7 +142078,7 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { 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)))) + (*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))))) case int32(_USHORT): @@ -142100,7 +142100,7 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) { case int32(_UIPTR): (*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap)))) case int32(_DBL): - *(*float64)(unsafe.Pointer(arg)) = float64(VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap)))) + *(*float64)(unsafe.Pointer(arg)) = VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap))) case int32(_LDBL): *(*float64)(unsafe.Pointer(arg)) = VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap))) } @@ -142125,7 +142125,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(uint32(fl))&(Uint32FromUint32(1)<<(Int32FromUint8('-')-Int32FromUint8(' '))) != 0 || !(n != 0) || (*TFILE)(unsafe.Pointer(f)).Fflags&uint32(F_ERR) != 0 { + if uint32(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)) @@ -142139,7 +142139,7 @@ func _getint1(tls *TLS, s uintptr) (r int32) { if !(BoolInt32(uint32(*(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s)))))-uint32('0') < uint32(10)) != 0) { break } - if uint32(uint32(i)) > Uint32FromInt32(INT_MAX)/Uint32FromUint32(10) || *(*Twchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(s))))-int32('0') > int32(INT_MAX)-int32(10)*i { + if uint32(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')) @@ -142216,12 +142216,12 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, z += 4 *(*uintptr)(unsafe.Pointer(bp + 8)) += uintptr(2) * 4 } - if (int64(int64(z))-int64(int64(a)))/4 > int64(int32(INT_MAX)-cnt) { + if (int64(z)-int64(a))/4 > int64(int32(INT_MAX)-cnt) { goto overflow } - l = int32((int64(int64(z)) - int64(int64(a))) / 4) + l = int32((int64(z) - int64(a)) / 4) if f != 0 { - _out1(tls, f, a, uint64(uint64(l))) + _out1(tls, f, a, uint64(l)) } if l != 0 { goto _1 @@ -142328,11 +142328,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(int32(st)) + *(*int32)(unsafe.Pointer(nl_type + uintptr(argpos)*4)) = int32(st) *(*Targ)(unsafe.Pointer(bp + 16)) = *(*Targ)(unsafe.Pointer(nl_arg + uintptr(argpos)*8)) } else { if f != 0 { - _pop_arg1(tls, bp+16, int32(int32(st)), ap) + _pop_arg1(tls, bp+16, int32(st), ap) } else { return 0 } @@ -142355,17 +142355,17 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, case uint32(_BARE): *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = cnt case uint32(_LPRE): - *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(int64(cnt)) + *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(cnt) case uint32(_LLPRE): - *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(int64(cnt)) + *(*int64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = int64(cnt) case uint32(_HPRE): - *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint16(uint16(cnt)) + *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint16(cnt) case uint32(_HHPRE): - *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint8(uint8(cnt)) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint8(cnt) case uint32(_ZTPRE): - *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(uint64(cnt)) + *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) case uint32(_JPRE): - *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(uint64(cnt)) + *(*Tuintmax_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = uint64(cnt) break } goto _1 @@ -142375,7 +142375,7 @@ 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(int32(fl))) + _pad4(tls, f, w-int32(1), int32(fl)) if t == int32('C') { v9 = *(*Tuintmax_t)(unsafe.Pointer(bp + 16)) } else { @@ -142397,12 +142397,12 @@ func _wprintf_core(tls *TLS, f uintptr, fmt uintptr, ap uintptr, nl_arg uintptr, if p < 0 && *(*Twchar_t)(unsafe.Pointer(z)) != 0 { goto overflow } - p = int32((int64(int64(z)) - int64(int64(a))) / 4) + p = int32((int64(z) - int64(a)) / 4) if w < p { w = p } - _pad4(tls, f, w-p, int32(int32(fl))) - _out1(tls, f, a, uint64(uint64(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(' ')))) l = w goto _1 @@ -142446,7 +142446,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(int32(fl))) + _pad4(tls, f, w-p, int32(fl)) bs = *(*uintptr)(unsafe.Pointer(bp + 16)) for { v16 = l @@ -142564,7 +142564,7 @@ func Xvfwprintf(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(uint32(olderr)) + *(*uint32)(unsafe.Pointer(f)) |= uint32(olderr) if __need_unlock != 0 { ___unlockfile(tls, f) } @@ -142578,15 +142578,15 @@ func _store_int1(tls *TLS, dest uintptr, size int32, i uint64) { } switch size { case -int32(2): - *(*int8)(unsafe.Pointer(dest)) = int8(int8(i)) + *(*int8)(unsafe.Pointer(dest)) = int8(i) case -int32(1): - *(*int16)(unsafe.Pointer(dest)) = int16(int16(i)) + *(*int16)(unsafe.Pointer(dest)) = int16(i) case SIZE_def: - *(*int32)(unsafe.Pointer(dest)) = int32(int32(i)) + *(*int32)(unsafe.Pointer(dest)) = int32(i) case int32(SIZE_l): - *(*int64)(unsafe.Pointer(dest)) = int64(int64(i)) + *(*int64)(unsafe.Pointer(dest)) = int64(i) case int32(SIZE_ll): - *(*int64)(unsafe.Pointer(dest)) = int64(int64(i)) + *(*int64)(unsafe.Pointer(dest)) = int64(i) break } } @@ -142718,7 +142718,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v9 = f + 8 *(*uintptr)(unsafe.Pointer(v9))-- v8 = *(*uintptr)(unsafe.Pointer(v9)) - _ = uint32(*(*uint8)(unsafe.Pointer(v8))) + _ = *(*uint8)(unsafe.Pointer(v8)) } else { Xungetwc(tls, uint32(c), f) } @@ -142759,7 +142759,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v19 = f + 8 *(*uintptr)(unsafe.Pointer(v19))-- v18 = *(*uintptr)(unsafe.Pointer(v19)) - _ = uint32(*(*uint8)(unsafe.Pointer(v18))) + _ = *(*uint8)(unsafe.Pointer(v18)) } else { Xungetwc(tls, uint32(c), f) } @@ -142915,14 +142915,14 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v31 = f + 8 *(*uintptr)(unsafe.Pointer(v31))-- v30 = *(*uintptr)(unsafe.Pointer(v31)) - _ = uint32(*(*uint8)(unsafe.Pointer(v30))) + _ = *(*uint8)(unsafe.Pointer(v30)) } else { Xungetwc(tls, uint32(c), f) } } switch t { case int32('n'): - _store_int1(tls, dest, size, uint64(uint64(pos))) + _store_int1(tls, dest, size, uint64(pos)) /* do not increment match count, etc! */ goto _2 case int32('s'): @@ -142980,7 +142980,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(uint32(width)) + uint32(1) + v35 = uint32(width) + uint32(1) } else { v35 = uint32(31) } @@ -143037,7 +143037,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { if l < 0 { goto input_fail } - i += uint64(uint64(l)) + i += uint64(l) if alloc != 0 && i > k-uint64(4) { k += k + uint64(1) tmp2 = Xrealloc(tls, s, k) @@ -143057,7 +143057,7 @@ func Xvfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32) { v44 = f + 8 *(*uintptr)(unsafe.Pointer(v44))-- v43 = *(*uintptr)(unsafe.Pointer(v44)) - _ = uint32(*(*uint8)(unsafe.Pointer(v43))) + _ = *(*uint8)(unsafe.Pointer(v43)) } else { Xungetwc(tls, uint32(c), f) } @@ -143334,7 +143334,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(int64(end)) - int64(int64(src))) + k = uint64(int64(end) - int64(src)) } if k < len1 { len1 = k @@ -143400,7 +143400,7 @@ func _sw_write(tls *TLS, f uintptr, s uintptr, l Tsize_t) (r Tsize_t) { i = int32(1) } s += uintptr(i) - l -= uint64(uint64(i)) + l -= uint64(i) (*Tcookie4)(unsafe.Pointer(c)).Fl-- (*Tcookie4)(unsafe.Pointer(c)).Fws += 4 } @@ -143412,7 +143412,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(uint64(i)) + return uint64(i) } (*TFILE)(unsafe.Pointer(f)).Fwend = (*TFILE)(unsafe.Pointer(f)).Fbuf + uintptr((*TFILE)(unsafe.Pointer(f)).Fbuf_size) v5 = (*TFILE)(unsafe.Pointer(f)).Fbuf @@ -143450,7 +143450,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(uint64(r)) >= n { + if uint64(r) >= n { v1 = -int32(1) } else { v1 = r @@ -143770,7 +143770,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(uint32(n))-uint32(1) > uint32(15) { + if uint32(n)-uint32(1) > uint32(15) { n = int32(15) } Xsprintf(tls, bp, __ccgo_ts+1708, VaList(bp+40, n-int32(1), x)) @@ -143807,7 +143807,7 @@ 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(uint32(n)) > uint32(1400) { + if uint32(n) > uint32(1400) { n = int32(1400) } Xsprintf(tls, bp, __ccgo_ts+1713, VaList(bp+1512, n, x)) @@ -143820,7 +143820,7 @@ func Xfcvt(tls *TLS, x float64, n int32, dp uintptr, sign uintptr) (r uintptr) { if n <= lz { *(*int32)(unsafe.Pointer(sign)) = i *(*int32)(unsafe.Pointer(dp)) = int32(1) - if uint32(uint32(n)) > uint32(14) { + if uint32(n) > uint32(14) { n = int32(14) } return __ccgo_ts + 1718 + UintptrFromInt32(14) - uintptr(n) @@ -143974,25 +143974,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(uint64(n)) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if uint64(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(uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) |= *(*Tsize_t)(unsafe.Pointer(p)) >> (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(uint64(n))) - *(*Tsize_t)(unsafe.Pointer(p)) <<= uint64(uint64(n)) + *(*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) } func _shr(tls *TLS, p uintptr, n int32) { - if uint64(uint64(n)) >= Uint64FromInt32(8)*Uint64FromInt64(8) { + if uint64(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(uint64(n)) - *(*Tsize_t)(unsafe.Pointer(p)) |= *(*Tsize_t)(unsafe.Pointer(p + 1*8)) << (Uint64FromInt64(8)*Uint64FromInt32(8) - uint64(uint64(n))) - *(*Tsize_t)(unsafe.Pointer(p + 1*8)) >>= uint64(uint64(n)) + *(*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) } func _sift(tls *TLS, head uintptr, width Tsize_t, cmp Tcmpfun, arg uintptr, pshift int32, lp uintptr) { @@ -144110,7 +144110,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(int64(high))-int64(int64(head))) { + if (*(*[96]Tsize_t)(unsafe.Pointer(bp)))[pshift-int32(1)] >= uint64(int64(high)-int64(head)) { _trinkle(tls, head, width, cmp, arg, bp+768, pshift, 0, bp) } else { _sift(tls, head, width, cmp, arg, pshift, bp) @@ -144203,7 +144203,7 @@ func Xstrtod(tls *TLS, s uintptr, p uintptr) (r float64) { trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(_strtox(tls, s, p, int32(1))) + return _strtox(tls, s, p, int32(1)) } func Xstrtold(tls *TLS, s uintptr, p uintptr) (r float64) { @@ -144227,7 +144227,7 @@ 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(uint32(base)), int32(1), lim) + y = X__intscan(tls, bp, uint32(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))) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) @@ -144256,7 +144256,7 @@ func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return uint64(_strtox1(tls, s, p, base, uint64(Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)))) + return _strtox1(tls, s, p, base, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) } func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { @@ -144264,7 +144264,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 int64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144272,7 +144272,7 @@ func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(Xstrtoll(tls, s, p, base)) + return Xstrtoll(tls, s, p, base) } func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) (r Tuintmax_t) { @@ -144280,7 +144280,7 @@ func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) (r Tuintmax_t) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return uint64(Xstrtoull(tls, s, p, base)) + return Xstrtoull(tls, s, p, base) } func X__strtoimax_internal(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144424,7 +144424,7 @@ func Xwcstod(tls *TLS, s uintptr, p uintptr) (r float64) { trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2)) defer func() { trc("-> %v", r) }() } - return float64(_wcstox(tls, s, p, int32(1))) + return _wcstox(tls, s, p, int32(1)) } func Xwcstold(tls *TLS, s uintptr, p uintptr) (r float64) { @@ -144502,7 +144502,7 @@ 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(uint32(base)), int32(1), lim) + y = X__intscan(tls, bp+64, uint32(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))) if cnt != 0 { @@ -144536,7 +144536,7 @@ func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return uint64(_wcstox1(tls, s, p, base, uint64(Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)))) + return _wcstox1(tls, s, p, base, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)) } func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) { @@ -144544,7 +144544,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 int64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+uint64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))) } func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { @@ -144552,7 +144552,7 @@ func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return int64(Xwcstoll(tls, s, p, base)) + return Xwcstoll(tls, s, p, base) } func Xwcstoumax(tls *TLS, s uintptr, p uintptr, base int32) (r Tuintmax_t) { @@ -144560,7 +144560,7 @@ func Xwcstoumax(tls *TLS, s uintptr, p uintptr, base int32) (r Tuintmax_t) { trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2)) defer func() { trc("-> %v", r) }() } - return uint64(Xwcstoull(tls, s, p, base)) + return Xwcstoull(tls, s, p, base) } func Xbcmp(tls *TLS, s1 uintptr, s2 uintptr, n Tsize_t) (r int32) { @@ -144625,10 +144625,10 @@ 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(uint8(c))) - if uint64(uint64(s))&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(uint64(d))&(Uint64FromInt64(8)-Uint64FromInt32(1)) { + c = int32(uint8(c)) + if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(d)&(Uint64FromInt64(8)-Uint64FromInt32(1)) { for { - if v3 = uint64(uint64(s))&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { + if v3 = uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*uint8)(unsafe.Pointer(s)) *(*uint8)(unsafe.Pointer(d)) = v2 } @@ -144642,10 +144642,10 @@ func Xmemccpy(tls *TLS, dest uintptr, src uintptr, c int32, n Tsize_t) (r uintpt s++ d++ } - if uint64(uint64(s))&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 { + if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 { goto tail } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(uint64(c)) + k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(c) wd = d ws = s for { @@ -144706,9 +144706,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(uint8(c))) + c = int32(uint8(c)) for { - if !(uint64(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 && int32(*(*uint8)(unsafe.Pointer(s))) != c) { break } goto _1 @@ -144718,7 +144718,7 @@ func Xmemchr(tls *TLS, src uintptr, c int32, n Tsize_t) (r uintptr) { n-- } if n != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c { - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(uint64(c)) + k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(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)) { @@ -144793,7 +144793,7 @@ func Xmemcpy(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { d = dest s = src for { - if !(uint64(uint64(s))%uint64(4) != 0 && n != 0) { + if !(uint64(s)%uint64(4) != 0 && n != 0) { break } v2 = d @@ -144806,7 +144806,7 @@ func Xmemcpy(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { ; n-- } - if uint64(uint64(d))%uint64(4) == uint64(0) { + if uint64(d)%uint64(4) == uint64(0) { for { if !(n >= uint64(16)) { break @@ -144851,7 +144851,7 @@ func Xmemcpy(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r uintptr) { return dest } if n >= uint64(32) { - switch uint64(uint64(d)) % Uint64FromInt32(4) { + switch uint64(d) % Uint64FromInt32(4) { case uint64(1): w = *(*uint32)(unsafe.Pointer(s)) v9 = d @@ -145142,7 +145142,7 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { if !(k != 0) { break } - if int32(int32(hw)) == int32(int32(nw)) { + if int32(hw) == int32(nw) { return h - uintptr(2) } goto _1 @@ -145151,9 +145151,9 @@ func _twobyte_memmem(tls *TLS, h uintptr, k Tsize_t, n uintptr) (r uintptr) { k-- v2 = h h++ - hw = uint16(int32(int32(hw))<= uint64(32)) { break @@ -145671,9 +145671,9 @@ func X__stpcpy(tls *TLS, d uintptr, s uintptr) (r uintptr) { var wd, ws, v4, v5 uintptr var v2, v7 int8 _, _, _, _, _, _ = wd, ws, v2, v4, v5, v7 - if uint64(uint64(s))%Uint64FromInt64(8) == uint64(uint64(d))%Uint64FromInt64(8) { + if uint64(s)%Uint64FromInt64(8) == uint64(d)%Uint64FromInt64(8) { for { - if !(uint64(uint64(s))%Uint64FromInt64(8) != 0) { + if !(uint64(s)%Uint64FromInt64(8) != 0) { break } v2 = *(*int8)(unsafe.Pointer(s)) @@ -145757,9 +145757,9 @@ func X__stpncpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r uintptr) { var v2, v6 int8 var v3, v7 bool _, _, _, _, _, _ = wd, ws, v2, v3, v6, v7 - if uint64(uint64(s))&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(uint64(d))&(Uint64FromInt64(8)-Uint64FromInt32(1)) { + if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(d)&(Uint64FromInt64(8)-Uint64FromInt32(1)) { for { - if v3 = uint64(uint64(s))&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { + if v3 = uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v3 { v2 = *(*int8)(unsafe.Pointer(s)) *(*int8)(unsafe.Pointer(d)) = v2 } @@ -145909,7 +145909,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(uint8(c))) { + if int32(*(*uint8)(unsafe.Pointer(r))) == int32(uint8(c)) { v1 = r } else { v1 = uintptr(0) @@ -145936,12 +145936,12 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { var k Tsize_t var w uintptr _, _ = k, w - c = int32(uint8(uint8(c))) + c = int32(uint8(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } for { - if !(uint64(uint64(s))%Uint64FromInt64(8) != 0) { + if !(uint64(s)%Uint64FromInt64(8) != 0) { break } if !(*(*int8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { @@ -145952,7 +145952,7 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) { ; s++ } - k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(uint64(c)) + k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(UCHAR_MAX) * uint64(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)) { @@ -146033,7 +146033,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(int64(a))) + return uint64(int64(X__strchrnul(tls, s, int32(*(*int8)(unsafe.Pointer(c))))) - int64(a)) } Xmemset(tls, bp, 0, uint64(32)) for { @@ -146058,7 +146058,7 @@ func Xstrcspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(int64(s)) - int64(int64(a))) + return uint64(int64(s) - int64(a)) } func Xstrdup(tls *TLS, s uintptr) (r uintptr) { @@ -146147,9 +146147,9 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { if !(v1 != 0) { goto finish } - if uint64(uint64(s))&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(uint64(d))&(Uint64FromInt64(8)-Uint64FromInt32(1)) { + if uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) == uint64(d)&(Uint64FromInt64(8)-Uint64FromInt32(1)) { for { - if v4 = uint64(uint64(s))&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v4 { + if v4 = uint64(s)&(Uint64FromInt64(8)-Uint64FromInt32(1)) != 0 && n != 0; v4 { v3 = *(*int8)(unsafe.Pointer(s)) *(*int8)(unsafe.Pointer(d)) = v3 } @@ -146200,7 +146200,7 @@ func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n Tsize_t) (r Tsize_t) { *(*int8)(unsafe.Pointer(d)) = 0 finish: ; - return uint64(int64(int64(d))-int64(int64(d0))) + Xstrlen(tls, s) + return uint64(int64(d)-int64(d0)) + Xstrlen(tls, s) return r } @@ -146224,11 +146224,11 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { _, _ = a, w a = s for { - if !(uint64(uint64(s))%Uint64FromInt64(8) != 0) { + if !(uint64(s)%Uint64FromInt64(8) != 0) { break } if !(*(*int8)(unsafe.Pointer(s)) != 0) { - return uint64(int64(int64(s)) - int64(int64(a))) + return uint64(int64(s) - int64(a)) } goto _1 _1: @@ -146255,7 +146255,7 @@ func Xstrlen(tls *TLS, s uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(int64(s)) - int64(int64(a))) + return uint64(int64(s) - int64(a)) } func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n Tsize_t) (r1 int32) { @@ -146392,7 +146392,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(int64(p)) - int64(int64(s))) + v1 = uint64(int64(p) - int64(s)) } else { v1 = n } @@ -146458,7 +146458,7 @@ func Xstrsignal(tls *TLS, signum int32) (r uintptr) { _, _ = s, v2 s = uintptr(unsafe.Pointer(&_strings)) signum = signum - if uint32(uint32(signum))-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { + if uint32(signum)-uint32(1) >= uint32(Int32FromInt32(_NSIG)-Int32FromInt32(1)) { signum = 0 } for { @@ -146510,7 +146510,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(int64(s)) - int64(int64(a))) + return uint64(int64(s) - int64(a)) } for { if v4 = *(*int8)(unsafe.Pointer(c)) != 0; v4 { @@ -146534,7 +146534,7 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) (r Tsize_t) { ; s++ } - return uint64(int64(int64(s)) - int64(int64(a))) + return uint64(int64(s) - int64(a)) } func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { @@ -146545,7 +146545,7 @@ func _twobyte_strstr(tls *TLS, h uintptr, n uintptr) (r uintptr) { hw = uint16(int32(*(*uint8)(unsafe.Pointer(h)))< l-uint64(6) || Xmemcmp(tls, template+uintptr(l)-uintptr(len1)-uintptr(6), __ccgo_ts+1747, uint64(6)) != 0 { + if l < uint64(6) || uint64(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) } @@ -148146,7 +148146,7 @@ func X__secs_to_tm(tls *TLS, t int64, tm uintptr) (r int32) { if yday >= int32(365)+leap { yday -= int32(365) + leap } - years = int64(remyears+int32(4)*q_cycles+int32(100)*c_cycles) + int64(400)*int64(int64(qc_cycles)) + 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) { @@ -148211,7 +148211,7 @@ func X__tm_to_secs(tls *TLS, tm uintptr) (r int64) { adj-- month += int32(12) } - year += int64(int64(adj)) + year += int64(adj) } t = X__year_to_secs(tls, year, bp) t += int64(X__month_to_secs(tls, month, *(*int32)(unsafe.Pointer(bp)))) @@ -148257,7 +148257,7 @@ func _getint2(tls *TLS, p uintptr) (r int32) { ; *(*uintptr)(unsafe.Pointer(p))++ } - return int32(int32(x)) + return int32(x) } func _getoff(tls *TLS, p uintptr) (r int32) { @@ -148567,7 +148567,7 @@ func _do_tzset(tls *TLS) { } if !(Xdaylight != 0) { Xtzname[int32(1)] = Xtzname[0] - _dst_off = int32(int32(Xtimezone)) + _dst_off = int32(Xtimezone) } return } @@ -148589,7 +148589,7 @@ func _do_tzset(tls *TLS) { } } else { Xdaylight = 0 - _dst_off = int32(int32(Xtimezone)) + _dst_off = int32(Xtimezone) } if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 288))))) == int32(',') { *(*uintptr)(unsafe.Pointer(bp + 288))++ @@ -148614,7 +148614,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(int64(_index)) - int64(int64(_trans))) >> scale) + n = uint64((int64(_index) - int64(_trans)) >> scale) if !(n != 0) { if alt != 0 { *(*Tsize_t)(unsafe.Pointer(alt)) = uint64(0) @@ -148628,12 +148628,12 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<> scale) + n = uint64((int64(_index) - int64(_trans)) >> scale) if a == n-uint64(1) { return uint64(-Int32FromInt32(1)) } @@ -148651,11 +148651,11 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) { if scale == int32(3) { x = x<= t0 && t < t1 { @@ -148837,7 +148837,7 @@ func X__tm_to_tzname(tls *TLS, tm uintptr) (r uintptr) { p = (*Ttm)(unsafe.Pointer(tm)).F__tm_zone ___lock(tls, uintptr(unsafe.Pointer(&_lock4))) _do_tzset(tls) - if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint64(uint64(p))-uint64(uint64(_abbrevs)) >= uint64(int64(int64(_abbrevs_end))-int64(int64(_abbrevs)))) { + if p != uintptr(unsafe.Pointer(&X__utc)) && p != Xtzname[0] && p != Xtzname[int32(1)] && (!(_zi != 0) || uint64(p)-uint64(_abbrevs) >= uint64(int64(_abbrevs_end)-int64(_abbrevs))) { p = __ccgo_ts } ___unlock(tls, uintptr(unsafe.Pointer(&_lock4))) @@ -148854,8 +148854,8 @@ 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(uint64(year))-uint64(2) <= uint64(136) { - y = int32(int32(year)) + if uint64(year)-uint64(2) <= uint64(136) { + y = int32(year) leaps = (y - int32(68)) >> int32(2) if !((y-Int32FromInt32(68))&Int32FromInt32(3) != 0) { leaps-- @@ -148903,13 +148903,13 @@ 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(uint32(rem)) / uint32(4)) + leaps1 = int32(uint32(rem) / uint32(4)) rem = int32(uint32(rem) % Uint32FromUint32(4)) *(*int32)(unsafe.Pointer(is_leap)) = BoolInt32(!(rem != 0)) } } leaps1 += int32(97)*cycles + int32(24)*centuries - *(*int32)(unsafe.Pointer(is_leap)) - return (year-int64(100))*int64(31536000) + int64(int64(leaps1))*int64(86400) + int64(946684800) + int64(86400) + return (year-int64(100))*int64(31536000) + int64(leaps1)*int64(86400) + int64(946684800) + int64(86400) } func Xasctime(tls *TLS, tm uintptr) (r uintptr) { @@ -149026,7 +149026,7 @@ func X__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32) { } r = -int32(EINVAL) } - return int32(X__syscall_ret(tls, uint64(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xclock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r int32) { @@ -149217,7 +149217,7 @@ func X__gmtime_r(tls *TLS, t uintptr, tm uintptr) (r uintptr) { trc("tls=%v t=%v tm=%v, (%v:)", tls, t, tm, origin(2)) defer func() { trc("-> %v", r) }() } - if X__secs_to_tm(tls, int64(*(*Ttime_t)(unsafe.Pointer(t))), tm) < 0 { + if X__secs_to_tm(tls, *(*Ttime_t)(unsafe.Pointer(t)), tm) < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EOVERFLOW) return uintptr(0) } @@ -149261,12 +149261,12 @@ func X__localtime_r(tls *TLS, t uintptr, tm uintptr) (r uintptr) { } /* Reject time_t values whose year would overflow int because * __secs_to_zone cannot safely handle them. */ - if int64(*(*Ttime_t)(unsafe.Pointer(t))) < int64(-Int32FromInt32(1)-Int32FromInt32(0x7fffffff))*Int64FromInt64(31622400) || int64(*(*Ttime_t)(unsafe.Pointer(t))) > Int64FromInt32(INT_MAX)*Int64FromInt64(31622400) { + if *(*Ttime_t)(unsafe.Pointer(t)) < int64(-Int32FromInt32(1)-Int32FromInt32(0x7fffffff))*Int64FromInt64(31622400) || *(*Ttime_t)(unsafe.Pointer(t)) > Int64FromInt32(INT_MAX)*Int64FromInt64(31622400) { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EOVERFLOW) return uintptr(0) } - X__secs_to_zone(tls, int64(*(*Ttime_t)(unsafe.Pointer(t))), 0, tm+32, tm+40, uintptr(0), tm+48) - if X__secs_to_tm(tls, int64(*(*Ttime_t)(unsafe.Pointer(t)))+int64((*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff), tm) < 0 { + X__secs_to_zone(tls, *(*Ttime_t)(unsafe.Pointer(t)), 0, tm+32, tm+40, uintptr(0), tm+48) + if X__secs_to_tm(tls, *(*Ttime_t)(unsafe.Pointer(t))+(*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff, tm) < 0 { *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EOVERFLOW) return uintptr(0) } @@ -149304,18 +149304,18 @@ func Xmktime(tls *TLS, tm uintptr) (r Ttime_t) { t = X__tm_to_secs(tls, tm) X__secs_to_zone(tls, t, int32(1), bp+32, bp+40, bp+56, bp+48) if (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst >= 0 && (*(*Ttm)(unsafe.Pointer(bp))).Ftm_isdst != (*Ttm)(unsafe.Pointer(tm)).Ftm_isdst { - t -= int64(*(*int64)(unsafe.Pointer(bp + 56)) - (*(*Ttm)(unsafe.Pointer(bp))).F__tm_gmtoff) + t -= *(*int64)(unsafe.Pointer(bp + 56)) - (*(*Ttm)(unsafe.Pointer(bp))).F__tm_gmtoff } - t -= int64((*(*Ttm)(unsafe.Pointer(bp))).F__tm_gmtoff) - if int64(int64(int64(t))) != t { + t -= (*(*Ttm)(unsafe.Pointer(bp))).F__tm_gmtoff + if t != t { goto error } X__secs_to_zone(tls, t, 0, bp+32, bp+40, bp+56, bp+48) - if X__secs_to_tm(tls, t+int64((*(*Ttm)(unsafe.Pointer(bp))).F__tm_gmtoff), bp) < 0 { + if X__secs_to_tm(tls, t+(*(*Ttm)(unsafe.Pointer(bp))).F__tm_gmtoff, bp) < 0 { goto error } *(*Ttm)(unsafe.Pointer(tm)) = *(*Ttm)(unsafe.Pointer(bp)) - return int64(int64(t)) + return t error: ; *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(EOVERFLOW) @@ -149521,7 +149521,7 @@ func X__strftime_fmt_1(tls *TLS, s uintptr, l uintptr, f int32, tm uintptr, loc fmt = __ccgo_ts + 1855 goto recu_strftime case int32('s'): - val = X__tm_to_secs(tls, tm) - int64((*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff) + val = X__tm_to_secs(tls, tm) - (*Ttm)(unsafe.Pointer(tm)).F__tm_gmtoff width = int32(1) goto number case int32('S'): @@ -149785,7 +149785,7 @@ func Xstrftime(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr) (r Tsize_t trc("tls=%v s=%v n=%v f=%v tm=%v, (%v:)", tls, s, n, f, tm, origin(2)) defer func() { trc("-> %v", r) }() } - return X__strftime_l(tls, s, n, f, tm, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale) + return X__strftime_l(tls, s, n, f, tm, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale) } func Xstrftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tlocale_t) (r Tsize_t) { @@ -150148,7 +150148,7 @@ func Xstrptime(tls *TLS, s uintptr, f uintptr, tm uintptr) (r uintptr) { ; i *= int32(10) } - if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(uint32(range1)) { + if uint32(*(*int32)(unsafe.Pointer(dest))-min) >= uint32(range1) { return uintptr(0) } *(*int32)(unsafe.Pointer(dest)) -= adj @@ -150266,7 +150266,7 @@ func Xtimegm(tls *TLS, tm uintptr) (r Ttime_t) { (*Ttm1)(unsafe.Pointer(tm)).Ftm_isdst = 0 (*Ttm1)(unsafe.Pointer(tm)).Ftm_gmtoff = 0 (*Ttm1)(unsafe.Pointer(tm)).Ftm_zone = uintptr(unsafe.Pointer(&X__utc)) - return int64(int64(t)) + return t } func Xtimer_delete(tls *TLS, t Ttimer_t) (r int32) { @@ -150276,8 +150276,8 @@ func Xtimer_delete(tls *TLS, t Ttimer_t) (r int32) { } var td Tpthread_t _ = td - if int64(int64(t)) < 0 { - td = uintptr(uint64(uint64(t)) << Int32FromInt32(1)) + if int64(t) < 0 { + td = uintptr(uint64(t) << Int32FromInt32(1)) // __asm__ __volatile__( // // "mov %1, %0 ; lock ; orl $0,(%%rsp)" @@ -150296,8 +150296,8 @@ func Xtimer_getoverrun(tls *TLS, t Ttimer_t) (r int32) { } var td Tpthread_t _ = td - if int64(int64(t)) < 0 { - td = uintptr(uint64(uint64(t)) << Int32FromInt32(1)) + if int64(t) < 0 { + td = uintptr(uint64(t) << Int32FromInt32(1)) t = uintptr(uint64(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) } return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_timer_getoverrun), int64(t))))) @@ -150310,8 +150310,8 @@ func Xtimer_gettime(tls *TLS, t Ttimer_t, val uintptr) (r int32) { } var td Tpthread_t _ = td - if int64(int64(t)) < 0 { - td = uintptr(uint64(uint64(t)) << Int32FromInt32(1)) + if int64(t) < 0 { + td = uintptr(uint64(t) << Int32FromInt32(1)) t = uintptr(uint64(AtomicLoadPInt32(td+164) & Int32FromInt32(INT_MAX))) } return int32(X__syscall_ret(tls, uint64(X__syscall2(tls, int64(SYS_timer_gettime), int64(t), int64(val))))) @@ -150324,8 +150324,8 @@ func Xtimer_settime(tls *TLS, t Ttimer_t, flags int32, val uintptr, old uintptr) } var td Tpthread_t _ = td - if int64(int64(t)) < 0 { - td = uintptr(uint64(uint64(t)) << Int32FromInt32(1)) + if int64(t) < 0 { + td = uintptr(uint64(t) << Int32FromInt32(1)) t = uintptr(uint64(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))))) @@ -150525,7 +150525,7 @@ func Xwcsftime(tls *TLS, wcs uintptr, n Tsize_t, f uintptr, tm uintptr) (r Tsize trc("tls=%v wcs=%v n=%v f=%v tm=%v, (%v:)", tls, wcs, n, f, tm, origin(2)) defer func() { trc("-> %v", r) }() } - return X__wcsftime_l(tls, wcs, n, f, tm, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale) + return X__wcsftime_l(tls, wcs, n, f, tm, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale) } func Xwcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tlocale_t) (r Tsize_t) { @@ -150570,7 +150570,7 @@ 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(int64(seconds)), + Ftv_sec: int64(seconds), }, } *(*Titimerval)(unsafe.Pointer(bp + 32)) = Titimerval{} @@ -150610,7 +150610,7 @@ func Xclose(tls *TLS, fd int32) (r1 int32) { if r == -int32(EINTR) { r = 0 } - return int32(X__syscall_ret(tls, uint64(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xctermid(tls *TLS, s uintptr) (r uintptr) { @@ -150650,7 +150650,7 @@ func Xdup2(tls *TLS, old int32, new1 int32) (r1 int32) { break } } - return int32(X__syscall_ret(tls, uint64(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { @@ -150672,7 +150672,7 @@ func X__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32) { } } if r != -int32(ENOSYS) { - return int32(X__syscall_ret(tls, uint64(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } if flags & ^Int32FromInt32(O_CLOEXEC) != 0 { return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) @@ -150688,7 +150688,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(uint64(r)))) + return int32(X__syscall_ret(tls, uint64(r))) } func Xdup3(tls *TLS, old int32, new1 int32, flags int32) (r int32) { @@ -150731,7 +150731,7 @@ 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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } } if flag & ^Int32FromInt32(AT_EACCESS) != 0 { @@ -150752,9 +150752,9 @@ 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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } - X__procfdname(tls, bp, uint32(uint32(fd))) + X__procfdname(tls, bp, uint32(fd)) return int32(X__syscall_ret(tls, uint64(X__syscall1(tls, int64(SYS_chdir), int64(bp))))) } @@ -150770,9 +150770,9 @@ func Xfchown(tls *TLS, fd int32, uid Tuid_t, gid Tgid_t) (r int32) { _ = ret ret = int32(X__syscall3(tls, int64(SYS_fchown), int64(fd), int64(uid), int64(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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } - X__procfdname(tls, bp, uint32(uint32(fd))) + 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))))) } @@ -151113,7 +151113,7 @@ 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(uint64(ret)))) + return int32(X__syscall_ret(tls, uint64(ret))) } if flag & ^(Int32FromInt32(O_CLOEXEC)|Int32FromInt32(O_NONBLOCK)) != 0 { return int32(X__syscall_ret(tls, uint64(-Int32FromInt32(EINVAL)))) @@ -151199,7 +151199,7 @@ func Xreadlink(tls *TLS, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_ if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(uint64(r))) + return X__syscall_ret(tls, uint64(r)) } func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) (r1 Tssize_t) { @@ -151220,7 +151220,7 @@ func Xreadlinkat(tls *TLS, fd int32, path uintptr, buf uintptr, bufsize Tsize_t) if buf == bp && r > 0 { r = 0 } - return X__syscall_ret(tls, uint64(uint64(r))) + return X__syscall_ret(tls, uint64(r)) } func Xreadv(tls *TLS, fd int32, iov uintptr, count int32) (r Tssize_t) { @@ -151252,7 +151252,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(int32(gid)), 0, 0) + return X__setxid(tls, int32(SYS_setgid), int32(gid), 0, 0) } func Xsetpgid(tls *TLS, pid Tpid_t, pgid Tpid_t) (r int32) { @@ -151284,7 +151284,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(int32(uid)), 0, 0) + return X__setxid(tls, int32(SYS_setuid), int32(uid), 0, 0) } type Tctx2 = struct { @@ -151352,7 +151352,7 @@ 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(int64(seconds)), + Ftv_sec: int64(seconds), } if Xnanosleep(tls, bp, bp) != 0 { return uint32((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec) @@ -151459,12 +151459,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(uint32(fd))) + X__procfdname(tls, bp+288, uint32(fd)) l = Xreadlink(tls, bp+288, name, size) if l < 0 { return *(*int32)(unsafe.Pointer(X__errno_location(tls))) } else { - if uint64(uint64(l)) == size { + if uint64(l) == size { return int32(ERANGE) } } @@ -151489,10 +151489,10 @@ 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(int64(interval)), + Ftv_usec: int64(interval), }, Fit_value: Ttimeval{ - Ftv_usec: int64(int64(value)), + Ftv_usec: int64(value), }, } Xsetitimer(tls, ITIMER_REAL, bp, bp+32) diff --git a/vendor/modernc.org/libc/ccgo_linux_loong64.go b/vendor/modernc.org/libc/ccgo_linux_loong64.go index e9481e7ed2..6a6b10a17b 100644 --- a/vendor/modernc.org/libc/ccgo_linux_loong64.go +++ b/vendor/modernc.org/libc/ccgo_linux_loong64.go @@ -538,7 +538,7 @@ const __UTA_FBIT__ = 64 const __UTA_IBIT__ = 64 const __UTQ_FBIT__ = 128 const __UTQ_IBIT__ = 0 -const __VERSION__ = "14.0.1 20240228 (Red Hat 14.0.1-0)" +const __VERSION__ = "14.0.1 20240411 (Red Hat 14.0.1-0)" const __WCHAR_MAX__ = 2147483647 const __WCHAR_MIN__ = -2147483648 const __WCHAR_TYPE__ = 0 @@ -31431,11 +31431,11 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r1 uintptr) bp := tls.Alloc(16) defer tls.Free(16) var dirlen, domlen Tsize_t - var old, p, q, v, v2, v7 uintptr + var old, p4, q, v, v2, v7 uintptr var r int64 var v3 int32 var v5 bool - _, _, _, _, _, _, _, _, _, _, _ = dirlen, domlen, old, p, q, r, v, v2, v3, v5, v7 + _, _, _, _, _, _, _, _, _, _, _ = dirlen, domlen, old, p4, q, r, v, v2, v3, v5, v7 if !(domainname != 0) { return uintptr(0) } @@ -31450,31 +31450,31 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r1 uintptr) return uintptr(0) } ___lock(tls, uintptr(unsafe.Pointer(&_lock1))) - p = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) + p4 = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) for { - if !(p != 0) { + if !(p4 != 0) { break } - if !(Xstrcmp(tls, (*Tbinding)(unsafe.Pointer(p)).Fdomainname, domainname) != 0) && !(Xstrcmp(tls, (*Tbinding)(unsafe.Pointer(p)).Fdirname, dirname) != 0) { + if !(Xstrcmp(tls, (*Tbinding)(unsafe.Pointer(p4)).Fdomainname, domainname) != 0) && !(Xstrcmp(tls, (*Tbinding)(unsafe.Pointer(p4)).Fdirname, dirname) != 0) { break } goto _1 _1: ; - p = (*Tbinding)(unsafe.Pointer(p)).Fnext + p4 = (*Tbinding)(unsafe.Pointer(p4)).Fnext } - if !(p != 0) { - p = Xcalloc(tls, uint64(32)+domlen+dirlen+uint64(2), uint64(1)) - if !(p != 0) { + if !(p4 != 0) { + p4 = Xcalloc(tls, uint64(32)+domlen+dirlen+uint64(2), uint64(1)) + if !(p4 != 0) { ___unlock(tls, uintptr(unsafe.Pointer(&_lock1))) return uintptr(0) } - (*Tbinding)(unsafe.Pointer(p)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) - (*Tbinding)(unsafe.Pointer(p)).Fdirlen = int32(dirlen) - (*Tbinding)(unsafe.Pointer(p)).Fdomainname = p + 32 - (*Tbinding)(unsafe.Pointer(p)).Fdirname = p + 32 + uintptr(domlen) + uintptr(1) - Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p)).Fdomainname, domainname, domlen+uint64(1)) - Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p)).Fdirname, dirname, dirlen+uint64(1)) + (*Tbinding)(unsafe.Pointer(p4)).Fnext = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) + (*Tbinding)(unsafe.Pointer(p4)).Fdirlen = int32(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)) + Xmemcpy(tls, (*Tbinding)(unsafe.Pointer(p4)).Fdirname, dirname, dirlen+uint64(1)) v2 = uintptr(unsafe.Pointer(&_bindings)) // __asm__ __volatile__ ("dbar 0" : : : "memory"); X__assert_fail(tls, __ccgo_ts+350, __ccgo_ts+385, 49, __ccgo_ts+399) @@ -31516,7 +31516,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r1 uintptr) } // __asm__ __volatile__ ("dbar 0" : : : "memory"); X__assert_fail(tls, __ccgo_ts+350, __ccgo_ts+385, 49, __ccgo_ts+399) - AtomicStorePInt32(p+12, int32(1)) + AtomicStorePInt32(p4+12, int32(1)) // __asm__ __volatile__ ("dbar 0" : : : "memory"); X__assert_fail(tls, __ccgo_ts+350, __ccgo_ts+385, 49, __ccgo_ts+399) q = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_bindings))) @@ -31524,7 +31524,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r1 uintptr) if !(q != 0) { break } - if !(Xstrcmp(tls, (*Tbinding)(unsafe.Pointer(q)).Fdomainname, domainname) != 0) && q != p { + if !(Xstrcmp(tls, (*Tbinding)(unsafe.Pointer(q)).Fdomainname, domainname) != 0) && q != p4 { // __asm__ __volatile__ ("dbar 0" : : : "memory"); X__assert_fail(tls, __ccgo_ts+350, __ccgo_ts+385, 49, __ccgo_ts+399) AtomicStorePInt32(q+12, 0) @@ -31537,7 +31537,7 @@ func Xbindtextdomain(tls *TLS, domainname uintptr, dirname uintptr) (r1 uintptr) q = (*Tbinding)(unsafe.Pointer(q)).Fnext } ___unlock(tls, uintptr(unsafe.Pointer(&_lock1))) - return (*Tbinding)(unsafe.Pointer(p)).Fdirname + return (*Tbinding)(unsafe.Pointer(p4)).Fdirname } var _catnames = [6][12]int8{ @@ -31581,7 +31581,7 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n bp := tls.Alloc(80) defer tls.Free(80) var alt_modlen, catlen, dirlen, domlen, l, loclen, modlen, rem, v5 Tsize_t - var catname, csp, dirname, lm, loc, locname, locp, map1, modname, name, old, old_cats, p, q, r1, rule, trans, v, v10, v17, v22, v24, v3, v8, v9 uintptr + var catname, csp, dirname, lm, loc, locname, locp, map1, modname, name, old, old_cats, p3, q, r1, rule, trans, v, v10, v17, v22, v24, v3, v8, v9 uintptr var np, plural, v27 uint64 var old_errno, v11, v12, v14, v15, v18 int32 var r int64 @@ -31589,7 +31589,7 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n var v6 t__predefined_size_t var _ /* map_size at bp+0 */ Tsize_t var _ /* z at bp+8 */ uintptr - _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = alt_modlen, catlen, catname, csp, dirlen, dirname, domlen, l, lm, loc, loclen, locname, locp, map1, modlen, modname, name, np, old, old_cats, old_errno, p, plural, q, r, r1, rem, rule, trans, v, v10, v11, v12, v14, v15, v17, v18, v20, v22, v24, v27, v3, v5, v6, v8, v9 + _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = alt_modlen, catlen, catname, csp, dirlen, dirname, domlen, l, lm, loc, loclen, locname, locp, map1, modlen, modname, name, np, old, old_cats, old_errno, p3, plural, q, r, r1, rem, rule, trans, v, v10, v11, v12, v14, v15, v17, v18, v20, v22, v24, v27, v3, v5, v6, v8, v9 defer func() { Xrealloc(tls, name, 0) }() loc = (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale old_errno = *(*int32)(unsafe.Pointer(X__errno_location(tls))) @@ -31638,20 +31638,20 @@ notrans: return v3 _2: ; - p = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) + p3 = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) for { - if !(p != 0) { + if !(p3 != 0) { break } - if (*Tmsgcat)(unsafe.Pointer(p)).Fbinding == q && (*Tmsgcat)(unsafe.Pointer(p)).Flm == lm && (*Tmsgcat)(unsafe.Pointer(p)).Fcat == category { + if (*Tmsgcat)(unsafe.Pointer(p3)).Fbinding == q && (*Tmsgcat)(unsafe.Pointer(p3)).Flm == lm && (*Tmsgcat)(unsafe.Pointer(p3)).Fcat == category { break } goto _4 _4: ; - p = (*Tmsgcat)(unsafe.Pointer(p)).Fnext + p3 = (*Tmsgcat)(unsafe.Pointer(p3)).Fnext } - if !(p != 0) { + if !(p3 != 0) { dirname = (*Tbinding)(unsafe.Pointer(q)).Fdirname locname = lm + 16 catname = uintptr(unsafe.Pointer(&_catnames)) + uintptr(category)*12 @@ -31700,19 +31700,19 @@ _2: if !(map1 != 0) { goto notrans } - p = Xcalloc(tls, uint64(64), uint64(1)) - if !(p != 0) { + p3 = Xcalloc(tls, uint64(64), uint64(1)) + if !(p3 != 0) { X__munmap(tls, map1, *(*Tsize_t)(unsafe.Pointer(bp))) goto notrans } - (*Tmsgcat)(unsafe.Pointer(p)).Fcat = category - (*Tmsgcat)(unsafe.Pointer(p)).Fbinding = q - (*Tmsgcat)(unsafe.Pointer(p)).Flm = lm - (*Tmsgcat)(unsafe.Pointer(p)).Fmap1 = map1 - (*Tmsgcat)(unsafe.Pointer(p)).Fmap_size = *(*Tsize_t)(unsafe.Pointer(bp)) + (*Tmsgcat)(unsafe.Pointer(p3)).Fcat = category + (*Tmsgcat)(unsafe.Pointer(p3)).Fbinding = q + (*Tmsgcat)(unsafe.Pointer(p3)).Flm = lm + (*Tmsgcat)(unsafe.Pointer(p3)).Fmap1 = map1 + (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size = *(*Tsize_t)(unsafe.Pointer(bp)) rule = __ccgo_ts + 445 np = uint64(2) - r1 = X__mo_lookup(tls, (*Tmsgcat)(unsafe.Pointer(p)).Fmap1, (*Tmsgcat)(unsafe.Pointer(p)).Fmap_size, __ccgo_ts) + r1 = X__mo_lookup(tls, (*Tmsgcat)(unsafe.Pointer(p3)).Fmap1, (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size, __ccgo_ts) for r1 != 0 && Xstrncmp(tls, r1, __ccgo_ts+451, uint64(13)) != 0 { *(*uintptr)(unsafe.Pointer(bp + 8)) = Xstrchr(tls, r1, int32('\n')) if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { @@ -31758,11 +31758,11 @@ _2: } } } - (*Tmsgcat)(unsafe.Pointer(p)).Fnplurals = int32(np) - (*Tmsgcat)(unsafe.Pointer(p)).Fplural_rule = rule + (*Tmsgcat)(unsafe.Pointer(p3)).Fnplurals = int32(np) + (*Tmsgcat)(unsafe.Pointer(p3)).Fplural_rule = rule for { old_cats = AtomicLoadPUintptr(uintptr(unsafe.Pointer(&_cats))) - (*Tmsgcat)(unsafe.Pointer(p)).Fnext = old_cats + (*Tmsgcat)(unsafe.Pointer(p3)).Fnext = old_cats goto _26 _26: ; @@ -31810,15 +31810,15 @@ _2: } } } - trans = X__mo_lookup(tls, (*Tmsgcat)(unsafe.Pointer(p)).Fmap1, (*Tmsgcat)(unsafe.Pointer(p)).Fmap_size, msgid1) + trans = X__mo_lookup(tls, (*Tmsgcat)(unsafe.Pointer(p3)).Fmap1, (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size, msgid1) if !(trans != 0) { goto notrans } /* Non-plural-processing gettext forms pass a null pointer as * msgid2 to request that dcngettext suppress plural processing. */ - if msgid2 != 0 && (*Tmsgcat)(unsafe.Pointer(p)).Fnplurals != 0 { - plural = X__pleval(tls, (*Tmsgcat)(unsafe.Pointer(p)).Fplural_rule, n) - if plural > uint64((*Tmsgcat)(unsafe.Pointer(p)).Fnplurals) { + 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) { goto notrans } for { @@ -31827,7 +31827,7 @@ _2: if !(v27 != 0) { break } - rem = (*Tmsgcat)(unsafe.Pointer(p)).Fmap_size - uint64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p)).Fmap1)) + rem = (*Tmsgcat)(unsafe.Pointer(p3)).Fmap_size - uint64(int64(trans)-int64((*Tmsgcat)(unsafe.Pointer(p3)).Fmap1)) l = Xstrnlen(tls, trans, rem) if l+uint64(1) >= rem { goto notrans @@ -102143,9 +102143,9 @@ func Xasinf(tls *TLS, x float32) (r float32) { // C documentation // // /* asinh(x) = sign(x)*log(|x|+sqrt(x*x+1)) ~= x - x^3/6 + o(x^5) */ -func Xasinh(tls *TLS, x float64) (r float64) { +func Xasinh(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102165,41 +102165,41 @@ func Xasinh(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) - x = *(*float64)(unsafe.Pointer(bp)) + x3 = *(*float64)(unsafe.Pointer(bp)) if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(26)) { /* |x| >= 0x1p26 or inf or nan */ - x = Xlog(tls, x) + float64(0.6931471805599453) + x3 = Xlog(tls, x3) + float64(0.6931471805599453) } else { if e >= uint32(Int32FromInt32(0x3ff)+Int32FromInt32(1)) { /* |x| >= 2 */ - x = Xlog(tls, Float64FromInt32(2)*x+Float64FromInt32(1)/(Xsqrt(tls, x*x+Float64FromInt32(1))+x)) + x3 = Xlog(tls, Float64FromInt32(2)*x3+Float64FromInt32(1)/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+x3)) } else { if e >= uint32(Int32FromInt32(0x3ff)-Int32FromInt32(26)) { /* |x| >= 0x1p-26, up to 1.6ulp error in [0.125,0.5] */ - x = Xlog1p(tls, x+x*x/(Xsqrt(tls, x*x+Float64FromInt32(1))+Float64FromInt32(1))) + x3 = Xlog1p(tls, x3+x3*x3/(Xsqrt(tls, x3*x3+Float64FromInt32(1))+Float64FromInt32(1))) } else { /* |x| < 0x1p-26, raise inexact if x != 0 */ if uint64(8) == uint64(4) { - y = float32(x + Float64FromFloat32(1.329227995784916e+36)) + y = float32(x3 + Float64FromFloat32(1.329227995784916e+36)) } else { if uint64(8) == uint64(8) { - y1 = x + Float64FromFloat32(1.329227995784916e+36) + y1 = x3 + Float64FromFloat32(1.329227995784916e+36) } else { - y2 = x + Float64FromFloat32(1.329227995784916e+36) + y2 = x3 + Float64FromFloat32(1.329227995784916e+36) } } } } } if s != 0 { - v1 = -x + v1 = -x3 } else { - v1 = x + v1 = x3 } return v1 } @@ -102207,9 +102207,9 @@ func Xasinh(tls *TLS, x float64) (r float64) { // C documentation // // /* asinh(x) = sign(x)*log(|x|+sqrt(x*x+1)) ~= x - x^3/6 + o(x^5) */ -func Xasinhf(tls *TLS, x float32) (r float32) { +func Xasinhf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102230,41 +102230,41 @@ func Xasinhf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) s = *(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31) /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) = i - x = *(*float32)(unsafe.Pointer(bp)) + x3 = *(*float32)(unsafe.Pointer(bp)) if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(12)<= 0x1p12 or inf or nan */ - x = Xlogf(tls, x) + Float32FromFloat32(0.6931471805599453) + x3 = Xlogf(tls, x3) + Float32FromFloat32(0.6931471805599453) } else { if i >= uint32(Int32FromInt32(0x3f800000)+Int32FromInt32(1)<= 2 */ - x = Xlogf(tls, Float32FromInt32(2)*x+Float32FromInt32(1)/(Xsqrtf(tls, x*x+Float32FromInt32(1))+x)) + x3 = Xlogf(tls, Float32FromInt32(2)*x3+Float32FromInt32(1)/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+x3)) } else { if i >= uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)<= 0x1p-12, up to 1.6ulp error in [0.125,0.5] */ - x = Xlog1pf(tls, x+x*x/(Xsqrtf(tls, x*x+Float32FromInt32(1))+Float32FromInt32(1))) + x3 = Xlog1pf(tls, x3+x3*x3/(Xsqrtf(tls, x3*x3+Float32FromInt32(1))+Float32FromInt32(1))) } else { /* |x| < 0x1p-12, raise inexact if x!=0 */ if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } } } } if s != 0 { - v1 = -x + v1 = -x3 } else { - v1 = x + v1 = x3 } return v1 } @@ -102313,9 +102313,9 @@ var _aT = [11]float64{ 10: float64(0.016285820115365782), } -func Xatan(tls *TLS, x float64) (r float64) { +func Xatan(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102331,16 +102331,16 @@ func Xatan(tls *TLS, x float64) (r float64) { F__f float64 } _, _, _, _, _, _, _, _, _, _, _, _, _ = id, ix, s1, s2, sign, w, y, y1, y2, z, v1, v3, v4 - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) if ix >= uint32(0x44100000) { /* if |x| >= 2^66 */ - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: if BoolInt32(v1&(-Uint64FromUint64(1)>>Int32FromInt32(1)) > Uint64FromUint64(0x7ff)< %v", r) }() } bp := tls.Alloc(16) @@ -102692,16 +102692,16 @@ func Xatanf(tls *TLS, x float32) (r float32) { F__f float32 } _, _, _, _, _, _, _, _, _, _, _, _, _ = id, ix, s1, s2, sign, w, y, y1, y2, z, v1, v3, v4 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) if ix >= uint32(0x4c800000) { /* if |x| >= 2**26 */ - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: if BoolInt32(v1&uint32(0x7fffffff) > uint32(0x7f800000)) != 0 { - return x + return x3 } z = _atanhi1[int32(3)] + Float32FromFloat32(7.52316384526264e-37) if sign != 0 { @@ -102716,48 +102716,48 @@ func Xatanf(tls *TLS, x float32) (r float32) { if ix < uint32(0x00800000) { /* raise underflow for subnormal x */ if uint64(4) == uint64(4) { - y = x * x + y = x3 * x3 } else { if uint64(4) == uint64(8) { - y1 = float64(x * x) + y1 = float64(x3 * x3) } else { - y2 = float64(x * x) + y2 = float64(x3 * x3) } } } - return x + return x3 } id = -int32(1) } else { - x = Xfabsf(tls, x) + x3 = Xfabsf(tls, x3) if ix < uint32(0x3f980000) { /* |x| < 1.1875 */ if ix < uint32(0x3f300000) { /* 7/16 <= |x| < 11/16 */ id = 0 - x = (Float32FromFloat32(2)*x - Float32FromFloat32(1)) / (Float32FromFloat32(2) + x) + x3 = (Float32FromFloat32(2)*x3 - Float32FromFloat32(1)) / (Float32FromFloat32(2) + x3) } else { /* 11/16 <= |x| < 19/16 */ id = int32(1) - x = (x - Float32FromFloat32(1)) / (x + Float32FromFloat32(1)) + x3 = (x3 - Float32FromFloat32(1)) / (x3 + Float32FromFloat32(1)) } } else { if ix < uint32(0x401c0000) { /* |x| < 2.4375 */ id = int32(2) - x = (x - Float32FromFloat32(1.5)) / (Float32FromFloat32(1) + Float32FromFloat32(1.5)*x) + x3 = (x3 - Float32FromFloat32(1.5)) / (Float32FromFloat32(1) + Float32FromFloat32(1.5)*x3) } else { /* 2.4375 <= |x| < 2**26 */ id = int32(3) - x = -Float32FromFloat32(1) / x + x3 = -Float32FromFloat32(1) / x3 } } } /* end of argument reduction */ - z = x * x + z = x3 * x3 w = z * z /* break sum from i=0 to 10 aT[i]z**(i+1) into odd and even poly */ s1 = z * (_aT1[0] + w*(_aT1[int32(2)]+w*_aT1[int32(4)])) s2 = w * (_aT1[int32(1)] + w*_aT1[int32(3)]) if id < 0 { - return x - x*(s1+s2) + return x3 - x3*(s1+s2) } - z = _atanhi1[id] - (x*(s1+s2) - _atanlo1[id] - x) + z = _atanhi1[id] - (x3*(s1+s2) - _atanlo1[id] - x3) if sign != 0 { v4 = -z } else { @@ -102769,9 +102769,9 @@ func Xatanf(tls *TLS, x float32) (r float32) { // C documentation // // /* atanh(x) = log((1+x)/(1-x))/2 = log1p(2x/(1-x))/2 ~= x + x^3/3 + o(x^5) */ -func Xatanh(tls *TLS, x float64) (r float64) { +func Xatanh(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102792,7 +102792,7 @@ func Xatanh(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) s = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(63)) /* |x| */ @@ -102831,9 +102831,9 @@ func Xatanh(tls *TLS, x float64) (r float64) { // C documentation // // /* atanh(x) = log((1+x)/(1-x))/2 = log1p(2x/(1-x))/2 ~= x + x^3/3 + o(x^5) */ -func Xatanhf(tls *TLS, x float32) (r float32) { +func Xatanhf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -102854,7 +102854,7 @@ func Xatanhf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 s = *(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31) /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) @@ -103080,9 +103080,9 @@ const DBL_EPSILON5 = 2.220446049250313e-16 var _toint2 = Float64FromInt32(1) / Float64FromFloat64(2.220446049250313e-16) -func Xceil(tls *TLS, x float64) (r float64) { +func Xceil(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103103,16 +103103,16 @@ func Xceil(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x == Float64FromInt32(0) { - return x + if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { + return x3 } /* y = int(x) - x, where int(x) is an integer neighbor of x */ if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { - y3 = x - _toint2 + _toint2 - x + y3 = x3 - _toint2 + _toint2 - x3 } else { - y3 = x + _toint2 - _toint2 - x + y3 = x3 + _toint2 - _toint2 - x3 } /* special case because of non-nearest rounding modes */ if e <= Int32FromInt32(0x3ff)-Int32FromInt32(1) { @@ -103133,16 +103133,16 @@ func Xceil(tls *TLS, x float64) (r float64) { return v1 } if y3 < Float64FromInt32(0) { - return x + y3 + Float64FromInt32(1) + return x3 + y3 + Float64FromInt32(1) } - return x + y3 + return x3 + y3 } const DBL_EPSILON6 = 0 -func Xceilf(tls *TLS, x float32) (r float32) { +func Xceilf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103163,23 +103163,23 @@ func Xceilf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { - return x + return x3 } if e >= 0 { m = uint32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { - return x + return x3 } if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) == uint32(0) { @@ -103188,12 +103188,12 @@ func Xceilf(tls *TLS, x float32) (r float32) { *(*Tuint32_t)(unsafe.Pointer(bp)) &= ^m } else { if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) != 0 { @@ -103299,9 +103299,9 @@ func Xcopysignl(tls *TLS, x float64, y float64) (r float64) { return Xcopysign(tls, x, y) } -func Xcos(tls *TLS, x float64) (r float64) { +func Xcos(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103312,31 +103312,31 @@ func Xcos(tls *TLS, x float64) (r float64) { var y1, y2 float64 var _ /* y at bp+0 */ [2]float64 _, _, _, _, _ = ix, n, y, y1, y2 - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) ix &= uint32(0x7fffffff) /* |x| ~< pi/4 */ if ix <= uint32(0x3fe921fb) { if ix < uint32(0x3e46a09e) { /* |x| < 2**-27 * sqrt(2) */ /* raise inexact if x!=0 */ if uint64(8) == uint64(4) { - y = float32(x + Float64FromFloat32(1.329227995784916e+36)) + y = float32(x3 + Float64FromFloat32(1.329227995784916e+36)) } else { if uint64(8) == uint64(8) { - y1 = x + Float64FromFloat32(1.329227995784916e+36) + y1 = x3 + Float64FromFloat32(1.329227995784916e+36) } else { - y2 = x + Float64FromFloat32(1.329227995784916e+36) + y2 = x3 + Float64FromFloat32(1.329227995784916e+36) } } return float64(1) } - return X__cos(tls, x, Float64FromInt32(0)) + return X__cos(tls, x3, Float64FromInt32(0)) } /* cos(Inf or NaN) is NaN */ if ix >= uint32(0x7ff00000) { - return x - x + return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x, bp)) + n = uint32(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)]) @@ -103361,9 +103361,9 @@ var _c2pio2 = Float64FromInt32(2) * Float64FromFloat64(1.5707963267948966) /* 0x var _c3pio2 = Float64FromInt32(3) * Float64FromFloat64(1.5707963267948966) /* 0x4012D97C, 0x7F3321D2 */ var _c4pio2 = Float64FromInt32(4) * Float64FromFloat64(1.5707963267948966) /* 0x401921FB, 0x54442D18 */ -func Xcosf(tls *TLS, x float32) (r float32) { +func Xcosf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103374,63 +103374,63 @@ func Xcosf(tls *TLS, x float32) (r float32) { var y1, y2, v1, v2 float64 var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ if ix < uint32(0x39800000) { /* |x| < 2**-12 */ /* raise inexact if x != 0 */ if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } return Float32FromFloat32(1) } - return X__cosdf(tls, float64(x)) + return X__cosdf(tls, float64(x3)) } if ix <= uint32(0x407b53d1) { /* |x| ~<= 5*pi/4 */ if ix > uint32(0x4016cbe3) { /* |x| ~> 3*pi/4 */ if sign != 0 { - v1 = float64(x) + _c2pio2 + v1 = float64(x3) + _c2pio2 } else { - v1 = float64(x) - _c2pio2 + v1 = float64(x3) - _c2pio2 } return -X__cosdf(tls, v1) } else { if sign != 0 { - return X__sindf(tls, float64(x)+_c1pio2) + return X__sindf(tls, float64(x3)+_c1pio2) } else { - return X__sindf(tls, _c1pio2-float64(x)) + return X__sindf(tls, _c1pio2-float64(x3)) } } } if ix <= uint32(0x40e231d5) { /* |x| ~<= 9*pi/4 */ if ix > uint32(0x40afeddf) { /* |x| ~> 7*pi/4 */ if sign != 0 { - v2 = float64(x) + _c4pio2 + v2 = float64(x3) + _c4pio2 } else { - v2 = float64(x) - _c4pio2 + v2 = float64(x3) - _c4pio2 } return X__cosdf(tls, v2) } else { if sign != 0 { - return X__sindf(tls, float64(-x)-_c3pio2) + return X__sindf(tls, float64(-x3)-_c3pio2) } else { - return X__sindf(tls, float64(x)-_c3pio2) + return X__sindf(tls, float64(x3)-_c3pio2) } } } /* cos(Inf or NaN) is NaN */ if ix >= uint32(0x7f800000) { - return x - x + return x3 - x3 } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x, bp)) + n = uint32(X__rem_pio2f(tls, x3, bp)) switch n & Uint32FromInt32(3) { case uint32(0): return X__cosdf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -103452,9 +103452,9 @@ const M_PI_24 = 0 // * = 1 + 0.5*(exp(x)-1)*(exp(x)-1)/exp(x) // * = 1 + x*x/2 + o(x^4) // */ -func Xcosh(tls *TLS, x float64) (r float64) { +func Xcosh(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103474,44 +103474,44 @@ func Xcosh(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 /* |x| */ *(*Tuint64_t)(unsafe.Pointer(bp)) &= uint64(-Int32FromInt32(1)) / Uint64FromInt32(2) - x = *(*float64)(unsafe.Pointer(bp)) + 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)<log(0x1p26) then the 1/t is not needed */ return float64(0.5) * (t + Float64FromInt32(1)/t) } /* |x| > log(DBL_MAX) or nan */ /* note: the result is stored to handle overflow */ - t = X__expo2(tls, x, float64(1)) + t = X__expo2(tls, x3, float64(1)) return t } -func Xcoshf(tls *TLS, x float32) (r float32) { +func Xcoshf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -103531,35 +103531,35 @@ func Xcoshf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 /* |x| */ *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) - x = *(*float32)(unsafe.Pointer(bp)) + x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) /* |x| < log(2) */ if w < uint32(0x3f317217) { if w < uint32(Int32FromInt32(0x3f800000)-Int32FromInt32(12)< log(FLT_MAX) or nan */ - t = X__expo2f(tls, x, Float32FromFloat32(1)) + t = X__expo2f(tls, x3, Float32FromFloat32(1)) return t } @@ -104034,9 +104034,9 @@ func _top12(tls *TLS, x float64) (r Tuint32_t) { return uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(52)) } -func Xexp(tls *TLS, x float64) (r1 float64) { +func Xexp(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var abstop Tuint32_t @@ -104044,22 +104044,22 @@ func Xexp(tls *TLS, x float64) (r1 float64) { var kd, r, r2, scale, tail, tmp, z Tdouble_t var y, v1, v2, v4, v6 float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = abstop, idx, kd, ki, r, r2, sbits, scale, tail, tmp, top, y, z, v1, v2, v4, v5, v6 - abstop = _top12(tls, x) & uint32(0x7ff) + abstop = _top12(tls, x1) & uint32(0x7ff) if abstop-_top12(tls, float64(5.551115123125783e-17)) >= _top12(tls, float64(512))-_top12(tls, float64(5.551115123125783e-17)) { if abstop-_top12(tls, float64(5.551115123125783e-17)) >= uint32(0x80000000) { /* Avoid spurious underflow for tiny x. */ /* Note: 0 is common input. */ - return float64(1) + x + return float64(1) + x1 } if abstop >= _top12(tls, float64(1024)) { v1 = float64(-X__builtin_inff(tls)) - if *(*Tuint64_t)(unsafe.Pointer(&x)) == *(*Tuint64_t)(unsafe.Pointer(&v1)) { + if *(*Tuint64_t)(unsafe.Pointer(&x1)) == *(*Tuint64_t)(unsafe.Pointer(&v1)) { return float64(0) } if abstop >= _top12(tls, float64(X__builtin_inff(tls))) { - return float64(1) + x + return float64(1) + x1 } - if *(*Tuint64_t)(unsafe.Pointer(&x))>>int32(63) != 0 { + if *(*Tuint64_t)(unsafe.Pointer(&x1))>>int32(63) != 0 { return X__math_uflow(tls, uint32(0)) } else { return X__math_oflow(tls, uint32(0)) @@ -104070,7 +104070,7 @@ func Xexp(tls *TLS, x float64) (r1 float64) { } /* exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)]. */ /* x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N]. */ - z = X__exp_data.Finvln2N * x + z = X__exp_data.Finvln2N * x1 /* z - kd is in [-1, 1] in non-nearest rounding modes. */ y = z + X__exp_data.Fshift v2 = y @@ -104080,7 +104080,7 @@ _3: v4 = kd ki = *(*Tuint64_t)(unsafe.Pointer(&v4)) kd -= X__exp_data.Fshift - r = x + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN + 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)) } -func Xexp2(tls *TLS, x float64) (r1 float64) { +func Xexp2(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var abstop Tuint32_t @@ -104334,39 +104334,39 @@ func Xexp2(tls *TLS, x float64) (r1 float64) { var kd, r, r2, scale, tail, tmp Tdouble_t var y, v1, v2, v3, v4, v6, v8 float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = abstop, idx, kd, ki, r, r2, sbits, scale, tail, tmp, top, y, v1, v2, v3, v4, v6, v7, v8 - abstop = _top121(tls, x) & uint32(0x7ff) + abstop = _top121(tls, x1) & uint32(0x7ff) if abstop-_top121(tls, float64(5.551115123125783e-17)) >= _top121(tls, float64(512))-_top121(tls, float64(5.551115123125783e-17)) { if abstop-_top121(tls, float64(5.551115123125783e-17)) >= uint32(0x80000000) { /* Avoid spurious underflow for tiny x. */ /* Note: 0 is common input. */ - return float64(1) + x + return float64(1) + x1 } if abstop >= _top121(tls, float64(1024)) { v1 = float64(-X__builtin_inff(tls)) - if *(*Tuint64_t)(unsafe.Pointer(&x)) == *(*Tuint64_t)(unsafe.Pointer(&v1)) { + if *(*Tuint64_t)(unsafe.Pointer(&x1)) == *(*Tuint64_t)(unsafe.Pointer(&v1)) { return float64(0) } if abstop >= _top121(tls, float64(X__builtin_inff(tls))) { - return float64(1) + x + return float64(1) + x1 } - if !(*(*Tuint64_t)(unsafe.Pointer(&x))>>Int32FromInt32(63) != 0) { + if !(*(*Tuint64_t)(unsafe.Pointer(&x1))>>Int32FromInt32(63) != 0) { return X__math_oflow(tls, uint32(0)) } else { v2 = -Float64FromFloat64(1075) - if *(*Tuint64_t)(unsafe.Pointer(&x)) >= *(*Tuint64_t)(unsafe.Pointer(&v2)) { + if *(*Tuint64_t)(unsafe.Pointer(&x1)) >= *(*Tuint64_t)(unsafe.Pointer(&v2)) { return X__math_uflow(tls, uint32(0)) } } } v3 = float64(928) - if uint64(2)**(*Tuint64_t)(unsafe.Pointer(&x)) > uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v3)) { + if uint64(2)**(*Tuint64_t)(unsafe.Pointer(&x1)) > uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v3)) { /* Large x is special cased below. */ abstop = uint32(0) } } /* exp2(x) = 2^(k/N) * 2^r, with 2^r in [2^(-1/2N),2^(1/2N)]. */ /* x = k/N + r, with int k and r in [-1/2N, 1/2N]. */ - y = x + X__exp_data.Fexp2_shift + y = x1 + X__exp_data.Fexp2_shift v4 = y goto _5 _5: @@ -104374,7 +104374,7 @@ _5: v6 = kd ki = *(*Tuint64_t)(unsafe.Pointer(&v6)) /* k. */ kd -= X__exp_data.Fexp2_shift /* k/N for int k. */ - r = x - kd + r = x1 - kd /* 2^(k/N) ~= scale * (1 + tail). */ idx = uint64(2) * (ki % uint64(Int32FromInt32(1)<> int32(20) } -func Xexp2f(tls *TLS, x float32) (r1 float32) { +func Xexp2f(tls *TLS, x2 float32) (r1 float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x2=%v, (%v:)", tls, x2, origin(2)) defer func() { trc("-> %v", r1) }() } var abstop Tuint32_t @@ -104430,21 +104430,21 @@ func Xexp2f(tls *TLS, x float32) (r1 float32) { var y, v1, v5 float32 var y1, v2, v4 float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = abstop, kd, ki, r, r2, s, t, xd, y, y1, y2, z, v1, v2, v4, v5 - xd = float64(x) - abstop = _top122(tls, x) & uint32(0x7ff) + xd = float64(x2) + abstop = _top122(tls, x2) & uint32(0x7ff) if abstop >= _top122(tls, Float32FromFloat32(128)) { /* |x| >= 128 or x is nan. */ v1 = -X__builtin_inff(tls) - if *(*Tuint32_t)(unsafe.Pointer(&x)) == *(*Tuint32_t)(unsafe.Pointer(&v1)) { + if *(*Tuint32_t)(unsafe.Pointer(&x2)) == *(*Tuint32_t)(unsafe.Pointer(&v1)) { return Float32FromFloat32(0) } if abstop >= _top122(tls, X__builtin_inff(tls)) { - return x + x + return x2 + x2 } - if x > Float32FromFloat32(0) { + if x2 > Float32FromFloat32(0) { return X__math_oflowf(tls, uint32(0)) } - if x <= -Float32FromFloat32(150) { + if x2 <= -Float32FromFloat32(150) { return X__math_uflowf(tls, uint32(0)) } } @@ -104520,9 +104520,9 @@ func _top123(tls *TLS, x float32) (r Tuint32_t) { return *(*Tuint32_t)(unsafe.Pointer(&x)) >> int32(20) } -func Xexpf(tls *TLS, x float32) (r1 float32) { +func Xexpf(tls *TLS, x2 float32) (r1 float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x2=%v, (%v:)", tls, x2, origin(2)) defer func() { trc("-> %v", r1) }() } var abstop Tuint32_t @@ -104531,21 +104531,21 @@ func Xexpf(tls *TLS, x float32) (r1 float32) { var y, v1, v5 float32 var y1, v2, v4 float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = abstop, kd, ki, r, r2, s, t, xd, y, y1, y2, z, v1, v2, v4, v5 - xd = float64(x) - abstop = _top123(tls, x) & uint32(0x7ff) + xd = float64(x2) + abstop = _top123(tls, x2) & uint32(0x7ff) if abstop >= _top123(tls, Float32FromFloat32(88)) { /* |x| >= 88 or x is nan. */ v1 = -X__builtin_inff(tls) - if *(*Tuint32_t)(unsafe.Pointer(&x)) == *(*Tuint32_t)(unsafe.Pointer(&v1)) { + if *(*Tuint32_t)(unsafe.Pointer(&x2)) == *(*Tuint32_t)(unsafe.Pointer(&v1)) { return Float32FromFloat32(0) } if abstop >= _top123(tls, X__builtin_inff(tls)) { - return x + x + return x2 + x2 } - if x > Float32FromFloat32(88.72283172607422) { /* x > log(0x1p128) ~= 88.72 */ + if x2 > Float32FromFloat32(88.72283172607422) { /* x > log(0x1p128) ~= 88.72 */ return X__math_oflowf(tls, uint32(0)) } - if x < -Float32FromFloat32(103.97207641601562) { /* x < log(0x1p-150) ~= -103.97 */ + if x2 < -Float32FromFloat32(103.97207641601562) { /* x < log(0x1p-150) ~= -103.97 */ return X__math_uflowf(tls, uint32(0)) } } @@ -104598,9 +104598,9 @@ var _Q3 = -Float64FromFloat64(7.93650757867488e-05) /* BF14CE19 9EAADBB7 */ var _Q4 = float64(4.008217827329362e-06) /* 3ED0CFCA 86E65239 */ var _Q5 = -Float64FromFloat64(2.0109921818362437e-07) /* BE8AFDB7 6E09C32D */ -func Xexpm1(tls *TLS, x float64) (r float64) { +func Xexpm1(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -104627,35 +104627,35 @@ func Xexpm1(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp + 8)) = x + *(*float64)(unsafe.Pointer(bp + 8)) = x3 hx = uint32(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) >> int32(32) & uint64(0x7fffffff)) sign = int32(*(*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)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: if BoolInt32(v1&(-Uint64FromUint64(1)>>Int32FromInt32(1)) > Uint64FromUint64(0x7ff)< _o_threshold { - x *= float64(8.98846567431158e+307) - return x + if x3 > _o_threshold { + x3 *= float64(8.98846567431158e+307) + return x3 } } /* argument reduction */ if hx > uint32(0x3fd62e42) { /* if |x| > 0.5 ln2 */ if hx < uint32(0x3FF0A2B2) { /* and |x| < 1.5 ln2 */ if !(sign != 0) { - hi = x - _ln2_hi + hi = x3 - _ln2_hi lo = _ln2_lo k = int32(1) } else { - hi = x + _ln2_hi + hi = x3 + _ln2_hi lo = -_ln2_lo k = -int32(1) } @@ -104665,56 +104665,56 @@ func Xexpm1(tls *TLS, x float64) (r float64) { } else { v3 = float64(0.5) } - k = int32(_invln2*x + v3) + k = int32(_invln2*x3 + v3) t = float64(k) - hi = x - t*_ln2_hi /* t*ln2_hi is exact here */ + hi = x3 - t*_ln2_hi /* t*ln2_hi is exact here */ lo = t * _ln2_lo } - x = hi - lo - c = hi - x - lo + x3 = hi - lo + c = hi - x3 - lo } else { if hx < uint32(0x3c900000) { /* |x| < 2**-54, return x */ if hx < uint32(0x00100000) { if uint64(4) == uint64(4) { - y = float32(x) + y = float32(x3) } else { if uint64(4) == uint64(8) { - y1 = float64(float32(x)) + y1 = float64(float32(x3)) } else { - y2 = float64(float32(x)) + y2 = float64(float32(x3)) } } } - return x + return x3 } else { k = 0 } } /* x is now in primary range */ - hfx = float64(0.5) * x - hxs = x * hfx + hfx = float64(0.5) * x3 + hxs = x3 * hfx r1 = float64(1) + hxs*(_Q1+hxs*(_Q2+hxs*(_Q3+hxs*(_Q4+hxs*_Q5)))) t = float64(3) - r1*hfx - e = hxs * ((r1 - t) / (Float64FromFloat64(6) - x*t)) + e = hxs * ((r1 - t) / (Float64FromFloat64(6) - x3*t)) if k == 0 { /* c is 0 */ - return x - (x*e - hxs) + return x3 - (x3*e - hxs) } - e = x*(e-c) - c + e = x3*(e-c) - c e -= hxs /* exp(x) ~ 2^k (Xreduced - e + 1) */ if k == -int32(1) { - return float64(0.5)*(x-e) - float64(0.5) + return float64(0.5)*(x3-e) - float64(0.5) } if k == int32(1) { - if x < -Float64FromFloat64(0.25) { - return -Float64FromFloat64(2) * (e - (x + Float64FromFloat64(0.5))) + if x3 < -Float64FromFloat64(0.25) { + return -Float64FromFloat64(2) * (e - (x3 + Float64FromFloat64(0.5))) } - return float64(1) + float64(2)*(x-e) + return float64(1) + float64(2)*(x3-e) } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(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 = x - e + float64(1) + y3 = x3 - e + float64(1) if k == int32(1024) { y3 = y3 * float64(2) * float64(8.98846567431158e+307) } else { @@ -104724,9 +104724,9 @@ func Xexpm1(tls *TLS, x float64) (r float64) { } *(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(Int32FromInt32(0x3ff)-k) << int32(52) /* 2^-k */ if k < int32(20) { - y3 = (x - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk + y3 = (x3 - e + (Float64FromInt32(1) - *(*float64)(unsafe.Pointer(bp + 8)))) * twopk } else { - y3 = (x - (e + *(*float64)(unsafe.Pointer(bp + 8))) + Float64FromInt32(1)) * twopk + y3 = (x3 - (e + *(*float64)(unsafe.Pointer(bp + 8))) + Float64FromInt32(1)) * twopk } return y3 } @@ -104742,9 +104742,9 @@ var _invln21 = float32(1.4426950216) /* 0x3fb8aa3b */ var _Q11 = float32(-Float64FromFloat64(0.033333212137)) /* -0x888868.0p-28 */ var _Q21 = float32(0.0015807170421) /* 0xcf3010.0p-33 */ -func Xexpm1f(tls *TLS, x float32) (r float32) { +func Xexpm1f(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -104766,31 +104766,31 @@ func Xexpm1f(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 hx = *(*Tuint32_t)(unsafe.Pointer(bp)) & uint32(0x7fffffff) sign = int32(*(*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 */ - return x + return x3 } if sign != 0 { return float32(-Int32FromInt32(1)) } if hx > uint32(0x42b17217) { /* x > log(FLT_MAX) */ - x *= Float32FromFloat32(1.7014118346046923e+38) - return x + x3 *= Float32FromFloat32(1.7014118346046923e+38) + return x3 } } /* argument reduction */ if hx > uint32(0x3eb17218) { /* if |x| > 0.5 ln2 */ if hx < uint32(0x3F851592) { /* and |x| < 1.5 ln2 */ if !(sign != 0) { - hi = x - _ln2_hi1 + hi = x3 - _ln2_hi1 lo = _ln2_lo1 k = int32(1) } else { - hi = x + _ln2_hi1 + hi = x3 + _ln2_hi1 lo = -_ln2_lo1 k = -int32(1) } @@ -104800,56 +104800,56 @@ func Xexpm1f(tls *TLS, x float32) (r float32) { } else { v1 = Float32FromFloat32(0.5) } - k = int32(_invln21*x + v1) + k = int32(_invln21*x3 + v1) t = float32(k) - hi = x - t*_ln2_hi1 /* t*ln2_hi is exact here */ + hi = x3 - t*_ln2_hi1 /* t*ln2_hi is exact here */ lo = t * _ln2_lo1 } - x = hi - lo - c = hi - x - lo + x3 = hi - lo + c = hi - x3 - lo } else { if hx < uint32(0x33000000) { /* when |x|<2**-25, return x */ if hx < uint32(0x00800000) { if uint64(4) == uint64(4) { - y = x * x + y = x3 * x3 } else { if uint64(4) == uint64(8) { - y1 = float64(x * x) + y1 = float64(x3 * x3) } else { - y2 = float64(x * x) + y2 = float64(x3 * x3) } } } - return x + return x3 } else { k = 0 } } /* x is now in primary range */ - hfx = Float32FromFloat32(0.5) * x - hxs = x * hfx + hfx = Float32FromFloat32(0.5) * x3 + hxs = x3 * hfx r1 = Float32FromFloat32(1) + hxs*(_Q11+hxs*_Q21) t = Float32FromFloat32(3) - r1*hfx - e = hxs * ((r1 - t) / (Float32FromFloat32(6) - x*t)) + e = hxs * ((r1 - t) / (Float32FromFloat32(6) - x3*t)) if k == 0 { /* c is 0 */ - return x - (x*e - hxs) + return x3 - (x3*e - hxs) } - e = x*(e-c) - c + e = x3*(e-c) - c e -= hxs /* exp(x) ~ 2^k (Xreduced - e + 1) */ if k == -int32(1) { - return Float32FromFloat32(0.5)*(x-e) - Float32FromFloat32(0.5) + return Float32FromFloat32(0.5)*(x3-e) - Float32FromFloat32(0.5) } if k == int32(1) { - if x < -Float32FromFloat32(0.25) { - return -Float32FromFloat32(2) * (e - (x + Float32FromFloat32(0.5))) + if x3 < -Float32FromFloat32(0.25) { + return -Float32FromFloat32(2) * (e - (x3 + Float32FromFloat32(0.5))) } - return Float32FromFloat32(1) + Float32FromFloat32(2)*(x-e) + return Float32FromFloat32(1) + Float32FromFloat32(2)*(x3-e) } *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((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 = x - e + Float32FromFloat32(1) + y3 = x3 - e + Float32FromFloat32(1) if k == int32(128) { y3 = y3 * Float32FromFloat32(2) * Float32FromFloat32(1.7014118346046923e+38) } else { @@ -104859,9 +104859,9 @@ func Xexpm1f(tls *TLS, x float32) (r float32) { } *(*Tuint32_t)(unsafe.Pointer(bp)) = uint32((int32(0x7f) - k) << int32(23)) /* 2^-k */ if k < int32(23) { - y3 = (x - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk + y3 = (x3 - e + (Float32FromInt32(1) - *(*float32)(unsafe.Pointer(bp)))) * twopk } else { - y3 = (x - (e + *(*float32)(unsafe.Pointer(bp))) + Float32FromInt32(1)) * twopk + y3 = (x3 - (e + *(*float32)(unsafe.Pointer(bp))) + Float32FromInt32(1)) * twopk } return y3 } @@ -105055,9 +105055,9 @@ const DBL_EPSILON7 = 2.220446049250313e-16 var _toint3 = Float64FromInt32(1) / Float64FromFloat64(2.220446049250313e-16) -func Xfloor(tls *TLS, x float64) (r float64) { +func Xfloor(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -105078,16 +105078,16 @@ func Xfloor(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) - if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x == Float64FromInt32(0) { - return x + if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) || x3 == Float64FromInt32(0) { + return x3 } /* y = int(x) - x, where int(x) is an integer neighbor of x */ if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { - y3 = x - _toint3 + _toint3 - x + y3 = x3 - _toint3 + _toint3 - x3 } else { - y3 = x + _toint3 - _toint3 - x + y3 = x3 + _toint3 - _toint3 - x3 } /* special case because of non-nearest rounding modes */ if e <= Int32FromInt32(0x3ff)-Int32FromInt32(1) { @@ -105108,16 +105108,16 @@ func Xfloor(tls *TLS, x float64) (r float64) { return float64(v1) } if y3 > Float64FromInt32(0) { - return x + y3 - Float64FromInt32(1) + return x3 + y3 - Float64FromInt32(1) } - return x + y3 + return x3 + y3 } const DBL_EPSILON8 = 0 -func Xfloorf(tls *TLS, x float32) (r float32) { +func Xfloorf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -105138,23 +105138,23 @@ func Xfloorf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) if e >= int32(23) { - return x + return x3 } if e >= 0 { m = uint32(int32(0x007fffff) >> e) if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { - return x + return x3 } if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) != 0 { @@ -105163,12 +105163,12 @@ func Xfloorf(tls *TLS, x float32) (r float32) { *(*Tuint32_t)(unsafe.Pointer(bp)) &= ^m } else { if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) == uint32(0) { @@ -105245,9 +105245,9 @@ func _mul(tls *TLS, hi uintptr, lo uintptr, x Tuint64_t, y Tuint64_t) { *(*Tuint64_t)(unsafe.Pointer(hi)) = t3 + t2>>Int32FromInt32(32) + BoolUint64(t1 > *(*Tuint64_t)(unsafe.Pointer(lo))) } -func Xfma(tls *TLS, x float64, y1 float64, z float64) (r2 float64) { +func Xfma(tls *TLS, x1 float64, y1 float64, z float64) (r2 float64) { if __ccgo_strace { - trc("tls=%v x=%v y1=%v z=%v, (%v:)", tls, x, y1, z, origin(2)) + trc("tls=%v x1=%v y1=%v z=%v, (%v:)", tls, x1, y1, z, origin(2)) defer func() { trc("-> %v", r2) }() } bp := tls.Alloc(16) @@ -105263,15 +105263,15 @@ func Xfma(tls *TLS, x float64, y1 float64, z float64) (r2 float64) { var _ /* rhi at bp+0 */ Tuint64_t var _ /* rlo at bp+8 */ Tuint64_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, d, e, fltmin, i, nonzero, nx, ny, nz, r, r1, samesign, sign, t, tiny, y, zhi, zlo, v1, v2, v4, v5 - nx = _normalize(tls, x) + nx = _normalize(tls, x1) ny = _normalize(tls, y1) nz = _normalize(tls, z) if nx.Fe >= Int32FromInt32(0x7ff)-Int32FromInt32(0x3ff)-Int32FromInt32(52)-Int32FromInt32(1) || ny.Fe >= Int32FromInt32(0x7ff)-Int32FromInt32(0x3ff)-Int32FromInt32(52)-Int32FromInt32(1) { - return x*y1 + z + return x1*y1 + z } if nz.Fe >= Int32FromInt32(0x7ff)-Int32FromInt32(0x3ff)-Int32FromInt32(52)-Int32FromInt32(1) { if nz.Fe > Int32FromInt32(0x7ff)-Int32FromInt32(0x3ff)-Int32FromInt32(52)-Int32FromInt32(1) { /* z==0 */ - return x*y1 + z + return x1*y1 + z } return z } @@ -105412,7 +105412,7 @@ func Xfma(tls *TLS, x float64, y1 float64, z float64) (r2 float64) { } } else { /* exact +-0 */ - return x*y1 + z + return x1*y1 + z } } e -= d @@ -106309,9 +106309,9 @@ func Xhypotl(tls *TLS, x float64, y float64) (r float64) { return Xhypot(tls, x, y) } -func Xilogb(tls *TLS, x float64) (r int32) { +func Xilogb(tls *TLS, x3 float64) (r int32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -106332,7 +106332,7 @@ func Xilogb(tls *TLS, x float64) (r int32) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 i = *(*Tuint64_t)(unsafe.Pointer(bp)) e = int32(i >> int32(52) & uint64(0x7ff)) if !(e != 0) { @@ -106383,9 +106383,9 @@ func Xilogb(tls *TLS, x float64) (r int32) { return e - int32(0x3ff) } -func Xilogbf(tls *TLS, x float32) (r int32) { +func Xilogbf(tls *TLS, x3 float32) (r int32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -106406,7 +106406,7 @@ func Xilogbf(tls *TLS, x float32) (r int32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 i = *(*Tuint32_t)(unsafe.Pointer(bp)) e = int32(i >> int32(23) & uint32(0xff)) if !(e != 0) { @@ -108999,9 +108999,9 @@ func _top16(tls *TLS, x float64) (r Tuint32_t) { return uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(48)) } -func Xlog(tls *TLS, x float64) (r1 float64) { +func Xlog(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var hi, invc, kd, lo, logc, r, r2, r3, rhi, rlo, w, y1, z Tdouble_t @@ -109011,8 +109011,8 @@ func Xlog(tls *TLS, x float64) (r1 float64) { var y, v1, v10, v2, v3, v4, v6, v8, v9 float64 var v5 bool _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hi, i, invc, ix, iz, k, kd, lo, logc, r, r2, r3, rhi, rlo, tmp, top, w, y, y1, z, v1, v10, v2, v3, v4, v5, v6, v8, v9 - ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - top = _top16(tls, x) + ix = *(*Tuint64_t)(unsafe.Pointer(&x1)) + top = _top16(tls, x1) v1 = Float64FromFloat64(1) - Float64FromFloat64(0.0625) v2 = Float64FromFloat64(1) + Float64FromFloat64(0.064697265625) v3 = Float64FromFloat64(1) - Float64FromFloat64(0.0625) @@ -109025,7 +109025,7 @@ func Xlog(tls *TLS, x float64) (r1 float64) { if v5 && ix == *(*Tuint64_t)(unsafe.Pointer(&v4)) { return Float64FromInt32(0) } - r = x - float64(1) + r = x1 - float64(1) r2 = r * r r3 = r * r2 y1 = r3 * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 1*8)) + r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 2*8)) + r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 3*8)) + r3*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 4*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 5*8))+r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 6*8))+r3*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 7*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 8*8))+r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 9*8))+r3**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__log_data)) + 56 + 10*8))))) @@ -109052,13 +109052,13 @@ func Xlog(tls *TLS, x float64) (r1 float64) { } v8 = float64(X__builtin_inff(tls)) if ix == *(*Tuint64_t)(unsafe.Pointer(&v8)) { /* log(inf) == inf. */ - return x + return x1 } if top&uint32(0x8000) != 0 || top&uint32(0x7ff0) == uint32(0x7ff0) { - return X__math_invalid(tls, x) + return X__math_invalid(tls, x1) } /* x is subnormal, normalize it. */ - v9 = x * float64(4.503599627370496e+15) + v9 = x1 * float64(4.503599627370496e+15) ix = *(*Tuint64_t)(unsafe.Pointer(&v9)) ix = ix - Uint64FromUint64(52)< %v", r) }() } bp := tls.Alloc(16) @@ -109318,52 +109318,52 @@ func Xlog1p(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 hx = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) k = int32(1) if hx < uint32(0x3fda827a) || hx>>int32(31) != 0 { /* 1+x < sqrt(2)+ */ if hx >= uint32(0xbff00000) { /* x <= -1.0 */ - if x == float64(-Int32FromInt32(1)) { - return x / float64(0) + if x3 == float64(-Int32FromInt32(1)) { + return x3 / float64(0) } /* log1p(-1) = -inf */ - return (x - x) / float64(0) /* log1p(x<-1) = NaN */ + return (x3 - x3) / float64(0) /* log1p(x<-1) = NaN */ } if hx<= uint32(0x7ff00000) { - return x + return x3 } } if k != 0 { - *(*float64)(unsafe.Pointer(bp)) = Float64FromInt32(1) + x + *(*float64)(unsafe.Pointer(bp)) = Float64FromInt32(1) + x3 hu = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) hu += uint32(Int32FromInt32(0x3ff00000) - Int32FromInt32(0x3fe6a09e)) k = int32(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) { - v1 = Float64FromInt32(1) - (*(*float64)(unsafe.Pointer(bp)) - x) + v1 = Float64FromInt32(1) - (*(*float64)(unsafe.Pointer(bp)) - x3) } else { - v1 = x - (*(*float64)(unsafe.Pointer(bp)) - Float64FromInt32(1)) + v1 = x3 - (*(*float64)(unsafe.Pointer(bp)) - Float64FromInt32(1)) } c = v1 c /= *(*float64)(unsafe.Pointer(bp)) @@ -109394,9 +109394,9 @@ var _Lg23 = float32(0.40000972151756287) /* 0.40000972152 */ var _Lg33 = float32(0.2849878668785095) /* 0.28498786688 */ var _Lg43 = float32(0.24279078841209412) /* 0.24279078841 */ -func Xlog1pf(tls *TLS, x float32) (r float32) { +func Xlog1pf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -109418,52 +109418,52 @@ func Xlog1pf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 ix = *(*Tuint32_t)(unsafe.Pointer(bp)) k = int32(1) if ix < uint32(0x3ed413d0) || ix>>int32(31) != 0 { /* 1+x < sqrt(2)+ */ if ix >= uint32(0xbf800000) { /* x <= -1.0 */ - if x == float32(-Int32FromInt32(1)) { - return x / Float32FromFloat32(0) + if x3 == float32(-Int32FromInt32(1)) { + return x3 / Float32FromFloat32(0) } /* log1p(-1)=+inf */ - return (x - x) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ + return (x3 - x3) / Float32FromFloat32(0) /* log1p(x<-1)=NaN */ } if ix<= uint32(0x7f800000) { - return x + return x3 } } if k != 0 { - *(*float32)(unsafe.Pointer(bp)) = Float32FromInt32(1) + x + *(*float32)(unsafe.Pointer(bp)) = Float32FromInt32(1) + x3 iu = *(*Tuint32_t)(unsafe.Pointer(bp)) iu += uint32(Int32FromInt32(0x3f800000) - Int32FromInt32(0x3f3504f3)) k = int32(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) { - v1 = Float32FromInt32(1) - (*(*float32)(unsafe.Pointer(bp)) - x) + v1 = Float32FromInt32(1) - (*(*float32)(unsafe.Pointer(bp)) - x3) } else { - v1 = x - (*(*float32)(unsafe.Pointer(bp)) - Float32FromInt32(1)) + v1 = x3 - (*(*float32)(unsafe.Pointer(bp)) - Float32FromInt32(1)) } c = v1 c /= *(*float32)(unsafe.Pointer(bp)) @@ -109506,9 +109506,9 @@ func _top161(tls *TLS, x float64) (r Tuint32_t) { return uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(48)) } -func Xlog2(tls *TLS, x float64) (r1 float64) { +func Xlog2(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var hi, invc, kd, lo, logc, p, r, r2, r4, t1, t2, t3, y1, z Tdouble_t @@ -109518,8 +109518,8 @@ func Xlog2(tls *TLS, x float64) (r1 float64) { var y, v1, v10, v2, v3, v4, v6, v8, v9 float64 var v5 bool _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hi, i, invc, ix, iz, k, kd, lo, logc, p, r, r2, r4, t1, t2, t3, tmp, top, y, y1, z, v1, v10, v2, v3, v4, v5, v6, v8, v9 - ix = *(*Tuint64_t)(unsafe.Pointer(&x)) - top = _top161(tls, x) + ix = *(*Tuint64_t)(unsafe.Pointer(&x1)) + top = _top161(tls, x1) v1 = Float64FromFloat64(1) - Float64FromFloat64(0.04239702224731445) v2 = Float64FromFloat64(1) + Float64FromFloat64(0.044274330139160156) v3 = Float64FromFloat64(1) - Float64FromFloat64(0.04239702224731445) @@ -109532,7 +109532,7 @@ func Xlog2(tls *TLS, x float64) (r1 float64) { if v5 && ix == *(*Tuint64_t)(unsafe.Pointer(&v4)) { return Float64FromInt32(0) } - r = x - float64(1) + r = x1 - float64(1) hi = r * X__log2_data.Finvln2hi lo = r*X__log2_data.Finvln2lo + X__builtin_fma(tls, r, X__log2_data.Finvln2hi, -hi) r2 = r * r /* rounding error: 0x1p-62. */ @@ -109556,13 +109556,13 @@ func Xlog2(tls *TLS, x float64) (r1 float64) { } v8 = float64(X__builtin_inff(tls)) if ix == *(*Tuint64_t)(unsafe.Pointer(&v8)) { /* log(inf) == inf. */ - return x + return x1 } if top&uint32(0x8000) != 0 || top&uint32(0x7ff0) == uint32(0x7ff0) { - return X__math_invalid(tls, x) + return X__math_invalid(tls, x1) } /* x is subnormal, normalize it. */ - v9 = x * float64(4.503599627370496e+15) + v9 = x1 * float64(4.503599627370496e+15) ix = *(*Tuint64_t)(unsafe.Pointer(&v9)) ix = ix - Uint64FromUint64(52)< %v", r1) }() } var i, k int32 @@ -109642,7 +109642,7 @@ func Xlog2f(tls *TLS, x float32) (r1 float32) { var ix, iz, tmp, top Tuint32_t var y, v1, v2 float32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, invc, ix, iz, k, logc, p, r, r2, tmp, top, y, y0, y1, z, v1, v2 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) /* Fix sign of zero with downward rounding when x==1. */ if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) @@ -109653,13 +109653,13 @@ func Xlog2f(tls *TLS, x float32) (r1 float32) { return X__math_divzerof(tls, uint32(1)) } if ix == uint32(0x7f800000) { /* log2(inf) == inf. */ - return x + return x1 } if ix&uint32(0x80000000) != 0 || ix*uint32(2) >= uint32(0xff000000) { - return X__math_invalidf(tls, x) + return X__math_invalidf(tls, x1) } /* x is subnormal, normalize it. */ - v1 = x * Float32FromFloat32(8.388608e+06) + v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) } @@ -109822,9 +109822,9 @@ ULP error: 0.818 (nearest rounding.) Relative error: 1.957 * 2^-26 (before rounding.) */ -func Xlogf(tls *TLS, x float32) (r1 float32) { +func Xlogf(tls *TLS, x1 float32) (r1 float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var i, k int32 @@ -109832,7 +109832,7 @@ func Xlogf(tls *TLS, x float32) (r1 float32) { var ix, iz, tmp Tuint32_t var y, v1, v2 float32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = i, invc, ix, iz, k, logc, r, r2, tmp, y, y0, y1, z, v1, v2 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) /* Fix sign of zero with downward rounding when x==1. */ if Bool(int32(WANT_ROUNDING) != 0) && ix == uint32(0x3f800000) { return Float32FromInt32(0) @@ -109843,13 +109843,13 @@ func Xlogf(tls *TLS, x float32) (r1 float32) { return X__math_divzerof(tls, uint32(1)) } if ix == uint32(0x7f800000) { /* log(inf) == inf. */ - return x + return x1 } if ix&uint32(0x80000000) != 0 || ix*uint32(2) >= uint32(0xff000000) { - return X__math_invalidf(tls, x) + return X__math_invalidf(tls, x1) } /* x is subnormal, normalize it. */ - v1 = x * Float32FromFloat32(8.388608e+06) + v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) } @@ -110115,9 +110115,9 @@ func Xnanl(tls *TLS, s uintptr) (r float64) { return float64(X__builtin_nanf(tls, __ccgo_ts)) } -func Xnextafter(tls *TLS, x float64, y3 float64) (r float64) { +func Xnextafter(tls *TLS, x3 float64, y3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v y3=%v, (%v:)", tls, x, y3, origin(2)) + trc("tls=%v x3=%v y3=%v, (%v:)", tls, x3, y3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(32) @@ -110148,7 +110148,7 @@ func Xnextafter(tls *TLS, x float64, y3 float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp + 8)) = x + *(*float64)(unsafe.Pointer(bp + 8)) = x3 *(*struct { Fi [0]Tuint64_t Ff float64 @@ -110157,7 +110157,7 @@ func Xnextafter(tls *TLS, x float64, y3 float64) (r float64) { Ff float64 }{} *(*float64)(unsafe.Pointer(bp + 16)) = y3 - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 v1 = *(*uint64)(unsafe.Pointer(bp)) goto _2 _2: @@ -110169,7 +110169,7 @@ _2: _4: } if v5 || BoolInt32(v3&(-Uint64FromUint64(1)>>Int32FromInt32(1)) > Uint64FromUint64(0x7ff)< %v", r) }() } bp := tls.Alloc(16) @@ -110248,7 +110248,7 @@ func Xnextafterf(tls *TLS, x float32, y3 float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp + 4)) = x + *(*float32)(unsafe.Pointer(bp + 4)) = x3 *(*struct { Fi [0]Tuint32_t Ff float32 @@ -110257,7 +110257,7 @@ func Xnextafterf(tls *TLS, x float32, y3 float32) (r float32) { Ff float32 }{} *(*float32)(unsafe.Pointer(bp + 8)) = y3 - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: @@ -110269,7 +110269,7 @@ _2: _4: } if v5 || BoolInt32(v3&uint32(0x7fffffff) > uint32(0x7f800000)) != 0 { - return x + y3 + return x3 + y3 } if *(*Tuint32_t)(unsafe.Pointer(bp + 4)) == *(*Tuint32_t)(unsafe.Pointer(bp + 8)) { return y3 @@ -110292,24 +110292,24 @@ _2: /* raise overflow if ux.f is infinite and x is finite */ if e == uint32(0x7f800000) { if uint64(4) == uint64(4) { - y = x + x + y = x3 + x3 } else { if uint64(4) == uint64(8) { - y1 = float64(x + x) + y1 = float64(x3 + x3) } else { - y2 = float64(x + x) + y2 = float64(x3 + x3) } } } /* raise underflow if ux.f is subnormal or zero */ if e == uint32(0) { if uint64(4) == uint64(4) { - y = x*x + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4)) + y = x3*x3 + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4)) } else { if uint64(4) == uint64(8) { - y1 = float64(x*x + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4))) + y1 = float64(x3*x3 + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4))) } else { - y2 = float64(x*x + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4))) + y2 = float64(x3*x3 + *(*float32)(unsafe.Pointer(bp + 4))**(*float32)(unsafe.Pointer(bp + 4))) } } } @@ -110332,9 +110332,9 @@ func Xnexttoward(tls *TLS, x float64, y float64) (r float64) { return Xnextafter(tls, x, y) } -func Xnexttowardf(tls *TLS, x float32, y3 float64) (r float32) { +func Xnexttowardf(tls *TLS, x3 float32, y3 float64) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v y3=%v, (%v:)", tls, x, y3, origin(2)) + trc("tls=%v x3=%v y3=%v, (%v:)", tls, x3, y3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(32) @@ -110365,8 +110365,8 @@ func Xnexttowardf(tls *TLS, x float32, y3 float64) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp + 16)) = x - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp + 16)) = x3 + *(*float32)(unsafe.Pointer(bp)) = x3 v1 = *(*uint32)(unsafe.Pointer(bp)) goto _2 _2: @@ -110378,12 +110378,12 @@ _2: _4: } if v5 || BoolInt32(v3&(-Uint64FromUint64(1)>>Int32FromInt32(1)) > Uint64FromUint64(0x7ff)<= _top124(tls, float64(512))-_top124(tls, float64(5.551115123125783e-17)) { if abstop-_top124(tls, float64(5.551115123125783e-17)) >= uint32(0x80000000) { /* Avoid spurious underflow for tiny x. */ /* Note: 0 is common input. */ - one = float64(1) + x + one = float64(1) + x1 if sign_bias != 0 { v1 = -one } else { @@ -110618,7 +110618,7 @@ func _exp_inline(tls *TLS, x Tdouble_t, xtail Tdouble_t, sign_bias Tuint32_t) (r } if abstop >= _top124(tls, float64(1024)) { /* Note: inf and nan are already handled. */ - v2 = x + v2 = x1 if *(*Tuint64_t)(unsafe.Pointer(&v2))>>int32(63) != 0 { return X__math_uflow(tls, sign_bias) } else { @@ -110630,7 +110630,7 @@ func _exp_inline(tls *TLS, x Tdouble_t, xtail Tdouble_t, sign_bias Tuint32_t) (r } /* exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)]. */ /* x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N]. */ - z = X__exp_data.Finvln2N * x + z = X__exp_data.Finvln2N * x1 /* z - kd is in [-1, 1] in non-nearest rounding modes. */ y = z + X__exp_data.Fshift v3 = y @@ -110640,7 +110640,7 @@ _4: v5 = kd ki = *(*Tuint64_t)(unsafe.Pointer(&v5)) kd -= X__exp_data.Fshift - r = x + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN + r = x1 + kd*X__exp_data.Fnegln2hiN + kd*X__exp_data.Fnegln2loN /* The code assumes 2^-200 < |xtail| < 2^-8/N. */ r += xtail /* 2^(k/N) ~= scale * (1 + tail). */ @@ -110702,9 +110702,9 @@ func _zeroinfnan(tls *TLS, i Tuint64_t) (r int32) { return BoolInt32(uint64(2)*i-uint64(1) >= uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v1))-uint64(1)) } -func Xpow(tls *TLS, x float64, y1 float64) (r float64) { +func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v y1=%v, (%v:)", tls, x, y1, origin(2)) + trc("tls=%v x1=%v y1=%v, (%v:)", tls, x1, y1, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -110718,9 +110718,9 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { var _ /* lo at bp+0 */ Tdouble_t _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = ehi, elo, hi, ix, iy, sign_bias, topx, topy, x2, y, yint, v1, v10, v11, v12, v13, v14, v15, v2, v3, v4, v5, v6, v7, v8 sign_bias = uint32(0) - ix = *(*Tuint64_t)(unsafe.Pointer(&x)) + ix = *(*Tuint64_t)(unsafe.Pointer(&x1)) iy = *(*Tuint64_t)(unsafe.Pointer(&y1)) - topx = _top124(tls, x) + 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)) { /* Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0 @@ -110740,7 +110740,7 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { v3 = float64(X__builtin_inff(tls)) } if v4 || uint64(2)*iy > uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v3)) { - return x + y1 + return x1 + y1 } v5 = float64(1) if uint64(2)*ix == uint64(2)**(*Tuint64_t)(unsafe.Pointer(&v5)) { @@ -110753,7 +110753,7 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { return y1 * y1 } if _zeroinfnan(tls, ix) != 0 { - x2 = x * x + x2 = x1 * x1 if ix>>int32(63) != 0 && _checkint(tls, iy) == int32(1) { x2 = -x2 } @@ -110775,7 +110775,7 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { /* Finite x < 0. */ yint = _checkint(tls, iy) if yint == 0 { - return X__math_invalid(tls, x) + return X__math_invalid(tls, x1) } if yint == int32(1) { sign_bias = uint32(Int32FromInt32(0x800) << Int32FromInt32(EXP_TABLE_BITS)) @@ -110813,7 +110813,7 @@ func Xpow(tls *TLS, x float64, y1 float64) (r float64) { } if topx == uint32(0) { /* Normalize subnormal x so exponent becomes negative. */ - v15 = x * float64(4.503599627370496e+15) + v15 = x1 * float64(4.503599627370496e+15) ix = *(*Tuint64_t)(unsafe.Pointer(&v15)) ix &= uint64(0x7fffffffffffffff) ix = ix - Uint64FromUint64(52)<= Uint32FromUint32(2)*Uint32FromInt32(0x7f800000)-Uint32FromInt32(1)) } -func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { +func Xpowf(tls *TLS, x1 float32, y1 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v y1=%v, (%v:)", tls, x, y1, origin(2)) + trc("tls=%v x1=%v y1=%v, (%v:)", tls, x1, y1, origin(2)) defer func() { trc("-> %v", r) }() } var ix, iy, sign_bias Tuint32_t @@ -110973,7 +110973,7 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { var v5, v6 float64 _, _, _, _, _, _, _, _, _, _, _, _, _ = ix, iy, logx, sign_bias, x2, y, yint, ylogx, v1, v2, v4, v5, v6 sign_bias = uint32(0) - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + 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 { /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */ @@ -110985,7 +110985,7 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { return Float32FromFloat32(1) } if uint32(2)*ix > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) || uint32(2)*iy > Uint32FromUint32(2)*Uint32FromInt32(0x7f800000) { - return x + y1 + return x1 + y1 } if uint32(2)*ix == uint32(Int32FromInt32(2)*Int32FromInt32(0x3f800000)) { return Float32FromFloat32(1) @@ -110996,7 +110996,7 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { return y1 * y1 } if _zeroinfnan1(tls, ix) != 0 { - x2 = x * x + x2 = x1 * x1 if ix&uint32(0x80000000) != 0 && _checkint1(tls, iy) == int32(1) { x2 = -x2 } @@ -111018,7 +111018,7 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { /* Finite x < 0. */ yint = _checkint1(tls, iy) if yint == 0 { - return X__math_invalidf(tls, x) + return X__math_invalidf(tls, x1) } if yint == int32(1) { sign_bias = uint32(Int32FromInt32(1) << (Int32FromInt32(EXP2F_TABLE_BITS) + Int32FromInt32(11))) @@ -111027,7 +111027,7 @@ func Xpowf(tls *TLS, x float32, y1 float32) (r float32) { } if ix < uint32(0x00800000) { /* Normalize subnormal x so exponent becomes negative. */ - v4 = x * Float32FromFloat32(8.388608e+06) + v4 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v4)) ix &= uint32(0x7fffffff) ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) @@ -111574,9 +111574,9 @@ const DBL_EPSILON11 = 2.220446049250313e-16 var _toint6 = Float64FromInt32(1) / Float64FromFloat64(2.220446049250313e-16) -func Xround(tls *TLS, x float64) (r float64) { +func Xround(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -111597,35 +111597,35 @@ func Xround(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(52) & uint64(0x7ff)) if e >= Int32FromInt32(0x3ff)+Int32FromInt32(52) { - return x + return x3 } if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { - x = -x + x3 = -x3 } if e < Int32FromInt32(0x3ff)-Int32FromInt32(1) { /* raise inexact if x!=0 */ if uint64(8) == uint64(4) { - y = float32(x + _toint6) + y = float32(x3 + _toint6) } else { if uint64(8) == uint64(8) { - y1 = x + _toint6 + y1 = x3 + _toint6 } else { - y2 = x + _toint6 + y2 = x3 + _toint6 } } return Float64FromInt32(0) * *(*float64)(unsafe.Pointer(bp)) } - y3 = x + _toint6 - _toint6 - x + y3 = x3 + _toint6 - _toint6 - x3 if y3 > float64(0.5) { - y3 = y3 + x - Float64FromInt32(1) + y3 = y3 + x3 - Float64FromInt32(1) } else { if y3 <= -Float64FromFloat64(0.5) { - y3 = y3 + x + Float64FromInt32(1) + y3 = y3 + x3 + Float64FromInt32(1) } else { - y3 = y3 + x + y3 = y3 + x3 } } if *(*Tuint64_t)(unsafe.Pointer(bp))>>int32(63) != 0 { @@ -111639,9 +111639,9 @@ const FLT_EPSILON3 = 1.1920928955078125e-07 var _toint7 = Float32FromInt32(1) / Float32FromFloat32(1.1920928955078125e-07) -func Xroundf(tls *TLS, x float32) (r float32) { +func Xroundf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -111662,34 +111662,34 @@ func Xroundf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff)) if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) { - return x + return x3 } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) != 0 { - x = -x + x3 = -x3 } if e < Int32FromInt32(0x7f)-Int32FromInt32(1) { if uint64(4) == uint64(4) { - y = x + _toint7 + y = x3 + _toint7 } else { if uint64(4) == uint64(8) { - y1 = float64(x + _toint7) + y1 = float64(x3 + _toint7) } else { - y2 = float64(x + _toint7) + y2 = float64(x3 + _toint7) } } return Float32FromInt32(0) * *(*float32)(unsafe.Pointer(bp)) } - y3 = x + _toint7 - _toint7 - x + y3 = x3 + _toint7 - _toint7 - x3 if y3 > Float32FromFloat32(0.5) { - y3 = y3 + x - Float32FromInt32(1) + y3 = y3 + x3 - Float32FromInt32(1) } else { if y3 <= -Float32FromFloat32(0.5) { - y3 = y3 + x + Float32FromInt32(1) + y3 = y3 + x3 + Float32FromInt32(1) } else { - y3 = y3 + x + y3 = y3 + x3 } } if *(*Tuint32_t)(unsafe.Pointer(bp))>>int32(31) != 0 { @@ -111958,9 +111958,9 @@ func Xsignificandf(tls *TLS, x float32) (r float32) { return Xscalbnf(tls, x, -Xilogbf(tls, x)) } -func Xsin(tls *TLS, x float64) (r float64) { +func Xsin(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -111972,7 +111972,7 @@ func Xsin(tls *TLS, x float64) (r float64) { var _ /* y at bp+0 */ [2]float64 _, _, _, _, _, _, _, _ = ix, n, y, y1, y2, v1, v2, v3 /* High word of x. */ - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) ix &= uint32(0x7fffffff) /* |x| ~< pi/4 */ if ix <= uint32(0x3fe921fb) { @@ -111980,38 +111980,38 @@ func Xsin(tls *TLS, x float64) (r float64) { /* raise inexact if x != 0 and underflow if subnormal*/ if uint64(8) == uint64(4) { if ix < uint32(0x00100000) { - v1 = x / Float64FromFloat32(1.329227995784916e+36) + v1 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float64FromFloat32(1.329227995784916e+36) + v1 = x3 + Float64FromFloat32(1.329227995784916e+36) } y = float32(v1) } else { if uint64(8) == uint64(8) { if ix < uint32(0x00100000) { - v2 = x / Float64FromFloat32(1.329227995784916e+36) + v2 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float64FromFloat32(1.329227995784916e+36) + v2 = x3 + Float64FromFloat32(1.329227995784916e+36) } y1 = v2 } else { if ix < uint32(0x00100000) { - v3 = x / Float64FromFloat32(1.329227995784916e+36) + v3 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float64FromFloat32(1.329227995784916e+36) + v3 = x3 + Float64FromFloat32(1.329227995784916e+36) } y2 = v3 } } - return x + return x3 } - return X__sin(tls, x, float64(0), 0) + return X__sin(tls, x3, float64(0), 0) } /* sin(Inf or NaN) is NaN */ if ix >= uint32(0x7ff00000) { - return x - x + return x3 - x3 } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x, bp)) + n = uint32(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)) @@ -112025,9 +112025,9 @@ func Xsin(tls *TLS, x float64) (r float64) { return r } -func Xsincos(tls *TLS, x float64, sin uintptr, cos uintptr) { +func Xsincos(tls *TLS, x3 float64, sin uintptr, cos uintptr) { if __ccgo_strace { - trc("tls=%v x=%v sin=%v cos=%v, (%v:)", tls, x, sin, cos, origin(2)) + trc("tls=%v x3=%v sin=%v cos=%v, (%v:)", tls, x3, sin, cos, origin(2)) } bp := tls.Alloc(16) defer tls.Free(16) @@ -112037,7 +112037,7 @@ func Xsincos(tls *TLS, x float64, sin uintptr, cos uintptr) { var y float32 var _ /* y at bp+0 */ [2]float64 _, _, _, _, _, _, _, _, _, _, _ = c, ix, n, s, y, y1, y2, v1, v2, v3, v4 - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) ix &= uint32(0x7fffffff) /* |x| ~< pi/4 */ if ix <= uint32(0x3fe921fb) { @@ -112046,45 +112046,45 @@ func Xsincos(tls *TLS, x float64, sin uintptr, cos uintptr) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(8) == uint64(4) { if ix < uint32(0x00100000) { - v1 = x / Float64FromFloat32(1.329227995784916e+36) + v1 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float64FromFloat32(1.329227995784916e+36) + v1 = x3 + Float64FromFloat32(1.329227995784916e+36) } y = float32(v1) } else { if uint64(8) == uint64(8) { if ix < uint32(0x00100000) { - v2 = x / Float64FromFloat32(1.329227995784916e+36) + v2 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float64FromFloat32(1.329227995784916e+36) + v2 = x3 + Float64FromFloat32(1.329227995784916e+36) } y1 = v2 } else { if ix < uint32(0x00100000) { - v3 = x / Float64FromFloat32(1.329227995784916e+36) + v3 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float64FromFloat32(1.329227995784916e+36) + v3 = x3 + Float64FromFloat32(1.329227995784916e+36) } y2 = v3 } } - *(*float64)(unsafe.Pointer(sin)) = x + *(*float64)(unsafe.Pointer(sin)) = x3 *(*float64)(unsafe.Pointer(cos)) = float64(1) return } - *(*float64)(unsafe.Pointer(sin)) = X__sin(tls, x, float64(0), 0) - *(*float64)(unsafe.Pointer(cos)) = X__cos(tls, x, float64(0)) + *(*float64)(unsafe.Pointer(sin)) = X__sin(tls, x3, float64(0), 0) + *(*float64)(unsafe.Pointer(cos)) = X__cos(tls, x3, float64(0)) return } /* sincos(Inf or NaN) is NaN */ if ix >= uint32(0x7ff00000) { - v4 = x - x + v4 = x3 - x3 *(*float64)(unsafe.Pointer(cos)) = v4 *(*float64)(unsafe.Pointer(sin)) = v4 return } /* argument reduction needed */ - n = uint32(X__rem_pio2(tls, x, bp)) + n = uint32(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) { @@ -112117,9 +112117,9 @@ var _s2pio2 = Float64FromInt32(2) * Float64FromFloat64(1.5707963267948966) /* 0x var _s3pio2 = Float64FromInt32(3) * Float64FromFloat64(1.5707963267948966) /* 0x4012D97C, 0x7F3321D2 */ var _s4pio2 = Float64FromInt32(4) * Float64FromFloat64(1.5707963267948966) /* 0x401921FB, 0x54442D18 */ -func Xsincosf(tls *TLS, x float32, sin uintptr, cos uintptr) { +func Xsincosf(tls *TLS, x3 float32, sin uintptr, cos uintptr) { if __ccgo_strace { - trc("tls=%v x=%v sin=%v cos=%v, (%v:)", tls, x, sin, cos, origin(2)) + trc("tls=%v x3=%v sin=%v cos=%v, (%v:)", tls, x3, sin, cos, origin(2)) } bp := tls.Alloc(16) defer tls.Free(16) @@ -112130,7 +112130,7 @@ func Xsincosf(tls *TLS, x float32, sin uintptr, cos uintptr) { var y1, y2, v4, v5, v6, v7 float64 var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = c, ix, n, s, sign, y, y1, y2, v1, v2, v3, v4, v5, v6, v7, v8 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) /* |x| ~<= pi/4 */ @@ -112140,59 +112140,59 @@ func Xsincosf(tls *TLS, x float32, sin uintptr, cos uintptr) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(4) == uint64(4) { if ix < uint32(0x00100000) { - v1 = x / Float32FromFloat32(1.329227995784916e+36) + v1 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float32FromFloat32(1.329227995784916e+36) + v1 = x3 + Float32FromFloat32(1.329227995784916e+36) } y = v1 } else { if uint64(4) == uint64(8) { if ix < uint32(0x00100000) { - v2 = x / Float32FromFloat32(1.329227995784916e+36) + v2 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float32FromFloat32(1.329227995784916e+36) + v2 = x3 + Float32FromFloat32(1.329227995784916e+36) } y1 = float64(v2) } else { if ix < uint32(0x00100000) { - v3 = x / Float32FromFloat32(1.329227995784916e+36) + v3 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float32FromFloat32(1.329227995784916e+36) + v3 = x3 + Float32FromFloat32(1.329227995784916e+36) } y2 = float64(v3) } } - *(*float32)(unsafe.Pointer(sin)) = x + *(*float32)(unsafe.Pointer(sin)) = x3 *(*float32)(unsafe.Pointer(cos)) = Float32FromFloat32(1) return } - *(*float32)(unsafe.Pointer(sin)) = X__sindf(tls, float64(x)) - *(*float32)(unsafe.Pointer(cos)) = X__cosdf(tls, float64(x)) + *(*float32)(unsafe.Pointer(sin)) = X__sindf(tls, float64(x3)) + *(*float32)(unsafe.Pointer(cos)) = X__cosdf(tls, float64(x3)) return } /* |x| ~<= 5*pi/4 */ if ix <= uint32(0x407b53d1) { if ix <= uint32(0x4016cbe3) { /* |x| ~<= 3pi/4 */ if sign != 0 { - *(*float32)(unsafe.Pointer(sin)) = -X__cosdf(tls, float64(x)+_s1pio2) - *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, float64(x)+_s1pio2) + *(*float32)(unsafe.Pointer(sin)) = -X__cosdf(tls, float64(x3)+_s1pio2) + *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, float64(x3)+_s1pio2) } else { - *(*float32)(unsafe.Pointer(sin)) = X__cosdf(tls, _s1pio2-float64(x)) - *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, _s1pio2-float64(x)) + *(*float32)(unsafe.Pointer(sin)) = X__cosdf(tls, _s1pio2-float64(x3)) + *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, _s1pio2-float64(x3)) } return } /* -sin(x+c) is not correct if x+c could be 0: -0 vs +0 */ if sign != 0 { - v4 = float64(x) + _s2pio2 + v4 = float64(x3) + _s2pio2 } else { - v4 = float64(x) - _s2pio2 + v4 = float64(x3) - _s2pio2 } *(*float32)(unsafe.Pointer(sin)) = -X__sindf(tls, v4) if sign != 0 { - v5 = float64(x) + _s2pio2 + v5 = float64(x3) + _s2pio2 } else { - v5 = float64(x) - _s2pio2 + v5 = float64(x3) - _s2pio2 } *(*float32)(unsafe.Pointer(cos)) = -X__cosdf(tls, v5) return @@ -112201,37 +112201,37 @@ func Xsincosf(tls *TLS, x float32, sin uintptr, cos uintptr) { if ix <= uint32(0x40e231d5) { if ix <= uint32(0x40afeddf) { /* |x| ~<= 7*pi/4 */ if sign != 0 { - *(*float32)(unsafe.Pointer(sin)) = X__cosdf(tls, float64(x)+_s3pio2) - *(*float32)(unsafe.Pointer(cos)) = -X__sindf(tls, float64(x)+_s3pio2) + *(*float32)(unsafe.Pointer(sin)) = X__cosdf(tls, float64(x3)+_s3pio2) + *(*float32)(unsafe.Pointer(cos)) = -X__sindf(tls, float64(x3)+_s3pio2) } else { - *(*float32)(unsafe.Pointer(sin)) = -X__cosdf(tls, float64(x)-_s3pio2) - *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, float64(x)-_s3pio2) + *(*float32)(unsafe.Pointer(sin)) = -X__cosdf(tls, float64(x3)-_s3pio2) + *(*float32)(unsafe.Pointer(cos)) = X__sindf(tls, float64(x3)-_s3pio2) } return } if sign != 0 { - v6 = float64(x) + _s4pio2 + v6 = float64(x3) + _s4pio2 } else { - v6 = float64(x) - _s4pio2 + v6 = float64(x3) - _s4pio2 } *(*float32)(unsafe.Pointer(sin)) = X__sindf(tls, v6) if sign != 0 { - v7 = float64(x) + _s4pio2 + v7 = float64(x3) + _s4pio2 } else { - v7 = float64(x) - _s4pio2 + v7 = float64(x3) - _s4pio2 } *(*float32)(unsafe.Pointer(cos)) = X__cosdf(tls, v7) return } /* sin(Inf or NaN) is NaN */ if ix >= uint32(0x7f800000) { - v8 = x - x + v8 = x3 - x3 *(*float32)(unsafe.Pointer(cos)) = v8 *(*float32)(unsafe.Pointer(sin)) = v8 return } /* general argument reduction needed */ - n = uint32(X__rem_pio2f(tls, x, bp)) + n = uint32(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,9 +112279,9 @@ var _s2pio21 = Float64FromInt32(2) * Float64FromFloat64(1.5707963267948966) /* 0 var _s3pio21 = Float64FromInt32(3) * Float64FromFloat64(1.5707963267948966) /* 0x4012D97C, 0x7F3321D2 */ var _s4pio21 = Float64FromInt32(4) * Float64FromFloat64(1.5707963267948966) /* 0x401921FB, 0x54442D18 */ -func Xsinf(tls *TLS, x float32) (r float32) { +func Xsinf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -112292,7 +112292,7 @@ func Xsinf(tls *TLS, x float32) (r float32) { var y1, y2, v4, v5 float64 var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = int32(ix >> int32(31)) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ @@ -112300,68 +112300,68 @@ func Xsinf(tls *TLS, x float32) (r float32) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(4) == uint64(4) { if ix < uint32(0x00800000) { - v1 = x / Float32FromFloat32(1.329227995784916e+36) + v1 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float32FromFloat32(1.329227995784916e+36) + v1 = x3 + Float32FromFloat32(1.329227995784916e+36) } y = v1 } else { if uint64(4) == uint64(8) { if ix < uint32(0x00800000) { - v2 = x / Float32FromFloat32(1.329227995784916e+36) + v2 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float32FromFloat32(1.329227995784916e+36) + v2 = x3 + Float32FromFloat32(1.329227995784916e+36) } y1 = float64(v2) } else { if ix < uint32(0x00800000) { - v3 = x / Float32FromFloat32(1.329227995784916e+36) + v3 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float32FromFloat32(1.329227995784916e+36) + v3 = x3 + Float32FromFloat32(1.329227995784916e+36) } y2 = float64(v3) } } - return x + return x3 } - return X__sindf(tls, float64(x)) + return X__sindf(tls, float64(x3)) } if ix <= uint32(0x407b53d1) { /* |x| ~<= 5*pi/4 */ if ix <= uint32(0x4016cbe3) { /* |x| ~<= 3pi/4 */ if sign != 0 { - return -X__cosdf(tls, float64(x)+_s1pio21) + return -X__cosdf(tls, float64(x3)+_s1pio21) } else { - return X__cosdf(tls, float64(x)-_s1pio21) + return X__cosdf(tls, float64(x3)-_s1pio21) } } if sign != 0 { - v4 = -(float64(x) + _s2pio21) + v4 = -(float64(x3) + _s2pio21) } else { - v4 = -(float64(x) - _s2pio21) + v4 = -(float64(x3) - _s2pio21) } return X__sindf(tls, v4) } if ix <= uint32(0x40e231d5) { /* |x| ~<= 9*pi/4 */ if ix <= uint32(0x40afeddf) { /* |x| ~<= 7*pi/4 */ if sign != 0 { - return X__cosdf(tls, float64(x)+_s3pio21) + return X__cosdf(tls, float64(x3)+_s3pio21) } else { - return -X__cosdf(tls, float64(x)-_s3pio21) + return -X__cosdf(tls, float64(x3)-_s3pio21) } } if sign != 0 { - v5 = float64(x) + _s4pio21 + v5 = float64(x3) + _s4pio21 } else { - v5 = float64(x) - _s4pio21 + v5 = float64(x3) - _s4pio21 } return X__sindf(tls, v5) } /* sin(Inf or NaN) is NaN */ if ix >= uint32(0x7f800000) { - return x - x + return x3 - x3 } /* general argument reduction needed */ - n = X__rem_pio2f(tls, x, bp) + n = X__rem_pio2f(tls, x3, bp) switch n & Int32FromInt32(3) { case 0: return X__sindf(tls, *(*float64)(unsafe.Pointer(bp))) @@ -112517,9 +112517,9 @@ func _mul64(tls *TLS, a Tuint64_t, b Tuint64_t) (r Tuint64_t) { return ahi*bhi + ahi*blo>>int32(32) + alo*bhi>>int32(32) } -func Xsqrt(tls *TLS, x float64) (r1 float64) { +func Xsqrt(tls *TLS, x1 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var d, d0, d1, d2, i, ix, m, r, s, tiny, top, u Tuint64_t @@ -112528,21 +112528,21 @@ func Xsqrt(tls *TLS, x float64) (r1 float64) { var v2 int64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, d0, d1, d2, even, i, ix, m, r, s, t, tiny, top, u, y, y1, v1, v2, v3 /* special case handling. */ - ix = *(*Tuint64_t)(unsafe.Pointer(&x)) + ix = *(*Tuint64_t)(unsafe.Pointer(&x1)) top = ix >> int32(52) if top-uint64(0x001) >= uint64(Int32FromInt32(0x7ff)-Int32FromInt32(0x001)) { /* x < 0x1p-1022 or inf or nan. */ if ix*uint64(2) == uint64(0) { - return x + return x1 } if ix == uint64(0x7ff0000000000000) { - return x + return x1 } if ix > uint64(0x7ff0000000000000) { - return X__math_invalid(tls, x) + return X__math_invalid(tls, x1) } /* x is subnormal, normalize it. */ - v1 = x * float64(4.503599627370496e+15) + v1 = x1 * float64(4.503599627370496e+15) ix = *(*Tuint64_t)(unsafe.Pointer(&v1)) top = ix >> int32(52) top -= uint64(52) @@ -112669,9 +112669,9 @@ func _mul321(tls *TLS, a Tuint32_t, b Tuint32_t) (r Tuint32_t) { /* see sqrt.c for more detailed comments. */ -func Xsqrtf(tls *TLS, x float32) (r1 float32) { +func Xsqrtf(tls *TLS, x1 float32) (r1 float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x1=%v, (%v:)", tls, x1, origin(2)) defer func() { trc("-> %v", r1) }() } var d, d0, d1, d2, even, ey, i, ix, m, m0, m1, r, s, tiny, u Tuint32_t @@ -112679,20 +112679,20 @@ func Xsqrtf(tls *TLS, x float32) (r1 float32) { var v2 uint32 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(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x1)) if ix-uint32(0x00800000) >= uint32(Int32FromInt32(0x7f800000)-Int32FromInt32(0x00800000)) { /* x < 0x1p-126 or inf or nan. */ if ix*uint32(2) == uint32(0) { - return x + return x1 } if ix == uint32(0x7f800000) { - return x + return x1 } if ix > uint32(0x7f800000) { - return X__math_invalidf(tls, x) + return X__math_invalidf(tls, x1) } /* x is subnormal, normalize it. */ - v1 = x * Float32FromFloat32(8.388608e+06) + v1 = x1 * Float32FromFloat32(8.388608e+06) ix = *(*Tuint32_t)(unsafe.Pointer(&v1)) ix -= uint32(Int32FromInt32(23) << Int32FromInt32(23)) } @@ -112763,9 +112763,9 @@ func Xsqrtl(tls *TLS, x float64) (r float64) { return Xsqrt(tls, x) } -func Xtan(tls *TLS, x float64) (r float64) { +func Xtan(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -112776,7 +112776,7 @@ func Xtan(tls *TLS, x float64) (r float64) { var y1, y2, v1, v2, v3 float64 var _ /* y at bp+0 */ [2]float64 _, _, _, _, _, _, _, _ = ix, n, y, y1, y2, v1, v2, v3 - ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x)) >> int32(32)) + ix = uint32(*(*Tuint64_t)(unsafe.Pointer(&x3)) >> int32(32)) ix &= uint32(0x7fffffff) /* |x| ~< pi/4 */ if ix <= uint32(0x3fe921fb) { @@ -112784,38 +112784,38 @@ func Xtan(tls *TLS, x float64) (r float64) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(8) == uint64(4) { if ix < uint32(0x00100000) { - v1 = x / Float64FromFloat32(1.329227995784916e+36) + v1 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float64FromFloat32(1.329227995784916e+36) + v1 = x3 + Float64FromFloat32(1.329227995784916e+36) } y = float32(v1) } else { if uint64(8) == uint64(8) { if ix < uint32(0x00100000) { - v2 = x / Float64FromFloat32(1.329227995784916e+36) + v2 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float64FromFloat32(1.329227995784916e+36) + v2 = x3 + Float64FromFloat32(1.329227995784916e+36) } y1 = v2 } else { if ix < uint32(0x00100000) { - v3 = x / Float64FromFloat32(1.329227995784916e+36) + v3 = x3 / Float64FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float64FromFloat32(1.329227995784916e+36) + v3 = x3 + Float64FromFloat32(1.329227995784916e+36) } y2 = v3 } } - return x + return x3 } - return X__tan(tls, x, float64(0), 0) + return X__tan(tls, x3, float64(0), 0) } /* tan(Inf or NaN) is NaN */ if ix >= uint32(0x7ff00000) { - return x - x + return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2(tls, x, bp)) + 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))) } @@ -112830,9 +112830,9 @@ var _t2pio2 = Float64FromInt32(2) * Float64FromFloat64(1.5707963267948966) /* 0x var _t3pio2 = Float64FromInt32(3) * Float64FromFloat64(1.5707963267948966) /* 0x4012D97C, 0x7F3321D2 */ var _t4pio2 = Float64FromInt32(4) * Float64FromFloat64(1.5707963267948966) /* 0x401921FB, 0x54442D18 */ -func Xtanf(tls *TLS, x float32) (r float32) { +func Xtanf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -112843,7 +112843,7 @@ func Xtanf(tls *TLS, x float32) (r float32) { var y1, y2, v4, v5, v6, v7 float64 var _ /* y at bp+0 */ float64 _, _, _, _, _, _, _, _, _, _, _, _, _ = ix, n, sign, y, y1, y2, v1, v2, v3, v4, v5, v6, v7 - ix = *(*Tuint32_t)(unsafe.Pointer(&x)) + ix = *(*Tuint32_t)(unsafe.Pointer(&x3)) sign = ix >> int32(31) ix &= uint32(0x7fffffff) if ix <= uint32(0x3f490fda) { /* |x| ~<= pi/4 */ @@ -112851,45 +112851,45 @@ func Xtanf(tls *TLS, x float32) (r float32) { /* raise inexact if x!=0 and underflow if subnormal */ if uint64(4) == uint64(4) { if ix < uint32(0x00800000) { - v1 = x / Float32FromFloat32(1.329227995784916e+36) + v1 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v1 = x + Float32FromFloat32(1.329227995784916e+36) + v1 = x3 + Float32FromFloat32(1.329227995784916e+36) } y = v1 } else { if uint64(4) == uint64(8) { if ix < uint32(0x00800000) { - v2 = x / Float32FromFloat32(1.329227995784916e+36) + v2 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v2 = x + Float32FromFloat32(1.329227995784916e+36) + v2 = x3 + Float32FromFloat32(1.329227995784916e+36) } y1 = float64(v2) } else { if ix < uint32(0x00800000) { - v3 = x / Float32FromFloat32(1.329227995784916e+36) + v3 = x3 / Float32FromFloat32(1.329227995784916e+36) } else { - v3 = x + Float32FromFloat32(1.329227995784916e+36) + v3 = x3 + Float32FromFloat32(1.329227995784916e+36) } y2 = float64(v3) } } - return x + return x3 } - return X__tandf(tls, float64(x), 0) + return X__tandf(tls, float64(x3), 0) } if ix <= uint32(0x407b53d1) { /* |x| ~<= 5*pi/4 */ if ix <= uint32(0x4016cbe3) { /* |x| ~<= 3pi/4 */ if sign != 0 { - v4 = float64(x) + _t1pio2 + v4 = float64(x3) + _t1pio2 } else { - v4 = float64(x) - _t1pio2 + v4 = float64(x3) - _t1pio2 } return X__tandf(tls, v4, int32(1)) } else { if sign != 0 { - v5 = float64(x) + _t2pio2 + v5 = float64(x3) + _t2pio2 } else { - v5 = float64(x) - _t2pio2 + v5 = float64(x3) - _t2pio2 } return X__tandf(tls, v5, 0) } @@ -112897,26 +112897,26 @@ func Xtanf(tls *TLS, x float32) (r float32) { if ix <= uint32(0x40e231d5) { /* |x| ~<= 9*pi/4 */ if ix <= uint32(0x40afeddf) { /* |x| ~<= 7*pi/4 */ if sign != 0 { - v6 = float64(x) + _t3pio2 + v6 = float64(x3) + _t3pio2 } else { - v6 = float64(x) - _t3pio2 + v6 = float64(x3) - _t3pio2 } return X__tandf(tls, v6, int32(1)) } else { if sign != 0 { - v7 = float64(x) + _t4pio2 + v7 = float64(x3) + _t4pio2 } else { - v7 = float64(x) - _t4pio2 + v7 = float64(x3) - _t4pio2 } return X__tandf(tls, v7, 0) } } /* tan(Inf or NaN) is NaN */ if ix >= uint32(0x7f800000) { - return x - x + return x3 - x3 } /* argument reduction */ - n = uint32(X__rem_pio2f(tls, x, bp)) + n = uint32(X__rem_pio2f(tls, x3, bp)) return X__tandf(tls, *(*float64)(unsafe.Pointer(bp)), int32(n&uint32(1))) } @@ -112928,9 +112928,9 @@ const M_PI_210 = 0 // * = (exp(2*x) - 1)/(exp(2*x) - 1 + 2) // * = (1 - exp(-2*x))/(exp(-2*x) - 1 + 2) // */ -func Xtanh(tls *TLS, x float64) (r float64) { +func Xtanh(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -112952,45 +112952,45 @@ func Xtanh(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*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) - x = *(*float64)(unsafe.Pointer(bp)) + x3 = *(*float64)(unsafe.Pointer(bp)) w = uint32(*(*Tuint64_t)(unsafe.Pointer(bp)) >> int32(32)) if w > uint32(0x3fe193ea) { /* |x| > log(3)/2 ~= 0.5493 or nan */ if w > uint32(0x40340000) { /* |x| > 20 or nan */ /* note: this branch avoids raising overflow */ - t = Float64FromInt32(1) - Float64FromInt32(0)/x + t = Float64FromInt32(1) - Float64FromInt32(0)/x3 } else { - t = Xexpm1(tls, Float64FromInt32(2)*x) + t = Xexpm1(tls, Float64FromInt32(2)*x3) t = Float64FromInt32(1) - Float64FromInt32(2)/(t+Float64FromInt32(2)) } } else { if w > uint32(0x3fd058ae) { /* |x| > log(5/3)/2 ~= 0.2554 */ - t = Xexpm1(tls, Float64FromInt32(2)*x) + t = Xexpm1(tls, Float64FromInt32(2)*x3) t = t / (t + Float64FromInt32(2)) } else { if w >= uint32(0x00100000) { /* |x| >= 0x1p-1022, up to 2ulp error in [0.1,0.2554] */ - t = Xexpm1(tls, float64(-Int32FromInt32(2))*x) + t = Xexpm1(tls, float64(-Int32FromInt32(2))*x3) t = -t / (t + Float64FromInt32(2)) } else { /* |x| is subnormal */ /* note: the branch above would not raise underflow in [0x1p-1023,0x1p-1022) */ if uint64(4) == uint64(4) { - y = float32(x) + y = float32(x3) } else { if uint64(4) == uint64(8) { - y1 = float64(float32(x)) + y1 = float64(float32(x3)) } else { - y2 = float64(float32(x)) + y2 = float64(float32(x3)) } } - t = x + t = x3 } } } @@ -113002,9 +113002,9 @@ func Xtanh(tls *TLS, x float64) (r float64) { return v1 } -func Xtanhf(tls *TLS, x float32) (r float32) { +func Xtanhf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -113025,43 +113025,43 @@ func Xtanhf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 /* x = |x| */ sign = int32(*(*Tuint32_t)(unsafe.Pointer(bp)) >> int32(31)) *(*Tuint32_t)(unsafe.Pointer(bp)) &= uint32(0x7fffffff) - x = *(*float32)(unsafe.Pointer(bp)) + x3 = *(*float32)(unsafe.Pointer(bp)) w = *(*Tuint32_t)(unsafe.Pointer(bp)) if w > uint32(0x3f0c9f54) { /* |x| > log(3)/2 ~= 0.5493 or nan */ if w > uint32(0x41200000) { /* |x| > 10 */ - t = Float32FromInt32(1) + Float32FromInt32(0)/x + t = Float32FromInt32(1) + Float32FromInt32(0)/x3 } else { - t = Xexpm1f(tls, Float32FromInt32(2)*x) + t = Xexpm1f(tls, Float32FromInt32(2)*x3) t = Float32FromInt32(1) - Float32FromInt32(2)/(t+Float32FromInt32(2)) } } else { if w > uint32(0x3e82c578) { /* |x| > log(5/3)/2 ~= 0.2554 */ - t = Xexpm1f(tls, Float32FromInt32(2)*x) + t = Xexpm1f(tls, Float32FromInt32(2)*x3) t = t / (t + Float32FromInt32(2)) } else { if w >= uint32(0x00800000) { /* |x| >= 0x1p-126 */ - t = Xexpm1f(tls, float32(-Int32FromInt32(2))*x) + t = Xexpm1f(tls, float32(-Int32FromInt32(2))*x3) t = -t / (t + Float32FromInt32(2)) } else { /* |x| is subnormal */ if uint64(4) == uint64(4) { - y = x * x + y = x3 * x3 } else { if uint64(4) == uint64(8) { - y1 = float64(x * x) + y1 = float64(x3 * x3) } else { - y2 = float64(x * x) + y2 = float64(x3 * x3) } } - t = x + t = x3 } } } @@ -113226,9 +113226,9 @@ func _S(tls *TLS, x float64) (r float64) { return num / den } -func Xtgamma(tls *TLS, x float64) (r1 float64) { +func Xtgamma(tls *TLS, x3 float64) (r1 float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r1) }() } bp := tls.Alloc(16) @@ -113250,26 +113250,26 @@ func Xtgamma(tls *TLS, x float64) (r1 float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*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)) /* special cases */ if ix >= uint32(0x7ff00000) { /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ - return x + float64(X__builtin_inff(tls)) + return x3 + float64(X__builtin_inff(tls)) } if ix < uint32((Int32FromInt32(0x3ff)-Int32FromInt32(54))<= 172: tgamma(x)=inf with overflow */ @@ -113277,26 +113277,26 @@ func Xtgamma(tls *TLS, x float64) (r1 float64) { if ix >= uint32(0x40670000) { /* |x| >= 184 */ if sign != 0 { if uint64(4) == uint64(4) { - y = float32(Float64FromFloat64(1.1754943508222875e-38) / x) + y = float32(Float64FromFloat64(1.1754943508222875e-38) / x3) } else { if uint64(4) == uint64(8) { - y1 = float64(float32(Float64FromFloat64(1.1754943508222875e-38) / x)) + y1 = float64(float32(Float64FromFloat64(1.1754943508222875e-38) / x3)) } else { - y2 = float64(float32(Float64FromFloat64(1.1754943508222875e-38) / x)) + y2 = float64(float32(Float64FromFloat64(1.1754943508222875e-38) / x3)) } } - if Xfloor(tls, x)*float64(0.5) == Xfloor(tls, x*float64(0.5)) { + if Xfloor(tls, x3)*float64(0.5) == Xfloor(tls, x3*float64(0.5)) { return Float64FromInt32(0) } return -Float64FromFloat64(0) } - x *= float64(8.98846567431158e+307) - return x + x3 *= float64(8.98846567431158e+307) + return x3 } if sign != 0 { - v1 = -x + v1 = -x3 } else { - v1 = x + v1 = x3 } absx = v1 /* handle the error of x + g - 0.5 */ @@ -113310,7 +113310,7 @@ func Xtgamma(tls *TLS, x float64) (r1 float64) { } z = absx - float64(0.5) r = _S(tls, absx) * Xexp(tls, -y3) - if x < Float64FromInt32(0) { + if x3 < Float64FromInt32(0) { /* reflection formula for negative x */ /* sinpi(absx) is not 0, integers are already handled */ r = -_pi4 / (_sinpi(tls, absx) * absx * r) @@ -113339,9 +113339,9 @@ func Xtgammal(tls *TLS, x float64) (r float64) { return Xtgamma(tls, x) } -func Xtrunc(tls *TLS, x float64) (r float64) { +func Xtrunc(tls *TLS, x3 float64) (r float64) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -113362,34 +113362,34 @@ func Xtrunc(tls *TLS, x float64) (r float64) { Fi [0]Tuint64_t Ff float64 }{} - *(*float64)(unsafe.Pointer(bp)) = x + *(*float64)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint64_t)(unsafe.Pointer(bp))>>Int32FromInt32(52)&Uint64FromInt32(0x7ff)) - int32(0x3ff) + int32(12) if e >= Int32FromInt32(52)+Int32FromInt32(12) { - return x + return x3 } if e < int32(12) { e = int32(1) } m = -Uint64FromUint64(1) >> e if *(*Tuint64_t)(unsafe.Pointer(bp))&m == uint64(0) { - return x + return x3 } if uint64(8) == uint64(4) { - y = float32(x + Float64FromFloat32(1.329227995784916e+36)) + y = float32(x3 + Float64FromFloat32(1.329227995784916e+36)) } else { if uint64(8) == uint64(8) { - y1 = x + Float64FromFloat32(1.329227995784916e+36) + y1 = x3 + Float64FromFloat32(1.329227995784916e+36) } else { - y2 = x + Float64FromFloat32(1.329227995784916e+36) + y2 = x3 + Float64FromFloat32(1.329227995784916e+36) } } *(*Tuint64_t)(unsafe.Pointer(bp)) &= ^m return *(*float64)(unsafe.Pointer(bp)) } -func Xtruncf(tls *TLS, x float32) (r float32) { +func Xtruncf(tls *TLS, x3 float32) (r float32) { if __ccgo_strace { - trc("tls=%v x=%v, (%v:)", tls, x, origin(2)) + trc("tls=%v x3=%v, (%v:)", tls, x3, origin(2)) defer func() { trc("-> %v", r) }() } bp := tls.Alloc(16) @@ -113410,25 +113410,25 @@ func Xtruncf(tls *TLS, x float32) (r float32) { Fi [0]Tuint32_t Ff float32 }{} - *(*float32)(unsafe.Pointer(bp)) = x + *(*float32)(unsafe.Pointer(bp)) = x3 e = int32(*(*Tuint32_t)(unsafe.Pointer(bp))>>Int32FromInt32(23)&Uint32FromInt32(0xff)) - int32(0x7f) + int32(9) if e >= Int32FromInt32(23)+Int32FromInt32(9) { - return x + return x3 } if e < int32(9) { e = int32(1) } m = -Uint32FromUint32(1) >> e if *(*Tuint32_t)(unsafe.Pointer(bp))&m == uint32(0) { - return x + return x3 } if uint64(4) == uint64(4) { - y = x + Float32FromFloat32(1.329227995784916e+36) + y = x3 + Float32FromFloat32(1.329227995784916e+36) } else { if uint64(4) == uint64(8) { - y1 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y1 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } else { - y2 = float64(x + Float32FromFloat32(1.329227995784916e+36)) + y2 = float64(x3 + Float32FromFloat32(1.329227995784916e+36)) } } *(*Tuint32_t)(unsafe.Pointer(bp)) &= ^m @@ -124565,13 +124565,13 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { } bp := tls.Alloc(1120) defer tls.Free(1120) - var c, v3, v4 uintptr + var c1, v3, v4 uintptr var r, v12 int64 var v1, v5 int32 var v10, v11, v6, v7, v8, v9 Tsyscall_arg_t var _ /* chbuf at bp+56 */ [66]Tcmsghdr var _ /* h at bp+0 */ Tmsghdr - _, _, _, _, _, _, _, _, _, _, _, _, _ = c, r, v1, v10, v11, v12, v3, v4, v5, v6, v7, v8, v9 + _, _, _, _, _, _, _, _, _, _, _, _, _ = c1, r, v1, v10, v11, v12, v3, v4, v5, v6, v7, v8, v9 if msg != 0 { *(*Tmsghdr)(unsafe.Pointer(bp)) = *(*Tmsghdr)(unsafe.Pointer(msg)) v1 = Int32FromInt32(0) @@ -124590,21 +124590,21 @@ func Xsendmsg(tls *TLS, fd int32, msg uintptr, flags int32) (r1 Tssize_t) { } else { v3 = UintptrFromInt32(0) } - c = v3 + c1 = v3 for { - if !(c != 0) { + if !(c1 != 0) { break } - (*Tcmsghdr)(unsafe.Pointer(c)).F__pad1 = 0 + (*Tcmsghdr)(unsafe.Pointer(c1)).F__pad1 = 0 goto _2 _2: ; - if uint64((*Tcmsghdr)(unsafe.Pointer(c)).Fcmsg_len) < uint64(16) || (uint64((*Tcmsghdr)(unsafe.Pointer(c)).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(c)) { + 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)) { v4 = uintptr(0) } else { - v4 = c + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(c)).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))&uint64(^int64(Uint64FromInt64(8)-Uint64FromInt32(1)))) } - c = v4 + c1 = v4 } } } @@ -136248,15 +136248,15 @@ _20: return c } -func Xfgetc(tls *TLS, f uintptr) (r int32) { +func Xfgetc(tls *TLS, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) + trc("tls=%v f1=%v, (%v:)", tls, f1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v2, v4 int32 var v1, v5, v6 uintptr _, _, _, _, _, _ = l, v1, v2, v4, v5, v6 - v1 = f + v1 = f1 l = AtomicLoadPInt32(v1 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { if (*TFILE)(unsafe.Pointer(v1)).Frpos != (*TFILE)(unsafe.Pointer(v1)).Frend { @@ -137160,17 +137160,17 @@ _21: return c } -func Xfputc(tls *TLS, c int32, f uintptr) (r int32) { +func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v c=%v f=%v, (%v:)", tls, c, f, origin(2)) + trc("tls=%v c1=%v f1=%v, (%v:)", tls, c1, f1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v1, v3, v5 int32 var v2, v7, v8 uintptr var v6 uint8 _, _, _, _, _, _, _, _ = l, v1, v2, v3, v5, v6, v7, v8 - v1 = c - v2 = f + v1 = c1 + 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 { @@ -138084,15 +138084,15 @@ _20: return c } -func Xgetc(tls *TLS, f uintptr) (r int32) { +func Xgetc(tls *TLS, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) + trc("tls=%v f1=%v, (%v:)", tls, f1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v2, v4 int32 var v1, v5, v6 uintptr _, _, _, _, _, _ = l, v1, v2, v4, v5, v6 - v1 = f + v1 = f1 l = AtomicLoadPInt32(v1 + 140) if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid { if (*TFILE)(unsafe.Pointer(v1)).Frpos != (*TFILE)(unsafe.Pointer(v1)).Frend { @@ -138112,12 +138112,12 @@ _3: return v2 } -func X_IO_getc(tls *TLS, f uintptr) (r int32) { +func X_IO_getc(tls *TLS, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) + trc("tls=%v f1=%v, (%v:)", tls, f1, origin(2)) defer func() { trc("-> %v", r) }() } - return Xgetc(tls, f) + return Xgetc(tls, f1) } func Xgetc_unlocked(tls *TLS, f uintptr) (r int32) { @@ -139024,17 +139024,17 @@ _21: return c } -func Xputc(tls *TLS, c int32, f uintptr) (r int32) { +func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v c=%v f=%v, (%v:)", tls, c, f, origin(2)) + trc("tls=%v c1=%v f1=%v, (%v:)", tls, c1, f1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v1, v3, v5 int32 var v2, v7, v8 uintptr var v6 uint8 _, _, _, _, _, _, _, _ = l, v1, v2, v3, v5, v6, v7, v8 - v1 = c - v2 = f + v1 = c1 + 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 { @@ -139056,12 +139056,12 @@ _4: return v3 } -func X_IO_putc(tls *TLS, c int32, f uintptr) (r int32) { +func X_IO_putc(tls *TLS, c1 int32, f1 uintptr) (r int32) { if __ccgo_strace { - trc("tls=%v c=%v f=%v, (%v:)", tls, c, f, origin(2)) + trc("tls=%v c1=%v f1=%v, (%v:)", tls, c1, f1, origin(2)) defer func() { trc("-> %v", r) }() } - return Xputc(tls, c, f) + return Xputc(tls, c1, f1) } func Xputc_unlocked(tls *TLS, c int32, f uintptr) (r int32) { @@ -139210,16 +139210,16 @@ _21: return c } -func Xputchar(tls *TLS, c int32) (r int32) { +func Xputchar(tls *TLS, c1 int32) (r int32) { if __ccgo_strace { - trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) + trc("tls=%v c1=%v, (%v:)", tls, c1, origin(2)) defer func() { trc("-> %v", r) }() } var l, v1, v3, v5 int32 var v2, v7, v8 uintptr var v6 uint8 _, _, _, _, _, _, _, _ = l, v1, v2, v3, v5, v6, v7, v8 - v1 = c + v1 = c1 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 { diff --git a/vendor/modules.txt b/vendor/modules.txt index a377529ff2..3abe07954c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -61,7 +61,7 @@ github.com/CortexFoundation/robot/backend # github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66 ## explicit; go 1.16 github.com/CortexFoundation/statik -# github.com/CortexFoundation/torrentfs v1.0.63-0.20240423105601-55f365eb8c9e +# github.com/CortexFoundation/torrentfs v1.0.63-0.20240429143930-cd54f430d284 ## explicit; go 1.22 github.com/CortexFoundation/torrentfs github.com/CortexFoundation/torrentfs/backend @@ -154,7 +154,7 @@ github.com/anacrolix/stm/stmutil # github.com/anacrolix/sync v0.5.1 ## explicit; go 1.13 github.com/anacrolix/sync -# github.com/anacrolix/torrent v1.55.1-0.20240419234247-505551d27de2 +# github.com/anacrolix/torrent v1.55.1-0.20240426070649-41fc76adf87d ## explicit; go 1.22 github.com/anacrolix/torrent github.com/anacrolix/torrent/analysis @@ -347,7 +347,7 @@ github.com/cespare/xxhash/v2 # github.com/charmbracelet/bubbletea v0.25.0 ## explicit; go 1.17 github.com/charmbracelet/bubbletea -# github.com/cloudflare/cloudflare-go v0.93.0 +# github.com/cloudflare/cloudflare-go v0.94.0 ## explicit; go 1.19 github.com/cloudflare/cloudflare-go # github.com/cockroachdb/errors v1.11.1 @@ -553,7 +553,7 @@ github.com/getsentry/sentry-go/internal/traceparser ## explicit; go 1.18 github.com/go-llsqlite/adapter github.com/go-llsqlite/adapter/sqlitex -# github.com/go-llsqlite/crawshaw v0.5.1 +# github.com/go-llsqlite/crawshaw v0.5.2-0.20240425034140-f30eb7704568 ## explicit; go 1.18 github.com/go-llsqlite/crawshaw github.com/go-llsqlite/crawshaw/c @@ -624,7 +624,7 @@ github.com/google/go-querystring/query ## explicit; go 1.12 github.com/google/gofuzz github.com/google/gofuzz/bytesource -# github.com/google/pprof v0.0.0-20240422182052-72c8669ad3e7 +# github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 ## explicit; go 1.19 github.com/google/pprof/profile # github.com/google/uuid v1.6.0 @@ -880,7 +880,7 @@ github.com/pion/randutil # github.com/pion/rtcp v1.2.14 ## explicit; go 1.13 github.com/pion/rtcp -# github.com/pion/rtp v1.8.5 +# github.com/pion/rtp v1.8.6 ## explicit; go 1.19 github.com/pion/rtp github.com/pion/rtp/codecs @@ -898,7 +898,7 @@ github.com/pion/srtp/v2 ## explicit; go 1.12 github.com/pion/stun github.com/pion/stun/internal/hmac -# github.com/pion/transport/v2 v2.2.4 +# github.com/pion/transport/v2 v2.2.5 ## explicit; go 1.12 github.com/pion/transport/v2 github.com/pion/transport/v2/connctx @@ -917,7 +917,7 @@ github.com/pion/turn/v2/internal/client github.com/pion/turn/v2/internal/ipnet github.com/pion/turn/v2/internal/proto github.com/pion/turn/v2/internal/server -# github.com/pion/webrtc/v3 v3.2.38 +# github.com/pion/webrtc/v3 v3.2.39 ## explicit; go 1.17 github.com/pion/webrtc/v3 github.com/pion/webrtc/v3/internal/fmtp @@ -960,9 +960,10 @@ github.com/rivo/uniseg # github.com/rogpeppe/go-internal v1.12.0 ## explicit; go 1.20 github.com/rogpeppe/go-internal/fmtsort -# github.com/rs/cors v1.10.1 +# github.com/rs/cors v1.11.0 ## explicit; go 1.13 github.com/rs/cors +github.com/rs/cors/internal # github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 ## explicit; go 1.12 github.com/rs/dnscache @@ -1013,10 +1014,10 @@ github.com/tidwall/btree # github.com/tidwall/hashmap v1.8.1 ## explicit; go 1.18 github.com/tidwall/hashmap -# github.com/tklauser/go-sysconf v0.3.13 +# github.com/tklauser/go-sysconf v0.3.14 ## explicit; go 1.18 github.com/tklauser/go-sysconf -# github.com/tklauser/numcpus v0.7.0 +# github.com/tklauser/numcpus v0.8.0 ## explicit; go 1.18 github.com/tklauser/numcpus # github.com/ucwong/color v1.10.1-0.20200624105241-fba1e010fe1e @@ -1040,7 +1041,7 @@ github.com/ucwong/golang-kv/pebble # github.com/ucwong/shard v1.0.1-0.20240327124306-59a521744cae ## explicit; go 1.20 github.com/ucwong/shard -# github.com/urfave/cli/v2 v2.27.1 +# github.com/urfave/cli/v2 v2.27.2 ## explicit; go 1.18 github.com/urfave/cli/v2 # github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 @@ -1069,7 +1070,7 @@ go.opencensus.io/internal go.opencensus.io/trace go.opencensus.io/trace/internal go.opencensus.io/trace/tracestate -# go.opentelemetry.io/otel v1.25.0 +# go.opentelemetry.io/otel v1.26.0 ## explicit; go 1.21 go.opentelemetry.io/otel go.opentelemetry.io/otel/attribute @@ -1080,11 +1081,11 @@ go.opentelemetry.io/otel/internal/attribute go.opentelemetry.io/otel/internal/baggage go.opentelemetry.io/otel/internal/global go.opentelemetry.io/otel/propagation -# go.opentelemetry.io/otel/metric v1.25.0 +# go.opentelemetry.io/otel/metric v1.26.0 ## explicit; go 1.21 go.opentelemetry.io/otel/metric go.opentelemetry.io/otel/metric/embedded -# go.opentelemetry.io/otel/trace v1.25.0 +# go.opentelemetry.io/otel/trace v1.26.0 ## explicit; go 1.21 go.opentelemetry.io/otel/trace go.opentelemetry.io/otel/trace/embedded @@ -1268,7 +1269,7 @@ gopkg.in/yaml.v3 # lukechampine.com/blake3 v1.2.2 ## explicit; go 1.17 lukechampine.com/blake3 -# modernc.org/libc v1.50.2 +# modernc.org/libc v1.50.4 ## explicit; go 1.20 modernc.org/libc modernc.org/libc/errno