code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
package Dancer::Route::Registry; use strict; use warnings; use Carp; use Dancer::Route; use base 'Dancer::Object'; use Dancer::Logger; use Dancer::Exception qw(:all); Dancer::Route::Registry->attributes(qw( id )); my $id = 1; sub init { my ($self) = @_; unless (defined $self->{id}) { $self->id($id++); } $self->{routes} = {}; return $self; } sub is_empty { my ($self) = @_; for my $method ( keys %{ $self->routes } ) { return 0 if $self->routes($method); } return 1; } # replace any ':foo' by '(.+)' and stores all the named # matches defined in $REG->{route_params}{$route} sub routes { my ($self, $method) = @_; if ($method) { my $route = $self->{routes}{$method}; return $route ? $route : []; } else { return $self->{routes}; } } sub add_route { my ($self, $route) = @_; $self->{routes}{$route->method} ||= []; my @registered = @{$self->routes($route->method)}; my $last = $registered[-1]; $route->set_previous($last) if defined $last; # if the route have options, we store the route at the beginning # of the routes. This way, we can have the following routes: # get '/' => sub {} and ajax '/' => sub {} # and the user won't have to declare the ajax route before the get if (keys %{$route->{options}}) { unshift @{$self->routes($route->method)}, $route; } else { push @{$self->routes($route->method)}, $route; } return $route; } # sugar for add_route sub register_route { my ($self, %args) = @_; # look if the caller (where the route is declared) exists as a Dancer::App # object my ($package) = caller(2); if ($package && Dancer::App->app_exists($package)) { my $app = Dancer::App->get($package); my $route = Dancer::Route->new(prefix => $app->prefix, %args); return $app->registry->add_route($route); } else { # FIXME maybe this code is useless, drop it later if so my $route = Dancer::Route->new(%args); return $self->add_route($route); } } # sugar for Dancer.pm # class, any, ARRAY(0x9864818), '/path', CODE(0x990ac88) # or # class, any, '/path', CODE(0x990ac88) sub any_add { my ($self, $pattern, @rest) = @_; my @methods = qw(get post put patch delete options head); if (ref($pattern) eq 'ARRAY') { @methods = @$pattern; # 'get' defaults to 'get' and 'head' push @methods, 'head' if ((grep { $_ eq 'get' } @methods) and not (grep { $_ eq 'head' } @methods)); $pattern = shift @rest; } raise core_route => "Syntax error, methods should be provided as an ARRAY ref" if grep {$_ eq $pattern} @methods; $self->universal_add($_, $pattern, @rest) for @methods; return scalar(@methods); } sub universal_add { my ($self, $method, $pattern, @rest) = @_; my %options; my $code; if (@rest == 1) { $code = $rest[0]; } else { %options = %{$rest[0]}; $code = $rest[1]; } my %route_args = ( method => $method, code => $code, options => \%options, pattern => $pattern, ); return $self->register_route(%route_args); } # look for a route in the given array sub find_route { my ($self, $r, $reg) = @_; foreach my $route (@$reg) { return $route if $r->equals($route); } return; } 1;
dimpu/AravindCom
api/perl/MAP/Modules/Dancer-1.3124/lib/Dancer/Route/Registry.pm
Perl
mit
3,480
die "specify filename" unless $ARGV[0]; while (<>) { print "$_"; }
KainosSoftwareLtd/dig-scriptogram
elb/perl6-test/f2.pl
Perl
mit
70
# Time-stamp: "Sat Jul 14 00:27:34 2001 by Automatic Bizooty (__blocks2pm.plx)" $Text::\SEPA\Unicode\Unidecode::Char[0x89] = [ 'Ji ', 'Zhi ', 'Gua ', 'Ken ', 'Che ', 'Ti ', 'Ti ', 'Fu ', 'Chong ', 'Xie ', 'Bian ', 'Die ', 'Kun ', 'Duan ', 'Xiu ', 'Xiu ', 'He ', 'Yuan ', 'Bao ', 'Bao ', 'Fu ', 'Yu ', 'Tuan ', 'Yan ', 'Hui ', 'Bei ', 'Chu ', 'Lu ', 'Ena ', 'Hitoe ', 'Yun ', 'Da ', 'Gou ', 'Da ', 'Huai ', 'Rong ', 'Yuan ', 'Ru ', 'Nai ', 'Jiong ', 'Suo ', 'Ban ', 'Tun ', 'Chi ', 'Sang ', 'Niao ', 'Ying ', 'Jie ', 'Qian ', 'Huai ', 'Ku ', 'Lian ', 'Bao ', 'Li ', 'Zhe ', 'Shi ', 'Lu ', 'Yi ', 'Die ', 'Xie ', 'Xian ', 'Wei ', 'Biao ', 'Cao ', 'Ji ', 'Jiang ', 'Sen ', 'Bao ', 'Xiang ', 'Chihaya ', 'Pu ', 'Jian ', 'Zhuan ', 'Jian ', 'Zui ', 'Ji ', 'Dan ', 'Za ', 'Fan ', 'Bo ', 'Xiang ', 'Xin ', 'Bie ', 'Rao ', 'Man ', 'Lan ', 'Ao ', 'Duo ', 'Gui ', 'Cao ', 'Sui ', 'Nong ', 'Chan ', 'Lian ', 'Bi ', 'Jin ', 'Dang ', 'Shu ', 'Tan ', 'Bi ', 'Lan ', 'Pu ', 'Ru ', 'Zhi ', qq{[?] }, 'Shu ', 'Wa ', 'Shi ', 'Bai ', 'Xie ', 'Bo ', 'Chen ', 'Lai ', 'Long ', 'Xi ', 'Xian ', 'Lan ', 'Zhe ', 'Dai ', 'Tasuki ', 'Zan ', 'Shi ', 'Jian ', 'Pan ', 'Yi ', 'Ran ', 'Ya ', 'Xi ', 'Xi ', 'Yao ', 'Feng ', 'Tan ', qq{[?] }, 'Biao ', 'Fu ', 'Ba ', 'He ', 'Ji ', 'Ji ', 'Jian ', 'Guan ', 'Bian ', 'Yan ', 'Gui ', 'Jue ', 'Pian ', 'Mao ', 'Mi ', 'Mi ', 'Mie ', 'Shi ', 'Si ', 'Zhan ', 'Luo ', 'Jue ', 'Mi ', 'Tiao ', 'Lian ', 'Yao ', 'Zhi ', 'Jun ', 'Xi ', 'Shan ', 'Wei ', 'Xi ', 'Tian ', 'Yu ', 'Lan ', 'E ', 'Du ', 'Qin ', 'Pang ', 'Ji ', 'Ming ', 'Ying ', 'Gou ', 'Qu ', 'Zhan ', 'Jin ', 'Guan ', 'Deng ', 'Jian ', 'Luo ', 'Qu ', 'Jian ', 'Wei ', 'Jue ', 'Qu ', 'Luo ', 'Lan ', 'Shen ', 'Di ', 'Guan ', 'Jian ', 'Guan ', 'Yan ', 'Gui ', 'Mi ', 'Shi ', 'Zhan ', 'Lan ', 'Jue ', 'Ji ', 'Xi ', 'Di ', 'Tian ', 'Yu ', 'Gou ', 'Jin ', 'Qu ', 'Jiao ', 'Jiu ', 'Jin ', 'Cu ', 'Jue ', 'Zhi ', 'Chao ', 'Ji ', 'Gu ', 'Dan ', 'Zui ', 'Di ', 'Shang ', 'Hua ', 'Quan ', 'Ge ', 'Chi ', 'Jie ', 'Gui ', 'Gong ', 'Hong ', 'Jie ', 'Hun ', 'Qiu ', 'Xing ', 'Su ', 'Ni ', 'Ji ', 'Lu ', 'Zhi ', 'Zha ', 'Bi ', 'Xing ', 'Hu ', 'Shang ', 'Gong ', 'Zhi ', 'Xue ', 'Chu ', 'Xi ', 'Yi ', 'Lu ', 'Jue ', 'Xi ', 'Yan ', 'Xi ', ]; 1;
dmitrirussu/php-sepa-xml-generator
src/Unicode/data/perl_source/x89.pm
Perl
mit
2,194
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is machine-generated by lib/unicore/mktables from the Unicode # database, Version 12.1.0. Any changes made here will be lost! # !!!!!!! INTERNAL PERL USE ONLY !!!!!!! # This file is for internal use by core Perl only. The format and even the # name or existence of this file are subject to change without notice. Don't # use it directly. Use Unicode::UCD to access the Unicode character data # base. return <<'END'; V56 768 880 1157 1159 1611 1622 1648 1649 2385 2389 6832 6847 7376 7379 7380 7393 7394 7401 7405 7406 7412 7413 7416 7418 7616 7674 7675 7680 8204 8206 8400 8433 12330 12334 12441 12443 65024 65040 65056 65070 66045 66046 66272 66273 70459 70460 119143 119146 119163 119171 119173 119180 119210 119214 917760 918000 END
operepo/ope
client_tools/svc/rc/usr/share/perl5/core_perl/unicore/lib/Sc/Zinh.pl
Perl
mit
803
#!/usr/bin/perl # # Main authors: # Christian Schulte <schulte@gecode.org> # # Copyright: # Christian Schulte, 2005 # # Last modified: # $Date$ by $Author$ # $Revision$ # # This file is part of Gecode, the generic constraint # development environment: # http://www.gecode.org # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # # # Get authors of all files # %main = (); %fix = (); while ($l = <>) { if (($l =~ /Main authors:/) || ($l =~ /Contributing authors:/)) { while (($l = <>) && ($l =~ /([A-Z].*) <(.*)>/)) { $main{$1} = $2; } } elsif ($l =~ /provided by:/) { while (($l = <>) && ($l =~ /([A-Z][^<]*)/)) { $fix{$1} = ""; } } } print <<EOF /** \\page PageLic %Gecode license and authors \\section SectLicLic GECODE LICENSE AGREEMENT This software and its documentation are copyrighted by the individual authors as listed in each file. All files, unless explicitly disclaimed in individual files, may be used according to the terms of the <a href="http://www.opensource.org/licenses/mit-license.php"> MIT license</a>, which reads as follows: <TT> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </TT> \\section SecLicAuthors Gecode authors The following authors have contributed to the %Gecode library and its documentation (in alphabetical order of firstname): EOF ; foreach $n (sort(keys(%main))) { $e = $main{$n}; print " - $n <$e>\n"; } print <<EOF The above authors are grateful to the following people who have provided bugfixes: EOF ; foreach $n (sort(keys(%fix))) { print " - $n\n"; } print <<EOF We are also grateful for our users reporting bugs and suggesting improvements. */ EOF ;
cp-profiler/gecode-profiling
misc/genlicense.perl
Perl
mit
3,692
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2018] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package EnsEMBL::Web::Job::AlleleFrequency; use strict; use warnings; use JSON qw(to_json); use EnsEMBL::Web::Utils::FileHandler qw(file_put_contents); use EnsEMBL::Web::File::Utils::URL; use parent qw(EnsEMBL::Web::Job); sub prepare_to_dispatch { ## @override my $self = shift; my $rose_object = $self->rose_object; my $job_data = $rose_object->job_data; my $job_dir = $rose_object->job_dir; my $region = $job_data->{'region'}; my $population = $job_data->{'population'}; my $file_url = $job_data->{'file_url'}; my $proxy = $self->hub->web_proxy; my $tabix = $self->hub->species_defs->TABIX; my $bgzip = $self->hub->species_defs->BGZIP; my $tools_dir = $self->hub->species_defs->SHARED_SOFTWARE_PATH; # output file name, storing it in db for checking content my $output_file = "afc.".($region =~ s/:/./r).".proc$$.tsv"; # download sample file to work dir my $args = {'no_exception' => 1 }; $args->{proxy} = $proxy ? $proxy : ""; $args->{nice} = 1; $args->{destination_path} = "$job_dir/"; my $sample_file = EnsEMBL::Web::File::Utils::URL::fetch_file($job_data->{'sample_panel'}, $args); if(ref($sample_file) eq 'HASH' && $sample_file->{error}) { throw exception('HiveException', "Job failed, Sample panel file cannot be found: ".$sample_file->{error}); } return { 'work_dir' => $job_dir, 'output_file' => $output_file, 'input_file' => $file_url, 'tools_dir' => $tools_dir, 'tabix' => $tabix, 'bgzip' => $bgzip, 'region' => $job_data->{'region'}, 'population' => $job_data->{'population'}, 'sample_panel' => $sample_file, 'proxy' => $proxy, 'code_root' => $self->hub->species_defs->ENSEMBL_HIVE_HOSTS_CODE_LOCATION }; } 1;
muffato/public-plugins
tools/modules/EnsEMBL/Web/Job/AlleleFrequency.pm
Perl
apache-2.0
2,567
# Copyright 2020, Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Google::Ads::GoogleAds::V8::Resources::FeedAttributeOperation; use strict; use warnings; use base qw(Google::Ads::GoogleAds::BaseEntity); use Google::Ads::GoogleAds::Utils::GoogleAdsHelper; sub new { my ($class, $args) = @_; my $self = { operator => $args->{operator}, value => $args->{value}}; # Delete the unassigned fields in this object for a more concise JSON payload remove_unassigned_fields($self, $args); bless $self, $class; return $self; } 1;
googleads/google-ads-perl
lib/Google/Ads/GoogleAds/V8/Resources/FeedAttributeOperation.pm
Perl
apache-2.0
1,066
# # Copyright 2022 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package network::ucopia::wlc::snmp::plugin; use strict; use warnings; use base qw(centreon::plugins::script_snmp); sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $self->{version} = '1.0'; %{$self->{modes}} = ( 'system' => 'network::ucopia::wlc::snmp::mode::system', ); return $self; } 1; __END__ =head1 PLUGIN DESCRIPTION Check Ucopia Wlc in SNMP. =cut
centreon/centreon-plugins
network/ucopia/wlc/snmp/plugin.pm
Perl
apache-2.0
1,238
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2021] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package EnsEMBL::Web::Command::UnshareRecord; use strict; use base qw(EnsEMBL::Web::Command); sub process { my $self = shift; my $hub = $self->hub; my $user = $hub->user; my $group = $user->get_group($hub->param('webgroup_id')); my %url_params; if ($group && $user->is_admin_of($group)) { foreach (grep $_, $hub->param('id')) { my $group_record = $user->get_group_record($group, $_); next unless $group_record; $group_record->delete; } } $self->ajax_redirect($hub->url({'type' => 'UserData', 'action' => 'ManageData', 'function' => ''})); } 1;
Ensembl/ensembl-webcode
modules/EnsEMBL/Web/Command/UnshareRecord.pm
Perl
apache-2.0
1,310
## OpenXPKI::Crypto::Backend::OpenSSL::Config ## Written 2005 and 2006 by Julia Dubenskaya and Michael Bell for the OpenXPKI project ## Improved 2011 by Martin Bartosch for the OpenXPKI project ## (C) Copyright 2005-2011 by The OpenXPKI Project use strict; use warnings; package OpenXPKI::Crypto::Backend::OpenSSL::Config; use OpenXPKI::Server::Context qw( CTX ); use OpenXPKI::Debug; use OpenXPKI::Exception; ##! 0: "FIXME: why do we have no delete_tmpfile operation?" ##! 0: "FIXME: a missing delete_tmpfile is a security risk" use OpenXPKI qw(write_file get_safe_tmpfile); use OpenXPKI::DN; use OpenXPKI::DateTime; use English; use Data::Dumper; sub new { my $that = shift; my $class = ref($that) || $that; my $self = shift; bless $self, $class; ##! 2: "check XS availability" if (not exists $self->{XS} or not ref $self->{XS}) { OpenXPKI::Exception->throw ( message => "I18N_OPENXPKI_CRYPTO_OPENSSL_CONFIG_MISSING_XS"); } ##! 2: "$self->{TMP} will be checked by the central OpenSSL module" if (not $self->{TMP}) { OpenXPKI::Exception->throw ( message => "I18N_OPENXPKI_CRYPTO_OPENSSL_CONFIG_TEMPORARY_DIRECTORY_UNAVAILABLE"); } return $self; } ############################ ## Public setters ## ############################ sub set_engine { my $self = shift; $self->{ENGINE} = shift; return 1; } sub set_profile { my $self = shift; $self->{PROFILE} = shift; return 1; } sub set_cert_list { ##! 1: "start" my $self = shift; my $list = shift; $self->{INDEX_TXT} = ""; foreach my $arrayref (@{$list}) { ##! 4: "handle next certficate" # default revocation date if none is specified is epoch 0, # i.e. 01/01/1970 00:00:00 my ($cert, $timestamp) = (undef, '700101000000Z'); # Set dummy values for index.txt. These values are not used during # CRL generation. my $subject = '/DC=org/DC=openxpki/CN=Dummy'; my $start = '700101000000Z'; my $serial; if (ref($arrayref) ne 'ARRAY') { $cert = $arrayref; } else { $cert = $arrayref->[0]; } if (ref($cert) eq '') { # scalar string, it may either be a PEM encoded cert or the # raw certificate serial number (decimal) if ($cert =~ m{ \A \d+ \z }xms) { # passed argument is numeric only and hence is the serial # number of the certificate to revoke $serial = $cert; $cert = ''; } else { # PEM encoded certificate, instantiate object eval { ##! 1: "FIXME: where is the related free_object call?" ##! 1: "FIXME: this is a memory leak" $cert = $self->{XS}->get_object({DATA => $cert, TYPE => "X509"}); }; if (my $exc = OpenXPKI::Exception->caught()) { OpenXPKI::Exception->throw ( message => "I18N_OPENXPKI_CRYPTO_OPENSSL_COMMAND_ISSUE_CRL_REVOKED_CERT_FAILED", children => [ $exc ]); } elsif ($EVAL_ERROR) { $EVAL_ERROR->rethrow(); } } } if (ref($cert)) { # cert is available as an object, obtain necessary data from it # $timestamp = [ gmtime ($timestamp) ]; # $timestamp = POSIX::strftime ("%y%m%d%H%M%S",@{$timestamp})."Z"; ##! 4: "timestamp = $timestamp" ##! 4: "create start time - notbefore" $start = $self->{XS}->get_object_function ({ OBJECT => $cert, FUNCTION => "notbefore"}); $start = OpenXPKI::DateTime::convert_date( { DATE => $start, OUTFORMAT => 'openssltime', }); ##! 4: "OpenSSL notbefore date: $start" ##! 4: "create OpenSSL subject" $subject = $self->{XS}->get_object_function ({ OBJECT => $cert, FUNCTION => "subject"}); $subject = OpenXPKI::DN->new ($subject); $subject = $subject->get_openssl_dn (); ##! 4: "create serials" $serial = $self->{XS}->get_object_function ({ OBJECT => $cert, FUNCTION => "serial"}); } if (ref($arrayref) eq 'ARRAY') { if (scalar @{$arrayref} > 1) { $timestamp = $arrayref->[1]; ##! 4: "create timestamp" $timestamp = DateTime->from_epoch(epoch => $timestamp); $timestamp = OpenXPKI::DateTime::convert_date({ DATE => $timestamp, OUTFORMAT => 'openssltime', }); ##! 16: 'revocation date is present: ' . $timestamp } if (scalar @{$arrayref} > 2) { my $reason_code = $arrayref->[2]; if ($reason_code !~ m{ \A (?: unspecified | keyCompromise | CACompromise | affiliationChanged | superseded | cessationOfOperation | certificateHold | removeFromCRL ) \z }xms) { CTX('log')->log( MESSAGE => "Invalid reason code '" . $reason_code . "' specified", PRIORITY => 'warn', FACILITY => [ 'system' ], ); $reason_code = 'unspecified'; } # append reasonCode $timestamp .= ',' . $arrayref->[2]; ##! 16: 'reason code is present: ' . $timestamp } if (scalar @{$arrayref} > 3) { # append invalidity date / Hold instruction OID # FIXME - implement code that treats hold instruction # correctly my $invalidity_date = $arrayref->[3]; $invalidity_date = DateTime->from_epoch(epoch => $invalidity_date); $invalidity_date = OpenXPKI::DateTime::convert_date({ DATE => $invalidity_date, OUTFORMAT => 'openssltime', }); $timestamp .= ',' . $invalidity_date; ##! 16: 'invalidity date is present: ' . $timestamp } } $serial = Math::BigInt->new ($serial); my $hex = substr ($serial->as_hex(), 2); $hex = "0".$hex if (length ($hex) % 2); ##! 4: "prepare index.txt entry" my $entry = "R\t$start\t$timestamp\t$hex\tunknown\t$subject\n"; ##! 4: "LINE: $entry" $self->{INDEX_TXT} .= $entry; } ##! 1: "end" return 1; } ################################ ## Dump configuration ## ################################ sub dump { ##! 1: "start" my $self = shift; my $config = ""; ##! 2: "cleanup to make sure that we get a fresh config" $self->__cleanup_files(); ##! 2: "dump common part" $config = "## OpenSSL configuration\n". "## dynamically generated by OpenXPKI::Crypto::Backend::OpenSSL::Config\n". "\n". "openssl_conf = openssl_init\n". "default_ca = ca\n"; $config .= $self->__get_openssl_common(); $config .= $self->__get_oids(); $config .= $self->__get_engine(); if (exists $self->{PROFILE}) { ##! 4: "write serial file (for CRL and certs)" my $serial = $self->{PROFILE}->get_serial(); if (defined $serial) { ##! 8: "get tempfilename for serial" $self->{FILENAME}->{SERIAL} = $self->get_safe_tmpfile ({TMP => $self->{TMP}}); ##! 8: "defined old filename for serial to make later a correct cleanup" $self->{FILENAME}->{SERIAL_OLD} = $self->{FILENAME}->{SERIAL}.".old"; ##! 8: "serial present" $serial = Math::BigInt->new ($serial); if (not defined $serial) { OpenXPKI::Exception->throw ( message => "I18N_OPENXPKI_CRYPTO_OPENSSL_CONFIG_DUMP_WRONG_SERIAL"); } ##! 8: "serial accepted by Math::BigInt" my $hex = substr ($serial->as_hex(), 2); $hex = "0".$hex if (length ($hex) % 2); ##! 8: "hex serial is $hex" $self->write_file (FILENAME => $self->{FILENAME}->{SERIAL}, CONTENT => $hex); ##! 8: "specify a special filename to remove the new cert from the temp file area (see new_certs_dir)" $self->{FILENAME}->{NEW_CERT} = $self->{TMP}."/$hex.pem"; } ##! 4: "write database files" ##! 4: "WARNING:FIXME: ATTR file of index.txt is not safe!" # ATTRFILE should be databasefile.attr # FIXME: we assume this file does not exist # FIXME: is this really safe? OpenSSL require it $self->{FILENAME}->{DATABASE} = $self->get_safe_tmpfile ({TMP => $self->{TMP}}); $self->{FILENAME}->{ATTR} = $self->{FILENAME}->{DATABASE}.".attr"; if (exists $self->{INDEX_TXT}) { ##! 8: "INDEX_TXT present => this is a CRL" $self->write_file (FILENAME => $self->{FILENAME}->{DATABASE}, CONTENT => $self->{INDEX_TXT}); } else { ##! 8: "no INDEX_TXT => this is a certificate" $self->write_file (FILENAME => $self->{FILENAME}->{DATABASE}, CONTENT => ""); } $self->write_file (FILENAME => $self->{FILENAME}->{ATTR}, CONTENT => "unique_subject = no\n"); ##! 4: "create filenames for a better cleanup" $self->{FILENAME}->{DATABASE_OLD} = $self->{FILENAME}->{DATABASE}.".old"; $self->{FILENAME}->{ATTR_OLD} = $self->{FILENAME}->{ATTR}.".old"; ##! 4: "PROFILE exists => CRL or cert generation" $config .= $self->__get_ca(); $config .= $self->__get_extensions(); } ##! 2: "write configuration file" $self->{FILENAME}->{CONFIG} = $self->get_safe_tmpfile ({TMP => $self->{TMP}}); $self->write_file (FILENAME => $self->{FILENAME}->{CONFIG}, CONTENT => $config); ##! 16: 'config: ' . $config ##! 2: "set the configuration to the XS library" ##! 2: "should we integrate this into the get_config function?" OpenXPKI::Crypto::Backend::OpenSSL::set_config ($self->{FILENAME}->{CONFIG}); ##! 1: "end" return 1; } sub __get_openssl_common { ##! 4: "start" my $self = shift; my $config = "\n[ openssl_init ]\n\n"; ##! 8: "add the engine and OID section references" $config .= "engines = engine_section\n". "oid_section = new_oids\n"; ## utf8 support options ## please do not touch or OpenXPKI's utf8 support breaks ## utf8=yes # needed for correct issue of cert. This is ## # interchangeable with -utf8 "subj" command line modifier. ## string_mask=utf8only # needed for correct issue of cert ## will be ignored today by "openssl req" ## name_opt = RFC2253,-esc_msb $config .= "\n[ req ]\n\n". "utf8 = yes\n". "string_mask = utf8only\n". "distinguished_name = dn_policy\n"; $config .= "\n[ dn_policy ]\n\n". "# this is a dummy because of preserve\n". "domainComponent = optional\n"; ##! 4: "end" return $config; } sub __get_oids { ##! 4: "today this is an empty function" my $self = shift; return "\n[ new_oids ]\n"; } sub __get_engine { ##! 4: "start" my $self = shift; my $config = "\n[ engine_section ]\n"; $config .= "\n". $self->{ENGINE}->get_engine()." = engine_config\n". "\n". "[ engine_config ]\n". "\n". $self->{ENGINE}->get_engine_section(); ##! 4: "end" return $config; } sub __get_ca { ##! 4: "start" my $self = shift; my $config = "\n[ ca ]\n"; $config .= "new_certs_dir = ".$self->{TMP}."\n"; $config .= "certificate = ".$self->{ENGINE}->get_certfile()."\n"; $config .= "private_key = ".$self->{ENGINE}->get_keyfile."\n"; if (my $notbefore = $self->{PROFILE}->get_notbefore()) { $config .= "default_startdate = " . OpenXPKI::DateTime::convert_date( { OUTFORMAT => 'openssltime', DATE => $notbefore, }) . "\n"; } if (my $notafter = $self->{PROFILE}->get_notafter()) { $config .= "default_enddate = " . OpenXPKI::DateTime::convert_date( { OUTFORMAT => 'openssltime', DATE => $notafter, }) . "\n"; } if (exists $self->{FILENAME}->{SERIAL}) { $config .= "crlnumber = ".$self->{FILENAME}->{SERIAL}."\n". "serial = ".$self->{FILENAME}->{SERIAL}."\n"; } my $digest = $self->{PROFILE}->get_digest(); if ($digest =~ /md5/) { OpenXPKI::Exception->throw( message => 'I18N_OPENXPKI_CRYPTO_BACKEND_OPENSSL_CONFIG_MD5_DIGEST_BROKEN', ); } $config .= "default_md = ".$self->{PROFILE}->get_digest()."\n". "database = ".$self->{FILENAME}->{DATABASE}."\n". "default_crl_days = ".$self->{PROFILE}->get_nextupdate_in_days()."\n". "default_crl_hours = ".$self->{PROFILE}->get_nextupdate_in_hours()."\n". "x509_extensions = v3ca\n". "crl_extensions = v3ca\n". "preserve = YES\n". "policy = dn_policy\n". "name_opt = RFC2253,-esc_msb\n". "utf8 = yes\n". "string_mask = utf8only\n". "\n"; ##! 4: "end" return $config; } sub __get_extensions { ##! 4: "start" my $self = shift; my $config = "\n[ v3ca ]\n"; my $profile = $self->{PROFILE}; my $sections = ""; EXTENSIONS: foreach my $name (sort $profile->get_named_extensions()) { ##! 64: 'name: ' . $name my $critical = ""; $critical = "critical," if ($profile->is_critical_extension ($name)); if ($name eq "authority_info_access") { $config .= "authorityInfoAccess = $critical"; foreach my $pair (@{$profile->get_extension("authority_info_access")}) { my $type; $type = "caIssuers" if ($pair->[0] eq "CA_ISSUERS"); $type = "OCSP" if ($pair->[0] eq "OCSP"); foreach my $http (@{$pair->[1]}) { # substitute commas and semicolons in the URI, # as they will otherwise be misinterpreted by # openssl as seperators $http =~ s{,}{%2C}xmsg; $http =~ s{;}{%3B}xmsg; $config .= "$type;URI:$http,"; } } $config = substr ($config, 0, length ($config)-1); ## remove trailing , $config .= "\n"; } elsif ($name eq "authority_key_identifier") { $config .= "authorityKeyIdentifier = $critical"; foreach my $param (@{$profile->get_extension("authority_key_identifier")}) { $config .= "issuer:always," if ($param eq "issuer"); $config .= "keyid:always," if ($param eq "keyid"); } $config = substr ($config, 0, length ($config)-1); ## remove trailing , $config .= "\n"; } elsif ($name eq "basic_constraints") { $config .= "basicConstraints = $critical"; foreach my $pair (@{$profile->get_extension("basic_constraints")}) { if ($pair->[0] eq "CA") { if ($pair->[1] eq "true") { $config .= "CA:true,"; } else { $config .= "CA:false,"; } } if ($pair->[0] eq "PATH_LENGTH") { $config .= "pathlen:".$pair->[1].","; } } $config = substr ($config, 0, length ($config)-1); ## remove trailing , $config .= "\n"; } elsif ($name eq "cdp") { $config .= "crlDistributionPoints = $critical\@cdp\n"; $sections .= "\n[ cdp ]\n"; my $i = 0; foreach my $cdp (@{$profile->get_extension("cdp")}) { $sections .= "URI.$i=$cdp\n"; $i++; } $sections .= "\n"; } elsif ($name eq 'user_notice') { # FIXME - currently, you can only have a user_notice # together with a policy_identifier next EXTENSIONS; } elsif ($name eq 'policy_identifier') { $config .= "certificatePolicies = $critical\@cert_policies\n"; $sections .= "\n[ cert_policies ]\n"; my $i = 0; my @oids = @{ $profile->get_extension('policy_identifier') }; ##! 16: '@oids: ' . Dumper \@oids if (scalar @oids) { $sections .= "policyIdentifier = " . join (", ", @oids); $sections .= "\n"; } my @user_notices; my $old_eval_error = $EVAL_ERROR; eval { # a user_notice might not be present, just leave the # array empty then #OpenXPKI::Exception->throw( # message => 'I18N_OPENXPKI_CRYPTO_PROFILE_CERTIFICATE_GET_EXTENSION_NOT_FOUND', #); @user_notices = @{$profile->get_extension('user_notice')}; }; my $exc = OpenXPKI::Exception->caught(); if (defined $exc && $exc->message() eq 'I18N_OPENXPKI_CRYPTO_PROFILE_CERTIFICATE_GET_EXTENSION_NOT_FOUND') { $EVAL_ERROR = $old_eval_error; } foreach my $notice (@user_notices) { $sections .= qq{userNotice.$i = \@notice$i\n}; $i++; } $sections .= "\n"; $i = 0; foreach my $notice (@user_notices) { $sections .= "\n[ notice$i ]\n"; $sections .= qq{explicitText = "$notice"\n\n}; $i++; } $sections .= "\n"; } elsif ($name eq "extended_key_usage") { $config .= "extendedKeyUsage = $critical"; my @bits = @{$profile->get_extension("extended_key_usage")}; $config .= "clientAuth," if (grep /client_auth/, @bits); $config .= "emailProtection," if (grep /email_protection/, @bits); my @oids = grep m{\.}, @bits; foreach my $oid (@oids) { $config .= "$oid,"; } $config = substr ($config, 0, length ($config)-1); ## remove trailing , $config .= "\n"; } elsif ($name eq "issuer_alt_name") { $config .= "issuerAltName = $critical"; my $issuer = join (",", @{$profile->get_extension("issuer_alt_name")}); $config .= "issuer:copy" if ($issuer eq "copy"); # FIXME: issuer:copy apparently does not work! $config .= "\n"; } elsif ($name eq "key_usage") { my @bits = @{$profile->get_extension("key_usage")}; if (scalar @bits > 0) { # only add keyUsage to config if configuration entries are present $config .= "keyUsage = $critical"; $config .= "digitalSignature," if (grep /digital_signature/, @bits); $config .= "nonRepudiation," if (grep /non_repudiation/, @bits); $config .= "keyEncipherment," if (grep /key_encipherment/, @bits); $config .= "dataEncipherment," if (grep /data_encipherment/, @bits); $config .= "keyAgreement," if (grep /key_agreement/, @bits); $config .= "keyCertSign," if (grep /key_cert_sign/, @bits); $config .= "cRLSign," if (grep /crl_sign/, @bits); $config .= "encipherOnly," if (grep /encipher_only/, @bits); $config .= "decipherOnly," if (grep /decipher_only/, @bits); $config = substr ($config, 0, length ($config)-1); ## remove trailing , $config .= "\n"; } } elsif ($name eq "subject_alt_name") { my $subj_alt_name = $profile->get_extension("subject_alt_name"); my @tmp_array; foreach my $entry (@{$subj_alt_name}) { push @tmp_array, join(q{:}, @{$entry}); } my $string = join(q{,}, @tmp_array); if ($string ne '') { $config .= "subjectAltName=" . $string . "\n"; } } elsif ($name eq "subject_key_identifier") { $config .= "subjectKeyIdentifier = $critical"; my @bits = @{$profile->get_extension("subject_key_identifier")}; $config .= "hash" if (grep /hash/, @bits); $config .= "\n"; } elsif ($name eq "netscape.ca_cdp") { $config .= "nsCaRevocationUrl = $critical". join ("", @{$profile->get_extension("netscape.ca_cdp")})."\n"; } elsif ($name eq "netscape.cdp") { $config .= "nsRevocationUrl = $critical". join ("", @{$profile->get_extension("netscape.cdp")})."\n"; } elsif ($name eq "netscape.certificate_type") { $config .= "nsCertType = $critical"; my @bits = @{$profile->get_extension("netscape.certificate_type")}; $config .= "client," if (grep /ssl_client/, @bits); $config .= "objsign," if (grep /object_signing/, @bits); $config .= "email," if (grep /smime_client/, @bits); $config .= "sslCA," if (grep /ssl_client_ca/, @bits); $config .= "objCA," if (grep /object_signing_ca/, @bits); $config .= "emailCA," if (grep /smime_client_ca/, @bits); $config = substr ($config, 0, length ($config)-1); ## remove trailing , $config .= "\n"; } elsif ($name eq "netscape.comment") { $config .= "nsComment = $critical\""; my $string = join ("", @{$profile->get_extension("netscape.comment")}); # FIXME: this inserts a literal \n - is this intended? $string =~ s/\n/\\\\n/g; $config .= "$string\"\n"; } else { OpenXPKI::Exception->throw ( message => "I18N_OPENXPKI_CRYPTO_OPENSSL_COMMAND_WRITE_CONFIG_UNKNOWN_NAMED_EXTENSION", params => {NAME => $name}); } } $config .= "\n".$sections; ##! 16: "extensions ::= $config" ##! 4: "end" return $config; } sub get_config_filename { my $self = shift; return $self->{FILENAME}->{CONFIG}; } ##################### ## cleanup ## ##################### sub cleanup { ##! 1: "start" my $self = shift; ##! 2: "delete profile" delete $self->{PROFILE} if (exists $self->{PROFILE}); ##! 2: "delete index.txt database" delete $self->{INDEX_TXT} if (exists $self->{INDEX_TXT}); ##! 2: "cleanup files" $self->__cleanup_files(); ##! 1: "end" return 1; } sub __cleanup_files { ##! 1: "start" my $self = shift; ##! 2: "return if no files must be deleted" return 1 if (not exists $self->{FILENAME} or not scalar keys %{$self->{FILENAME}}); ##! 2: "delete all temp files" foreach my $filename (sort keys %{$self->{FILENAME}}) { ##! 4: "filename: $filename" unlink($self->{FILENAME}->{$filename}); } delete $self->{FILENAME}; ##! 1: "end" return 1; } sub DESTROY { my $self = shift; $self->__cleanup_files(); } 1; __END__ =head1 Name OpenXPKI::Crypto::Backend::OpenSSL::Config =head1 Description This module was designed to create an OpenSSL configuration on the fly for the various operations of OpenXPKI. The module support the following different section types: =over =item - general OpenSSL configuration =item - engine configuration =item - new OIDs =item - CA configuration =item - CRL extension configuration =item - certificate extension configuration =item - CRL distribution points =item - subject alternative names =back =head1 Functions =over =item - new =item - set_engine =item - set_profile =item - set_cert_list This method prepares the OpenSSL-specific representation of the certificate database (index.txt). The method expects an arrayref containing a list of all certificates to revoke. A single entry in this array may be one of the following: =over =item * a single certificate (see below on how to specify a certificate) =item * an arrayref of the format [ certificate, revocation_timestamp, reason_code, invalidity_timestamp ] =back With the exception of the certificate all additional parameters are optional and can be left out. If a revocation_timestamp is specified, it is used as the revocation timestamp in the generated CRL. The timestamp is specified in seconds since epoch. The reason code is accepted literally. It should be one of 'unspecified', 'keyCompromise', 'CACompromise', 'affiliationChanged', 'superseded', 'cessationOfOperation', The reason codes 'certificateHold', 'removeFromCRL'. are currently not handled correctly and should be avoided. However, they will currently simply be passed in the CRL which may not have the desired result. If the reason code is incorrect, a warning is logged and the reason code is set to 'unspecified' in order to make sure the certificate gets revoked at all. If a invalidity_timestamp is specified, it is used as the invalidity timestamp in the generated CRL. The timestamp is specified in seconds since epoch. A certificate can be specified as =over =item * a PEM encoded X.509v3 certificate (scalar) =item * a reference to an OpenXPKI::Crypto::Backend::OpenSSL::X509 object =item * a string containing the serial number of the certificate to revoke =back Depending on the way the certificate to revoke was specified the method has to perform several actions to deduce the correct information for CRL issuance. If a PEM encoded certificate is passed, the method is forced to parse to parse the certificate before it can build the revocation data list. This operation introduces a huge overhead which may influence system behaviour if many certificates are to be revoked. The lowest possible overhead is introduced by the literal specification of the serial number to put on the revocation list. NOTE: No attempt to verify the validity of the specified serial numbers is done, in particular in the "raw serial number" case there is even no check if such a serial number exists at all. =item - dump =item - get_config_filename =back =head1 Example my $profile = OpenXPKI::Crypto::Backend::OpenSSL::Config->new ( { TMP => '/tmp', }); $profile->set_engine($engine); $profile->set_profile($crl_profile); $profile->dump(); my $conf = $profile->get_config_filename(); ... execute an OpenSSL command with "-config $conf" ... ... or execute an OpenSSL command with "OPENSSL_CONF=$conf openssl" ... =head1 See Also OpenXPKI::Crypto::Profile::Base, OpenXPKI::Crypto::Profile::CRL, OpenXPKI::Crypto::Profile::Certificate and OpenXPKI::Crypto::Backend::OpenSSL
mrscotty/openxpki
core/server/OpenXPKI/Crypto/Backend/OpenSSL/Config.pm
Perl
apache-2.0
27,485
package t::bootstrap::Bootstrap; use v5.14; use warnings; BEGIN { use File::Spec; my ($volume, $dir, $file) = File::Spec->splitpath(__FILE__); $ENV{VENN_ENV} //= 'sqlite'; $ENV{VENN_TEST} = 1; $ENV{VENN_IN_MEMORY} //= 1; $ENV{VENN_CONF_DIR} = "$dir/../conf"; # don't "use lib", that's evaluated before $dir push @INC, "$dir/../..", "$dir/../../lib", "$dir/../lib/perl5"; } use Venn::Dependencies; use t::Dependencies; use Venn::Schema; use t::bootstrap::Methods qw( :all ); use vars qw( @EXPORT_OK %EXPORT_TAGS ); use Exporter 'import'; @EXPORT_OK = qw( bootstrap ); %EXPORT_TAGS = ('all' => \@EXPORT_OK); sub bootstrap { create_environment($_, "$_ environment") for qw( prod qa dev ); create_capability($_, "$_ capability", 0) for qw( salt pepper ); create_owner($_) for (0..99); create_provider_state($_, lcfirst $_) for qw(active build decommissioned disabled pending); return; }
Morgan-Stanley/venn-core
t/bootstrap/Bootstrap.pm
Perl
apache-2.0
946
package Google::Ads::AdWords::v201809::ManagedCustomerService::getPendingInvitations; use strict; use warnings; { # BLOCK to scope variables sub get_xmlns { 'https://adwords.google.com/api/adwords/mcm/v201809' } __PACKAGE__->__set_name('getPendingInvitations'); __PACKAGE__->__set_nillable(); __PACKAGE__->__set_minOccurs(); __PACKAGE__->__set_maxOccurs(); __PACKAGE__->__set_ref(); use base qw( SOAP::WSDL::XSD::Typelib::Element Google::Ads::SOAP::Typelib::ComplexType ); our $XML_ATTRIBUTE_CLASS; undef $XML_ATTRIBUTE_CLASS; sub __get_attr_class { return $XML_ATTRIBUTE_CLASS; } use Class::Std::Fast::Storable constructor => 'none'; use base qw(Google::Ads::SOAP::Typelib::ComplexType); { # BLOCK to scope variables my %selector_of :ATTR(:get<selector>); __PACKAGE__->_factory( [ qw( selector ) ], { 'selector' => \%selector_of, }, { 'selector' => 'Google::Ads::AdWords::v201809::PendingInvitationSelector', }, { 'selector' => 'selector', } ); } # end BLOCK } # end of BLOCK 1; =pod =head1 NAME Google::Ads::AdWords::v201809::ManagedCustomerService::getPendingInvitations =head1 DESCRIPTION Perl data type class for the XML Schema defined element getPendingInvitations from the namespace https://adwords.google.com/api/adwords/mcm/v201809. Returns the pending invitations for the customer IDs in the selector. @param selector the manager customer ids (inviters) or the client customer ids (invitees) @throws ApiException when there is at least one error with the request =head1 PROPERTIES The following properties may be accessed using get_PROPERTY / set_PROPERTY methods: =over =item * selector $element->set_selector($data); $element->get_selector(); =back =head1 METHODS =head2 new my $element = Google::Ads::AdWords::v201809::ManagedCustomerService::getPendingInvitations->new($data); Constructor. The following data structure may be passed to new(): { selector => $a_reference_to, # see Google::Ads::AdWords::v201809::PendingInvitationSelector }, =head1 AUTHOR Generated by SOAP::WSDL =cut
googleads/googleads-perl-lib
lib/Google/Ads/AdWords/v201809/ManagedCustomerService/getPendingInvitations.pm
Perl
apache-2.0
2,136
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Clownfish::Vector; use Clownfish; our $VERSION = '0.005000'; $VERSION = eval $VERSION; 1; __END__
rectang/lucy-clownfish
runtime/perl/lib/Clownfish/Vector.pm
Perl
apache-2.0
892
#!/usr/bin/env perl # Copyright 2015 Petr, Frank Breedijk # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------------ # Delete Asset Hosts # ------------------------------------------------------------------------------ use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); use JSON; use lib ".."; use SeccubusV2; use SeccubusAssets; my $query = CGI::new(); my $json = JSON->new(); print $query->header(-type => "application/json", -expires => "-1d", -"Cache-Control"=>"no-store, no-cache, must-revalidate", -"X-Clacks-Overhead" => "GNU Terry Pratchett"); my $params = $query->Vars; my $asset_host_id = $params->{id}; # Return an error if the required parameters were not passed bye("Parameter id is missing") if (not (defined ($asset_host_id))); bye("id is not numeric") if ( $asset_host_id + 0 ne $asset_host_id ); eval { if ( delete_asset_host($asset_host_id) ) { my @data; push (@data, {'id' => $asset_host_id}); print $json->pretty->encode(\@data); } else { bye("Premission denied"); } } or do { bye(join "\n", $@); }; sub bye($) { my $error=shift; print $json->pretty->encode([{ error => $error }]); exit; }
vlamer/Seccubus_v2
json/deleteAssetHost.pl
Perl
apache-2.0
1,702
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2021] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package EnsEMBL::Web::Document::Element::BottomBanner; ### Optional banner at bottom of page use strict; use base qw(EnsEMBL::Web::Document::Element); sub content {} 1;
Ensembl/ensembl-webcode
modules/EnsEMBL/Web/Document/Element/BottomBanner.pm
Perl
apache-2.0
886
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2021] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package EnsEMBL::Web::QueryStore; use strict; use warnings; use Carp qw(cluck); use JSON; use Digest::MD5 qw(md5_base64); use EnsEMBL::Web::Query; my $DEBUG = 0; sub new { my ($proto,$sources,$cache) = @_; my $class = ref($proto) || $proto; my $self = { sources => $sources, cache => $cache, open => 0 }; bless $self,$class; return $self; } sub get { my ($self,$query) = @_; return EnsEMBL::Web::Query->_new($self,"EnsEMBL::Web::Query::$query"); } sub _source { return $_[0]->{'sources'}{$_[1]}; } sub _clean_args { my ($self,$args) = @_; my %out = %$args; foreach my $k (keys %out) { delete $out{$k} if $k =~ /^__/; } return \%out; } sub version { no strict; my ($self,$class) = @_; return ${"${class}::VERSION"}||0; } sub _try_get_cache { my ($self,$class,$args) = @_; if(!$self->{'open'} && $DEBUG) { cluck("get on closed cache"); } return undef unless $self->{'open'}; return undef if $SiteDefs::ENSEMBL_PRECACHE_DISABLE; my $ver = $self->version($class); return undef if $ver < 1; my $out = $self->{'cache'}->get($class,$ver,{ class => $class, args => $self->_clean_args($args), }); if($DEBUG) { warn (($out?"hit ":"miss ")."${class}\n"); } return $out; } sub _set_cache { my ($self,$class,$args,$value,$build) = @_; return unless $self->{'open'}; $self->{'cache'}->set($class,$self->version($class),{ class => $class, args => $self->_clean_args($args) },$value,$build); } sub open { my ($self) = @_; $self->{'cache'}->cache_open(); $self->{'open'} = 1; } sub close { my ($self) = @_; $self->{'cache'}->cache_close(); $self->{'open'} = 0; } 1;
Ensembl/ensembl-webcode
modules/EnsEMBL/Web/QueryStore.pm
Perl
apache-2.0
2,378
#!/usr/bin/perl -w ############################################################################### # $Id: 2012.pm 1670472 2015-03-31 20:34:45Z jfthomps $ ############################################################################### # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### =head1 NAME VCL::Module::OS::Windows::Version_6::2012.pm - VCL module to support Windows Server 2012 operating system =head1 SYNOPSIS Needs to be written =head1 DESCRIPTION This module provides VCL support for Windows Server 2012 =cut ############################################################################## package VCL::Module::OS::Windows::Version_6::2012; # Specify the lib path using FindBin use FindBin; use lib "$FindBin::Bin/../../../../.."; # Configure inheritance use base qw(VCL::Module::OS::Windows::Version_6); # Specify the version of this module our $VERSION = '2.4.2'; # Specify the version of Perl to use use 5.008000; use strict; use warnings; use diagnostics; use VCL::utils; ############################################################################## =head1 CLASS VARIABLES =cut =head2 $SOURCE_CONFIGURATION_DIRECTORY Data type : Scalar Description : Location on management node of script/utilty/configuration files needed to configure the OS. This is normally the directory under the 'tools' directory specific to this OS. =cut our $SOURCE_CONFIGURATION_DIRECTORY = "$TOOLS/Windows_Server_2012"; #///////////////////////////////////////////////////////////////////////////// 1; __END__ =head1 SEE ALSO L<http://cwiki.apache.org/VCL/> =cut
bq-xiao/apache-vcl
managementnode/lib/VCL/Module/OS/Windows/Version_6/2012.pm
Perl
apache-2.0
2,415
#!/usr/bin/perl use XML::Simple; use Data::Dumper; use Getopt::ArgParse; use strict; use warnings; local $/=undef; ## parse out command line arguments using damian conway's genius.. my $ap = Getopt::ArgParse->new_parser( description => "Generate an opcode table for determining instruction lengths.", print_usage_if_help => 1, ); $ap->add_arg("--input", "-f", dest=>'infile', metavar=>'INFILE', default=>'-', help=>"the file containing the operand table .xml file.", ); $ap->add_arg("--output", "-o", dest=>'outfile', metavar=>'OUTFILE', default=>'-', help=>"the file to write the generated contents.", ); $ap->add_arg("--format", dest=>'format', choices_i=>['perl', 'python', 'javascript', 'c', 'shell'], default=>'python', required=>1, help=>"the format to output the table in.", ); $ap->add_arg("--name", "-n", dest=>'name', metavar=>'NAME', help=>"the name of the table to output if the requsted format needs it.", ); die $ap->print_usage() if !@ARGV; my $args = $ap->parse_args(@ARGV); ## Figure out which file to read from my $infile; if ($args->infile eq "-") { print STDERR "Reading from standard input...\n"; $infile = *STDIN; } else { open($infile, '<', $args->infile) || die sprintf("Unable to open file %s for reading: %s", $args->infile, $!); print STDERR sprintf("Reading from %s...\n", $args->infile); } ## Figure out which file to write to my $outfile; if ($args->outfile eq "-") { $outfile = *STDOUT; } else { open($outfile, '>', $args->outfile) || die sprintf("Unable to open file %s for writing: %s", $args->outfile, $!); print STDERR sprintf("Writing to %s...\n", $args->outfile); } ## parse xml file my $prefixes = "\x26\x2e\x36\x3e\x64\x65\x66\x67\xf0\xf2\xf3"; my $ref = XMLin(<$infile>, ForceArray => ['operand'])->{instruction}; ## create opcode list my @opcodes = map {undef} 0..0x1ff; ## assign to opcode list foreach my $rec (@{$ref}) { my $value = $rec->{value}; if (defined $opcodes[$value]) { print STDERR sprintf("[%x] %s previously defined as %s\n", $value, $rec->{mnemonic}, $opcodes[$value]->{mnemonic}); next; } $opcodes[$value] = $rec; } ## convert operand-size to a single byte representation sub makeSize { my ($value) = @_; my %lookup = ( ops_2opword => 0x40-1, ops_opbyte => 0x40-2, ops_opword => 0x40-3, ops_opdword => 0x40-4, ops_opqword => 0x40-5, ops_opfarpointer => 0x40-6, ops_ropdword => 0x40-7, ); local $_; # check for inconsistencies (this code being written whilst also being # logically flawed, but i can't think of how to solve this right now...) my $match = $value; # foreach $_ (@value) { # if ($_ ne $match) { # die "$_ != $match"; # } # } return $lookup{$value} || int($value); } ## convert operand-type to a single byte sub makeType { my ($type) = @_; my $res = 0; my %lookup = ( IMM => 1, MODRM => 2 ); $res |= $lookup{$type} || 0; return $res; } ## XXX: build the final operand given a list of operands sub makeOperand { my ($operand) = @_; my $result; my %operand = %{$operand}; my %lookup = ( IMM => 1, MODRM => 2 ); my ($size, $type) = (0, 0); ## collect flags and size # XXX: might be best to check to see if a size is defined twice foreach my $k (keys %operand) { if ($k eq 'IMM') { $type |= $lookup{IMM}; $size = makeSize($operand{IMM}); } elsif ($k eq 'MODRM') { $type |= $lookup{MODRM}; $size = makeSize($operand{MODRM}) if ($size == 0); } } $size &= 0x3f; $type &= 0x03; return ($type << 6) | $size; } ## hexdump sub hdump { my $offset = 0; my(@array,$format); foreach my $data (unpack("a16"x(length($_[0])/16)."a*",$_[0])) { my($len)=length($data); if ($len == 16) { @array = unpack('N4', $data); $format="0x%08x (%05d) %08x %08x %08x %08x %s\n"; } else { @array = unpack('C*', $data); $_ = sprintf "%2.2x", $_ for @array; push(@array, ' ') while $len++ < 16; $format="0x%08x (%05d)" . " %s%s%s%s %s%s%s%s %s%s%s%s %s%s%s%s %s\n"; } $data =~ tr/\0-\37\177-\377/./; printf $format,$offset,$offset,@array,$data; $offset += 16; } } ## shift some arbitrary number of elements out of an array reference sub shiftout { my ($size, $refarray) = @_; local $_ = shift @{$refarray}; if ($size > 1 && @{$refarray}) { my @result = shiftout($size - 1, $refarray); return ($_, @result); } return $_; } ## group $size elements of an array sub chunkArray { my ($size, @array) = @_; my (@result); while (@array) { local @_ = shiftout($size, \@array); push @result, [@_]; } return @result; } ## return an array of all operands merged together (MODRM+IMM should be merged) sub mergeOperand { my (@operands) = @_; local $_; my %result; foreach $_ (@operands) { my ($type,$size) = ($_->{type}, $_->{size}); next if (ref($type) eq 'HASH'); if (($type ne 'IMM') && ($type ne 'MODRM')) { die "Unknown operand type: $type"; } $result{$type} = $size; } return (\%result); } ## check if opcode is a prefix, and if an opcode is undefined, display an error for (my $index=0; $index < @opcodes; $index++) { my $value = $opcodes[$index]->{value}; if ( index($prefixes, chr($index)) == -1 and !defined $value) { #print STDERR sprintf("[%x] is undefined\n", $index); } } ## generate table # XXX: somehow, this table isn't being generated properly my @result; for (my $op=0; $op < @opcodes; $op++) { $result[$op] = 0; my $instruction = $opcodes[$op]; my $operand = mergeOperand(@{$instruction->{operand}}); $operand = makeOperand($operand); # print hex($op) . "\n" . sprintf('%2x', $operand) . "\n"; # exit; $result[$op] = $operand; } ## XXX: hardcode specific opcodes because they're not defined in the xml ref $opcodes[0x10f] = "\xc1"; # 3dNow! -> \x0f\x0f modrm imm1 ############################ if (0) { my $string = join("", map{chr}@result); print "$string"; } ############################ my $name = $args->name || "OperandLookupTable"; if (lc $args->format eq "python") { my $string = join("", map{chr}@result); print $outfile "$name = ''.join([\n"; for (my $i=0; $i<length($string); $i+=0x10) { my $s = substr($string, $i, 0x10); print $outfile " \""; for (my $n = 0; $n < length($s); $n++) { my $c = substr($s, $n, 1); printf $outfile ("\\x%02x",ord($c) & 0xff); } print $outfile "\"\n"; } print $outfile "])\n"; } elsif (lc $args->format eq "c") { my $group=0x10; @_ = map { sprintf("0x%02x", $_) } @result; @_ = chunkArray($group, @_); my $row=0; @_ = map { sprintf("/* % 3X */ %s", ($row++)*$group, join(",", @{$_})); } @_; my $array = join(",\n", @_); print $outfile "#include <stdint.h>\n\n"; print $outfile "const uint8_t $name\[] = {\n"; print $outfile "$array\n"; print $outfile "};"; } elsif (lc $args->format eq "perl") { my $string = join("", map{chr}@result); print $outfile "package $name;\n"; print $outfile "use strict; use warnings;\n"; print $outfile "\n"; print $outfile 'use vars qw(@EXPORT_OK @Table);'."\n"; print $outfile "\n"; print $outfile 'our @EXPORT_OK = (@Table);'."\n"; print $outfile 'my @Table = ('."\n"; for (my $i=0; $i<length($string); $i+=0x10) { my $s = substr($string, $i, 0x10); print $outfile " "; for (my $n = 0; $n < length($s); $n++) { my $c = substr($s, $n, 1); printf $outfile ("0x%02x, ",ord($c) & 0xff); } print $outfile "\n"; } print $outfile ");\n"; } elsif (lc $args->format eq "shell") { for (my $i=0; $i<@result; $i++) { print $outfile "$result[$i]\n"; } } elsif (lc $args->format eq "javascript" || lc $args eq "js") { print $outfile "module.exports['$name'] = [\n"; for (my $i=0; $i<@result; $i+=0x10) { my @slice = @result[$i..$i+0x10]; printf $outfile ("/* % 3X */ ", $i); for (my $j=0; $j<scalar(@slice)-1; $j++) { printf $outfile ("0x%02x, ", $slice[$j] & 0xff); } print $outfile "\n"; } print $outfile "];\n"; print $outfile "module.exports[null] = module.exports['$name'];\n"; } else { die sprintf("Unknown format: %s", $args->format); }
arizvisa/syringe
lib/ia32/generate-table.pl
Perl
bsd-2-clause
9,176
=tmpl opts Test::Module options. =tmpl info Test::Module additional info =cut
vrurg/Pod-Weaver-Plugin-Include
t/simple/lib/Test/Module.pm
Perl
bsd-3-clause
82
#!/usr/bin/env perl package Gene_overlap_check; use strict; use warnings; use Carp; my %GENE_TO_SPAN_INFO; my $singleton_obj = undef; sub new { my ($packagename, $gene_span_file) = @_; if ($singleton_obj) { return($singleton_obj); } else { $singleton_obj = {}; bless ($singleton_obj, $packagename); &_parse_gene_span_info($gene_span_file); return($singleton_obj); } } #### sub get_gene_span_info { my ($self, $gene_id) = @_; my $struct = $GENE_TO_SPAN_INFO{$gene_id} or confess "Error, no gene span info stored for gene $gene_id"; return($struct); } #### sub are_genes_overlapping { my ($self, $geneA, $geneB) = @_; my $genome_span_A_href = $GENE_TO_SPAN_INFO{$geneA} or confess "Error, no gene span info found for $geneA"; my $genome_span_B_href = $GENE_TO_SPAN_INFO{$geneB} or confess "Error, no gene span info found for $geneB"; if ($genome_span_A_href->{chr} eq $genome_span_B_href->{chr} && ## coordinate overlap testing $genome_span_A_href->{lend} < $genome_span_B_href->{rend} && $genome_span_A_href->{rend} > $genome_span_B_href->{lend} ) { return(1); } else { return(0); } } #### sub pct_overlap_shorter_length { my ($self, $geneA, $geneB) = @_; if (! $self->are_genes_overlapping($geneA, $geneB)) { return(0); } my $genome_span_A_href = $GENE_TO_SPAN_INFO{$geneA} or confess "Error, no gene span info found for $geneA"; my $genome_span_B_href = $GENE_TO_SPAN_INFO{$geneB} or confess "Error, no gene span info found for $geneB"; my $len_gene_A = $genome_span_A_href->{rend} - $genome_span_A_href->{lend} + 1; my $len_gene_B = $genome_span_B_href->{rend} - $genome_span_B_href->{lend} + 1; my $shorter_len = ($len_gene_A < $len_gene_B) ? $len_gene_A : $len_gene_B; my @coords = sort {$a<=>$b} ($genome_span_A_href->{lend}, $genome_span_A_href->{rend}, $genome_span_B_href->{lend}, $genome_span_B_href->{rend}); # overlap is based on internal sorted coords. my $overlap_len = $coords[2] - $coords[1] + 1; my $pct_overlap = $overlap_len / $shorter_len * 100; return($pct_overlap); } ############ PRIVATE #### sub _parse_gene_span_info { my ($gene_spans_file) = @_; open (my $fh, $gene_spans_file) or confess "Error, cannot open file: $gene_spans_file .... be sure to have run prep_genome_lib.pl to generate it"; while (<$fh>) { chomp; my @x = split(/\t/); my $gene_symbol = $x[5]; my $chr = $x[1]; my ($lend, $rend) = sort {$a<=>$b} ($x[2], $x[3]); # should already be sorted, but just in case. $GENE_TO_SPAN_INFO{$gene_symbol} = { chr => $chr, lend => $lend, rend => $rend }; } close $fh; return; } 1; #EOM
STAR-Fusion/STAR-Fusion
PerlLib/Gene_overlap_check.pm
Perl
bsd-3-clause
3,083
#!/usr/bin/perl # Configuration: NodeChunkFile # nodes to be upgraded to chunks (to be reordered independently among other chunks) # Format: # targetAttributes sourceChunkAttrVal targetChunkAttrVal # Example: # my.pos=/VMFIN/ && parent.pos=VV && chunkparent.type=/VP.*/ && !(chunkparent.si=subj) nodechunk=finVerb type=modalV # # # Input: xml output from lexical transfer module from Matxin/Apertium (LT) after splitNodes.pl # example: <CHUNK type="VP" si="top"><NODE ... pos="VV"><NODE ... lem="müssen" pos="VMFIN" mi="3.Sg.Pres.Ind"></NODE></NODE></CHUNK> # Output: TODO: update description! # example: <CHUNK type="VP" si="top"><NODE ... pos="VV"/><CHUNK ... lem="müssen" pos="VMFIN" mi="3.Sg.Pres.Ind" type="modalV"></CHUNK></CHUNK> package squoia::nodesToChunks; use strict; use utf8; sub main{ my $dom = ${$_[0]}; my @nodes2chunksRules = @{$_[1]}; my $verbose = $_[2]; print STDERR "#VERBOSE ". (caller(0))[3]."\n" if $verbose; my %targetAttributes = %{@nodes2chunksRules[0]}; my %sourceAttributes = %{@nodes2chunksRules[1]}; my $maxChunkRef = squoia::util::getMaxChunkRef($dom); foreach my $node ( $dom->getElementsByTagName('NODE') ) { #get parent chunk my $parentChunk = squoia::util::getParentChunk($node); #@{$node->findnodes('ancestor::CHUNK[1]')}[0]; # nearest ancestor chunk of node my $headNode = @{$parentChunk->findnodes('child::NODE')}[0]; if (not $headNode->isSameNode($node)) { # is the head node equal the node to upgrade to a chunk? foreach my $nodeCond (keys %targetAttributes) { #check node conditions my @nodeConditions = squoia::util::splitConditionsIntoArray($nodeCond); my $result = squoia::util::evalConditions(\@nodeConditions,$node); if ($result) { # "upgrade" the NODE node to a CHUNK node print STDERR "upgrade " . $node->nodePath() . "(" . $node->getAttribute('slem') .") to a CHUNK\n" if $verbose; $node->unbindNode(); my $newChunk = XML::LibXML::Element->new('CHUNK'); $newChunk->appendChild($node); $parentChunk->appendChild($newChunk); my @sourceAttrs = split(",",$sourceAttributes{$nodeCond}); foreach my $attrVal (@sourceAttrs) { my ($srcChunkAttr,$srcChunkVal) = split("=",$attrVal); $srcChunkVal =~ s/["]//g; $parentChunk->setAttribute($srcChunkAttr,$srcChunkVal); } my @attributes = split(",",$targetAttributes{$nodeCond}); foreach my $attrVal (@attributes) { my ($newChunkAttr,$newChunkVal) = split("=", $attrVal); $newChunkVal =~ s/["]//g; $newChunk->setAttribute($newChunkAttr,$newChunkVal); } $maxChunkRef++; $newChunk->setAttribute('ref',"$maxChunkRef"); $node->setAttribute('noderef',$node->getAttribute('ref')); } } } #else { # print STDERR "should the head node really be upgraded to a chunk?\n" if $verbose; #} } # print new xml to stdout #my $docstring = $dom->toString; #print STDOUT $docstring if $verbose; } 1;
ariosquoia/squoia
MT_systems/squoia/nodesToChunks.pm
Perl
apache-2.0
2,958
# please insert nothing before this line: -*- mode: cperl; cperl-indent-level: 4; cperl-continued-statement-offset: 4; indent-tabs-mode: nil -*- package TestAPRlib::threadrwlock; use strict; use warnings FATAL => 'all'; use Apache::Test; use Apache::TestUtil; use APR::Const -compile => qw(EBUSY SUCCESS); use APR::Pool(); sub num_of_tests { return 5; } sub test { require APR::ThreadRWLock; my $pool = APR::Pool->new(); my $mutex = APR::ThreadRWLock->new($pool); ok $mutex; ok t_cmp($mutex->rdlock, APR::Const::SUCCESS, 'rdlock == APR::Const::SUCCESS'); ok t_cmp($mutex->unlock, APR::Const::SUCCESS, 'unlock == APR::Const::SUCCESS'); ok t_cmp($mutex->wrlock, APR::Const::SUCCESS, 'wrlock == APR::Const::SUCCESS'); ok t_cmp($mutex->unlock, APR::Const::SUCCESS, 'unlock == APR::Const::SUCCESS'); } 1;
dreamhost/dpkg-ndn-perl-mod-perl
t/lib/TestAPRlib/threadrwlock.pm
Perl
apache-2.0
902
###################################################################### # Copyright (c) 2012, Yahoo! Inc. All rights reserved. # # This program is free software. You may copy or redistribute it under # the same terms as Perl itself. Please see the LICENSE.Artistic file # included with this project for the terms of the Artistic License # under which this project is licensed. ###################################################################### package Gearbox::Service::Entry; use strict; use warnings; use Carp; BEGIN { $ENV{PERL_JSON_BACKEND} = 'JSON::PP' } use JSON; # always uses JSON::PP use Gearbox::Utils qw(debug info read_file write_file System); use Data::Dumper; my $CMDRUN = <<EOT; #!/bin/sh exec 2>&1 exec softlimit -c = setuidgid ::USER:: ::CMD:: EOT sub new { my $class = shift; my %params = @_; croak "Need name, command, and user" unless ( $params{command} && $params{name} && $params{user} ); bless {%params}, $class; } sub replace_var { my ($name, $spec, $cfg) = @_; return $spec->{$name} if exists $spec->{$name}; return $cfg->{$name} if exists $cfg->{$name}; # name like key.subkey if( $name =~ /[.]/ ) { my @parts = split /[.]/, $name; for my $data ( $spec, $cfg ) { my $cur = $data; my $found = 1; for my $part ( @parts ) { if( exists $cur->{$part} ) { $cur = $cur->{$part}; } else { $found=0; last; } } return $cur if $found; } } warn Data::Dumper->Dump([\$name, $spec, $cfg],['*name', 'spec', 'cfg']); croak("Failed to fined replacement token for %\{$name} in spec"); } # returns a list of Gearbox::Service::Entry objects; sub new_from_spec { my $class = shift; my %params = @_; my $name = $params{name} or croak("Need a name"); my $command = $params{command} or croak("Need a command"); my $cfg = $params{cfg} or croak("Need a cfg: the complete config for replacing tokens"); my $prefix = $params{prefix} || ""; my $count = defined( $params{count} ) ? $params{count} : 1; my $user = $params{user} || "root"; my $logcmd = $params{logcmd} || $cfg->{logcmd} || $cfg->{log}->{cmd} || ""; for my $var ( $prefix, $count, $user, $command, $logcmd ) { my $prev = $var; while( $var =~ s/%{([^}]+)}/replace_var($1,\%params,$cfg)/ge ) { # in case we replace %{foo} with %{foo} where "foo" is not # a variable in the config last if $prev eq $var; $prev = $var; } } if ( $count == 1 ) { return $class->new( name => $prefix . $name, command => $command, user => $user, logcmd => $logcmd ); } my @results; for my $i ( 1 .. $count ) { my $real_name = sprintf( "$prefix$name-%02d", $i ); push @results, $class->new( name => $real_name, command => $command, user => $user, logcmd => $logcmd ); } return @results; } sub create { my $self = shift; my $servicedir = shift; my $name = $self->{name}; info("Adding managed service $name"); # create the current running service entry debug("Creating directory structure under $servicedir"); my $dir = "$servicedir/$name"; mkdir $dir; mkdir "$dir/log"; # use multilog if no logger cmd line specified unless ($self->{logcmd}) { mkdir "$dir/log/main"; my ( $uid, $gid ) = ( getpwnam("nobody") )[ 2, 3 ]; chown $uid, $gid, "$dir/log/main"; } else { System("rm -rf $dir/log/main"); } write_file( "$dir/log/run", $self->generate_logger ); chmod 0755, "$dir/log/run"; my $cmd = $self->generate_cmd; write_file( "$dir/run", $cmd ); chmod 0755, "$dir/run"; } sub ensure { my ( $self, $servicedir ) = @_; my $name = $self->{'name'}; my $dir = "$servicedir/$name"; my $ok = 1; if ( read_file("$dir/run") eq $self->generate_cmd ) { debug("existing service $name run script matches our definition"); } else { info("Existing service $name run script does not match. Fixing"); undef $ok; } if ( read_file("$dir/log/run") eq $self->generate_logger ) { debug("existing service $name logger run script matches our definition"); } else { info("Existing service $name logger run script does not match. Fixing"); undef $ok; } return if $ok; $self->create($servicedir); info("Restarting $dir"); System("svc -t $dir"); } # We want to make this not depend on the object so it can be called # by other classes sub generate_cmd { my $self = shift; my $cmd = $CMDRUN; my %replaces = ( USER => $self->{user}, CMD => $self->{command}, ); $cmd =~ s/::(\w+)::/exists $replaces{$1} ? $replaces{$1} : $1/ge; return $cmd; } sub generate_logger { my $self = shift; my $logcmd = $self->{logcmd} || "multilog t ./main"; return <<EOF; #! /bin/sh exec 2>&1 exec setuidgid nobody $logcmd EOF } 1;
getgearbox/gearbox
tools/svcbuilder/lib/Gearbox/Service/Entry.pm
Perl
bsd-3-clause
5,319
=pod =head1 NAME SCT_new, SCT_new_from_base64, SCT_free, SCT_LIST_free, SCT_get_version, SCT_set_version, SCT_get_log_entry_type, SCT_set_log_entry_type, SCT_get0_log_id, SCT_set0_log_id, SCT_set1_log_id, SCT_get_timestamp, SCT_set_timestamp, SCT_get_signature_nid, SCT_set_signature_nid, SCT_get0_signature, SCT_set0_signature, SCT_set1_signature, SCT_get0_extensions, SCT_set0_extensions, SCT_set1_extensions, SCT_get_source, SCT_set_source - A Certificate Transparency Signed Certificate Timestamp =head1 SYNOPSIS #include <openssl/ct.h> typedef enum { CT_LOG_ENTRY_TYPE_NOT_SET = -1, CT_LOG_ENTRY_TYPE_X509 = 0, CT_LOG_ENTRY_TYPE_PRECERT = 1 } ct_log_entry_type_t; typedef enum { SCT_VERSION_NOT_SET = -1, SCT_VERSION_V1 = 0 } sct_version_t; typedef enum { SCT_SOURCE_UNKNOWN, SCT_SOURCE_TLS_EXTENSION, SCT_SOURCE_X509V3_EXTENSION, SCT_SOURCE_OCSP_STAPLED_RESPONSE } sct_source_t; SCT *SCT_new(void); SCT *SCT_new_from_base64(unsigned char version, const char *logid_base64, ct_log_entry_type_t entry_type, uint64_t timestamp, const char *extensions_base64, const char *signature_base64); void SCT_free(SCT *sct); void SCT_LIST_free(STACK_OF(SCT) *a); sct_version_t SCT_get_version(const SCT *sct); int SCT_set_version(SCT *sct, sct_version_t version); ct_log_entry_type_t SCT_get_log_entry_type(const SCT *sct); int SCT_set_log_entry_type(SCT *sct, ct_log_entry_type_t entry_type); size_t SCT_get0_log_id(const SCT *sct, unsigned char **log_id); int SCT_set0_log_id(SCT *sct, unsigned char *log_id, size_t log_id_len); int SCT_set1_log_id(SCT *sct, const unsigned char *log_id, size_t log_id_len); uint64_t SCT_get_timestamp(const SCT *sct); void SCT_set_timestamp(SCT *sct, uint64_t timestamp); int SCT_get_signature_nid(const SCT *sct); int SCT_set_signature_nid(SCT *sct, int nid); size_t SCT_get0_signature(const SCT *sct, unsigned char **sig); void SCT_set0_signature(SCT *sct, unsigned char *sig, size_t sig_len); int SCT_set1_signature(SCT *sct, const unsigned char *sig, size_t sig_len); size_t SCT_get0_extensions(const SCT *sct, unsigned char **ext); void SCT_set0_extensions(SCT *sct, unsigned char *ext, size_t ext_len); int SCT_set1_extensions(SCT *sct, const unsigned char *ext, size_t ext_len); sct_source_t SCT_get_source(const SCT *sct); int SCT_set_source(SCT *sct, sct_source_t source); =head1 DESCRIPTION Signed Certificate Timestamps (SCTs) are defined by RFC 6962, Section 3.2. They constitute a promise by a Certificate Transparency (CT) log to publicly record a certificate. By cryptographically verifying that a log did indeed issue an SCT, some confidence can be gained that the certificate is publicly known. An internal representation of an SCT can be created in one of two ways. The first option is to create a blank SCT, using SCT_new(), and then populate it using: =over =item * SCT_set_version() to set the SCT version. Only SCT_VERSION_V1 is currently supported. =item * SCT_set_log_entry_type() to set the type of certificate the SCT was issued for: B<CT_LOG_ENTRY_TYPE_X509> for a normal certificate. B<CT_LOG_ENTRY_TYPE_PRECERT> for a pre-certificate. =item * SCT_set0_log_id() or SCT_set1_log_id() to set the LogID of the CT log that the SCT came from. The former takes ownership, whereas the latter makes a copy. See RFC 6962, Section 3.2 for the definition of LogID. =item * SCT_set_timestamp() to set the time the SCT was issued (epoch time in milliseconds). =item * SCT_set_signature_nid() to set the NID of the signature. =item * SCT_set0_signature() or SCT_set1_signature() to set the raw signature value. The former takes ownership, whereas the latter makes a copy. =item * SCT_set0_extensions() or B<SCT_set1_extensions> to provide SCT extensions. The former takes ownership, whereas the latter makes a copy. =back Alternatively, the SCT can be pre-populated from the following data using SCT_new_from_base64(): =over =item * The SCT version (only SCT_VERSION_V1 is currently supported). =item * The LogID (see RFC 6962, Section 3.2), base64 encoded. =item * The type of certificate the SCT was issued for: B<CT_LOG_ENTRY_TYPE_X509> for a normal certificate. B<CT_LOG_ENTRY_TYPE_PRECERT> for a pre-certificate. =item * The time that the SCT was issued (epoch time in milliseconds). =item * The SCT extensions, base64 encoded. =item * The SCT signature, base64 encoded. =back SCT_set_source() can be used to record where the SCT was found (TLS extension, X.509 certificate extension or OCSP response). This is not required for verifying the SCT. =head1 NOTES Some of the setters return int, instead of void. These will all return 1 on success, 0 on failure. They will not make changes on failure. All of the setters will reset the validation status of the SCT to SCT_VALIDATION_STATUS_NOT_SET (see L<SCT_validate(3)>). SCT_set_source() will call SCT_set_log_entry_type() if the type of certificate the SCT was issued for can be inferred from where the SCT was found. For example, an SCT found in an X.509 extension must have been issued for a pre- certificate. SCT_set_source() will not refuse unknown values. =head1 RETURN VALUES SCT_set_version() returns 1 if the specified version is supported, 0 otherwise. SCT_set_log_entry_type() returns 1 if the specified log entry type is supported, 0 otherwise. SCT_set0_log_id() and B<SCT_set1_log_id> return 1 if the specified LogID is a valid SHA-256 hash, 0 otherwise. Aditionally, B<SCT_set1_log_id> returns 0 if malloc fails. B<SCT_set_signature_nid> returns 1 if the specified NID is supported, 0 otherwise. B<SCT_set1_extensions> and B<SCT_set1_signature> return 1 if the supplied buffer is copied successfully, 0 otherwise (i.e. if malloc fails). B<SCT_set_source> returns 1 on success, 0 otherwise. =head1 SEE ALSO L<ct(3)>, L<SCT_verify(3)>, L<OBJ_nid2obj(3)> =head1 HISTORY These functions were added in OpenSSL 1.1.0. =head1 COPYRIGHT Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L<https://www.openssl.org/source/license.html>. =cut
openweave/openweave-core
third_party/openssl/openssl/doc/crypto/SCT_new.pod
Perl
apache-2.0
6,396
#!/usr/bin/perl -w use strict; use File::Spec::Functions qw(rel2abs); use File::Basename; my $path = dirname(rel2abs($0)); sub syntax_error { print STDERR "Syntax error\n"; print STDERR "Usage : /lauchActionTest.pl [-v|-q] server [test...test]\n"; exit 2; } # Verification qu'il y a au moins un paramètre if ($#ARGV < 0) { syntax_error; } my $server = shift @ARGV; my $verbose = 0; my $quiet = 0; if (($server eq "-v") || ($server eq "-q")) { if ($#ARGV < 0) { syntax_error; } if ($server eq "-v") { $verbose = 1; } else { $quiet = 1; } $server = shift @ARGV; } my %applications = ( 'webui' => 'webui:private', 'external' => 'external:private' ); # last catch group my @last_groups = (); my $content_type; my %tests = ( 'regex' => sub { my ($value, $output) = @_; @last_groups = ($output =~ m/$value/m); return @last_groups; }, 'size_greater_than' => sub { my ($value, $output) = @_; my $size = length($output); return ($size > $value); }, 'is_error' => sub { my ($value, $output) = @_; my $matches; if ($content_type eq 'text/yaml') { $matches = ($output =~ m/!!map:Error/m); } elsif ($content_type eq 'text/json') { $matches = ($output =~ m/"status":"error"/); } else { $matches = ($output =~ m/<status>\s+<string>error<\/string>\s+<\/status>/m); } return (($value eq "yes") xor !$matches); }, ); my $failed_count = 0; my $timestamp = time; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time + 86400); $year += 1900; my $tomorrow = sprintf("$year-%02d-%02d", $mon, $mday); sub default_test_config { my %test_config = (); # valeurs par défaut. $test_config{'is_error'} = 'no'; $test_config{'content_type'} = 'text/xml'; return %test_config; } sub perform_test { my ($test, %test_config) = @_; #figure out the login and the password. my $identification_opt = ""; if (defined($test_config{'application'})) { my $application = $test_config{'application'}; if (defined($applications{$application})) { $identification_opt = " --digest --user $applications{$application} "; } else { print "$test\twarning: unknown application $test_config{'application'}\n"; } } #figure out the url my $url = ""; if (defined($test_config{'url'})) { $url = $test_config{'url'}; } else { print "$test\terror: url is not defined.\n"; exit 1; } # Perform replacement. my $post_data; if (defined($test_config{'post_data'})) { $post_data = $test_config{'post_data'}; } else { $post_data = 0; } if (@last_groups) { my $nb_groups = $#last_groups; for (my $index = 0; $index <= $nb_groups; $index++) { my $indexGr = $index + 1; $url =~ s/GROUP_$indexGr/$last_groups[$index]/g; if ($post_data) { $post_data =~ s/GROUP_$index/$last_groups[$index]/g; } } } if ($url =~ m/GROUP_([0-9]+)/) { print "$test warning: GROUP $1 in url was not substituted\n"; } if ($post_data && $post_data =~ m/GROUP_([0-9]+)/) { print "$test warning: GROUP $1 in post_data was not substituted\n"; } #execute CURL command my $data_binary_opt = ""; if ($post_data) { $data_binary_opt = "--data-binary '$post_data'"; } $content_type = $test_config{'content_type'}; my $command = "curl --silent $identification_opt --header \"Content-Type: $content_type;charset=UTF-8\" --header \"Accept: $content_type\" $data_binary_opt '$server/OS/rest/$url' -o -"; $command =~ s/\n//g; open CURL, "$command |" or die "Error with curl for $test ($?)\n"; my $curl_output = join '', <CURL>; close CURL or die "Error with curl for $test ($?, close)\n"; if ($verbose) { print "$test command: $command\n"; } # Perform the tests. my $failed = 0; foreach my $test_name (keys %tests) { if (defined($test_config{$test_name})) { my $result = $tests{$test_name}($test_config{$test_name}, $curl_output); if ($result) { if (!$quiet) { print "$test.$test_name: OK\n"; } } else { print "$test.$test_name: FAILED\n"; $failed = 1; $failed_count++; } } } if ((!$quiet && $failed) || $verbose) { print "$test output:\n----\n$curl_output\n----\n"; } } sub run_test { my ($test) = @_; my %configs = (); my $config_name = 'root'; my %root_config = default_test_config(); my $test_config = \%root_config; my @config_list = (); open(FILE, $path . "/" . $test) || die("Inexisting file."); while(<FILE>) { my $line = $_; if ($line =~ m/^([^\s]+?)\s?=\s?(.*?)\n?$/) { my $key = $1; my $value = $2; $value =~ s/TIMESTAMP/$timestamp/g; $value =~ s/TOMORROW/$tomorrow/g; $$test_config{$key} = $value; } elsif ($line =~ m/^\[(.*?)\]\n?$/) { $configs{$config_name} = $test_config; my %new_config = (); foreach my $config_slot (keys %root_config) { $new_config{$config_slot} = $root_config{$config_slot}; } $test_config = \%new_config; $config_name = $1; push @config_list, $config_name; } elsif (!($line =~ m/\s*(\#.*)?\n/)) { print "$test configuration error:\n$line\n"; } } close(FILE); if ($#config_list >= 0) { # Enregisrement de la dernière config. $configs{$config_name} = $test_config; foreach $config_name (@config_list) { perform_test("$test:$config_name", %{$configs{$config_name}}); } } else { perform_test($test, %{$test_config}); } } if ($#ARGV < 0) { my @directory = <*.test>; foreach(@directory) { my $test = $_; run_test($test); } } else { foreach (@ARGV) { my $test = $_; run_test($test); } } if ($failed_count > 0) { exit 2; } else { exit 0; }
sebastienhouzet/nabaztag-source-code
server/OS/probes/api/lauchActionTest.pl
Perl
mit
5,528
# CustomClass(クラスの正体はモジュール.) package CustomClass; # method1 sub method1{ print "method1\n"; } # method2 sub method2{ print "method2\n"; $arg1 = shift; print '$arg1 = '."$arg1\n"; # $arg1を出力. } # method3 sub method3{ print "method3\n"; $arg1 = shift; print '$arg1 = '."$arg1\n"; # $arg1を出力. $arg2 = shift; print '$arg2 = '."$arg2\n"; # $arg2を出力. } 1;
bg1bgst333/Sample
perl/class/class/src/class/CustomClass.pm
Perl
mit
414
package CUSTOMER::XML; use lib "/backend/lib"; require ZTOOLKIT; =pod [[SUBSECTION]Customer XML Record] [[HTML]] <CUSTOMER CID="" EMAIL=""> <INFO> <FIRSTNAME></FIRSTNAME> <LASTNAME></LASTNAME> </INFO> <BILLING> <ADDRESS ID="" bill_company="" bill_city="" bill_state="" bill_zip="" bill_address1="" bill_address2=""/> <ADDRESS ID="" bill_company="" bill_city="" bill_state="" bill_zip="" bill_address1="" bill_address2=""/> </BILLING> <SHIPPING> <ADDRESS ship_company="" ship_city="" ship_state="" ship_zip="" ship_address1="" ship_address2=""/> <ADDRESS ship_company="" ship_city="" ship_state="" ship_zip="" ship_address1="" ship_address2=""/> </SHIPPING> <META> <tag1></tag2> </META> <WS> <ws_company></ws_company> <ws_address1></ws_address1> <ws_address2></ws_address2> <ws_city></ws_city> <ws_state></ws_state> <ws_zip></ws_zip> <ws_country></ws_country> <ws_phone></ws_phone> <LOGO></LOGO> <BILLING_CONTACT></BILLING_CONTACT> <BILLING_PHONE></BILLING_PHONE> <ALLOW_PO></ALLOW_PO> <RESALE></RESALE> <RESALE_PERMIT></RESALE_PERMIT> <CREDIT_LIMIT></CREDIT_LIMIT> <CREDIT_BALANCE></CREDIT_BALANCE> <ACCOUNT_MANAGER></ACCOUNT_MANAGER> <JEDI_MID></JEDI_MID> </WS> <NOTES> <NOTE LUSER="" CREATED_GMT="">..note..</NOTE> <NOTE LUSER="" CREATED_GMT="">..note..</NOTE> <NOTE LUSER="" CREATED_GMT="">..note..</NOTE> </NOTES> </CUSTOMER> [[/HTML]] [[/SUBSECTION]] =cut sub as_xml { my ($self,$XCOMPAT) = @_; my $out = "<CUSTOMER CID=\"$self->{'_CID'}\" EMAIL=\"".&ZTOOLKIT::encode($self->{'_EMAIL'})."\">\n"; ## _STATE = 0 --> not loaded/no information saved. ## _STATE = +1 --> initialized w/primary info if ($self->{'_STATE'}&1) { if ($XCOMPAT<110) { $self->{'INFO'}->{'FULLNAME'} = $self->{'INFO'}->{'FIRSTNAME'}.' '.$self->{'INFO'}->{'LASTNAME'}; } $out .= "<INFO>\n".&ZTOOLKIT::hashref_to_xmlish($self->{'INFO'},encoder=>'latin1',skip_blanks=>1)."</INFO>\n\n"; } ## _STATE = +2 --> initialized w/billing info if ($self->{'_STATE'}&2) { $out .= "<BILLING>\n"; my @ADDRESSES = (); foreach my $addr (@{$self->fetch_addresses('BILL')}) { push @ADDRESSES, $addr->TO_HASHREF(); } $out .= &ZTOOLKIT::arrayref_to_xmlish_list(\@ADDRESSES,tag=>'ADDRESS',encoder=>'latin1',skip_blanks=>1)."\n"; $out .= "</BILLING>\n\n"; } ## _STATE = +4 --> initialized w/shipping info if ($self->{'_STATE'}&4) { $out .= "<SHIPPING>\n"; ## this is to correct an issue in order manager where it doesn't like a non-two-digit state ## which happens from time to time. my @ADDRESSES = (); foreach my $addr (@{$self->fetch_addresses('SHIP')}) { push @ADDRESSES, $addr->TO_HASHREF(); } $out .= &ZTOOLKIT::arrayref_to_xmlish_list(\@ADDRESSES,tag=>'ADDRESS',encoder=>'latin1',skip_blanks=>1)."\n"; $out .= "</SHIPPING>\n\n"; } ## _STATE = +8 --> initialized w/meta info if ($self->{'_STATE'}&8) { $out .= "<META>".&ZTOOLKIT::hashref_to_xmlish($self->{'META'},encoder=>'latin1',skip_blanks=>1)."</META>\n\n"; } ## _STATE = +16 --> initialized w/wholesale info (WS->{} populated) if ($self->{'_STATE'}&16) { my ($ORG) = $self->org(); if (defined $ORG) { my $WSREF = $ORG->TO_JSON(); $out .= "<WS>".&ZTOOLKIT::hashref_to_xmlish($WSREF,encoder=>'latin1',skip_blanks=>1)."</WS>\n\n"; } } ## _STATE = +32 --> initialized w/notes if ($self->{'_STATE'}&16) { $out .= "<NOTES>".&ZTOOLKIT::arrayref_to_xmlish_list($self->{'@NOTES'},tag=>'NOTE',content_attrib=>'NOTE',encoder=>'latin1',skip_blanks=>1)."</NOTES>\n\n"; } $out .= "</CUSTOMER>"; } ## ## sub from_xml { my ($self, $xml, $XCOMPAT) = @_; # die(); if ($xml =~ /<CUSTOMER CID=\"(.*?)\"/) { ## This is an existing CID $self->{'_CID'} = $1; if ($self->{'_CID'}==-1) { ## CID of -1 means delete (we'll do this in a bit once we have an email address) } elsif ($self->{'_CID'}==0) { ## New customer?? (Request to create) ## hmm.. this is a bad plan, because this *should* be a lookup request ## we need to pass 0 as the CID to trigger a lookup since the customer *could* have been ## created on the web. $self->{'_STATE'} = 0; $self->{'_CID'} = 0; } else { ($self) = CUSTOMER->new($self->{'_USERNAME'},CID=>$self->{'_CID'},initx=>0xFF); # print Dumper($self); die(); if (not defined $self) { return(undef); } # shit, can't find CID?? uh-oh, must be a whacker! } } if ($xml =~ /\<INFO\>(.*?)\<\/INFO\>/s) { $self->{'_STATE'} += 1; my $inforef = &ZTOOLKIT::xmlish_to_hashref($1,'decoder'=>'latin1'); ## NOTE: remote clients don't pass back passwords, or other settings, during a sync ## so we need to overwrite fields. rather than just do an all out replace. if (not defined $self->{'INFO'}) { $self->{'INFO'} = {}; } foreach my $k (keys %{$inforef}) { $self->{'INFO'}->{$k} = $inforef->{$k}; } $self->{'_EMAIL'} = $self->{'INFO'}->{'EMAIL'}; $self->{'_PRT'} = $self->{'INFO'}{'PRT'} if $self->{'INFO'}{'PRT'}; } # print STDERR "CID IS: $CID\n"; if ($self->{'_CID'} == -1) { print STDERR "deleting .. $self->{'_USERNAME'},$self->{'_EMAIL'}\n"; &CUSTOMER::delete_customer($self->{'_USERNAME'},$self->{'_EMAIL'}); return(undef); } elsif ($self->{'_CID'}==0) { ## NOTE: the CUSTOMER->save() function requires a CID of -1 to create a new customer (doh!) $self->{'_CID'} = -1; } if ($xml =~ /\<BILLING\>(.*?)\<\/BILLING>/s) { if ($1 ne '') { foreach my $addrref (@{&ZTOOLKIT::xmlish_list_to_arrayref($1,tag=>'ADDRESS',encoder=>'latin1',skip_blanks=>1)}) { my ($ID) = $addrref->{'ID'}; delete $addrref->{'ID'}; my ($addr) = CUSTOMER::ADDRESS->new($self,'BILL',{},'SHORTCUT'=>$ID)->from_legacy($addrref); $self->add_address($addr,'SHORTCUT'=>$ID); } } } if ($xml =~ /\<SHIPPING\>(.*?)\<\/SHIPPING>/s) { if ($1 ne '') { foreach my $addrref (@{&ZTOOLKIT::xmlish_list_to_arrayref($1,tag=>'ADDRESS',encoder=>'latin1',skip_blanks=>1)}) { my ($ID) = $addrref->{'ID'}; delete $addrref->{'ID'}; my ($addr) = CUSTOMER::ADDRESS->new($self,'SHIP',{},'SHORTCUT'=>$ID)->from_legacy($addrref); $self->add_address($addr,'SHORTCUT'=>$ID); } } } if ($xml =~ /\<META\>(.*?)\<\/META\>/s) { if ($1 ne '') { $self->{'META'} = &ZTOOLKIT::xmlish_to_hashref($1,'decoder'=>'latin1'); $self->{'_STATE'} += 8; } } ## NOT SURE IF THIS WORKS OR IS EVEN USED: #if ($xml =~ /\<WS\>(.*?)\<\/WS\>/s) { # require CUSTOMER::ORGANIZATION; # $self->{'_STATE'} += 16; # my $WSADDR = &ZTOOLKIT::xmlish_to_hashref($1,'decoder'=>'latin1'); # my ($addr) = CUSTOMER::ORGANIZATION->new_from_customer($self,$WSADDR); # $self->{'WS'} = $addr; # } if ($xml =~ /\<NOTES\>(.*?)\<\/NOTES\>/s) { $self->{'_STATE'} += 32; my $xml = $1; $self->{'NOTES'} = &ZTOOLKIT::xmlish_list_to_arrayref($1,tag=>'NOTE',encoder=>'latin1',skip_blanks=>1); foreach my $noteref (@{$self->{'NOTES'}}) { $noteref->{'NOTE'} = $noteref->{'content'}; delete $noteref->{'content'}; if ($noteref->{'ID'}==0) { #[Wed Apr 02 08:55:03 2008] [error] [client 192.168.1.200] $VAR1 = [ #[Wed Apr 02 08:55:03 2008] [error] [client 192.168.1.200] { #[Wed Apr 02 08:55:03 2008] [error] [client 192.168.1.200] 'ID' => 0, #[Wed Apr 02 08:55:03 2008] [error] [client 192.168.1.200] 'LUSER' => 'asdf', #[Wed Apr 02 08:55:03 2008] [error] [client 192.168.1.200] 'content' => 'testing', #[Wed Apr 02 08:55:03 2008] [error] [client 192.168.1.200] 'CREATED_GMT' => '1207151105' #[Wed Apr 02 08:55:03 2008] [error] [client 192.168.1.200] } # print STDERR Dumper($self->{'NOTES'},$xml); use Data::Dumper; die(); ($noteref->{'ID'}) = $self->save_note($noteref->{'LUSER'},$noteref->{'NOTE'},$noteref->{'CREATED_GMT'}); } } } # print STDERR $xml."\n"; # use Data::Dumper; # print STDERR Dumper($self); $self->save(); return($self); } ## ## ## sub import { my ($USERNAME,$DATA,$XCOMPAT) = @_; require CUSTOMER; require ZTOOLKIT; my $MID = &ZOOVY::resolve_mid($USERNAME); print STDERR "Running CUSTOMER::XML::import\n"; # if we split on the </customer> tag, then we know everything before it is a # valid customer (at least anything after the <customer xxx> tag) my @ar = split(/\<\/CUSTOMER\>/s,$DATA."\n"); # always remove the last element of the ARRAY since nothing good can come # after a </customer> tag pop(@ar); my $XML = ''; foreach my $xblock (@ar) { my ($C) = CUSTOMER->new($USERNAME)->from_xml($xblock.'</CUSTOMER>',$XCOMPAT); # use Data::Dumper; print STDERR Dumper($C); next if (not defined $C); ## if we deleted a customer, $C will be undefined! # $C->save(); $XML .= "<CUSTOMER CID=\"$C->{'_CID'}\" EMAIL=\"$C->{'_EMAIL'}\" TS=\"$C->{'INFO'}->{'MODIFIED_GMT'}\"/>\n"; } return($XML); } 1;
CommerceRack/backend
lib/CUSTOMER/XML.pm
Perl
mit
8,776
#!/usr/bin/perl use strict; use warnings; use Net::GitHub; use Getopt::Long; our ($progname) = $0 =~ m#(?:.*/)?([^/]*)#; my $org = ''; my $repo = ''; my $username = ''; my $password = ''; my $is_output_token_only = 0; my $token = ''; my $labels = ''; my $is_verbose = 0; my $is_show_current_labels_only = 0; sub show_usage { print STDERR "Error: $_[0]" . "\n\n"; print STDERR "Usage:\n"; print STDERR "- Access directly with github username and password\n"; print STDERR " $progname --org=g0v --repo=hack.g0v.tw --username=github_user --password=github_password --labels='bug|FFFFFF,important|DF0101'\n"; print STDERR "- Access by token\n"; print STDERR " $progname --output-token-only --username=github_user --password=github_password > tokenfile\n"; print STDERR " $progname --token=`cat ./tokenfile` --org=g0v --repo=hack.g0v.tw --labels='bug|FFFFFF,important|DF0101'\n"; print STDERR " $progname --token=`cat ./tokenfile` --org=g0v --repo=dev --labels='bug|FFFFFF,important|DF0101'\n"; print STDERR "- All options:\n"; print STDERR " --org <string>|-o Organization/User\n"; print STDERR " --repo <string>|-r Repository\n"; print STDERR " --labels <string>|-l Label string, format: 'name1|color1,name2|color2,...'\n"; print STDERR " --username <string>|-u Github username\n"; print STDERR " --password <string>|-p Github password\n"; print STDERR " --token <string>|-t Github access token\n"; print STDERR " --verbose |-v Verbose\n"; print STDERR " --show-current-labels Show current labels of specific repository and quit\n"; print STDERR " --output-token-only Ouput access token to STDOUT and quit\n"; exit($_[1]); } GetOptions( 'org|o=s' => \$org, 'repo|r=s' => \$repo, 'username|u=s' => \$username, 'password|p=s' => \$password, 'output-token-only' => \$is_output_token_only, 'token|t=s' => \$token, 'labels|l=s' => \$labels, 'verbose|v' => \$is_verbose, 'show-current-labels' => \$is_show_current_labels_only, ) or show_usage('Incorrect options.', 1); # $org and $repo are required. if (!$is_output_token_only) { show_usage("Missing --org {Your org/user}", 1) unless $org; show_usage("Missing --repo", 1) unless $repo; } my $github_token; my $oauth; my $oauth_result; # When not giving token, $username and $password are required. if (!$token) { show_usage("Github username not set", 1) unless $username; show_usage("Github password not set", 1) unless $password; $github_token = Net::GitHub::V3->new( login => $username, pass => $password ); $oauth = $github_token->oauth; $oauth_result = $oauth->create_authorization( { scopes => ['public_repo'], # just ['public_repo'] note => 'Create labels', } ); if ($is_output_token_only) { # output token and quit. print $oauth_result->{token}; exit 0; } } my $github; if ($token) { $github = Net::GitHub->new( access_token => $token ); } else { $github = Net::GitHub->new( access_token => $oauth_result->{token} ); } $github->set_default_user_repo($org, $repo); my $issue = $github->issue; my @current_labels = $issue->labels; my @labels_to_update_tmp = split(/,/, $labels); my @labels_to_update; foreach (@labels_to_update_tmp) { my @each_label = split(/\|/, $_); my $name = $each_label[0]; my $color = $each_label[1]; my %tmp_hash = ("name" => $name, "color" => $color); push @labels_to_update, \%tmp_hash; } my %label_update_res; my %label_create_res; my $label_color; my $label_name; my $action; #foreach (@labels_to_update) { # print "@{[ $_ ]}\n"; #} if ($is_verbose || $is_show_current_labels_only) { # print original labels. print STDERR "Original labels for org:$org repo:$repo:\n"; foreach (@current_labels) { print STDERR ' name:' . $_->{name} . ', color:' . $_->{color} . "\n"; } } exit 0 if $is_show_current_labels_only; foreach (@labels_to_update) { $label_name = $_->{name}; $label_color = $_->{color}; $action = 'create'; # find if the label name already exists in repo. foreach (@current_labels) { if ($_->{name} eq $label_name) { $action = 'update'; last; } } if ( $action eq 'update' ) { # update print STDERR 'Updating label ' . $label_name . '...'; %label_update_res = $issue->update_label( $label_name, { "color" => $label_color } ); print STDERR "\n"; print STDERR "@{[ %label_update_res ]}\n" if $is_verbose; } else { # create print STDERR 'Creating label ' . $label_name . '...'; %label_create_res = $issue->create_label( { "name" => $label_name, "color" => $label_color } ); print STDERR "\n"; print STDERR "@{[ %label_create_res ]}\n" if $is_verbose; } } 0;
youchenlee/g0v-issue-tool
github-add-repo-issue-labels.pl
Perl
mit
5,092
#!/usr/bin/perl use English qw' -no_match_vars '; print "\nOperating System is $OSNAME\n"; ##### COMMAND LINE SUITE FOR BIOINFORMATICIANS & BIOLOGISTS ######## print "\n\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\n"; print "\nCOMMAND LINE SUITE FOR BIOINFORMATICIANS \& BIOLOGISTS\n"; print "\nWritten by Praneet Chaturvedi Kashish Chetal Sithara Raju Simarjot Pabla \=\=\=\= \=\=\=\=\= \=\=\=\=\=\n"; print "Version\_1\n"; print "\nUse \-\-help for information on running COMMAND LINE SUITE FOR BIOINFORMATICIANS \& BIOLOGISTS\n"; print "\nPlease See README and White-Paper for getting detailed instructions on running the script \.\.\.\n"; print "\nRequirements for MacOSX and Linux version version \: Please install R\, python 2.7+ and pandoc\n"; print "\n\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\n"; ###write perl Command_Line_Suite.pl -help for options### ###Asking user input### print "\n\n\=\=\=\=\=Happy to see you \.\.\. Lets get started and do some magic with your files \=\=\=\=\=\n"; my $user_input=$ARGV[0]; ###user input through command line ## ####################################################################### ####################################################################### ############ CALLING MODULES BASED ON USER INPUT ########### if($user_input eq "--help") { &help; } if($user_input eq "UpperQuantile") { my $file=$ARGV[1]; &upperquantile($file); } if($user_input eq "ExpressionToZscore") { my $file=$ARGV[1]; &expressiontozscore($file); } if($user_input eq "BasicStats") { my $file=$ARGV[1]; &basicstats($file); } if($user_input eq "ExtractGeneInfo") { my $file=$ARGV[1]; my $file1=$ARGV[2]; &extractgeneinfo($file,$file1); } if($user_input eq "InteractiveHeatmap") { my $file=$ARGV[1]; my $clustering_type=$ARGV[2]; my $color_theme=$ARGV[3]; &interactiveheatmap($file,$clustering_type,$color_theme); } if($user_input eq "CorrelationProfiles") { my $file=$ARGV[1]; my $threshold=$ARGV[2]; my $genesofinterest=$ARGV[3]; &correlationprofile($file,$threshold,$genesofinterest); } if($user_input eq "Biogrid-Gene-Protein-Search") { my $organism=$ARGV[1]; my $file=$ARGV[2]; &biogrid($organism,$file); } if($user_input eq "DifferentialExpression") { my $file=$ARGV[1]; my $numbercontrol=$ARGV[2]; my $numbertreatment=$ARGV[3]; my $countsthreshold=$ARGV[4]; my $numbersamples=$ARGV[5]; &de($file,$numbercontrol,$numbertreatment,$countsthreshold,$numbersamples); } if($user_input eq "PCA") { my $file=$ARGV[1]; my $object=$ARGV[2]; &pca($file,$object); } if($user_input eq "NMF") { my $file=$ARGV[1]; &nmf($file); } if($user_input eq "FetchSRA") { my $path=$ARGV[1]; my $SRAid=$ARGV[2]; &fetchsra($path,$SRAid); } if($user_input eq "FetchGEO") { my $path=$ARGV[1]; my $GEOid=$ARGV[2]; &fetchgeo($path,$GEOid); } if($user_input eq "InteractiveScatterPlot") { $file=$ARGV[1]; $colx=$ARGV[2]; $coly=$ARGV[3]; $colenrichment=$ARGV[4]; &interactivesp($file,$colx,$coly,$colenrichment); } ######################################################################### ######################################################################### ##### MODULES CODE DOWN HERE ########## ##################### HELP MODULE #################### sub help { print "\nPlease use options below to run the COMMAND LINE SUITE FOR BIOINFORMATICIANS \& BIOLOGISTS\n"; print "\nOptions\:\:\n"; print "\nUpperQuantile \-\-\-\> for performing upper quantile normalization\n\n"; print "\nBasicStats \-\-\-\> for obtaining stats like mean\, median\, standard deviation\, variance\, Sum\, min and max for each Gene Expression profile\n\n"; print "\nExpressionToZscore \-\-\-\> for obtaining z-scores for Gene Expression in samples\n\n"; print "\nExtractGeneInfo \-\-\-\> for obtaining info\/expression of list genes from a huge matrix gene info\/expression\n\n"; print "\nInteractiveHeatmap \-\-\-\> for generating interactive heatmaps for expression data\. User has three options on clustering type and four choices on color theme\. Please read README for descriptions and run command\.\n\n"; print "\nCorrelationProfiles \-\-\-\> for obtaining genes correlation profile termed as positively and negatively correlated based on User threshold\. One can obtain profile for all genes or just genes of interest \(For genes of interest user needs to provide the path to gene list file\)\. Heatmap will only be displayed for genes of interest\n\n"; print "\nBiogrid\-Gene\-Protein\-Search \-\-\-\> for obtaining gene\-protein interactions for Human and Mouse for genes of interest\n\n"; print "\nDifferentialExpression \-\-\-\> for obtaining DE genes in RNA-SEQ expriments\. Uses RUVSeq package in R\n\n"; print "\nPCA \-\-\-\> for performing Principal Component Analysis on Genes and Samples\. User needs to provide path to the file and specify Genes or Samples based on which PCA is needed to be performed\n"; print "\nNMF \-\-\-\> for performing Nonnegative Matrix Factorization on Samples in Expression dataset\n"; print "\nFetchSRA \-\-\-\> for downloading Raw SRA data from NCBI SRA for example user can Download all the samples under SRA project id or just a single sample based on requirement\. Just requires path to the folder where you want to download the data and SRA ID\n"; print "\nFetchGEO \-\-\-\> for downloading GEO expression data for example user can fetch expression of GSE Id\, GSM Id\, GDS Id\. Just requires path to the folder where you want to download the data and GSE\/GSM\/GSD ID\n"; print "\nInteractiveScatterPlot \-\-\-\> for generating Interactive Scatter plot based on user preference\. User needs to provide path to the file\, Column number for x\-axis values\, Column number for y\-axis values and Column number which user needs for color factorization \(If users provides No color factorization will not be done\) Please see README for extensive explanation\n"; } ##################### MODULE END ##################### #################### UPPER QUANTILE MODULE ################## sub upperquantile { use Cwd; my $cwd = getcwd; print "\nUpper Quantile Normalization module loaded\n"; my $file=@_[0];chomp $file; if($file eq "") { print "\nYou have forgot to give path to file from command line\n"; print "\nPlease provide the path to the file \.\. You can drag and drop the file from finder window\n"; $file=<stdin>;chomp $file; } my $start_time=time(); my $header;my $path; my $counter=0; my $counter1=0; open(F,$file); while(my $data = <F>) { $data =~ s/^\s+|\s+$//g; chomp $data; $counter++; if($counter==1) { $header=$data; } } close F; print "\nStored Header Info\n"; print "\nRunning R in Background \(please be patient\)\.\.\.\.\.\n"; my @filepath=split(/\//,$file); my $filename=pop(@filepath); foreach my $m(@filepath) { if($m eq "") {} else { $path=$path."\/".$m; } } my $dirtoR=$cwd."\/"."Modules"."\/"."quantile_normalization.r"; system(Rscript,$dirtoR,$path,$filename) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run complete \.\.\. Now writing header with perl\n"; my $Rfile = $path."\/"."temporaryfile"."\."."txt"; my $outfile = "Quantile"."\_"."Normalized"."\_".$filename; open(OUT,">$path/$outfile"); my $newhead=$header; print OUT "$header\n"; open(F,"$Rfile"); while(my $data = <F>) { $data =~ s/^\s+|\s+$//g; chomp $data; $counter1++; if($counter1==1) {} else { print OUT "$data\n"; } } close F; close OUT; unlink $Rfile; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\.\n"; print "\nPlease see file $outfile for results\n"; } ############################ MODULE END ############################ ########################### EXPRESSIONTOZSCORE MODULE ################## sub expressiontozscore { print "\nExpressionToZscore module loaded\n"; use Cwd; my $cwd = getcwd; my $file=@_[0];chomp $file; if($file eq "") { print "\nYou have forgot to give path to file from command line\n"; print "\nPlease provide the path to the file \.\. You can drag and drop the file from finder window\n"; $file=<stdin>;chomp $file; } my $start_time=time(); my $header;my $path; my $counter=0; my $counter1=0; open(F,$file); while(my $data = <F>) { $data =~ s/^\s+|\s+$//g; chomp $data; $counter++; if($counter==1) { $header=$data; } } close F; print "\nStored Header Info\n"; print "\nRunning R in Background \(please be patient\)\.\.\.\.\.\n"; my @filepath=split(/\//,$file); my $filename=pop(@filepath); foreach my $m(@filepath) { if($m eq "") {} else { $path=$path."\/".$m; } } my $dirtoR=$cwd."\/"."Modules"."\/"."Zscore_Calculator.r"; system(Rscript,$dirtoR,$path,$filename) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run complete \.\.\. Now writing header with perl\n"; my $Rfile = $path."\/"."temporaryfile"."\."."txt"; my $outfile = "Zscores"."\_".$filename; open(OUT,">$path/$outfile"); my $newhead=$header; print OUT "$header\n"; open(F,"$Rfile"); while(my $data = <F>) { $data =~ s/^\s+|\s+$//g; chomp $data; $counter1++; if($counter1==1) {} else { print OUT "$data\n"; } } close F; close OUT; unlink $Rfile; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\.\n"; print "\nPlease see file $outfile for results\n"; } ################################## MODULE END ############################# ################################# BASICSTATS MODULE ######################## sub basicstats { print "\nBasicStats module loaded\n"; use Cwd; my $cwd = getcwd; my $file=@_[0];chomp $file; if($file eq "") { print "\nYou have forgot to give path to file from command line\n"; print "\nPlease provide the path to the file \.\. You can drag and drop the file from finder window\n"; $file=<stdin>;chomp $file; } my $start_time=time(); my $path; my $counter1=0; print "\nRunning R in Background \(please be patient\)\.\.\.\.\.\n"; my @filepath=split(/\//,$file); my $filename=pop(@filepath); foreach my $m(@filepath) { if($m eq "") {} else { $path=$path."\/".$m; } } my $dirtoR=$cwd."\/"."Modules"."\/"."BasicStats.r"; system(Rscript,$dirtoR,$path,$filename) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run complete \.\.\. Now writing header with perl\n"; my $Rfile = $path."\/"."temporaryfile"."\."."txt"; my $outfile = "BasicStats"."\_".$filename; open(OUT,">$path/$outfile"); print OUT "Gene\tMean\tMedian\tMedian Adjusted Deviation\tStandard Deviation\tVariance\tMinimum\tMaximum\n"; open(F,"$Rfile"); while(my $data = <F>) { $data =~ s/^\s+|\s+$//g; chomp $data; $counter1++; if($counter1==1) {} else { print OUT "$data\n"; } } close F; close OUT; unlink $Rfile; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\.\n"; print "\nPlease see file $outfile for results\n"; } ###################################### MODULE END ################################ ############################### EXTRACTGENEINFO MODULE ########################## sub extractgeneinfo { use Cwd; my $cwd = getcwd; print "\nExtractGeneInfo module loaded\n"; my $file1=@_[0];chomp $file1; my $file2=@_[1];chomp $file2; if($file1 eq "") { print "\nYou have forgot to give path to file from command line\n"; print "\nPlease provide the path to the Expression\/Info file \.\. You can drag and drop the file from finder window\n"; $file1=<stdin>;chomp $file1; } if($file2 eq "") { print "\nYou have forgot to give path to file from command line\n"; print "\nPlease provide the path to the Gene List file \.\. You can drag and drop the file from finder window\n"; $file2=<stdin>;chomp $file2; } my $start_time=time(); my $dirtoperl=$cwd."\/"."Modules"."\/"."extract_gene_info.pl"; system("perl","$dirtoperl","$file1","$file2") ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\.\n"; print "\nPlease see file $outfile for results\n"; } ##################################### MODULE END ################################## #################################### INTERACTIVE HEATMAP MODULE ################### sub interactiveheatmap { print "\nInteractive Heatmap module loaded\n"; use Cwd; my $cwd = getcwd; my $file=@_[0];chomp $file;my $clustering_type=@_[1];chomp $clustering_type;my $color_theme=@_[2];chomp $color_theme; if($file eq "") { print "\nYou have forgot to give path to file from command line\n"; print "\nPlease provide the path to the Expression file \.\. You can drag and drop the file from finder window\n"; $file=<stdin>;chomp $file; } if($clustering_type eq "") { print "\nYou have forgot to give clustering type from command line\n"; print "\nPlease provide Clustering type\. Options are 1\. Row\_Clust for only row clustering 2\. Col\_Clust for Column CLustering 3\. Row\_Col\_Clust for both way clustering\n"; $clustering_type=<stdin>;chomp $clustering_type; } if($color_theme eq "") { print "\nYou have forgot to give color theme from command line\n"; print "\nPlease provide Color theme\. Options are 1\. YellowGreenOrange 2\. BlueWhiteRed 3\. YellowBlackBlue 4\. GreenWhitePurple\n"; $color_theme=<stdin>;chomp $color_theme; } my $start_time=time(); my $path; my @filepath=split(/\//,$file); my $filename=pop(@filepath); foreach my $m(@filepath) { if($m eq "") {} else { $path=$path."\/".$m; } } print "\nRunning R in Background\n"; print "\n$file\n"; if($clustering_type eq "Row_Clust") { print "runing\n"; my $dirtoR=$cwd."\/"."Modules"."\/"."Row_Clust.r"; system(Rscript,$dirtoR,$path,$filename,$color_theme) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run Complete\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds\n"; print "\nBoth Interactive and Static Heatmaps are saved in the folder $path\n"; } if($clustering_type eq "Col_Clust") { my $dirtoR=$cwd."\/"."Modules"."\/"."Col_Clust.r"; system(Rscript,$dirtoR,$path,$filename,$color_theme) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run Complete\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds\n"; print "\nBoth Interactive and Static Heatmaps are saved in the folder $path\n"; } if($clustering_type eq "Row_Col_Clust") { my $dirtoR=$cwd."\/"."Modules"."\/"."Row_Col_Clust.r"; system(Rscript,$dirtoR,$path,$filename,$color_theme) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run Complete\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds\n"; print "\nBoth Interactive and Static Heatmaps are saved in the folder $path\n"; } } ############################# MODULE END ###################################### ############################# CORRELATION PROFILES ############################ sub correlationprofile { print "\nCorrelationProfiles module loaded\n"; use Cwd; my $cwd = getcwd; my $file=@_[0];my $threshold=@_[1];my $genesofinterest=@_[2];chomp $file;chomp $threshold;chomp $genesofinterest;my $negativethreshold=-1*$threshold; if($file eq "") { print "\nYou have forgot to give path to file from command line\n"; print "\nPlease provide the path to the Gene Expression file \.\. You can drag and drop the file from finder window\n"; $file = <stdin>;chomp $file; } if($threshold eq "") { print "\nYou have forgot to provide correlation threshold\n"; print "\nPlease provide correlation threshold \.\. Threshold Range is -1 to 1\n"; $threshold = <stdin>;chomp $threshold; } if($genesofinterest eq "") { print "\nYou have forgot to provide genes of interest\n"; print "\nPlease provide genes of interest\. Options are all or Path to gene list file \.\. You can drag and drop from finder window\n"; $genesofinterest = <stdin>;chomp $genesofinterest; } my $start_time=time(); my $path; my @filepath=split(/\//,$file); my $filename=pop(@filepath); foreach my $m(@filepath) { if($m eq "") {} else { $path=$path."\/".$m; } } if($genesofinterest eq "all") { print "\nRunning R in background to perform correlations \.\.\. please be patient\.\.\.\n"; my $dirtoR=$cwd."\/"."Modules"."\/"."Correlation_for_Matrix.r"; system(Rscript,$dirtoR,$path,$filename) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run complete \.\.\. Now Filtering Correlation based on user threshold with perl\n"; my $Rfile = $path."\/"."temporaryfile"."\."."txt"; my $dirtoperl=$cwd."\/"."Modules"."\/"."obtain_positive_negative_correlation_set.pl"; system("perl","$dirtoperl","$path","$filename","$Rfile","$threshold") ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; unlink $Rfile; print "\nPositive and Negative correlation profiles obtained\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds\n"; print "\nCorrelation files are saved in $path\n"; } if($genesofinterest =~/.txt/) { &extractgeneinfo($file,$genesofinterest); my @filepath_new=split(/\//,$genesofinterest); my $filename_new=pop(@filepath_new); my $path_new; foreach my $m(@filepath_new) { if($m eq "") {} else { $path_new=$path_new."\/".$m; } } my $extractinfo_result="Expression"."\_".$filename_new; my $temp=$path_new."\/".$extractinfo_result; print "\nRunning R in background to perform correlations \.\.\. please be patient\.\.\.\n"; my $dirtoR=$cwd."\/"."Modules"."\/"."Correlation_for_Matrix.r"; system(Rscript,$dirtoR,$path_new,$extractinfo_result) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; unlink $temp; print "\nR Run complete \.\.\. Now writing header with perl\n"; my $Rfile = $path_new."\/"."temporaryfile"."\."."txt"; my $counter=0;my $header;my $counter1=0; open(F,"$Rfile"); while(my $data = <F>) { chomp $data; $counter++; if($counter==1) { $header=$data; } } close F; my $mainhead="Gene"."\t".$header; my $correlation_file_R=$path."\/"."Correlation"."\_"."Output"."\_".$filename_new; open(OUT,">$correlation_file_R"); open(F,"$Rfile"); print OUT "$mainhead\n"; while(my $data = <F>) { chomp $data; $counter1++; if($counter1==1) {} else { print OUT "$data\n"; } } close OUT; close F; unlink $Rfile; my $dirtoR1=$cwd."\/"."Modules"."\/"."Row_Col_Clust_Correlation_input.r"; print "\nInteractive Heatmap Module loaded\n"; print "\nRunning R for generating heatmap using Correlation values\n"; system(Rscript,$dirtoR1,$path_new,$correlation_file_R) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR run complete \.\.\.\. Heatmap generated now finding positively and negatively correlated gene sets using perl\n"; my $dirtoperl=$cwd."\/"."Modules"."\/"."obtain_positive_negative_correlation_set.pl"; system("perl","$dirtoperl","$path_new","$filename_new","$correlation_file_R","$threshold") ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds\n"; print "\nCorrelation files are saved in $path_new\n"; } } ####################################### MODULE END #################################### ###################################### BIOGRID MODULE START ########################## sub biogrid { print "\nBiogrid\-Gene\-Protein\-Search Module loaded\n"; use Cwd; my $cwd = getcwd; my $organism=@_[0];chomp $organism;my $file=@_[1]; chomp $file; if($organism eq "") { print "\nYou have forgot to provide organism of interest\n"; print "\nPlease provide Oraganism of interest\.Options are 1\. Human 2\. Mouse\n"; $organism=<stdin>;chomp $organism; } if($file eq "") { print "\nYou have forgot to provide path to genes of interest file\n"; print "\nPlease provide the path to the Gene list file \.\. You can drag and drop the file from finder window\n"; $file=<stdin>;chomp $file; } my $start_time=time(); my $path; my @filepath=split(/\//,$file); my $filename=pop(@filepath); foreach my $m(@filepath) { if($m eq "") {} else { $path=$path."\/".$m; } } if($organism eq "Human") { my $dirtoperl=$cwd."\/"."Modules"."\/"."Biogrid_ppi_Human.pl"; system("perl","$dirtoperl","$path","$filename") ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds\n"; print "\nGene Protein interaction results are saved in $path\n"; } if($organism eq "Mouse") { my $dirtoperl=$cwd."\/"."Modules"."\/"."Biogrid_ppi_Mouse.pl"; system("perl","$dirtoperl","$path","$filename") ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds\n"; print "\nGene Protein interaction results are saved in $path\n"; } } ################################### MODULE END ########################## ################################## DIFFERENTIAL EXPRESSION MODULE ############### sub de { print "\nDifferentialExpression Module loaded\n"; use Cwd; my $cwd = getcwd; my $file=@_[0];my $numbercontrol=@_[1];my $numbertreatment=@_[2];my $countsthreshold=@_[3];my $numbersamples=@_[4]; chomp $file;chomp $numbercontrol;chomp $numbertreatment;chomp $countsthreshold;chomp $numbersamples; if($file eq "") { print "\nYou have forgot to provide the path to file\n"; print "\nPlease provide the path to the Counts file \.\. Please place the all control samples before all treatment samples \.\. You can drag and drop the file from finder window\n"; $file=<stdin>;chomp $file; } if($numbercontrol eq "") { print "\nYou have forgot to provide the number of control samples\n"; print "\nPlease provide the Number of Control Samples\n"; $numbercontrol=<stdin>;chomp $numbercontrol; } if($numbertreatment eq "") { print "\nYou have forgot to provide the number of treatment samples\n"; print "\nPlease provide the Number of Treatment Samples\n"; $numbertreatment=<stdin>;chomp $numbertreatment; } if($countsthreshold eq "") { print "\nYou have forgot to provide the Counts threshold\n"; print "\nPlease provide the Counts threshold \n"; $countsthreshold=<stdin>;chomp $countsthreshold; } if($numbersamples eq "") { print "\nYou have forgot to provide the number of samples you want to apply counts filtering\n"; print "\nPlease provide the number of samples you want to apply counts filtering\n"; $numbersamples=<stdin>;chomp $numbersamples; } my $start_time=time(); my $path; my @filepath=split(/\//,$file); my $filename=pop(@filepath); foreach my $m(@filepath) { if($m eq "") {} else { $path=$path."\/".$m; } } my $dirtoR=$cwd."\/"."Modules"."\/"."RUVseq.r"; print "\nRunning R in background to perform DE using RUVSeq \.\.\. \(please be patient\)\n"; system(Rscript,$dirtoR,$path,$filename,$numbercontrol,$numbertreatment,$countsthreshold,$numbersamples) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run complete \.\.\. Now writing header with perl\n"; my $Rfile = $path."\/"."temporaryfile"."\."."txt"; my $outfile = "DifferentialExpression"."\_".$filename; open(OUT,">$path/$outfile"); print OUT "Gene\tlogFC\tlogCPM\tLR\tPvalue\tFDR\n"; open(F,"$Rfile"); while(my $data = <F>) { $data =~ s/^\s+|\s+$//g; chomp $data; $counter1++; if($counter1==1) {} else { print OUT "$data\n"; } } close F; close OUT; unlink $Rfile; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\.\n"; print "\nPlease see file $outfile in $path for results\n"; } ##################################### MODULE END ################################# ##################################### MODULE PCA START ########################### sub pca { print "\nPCA Module loaded\n"; use Cwd; my $cwd = getcwd; my $file=@_[0];my $object=@_[1];chomp $file;chomp $object; if($file eq "") { print "\nYou have forgot to provide path to the file\n"; print "\nPlease provide the path to the file \.\. You can drag and drop the file from finder window\n"; $file=<stdin>;chomp $file; } if($object eq "") { print "\nYou have forgot to provide the object on which PCA is needed to be performed\n"; print "\nPlease provide object Options are Genes or Samples\n"; $object=<stdin>;chomp $object; } my $start_time=time(); if($object eq "Genes") { my $dirtoPythonpip=$cwd."\/"."Modules"."\/"."get_pip.py"; print "\nInstalling pip on the system\n"; system("sudo","python","$dirtoPythonpip"); print "\nUpgrading Numpy\n"; system("sudo","easy_install","--upgrade","numpy"); print "\nUpgrading Scipy\n"; system("sudo","easy_install","--upgrade","scipy"); print "\nInstalling Pandas\n"; system("sudo","pip","install","pandas"); print "\nInstalling Scikit\-Learn\n"; system("sudo","pip","install","scikit-learn"); my $dirtoPython=$cwd."\/"."Modules"."\/"."PCA_Gene.py"; system("python","-W","ignore","$dirtoPython","$file") ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nPython run Complete\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\.\n"; print "\nPCA results are saved in the directory where expression is\n"; } if($object eq "Samples") { my $dirtoPythonpip=$cwd."\/"."Modules"."\/"."get_pip.py"; print "\nInstalling pip on the system\n"; system("sudo","python","$dirtoPythonpip"); print "\nUpgrading Numpy\n"; system("sudo","easy_install","--upgrade","numpy"); print "\nUpgrading Scipy\n"; system("sudo","easy_install","--upgrade","scipy"); print "\nInstalling Pandas\n"; system("sudo","pip","install","pandas"); print "\nInstalling Scikit\-Learn\n"; system("sudo","pip","install","scikit-learn"); my $dirtoPython=$cwd."\/"."Modules"."\/"."PCA_Samples.py"; system("python","-W","ignore","$dirtoPython","$file") ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nPython run Complete\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\.\n"; print "\nPCA results are saved in the directory where expression is\n"; } } ######################################### MODULE END ############################### ####################################### NMF CLUST MODULE START ##################### sub nmf { use Cwd; my $cwd = getcwd; print "\nNMF Clustering module loaded\n"; my $file=@_[0];chomp $file; if($file eq "") { print "\nYou have forgot to give path to file from command line\n"; print "\nPlease provide the path to the file \.\. You can drag and drop the file from finder window\n"; $file=<stdin>;chomp $file; } my $start_time=time(); my $path; my @filepath=split(/\//,$file); my $filename=pop(@filepath); foreach my $m(@filepath) { if($m eq "") {} else { $path=$path."\/".$m; } } my $dirtoR=$cwd."\/"."Modules"."\/"."NMF.r"; print "\nRunning R in Background \(please be patient\)\.\.\.\.\.\n"; print "\nIf more than 1000 genes and 14 samples \.\.\. estimated running time is 5 to 10 mins\n"; system(Rscript,$dirtoR,$path,$filename) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run Complete\.\.\.\.\.\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\.\n"; print "\nNMF ConsensusMap saved in $path\n"; } #################################### MODULE END #################################### #################################### FETCH SRA MODULE START ######################## sub fetchsra { use Cwd; my $cwd = getcwd; print "\nFetchSRA module loaded\n"; my $path=@_[0];chomp $path;my $SRAid=@_[1];chomp $SRAid; if($path eq "") { print "\nYou have forgot to give path where SRA files have to be donloaded\n"; print "\nPlease provide the path \.\. You can drag and drop the folder from finder window\n"; $path=<stdin>;chomp $path; } if($SRAid eq "") { print "\nYou have forgot to provide SRA ID\n"; print "\nPlease provide the SRA ID\n"; $SRAid=<stdin>;chomp $SRAid; } my $start_time=time(); my $dirtoR=$cwd."\/"."Modules"."\/"."SRA_DATA_BULK_DOWNLOAD.r"; print "\nRunning R in Background \(please be patient\)\.\.\.\.\.\n"; print "\nDownloading time depends on Internet Connection speed \.\.\. If downloading huge data files connect to a fast internet connection\n"; system(Rscript,$dirtoR,$path,$SRAid) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run Complete\.\.\.\.\. SRA FILES ARE DOWNLOADED\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\. Please see $path for files\n"; } ################################### MODULE END ###################################### ################################## FETCH GEO MODULE START ########################### sub fetchgeo { use Cwd; my $cwd = getcwd; print "\nFetchGEO module loaded\n"; my $path=@_[0];chomp $path;my $GEOid=@_[1];chomp $GEOid; if($path eq "") { print "\nYou have forgot to give path where GEO files have to be donloaded\n"; print "\nPlease provide the path \.\. You can drag and drop the folder from finder window\n"; $path=<stdin>;chomp $path; } if($GEOid eq "") { print "\nYou have forgot to provide GEO ID\n"; print "\nPlease provide the GEO ID\n"; $GEOid=<stdin>;chomp $GEOid; } if($GEOid =~/GSM/) { my $value="GSM"; my $start_time=time(); my $dirtoR=$cwd."\/"."Modules"."\/"."GEO_DATA_DOWNLOAD.r"; print "\nRunning R in Background \(please be patient\)\.\.\.\.\.\n"; system(Rscript,$dirtoR,$path,$GEOid,$value) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run Complete\.\.\.\.\. $GEOid related MetaData and Expression files are ready\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\. Please see $path for files\n"; } if($GEOid =~/GDS/) { my $value="GDS"; my $start_time=time(); my $dirtoR=$cwd."\/"."Modules"."\/"."GEO_DATA_DOWNLOAD.r"; print "\nRunning R in Background \(please be patient\)\.\.\.\.\.\n"; system(Rscript,$dirtoR,$path,$GEOid,$value) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run Complete\.\.\.\.\. $GEOid related MetaData and Expression files are ready\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\. Please see $path for files\n"; } if($GEOid =~/GSE/) { my $value="GSE"; my $start_time=time(); my $dirtoR=$cwd."\/"."Modules"."\/"."GEO_DATA_DOWNLOAD.r"; print "\nRunning R in Background \(please be patient\)\.\.\.\.\.\n"; system(Rscript,$dirtoR,$path,$GEOid,$value) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run Complete\.\.\.\.\. $GEOid related MetaData and Expression files are ready\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\. Please see $path for files\n"; } } ########################################### MODULE END ######################## ####################################### INTERACTIVE SCATTER PLOT MODULE START ################ sub interactivesp { use Cwd; my $cwd = getcwd; print "\nInteractiveScatterPlot module loaded\n"; my $file=@_[0];my $colx=@_[1];my $coly=@_[2];my $colenrichment=@_[3]; chomp $file;chomp $colx;chomp $coly;chomp $colenrichment; if($file eq "") { print "\nYou have forgot to provide path to the file\n"; print "\nPlease provide the path to the file \.\. You can drag and drop the file from finder window\n"; $file=<stdin>;chomp $file; } if($colx eq "") { print "\nYou have forgot to provide column number for x\-axis values\n"; print "\nPlease provide column number for x\-axis values\n"; $colx=<stdin>;chomp $colx; } if($coly eq "") { print "\nYou have forgot to provide column number for y\-axis values\n"; print "\nPlease provide column number for y\-axis values\n"; $coly=<stdin>;chomp $coly; } if($colenrichment eq "") { print "\nYou have forgot to provide column number for color factorization\. You can also say No for no color factorization\n"; print "\nPlease provide column number for color factorization\n"; $colenrichment=<stdin>;chomp $colenrichment; } my $start_time=time(); my $path; my @filepath=split(/\//,$file); my $filename=pop(@filepath); foreach my $m(@filepath) { if($m eq "") {} else { $path=$path."\/".$m; } } my $dirtoR=$cwd."\/"."Modules"."\/"."Interactive_ScatterPlot.r"; print "\nRunning R in Background \(please be patient\)\.\.\.\.\.\n"; system(Rscript,$dirtoR,$path,$filename,$colx,$coly,$colenrichment) ==0 or die "\nExcecution Stopped because of errors \.\.\. Please See Possible Errors Section of README or Contact CSBB for bugs and issues\n"; print "\nR Run Complete\.\.\.\.\.\n"; my $end_time=time(); my $total_time=$end_time-$start_time; print "\nRun Complete in $total_time seconds \.\.\.\n"; print "\nBoth Interactive and Static ScatterPlots saved in the $path\n"; } ######################################## MODULE END ###########################
skygenomics/CSBB-v1.0
MACOS_LINUX_VERSION/CSBB.pl
Perl
mit
35,804
package MT::DeckType; use strict; use base qw( MT::Object ); __PACKAGE__->install_properties ({ column_defs => { 'id' => 'integer not null auto_increment', 'name' => 'string(255)', 'cardtype_id' => 'integer', 'quantity' => 'integer', 'setcount' => 'integer', 'must' => 'text', 'nouse' => 'text', }, indexes => { cardtype_id => 1, created_on => 1, modified_on => 1, }, audit => 1, datasource => 'deck_type', primary_key => 'id', class_type => 'deck_type', });
KAWAKITAYasushi/MTDeckDeal
plugins/DeckDeal/lib/MT/DeckType.pm
Perl
mit
610
:- expects_dialect(lps). maxTime(16). fluents account(_,_). actions transfers(_,_,_). initially account(bob, 10), account(fariba, 100). day(2, friday). day(T2, friday) :- day(T1, friday), T2 is T1 + 7. if needs(bob, Amount) at T1, Amount < 100 then transfers(fariba, Amount, bob) from T1 to T2. if transfers(fariba, Amount1, bob) from T1 to T2, Amount2 is Amount1 + 0.10 * Amount1, T3 is T2+2 then transfers(bob, Amount2, fariba) from T3 to T4. needs(bob, 10) at T if account(bob, Balance) at T, Balance < 20 , day(T, friday). transfers(Giver, Amount, Receiver) initiates account(Receiver, Amount2) if account(Receiver, Amount1), Amount2 is Amount1 + Amount. transfers(Giver, Amount, Receiver) initiates account(Giver, Amount2) if account(Giver, Amount1), Amount2 is Amount1 - Amount. transfers(Giver, Amount, Receiver) terminates account(Receiver, _). transfers(Giver, Amount, Receiver) terminates account(Giver, _). display(account(Person,V), [from:[X,0], to:[RightX,V], label:(Person:V), type:rectangle, fontSize:13, fillColor:'#85bb65'/* USD:-)*/ ] ) :- (Person=bob,X=50;Person=fariba,X=200), RightX is X+70. display(timeless,[ % a display spec can be a list of properties (for one object) or a list of lists (4 objects here:) [type:star, center:[250,150], points:9, radius1:20, radius2:25, fillColor:yellow, sendToBack], [type:rectangle, from:[0,0], to:[320,200], sendToBack, fillColor:[0,0.746,1]], % R,G,B [type:ellipse, shadowOffset:5, shadowColor:darkGray , point:[50,150], size:[110, 40],fillColor: white], [type:ellipse, point:[20,130], size:[90, 30],fillColor: white ] ]).
TeamSPoon/logicmoo_workspace
packs_sys/logicmoo_lps/examples/simple-smart-contract.pl
Perl
mit
1,642
package Validate::Plugin::_config; use strict; use FindBin qw($Bin); sub new { my $classname = shift; my $self = {}; bless( $self, $classname ); $self->{validate}=shift; return $self; } sub run { my $self = shift; my $validate = $self->{validate}; my $config = $validate->{config}; return { status=>"ok", expect=>"site config", found => "site config", config=>$config }; } 1;
falling-sky/validator
lib/Validate/Plugin/_config.pm
Perl
mit
416
use strict; use CXGN::Page; my $page=CXGN::Page->new('Phenotype submission format','Naama'); $page->header("SGN Phenotype Submission Guidelines", "SGN phenotype submission guidelines"); print<<END_HEREDOC; <p> SGN hosts a <a href="/search/direct_search.pl?search=phenotypes/">phenotype database</a> for displaying individual plant accessions scored for phenotypic attributes and more (links to genetic maps, QTLs, locus associations).<br> Each accession is associated with a population, such as introgression lines, mutants, and mapping populations.<br> SGN users may upload <a href="/stock/0/new">new accessions or populations</a> using our web interface (you will be prompt to login first, and an SGN submitter account is required. Please <a href="mailto:sgn-feedback\@solgenomics.net">contact us</a> for for obtaining submitter privileges). <br/> For large datasets we accept batch submissions of files with the following details: <ul> <li>Description of your population</li> <li>Organism</li> <li>contact person (We will create a new submitter account for you if you do not have one already)</li> </ul> <pre> <b>accession_id description</b> accession1 free-text description of the phenotype accession2 description goes here . . </pre> We will upload your accessions and have the contact person assigned as the owner of all information.<br><br> You may also submit any number of images for each one of your accession. Images can be added or deleted from the database at any time. For a large number of images please <a href="mailto:sgn-feedback\@solgenomics.net">contact us</a> for mailing a CD or uploading your images to the SGN ftp site. If your filenames do not include the accession name (usually as a prefix, e.g. myAccession1_leaf.jpg) We also require a file with information on your images: <pre> filename1 accession1 filename2 accession1 filename3 accession2 . . . </pre> If you have used <a href="/tools/onto/">'Solanaceae Phenotype'</a> terms for describing your accessions you can submit the annotation in the following format: <pre> accession1 SP000000X accession1 SP000000Y accession1 SP00000ZZ accession2 SP00000XY . . . </pre> <b>We will gladly add information and features to the phenotype database <a href="mailto:sgn-feedback\@solgenomics.net">upon request!</a> </b> END_HEREDOC $page->footer();
solgenomics/sgn
cgi-bin/content/phenotype_submissions.pl
Perl
mit
2,428
#! /usr/bin/perl use Cwd; use List::Util qw(first); use Getopt::Long; use Term::ANSIColor; use FindBin; sub ProkkaPrep_faa { my $home = $_[0]; chdir($home); $home = getcwd; #if the user enters './' as a dir this will solve issues chdir($home); my @prokka_files = glob "*.faa"; system("mkdir PROKKA_backups"); foreach(@prokka_files){ my $Genome = $_; $Genome =~ s{\.[^.]+$}{}; #strip .ffn open(CHECK,"<$Genome.faa") or die print "\n\nERROR\n\nCannot open $Genome.faa"; my $firstLine = <CHECK>; my @split = split(/\|/,$firstLine); if($split[0] ne ">gi" && $split[2] ne "ref" && $split2[1] ne "\[$Genome\]") { open(IN, "<$_") or die; open(OUT,">$Genome.mod.faa") or die; while(<IN>){ chomp(); my $line = $_; if($_ =~ m/>/){ my @split = split(/\_/,$line); my @split2 = split(" ",$split[1]); my $prokka_id = $Genome . "_" . $split2[0]; my $new = ">gi|$prokka_id|ref|1234| $prokka_id "."[$Genome]"; print OUT $new . "\n"; }#end if else{print OUT $line . "\n";} }#end while IN close(IN); close(OUT); close(CHECK); system("mv $Genome.faa ./PROKKA_backups/$Genome.orig.faa"); system("mv $Genome.mod.faa $Genome.faa"); }#end if }#end foreach }#end ProkkaPrep_faa sub AllvsAll_uSearch { my $home = $_[0]; chdir($home); $home = getcwd; #if the user enters './' as a dir this will solve issues chdir($home); my $id = $_[1]; my $plen = $_[2]; my $threads = $_[3]; $Program_dir = "$FindBin::RealBin/Support"; #Get Protein List #system("vsearch --allpairs_global AllProteinList.all --self --userout AllProteinList.vsearch --id 0.80 --minqt 0.9 --strand both --userfields query+target+qs+tl+alnlen+ids+qstrand+tstrand"); #system("usearch -sortbylength AllProteinList.all -fastaout AllProteinList.all.uready"); #system("usearch -cluster_smallmem AllProteinList.all.uready -id 0.70 -userout AllProteinList.all.cluster -userfields query+target+qs+tl+alnlen+ids"); #system("usearch -allpairs_global AllProteinList.all.uready -id 0.70 -userout AllProteinList.all.cluster -userfields query+target+qs+tl+alnlen+ids"); system("perl $Program_dir/Usearch_copy_remover.pl $threads"); system("perl $Program_dir/Parallel_usearch.pl $id $threads"); my @comb = glob("*.comb"); unlink @comb; system("touch AllProteinList.all.cluster"); open(USEARCH,">>AllProteinList.all.cluster") or die print "Could not create AllProteinList.all.cluster\n"; my @usearch = glob("*.usearch"); foreach my $file (@usearch){ #print $_ . "\n\n"; if (open my $in, '<', $file){ while (my $line = <$in>){ print USEARCH $line; } close $in; } else{warn "Could not open '$file' for reading\n";} } close(USEARCH); #system("rm *.usearch"); my @refine = glob("*.refine*"); unlink @refine; open(IN, "<AllProteinList.all.cluster") or die print "Could not open AllProteinList.all.cluster\n"; open(OUT,">AllProteinList.all.cluster.fixed"); #Need to replace the second column with proper tags (i.e. gi|SI01_00001|ref|1234| SI01_00001 [SI01]) #Also will interchange the target and query columns! while(<IN>){ my $line = $_; my @split = split(/\t/,$line); my @tag = split(/\|/,$split[0]); my @strain = split(/\_/,$tag[1]); my $query = "$split[0] $tag[1] \[$strain[0]\]"; my $target = $split[1]; my $qlen = $split[3]; my $tlen = $split[2]; my $aln = $split[4]; my $ident = $split[5]; my $lenfilt; if($qlen >= $tlen){$lenfilt = $tlen/$qlen;} if($tlen > $qlen){$lenfilt = $qlen/$tlen;} ################################################################################ # Threshold Adjustment For Length Score!! # if($lenfilt >= $plen ){print OUT "$target\t$query\t$qlen\t$tlen\t$aln\t$ident";}# ################################################################################ }#end while(<IN>) close(IN); close(OUT); system("rm AllProteinList.all.cluster"); system("mv AllProteinList.all.cluster.fixed AllProteinList.all.cluster"); }#end AllvsAll_VSEARCH sub SortUSearch { my $home = $_[0]; my $threads = $_[1]; chdir($home); $home = getcwd; #if the user enters './' as a dir this will solve issues chdir($home); #Using the standard PERL Hash sort does not work for extremely large files system("sort --parallel=$threads -uo AllProteinList.all.cluster.sorted AllProteinList.all.cluster"); #open(US,"<AllProteinList.all.cluster") or die print "Could not open AllProteinList.all.cluster\n"; #open(OUT,">AllProteinList.all.cluster.sorted"); #Going to take the first two columns ($Query and $Target) and use them as key. #The value is going to be the entire line itslef. #my %SORT; #while(<US>){ # my $line = $_; # my @split = split(/\t/,$line); # my $key = $split[0] . $split[1]; # my $value = $line; # $SORT{$key}=$value; #}#end while #foreach(sort keys %SORT){ # print OUT $SORT{$_}; # }#end foreach # close(US); # close(OUT); } sub ParseBlast_USearch { my $ffn_dir = $_[2]; my $home = $_[0]; my $threads = $_[3]; chdir($home); $home = getcwd; #if the user enters './' as a dir this will solve issues chdir($home); open (ALL,"<AllProteinList.all") or die; my %PAN; #This will hold the entire PAN GENOME my %AllProteins; #Make a hash where the key is the GI SeqID and the value is the "NOT_YET" my %FULL_QUERY; #need a seperate hash for keys to hold the info for metadata my $key; #this will store the genome title my $value; my $count=0; #need a count to make sure I don't push nothing onto the hash while(<ALL>){ my $line = $_; if($line =~ m/>/){ my @split = split(/\|/,$line); my $gi = $split[1]; $AllProteins{$gi}="NOT_YET"; }#end count if }#end While ALL close(ALL); #Creates a hash of all the strain names open(STRAINS,"<$_[1]") or die; my %STRAINS; my $Hash_strain_size = keys %STRAINS; while(<STRAINS>){ chomp(); $STRAINS{$_}="NOT_DONE"; } close(STRAINS); #Start working on the PAN system("mkdir Pan_Genome"); open (ALL,"<AllProteinList.all.cluster.sorted") or die print "Cannot open AllProteinList.all.cluster.sorted\n"; my $previous; my $burned_GI; open(PAN,">$home/Pan_Genome/PanGenome.usearch"); while(<ALL>){ chomp(); my $line = $_; my @Tab_split = split(/\t/,$line); my @Query_split = split(/\|/,$Tab_split[0]); my $Query_GI = $Query_split[1]; #This will yield QueryGenome_##### my @Query_split = split(/\_/,$Query_GI); my $Query_strain = "\[$Query_split[0]\]"; my @Hit_split= split(/\|/,$Tab_split[1]); my $Hit_GI = $Hit_split[1]; #This will yield HitGenome_##### my $Hit_title = $Hit_split[4]; $Hit_title=~ s/\s//g; my @Hit_strain = split(/\[/,$Hit_title); my $Hit_strain = $Hit_strain[1]; #This will yield HitGenome #my $Qstrand = $Tab_split[6]; #my $Tstrand = $Tab_split[7]; chop($Hit_strain); my $Query_out = "\>$Query_GI\$$Query_GI$Query_strain"; my $Hit_out = ">$Hit_GI\$$Hit_title"; # >Genome_#####$Genome #print "Query_GI:$Query_GI\;Hit_GI:$Hit_GI\;Hit_title:$Hit_title\;Hit_out:$Hit_out"; #This first 'if' will only create a new file for the hits if its the first instance of the GI if($AllProteins{$Query_GI} ne "KEY" && $Hit_GI ne $Query){ $PAN{$Query_GI} .= "$Hit_out\t"; #concatenating multiple records onto one key $AllProteins{$Hit_GI} = "KEY"; #$FULL_QUERY{$Query_GI}="$Query_out\t"; }#end if if($Hit_GI eq $Query){ $PAN{$Query_GI} .= "$Hit_out\t"; #concatenating multiple records onto one key $AllProteins{$Hit_GI} = "KEY"; }#end if }#end while #open(OUT, ">HashTest") or die; #while (my ($key, $value) = each %AllProteins) { # print OUT "$key $value\n"; #}#end hash print While #close(OUT); foreach(sort keys %PAN) { print PAN $PAN{$_} . "\n"; } close(PAN); open(PAN,"<$home/Pan_Genome/PanGenome.usearch"); my %PAN; while(<PAN>){ chomp(); my $line = $_; my @split = split(/\t/,$line); my $length = length $PAN{$split[0]}; my $new; for(my $x=0; $x<= scalar @split; $x++){ if($PAN{$split[0]} && $length < scalar @split && $split[0] ne $split[$x]){ $new .= "$split[$x]\t"; } elsif($split[0] ne $split[$x]){ $new .= "$split[$x]\t"; } }#end foreach $PAN{$split[0]} = $new; $new=""; }#end while close(PAN); open(OUT, ">$home/Pan_Genome/PanGenome.usearch2") or die; while (my ($key, $value) = each %PAN) { print OUT "$key\t$value\n"; }#end hash print While close(OUT); #Need to get rid of extra \t and get rid of the doubling up of seq names and numbers between the $ open(PAN, "<$home/Pan_Genome/PanGenome.usearch2") or die; open(OUT, ">$home/Pan_Genome/PanGenome.usearch3") or die; while(<PAN>){ my $line = $_; my @split = split(/\t/,$line); foreach(@split){ my @split2 = split(/\$/,$_); my $length = length($split2[1]); if($length > 5){print OUT ">$split2[1]\t";} #this is to ensure I don't print extra '>' }#end foreach print OUT "\n"; }#end while close(OUT); close(PAN); system("rm $home/Pan_Genome/PanGenome.usearch"); system("rm $home/Pan_Genome/PanGenome.usearch2"); system("mv $home/Pan_Genome/PanGenome.usearch3 $home/Pan_Genome/PanGenome.usearch"); chdir("$home/Pan_Genome"); $Program_dir = "$FindBin::RealBin/Support"; system("perl $Program_dir/reFFNer_v3.pl ./PanGenome.usearch $ffn_dir $threads"); chdir($home); }#end sub ParseBlast sub Get_Core_Singletons { my $home = $_[0]; chdir($home); $home = getcwd; #if the user enters './' as a dir this will solve issues chdir($home); #Need to find out how many STRAINS there are: open(STRAINS,"<$_[1]") or die; $strain_count = 0; while(<STRAINS>){ $strain_count++; }#end while #print $strain_count . "\n"; close(STRAINS); system("mkdir Core_Genome"); system("mkdir Singletons"); #open the Pan Genome file open(PAN,"<$home/Pan_Genome/PanGenome.usearch") or die; open(CORE,">$home/Core_Genome/CoreGenome.usearch"); open(SINGLE,">$home/Singletons/Singletons.usearch") or die; while(<PAN>){ chomp(); #Need to chomp() twice to get rid of the \n chomp(); #and the extra \t my $line = $_; my @split_tab = split(/\t/,$line); #print scalar @split_tab . "\n"; if(scalar @split_tab == 1){print SINGLE "$line\n";} if(scalar @split_tab == $strain_count){print CORE "$line\n";} }#end while(<PAN>) close(CORE); close(PAN); close(SINGLE); }#end Get_Core #The user will input if they want the fastas of the Pan, Core or Singletons sub GetFaa{ my $home = $_[0]; chdir($home); $home = getcwd; #if the user enters './' as a dir this will solve issues chdir($home); my $choices_ref = shift; my $strains = shift; my @choices = @{$choices_ref}; my $strain_count; #This will help for getting the core genome open(STRAINS,"<$strains") or die; $strain_count = 0; while(<STRAINS>){ $strain_count++; }#end while #Going to store AllProteins.all in a hash. WIll make sure the key matches the #output from the PanGenome.usearch file open(AllP,"<AllProteinList.all") or die "\n\tCannot open AllProteinList.all\n"; my %AllProteins; my $title_key; my $seq_value; my $first = 0; while(<AllP>){ chomp(); my $line = $_; if($line =~ m/\>/){ if($first != 0){ $AllProteins{$title_key} = $seq_value; $seq_value=""; $title_key=""; } my @split = split(" ",$line); $title_key = ">$split[1]$split[2]"; $first=1; }#end if else{ $seq_value .= $line . "\n"; } #Need to hit the last one $AllProteins{$title_key} = $seq_value; }#end while(AllP) foreach(@choices){ #print $_ . "\n"; if($_ eq "Pan"){ chdir("Pan_Genome")or die "\n\tCan't find the Pan_Genome directory.\n\n"; system("mkdir Pan_Fastas"); open(PAN,"<PanGenome.usearch")or die "\n\tCan't open PanGenome.usearch\n\n"; while(<PAN>){ chomp(); my $line = $_; my @tab_split = split(/\t/,$line); my @split2 = split(/\[/,$tab_split[0]); my $out_file = $split2[0]; $out_file =~ s/\>//; open(OUT,">>./Pan_Fastas/$out_file.fasta"); foreach(@tab_split){ print OUT "$_\n$AllProteins{$_}";#Use the hash call to print to a file }#end foreach close(OUT); }#end while close(PAN); chdir($home); }#end if(PAN) elsif($_ eq "Core"){ chdir("Core_Genome")or die "\n\tCan't find the Core_Genome directory.\n\n"; system("mkdir Core_Fastas"); open(CORE,"<CoreGenome.usearch")or die "\n\tCan't open CoreGenome.usearch\n\n"; while(<CORE>){ chomp(); my $line = $_; my @tab_split = split(/\t/,$line); if(scalar @tab_split == $strain_count){ my @split2 = split(/\[/,$tab_split[0]); my $out_file = $split2[0]; $out_file =~ s/\>//; open(OUT,">>./Core_Fastas/$out_file.fasta"); foreach(@tab_split){ print OUT "$_\n$AllProteins{$_}";#Use the hash call to print to a file }#end foreach close(OUT); }#end if }#end while close(CORE); chdir($home); }#end elsif(CORE) elsif($_ eq "Singletons"){ chdir("Singletons")or die "\n\tCan't find the Pan_Genome directory.\n\n"; system("mkdir Singleton_Fastas"); open(SING,"<Singletons.usearch")or die "\n\tCan't open Singletons.usearch\n\n"; while(<SING>){ chomp(); my $line = $_; my @tab_split = split(/\t/,$line); if(scalar @tab_split == 1){ my @split2 = split(/\[/,$tab_split[0]); my $out_file = $split2[0]; $out_file =~ s/\>//; open(OUT,">>./Singleton_Fastas/$out_file.fasta"); foreach(@tab_split){ print OUT "$_\n$AllProteins{$_}";#Use the hash call to print to a file }#end foreach close(OUT); }#end if }#end while close(SING); chdir($home); }#end elsif(Singletons) }#end foreach }#sub GetFaa sub Core_Subset{ my $home = $_[0]; chdir($home); $home = getcwd; #if the user enters './' as a dir this will solve issues chdir($home); my $file = $_[1]; my @Subset; open(OUT,">$file.core.subset"); open(SUBSET,"<$file"); #Load the subset strains into an array while(<SUBSET>){ chomp(); push(@Subset,$_); }#end while(<SUBSET>) #foreach(@Subset){print $_ . "\n";} close(SUBSET); #Will be comparing arrays, always easier if sorted first my @sorted_subset = sort @Subset; my $subset_size = scalar @Subset; #Now need to open pan genome file and search each line for the subset open(PAN,"$home/Pan_Genome/PanGenome.usearch") or die "\n\n\tCould not open PanGenome.usearch file!\n"; while(<PAN>){ chomp(); my $line = $_; my @tab_split = split(/\t/,$line); my $line_size = scalar @tab_split; my $count = 0; if($subset_size == $line_size){ my @strains; foreach(@tab_split){ my @strain_split= split(/\[/,$_); my $strain = $strain_split[1]; $strain =~ s/\]//; #I now have the strain that is the [] #print "$strain\n"; push(@strains,$strain); }#end foreach my @sorted_strains = sort @strains; $count = 0; for(my $i=0; $i< $line_size; $i++){ if($sorted_strains[$i] eq $sorted_subset[$i]){$count++;} else{last;} }#end for #Here is where we have a subset found and now need to export the necessary info if($count == $subset_size){ print OUT "$line\n"; }#if($count == my $subset_size) }#end if($subset_size == $line_size) }#end while(<PAN>) close(PAN); close(OUT); }#end sub Core_Subset ######################################################################################################################## # MAKE SURE THERE ARE NO UNDERSCORES IN STRAIN NAMES ######################################################################################################################## ######################################################################################################################## sub MAIN{ #Read options into a hash my %options; GetOptions (\%options, "dir=s", "strains=s", "fasta=s", "core_subset=s", "ffn=s", "id=s", "plen=s", "threads=s", "only_get_fasta","help", "h"); if($options{'help'} || $options{'h'}){ print color ('bold'); print colored(['bright_red on_bright_yellow'], "\n\t", 'USAGE:'); print color ('reset'); print colored(['bright_red'], "\n\t", 'Please note: For the strain file, this is just a list of the strains.', "\n\t", 'Each strain is followed by a line break and no ".faa" file designation.'); print color ('bold'); print colored(['bright_red on_black'], "\n\n\t", 'Most basic run:'); print color ('reset'); print "\n\tHardCORE_usearch.pl "; print colored(['red on_bright_yellow'], '-dir'); print " /path/to/*.faa(s) "; print colored(['red on_bright_yellow'], '-strain'); print " user_strain_list_file\n\n"; exit; }#end if if($options{'dir'} && $options{'strains'} && $options{'ffn'} && $options{'id'} && $options{'plen'} && !$options{'only_get_fasta'} && !$options{'core_subset'}){ #Specifies the number of threads to be used throughout the analysis my $threads; if($options{'threads'}){$threads = $options{'threads'};} else{$threads=0;} my $dir = $options{'dir'}; my $strains = $options{'strains'}; my $ffn_dir = $options{'ffn'}; my $id = $options{'id'}; my $plen = $options{'plen'}; chdir($dir)or die "\n\tCan't find $dir\n\tIs it a valid directory with all your .faa files and strains file?\n\n"; ProkkaPrep_faa($dir); system("cat *.faa > AllProteinList.all"); #Making a global list of proteins print colored(['red on_bright_yellow'], "\n", 'At Usearch stage', "\n"); AllvsAll_uSearch($dir, $id, $plen, $threads); SortUSearch($dir,$threads); print color ('bold red'); print "\n" . "At parse stage" . "\n"; print color ('reset'); ParseBlast_USearch($dir,$strains,$ffn_dir,$threads); print color ('bold red'); print "\n" . "Generating Pan - Core - Singleton genome files" . "\n"; print color ('reset'); Get_Core_Singletons($dir,$strains); print color ('bold red'); chdir($dir); #my @refine = glob("*.refine*"); #unlink @refine; #system("rm *.refine*"); print "\n" . "All done basic run!" . "\n\n"; print color ('reset'); }#end if if($options{'fasta'} || $options{'only_get_fasta'}){ my $dir = $options{'dir'}; chdir($dir)or die "\n\tCan't find $dir\n\tIs it a valid directory with all your .faa files?\n\n"; if(lc $options{'fasta'} eq lc "Core"){ print color ('bold red'); print "\n\t" . "Gathering the fastas of all the CORE sequences.\n\n"; print color ('reset'); my @choice = "Core"; GetFaa(\@choice,$options{'strains'}); }#end if(Core) elsif(lc $options{'fasta'} eq lc "Pan"){ print color ('bold red'); print "\n\t" . "Gathering the fastas of all the PAN sequences.\n\n"; print color ('reset'); my @choice = "Pan"; GetFaa(\@choice,$options{'strains'}); }#end if(Pan) elsif(lc $options{'fasta'} eq lc "Singletons"){ print color ('bold red'); print "\n\t" . "Gathering the fastas of all the SINGLETON sequences.\n\n"; print color ('reset'); my @choice = "Singletons"; GetFaa(\@choice,$options{'strains'}); }#end if(Singletons) elsif(lc $options{'fasta'} eq lc "All"){ print color ('bold red'); print "\n\t" . "Gathering the fastas of all the CORE PAN and SINGLETON sequences.\n\n"; print color ('reset'); my @choice = ("Core", "Pan", "Singletons"); GetFaa(\@choice,$options{'strains'}); }#end elsif(ALL) else{ print color ('bold red'); print "\n\t" . "The "; print colored(['red on_bright_yellow'], '-fasta'); print color ('bold red'); print " option is required and must designate either Pan Core Singletons or All\n\n"; print color ('reset'); exit; }#end else }#end if($options{'fasta'}) if($options{'core_subset'} && $options{'dir'} && $options{'strains'}){ my $dir = $options{'dir'}; open(SUBSET,"<$options{'core_subset'}") or die "\n\n\tCannot open core_subset file. Must provide a file similar to STRAINS file that contains the desired subset.\n\n"; close(SUBSET); Core_Subset($dir,$options{'core_subset'}); }#end if($options{'core_subset'}) }#end MAIN MAIN(); exit;
Nicholas-Petronella/HardCORE-Genome-Suite
HardCORE_usearch_suite/HardCORE_usearch.pl
Perl
mit
19,875
use utf8; package MyApp::Schema::Result::Author; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE =head1 NAME MyApp::Schema::Result::Author =cut use strict; use warnings; use Moose; use MooseX::NonMoose; use MooseX::MarkAsMethods autoclean => 1; extends 'DBIx::Class::Core'; =head1 COMPONENTS LOADED =over 4 =item * L<DBIx::Class::InflateColumn::DateTime> =back =cut __PACKAGE__->load_components("InflateColumn::DateTime"); =head1 TABLE: C<author> =cut __PACKAGE__->table("author"); =head1 ACCESSORS =head2 id data_type: 'integer' is_auto_increment: 1 is_nullable: 0 =head2 first_name data_type: 'text' is_nullable: 1 =head2 last_name data_type: 'text' is_nullable: 1 =cut __PACKAGE__->add_columns( "id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "first_name", { data_type => "text", is_nullable => 1 }, "last_name", { data_type => "text", is_nullable => 1 }, ); =head1 PRIMARY KEY =over 4 =item * L</id> =back =cut __PACKAGE__->set_primary_key("id"); =head1 RELATIONS =head2 book_authors Type: has_many Related object: L<MyApp::Schema::Result::BookAuthor> =cut __PACKAGE__->has_many( "book_authors", "MyApp::Schema::Result::BookAuthor", { "foreign.author_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); =head2 books Type: many_to_many Composing rels: L</book_authors> -> book =cut __PACKAGE__->many_to_many("books", "book_authors", "book"); # Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-07-14 11:54:16 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jjySy/980fhmgj51SXmPIA __PACKAGE__->resultset_class('DBIx::Class::ResultSet::HashRef'); # You can replace this text with custom code or comments, and it will be preserved on regeneration __PACKAGE__->meta->make_immutable; 1;
jmcveigh/p5-catalyst-boilerplate
MyApp/lib/MyApp/Schema/Result/Author.pm
Perl
cc0-1.0
1,848
# Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use Bio::EnsEMBL::Compara::DBSQL::DBAdaptor my $host = 'ensembldb.ensembl.org'; my $user = 'anonymous'; my $port = 5306; my $dbname = 'ensembl_compara_51'; my $comparadb= new Bio::EnsEMBL::Compara::DBSQL::DBAdaptor( -host => $host, -port => $port, -user => $user, -dbname => $dbname, );
dbolser-ebi/ensembl-compara
docs/tutorial/examples/tut_registry3.pl
Perl
apache-2.0
971
# # Copyright 2019 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package network::mrv::optiswitch::snmp::plugin; use strict; use warnings; use base qw(centreon::plugins::script_snmp); sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $self->{version} = '1.0'; %{$self->{modes}} = ( 'cpu-detailed' => 'snmp_standard::mode::cpudetailed', 'environment' => 'network::mrv::optiswitch::snmp::mode::environment', 'interfaces' => 'network::mrv::optiswitch::snmp::mode::interfaces', 'list-interfaces' => 'network::mrv::optiswitch::snmp::mode::listinterfaces', 'load' => 'snmp_standard::mode::loadaverage', 'memory' => 'network::mrv::optiswitch::snmp::mode::memory', 'uptime' => 'snmp_standard::mode::uptime', ); return $self; } 1; __END__ =head1 PLUGIN DESCRIPTION Check MRV OptiSwitch equipments in SNMP. =cut
Sims24/centreon-plugins
network/mrv/optiswitch/snmp/plugin.pm
Perl
apache-2.0
1,719
# # Copyright 2018 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package centreon::common::bluearc::snmp::mode::components::psu; use strict; use warnings; my %map_status = ( 1 => 'ok', 2 => 'failed', 3 => 'notFitted', 4 => 'unknown', ); my $mapping = { psuStatus => { oid => '.1.3.6.1.4.1.11096.6.1.1.1.2.1.13.1.3', map => \%map_status }, }; my $oid_psuEntry = '.1.3.6.1.4.1.11096.6.1.1.1.2.1.13.1'; sub load { my ($self) = @_; push @{$self->{request}}, { oid => $oid_psuEntry }; } sub check { my ($self) = @_; $self->{output}->output_add(long_msg => "Checking power supplies"); $self->{components}->{psu} = {name => 'psus', total => 0, skip => 0}; return if ($self->check_filter(section => 'psu')); foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_psuEntry}})) { next if ($oid !~ /^$mapping->{psuStatus}->{oid}\.(.*)$/); my $instance = $1; my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_psuEntry}, instance => $instance); next if ($self->check_filter(section => 'psu', instance => $instance)); $self->{components}->{psu}->{total}++; $self->{output}->output_add(long_msg => sprintf("power supply '%s' status is '%s' [instance: %s].", $instance, $result->{psuStatus}, $instance )); my $exit = $self->get_severity(section => 'psu', value => $result->{psuStatus}); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, short_msg => sprintf("Power supply '%s' status is '%s'", $instance, $result->{psuStatus})); } } } 1;
wilfriedcomte/centreon-plugins
centreon/common/bluearc/snmp/mode/components/psu.pm
Perl
apache-2.0
2,629
# # Copyright 2022 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package hardware::server::hp::bladechassis::snmp::mode::components::fuse; use strict; use warnings; my %map_conditions = ( 1 => 'other', 2 => 'ok', 3 => 'degraded', 4 => 'failed', ); my %present_map = ( 1 => 'other', 2 => 'absent', 3 => 'present', 4 => 'Weird!!!', # for blades it can return 4, which is NOT spesified in MIB ); my $mapping = { fuse_name => { oid => '.1.3.6.1.4.1.232.22.2.3.1.4.1.4' }, # cpqRackCommonEnclosureFuseEnclosureName fuse_location => { oid => '.1.3.6.1.4.1.232.22.2.3.1.4.1.5' }, # cpqRackCommonEnclosureFuseLocation fuse_condition => { oid => '.1.3.6.1.4.1.232.22.2.3.1.4.1.7', map => \%map_conditions }, # cpqRackCommonEnclosureFuseCondition }; sub check { my ($self) = @_; $self->{components}->{fuse} = {name => 'fuses', total => 0, skip => 0}; $self->{output}->output_add(long_msg => "checking fuse"); return if ($self->check_filter(section => 'fuse')); my $oid_cpqRackCommonEnclosureFusePresent = '.1.3.6.1.4.1.232.22.2.3.1.4.1.6'; my $snmp_result = $self->{snmp}->get_table(oid => $oid_cpqRackCommonEnclosureFusePresent); return if (scalar(keys %$snmp_result) <= 0); my @get_oids = (); my @oids_end = (); foreach my $key ($self->{snmp}->oid_lex_sort(keys %$snmp_result)) { $key =~ /^$oid_cpqRackCommonEnclosureFusePresent\.(.*)$/; my $oid_end = $1; next if ($present_map{$snmp_result->{$key}} ne 'present' && $self->absent_problem(section => 'fuse', instance => $oid_end)); push @oids_end, $oid_end; push @get_oids, map($_->{oid} . '.' . $oid_end, values(%$mapping)); } $snmp_result = $self->{snmp}->get_leef(oids => \@get_oids); foreach (@oids_end) { my $fuse_index = $_; my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $fuse_index); next if ($self->check_filter(section => 'fuse', instance => $fuse_index)); $self->{components}->{fuse}->{total}++; $self->{output}->output_add(long_msg => sprintf("fuse '%s' status is %s [name: %s, location: %s].", $fuse_index, $result->{fuse_condition}, $result->{fuse_name}, $result->{fuse_location})); my $exit = $self->get_severity(label => 'default', section => 'fuse', instance => $fuse_index, value => $result->{fuse_condition}); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, short_msg => sprintf("Fuse '%s' status is %s", $fuse_index, $result->{fuse_condition})); } } } 1;
centreon/centreon-plugins
hardware/server/hp/bladechassis/snmp/mode/components/fuse.pm
Perl
apache-2.0
3,607
=head1 LICENSE See the NOTICE file distributed with this work for additional information regarding copyright ownership. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =head1 NAME Bio::EnsEMBL::Compara::Production::Analysis::Blastz =head1 SYNOPSIS open F,"blastz_output_file"; my $fh = \*F; my $BlastzParser = new Bio::EnsEMBL::Compara::Production::Analysis::Blastz(-fh => $fh); or my $blastz_output_file = "blastz_output_file"; my $BlastzParser = new Bio::EnsEMBL::Compara::Production::Analysis::Blastz(-file => $blastz_output_file); while (defined (my $alignment = $BlastzParser->nextAlignment)) { print $alignment->percent_id," ",$alignment->score," ",$alignment->cigar_string,"\n"; print $alignment->start," ",$alignment->end," ",$alignment->strand,"\n"; print $alignment->hstart," ",$alignment->hend," ",$alignment->hstrand,"\n"; } close F; The constructor only need a filehandle opened on a blastz output file. nextAlignment method return a Bio::EnsEMBL::DnaDnaAlignFeature object corresponding to the next HSP-like alignment. =cut package Bio::EnsEMBL::Compara::Production::Analysis::Blastz; use warnings; use strict; use Bio::EnsEMBL::DnaDnaAlignFeature; use Bio::EnsEMBL::Utils::Argument qw(rearrange); sub new { my ($class,@args) = @_; my $self = bless {}, $class; $self->{'_fh'} = undef; # filehandle on results file $self->{'_file'} = undef; # path for a results file $self->{'_eof'} = 0; # indicate if end of file and fh closed $self->{'_parsing_initialized'} = 0; $self->{'_command_line'} = ""; $self->{'_matrix'} = ""; $self->{'_options'} = ""; $self->{'_alignment_reported_before'} = {}; my ($fh,$file) = rearrange([qw(FH FILE)], @args); if ((defined $fh && defined $file) || !(defined $fh || defined $file)){ $self->throw("Must pass in either fh or file argument"); } if (defined $fh) { $self->{'_fh'} = $fh; } else { $self->file($file); open my $fh, '<', $self->file; $self->{'_fh'} = $fh; } return $self->_initialize ? $self : undef; } sub _initialize { my ($self) = @_; return undef if ($self->eof); my $fh = $self->fh; my $initialized = 0; while (defined (my $line = <$fh>)) { $initialized = 1; next if ($line =~ /^\#:lav$/); last if ($line =~ /^\}$/); # d stanza if ($line =~ /^d\s\{$/) { my $command_line = <$fh>; chomp $line; $command_line =~ s/^\s+\"//; $self->command_line($command_line); next; } if ($line =~ /^.*,.*$/) { $line =~ s/\"//g; $self->options($self->options.$line); } else { $self->matrix($self->matrix.$line); } } return $self->_parsing_initialized( $initialized ); } =head2 nextAlignmemt Args : none Example : $alignment = $Blastz->nextAligment Descritpion : return the next HSP-like alignment Returntype : array of Bio::EnsEMBL::DnaDnaAlignFeature Exceptions : none Caller : general =cut sub nextAlignment { my ($self) = @_; return undef if ($self->eof); my $fh = $self->fh; my $l_line_fault = 0; while (defined (my $line = <$fh>)) { next if ($line =~ /^\#:lav$/); if ($line =~ /^\#:eof$/) { close $self->fh; $self->eof(1); return undef; } # s stanza : get there sequence length and strand if ($line =~ /^s\s+\{$/) { # on query $line = <$fh>; if ($line =~ /^\s*\"\S+\"\s+(\d+)\s+(\d+)\s+(\d+)\s+\d+$/) { my($start,$end,$strand) = ($1,$2,$3); $self->length($end-$start+1); $self->strand(1) if ($strand == 0); $self->strand(-1) if ($strand == 1); } # on database $line = <$fh>; if ($line =~ /^\s*\"\S+\"\s+(\d+)\s+(\d+)\s+(\d+)\s+\d+$/) { my($hstart,$hend,$hstrand) = ($1,$2,$3); $self->hlength($hend-$hstart+1); $self->hstrand(1) if ($hstrand == 0); $self->hstrand(-1) if ($hstrand == 1); } <$fh>; # skip } line next; } # h stanza : get there seqname and hseqname if ($line =~ /^h\s+\{$/) { # on query $line = <$fh>; if ($line =~ /^\s+\">(\S+)\s*.*\"$/) { my $seqname = $1; $self->seqname($seqname); } # on database $line = <$fh>; if ($line =~ /^\s+\">(\S+)\s*.*\"$/) { my $hseqname = $1; $self->hseqname($hseqname); } <$fh>; # skip } line next; } # a stanza : get there a alignment, with score, percent_id and positions if ($line =~ /^a\s+\{$/) { my ($score,$sum_match_bases,$sum_block_length) ; my @feature_pairs; while (defined ($line = <$fh>)) { last if ($line =~ /^\}$/); if ($line =~ /^\s+s\s+(\d+)$/) { $score = $1; next; } next if ($line =~ /^\s+b\s+\d+\s+\d+$/); next if ($line =~ /^\s+e\s+\d+\s+\d+$/); if ($line =~ /^\s+l\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)$/) { my ($start,$hstart,$end,$hend,$percid) = ($1,$2,$3,$4,$5); if ($start > $end || $hstart > $hend) { # this is a blastz bug that has been reported to the author. No bug fix yet, and # probably not for a long time # so in the meantime, a code hack tries to recover a well format alignment # see below $l_line_fault = 1; next; }; my $block_length = $end - $start + 1; $sum_match_bases += $percid*$block_length/100; $sum_block_length += $block_length; if ($self->strand == -1) { $start = $self->length - $end + 1; $end = $start + $block_length - 1; } if ($self->hstrand == -1) { $hstart = $self->hlength - $hend + 1; $hend = $hstart + $block_length - 1; } if (scalar @feature_pairs == 0 || $l_line_fault == 0) { $l_line_fault = 0; } if ($l_line_fault) { warn("Dealing with a faulty l line\n"); # code hack to fix faulty l lines where start>end or hstart>hend that are ignored. # We extend the previous gap-free piece until it hits the closest # query or target sequence in the next piece # The perc_id and score for this arranged featurepair will not be consistent # but then again, it is a bug in blastz not in the parser... my $f = pop @feature_pairs; my $diff; if ($self->strand == 1) { $diff = $start - $f->end - 1; } else { $diff = $f->start - $end - 1; } if ($self->hstrand == 1 && $diff > $hstart - $f->hend - 1) { $diff = $hstart - $f->hend - 1; } elsif ($diff > $f->hstart - $hend - 1) { $diff = $f->hstart - $hend - 1; } $f->end($f->end + $diff) if ($self->strand == 1); $f->start($f->start - $diff) if ($self->strand == -1); $f->hend($f->hend + $diff) if ($self->hstrand == 1); $f->hstart($f->hstart - $diff) if ($self->hstrand == -1); push @feature_pairs, $f; $l_line_fault = 0; } my $feature_pair = new Bio::EnsEMBL::FeaturePair; $feature_pair->seqname($self->seqname); $feature_pair->start($start); $feature_pair->end($end); $feature_pair->strand($self->strand); $feature_pair->hseqname($self->hseqname); $feature_pair->hstart($hstart); $feature_pair->hend($hend); $feature_pair->hstrand($self->hstrand); $feature_pair->score($score); push @feature_pairs,$feature_pair; } } # calculating the average of percentage identity over the whole HSP-like # not including indels,it probably should... my $average_pecent_id = int($sum_match_bases/$sum_block_length*100); foreach my $feature_pair (@feature_pairs) { $feature_pair->percent_id($average_pecent_id); } my $alignment = new Bio::EnsEMBL::DnaDnaAlignFeature(-features => \@feature_pairs, -align_type => 'ensembl'); my $key = ""; map {$key .= $alignment->$_ . "_"} qw(seqname start end strand hseqname hstart hend hstrand score cigar_string); if (defined $self->{'_alignment_reported_before'}{$key}) { next; } $self->{'_alignment_reported_before'}{$key} = 1; return $alignment; } } } =head2 fh Arg [1] : filehandle $filehandle (optional) Example : $Blastz->fh($filehandle) Descritpion : get/set the filehandle value and return it Returntype : filehandle Exceptions : thrown if $filehandle is not the GLOB reference Caller : general =cut sub fh { my ($self,$value) = @_; if(defined $value) { if (ref($value) eq "GLOB") { $self->{'_fh'} = $value; } else { $self->throw("value for fh method should be a filehandle\n"); } } return $self->{'_fh'}; } =head2 file Arg [1] : string $filename_path (optional) Example : $Blastz->file($filename_path) Descritpion : get/set the filename_path value and return it Returntype : string Exceptions : thrown if $filename_path is not found Caller : general =cut sub file { my ($self,$value) = @_; if(defined $value) { if (-e $value) { $self->{'_file'} = $value; } else { $self->throw("file $value not found\n"); } } return $self->{'_file'}; } sub eof { my ($self,$value) = @_; if(defined $value) { $self->{'_eof'} = $value; } return $self->{'_eof'}; } =head2 command_line Arg [1] : string $commandline (optional) command line used to obtain the blastz output which is parsed Example : $Blastz->commandline($commandline) Descritpion : get/set the commandline value and return it Returntype : string Exceptions : none Caller : general =cut sub command_line { my ($self,$value) = @_; if (defined $value) { $self->{'_command_line'} = $value; } return $self->{'_command_line'}; } =head2 matrix Arg [1] : string $matrix (optional) matrix used to obtain the blastz output which is parsed Example : $Blastz->matrix($matrix) Descritpion : get/set the matrix value and return it Returntype : string Exceptions : none Caller : general =cut sub matrix { my ($self,$value) = @_; if (defined $value) { $self->{'_matrix'} = $value; } return $self->{'_matrix'}; } =head2 options Arg [1] : string $options (optional) options used to obtain the blastz output which is parsed Example : $Blastz->options($options) Descritpion : get/set the options value and return it Returntype : string Exceptions : none Caller : general =cut sub options { my ($self,$value) = @_; if (defined $value) { $self->{'_options'} = $value; } return $self->{'_options'}; } sub _parsing_initialized { my ($self,$value) = @_; if (defined $value) { $self->{'_parsing_initialized'} = $value; } return $self->{'_parsing_initialized'}; } =head2 seqname Arg [1] : string $seqname (optional) name of the query sequence Example : $Blastz->seqname($seqname) Descritpion : get/set the seqname value and return it Returntype : string Exceptions : none Caller : general =cut sub seqname { my ($self,$value) = @_; if (defined $value) { $self->{'_seqname'} = $value; } return $self->{'_seqname'}; } =head2 hseqname Arg [1] : string $hseqname (optional) name of the database sequence Example : $Blastz->hseqname($hseqname) Descritpion : get/set the hseqname value and return it Returntype : string Exceptions : none Caller : general =cut sub hseqname { my ($self,$value) = @_; if (defined $value) { $self->{'_hseqname'} = $value; } return $self->{'_hseqname'}; } =head2 length Arg [1] : int $length (optional) sequence length of the query sequence Example : $Blastz->length($length) Descritpion : get/set the length value and return it Returntype : int Exceptions : none Caller : general =cut sub length { my ($self,$value) = @_; if (defined $value) { $self->{'_length'} = $value; } return $self->{'_length'}; } =head2 hlength Arg [1] : int $length (optional) sequence length of the database sequence Example : $Blastz->hlength($length) Descritpion : get/set the hlength value and return it Returntype : int Exceptions : none Caller : general =cut sub hlength { my ($self,$value) = @_; if (defined $value) { $self->{'_hlength'} = $value; } return $self->{'_hlength'}; } =head2 strand Arg [1] : int $strand (optional) strand of the query sequence Example : $Blastz->strand($strand) Descritpion : get/set the strand value and return it Returntype : int Exceptions : none Caller : general =cut sub strand { my ($self,$value) = @_; if (defined $value) { $self->{'_strand'} = $value; } return $self->{'_strand'}; } =head2 hstrand Arg [1] : int $strand (optional) strand of the query sequence Example : $Blastz->hstrand($strand) Descritpion : get/set the hstrand value and return it Returntype : int Exceptions : none Caller : general =cut sub hstrand { my ($self,$value) = @_; if (defined $value) { $self->{'_hstrand'} = $value; } return $self->{'_hstrand'}; } 1;
Ensembl/ensembl-compara
modules/Bio/EnsEMBL/Compara/Production/Analysis/Blastz.pm
Perl
apache-2.0
13,991
# # Copyright 2021 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package network::nokia::timos::snmp::mode::bgpusage; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use Digest::MD5 qw(md5_hex); use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); sub custom_status_output { my ($self, %options) = @_; my $msg = 'state : ' . $self->{result_values}->{state}; return $msg; } sub custom_status_calc { my ($self, %options) = @_; $self->{result_values}->{state} = $options{new_datas}->{$self->{instance} . '_state'}; $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; return 0; } sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'bgp', type => 1, cb_prefix_output => 'prefix_bgp_output', message_multiple => 'All BGP are ok' }, ]; $self->{maps_counters}->{bgp} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'state' }, { name => 'display' } ], closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, } }, { label => 'active-prefixes', set => { key_values => [ { name => 'active_prefixes' }, { name => 'display' } ], output_template => 'Active Prefixes : %s', perfdatas => [ { label => 'active_prefixes', value => 'active_prefixes', template => '%s', min => 0, label_extra_instance => 1, instance_use => 'display' }, ], } }, { label => 'sent-prefixes', set => { key_values => [ { name => 'sent_prefixes', diff => 1 }, { name => 'display' } ], output_template => 'Sent Prefixes : %s', perfdatas => [ { label => 'sent_prefixes', value => 'sent_prefixes', template => '%s', min => 0, label_extra_instance => 1, instance_use => 'display' }, ], } }, { label => 'received-prefixes', set => { key_values => [ { name => 'received_prefixes', diff => 1 }, { name => 'display' } ], output_template => 'Received Prefixes : %s', perfdatas => [ { label => 'received_prefixes', value => 'received_prefixes', template => '%s', min => 0, label_extra_instance => 1, instance_use => 'display' }, ], } }, ]; } sub prefix_bgp_output { my ($self, %options) = @_; return "BGP '" . $options{instance_value}->{display} . "' "; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1); bless $self, $class; $options{options}->add_options(arguments => { "filter-name:s" => { name => 'filter_name' }, "warning-status:s" => { name => 'warning_status', default => '' }, "critical-status:s" => { name => 'critical_status', default => '%{state} =~ /outOfService/' }, }); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); $self->change_macros(macros => ['warning_status', 'critical_status']); } my %map_status = (1 => 'unknown', 2 => 'inService', 3 => 'outOfService', 4 => 'transition', 5 => 'disabled', ); my $oid_vRtrName = '.1.3.6.1.4.1.6527.3.1.2.3.1.1.4'; my $mapping = { tBgpPeerNgDescription => { oid => '.1.3.6.1.4.1.6527.3.1.2.14.4.7.1.7' }, tBgpPeerNgOperStatus => { oid => '.1.3.6.1.4.1.6527.3.1.2.14.4.7.1.42', map => \%map_status }, tBgpPeerNgPeerAS4Byte => { oid => '.1.3.6.1.4.1.6527.3.1.2.14.4.7.1.66' }, tBgpPeerNgOperReceivedPrefixes => { oid => '.1.3.6.1.4.1.6527.3.1.2.14.4.8.1.5' }, tBgpPeerNgOperSentPrefixes => { oid => '.1.3.6.1.4.1.6527.3.1.2.14.4.8.1.6' }, tBgpPeerNgOperActivePrefixes => { oid => '.1.3.6.1.4.1.6527.3.1.2.14.4.8.1.7' }, }; sub manage_selection { my ($self, %options) = @_; my $snmp_result = $options{snmp}->get_multiple_table(oids => [ { oid => $oid_vRtrName }, { oid => $mapping->{tBgpPeerNgDescription}->{oid} }, { oid => $mapping->{tBgpPeerNgPeerAS4Byte}->{oid} }, ], return_type => 1, nothing_quit => 1); $self->{bgp} = {}; foreach my $oid (keys %$snmp_result) { next if ($oid !~ /^$mapping->{tBgpPeerNgPeerAS4Byte}->{oid}\.(\d+)\.(\d+)\.(.*)$/); my ($vrtr_id, $peer_type, $peer_addr) = ($1, $2, $3); my $vrtr_name = $snmp_result->{$oid_vRtrName . '.' . $vrtr_id}; my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $vrtr_id . '.' . $peer_type . '.' . $peer_addr); my $name = $vrtr_name . ':' . $peer_addr . ':' . $result->{tBgpPeerNgPeerAS4Byte} . ':' . $result->{tBgpPeerNgDescription}; if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' && $name !~ /$self->{option_results}->{filter_name}/) { $self->{output}->output_add(long_msg => "skipping '" . $name . "'.", debug => 1); next; } $self->{bgp}->{$vrtr_id . '.' . $peer_type . '.' . $peer_addr} = { display => $name }; } $options{snmp}->load(oids => [$mapping->{tBgpPeerNgOperReceivedPrefixes}->{oid}, $mapping->{tBgpPeerNgOperSentPrefixes}->{oid}, $mapping->{tBgpPeerNgOperActivePrefixes}->{oid}, $mapping->{tBgpPeerNgOperStatus}->{oid}], instances => [keys %{$self->{bgp}}], instance_regexp => '^(.*)$'); $snmp_result = $options{snmp}->get_leef(nothing_quit => 1); foreach (keys %{$self->{bgp}}) { my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $_); $self->{bgp}->{$_}->{sent_prefixes} = $result->{tBgpPeerNgOperSentPrefixes}; $self->{bgp}->{$_}->{active_prefixes} = $result->{tBgpPeerNgOperActivePrefixes}; $self->{bgp}->{$_}->{received_prefixes} = $result->{tBgpPeerNgOperReceivedPrefixes}; $self->{bgp}->{$_}->{state} = $result->{tBgpPeerNgOperStatus}; } if (scalar(keys %{$self->{bgp}}) <= 0) { $self->{output}->add_option_msg(short_msg => "No bgp found."); $self->{output}->option_exit(); } $self->{cache_name} = "nokia_timos_" . $options{snmp}->get_hostname() . '_' . $options{snmp}->get_port() . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{filter_name}) ? md5_hex($self->{option_results}->{filter_name}) : md5_hex('all')) . '_' . (defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all')); } 1; __END__ =head1 MODE Check BGP usage. =over 8 =item B<--warning-*> Threshold warning. Can be: 'active-prefixes', 'sent-prefixes', 'received-prefixes'. =item B<--critical-*> Threshold critical. Can be: 'active-prefixes', 'sent-prefixes', 'received-prefixes'. =item B<--warning-status> Set warning threshold for status. Can used special variables like: %{display}, %{state} =item B<--critical-status> Set critical threshold for status (Default: '%{state} =~ /outOfService/') Can used special variables like: %{display}, %{state} =item B<--filter-name> Filter by BGP name (can be a regexp). Syntax: VrtrName:peeraddr:peerAS:description =back =cut
Tpo76/centreon-plugins
network/nokia/timos/snmp/mode/bgpusage.pm
Perl
apache-2.0
8,854
package Google::Ads::AdWords::v201809::CurrencyCodeError; use strict; use warnings; __PACKAGE__->_set_element_form_qualified(1); sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201809' }; our $XML_ATTRIBUTE_CLASS; undef $XML_ATTRIBUTE_CLASS; sub __get_attr_class { return $XML_ATTRIBUTE_CLASS; } use base qw(Google::Ads::AdWords::v201809::ApiError); # Variety: sequence use Class::Std::Fast::Storable constructor => 'none'; use base qw(Google::Ads::SOAP::Typelib::ComplexType); { # BLOCK to scope variables my %fieldPath_of :ATTR(:get<fieldPath>); my %fieldPathElements_of :ATTR(:get<fieldPathElements>); my %trigger_of :ATTR(:get<trigger>); my %errorString_of :ATTR(:get<errorString>); my %ApiError__Type_of :ATTR(:get<ApiError__Type>); my %reason_of :ATTR(:get<reason>); __PACKAGE__->_factory( [ qw( fieldPath fieldPathElements trigger errorString ApiError__Type reason ) ], { 'fieldPath' => \%fieldPath_of, 'fieldPathElements' => \%fieldPathElements_of, 'trigger' => \%trigger_of, 'errorString' => \%errorString_of, 'ApiError__Type' => \%ApiError__Type_of, 'reason' => \%reason_of, }, { 'fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'fieldPathElements' => 'Google::Ads::AdWords::v201809::FieldPathElement', 'trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'ApiError__Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'reason' => 'Google::Ads::AdWords::v201809::CurrencyCodeError::Reason', }, { 'fieldPath' => 'fieldPath', 'fieldPathElements' => 'fieldPathElements', 'trigger' => 'trigger', 'errorString' => 'errorString', 'ApiError__Type' => 'ApiError.Type', 'reason' => 'reason', } ); } # end BLOCK 1; =pod =head1 NAME Google::Ads::AdWords::v201809::CurrencyCodeError =head1 DESCRIPTION Perl data type class for the XML Schema defined complexType CurrencyCodeError from the namespace https://adwords.google.com/api/adwords/cm/v201809. Errors for currency codes. =head2 PROPERTIES The following properties may be accessed using get_PROPERTY / set_PROPERTY methods: =over =item * reason =back =head1 METHODS =head2 new Constructor. The following data structure may be passed to new(): =head1 AUTHOR Generated by SOAP::WSDL =cut
googleads/googleads-perl-lib
lib/Google/Ads/AdWords/v201809/CurrencyCodeError.pm
Perl
apache-2.0
2,510
package Paws::CodeBuild::BuildPhase; use Moose; has Contexts => (is => 'ro', isa => 'ArrayRef[Paws::CodeBuild::PhaseContext]', request_name => 'contexts', traits => ['NameInRequest']); has DurationInSeconds => (is => 'ro', isa => 'Int', request_name => 'durationInSeconds', traits => ['NameInRequest']); has EndTime => (is => 'ro', isa => 'Str', request_name => 'endTime', traits => ['NameInRequest']); has PhaseStatus => (is => 'ro', isa => 'Str', request_name => 'phaseStatus', traits => ['NameInRequest']); has PhaseType => (is => 'ro', isa => 'Str', request_name => 'phaseType', traits => ['NameInRequest']); has StartTime => (is => 'ro', isa => 'Str', request_name => 'startTime', traits => ['NameInRequest']); 1; ### main pod documentation begin ### =head1 NAME Paws::CodeBuild::BuildPhase =head1 USAGE This class represents one of two things: =head3 Arguments in a call to a service Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. Each attribute should be used as a named argument in the calls that expect this type of object. As an example, if Att1 is expected to be a Paws::CodeBuild::BuildPhase object: $service_obj->Method(Att1 => { Contexts => $value, ..., StartTime => $value }); =head3 Results returned from an API call Use accessors for each attribute. If Att1 is expected to be an Paws::CodeBuild::BuildPhase object: $result = $service_obj->Method(...); $result->Att1->Contexts =head1 DESCRIPTION Information about a stage for a build. =head1 ATTRIBUTES =head2 Contexts => ArrayRef[L<Paws::CodeBuild::PhaseContext>] Additional information about a build phase, especially to help troubleshoot a failed build. =head2 DurationInSeconds => Int How long, in seconds, between the starting and ending times of the build's phase. =head2 EndTime => Str When the build phase ended, expressed in Unix time format. =head2 PhaseStatus => Str The current status of the build phase. Valid values include: =over =item * C<FAILED>: The build phase failed. =item * C<FAULT>: The build phase faulted. =item * C<IN_PROGRESS>: The build phase is still in progress. =item * C<STOPPED>: The build phase stopped. =item * C<SUCCEEDED>: The build phase succeeded. =item * C<TIMED_OUT>: The build phase timed out. =back =head2 PhaseType => Str The name of the build phase. Valid values include: =over =item * C<BUILD>: Core build activities typically occur in this build phase. =item * C<COMPLETED>: The build has been completed. =item * C<DOWNLOAD_SOURCE>: Source code is being downloaded in this build phase. =item * C<FINALIZING>: The build process is completing in this build phase. =item * C<INSTALL>: Installation activities typically occur in this build phase. =item * C<POST_BUILD>: Post-build activities typically occur in this build phase. =item * C<PRE_BUILD>: Pre-build activities typically occur in this build phase. =item * C<PROVISIONING>: The build environment is being set up. =item * C<SUBMITTED>: The build has been submitted. =item * C<UPLOAD_ARTIFACTS>: Build output artifacts are being uploaded to the output location. =back =head2 StartTime => Str When the build phase started, expressed in Unix time format. =head1 SEE ALSO This class forms part of L<Paws>, describing an object used in L<Paws::CodeBuild> =head1 BUGS and CONTRIBUTIONS The source code is located here: https://github.com/pplu/aws-sdk-perl Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues =cut
ioanrogers/aws-sdk-perl
auto-lib/Paws/CodeBuild/BuildPhase.pm
Perl
apache-2.0
3,559
package Paws::S3::GetBucketInventoryConfiguration; use Moose; has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1); has Id => (is => 'ro', isa => 'Str', query_name => 'id', traits => ['ParamInQuery'], required => 1); use MooseX::ClassAttribute; class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetBucketInventoryConfiguration'); class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}?inventory'); class_has _api_method => (isa => 'Str', is => 'ro', default => 'GET'); class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::S3::GetBucketInventoryConfigurationOutput'); class_has _result_key => (isa => 'Str', is => 'ro'); 1; ### main pod documentation begin ### =head1 NAME Paws::S3::GetBucketInventoryConfiguration - Arguments for method GetBucketInventoryConfiguration on Paws::S3 =head1 DESCRIPTION This class represents the parameters used for calling the method GetBucketInventoryConfiguration on the Amazon Simple Storage Service service. Use the attributes of this class as arguments to method GetBucketInventoryConfiguration. You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetBucketInventoryConfiguration. As an example: $service_obj->GetBucketInventoryConfiguration(Att1 => $value1, Att2 => $value2, ...); Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. =head1 ATTRIBUTES =head2 B<REQUIRED> Bucket => Str The name of the bucket containing the inventory configuration to retrieve. =head2 B<REQUIRED> Id => Str The ID used to identify the inventory configuration. =head1 SEE ALSO This class forms part of L<Paws>, documenting arguments for method GetBucketInventoryConfiguration in L<Paws::S3> =head1 BUGS and CONTRIBUTIONS The source code is located here: https://github.com/pplu/aws-sdk-perl Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues =cut
ioanrogers/aws-sdk-perl
auto-lib/Paws/S3/GetBucketInventoryConfiguration.pm
Perl
apache-2.0
2,184
#!/usr/bin/perl -w # # POD documentation #--------------------------------------------------------------------------- =pod BEGIN =head1 NAME htb.nbs.pl - =head1 SYNOPSIS htb.nbs.pl [-help] [-in input-file] [-out output-file] Options: -h (--help) brief help message -i (--in) input file -o (--out) output file =cut #### END of POD documentation. #--------------------------------------------------------------------------- use strict; use FindBin; use lib "$FindBin::Bin"; use Getopt::Long; use Pod::Usage; use Location; use Common; use Htb; use List::Util qw/min max sum/; use List::MoreUtils qw/first_index first_value insert_after apply indexes pairwise zip uniq/; my ($fi, $fo) = ('') x 2; my $help_flag; #--------------------------------- MAIN -----------------------------------# GetOptions( "help|h" => \$help_flag, "in|i=s" => \$fi, "out|o=s" => \$fo, ) or pod2usage(2); pod2usage(1) if $help_flag; pod2usage(2) if !$fi || !$fo; my $cary = [ ['P-loop', 26, 34], ['Kin-2' , 105, 112], ['RNBS-B', 132, 138], ['GLPL' , 193, 199] ]; open(my $fho, ">$fo") || die "cannot write $fo\n"; print $fho join("\t", qw/id size doms e domstr tag beg end/)."\n"; my $ti = readTable(-in=>$fi, -header=>1); for my $i (1..$ti->nofRow) { my ($id, $size, $doms, $e, $qb, $qe, $hb, $he, $qlocs, $hlocs) = $ti->row($i-1); my ($rql, $rhl) = (locStr2Ary($qlocs), locStr2Ary($hlocs)); my $ql = [ map {[$qb + $_->[0] - 1, $qb + $_->[1] - 1]} @$rql ]; my $hl = [ map {[$hb + $_->[0] - 1, $hb + $_->[1] - 1]} @$rhl ]; my $h = {}; my @ary; for (@$cary) { my ($dom, $db, $de) = @$_; my $shl = [[$db, $de]]; my ($lo, $olen) = posOvlp($shl, $hl); next if $olen / ($de-$db+1) < 0.6; ($db, $de) = @{$lo->[0]}; my ($pb, $pe) = map {coordTransform($_, $hl, "+", $ql, "+")} ($db, $de); $h->{$dom} = [$pb, $pe, $db, $de]; push @ary, [$dom, $pb, $pe, $db, $de]; } my ($tag, $tb, $te) = ("") x 3; if(exists($h->{"P-loop"}) && exists($h->{"GLPL"})) { $tag = 1; ($tb, $te) = ($h->{"P-loop"}->[0], $h->{"GLPL"}->[1]); if($tb >= $te) { print "$id suck\n".Dumper($ql, $hl, $h); } } my $str = join(" ", map {"$_->[0]\[$_->[1]-$_->[2]\]"} @ary); print $fho join("\t", $id, $size, $doms, $e, $str, $tag, $tb, $te)."\n"; } close $fho; __END__
orionzhou/rgeneclust
htb.nbs.pl
Perl
apache-2.0
2,355
package Paws::MobileHub::DescribeProject; use Moose; has ProjectId => (is => 'ro', isa => 'Str', traits => ['ParamInQuery'], query_name => 'projectId', required => 1); has SyncFromResources => (is => 'ro', isa => 'Bool', traits => ['ParamInQuery'], query_name => 'syncFromResources'); use MooseX::ClassAttribute; class_has _api_call => (isa => 'Str', is => 'ro', default => 'DescribeProject'); class_has _api_uri => (isa => 'Str', is => 'ro', default => '/project'); class_has _api_method => (isa => 'Str', is => 'ro', default => 'GET'); class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::MobileHub::DescribeProjectResult'); class_has _result_key => (isa => 'Str', is => 'ro'); 1; ### main pod documentation begin ### =head1 NAME Paws::MobileHub::DescribeProject - Arguments for method DescribeProject on Paws::MobileHub =head1 DESCRIPTION This class represents the parameters used for calling the method DescribeProject on the AWS Mobile service. Use the attributes of this class as arguments to method DescribeProject. You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DescribeProject. As an example: $service_obj->DescribeProject(Att1 => $value1, Att2 => $value2, ...); Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. =head1 ATTRIBUTES =head2 B<REQUIRED> ProjectId => Str Unique project identifier. =head2 SyncFromResources => Bool If set to true, causes AWS Mobile Hub to synchronize information from other services, e.g., update state of AWS CloudFormation stacks in the AWS Mobile Hub project. =head1 SEE ALSO This class forms part of L<Paws>, documenting arguments for method DescribeProject in L<Paws::MobileHub> =head1 BUGS and CONTRIBUTIONS The source code is located here: https://github.com/pplu/aws-sdk-perl Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues =cut
ioanrogers/aws-sdk-perl
auto-lib/Paws/MobileHub/DescribeProject.pm
Perl
apache-2.0
2,123
=head1 LICENSE # Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute # Copyright [2016-2022] EMBL-European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <http://lists.ensembl.org/mailman/listinfo/dev>. Questions may also be sent to the Ensembl help desk at <http://www.ensembl.org/Help/Contact>. =cut =head1 NAME Bio::EnsEMBL::Analysis::RunnableDB::ExonerateAlignFeature - =head1 SYNOPSIS my $clone = Bio::EnsEMBL::Analysis::RunnableDB::ExonerateAlignFeature->new( -db => $refdb, -analysis => $analysis_obj, ); $clone->fetch_input(); $clone->run(); $clone->write_output(); #writes to DB =head1 DESCRIPTION This object maps clone sequences to a genome, and writing the results as Features. =head1 METHODS =head1 APPENDIX =cut package Bio::EnsEMBL::Analysis::RunnableDB::ExonerateAlignFeature; use warnings ; use strict; use Bio::EnsEMBL::Utils::Exception qw(throw warning); use Bio::EnsEMBL::Analysis::RunnableDB::BaseGeneBuild; use Bio::EnsEMBL::Analysis::Runnable::ExonerateAlignFeature; use Bio::EnsEMBL::Analysis::Config::ExonerateAlignFeature; use vars qw(@ISA); @ISA = qw (Bio::EnsEMBL::Analysis::RunnableDB::BaseGeneBuild); ############################################################ sub new { my ( $class, @args ) = @_; my $self = $class->SUPER::new(@args); #Because we dont know whether the sort of adapter (compara, hive, core) #we'll be passed, it's better to just remake the core dbadaptor and #keep it on ourselves as the dna db - this has to be the intent of the #dataadaptor input through the rulemanager / beekeeper / whatever $self->read_and_check_config($EXONERATE_ALIGNFEAT_CONFIG); return $self; } sub fetch_input { my ($self) = @_; my $logic = $self->analysis->logic_name; ########################################## # set up the target (genome) ########################################## my $target = $self->GENOMICSEQS; my $query = $self->QUERYSEQS; if ( -e $target ){ if(-d $target ) { warn ("Target $target is a directory of files\n"); }elsif (-s $target){ warn ("Target $target is a whole-genome file\n"); }else{ throw("'$target' isn't a file or a directory?"); } } else { throw("'$target' could not be found"); } my $input_id ; if ( $self->input_id =~m/::/) { # the input_id consistrs of 2 parts : input_id and db suffix . # this is to divert the input into diffeent databases. ( $input_id, my $output_db_hkey ) = split/\:\:/,$self->input_id ; $self->OUT_DB($output_db_hkey) ; warning("Using input_id-method to set output-database " . $self->input_id(). " Output will be written to : $output_db_hkey\n"); }else { $input_id = $self->input_id; } my ($chunk_number, $chunk_total); if ( defined $self->EXTEND_QUERYSEQS_DIR_WITH_LOGIC_NAME && $self->EXTEND_QUERYSEQS_DIR_WITH_LOGIC_NAME == 1 ) { $query=~s/\/$//; $query.="/".$self->analysis->logic_name; } if (-e $query and -d $query) { # query seqs is a directory; input id will be a file in that directory $query = "$query/" . $input_id; if (not -e $query) { throw( "Query file '$query' does not exist'\n"); } } elsif (-e $query and -s $query) { # query seqs is a single file; input id will correspond to a chunk number my $iid_regexp = $self->IIDREGEXP; throw("When your input ids are not filenames, you must define ". "IIDREGEXP in config to enable inference of chunk number and total") if not defined $iid_regexp; ($chunk_number, $chunk_total) = $input_id =~ /$iid_regexp/; } else { throw("'$query' refers to something that could not be made sense of\n"); } ########################################## # setup the runnable ########################################## my %parameters = %{ $self->parameters_hash }; if (not exists( $parameters{-options} ) and defined $self->OPTIONS) { $parameters{-options} = $self->OPTIONS; } #print STDERR "PROGRAM FILE: ".$self->analysis->program_file."\n"; my $program = $self->PROGRAM; $program = $self->analysis->program_file if not defined $program; my $runnable = Bio::EnsEMBL::Analysis::Runnable::ExonerateAlignFeature->new( -analysis => $self->analysis, -program => $program, -query_type => $self->QUERYTYPE, -query_file => $query, -query_chunk_number => $chunk_number ? $chunk_number : undef, -query_chunk_total => $chunk_total ? $chunk_total : undef, -target_file => $target, %parameters, ); $self->runnable($runnable); } ############################################################ sub run { my ($self) = @_; throw("Can't run - no runnable objects") unless ( $self->runnable ); my ($runnable) = @{$self->runnable}; $runnable->run; my $features = $runnable->output; if ($self->filter) { $features = $self->filter->filter_results($features); } my $output_db = $self->create_output_db; $self->output_db($output_db) ; $self->process_features($features); # needs output db $self->output($features); } ############################################################ sub write_output { my ( $self, @output ) = @_; my $outdb = $self->output_db; my $fa = $outdb->get_DnaAlignFeatureAdaptor; my $nr_feat = 0; $outdb->disconnect_when_inactive(0); foreach my $f (@{$self->output}){ $nr_feat++; eval{ $fa->store($f); }; if ($@) { $self->throw("Unable to store clone feature!\n $@"); } } print "$nr_feat features written to " . $outdb->dbname . "\@" . $outdb->host()."\n"; $outdb->disconnect_when_inactive(1); } ############################################################ sub process_features { my ( $self, $flist,$output_db ) = @_; my $slice_adaptor = $self->output_db->get_SliceAdaptor; my %genome_slices; $self->output_db->disconnect_when_inactive(0); foreach my $f (@$flist) { $f->analysis( $self->analysis ); # get the slice based on the seqname stamped on in the runnable my $slice_id = $f->seqname; if ( not exists $genome_slices{$slice_id} ) { # assumes genome seqs were named in the Ensembl API Slice naming # convention, i.e. coord_syst:version:seq_reg_id:start:end:strand $genome_slices{$slice_id} = $slice_adaptor->fetch_by_name($slice_id); } my $slice = $genome_slices{$slice_id}; $f->slice($slice); } $self->output_db->disconnect_when_inactive(1); } sub create_output_db { my ($self) = @_; my $outdb; my $dnadb; if ( $self->OUTDB ) { if (ref($self->OUTDB) eq 'HASH') { $outdb = new Bio::EnsEMBL::DBSQL::DBAdaptor(%{ $self->OUTDB }); } else { $outdb = $self->get_dbadaptor($self->OUTDB); } } else { $outdb = $self->db; } $self->db->disconnect_when_inactive(1); # jhv removed return $outdb; } sub output_db { my ( $self,$arg ) = @_ ; if ( defined $arg && $arg->isa("Bio::EnsEMBL::DBSQL::DBAdaptor")) { $self->{'output_db'} = $arg ; } return $self->{'output_db'} ; } sub filter { my ($self, $val) = @_; if ($val) { $self->{_feature_filter} = $val; } return $self->{_feature_filter}; } ############################################################# # Declare and set up config variables ############################################################# sub read_and_check_config { my ($self, $hash) = @_; $self->SUPER::read_and_check_config($hash); ########## # CHECKS ########## my $logic = $self->analysis->logic_name; # check that compulsory options have values foreach my $config_var ( qw( QUERYSEQS QUERYTYPE GENOMICSEQS )){ if ( not defined $self->$config_var ){ throw("You must define $config_var in config for logic '$logic'"); } } # output db does not have to be defined, but if it is, it should be a hash if ($self->OUTDB && ref( $self->OUTDB ) ne "HASH") { warning("OUTDB in config for '$logic' must be a hash ref of db connection pars."); } if ($self->FILTER) { if (not ref($self->FILTER) eq "HASH" or not exists($self->FILTER->{OBJECT}) or not exists($self->FILTER->{PARAMETERS})) { throw("FILTER in config fo '$logic' must be a hash ref with elements:\n" . " OBJECT : qualified name of the filter module;\n" . " PARAMETERS : anonymous hash of parameters to pass to the filter"); } else { my $module = $self->FILTER->{OBJECT}; my $pars = $self->FILTER->{PARAMETERS}; (my $class = $module) =~ s/::/\//g; eval{ require "$class.pm"; }; throw("Couldn't require ".$class." ExonerateAlignFeature:require_module $@") if($@); $self->filter($module->new(-METHODS => $pars)); } } } sub QUERYSEQS { my ( $self, $value ) = @_; if ( defined $value ) { $self->{'_CONFIG_QUERYSEQS'} = $value; } if ( exists( $self->{'_CONFIG_QUERYSEQS'} ) ) { return $self->{'_CONFIG_QUERYSEQS'}; } else { return undef; } } sub EXTEND_QUERYSEQS_DIR_WITH_LOGIC_NAME { my ( $self, $value ) = @_; if ( defined $value ) { $self->{'_CONFIG_EXTEND_QUERYSEQS_DIR_WITH_LOGIC_NAME'} = $value; } if ( exists( $self->{'_CONFIG_EXTEND_QUERYSEQS_DIR_WITH_LOGIC_NAME'} ) ) { return $self->{'_CONFIG_EXTEND_QUERYSEQS_DIR_WITH_LOGIC_NAME'}; } else { return undef; } } sub QUERYTYPE { my ( $self, $value ) = @_; if ( defined $value ) { $self->{'_CONFIG_QUERYTYPE'} = $value; } if ( exists( $self->{'_CONFIG_QUERYTYPE'} ) ) { return $self->{'_CONFIG_QUERYTYPE'}; } else { return 'dna'; } } sub GENOMICSEQS { my ( $self, $value ) = @_; if ( defined $value ) { $self->{'_CONFIG_GENOMICSEQS'} = $value; } if ( exists( $self->{'_CONFIG_GENOMICSEQS'} ) ) { return $self->{'_CONFIG_GENOMICSEQS'}; } else { return undef; } } sub IIDREGEXP { my ( $self, $value ) = @_; if ( defined $value ) { $self->{'_CONFIG_IIDREGEXP'} = $value; } if ( exists( $self->{'_CONFIG_IIDREGEXP'} ) ) { return $self->{'_CONFIG_IIDREGEXP'}; } else { return undef; } } sub FILTER { my ($self,$value) = @_; if (defined $value) { $self->{'_CONFIG_FILTER'} = $value; } if (exists($self->{'_CONFIG_FILTER'})) { return $self->{'_CONFIG_FILTER'}; } else { return undef; } } sub OUTDB { my ( $self, $value ) = @_; if ( defined $value ) { $self->{'_CONFIG_OUTDB'} = $value; } if ( exists( $self->{'_CONFIG_OUTDB'} ) ) { return $self->{'_CONFIG_OUTDB'}; } else { return undef; } } sub OPTIONS { my ( $self, $value ) = @_; if ( defined $value ) { $self->{'_CONFIG_OPTIONS'} = $value; } if ( exists( $self->{'_CONFIG_OPTIONS'} ) ) { return $self->{'_CONFIG_OPTIONS'}; } else { return undef; } } sub PROGRAM { my ( $self, $value ) = @_; if ( defined $value ) { $self->{'_CONFIG_PROGRAM'} = $value; } if ( exists( $self->{'_CONFIG_PROGRAM'} ) ) { return $self->{'_CONFIG_PROGRAM'}; } else { return undef; } } ############################################### ### end of config ############################################### 1;
Ensembl/ensembl-analysis
modules/Bio/EnsEMBL/Analysis/RunnableDB/ExonerateAlignFeature.pm
Perl
apache-2.0
11,971
#!/usr/bin/perl -w use strict; use SequenceBasics qw(read_fasta_into_hash); # Pre: # CCS95 fasta # Pre-LSC fasta sub75_ccs90-95 # LSC-swapped fasta if(scalar(@ARGV) != 3) { die "./assemble_fusion_set.pl <ccs95 fasta> <pre-lsc fasta> <lsc swapped fasta>\n"; } my $ccs95file = shift @ARGV; my $prelscfile = shift @ARGV; my $swappedfastafile = shift @ARGV; my $swapped = read_fasta_into_hash($swappedfastafile); my %bases; foreach my $name (keys %{$swapped}) { my $base; if($name=~/^([^\/]+\/\d+)/) { $base = $1; } else { die; } $bases{$base} = 1; print ">$name\n$swapped->{$name}\n"; } my $prelsc = read_fasta_into_hash($prelscfile); foreach my $name (keys %{$prelsc}) { my $base; if($name=~/^([^\/]+\/\d+)/) { $base = $1; } else { die; } if(!exists($bases{$base})) { print ">$name\n$prelsc->{$name}\n"; } } my $ccs95 = read_fasta_into_hash($ccs95file); foreach my $name (keys %{$ccs95}) { print ">$name\n$ccs95->{$name}\n"; }
jason-weirather/Au-public
iron/utilities/assemble_IDP-fusion_read_set.pl
Perl
apache-2.0
979
use Parse::DebControl; $parser = new Parse::DebControl; %options = ( type => 'debian/control', stripComments => 'true', ); $data = $parser->parse_file($ARGV[0], \%options); foreach my $a (@$data) { next if exists $a->{"Source"}; print ${a}->{"Package"}."\n"; }
SergK/fuel-main
packages/deb/genpkgnames.pl
Perl
apache-2.0
289
package Bio::EnsEMBL::Funcgen::PipeConfig::PeakCalling::ConvertSignalToBed; use strict; use warnings; use base 'Bio::EnsEMBL::Funcgen::PipeConfig::PeakCalling::Base'; use Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf; sub pipeline_analyses { my $self = shift; return [ { -logic_name => 'start_convert_to_bed', -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy', -flow_into => { 'MAIN->A' => 'convert_to_bed_multiplex', 'A->MAIN' => 'done_convert_signal_to_bed', }, }, { -logic_name => 'convert_to_bed_multiplex', -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy', -flow_into => { MAIN => [ 'convert_signal_to_bed', 'convert_control_to_bed', ] }, }, { -logic_name => 'convert_signal_to_bed', -parameters => { convert_controls => 0, }, -module => 'Bio::EnsEMBL::Funcgen::RunnableDB::PeakCalling::ConvertBamToBed', # -flow_into => { # MEMLIMIT => 'convert_signal_to_bed_himem', # }, }, { -logic_name => 'convert_control_to_bed', -parameters => { convert_controls => 1, }, -module => 'Bio::EnsEMBL::Funcgen::RunnableDB::PeakCalling::ConvertBamToBed', }, # { -logic_name => 'convert_signal_to_bed_himem', # -parameters => { # convert_controls => 0, # }, # -rc_name => '8Gb_job', # -module => 'Bio::EnsEMBL::Funcgen::RunnableDB::PeakCalling::ConvertBamToBed', # }, { -logic_name => 'done_convert_signal_to_bed', -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy', }, ]; } 1;
Ensembl/ensembl-funcgen
modules/Bio/EnsEMBL/Funcgen/PipeConfig/PeakCalling/ConvertSignalToBed.pm
Perl
apache-2.0
1,915
package VMOMI::VirtualDiskDeltaDiskFormat; use parent 'VMOMI::SimpleType'; use strict; use warnings; 1;
stumpr/p5-vmomi
lib/VMOMI/VirtualDiskDeltaDiskFormat.pm
Perl
apache-2.0
106
# Copyright 2016, Mitchell Cooper package F::NamedPair; use warnings; use strict; use parent qw(F::Node); sub desc { my $pair = shift; return "pair '$$pair{key}'"; } sub key_name { shift->{key} } sub value { shift->first_child } 1
cooper/ferret
lib/F/NamedPair.pm
Perl
bsd-3-clause
246
########################################################################### # # This file is partially auto-generated by the DateTime::Locale generator # tools (v0.10). This code generator comes with the DateTime::Locale # distribution in the tools/ directory, and is called generate-modules. # # This file was generated from the CLDR JSON locale data. See the LICENSE.cldr # file included in this distribution for license details. # # Do not edit this file directly unless you are sure the part you are editing # is not created by the generator. # ########################################################################### =pod =encoding UTF-8 =head1 NAME DateTime::Locale::en_AU - Locale data examples for the en-AU locale. =head1 DESCRIPTION This pod file contains examples of the locale data available for the English Australia locale. =head2 Days =head3 Wide (format) Monday Tuesday Wednesday Thursday Friday Saturday Sunday =head3 Abbreviated (format) Mon. Tue. Wed. Thu. Fri. Sat. Sun. =head3 Narrow (format) M. Tu. W. Th. F. Sa. Su. =head3 Wide (stand-alone) Monday Tuesday Wednesday Thursday Friday Saturday Sunday =head3 Abbreviated (stand-alone) Mon. Tue. Wed. Thu. Fri. Sat. Sun. =head3 Narrow (stand-alone) M. Tu. W. Th. F. Sa. Su. =head2 Months =head3 Wide (format) January February March April May June July August September October November December =head3 Abbreviated (format) Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec. =head3 Narrow (format) Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec. =head3 Wide (stand-alone) January February March April May June July August September October November December =head3 Abbreviated (stand-alone) Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec. =head3 Narrow (stand-alone) Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec. =head2 Quarters =head3 Wide (format) 1st quarter 2nd quarter 3rd quarter 4th quarter =head3 Abbreviated (format) Q1 Q2 Q3 Q4 =head3 Narrow (format) 1 2 3 4 =head3 Wide (stand-alone) 1st quarter 2nd quarter 3rd quarter 4th quarter =head3 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 =head3 Narrow (stand-alone) 1 2 3 4 =head2 Eras =head3 Wide (format) Before Christ Anno Domini =head3 Abbreviated (format) BC AD =head3 Narrow (format) B A =head2 Date Formats =head3 Full 2008-02-05T18:30:30 = Tuesday, 5 February 2008 1995-12-22T09:05:02 = Friday, 22 December 1995 -0010-09-15T04:44:23 = Saturday, 15 September -10 =head3 Long 2008-02-05T18:30:30 = 5February,2008 1995-12-22T09:05:02 = 22December,1995 -0010-09-15T04:44:23 = 15September,-10 =head3 Medium 2008-02-05T18:30:30 = 5Feb.,2008 1995-12-22T09:05:02 = 22Dec.,1995 -0010-09-15T04:44:23 = 15Sep.,-10 =head3 Short 2008-02-05T18:30:30 = 5/2/08 1995-12-22T09:05:02 = 22/12/95 -0010-09-15T04:44:23 = 15/9/-10 =head2 Time Formats =head3 Full 2008-02-05T18:30:30 = 6:30:30 pm UTC 1995-12-22T09:05:02 = 9:05:02 am UTC -0010-09-15T04:44:23 = 4:44:23 am UTC =head3 Long 2008-02-05T18:30:30 = 6:30:30 pm UTC 1995-12-22T09:05:02 = 9:05:02 am UTC -0010-09-15T04:44:23 = 4:44:23 am UTC =head3 Medium 2008-02-05T18:30:30 = 6:30:30 pm 1995-12-22T09:05:02 = 9:05:02 am -0010-09-15T04:44:23 = 4:44:23 am =head3 Short 2008-02-05T18:30:30 = 6:30 pm 1995-12-22T09:05:02 = 9:05 am -0010-09-15T04:44:23 = 4:44 am =head2 Datetime Formats =head3 Full 2008-02-05T18:30:30 = Tuesday, 5 February 2008 at 6:30:30 pm UTC 1995-12-22T09:05:02 = Friday, 22 December 1995 at 9:05:02 am UTC -0010-09-15T04:44:23 = Saturday, 15 September -10 at 4:44:23 am UTC =head3 Long 2008-02-05T18:30:30 = 5February,2008 at 6:30:30 pm UTC 1995-12-22T09:05:02 = 22December,1995 at 9:05:02 am UTC -0010-09-15T04:44:23 = 15September,-10 at 4:44:23 am UTC =head3 Medium 2008-02-05T18:30:30 = 5Feb.,2008, 6:30:30 pm 1995-12-22T09:05:02 = 22Dec.,1995, 9:05:02 am -0010-09-15T04:44:23 = 15Sep.,-10, 4:44:23 am =head3 Short 2008-02-05T18:30:30 = 5/2/08, 6:30 pm 1995-12-22T09:05:02 = 22/12/95, 9:05 am -0010-09-15T04:44:23 = 15/9/-10, 4:44 am =head2 Available Formats =head3 E (ccc) 2008-02-05T18:30:30 = Tue. 1995-12-22T09:05:02 = Fri. -0010-09-15T04:44:23 = Sat. =head3 EHm (E HH:mm) 2008-02-05T18:30:30 = Tue. 18:30 1995-12-22T09:05:02 = Fri. 09:05 -0010-09-15T04:44:23 = Sat. 04:44 =head3 EHms (E HH:mm:ss) 2008-02-05T18:30:30 = Tue. 18:30:30 1995-12-22T09:05:02 = Fri. 09:05:02 -0010-09-15T04:44:23 = Sat. 04:44:23 =head3 Ed (E d) 2008-02-05T18:30:30 = Tue. 5 1995-12-22T09:05:02 = Fri. 22 -0010-09-15T04:44:23 = Sat. 15 =head3 Ehm (E h:mm a) 2008-02-05T18:30:30 = Tue. 6:30 pm 1995-12-22T09:05:02 = Fri. 9:05 am -0010-09-15T04:44:23 = Sat. 4:44 am =head3 Ehms (E h:mm:ss a) 2008-02-05T18:30:30 = Tue. 6:30:30 pm 1995-12-22T09:05:02 = Fri. 9:05:02 am -0010-09-15T04:44:23 = Sat. 4:44:23 am =head3 Gy (y G) 2008-02-05T18:30:30 = 2008 AD 1995-12-22T09:05:02 = 1995 AD -0010-09-15T04:44:23 = -10 BC =head3 GyMMM (MMM y G) 2008-02-05T18:30:30 = Feb. 2008 AD 1995-12-22T09:05:02 = Dec. 1995 AD -0010-09-15T04:44:23 = Sep. -10 BC =head3 GyMMMEd (E, d MMM y G) 2008-02-05T18:30:30 = Tue., 5 Feb. 2008 AD 1995-12-22T09:05:02 = Fri., 22 Dec. 1995 AD -0010-09-15T04:44:23 = Sat., 15 Sep. -10 BC =head3 GyMMMd (d MMM y G) 2008-02-05T18:30:30 = 5 Feb. 2008 AD 1995-12-22T09:05:02 = 22 Dec. 1995 AD -0010-09-15T04:44:23 = 15 Sep. -10 BC =head3 H (HH) 2008-02-05T18:30:30 = 18 1995-12-22T09:05:02 = 09 -0010-09-15T04:44:23 = 04 =head3 Hm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 =head3 Hms (HH:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 =head3 Hmsv (HH:mm:ss v) 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC =head3 Hmv (HH:mm v) 2008-02-05T18:30:30 = 18:30 UTC 1995-12-22T09:05:02 = 09:05 UTC -0010-09-15T04:44:23 = 04:44 UTC =head3 M (LL) 2008-02-05T18:30:30 = 02 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 09 =head3 MEd (E, dd/MM) 2008-02-05T18:30:30 = Tue., 05/02 1995-12-22T09:05:02 = Fri., 22/12 -0010-09-15T04:44:23 = Sat., 15/09 =head3 MMM (LLL) 2008-02-05T18:30:30 = Feb. 1995-12-22T09:05:02 = Dec. -0010-09-15T04:44:23 = Sep. =head3 MMMEd (E, d MMM) 2008-02-05T18:30:30 = Tue., 5 Feb. 1995-12-22T09:05:02 = Fri., 22 Dec. -0010-09-15T04:44:23 = Sat., 15 Sep. =head3 MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 February 1995-12-22T09:05:02 = 22 December -0010-09-15T04:44:23 = 15 September =head3 MMMd (d MMM) 2008-02-05T18:30:30 = 5 Feb. 1995-12-22T09:05:02 = 22 Dec. -0010-09-15T04:44:23 = 15 Sep. =head3 MMdd (dd/MM) 2008-02-05T18:30:30 = 05/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 =head3 Md (dd/MM) 2008-02-05T18:30:30 = 05/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 =head3 d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 =head3 h (h a) 2008-02-05T18:30:30 = 6 pm 1995-12-22T09:05:02 = 9 am -0010-09-15T04:44:23 = 4 am =head3 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 pm 1995-12-22T09:05:02 = 9:05 am -0010-09-15T04:44:23 = 4:44 am =head3 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 pm 1995-12-22T09:05:02 = 9:05:02 am -0010-09-15T04:44:23 = 4:44:23 am =head3 hmsv (h:mm:ss a v) 2008-02-05T18:30:30 = 6:30:30 pm UTC 1995-12-22T09:05:02 = 9:05:02 am UTC -0010-09-15T04:44:23 = 4:44:23 am UTC =head3 hmv (h:mm a v) 2008-02-05T18:30:30 = 6:30 pm UTC 1995-12-22T09:05:02 = 9:05 am UTC -0010-09-15T04:44:23 = 4:44 am UTC =head3 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 =head3 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 =head3 yM (MM/y) 2008-02-05T18:30:30 = 02/2008 1995-12-22T09:05:02 = 12/1995 -0010-09-15T04:44:23 = 09/-10 =head3 yMEd (E, dd/MM/y) 2008-02-05T18:30:30 = Tue., 05/02/2008 1995-12-22T09:05:02 = Fri., 22/12/1995 -0010-09-15T04:44:23 = Sat., 15/09/-10 =head3 yMMM (MMM y) 2008-02-05T18:30:30 = Feb. 2008 1995-12-22T09:05:02 = Dec. 1995 -0010-09-15T04:44:23 = Sep. -10 =head3 yMMMEd (E, d MMM,y) 2008-02-05T18:30:30 = Tue., 5 Feb.,2008 1995-12-22T09:05:02 = Fri., 22 Dec.,1995 -0010-09-15T04:44:23 = Sat., 15 Sep.,-10 =head3 yMMMM (MMMM y) 2008-02-05T18:30:30 = February 2008 1995-12-22T09:05:02 = December 1995 -0010-09-15T04:44:23 = September -10 =head3 yMMMd (d MMM y) 2008-02-05T18:30:30 = 5 Feb. 2008 1995-12-22T09:05:02 = 22 Dec. 1995 -0010-09-15T04:44:23 = 15 Sep. -10 =head3 yMd (dd/MM/y) 2008-02-05T18:30:30 = 05/02/2008 1995-12-22T09:05:02 = 22/12/1995 -0010-09-15T04:44:23 = 15/09/-10 =head3 yQQQ (QQQ y) 2008-02-05T18:30:30 = Q1 2008 1995-12-22T09:05:02 = Q4 1995 -0010-09-15T04:44:23 = Q3 -10 =head3 yQQQQ (QQQQ y) 2008-02-05T18:30:30 = 1st quarter 2008 1995-12-22T09:05:02 = 4th quarter 1995 -0010-09-15T04:44:23 = 3rd quarter -10 =head2 Miscellaneous =head3 Prefers 24 hour time? No =head3 Local first day of the week 1 (Monday) =head1 SUPPORT See L<DateTime::Locale>. =cut
jkb78/extrajnm
local/lib/perl5/DateTime/Locale/en_AU.pod
Perl
mit
9,739
# # Copyright 2016 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package database::oracle::mode::corruptedblocks; use base qw(centreon::plugins::mode); use strict; use warnings; sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $self->{version} = '1.0'; $options{options}->add_options(arguments => { "warning:s" => { name => 'warning', }, "critical:s" => { name => 'critical', }, }); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'."); $self->{output}->option_exit(); } } sub run { my ($self, %options) = @_; # $options{sql} = sqlmode object $self->{sql} = $options{sql}; $self->{sql}->connect(); $self->{sql}->query(query => q{SELECT COUNT(*) FROM v$database_block_corruption}); my $corrupted_blocks = $self->{sql}->fetchrow_array(); my $exit_code = $self->{perfdata}->threshold_check(value => $corrupted_blocks, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); $self->{output}->output_add(severity => $exit_code, short_msg => sprintf("%i corrupted blocks.", $corrupted_blocks)); $self->{output}->perfdata_add(label => 'corrupted_blocks', value => $corrupted_blocks, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'), min => 0); $self->{output}->display(); $self->{output}->exit(); } 1; __END__ =head1 MODE Check Oracle corrupted blocks. =over 8 =item B<--warning> Threshold warning. =item B<--critical> Threshold critical. =back =cut
bcournaud/centreon-plugins
database/oracle/mode/corruptedblocks.pm
Perl
apache-2.0
3,314
#!/usr/bin/env perl use strict; use warnings; use FindBin qw($RealBin); use lib "$RealBin/../"; use JBlibs; use IO::Handle; use Pod::Usage; use Bio::JBrowse::JSON; @ARGV or pod2usage( -verbose => 2 ); # read in the JSON my $j = Bio::JBrowse::JSON->new->pretty; my $json_fh = @ARGV == 1 ? \*STDIN : do { my $file = shift @ARGV; open( my $fh, '<', $file ) or die "$! reading $file"; $fh }; my $track_data = $j->decode( do{ local $/; scalar <$json_fh> } ); # if it's a single definition, coerce to an array if( ref $track_data eq 'HASH' ) { $track_data = [ $track_data ]; } # validate the track JSON structure for my $def ( @$track_data ) { $def->{label} or die "invalid track JSON: missing a label element\n"; } # read and parse the target file my $target_file = shift @ARGV or pod2usage(); my $target_file_data = $j->decode_file( $target_file ); for my $def ( @$track_data ) { for( my $i = 0; $i < @{$target_file_data->{tracks}|| []}; $i++ ) { my $track = $target_file_data->{tracks}[$i]; if( $track->{label} eq $def->{label} ) { $target_file_data->{tracks}[$i] = $def; undef $def; } } if( $def ) { push @{ $target_file_data->{tracks} ||= [] }, $def; } } { open my $fh, '>', $target_file or die "$! writing $target_file"; print $fh $j->encode( $target_file_data ); } __END__ =head1 NAME add-track-json.pl - add a single JSON track configuration snippet(from STDIN or from a file) to the given JBrowse configuration file =head1 DESCRIPTION Reads a block of JSON describing a track from a file or from standard input or from a file, and adds it to the target JBrowse configuration file. For example, if you wanted to add a sequence track to data/trackList.json, you could run something like: echo ' { "urlTemplate" : "seq/{refseq}/", "label" : "DNA", "type" : "SequenceTrack" } ' | bin/add-track-json.pl data/trackList.json =head1 USAGE bin/add-track-json.pl myTrack.json data/trackList.json # OR cat track.json | bin/add-track-json.pl data/trackList.json =head2 OPTIONS none yet =cut
kimrutherford/afra
bin/add-track-json.pl
Perl
apache-2.0
2,168
#!/usr/bin/env perl use strict; use warnings; use lib 'auto-lib', 'lib'; use Data::Dumper; use Data::Printer; use Paws; my $result; my $ec2 = Paws->service('EC2', region => 'eu-west-1', ); $result = $ec2->DescribeSpotPriceHistory; p $result; p $_ foreach @{ $result->SpotPriceHistory };
ioanrogers/aws-sdk-perl
examples/ec2-spot.pl
Perl
apache-2.0
295
package Google::Ads::AdWords::v201409::FeedPage; use strict; use warnings; __PACKAGE__->_set_element_form_qualified(1); sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201409' }; our $XML_ATTRIBUTE_CLASS; undef $XML_ATTRIBUTE_CLASS; sub __get_attr_class { return $XML_ATTRIBUTE_CLASS; } use base qw(Google::Ads::AdWords::v201409::NullStatsPage); # Variety: sequence use Class::Std::Fast::Storable constructor => 'none'; use base qw(Google::Ads::SOAP::Typelib::ComplexType); { # BLOCK to scope variables my %totalNumEntries_of :ATTR(:get<totalNumEntries>); my %Page__Type_of :ATTR(:get<Page__Type>); my %entries_of :ATTR(:get<entries>); __PACKAGE__->_factory( [ qw( totalNumEntries Page__Type entries ) ], { 'totalNumEntries' => \%totalNumEntries_of, 'Page__Type' => \%Page__Type_of, 'entries' => \%entries_of, }, { 'totalNumEntries' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'Page__Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'entries' => 'Google::Ads::AdWords::v201409::Feed', }, { 'totalNumEntries' => 'totalNumEntries', 'Page__Type' => 'Page.Type', 'entries' => 'entries', } ); } # end BLOCK 1; =pod =head1 NAME Google::Ads::AdWords::v201409::FeedPage =head1 DESCRIPTION Perl data type class for the XML Schema defined complexType FeedPage from the namespace https://adwords.google.com/api/adwords/cm/v201409. The result of a call to FeedService#get. =head2 PROPERTIES The following properties may be accessed using get_PROPERTY / set_PROPERTY methods: =over =item * entries =back =head1 METHODS =head2 new Constructor. The following data structure may be passed to new(): =head1 AUTHOR Generated by SOAP::WSDL =cut
gitpan/GOOGLE-ADWORDS-PERL-CLIENT
lib/Google/Ads/AdWords/v201409/FeedPage.pm
Perl
apache-2.0
1,827
# toalety męskie, damksie oraz dla osób niepełnosprawnych isToilet(x) <=> type(x)="ToiletMen" or type(x)="ToiletWomen" or type(x)="ToiledAccessible"; failure_msg "Brak toalety w sekcji prywatnej" exists a in Areas: exists r in Rooms : type(a) = "Private" and isToilet(r) and isInDescendants(r,a); failure_msg "Brak toalety w sekcji publicznej" exists a in Areas: exists r in Rooms : type(a) = "Public" and isToilet(r) and isInDescendants(r,a);
szymongajek/HSSDR
HSSDR-trunk/test_files/Hierarchical test 4.pl
Perl
apache-2.0
460
package DDG::Spice::Maps::Chains; use DDG::Spice; spice to => 'https://duckduckgo.com/local.js?q=$1&cb={{callback}}'; # no caching. spice proxy_cache_valid => "418 1d"; spice is_cached => 0; # Chains regular expression built from core DDG. my $chains_re = share('chains_re')->slurp; # consider query_clean and strip_grammar permutation on slurp triggers query_lc => qr/^$chains_re$/s; handle query_lc => sub { return $_; }; 1;
claytonspinner/zeroclickinfo-spice
lib/DDG/Spice/Maps/Chains.pm
Perl
apache-2.0
439
package VCP::RevMapDB; =head1 NAME VCP::RevMapDB - Persistant storage for id -> (name, rev_id) maps =head1 SYNOPSIS use base qw( VCP::RevMapDB ); =head1 DESCRIPTION By default, most VCP::Dest::* drivers keep track of the relationship between the id field assigned by the (original) VCP::Source::* driver and the final name and rev_id (or whatever fields are important to it) in the destination repository so that the previous_id fields, which refer to the original id, may be resolved when backfilling or branching. The VCP::*::revml drivers do not do this; they do not need to resolve id fields. The intent for this file is to serve as a base class so that individual sites may write their own RevMapDB plugins to, for instance, store this state in a RDBMS table. This is not quite offered at this time; we need to add an option to the appropriate VCP::Dest::* modules to allow the appropriate RevMapDB file to be loaded. To write your own RevMapDB file, see VCP::RevMapDB::sdbm. =for test_script t/02revmapdb.t =cut $VERSION = 1 ; @ISA = qw( VCP::DB ); use strict ; require Carp; use VCP::DB; use VCP::Logger qw( pr ); ## TODO: Make the base class pluggable #use base "VCP::DB"; sub new { shift->SUPER::new( TableName => "rev_map", @_ ); } sub get { my $self = shift; my ( $key ) = @_; my @v = $self->SUPER::get( $key ); Carp::confess "vcp: no DB_File entry for ", join( ";", @$key ), "\n" unless @v; return @v; } sub set { my $self = shift; my ( $key ) = @_; pr "vcp: overwriting DB_File entry for ", join( ";", @$key ), ". Stale vcp_state in ", $self->store_loc, "?\n" if $self->exists( $key ); $self->SUPER::set( @_ ); } =head1 AUTHOR Barrie Slaymaker <barries@slaysys.com> =head1 COPYRIGHT Copyright (c) 2000, 2001, 2002 Perforce Software, Inc. All rights reserved. See L<VCP::License|VCP::License> (C<vcp help license>) for the terms of use. =cut 1
gitpan/VCP-autrijus-snapshot
lib/VCP/RevMapDB.pm
Perl
bsd-3-clause
1,986
#! /usr/bin/env perl # Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html # #======================================================================== # Written by Fangming Fang <fangming.fang@arm.com> for the OpenSSL project, # derived from https://github.com/ARM-software/AArch64cryptolib, original # author Samuel Lee <Samuel.Lee@arm.com>. The module is, however, dual # licensed under OpenSSL and CRYPTOGAMS licenses depending on where you # obtain it. For further details see http://www.openssl.org/~appro/cryptogams/. #======================================================================== # # Approach - assume we don't want to reload constants, so reserve ~half of vector register file for constants # # main loop to act on 4 16B blocks per iteration, and then do modulo of the accumulated intermediate hashes from the 4 blocks # # ____________________________________________________ # | | # | PRE | # |____________________________________________________| # | | | | # | CTR block 4k+8 | AES block 4k+4 | GHASH block 4k+0 | # |________________|________________|__________________| # | | | | # | CTR block 4k+9 | AES block 4k+5 | GHASH block 4k+1 | # |________________|________________|__________________| # | | | | # | CTR block 4k+10| AES block 4k+6 | GHASH block 4k+2 | # |________________|________________|__________________| # | | | | # | CTR block 4k+11| AES block 4k+7 | GHASH block 4k+3 | # |________________|____(mostly)____|__________________| # | | # | MODULO | # |____________________________________________________| # # PRE: # Ensure previous generated intermediate hash is aligned and merged with result for GHASH 4k+0 # EXT low_acc, low_acc, low_acc, #8 # EOR res_curr (4k+0), res_curr (4k+0), low_acc # # CTR block: # Increment and byte reverse counter in scalar registers and transfer to SIMD registers # REV ctr32, rev_ctr32 # ORR ctr64, constctr96_top32, ctr32, LSL #32 # INS ctr_next.d[0], constctr96_bottom64 // Keeping this in scalar registers to free up space in SIMD RF # INS ctr_next.d[1], ctr64X # ADD rev_ctr32, #1 # # AES block: # Do AES encryption/decryption on CTR block X and EOR it with input block X. Take 256 bytes key below for example. # Doing small trick here of loading input in scalar registers, EORing with last key and then transferring # Given we are very constrained in our ASIMD registers this is quite important # # Encrypt: # LDR input_low, [ input_ptr ], #8 # LDR input_high, [ input_ptr ], #8 # EOR input_low, k14_low # EOR input_high, k14_high # INS res_curr.d[0], input_low # INS res_curr.d[1], input_high # AESE ctr_curr, k0; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k1; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k2; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k3; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k4; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k5; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k6; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k7; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k8; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k9; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k10; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k11; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k12; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k13 # EOR res_curr, res_curr, ctr_curr # ST1 { res_curr.16b }, [ output_ptr ], #16 # # Decrypt: # AESE ctr_curr, k0; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k1; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k2; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k3; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k4; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k5; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k6; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k7; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k8; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k9; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k10; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k11; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k12; AESMC ctr_curr, ctr_curr # AESE ctr_curr, k13 # LDR res_curr, [ input_ptr ], #16 # EOR res_curr, res_curr, ctr_curr # MOV output_low, res_curr.d[0] # MOV output_high, res_curr.d[1] # EOR output_low, k14_low # EOR output_high, k14_high # STP output_low, output_high, [ output_ptr ], #16 # # GHASH block X: # do 128b karatsuba polynomial multiplication on block # We only have 64b->128b polynomial multipliers, naively that means we need to do 4 64b multiplies to generate a 128b # # multiplication: # Pmull(A,B) == (Pmull(Ah,Bh)<<128 | Pmull(Al,Bl)) ^ (Pmull(Ah,Bl) ^ Pmull(Al,Bh))<<64 # # The idea behind Karatsuba multiplication is that we can do just 3 64b multiplies: # Pmull(A,B) == (Pmull(Ah,Bh)<<128 | Pmull(Al,Bl)) ^ (Pmull(Ah^Al,Bh^Bl) ^ Pmull(Ah,Bh) ^ Pmull(Al,Bl))<<64 # # There is some complication here because the bit order of GHASH's PMULL is reversed compared to elsewhere, so we are # multiplying with "twisted" powers of H # # Note: We can PMULL directly into the acc_x in first GHASH of the loop # Note: For scheduling big cores we want to split the processing to happen over two loop iterations - otherwise the critical # path latency dominates the performance # # This has a knock on effect on register pressure, so we have to be a bit more clever with our temporary registers # than indicated here # REV64 res_curr, res_curr # INS t_m.d[0], res_curr.d[1] # EOR t_m.8B, t_m.8B, res_curr.8B # PMULL2 t_h, res_curr, HX # PMULL t_l, res_curr, HX # PMULL t_m, t_m, HX_k # EOR acc_h, acc_h, t_h # EOR acc_l, acc_l, t_l # EOR acc_m, acc_m, t_m # # MODULO: take the partial accumulators (~representing sum of 256b multiplication results), from GHASH and do modulo reduction on them # There is some complication here because the bit order of GHASH's PMULL is reversed compared to elsewhere, so we are doing modulo # with a reversed constant # EOR acc_m, acc_m, acc_h # EOR acc_m, acc_m, acc_l // Finish off karatsuba processing # PMULL t_mod, acc_h, mod_constant # EXT acc_h, acc_h, acc_h, #8 # EOR acc_m, acc_m, acc_h # EOR acc_m, acc_m, t_mod # PMULL acc_h, acc_m, mod_constant # EXT acc_m, acc_m, acc_m, #8 # EOR acc_l, acc_l, acc_h # EOR acc_l, acc_l, acc_m $output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef; $flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef; $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate ) or die "can't locate arm-xlate.pl"; open OUT,"| \"$^X\" $xlate $flavour $output"; *STDOUT=*OUT; $input_ptr="x0"; #argument block $bit_length="x1"; $output_ptr="x2"; $current_tag="x3"; $counter="x16"; $cc="x8"; { my ($end_input_ptr,$main_end_input_ptr,$input_l0,$input_h0)=map("x$_",(4..7)); my ($input_l1,$input_h1,$input_l2,$input_h2,$input_l3,$input_h3)=map("x$_",(19..24)); my ($output_l1,$output_h1,$output_l2,$output_h2,$output_l3,$output_h3)=map("x$_",(19..24)); my ($output_l0,$output_h0)=map("x$_",(6..7)); my $ctr32w="w9"; my ($ctr32x,$ctr96_b64x,$ctr96_t32x,$rctr32x,$rk10_l,$rk10_h,$len)=map("x$_",(9..15)); my ($ctr96_t32w,$rctr32w)=map("w$_",(11..12)); my ($ctr0b,$ctr1b,$ctr2b,$ctr3b,$res0b,$res1b,$res2b,$res3b)=map("v$_.16b",(0..7)); my ($ctr0,$ctr1,$ctr2,$ctr3,$res0,$res1,$res2,$res3)=map("v$_",(0..7)); my ($ctr0d,$ctr1d,$ctr2d,$ctr3d,$res0d,$res1d,$res2d,$res3d)=map("d$_",(0..7)); my ($res0q,$res1q,$res2q,$res3q)=map("q$_",(4..7)); my ($acc_hb,$acc_mb,$acc_lb)=map("v$_.16b",(9..11)); my ($acc_h,$acc_m,$acc_l)=map("v$_",(9..11)); my ($acc_hd,$acc_md,$acc_ld)=map("d$_",(9..11)); my ($h1,$h2,$h3,$h4,$h12k,$h34k)=map("v$_",(12..17)); my ($h1q,$h2q,$h3q,$h4q)=map("q$_",(12..15)); my ($h1b,$h2b,$h3b,$h4b)=map("v$_.16b",(12..15)); my $t0="v8"; my $t0d="d8"; my ($t1,$t2,$t3)=map("v$_",(28..30)); my ($t1d,$t2d,$t3d)=map("d$_",(28..30)); my $t4="v8"; my $t4d="d8"; my $t5="v28"; my $t5d="d28"; my $t6="v31"; my $t6d="d31"; my $t7="v4"; my $t7d="d4"; my $t8="v29"; my $t8d="d29"; my $t9="v30"; my $t9d="d30"; my ($ctr_t0,$ctr_t1,$ctr_t2,$ctr_t3)=map("v$_",(4..7)); my ($ctr_t0d,$ctr_t1d,$ctr_t2d,$ctr_t3d)=map("d$_",(4..7)); my ($ctr_t0b,$ctr_t1b,$ctr_t2b,$ctr_t3b)=map("v$_.16b",(4..7)); my $mod_constantd="d8"; my $mod_constant="v8"; my $mod_t="v31"; my ($rk0,$rk1,$rk2,$rk3,$rk4,$rk5,$rk6,$rk7,$rk8,$rk9)=map("v$_.16b",(18..27)); my ($rk0q,$rk1q,$rk2q,$rk3q,$rk4q,$rk5q,$rk6q,$rk7q,$rk8q,$rk9q)=map("q$_",(18..27)); my $rk2q1="v20.1q"; my $rk3q1="v21.1q"; my $rk4v="v22"; my $rk4d="d22"; $code=<<___; #include "arm_arch.h" #if __ARM_MAX_ARCH__>=8 ___ $code.=".arch armv8-a+crypto\n.text\n" if ($flavour =~ /64/); $code.=<<___ if ($flavour !~ /64/); .fpu neon #ifdef __thumb2__ .syntax unified .thumb # define INST(a,b,c,d) $_byte c,0xef,a,b #else .code 32 # define INST(a,b,c,d) $_byte a,b,c,0xf2 #endif .text ___ ######################################################################################### # size_t aes_gcm_enc_128_kernel(const unsigned char *in, # size_t len, # unsigned char *out, # const void *key, # unsigned char ivec[16], # u64 *Xi); # $code.=<<___; .global aes_gcm_enc_128_kernel .type aes_gcm_enc_128_kernel,%function .align 4 aes_gcm_enc_128_kernel: cbz x1, .L128_enc_ret stp x19, x20, [sp, #-112]! mov x16, x4 mov x8, x5 stp x21, x22, [sp, #16] stp x23, x24, [sp, #32] stp d8, d9, [sp, #48] stp d10, d11, [sp, #64] stp d12, d13, [sp, #80] stp d14, d15, [sp, #96] ldp $ctr96_b64x, $ctr96_t32x, [$counter] @ ctr96_b64, ctr96_t32 ldp $rk10_l, $rk10_h, [$cc, #160] @ load rk10 ld1 {$acc_lb}, [$current_tag] ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb lsr $main_end_input_ptr, $bit_length, #3 @ byte_len mov $len, $main_end_input_ptr ldr $rk9q, [$cc, #144] @ load rk9 add $end_input_ptr, $input_ptr, $bit_length, lsr #3 @ end_input_ptr sub $main_end_input_ptr, $main_end_input_ptr, #1 @ byte_len - 1 lsr $rctr32x, $ctr96_t32x, #32 ldr $h4q, [$current_tag, #112] @ load h4l | h4h ext $h4b, $h4b, $h4b, #8 fmov $ctr1d, $ctr96_b64x @ CTR block 1 rev $rctr32w, $rctr32w @ rev_ctr32 add $rctr32w, $rctr32w, #1 @ increment rev_ctr32 orr $ctr96_t32w, $ctr96_t32w, $ctr96_t32w ldr $rk0q, [$cc, #0] @ load rk0 rev $ctr32w, $rctr32w @ CTR block 1 add $rctr32w, $rctr32w, #1 @ CTR block 1 fmov $ctr3d, $ctr96_b64x @ CTR block 3 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 1 ld1 { $ctr0b}, [$counter] @ special case vector load initial counter so we can start first AES block as quickly as possible fmov $ctr1.d[1], $ctr32x @ CTR block 1 rev $ctr32w, $rctr32w @ CTR block 2 fmov $ctr2d, $ctr96_b64x @ CTR block 2 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 2 add $rctr32w, $rctr32w, #1 @ CTR block 2 fmov $ctr2.d[1], $ctr32x @ CTR block 2 rev $ctr32w, $rctr32w @ CTR block 3 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 3 ldr $rk1q, [$cc, #16] @ load rk1 add $rctr32w, $rctr32w, #1 @ CTR block 3 fmov $ctr3.d[1], $ctr32x @ CTR block 3 ldr $h3q, [$current_tag, #80] @ load h3l | h3h ext $h3b, $h3b, $h3b, #8 aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 0 ldr $rk2q, [$cc, #32] @ load rk2 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 0 ldr $h1q, [$current_tag, #32] @ load h1l | h1h ext $h1b, $h1b, $h1b, #8 aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 0 ldr $rk8q, [$cc, #128] @ load rk8 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 0 ldr $rk3q, [$cc, #48] @ load rk3 aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 1 trn2 $h34k.2d, $h3.2d, $h4.2d @ h4l | h3l aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 1 ldr $rk6q, [$cc, #96] @ load rk6 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 1 ldr $rk7q, [$cc, #112] @ load rk7 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 1 trn1 $acc_h.2d, $h3.2d, $h4.2d @ h4h | h3h aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 2 ldr $rk5q, [$cc, #80] @ load rk5 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 2 ldr $h2q, [$current_tag, #64] @ load h2l | h2h ext $h2b, $h2b, $h2b, #8 aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 2 aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 2 eor $h34k.16b, $h34k.16b, $acc_h.16b @ h4k | h3k aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 3 aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 3 aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 3 ldr $rk4q, [$cc, #64] @ load rk4 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 3 and $main_end_input_ptr, $main_end_input_ptr, #0xffffffffffffffc0 @ number of bytes to be processed in main loop (at least 1 byte must be handled by tail) trn2 $h12k.2d, $h1.2d, $h2.2d @ h2l | h1l aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 4 add $main_end_input_ptr, $main_end_input_ptr, $input_ptr aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 4 cmp $input_ptr, $main_end_input_ptr @ check if we have <= 4 blocks aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 4 aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 5 aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 5 aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 5 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 6 aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 4 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 6 trn1 $t0.2d, $h1.2d, $h2.2d @ h2h | h1h aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 6 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 5 aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 7 aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 7 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 6 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 7 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 8 aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 7 aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 8 aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 8 aese $ctr2b, $rk9 @ AES block 2 - round 9 aese $ctr0b, $rk9 @ AES block 0 - round 9 eor $h12k.16b, $h12k.16b, $t0.16b @ h2k | h1k aese $ctr1b, $rk9 @ AES block 1 - round 9 aese $ctr3b, $rk9 @ AES block 3 - round 9 b.ge .L128_enc_tail @ handle tail ldp $input_l0, $input_h0, [$input_ptr, #0] @ AES block 0 - load plaintext ldp $input_l2, $input_h2, [$input_ptr, #32] @ AES block 2 - load plaintext ldp $input_l1, $input_h1, [$input_ptr, #16] @ AES block 1 - load plaintext ldp $input_l3, $input_h3, [$input_ptr, #48] @ AES block 3 - load plaintext eor $input_l0, $input_l0, $rk10_l @ AES block 0 - round 10 low eor $input_h0, $input_h0, $rk10_h @ AES block 0 - round 10 high eor $input_l2, $input_l2, $rk10_l @ AES block 2 - round 10 low fmov $ctr_t0d, $input_l0 @ AES block 0 - mov low eor $input_l1, $input_l1, $rk10_l @ AES block 1 - round 10 low eor $input_h2, $input_h2, $rk10_h @ AES block 2 - round 10 high fmov $ctr_t0.d[1], $input_h0 @ AES block 0 - mov high fmov $ctr_t1d, $input_l1 @ AES block 1 - mov low eor $input_h1, $input_h1, $rk10_h @ AES block 1 - round 10 high eor $input_l3, $input_l3, $rk10_l @ AES block 3 - round 10 low fmov $ctr_t1.d[1], $input_h1 @ AES block 1 - mov high fmov $ctr_t2d, $input_l2 @ AES block 2 - mov low eor $input_h3, $input_h3, $rk10_h @ AES block 3 - round 10 high rev $ctr32w, $rctr32w @ CTR block 4 fmov $ctr_t2.d[1], $input_h2 @ AES block 2 - mov high orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4 eor $res0b, $ctr_t0b, $ctr0b @ AES block 0 - result fmov $ctr0d, $ctr96_b64x @ CTR block 4 add $rctr32w, $rctr32w, #1 @ CTR block 4 fmov $ctr0.d[1], $ctr32x @ CTR block 4 rev $ctr32w, $rctr32w @ CTR block 5 eor $res1b, $ctr_t1b, $ctr1b @ AES block 1 - result fmov $ctr1d, $ctr96_b64x @ CTR block 5 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 5 add $rctr32w, $rctr32w, #1 @ CTR block 5 add $input_ptr, $input_ptr, #64 @ AES input_ptr update fmov $ctr1.d[1], $ctr32x @ CTR block 5 fmov $ctr_t3d, $input_l3 @ AES block 3 - mov low rev $ctr32w, $rctr32w @ CTR block 6 st1 { $res0b}, [$output_ptr], #16 @ AES block 0 - store result fmov $ctr_t3.d[1], $input_h3 @ AES block 3 - mov high orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 6 add $rctr32w, $rctr32w, #1 @ CTR block 6 eor $res2b, $ctr_t2b, $ctr2b @ AES block 2 - result st1 { $res1b}, [$output_ptr], #16 @ AES block 1 - store result fmov $ctr2d, $ctr96_b64x @ CTR block 6 cmp $input_ptr, $main_end_input_ptr @ check if we have <= 8 blocks fmov $ctr2.d[1], $ctr32x @ CTR block 6 rev $ctr32w, $rctr32w @ CTR block 7 st1 { $res2b}, [$output_ptr], #16 @ AES block 2 - store result orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 7 eor $res3b, $ctr_t3b, $ctr3b @ AES block 3 - result st1 { $res3b}, [$output_ptr], #16 @ AES block 3 - store result b.ge .L128_enc_prepretail @ do prepretail .L128_enc_main_loop: @ main loop start ldp $input_l3, $input_h3, [$input_ptr, #48] @ AES block 4k+3 - load plaintext rev64 $res0b, $res0b @ GHASH block 4k (only t0 is free) rev64 $res2b, $res2b @ GHASH block 4k+2 (t0, t1, and t2 free) aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 fmov $ctr3d, $ctr96_b64x @ CTR block 4k+3 ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 rev64 $res1b, $res1b @ GHASH block 4k+1 (t0 and t1 free) aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 add $rctr32w, $rctr32w, #1 @ CTR block 4k+3 fmov $ctr3.d[1], $ctr32x @ CTR block 4k+3 aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 eor $res0b, $res0b, $acc_lb @ PRE 1 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 eor $input_h3, $input_h3, $rk10_h @ AES block 4k+3 - round 10 high pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid ldp $input_l0, $input_h0, [$input_ptr, #0] @ AES block 4k+4 - load plaintext aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 rev $ctr32w, $rctr32w @ CTR block 4k+8 eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid mov $t0d, $res0.d[1] @ GHASH block 4k - mid orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+8 pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high add $rctr32w, $rctr32w, #1 @ CTR block 4k+8 mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid rev64 $res3b, $res3b @ GHASH block 4k+3 (t0, t1, t2 and t3 free) pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high eor $input_h0, $input_h0, $rk10_h @ AES block 4k+4 - round 10 high eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 eor $input_l0, $input_l0, $rk10_l @ AES block 4k+4 - round 10 low aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low movi $mod_constant.8b, #0xc2 pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 ldp $input_l1, $input_h1, [$input_ptr, #16] @ AES block 4k+5 - load plaintext aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 ldp $input_l2, $input_h2, [$input_ptr, #32] @ AES block 4k+6 - load plaintext pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 eor $input_l1, $input_l1, $rk10_l @ AES block 4k+5 - round 10 low aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 eor $input_l3, $input_l3, $rk10_l @ AES block 4k+3 - round 10 low aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up fmov $ctr_t0d, $input_l0 @ AES block 4k+4 - mov low aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 fmov $ctr_t0.d[1], $input_h0 @ AES block 4k+4 - mov high add $input_ptr, $input_ptr, #64 @ AES input_ptr update fmov $ctr_t3d, $input_l3 @ AES block 4k+3 - mov low ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 fmov $ctr_t1d, $input_l1 @ AES block 4k+5 - mov low aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 eor $input_h1, $input_h1, $rk10_h @ AES block 4k+5 - round 10 high aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 fmov $ctr_t1.d[1], $input_h1 @ AES block 4k+5 - mov high aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 fmov $ctr_t3.d[1], $input_h3 @ AES block 4k+3 - mov high aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 cmp $input_ptr, $main_end_input_ptr @ LOOP CONTROL aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid aese $ctr0b, $rk9 @ AES block 4k+4 - round 9 eor $input_l2, $input_l2, $rk10_l @ AES block 4k+6 - round 10 low eor $input_h2, $input_h2, $rk10_h @ AES block 4k+6 - round 10 high aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 fmov $ctr_t2d, $input_l2 @ AES block 4k+6 - mov low aese $ctr1b, $rk9 @ AES block 4k+5 - round 9 fmov $ctr_t2.d[1], $input_h2 @ AES block 4k+6 - mov high aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 eor $res0b, $ctr_t0b, $ctr0b @ AES block 4k+4 - result fmov $ctr0d, $ctr96_b64x @ CTR block 4k+8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 fmov $ctr0.d[1], $ctr32x @ CTR block 4k+8 rev $ctr32w, $rctr32w @ CTR block 4k+9 eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 eor $res1b, $ctr_t1b, $ctr1b @ AES block 4k+5 - result add $rctr32w, $rctr32w, #1 @ CTR block 4k+9 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+9 fmov $ctr1d, $ctr96_b64x @ CTR block 4k+9 pmull $acc_h.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low fmov $ctr1.d[1], $ctr32x @ CTR block 4k+9 rev $ctr32w, $rctr32w @ CTR block 4k+10 aese $ctr2b, $rk9 @ AES block 4k+6 - round 9 st1 { $res0b}, [$output_ptr], #16 @ AES block 4k+4 - store result eor $res2b, $ctr_t2b, $ctr2b @ AES block 4k+6 - result orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+10 aese $ctr3b, $rk9 @ AES block 4k+7 - round 9 add $rctr32w, $rctr32w, #1 @ CTR block 4k+10 ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment fmov $ctr2d, $ctr96_b64x @ CTR block 4k+10 eor $acc_lb, $acc_lb, $acc_hb @ MODULO - fold into low st1 { $res1b}, [$output_ptr], #16 @ AES block 4k+5 - store result fmov $ctr2.d[1], $ctr32x @ CTR block 4k+10 st1 { $res2b}, [$output_ptr], #16 @ AES block 4k+6 - store result rev $ctr32w, $rctr32w @ CTR block 4k+11 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+11 eor $res3b, $ctr_t3b, $ctr3b @ AES block 4k+3 - result eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low st1 { $res3b}, [$output_ptr], #16 @ AES block 4k+3 - store result b.lt .L128_enc_main_loop .L128_enc_prepretail: @ PREPRETAIL rev64 $res0b, $res0b @ GHASH block 4k (only t0 is free) fmov $ctr3d, $ctr96_b64x @ CTR block 4k+3 rev64 $res1b, $res1b @ GHASH block 4k+1 (t0 and t1 free) ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 add $rctr32w, $rctr32w, #1 @ CTR block 4k+3 fmov $ctr3.d[1], $ctr32x @ CTR block 4k+3 aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 rev64 $res2b, $res2b @ GHASH block 4k+2 (t0, t1, and t2 free) pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low rev64 $res3b, $res3b @ GHASH block 4k+3 (t0, t1, t2 and t3 free) eor $res0b, $res0b, $acc_lb @ PRE 1 pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low mov $t0d, $res0.d[1] @ GHASH block 4k - mid mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low movi $mod_constant.8b, #0xc2 aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 pmull $t1.1q, $acc_h.1d, $mod_constant.1d eor $acc_mb, $acc_mb, $acc_hb @ karatsuba tidy up aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 ext $acc_hb, $acc_hb, $acc_hb, #8 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 eor $acc_mb, $acc_mb, $acc_lb aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 eor $acc_mb, $acc_mb, $t1.16b aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 eor $acc_mb, $acc_mb, $acc_hb aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 pmull $t1.1q, $acc_m.1d, $mod_constant.1d aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 ext $acc_mb, $acc_mb, $acc_mb, #8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 eor $acc_lb, $acc_lb, $t1.16b aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 aese $ctr3b, $rk9 @ AES block 4k+7 - round 9 aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 aese $ctr0b, $rk9 @ AES block 4k+4 - round 9 aese $ctr1b, $rk9 @ AES block 4k+5 - round 9 eor $acc_lb, $acc_lb, $acc_mb aese $ctr2b, $rk9 @ AES block 4k+6 - round 9 .L128_enc_tail: @ TAIL sub $main_end_input_ptr, $end_input_ptr, $input_ptr @ main_end_input_ptr is number of bytes left to process ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES block 4k+4 - load plaintext cmp $main_end_input_ptr, #48 ext $t0.16b, $acc_lb, $acc_lb, #8 @ prepare final partial tag eor $input_l0, $input_l0, $rk10_l @ AES block 4k+4 - round 10 low eor $input_h0, $input_h0, $rk10_h @ AES block 4k+4 - round 10 high fmov $ctr_t0d, $input_l0 @ AES block 4k+4 - mov low fmov $ctr_t0.d[1], $input_h0 @ AES block 4k+4 - mov high eor $res1b, $ctr_t0b, $ctr0b @ AES block 4k+4 - result b.gt .L128_enc_blocks_more_than_3 sub $rctr32w, $rctr32w, #1 movi $acc_l.8b, #0 mov $ctr3b, $ctr2b cmp $main_end_input_ptr, #32 mov $ctr2b, $ctr1b movi $acc_h.8b, #0 movi $acc_m.8b, #0 b.gt .L128_enc_blocks_more_than_2 mov $ctr3b, $ctr1b cmp $main_end_input_ptr, #16 sub $rctr32w, $rctr32w, #1 b.gt .L128_enc_blocks_more_than_1 sub $rctr32w, $rctr32w, #1 b .L128_enc_blocks_less_than_1 .L128_enc_blocks_more_than_3: @ blocks left > 3 st1 { $res1b}, [$output_ptr], #16 @ AES final-3 block - store result ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES final-2 block - load input low & high rev64 $res0b, $res1b @ GHASH final-3 block eor $res0b, $res0b, $t0.16b @ feed in partial tag eor $input_h0, $input_h0, $rk10_h @ AES final-2 block - round 10 high eor $input_l0, $input_l0, $rk10_l @ AES final-2 block - round 10 low fmov $res1d, $input_l0 @ AES final-2 block - mov low movi $t0.8b, #0 @ suppress further partial tag feed in fmov $res1.d[1], $input_h0 @ AES final-2 block - mov high pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH final-3 block - low mov $rk4d, $res0.d[1] @ GHASH final-3 block - mid pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH final-3 block - high mov $acc_md, $h34k.d[1] @ GHASH final-3 block - mid eor $res1b, $res1b, $ctr1b @ AES final-2 block - result eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-3 block - mid pmull $acc_m.1q, $rk4v.1d, $acc_m.1d @ GHASH final-3 block - mid .L128_enc_blocks_more_than_2: @ blocks left > 2 st1 { $res1b}, [$output_ptr], #16 @ AES final-2 block - store result rev64 $res0b, $res1b @ GHASH final-2 block ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES final-1 block - load input low & high eor $res0b, $res0b, $t0.16b @ feed in partial tag eor $input_l0, $input_l0, $rk10_l @ AES final-1 block - round 10 low fmov $res1d, $input_l0 @ AES final-1 block - mov low eor $input_h0, $input_h0, $rk10_h @ AES final-1 block - round 10 high pmull2 $rk2q1, $res0.2d, $h3.2d @ GHASH final-2 block - high fmov $res1.d[1], $input_h0 @ AES final-1 block - mov high mov $rk4d, $res0.d[1] @ GHASH final-2 block - mid pmull $rk3q1, $res0.1d, $h3.1d @ GHASH final-2 block - low eor $acc_hb, $acc_hb, $rk2 @ GHASH final-2 block - high eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-2 block - mid eor $res1b, $res1b, $ctr2b @ AES final-1 block - result eor $acc_lb, $acc_lb, $rk3 @ GHASH final-2 block - low pmull $rk4v.1q, $rk4v.1d, $h34k.1d @ GHASH final-2 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-2 block - mid .L128_enc_blocks_more_than_1: @ blocks left > 1 st1 { $res1b}, [$output_ptr], #16 @ AES final-1 block - store result rev64 $res0b, $res1b @ GHASH final-1 block ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES final block - load input low & high eor $res0b, $res0b, $t0.16b @ feed in partial tag eor $input_h0, $input_h0, $rk10_h @ AES final block - round 10 high eor $input_l0, $input_l0, $rk10_l @ AES final block - round 10 low fmov $res1d, $input_l0 @ AES final block - mov low pmull2 $rk2q1, $res0.2d, $h2.2d @ GHASH final-1 block - high fmov $res1.d[1], $input_h0 @ AES final block - mov high mov $rk4d, $res0.d[1] @ GHASH final-1 block - mid pmull $rk3q1, $res0.1d, $h2.1d @ GHASH final-1 block - low eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-1 block - mid eor $res1b, $res1b, $ctr3b @ AES final block - result ins $rk4v.d[1], $rk4v.d[0] @ GHASH final-1 block - mid pmull2 $rk4v.1q, $rk4v.2d, $h12k.2d @ GHASH final-1 block - mid eor $acc_lb, $acc_lb, $rk3 @ GHASH final-1 block - low eor $acc_hb, $acc_hb, $rk2 @ GHASH final-1 block - high eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-1 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in .L128_enc_blocks_less_than_1: @ blocks left <= 1 and $bit_length, $bit_length, #127 @ bit_length %= 128 mvn $rk10_l, xzr @ rk10_l = 0xffffffffffffffff mvn $rk10_h, xzr @ rk10_h = 0xffffffffffffffff sub $bit_length, $bit_length, #128 @ bit_length -= 128 neg $bit_length, $bit_length @ bit_length = 128 - #bits in input (in range [1,128]) and $bit_length, $bit_length, #127 @ bit_length %= 128 lsr $rk10_h, $rk10_h, $bit_length @ rk10_h is mask for top 64b of last block cmp $bit_length, #64 csel $input_l0, $rk10_l, $rk10_h, lt csel $input_h0, $rk10_h, xzr, lt fmov $ctr0d, $input_l0 @ ctr0b is mask for last block fmov $ctr0.d[1], $input_h0 and $res1b, $res1b, $ctr0b @ possibly partial last block has zeroes in highest bits rev64 $res0b, $res1b @ GHASH final block eor $res0b, $res0b, $t0.16b @ feed in partial tag mov $t0d, $res0.d[1] @ GHASH final block - mid pmull $rk3q1, $res0.1d, $h1.1d @ GHASH final block - low ld1 { $rk0}, [$output_ptr] @ load existing bytes where the possibly partial last block is to be stored eor $t0.8b, $t0.8b, $res0.8b @ GHASH final block - mid rev $ctr32w, $rctr32w pmull2 $rk2q1, $res0.2d, $h1.2d @ GHASH final block - high pmull $t0.1q, $t0.1d, $h12k.1d @ GHASH final block - mid eor $acc_lb, $acc_lb, $rk3 @ GHASH final block - low eor $acc_hb, $acc_hb, $rk2 @ GHASH final block - high eor $acc_mb, $acc_mb, $t0.16b @ GHASH final block - mid movi $mod_constant.8b, #0xc2 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up shl $mod_constantd, $mod_constantd, #56 @ mod_constant eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid pmull $acc_h.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment bif $res1b, $rk0, $ctr0b @ insert existing bytes in top end of result before storing eor $acc_lb, $acc_lb, $acc_hb @ MODULO - fold into low st1 { $res1b}, [$output_ptr] @ store all 16B str $ctr32w, [$counter, #12] @ store the updated counter eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb mov x0, $len st1 { $acc_l.16b }, [$current_tag] ldp x21, x22, [sp, #16] ldp x23, x24, [sp, #32] ldp d8, d9, [sp, #48] ldp d10, d11, [sp, #64] ldp d12, d13, [sp, #80] ldp d14, d15, [sp, #96] ldp x19, x20, [sp], #112 ret .L128_enc_ret: mov w0, #0x0 ret .size aes_gcm_enc_128_kernel,.-aes_gcm_enc_128_kernel ___ ######################################################################################### # size_t aes_gcm_dec_128_kernel(const unsigned char *in, # size_t len, # unsigned char *out, # const void *key, # unsigned char ivec[16], # u64 *Xi); # $code.=<<___; .global aes_gcm_dec_128_kernel .type aes_gcm_dec_128_kernel,%function .align 4 aes_gcm_dec_128_kernel: cbz x1, .L128_dec_ret stp x19, x20, [sp, #-112]! mov x16, x4 mov x8, x5 stp x21, x22, [sp, #16] stp x23, x24, [sp, #32] stp d8, d9, [sp, #48] stp d10, d11, [sp, #64] stp d12, d13, [sp, #80] stp d14, d15, [sp, #96] lsr $main_end_input_ptr, $bit_length, #3 @ byte_len mov $len, $main_end_input_ptr ldp $ctr96_b64x, $ctr96_t32x, [$counter] @ ctr96_b64, ctr96_t32 sub $main_end_input_ptr, $main_end_input_ptr, #1 @ byte_len - 1 ldr $rk0q, [$cc, #0] @ load rk0 and $main_end_input_ptr, $main_end_input_ptr, #0xffffffffffffffc0 @ number of bytes to be processed in main loop (at least 1 byte must be handled by tail) ld1 { $ctr0b}, [$counter] @ special case vector load initial counter so we can start first AES block as quickly as possible ldr $h2q, [$current_tag, #64] @ load h2l | h2h ext $h2b, $h2b, $h2b, #8 lsr $rctr32x, $ctr96_t32x, #32 fmov $ctr2d, $ctr96_b64x @ CTR block 2 ldr $rk1q, [$cc, #16] @ load rk1 orr $ctr96_t32w, $ctr96_t32w, $ctr96_t32w rev $rctr32w, $rctr32w @ rev_ctr32 fmov $ctr1d, $ctr96_b64x @ CTR block 1 add $rctr32w, $rctr32w, #1 @ increment rev_ctr32 aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 0 rev $ctr32w, $rctr32w @ CTR block 1 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 1 ldr $rk2q, [$cc, #32] @ load rk2 add $rctr32w, $rctr32w, #1 @ CTR block 1 fmov $ctr1.d[1], $ctr32x @ CTR block 1 rev $ctr32w, $rctr32w @ CTR block 2 add $rctr32w, $rctr32w, #1 @ CTR block 2 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 1 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 2 fmov $ctr2.d[1], $ctr32x @ CTR block 2 rev $ctr32w, $rctr32w @ CTR block 3 fmov $ctr3d, $ctr96_b64x @ CTR block 3 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 3 add $rctr32w, $rctr32w, #1 @ CTR block 3 fmov $ctr3.d[1], $ctr32x @ CTR block 3 add $end_input_ptr, $input_ptr, $bit_length, lsr #3 @ end_input_ptr aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 0 ldr $rk3q, [$cc, #48] @ load rk3 aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 2 ldr $rk6q, [$cc, #96] @ load rk6 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 0 ldr $rk7q, [$cc, #112] @ load rk7 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 1 ldr $rk4q, [$cc, #64] @ load rk4 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 0 aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 1 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 2 ldp $rk10_l, $rk10_h, [$cc, #160] @ load rk10 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 1 ld1 { $acc_lb}, [$current_tag] ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 3 ldr $rk5q, [$cc, #80] @ load rk5 aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 3 aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 2 aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 2 ldr $rk9q, [$cc, #144] @ load rk9 aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 4 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 3 aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 3 ldr $h3q, [$current_tag, #80] @ load h3l | h3h ext $h3b, $h3b, $h3b, #8 aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 4 ldr $rk8q, [$cc, #128] @ load rk8 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 5 aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 4 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 4 aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 5 aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 5 ldr $h1q, [$current_tag, #32] @ load h1l | h1h ext $h1b, $h1b, $h1b, #8 aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 5 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 6 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 6 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 6 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 6 trn1 $t0.2d, $h1.2d, $h2.2d @ h2h | h1h ldr $h4q, [$current_tag, #112] @ load h4l | h4h ext $h4b, $h4b, $h4b, #8 trn2 $h12k.2d, $h1.2d, $h2.2d @ h2l | h1l add $main_end_input_ptr, $main_end_input_ptr, $input_ptr aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 7 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 7 aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 7 eor $h12k.16b, $h12k.16b, $t0.16b @ h2k | h1k aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 7 aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 8 trn2 $h34k.2d, $h3.2d, $h4.2d @ h4l | h3l aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 8 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 8 trn1 $acc_h.2d, $h3.2d, $h4.2d @ h4h | h3h aese $ctr2b, $rk9 @ AES block 2 - round 9 aese $ctr3b, $rk9 @ AES block 3 - round 9 aese $ctr0b, $rk9 @ AES block 0 - round 9 cmp $input_ptr, $main_end_input_ptr @ check if we have <= 4 blocks aese $ctr1b, $rk9 @ AES block 1 - round 9 eor $h34k.16b, $h34k.16b, $acc_h.16b @ h4k | h3k b.ge .L128_dec_tail @ handle tail ldr $res1q, [$input_ptr, #16] @ AES block 1 - load ciphertext ldr $res0q, [$input_ptr, #0] @ AES block 0 - load ciphertext eor $ctr1b, $res1b, $ctr1b @ AES block 1 - result ldr $res2q, [$input_ptr, #32] @ AES block 2 - load ciphertext eor $ctr0b, $res0b, $ctr0b @ AES block 0 - result rev64 $res0b, $res0b @ GHASH block 0 rev $ctr32w, $rctr32w @ CTR block 4 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4 add $rctr32w, $rctr32w, #1 @ CTR block 4 ldr $res3q, [$input_ptr, #48] @ AES block 3 - load ciphertext rev64 $res1b, $res1b @ GHASH block 1 add $input_ptr, $input_ptr, #64 @ AES input_ptr update mov $output_l1, $ctr1.d[0] @ AES block 1 - mov low mov $output_h1, $ctr1.d[1] @ AES block 1 - mov high mov $output_l0, $ctr0.d[0] @ AES block 0 - mov low cmp $input_ptr, $main_end_input_ptr @ check if we have <= 8 blocks mov $output_h0, $ctr0.d[1] @ AES block 0 - mov high fmov $ctr0d, $ctr96_b64x @ CTR block 4 fmov $ctr0.d[1], $ctr32x @ CTR block 4 rev $ctr32w, $rctr32w @ CTR block 5 eor $output_l1, $output_l1, $rk10_l @ AES block 1 - round 10 low fmov $ctr1d, $ctr96_b64x @ CTR block 5 add $rctr32w, $rctr32w, #1 @ CTR block 5 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 5 fmov $ctr1.d[1], $ctr32x @ CTR block 5 rev $ctr32w, $rctr32w @ CTR block 6 add $rctr32w, $rctr32w, #1 @ CTR block 6 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 6 eor $output_h1, $output_h1, $rk10_h @ AES block 1 - round 10 high eor $output_l0, $output_l0, $rk10_l @ AES block 0 - round 10 low eor $ctr2b, $res2b, $ctr2b @ AES block 2 - result eor $output_h0, $output_h0, $rk10_h @ AES block 0 - round 10 high stp $output_l0, $output_h0, [$output_ptr], #16 @ AES block 0 - store result stp $output_l1, $output_h1, [$output_ptr], #16 @ AES block 1 - store result b.ge .L128_dec_prepretail @ do prepretail .L128_dec_main_loop: @ main loop start eor $ctr3b, $res3b, $ctr3b @ AES block 4k+3 - result ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 mov $output_l2, $ctr2.d[0] @ AES block 4k+2 - mov low pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high mov $output_h2, $ctr2.d[1] @ AES block 4k+2 - mov high aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 fmov $ctr2d, $ctr96_b64x @ CTR block 4k+6 rev64 $res2b, $res2b @ GHASH block 4k+2 fmov $ctr2.d[1], $ctr32x @ CTR block 4k+6 rev $ctr32w, $rctr32w @ CTR block 4k+7 mov $output_l3, $ctr3.d[0] @ AES block 4k+3 - mov low eor $res0b, $res0b, $acc_lb @ PRE 1 mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 rev64 $res3b, $res3b @ GHASH block 4k+3 pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low mov $output_h3, $ctr3.d[1] @ AES block 4k+3 - mov high orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+7 pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low fmov $ctr3d, $ctr96_b64x @ CTR block 4k+7 eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 fmov $ctr3.d[1], $ctr32x @ CTR block 4k+7 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 mov $t0d, $res0.d[1] @ GHASH block 4k - mid aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 eor $output_l3, $output_l3, $rk10_l @ AES block 4k+3 - round 10 low pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid eor $output_h2, $output_h2, $rk10_h @ AES block 4k+2 - round 10 high mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid eor $output_h3, $output_h3, $rk10_h @ AES block 4k+3 - round 10 high aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 eor $output_l2, $output_l2, $rk10_l @ AES block 4k+2 - round 10 low aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 movi $mod_constant.8b, #0xc2 aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 stp $output_l2, $output_h2, [$output_ptr], #16 @ AES block 4k+2 - store result pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high ldr $res0q, [$input_ptr, #0] @ AES block 4k+4 - load ciphertext aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 add $rctr32w, $rctr32w, #1 @ CTR block 4k+7 aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 stp $output_l3, $output_h3, [$output_ptr], #16 @ AES block 4k+3 - store result aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 rev $ctr32w, $rctr32w @ CTR block 4k+8 pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid ldr $res1q, [$input_ptr, #16] @ AES block 4k+5 - load ciphertext ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment aese $ctr0b, $rk9 @ AES block 4k+4 - round 9 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+8 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up aese $ctr1b, $rk9 @ AES block 4k+5 - round 9 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 eor $ctr0b, $res0b, $ctr0b @ AES block 4k+4 - result aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 ldr $res2q, [$input_ptr, #32] @ AES block 4k+6 - load ciphertext add $rctr32w, $rctr32w, #1 @ CTR block 4k+8 eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid eor $ctr1b, $res1b, $ctr1b @ AES block 4k+5 - result aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 ldr $res3q, [$input_ptr, #48] @ AES block 4k+3 - load ciphertext aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 add $input_ptr, $input_ptr, #64 @ AES input_ptr update rev64 $res1b, $res1b @ GHASH block 4k+5 eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid mov $output_h0, $ctr0.d[1] @ AES block 4k+4 - mov high aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 mov $output_l0, $ctr0.d[0] @ AES block 4k+4 - mov low aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 fmov $ctr0d, $ctr96_b64x @ CTR block 4k+8 pmull $mod_constant.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low fmov $ctr0.d[1], $ctr32x @ CTR block 4k+8 rev $ctr32w, $rctr32w @ CTR block 4k+9 aese $ctr2b, $rk9 @ AES block 4k+6 - round 9 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+9 ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 eor $output_h0, $output_h0, $rk10_h @ AES block 4k+4 - round 10 high eor $acc_lb, $acc_lb, $mod_constant.16b @ MODULO - fold into low mov $output_h1, $ctr1.d[1] @ AES block 4k+5 - mov high eor $output_l0, $output_l0, $rk10_l @ AES block 4k+4 - round 10 low eor $ctr2b, $res2b, $ctr2b @ AES block 4k+6 - result mov $output_l1, $ctr1.d[0] @ AES block 4k+5 - mov low add $rctr32w, $rctr32w, #1 @ CTR block 4k+9 aese $ctr3b, $rk9 @ AES block 4k+7 - round 9 fmov $ctr1d, $ctr96_b64x @ CTR block 4k+9 cmp $input_ptr, $main_end_input_ptr @ LOOP CONTROL rev64 $res0b, $res0b @ GHASH block 4k+4 eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low fmov $ctr1.d[1], $ctr32x @ CTR block 4k+9 rev $ctr32w, $rctr32w @ CTR block 4k+10 add $rctr32w, $rctr32w, #1 @ CTR block 4k+10 eor $output_h1, $output_h1, $rk10_h @ AES block 4k+5 - round 10 high stp $output_l0, $output_h0, [$output_ptr], #16 @ AES block 4k+4 - store result eor $output_l1, $output_l1, $rk10_l @ AES block 4k+5 - round 10 low stp $output_l1, $output_h1, [$output_ptr], #16 @ AES block 4k+5 - store result orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+10 b.lt L128_dec_main_loop .L128_dec_prepretail: @ PREPRETAIL ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 mov $output_l2, $ctr2.d[0] @ AES block 4k+2 - mov low mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 eor $ctr3b, $res3b, $ctr3b @ AES block 4k+3 - result aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 mov $output_h2, $ctr2.d[1] @ AES block 4k+2 - mov high eor $res0b, $res0b, $acc_lb @ PRE 1 fmov $ctr2d, $ctr96_b64x @ CTR block 4k+6 rev64 $res2b, $res2b @ GHASH block 4k+2 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 fmov $ctr2.d[1], $ctr32x @ CTR block 4k+6 rev $ctr32w, $rctr32w @ CTR block 4k+7 mov $output_l3, $ctr3.d[0] @ AES block 4k+3 - mov low eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid mov $output_h3, $ctr3.d[1] @ AES block 4k+3 - mov high aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+7 pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low mov $t0d, $res0.d[1] @ GHASH block 4k - mid fmov $ctr3d, $ctr96_b64x @ CTR block 4k+7 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 fmov $ctr3.d[1], $ctr32x @ CTR block 4k+7 pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid rev64 $res3b, $res3b @ GHASH block 4k+3 aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high movi $mod_constant.8b, #0xc2 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 eor $output_l3, $output_l3, $rk10_l @ AES block 4k+3 - round 10 low pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid eor $output_l2, $output_l2, $rk10_l @ AES block 4k+2 - round 10 low eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 aese $ctr1b, $rk9 @ AES block 4k+5 - round 9 pmull $mod_constant.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low eor $output_h3, $output_h3, $rk10_h @ AES block 4k+3 - round 10 high aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 eor $acc_lb, $acc_lb, $mod_constant.16b @ MODULO - fold into low aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 eor $output_h2, $output_h2, $rk10_h @ AES block 4k+2 - round 10 high aese $ctr0b, $rk9 @ AES block 4k+4 - round 9 stp $output_l2, $output_h2, [$output_ptr], #16 @ AES block 4k+2 - store result aese $ctr2b, $rk9 @ AES block 4k+6 - round 9 add $rctr32w, $rctr32w, #1 @ CTR block 4k+7 stp $output_l3, $output_h3, [$output_ptr], #16 @ AES block 4k+3 - store result aese $ctr3b, $rk9 @ AES block 4k+7 - round 9 eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low .L128_dec_tail: @ TAIL sub $main_end_input_ptr, $end_input_ptr, $input_ptr @ main_end_input_ptr is number of bytes left to process ld1 { $res1b}, [$input_ptr], #16 @ AES block 4k+4 - load ciphertext eor $ctr0b, $res1b, $ctr0b @ AES block 4k+4 - result mov $output_h0, $ctr0.d[1] @ AES block 4k+4 - mov high mov $output_l0, $ctr0.d[0] @ AES block 4k+4 - mov low cmp $main_end_input_ptr, #48 eor $output_h0, $output_h0, $rk10_h @ AES block 4k+4 - round 10 high ext $t0.16b, $acc_lb, $acc_lb, #8 @ prepare final partial tag eor $output_l0, $output_l0, $rk10_l @ AES block 4k+4 - round 10 low b.gt .L128_dec_blocks_more_than_3 mov $ctr3b, $ctr2b sub $rctr32w, $rctr32w, #1 movi $acc_l.8b, #0 movi $acc_h.8b, #0 mov $ctr2b, $ctr1b movi $acc_m.8b, #0 cmp $main_end_input_ptr, #32 b.gt .L128_dec_blocks_more_than_2 cmp $main_end_input_ptr, #16 mov $ctr3b, $ctr1b sub $rctr32w, $rctr32w, #1 b.gt .L128_dec_blocks_more_than_1 sub $rctr32w, $rctr32w, #1 b .L128_dec_blocks_less_than_1 .L128_dec_blocks_more_than_3: @ blocks left > 3 rev64 $res0b, $res1b @ GHASH final-3 block ld1 { $res1b}, [$input_ptr], #16 @ AES final-2 block - load ciphertext eor $res0b, $res0b, $t0.16b @ feed in partial tag mov $acc_md, $h34k.d[1] @ GHASH final-3 block - mid stp $output_l0, $output_h0, [$output_ptr], #16 @ AES final-3 block - store result eor $ctr0b, $res1b, $ctr1b @ AES final-2 block - result mov $rk4d, $res0.d[1] @ GHASH final-3 block - mid mov $output_h0, $ctr0.d[1] @ AES final-2 block - mov high pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH final-3 block - low mov $output_l0, $ctr0.d[0] @ AES final-2 block - mov low pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH final-3 block - high eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-3 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in eor $output_h0, $output_h0, $rk10_h @ AES final-2 block - round 10 high pmull $acc_m.1q, $rk4v.1d, $acc_m.1d @ GHASH final-3 block - mid eor $output_l0, $output_l0, $rk10_l @ AES final-2 block - round 10 low .L128_dec_blocks_more_than_2: @ blocks left > 2 rev64 $res0b, $res1b @ GHASH final-2 block ld1 { $res1b}, [$input_ptr], #16 @ AES final-1 block - load ciphertext eor $res0b, $res0b, $t0.16b @ feed in partial tag eor $ctr0b, $res1b, $ctr2b @ AES final-1 block - result stp $output_l0, $output_h0, [$output_ptr], #16 @ AES final-2 block - store result mov $rk4d, $res0.d[1] @ GHASH final-2 block - mid pmull $rk3q1, $res0.1d, $h3.1d @ GHASH final-2 block - low pmull2 $rk2q1, $res0.2d, $h3.2d @ GHASH final-2 block - high mov $output_l0, $ctr0.d[0] @ AES final-1 block - mov low mov $output_h0, $ctr0.d[1] @ AES final-1 block - mov high eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-2 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in pmull $rk4v.1q, $rk4v.1d, $h34k.1d @ GHASH final-2 block - mid eor $output_l0, $output_l0, $rk10_l @ AES final-1 block - round 10 low eor $acc_lb, $acc_lb, $rk3 @ GHASH final-2 block - low eor $acc_hb, $acc_hb, $rk2 @ GHASH final-2 block - high eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-2 block - mid eor $output_h0, $output_h0, $rk10_h @ AES final-1 block - round 10 high .L128_dec_blocks_more_than_1: @ blocks left > 1 rev64 $res0b, $res1b @ GHASH final-1 block ld1 { $res1b}, [$input_ptr], #16 @ AES final block - load ciphertext eor $res0b, $res0b, $t0.16b @ feed in partial tag mov $rk4d, $res0.d[1] @ GHASH final-1 block - mid eor $ctr0b, $res1b, $ctr3b @ AES final block - result eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-1 block - mid stp $output_l0, $output_h0, [$output_ptr], #16 @ AES final-1 block - store result mov $output_l0, $ctr0.d[0] @ AES final block - mov low mov $output_h0, $ctr0.d[1] @ AES final block - mov high ins $rk4v.d[1], $rk4v.d[0] @ GHASH final-1 block - mid pmull $rk3q1, $res0.1d, $h2.1d @ GHASH final-1 block - low pmull2 $rk2q1, $res0.2d, $h2.2d @ GHASH final-1 block - high pmull2 $rk4v.1q, $rk4v.2d, $h12k.2d @ GHASH final-1 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in eor $acc_lb, $acc_lb, $rk3 @ GHASH final-1 block - low eor $acc_hb, $acc_hb, $rk2 @ GHASH final-1 block - high eor $output_h0, $output_h0, $rk10_h @ AES final block - round 10 high eor $output_l0, $output_l0, $rk10_l @ AES final block - round 10 low eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-1 block - mid .L128_dec_blocks_less_than_1: @ blocks left <= 1 mvn $rk10_h, xzr @ rk10_h = 0xffffffffffffffff and $bit_length, $bit_length, #127 @ bit_length %= 128 mvn $rk10_l, xzr @ rk10_l = 0xffffffffffffffff sub $bit_length, $bit_length, #128 @ bit_length -= 128 neg $bit_length, $bit_length @ bit_length = 128 - #bits in input (in range [1,128]) and $bit_length, $bit_length, #127 @ bit_length %= 128 lsr $rk10_h, $rk10_h, $bit_length @ rk10_h is mask for top 64b of last block cmp $bit_length, #64 csel $ctr96_b64x, $rk10_h, xzr, lt csel $ctr32x, $rk10_l, $rk10_h, lt fmov $ctr0d, $ctr32x @ ctr0b is mask for last block mov $ctr0.d[1], $ctr96_b64x and $res1b, $res1b, $ctr0b @ possibly partial last block has zeroes in highest bits rev64 $res0b, $res1b @ GHASH final block eor $res0b, $res0b, $t0.16b @ feed in partial tag ldp $end_input_ptr, $main_end_input_ptr, [$output_ptr] @ load existing bytes we need to not overwrite and $output_h0, $output_h0, $ctr96_b64x pmull2 $rk2q1, $res0.2d, $h1.2d @ GHASH final block - high mov $t0d, $res0.d[1] @ GHASH final block - mid eor $t0.8b, $t0.8b, $res0.8b @ GHASH final block - mid eor $acc_hb, $acc_hb, $rk2 @ GHASH final block - high pmull $t0.1q, $t0.1d, $h12k.1d @ GHASH final block - mid pmull $rk3q1, $res0.1d, $h1.1d @ GHASH final block - low bic $end_input_ptr, $end_input_ptr, $ctr32x @ mask out low existing bytes and $output_l0, $output_l0, $ctr32x rev $ctr32w, $rctr32w eor $acc_mb, $acc_mb, $t0.16b @ GHASH final block - mid movi $mod_constant.8b, #0xc2 eor $acc_lb, $acc_lb, $rk3 @ GHASH final block - low bic $main_end_input_ptr, $main_end_input_ptr, $ctr96_b64x @ mask out high existing bytes shl $mod_constantd, $mod_constantd, #56 @ mod_constant eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up orr $output_l0, $output_l0, $end_input_ptr str $ctr32w, [$counter, #12] @ store the updated counter orr $output_h0, $output_h0, $main_end_input_ptr stp $output_l0, $output_h0, [$output_ptr] ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid pmull $mod_constant.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment eor $acc_lb, $acc_lb, $mod_constant.16b @ MODULO - fold into low eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb mov x0, $len st1 { $acc_l.16b }, [$current_tag] ldp x21, x22, [sp, #16] ldp x23, x24, [sp, #32] ldp d8, d9, [sp, #48] ldp d10, d11, [sp, #64] ldp d12, d13, [sp, #80] ldp d14, d15, [sp, #96] ldp x19, x20, [sp], #112 ret .L128_dec_ret: mov w0, #0x0 ret .size aes_gcm_dec_128_kernel,.-aes_gcm_dec_128_kernel ___ } { my ($end_input_ptr,$main_end_input_ptr,$input_l0,$input_h0)=map("x$_",(4..7)); my ($input_l1,$input_h1,$input_l2,$input_h2,$input_l3,$input_h3)=map("x$_",(19..24)); my ($output_l1,$output_h1,$output_l2,$output_h2,$output_l3,$output_h3)=map("x$_",(19..24)); my ($output_l0,$output_h0)=map("x$_",(6..7)); my $ctr32w="w9"; my ($ctr32x,$ctr96_b64x,$ctr96_t32x,$rctr32x,$rk12_l,$rk12_h,$len)=map("x$_",(9..15)); my ($ctr96_t32w,$rctr32w)=map("w$_",(11..12)); my ($ctr0b,$ctr1b,$ctr2b,$ctr3b,$res0b,$res1b,$res2b,$res3b)=map("v$_.16b",(0..7)); my ($ctr0,$ctr1,$ctr2,$ctr3,$res0,$res1,$res2,$res3)=map("v$_",(0..7)); my ($ctr0d,$ctr1d,$ctr2d,$ctr3d,$res0d,$res1d,$res2d,$res3d)=map("d$_",(0..7)); my ($res0q,$res1q,$res2q,$res3q)=map("q$_",(4..7)); my ($acc_hb,$acc_mb,$acc_lb)=map("v$_.16b",(9..11)); my ($acc_h,$acc_m,$acc_l)=map("v$_",(9..11)); my ($acc_hd,$acc_md,$acc_ld)=map("d$_",(9..11)); my ($h1,$h2,$h3,$h4,$h12k,$h34k)=map("v$_",(12..17)); my ($h1q,$h2q,$h3q,$h4q)=map("q$_",(12..15)); my ($h1b,$h2b,$h3b,$h4b)=map("v$_.16b",(12..15)); my $t0="v8"; my $t0d="d8"; my $t3="v4"; my $t3d="d4"; my ($t1,$t2)=map("v$_",(30..31)); my ($t1d,$t2d)=map("d$_",(30..31)); my $t4="v30"; my $t4d="d30"; my $t5="v8"; my $t5d="d8"; my $t6="v31"; my $t6d="d31"; my $t7="v5"; my $t7d="d5"; my $t8="v6"; my $t8d="d6"; my $t9="v30"; my $t9d="d30"; my ($ctr_t0,$ctr_t1,$ctr_t2,$ctr_t3)=map("v$_",(4..7)); my ($ctr_t0d,$ctr_t1d,$ctr_t2d,$ctr_t3d)=map("d$_",(4..7)); my ($ctr_t0b,$ctr_t1b,$ctr_t2b,$ctr_t3b)=map("v$_.16b",(4..7)); my $mod_constantd="d8"; my $mod_constant="v8"; my $mod_t="v31"; my ($rk0,$rk1,$rk2,$rk3,$rk4,$rk5,$rk6,$rk7,$rk8,$rk9,$rk10,$rk11)=map("v$_.16b",(18..29)); my ($rk0q,$rk1q,$rk2q,$rk3q,$rk4q,$rk5q,$rk6q,$rk7q,$rk8q,$rk9q,$rk10q,$rk11q)=map("q$_",(18..29)); my $rk2q1="v20.1q"; my $rk3q1="v21.1q"; my $rk4v="v22"; my $rk4d="d22"; ######################################################################################### # size_t aes_gcm_enc_192_kernel(const unsigned char *in, # size_t len, # unsigned char *out, # const void *key, # unsigned char ivec[16], # u64 *Xi); # $code.=<<___; .global aes_gcm_enc_192_kernel .type aes_gcm_enc_192_kernel,%function .align 4 aes_gcm_enc_192_kernel: cbz x1, .L192_enc_ret stp x19, x20, [sp, #-112]! mov x16, x4 mov x8, x5 stp x21, x22, [sp, #16] stp x23, x24, [sp, #32] stp d8, d9, [sp, #48] stp d10, d11, [sp, #64] stp d12, d13, [sp, #80] stp d14, d15, [sp, #96] ldp $ctr96_b64x, $ctr96_t32x, [$counter] @ ctr96_b64, ctr96_t32 ldr $rk5q, [$cc, #80] @ load rk5 ldr $rk4q, [$cc, #64] @ load rk4 ldr $rk8q, [$cc, #128] @ load rk8 lsr $rctr32x, $ctr96_t32x, #32 ldr $rk6q, [$cc, #96] @ load rk6 orr $ctr96_t32w, $ctr96_t32w, $ctr96_t32w ldr $rk7q, [$cc, #112] @ load rk7 rev $rctr32w, $rctr32w @ rev_ctr32 add $rctr32w, $rctr32w, #1 @ increment rev_ctr32 fmov $ctr3d, $ctr96_b64x @ CTR block 3 rev $ctr32w, $rctr32w @ CTR block 1 add $rctr32w, $rctr32w, #1 @ CTR block 1 fmov $ctr1d, $ctr96_b64x @ CTR block 1 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 1 ld1 { $ctr0b}, [$counter] @ special case vector load initial counter so we can start first AES block as quickly as possible fmov $ctr1.d[1], $ctr32x @ CTR block 1 rev $ctr32w, $rctr32w @ CTR block 2 add $rctr32w, $rctr32w, #1 @ CTR block 2 fmov $ctr2d, $ctr96_b64x @ CTR block 2 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 2 fmov $ctr2.d[1], $ctr32x @ CTR block 2 rev $ctr32w, $rctr32w @ CTR block 3 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 3 ldr $rk0q, [$cc, #0] @ load rk0 fmov $ctr3.d[1], $ctr32x @ CTR block 3 ldr $rk3q, [$cc, #48] @ load rk3 ldp $rk12_l, $rk12_h, [$cc, #192] @ load rk12 ldr $rk1q, [$cc, #16] @ load rk1 aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 0 ld1 { $acc_lb}, [$current_tag] ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 0 ldr $rk11q, [$cc, #176] @ load rk11 aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 0 ldr $h4q, [$current_tag, #112] @ load h4l | h4h ext $h4b, $h4b, $h4b, #8 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 0 ldr $rk2q, [$cc, #32] @ load rk2 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 1 ldr $rk10q, [$cc, #160] @ load rk10 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 1 ldr $h1q, [$current_tag, #32] @ load h1l | h1h ext $h1b, $h1b, $h1b, #8 aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 1 ldr $rk9q, [$cc, #144] @ load rk9 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 1 ldr $h3q, [$current_tag, #80] @ load h3l | h3h ext $h3b, $h3b, $h3b, #8 aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 2 aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 2 aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 2 aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 3 trn1 $acc_h.2d, $h3.2d, $h4.2d @ h4h | h3h aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 3 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 2 trn2 $h34k.2d, $h3.2d, $h4.2d @ h4l | h3l aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 4 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 3 aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 3 aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 5 aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 4 aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 4 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 6 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 4 aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 5 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 5 aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 5 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 6 ldr $h2q, [$current_tag, #64] @ load h2l | h2h ext $h2b, $h2b, $h2b, #8 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 6 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 6 aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 7 aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 7 trn2 $h12k.2d, $h1.2d, $h2.2d @ h2l | h1l aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 7 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 8 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 7 trn1 $t0.2d, $h1.2d, $h2.2d @ h2h | h1h aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 8 aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 8 aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 9 aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 9 aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 9 aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 9 aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 10 aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 10 aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 10 lsr $main_end_input_ptr, $bit_length, #3 @ byte_len mov $len, $main_end_input_ptr aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 10 sub $main_end_input_ptr, $main_end_input_ptr, #1 @ byte_len - 1 eor $h12k.16b, $h12k.16b, $t0.16b @ h2k | h1k and $main_end_input_ptr, $main_end_input_ptr, #0xffffffffffffffc0 @ number of bytes to be processed in main loop (at least 1 byte must be handled by tail) eor $h34k.16b, $h34k.16b, $acc_h.16b @ h4k | h3k aese $ctr2b, $rk11 @ AES block 2 - round 11 add $end_input_ptr, $input_ptr, $bit_length, lsr #3 @ end_input_ptr add $main_end_input_ptr, $main_end_input_ptr, $input_ptr aese $ctr1b, $rk11 @ AES block 1 - round 11 cmp $input_ptr, $main_end_input_ptr @ check if we have <= 4 blocks aese $ctr0b, $rk11 @ AES block 0 - round 11 add $rctr32w, $rctr32w, #1 @ CTR block 3 aese $ctr3b, $rk11 @ AES block 3 - round 11 b.ge .L192_enc_tail @ handle tail rev $ctr32w, $rctr32w @ CTR block 4 ldp $input_l0, $input_h0, [$input_ptr, #0] @ AES block 0 - load plaintext orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4 ldp $input_l2, $input_h2, [$input_ptr, #32] @ AES block 2 - load plaintext ldp $input_l3, $input_h3, [$input_ptr, #48] @ AES block 3 - load plaintext ldp $input_l1, $input_h1, [$input_ptr, #16] @ AES block 1 - load plaintext add $input_ptr, $input_ptr, #64 @ AES input_ptr update cmp $input_ptr, $main_end_input_ptr @ check if we have <= 8 blocks eor $input_l0, $input_l0, $rk12_l @ AES block 0 - round 12 low eor $input_h0, $input_h0, $rk12_h @ AES block 0 - round 12 high eor $input_h2, $input_h2, $rk12_h @ AES block 2 - round 12 high fmov $ctr_t0d, $input_l0 @ AES block 0 - mov low eor $input_h3, $input_h3, $rk12_h @ AES block 3 - round 12 high fmov $ctr_t0.d[1], $input_h0 @ AES block 0 - mov high eor $input_l2, $input_l2, $rk12_l @ AES block 2 - round 12 low eor $input_l1, $input_l1, $rk12_l @ AES block 1 - round 12 low fmov $ctr_t1d, $input_l1 @ AES block 1 - mov low eor $input_h1, $input_h1, $rk12_h @ AES block 1 - round 12 high fmov $ctr_t1.d[1], $input_h1 @ AES block 1 - mov high eor $input_l3, $input_l3, $rk12_l @ AES block 3 - round 12 low fmov $ctr_t2d, $input_l2 @ AES block 2 - mov low add $rctr32w, $rctr32w, #1 @ CTR block 4 eor $res0b, $ctr_t0b, $ctr0b @ AES block 0 - result fmov $ctr0d, $ctr96_b64x @ CTR block 4 fmov $ctr0.d[1], $ctr32x @ CTR block 4 rev $ctr32w, $rctr32w @ CTR block 5 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 5 add $rctr32w, $rctr32w, #1 @ CTR block 5 fmov $ctr_t3d, $input_l3 @ AES block 3 - mov low st1 { $res0b}, [$output_ptr], #16 @ AES block 0 - store result fmov $ctr_t2.d[1], $input_h2 @ AES block 2 - mov high eor $res1b, $ctr_t1b, $ctr1b @ AES block 1 - result fmov $ctr1d, $ctr96_b64x @ CTR block 5 st1 { $res1b}, [$output_ptr], #16 @ AES block 1 - store result fmov $ctr_t3.d[1], $input_h3 @ AES block 3 - mov high fmov $ctr1.d[1], $ctr32x @ CTR block 5 rev $ctr32w, $rctr32w @ CTR block 6 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 6 add $rctr32w, $rctr32w, #1 @ CTR block 6 eor $res2b, $ctr_t2b, $ctr2b @ AES block 2 - result fmov $ctr2d, $ctr96_b64x @ CTR block 6 fmov $ctr2.d[1], $ctr32x @ CTR block 6 rev $ctr32w, $rctr32w @ CTR block 7 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 7 st1 { $res2b}, [$output_ptr], #16 @ AES block 2 - store result eor $res3b, $ctr_t3b, $ctr3b @ AES block 3 - result st1 { $res3b}, [$output_ptr], #16 @ AES block 3 - store result b.ge .L192_enc_prepretail @ do prepretail .L192_enc_main_loop: @ main loop start aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 rev64 $res1b, $res1b @ GHASH block 4k+1 (t0 and t1 free) aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 ldp $input_l1, $input_h1, [$input_ptr, #16] @ AES block 4k+5 - load plaintext ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 fmov $ctr3d, $ctr96_b64x @ CTR block 4k+3 rev64 $res0b, $res0b @ GHASH block 4k (only t0 is free) aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 fmov $ctr3.d[1], $ctr32x @ CTR block 4k+3 pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high rev64 $res3b, $res3b @ GHASH block 4k+3 (t0, t1, t2 and t3 free) ldp $input_l2, $input_h2, [$input_ptr, #32] @ AES block 4k+6 - load plaintext aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 ldp $input_l3, $input_h3, [$input_ptr, #48] @ AES block 4k+3 - load plaintext pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low eor $res0b, $res0b, $acc_lb @ PRE 1 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 rev64 $res2b, $res2b @ GHASH block 4k+2 (t0, t1, and t2 free) aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 eor $input_h3, $input_h3, $rk12_h @ AES block 4k+3 - round 12 high pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low mov $t0d, $res0.d[1] @ GHASH block 4k - mid aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 eor $input_l2, $input_l2, $rk12_l @ AES block 4k+6 - round 12 low eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 eor $input_l1, $input_l1, $rk12_l @ AES block 4k+5 - round 12 low aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high eor $input_h1, $input_h1, $rk12_h @ AES block 4k+5 - round 12 high ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 add $rctr32w, $rctr32w, #1 @ CTR block 4k+3 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid eor $input_h2, $input_h2, $rk12_h @ AES block 4k+6 - round 12 high pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid eor $input_l3, $input_l3, $rk12_l @ AES block 4k+3 - round 12 low mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid rev $ctr32w, $rctr32w @ CTR block 4k+8 pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+8 aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 ldp $input_l0, $input_h0, [$input_ptr, #0] @ AES block 4k+4 - load plaintext aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 add $input_ptr, $input_ptr, #64 @ AES input_ptr update aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 movi $mod_constant.8b, #0xc2 pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low eor $input_h0, $input_h0, $rk12_h @ AES block 4k+4 - round 12 high eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 eor $input_l0, $input_l0, $rk12_l @ AES block 4k+4 - round 12 low aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 fmov $ctr_t1d, $input_l1 @ AES block 4k+5 - mov low aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 fmov $ctr_t1.d[1], $input_h1 @ AES block 4k+5 - mov high aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid cmp $input_ptr, $main_end_input_ptr @ LOOP CONTROL fmov $ctr_t0d, $input_l0 @ AES block 4k+4 - mov low aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 fmov $ctr_t0.d[1], $input_h0 @ AES block 4k+4 - mov high aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 fmov $ctr_t3d, $input_l3 @ AES block 4k+3 - mov low eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up add $rctr32w, $rctr32w, #1 @ CTR block 4k+8 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 fmov $ctr_t3.d[1], $input_h3 @ AES block 4k+3 - mov high pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment fmov $ctr_t2d, $input_l2 @ AES block 4k+6 - mov low aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 9 eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 9 aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 10 eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 9 aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 9 aese $ctr0b, $rk11 @ AES block 4k+4 - round 11 aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 10 eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 10 eor $res0b, $ctr_t0b, $ctr0b @ AES block 4k+4 - result fmov $ctr0d, $ctr96_b64x @ CTR block 4k+8 aese $ctr1b, $rk11 @ AES block 4k+5 - round 11 fmov $ctr0.d[1], $ctr32x @ CTR block 4k+8 rev $ctr32w, $rctr32w @ CTR block 4k+9 pmull $acc_h.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low fmov $ctr_t2.d[1], $input_h2 @ AES block 4k+6 - mov high st1 { $res0b}, [$output_ptr], #16 @ AES block 4k+4 - store result aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 10 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+9 eor $res1b, $ctr_t1b, $ctr1b @ AES block 4k+5 - result add $rctr32w, $rctr32w, #1 @ CTR block 4k+9 fmov $ctr1d, $ctr96_b64x @ CTR block 4k+9 aese $ctr2b, $rk11 @ AES block 4k+6 - round 11 fmov $ctr1.d[1], $ctr32x @ CTR block 4k+9 rev $ctr32w, $rctr32w @ CTR block 4k+10 add $rctr32w, $rctr32w, #1 @ CTR block 4k+10 ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+10 st1 { $res1b}, [$output_ptr], #16 @ AES block 4k+5 - store result eor $acc_lb, $acc_lb, $acc_hb @ MODULO - fold into low aese $ctr3b, $rk11 @ AES block 4k+7 - round 11 eor $res2b, $ctr_t2b, $ctr2b @ AES block 4k+6 - result fmov $ctr2d, $ctr96_b64x @ CTR block 4k+10 st1 { $res2b}, [$output_ptr], #16 @ AES block 4k+6 - store result fmov $ctr2.d[1], $ctr32x @ CTR block 4k+10 rev $ctr32w, $rctr32w @ CTR block 4k+11 eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+11 eor $res3b, $ctr_t3b, $ctr3b @ AES block 4k+3 - result st1 { $res3b}, [$output_ptr], #16 @ AES block 4k+3 - store result b.lt .L192_enc_main_loop .L192_enc_prepretail: @ PREPRETAIL aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 rev64 $res0b, $res0b @ GHASH block 4k (only t0 is free) fmov $ctr3d, $ctr96_b64x @ CTR block 4k+3 ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 add $rctr32w, $rctr32w, #1 @ CTR block 4k+3 aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 rev64 $res1b, $res1b @ GHASH block 4k+1 (t0 and t1 free) aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 fmov $ctr3.d[1], $ctr32x @ CTR block 4k+3 eor $res0b, $res0b, $acc_lb @ PRE 1 mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 rev64 $res2b, $res2b @ GHASH block 4k+2 (t0, t1, and t2 free) pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low mov $t0d, $res0.d[1] @ GHASH block 4k - mid pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low rev64 $res3b, $res3b @ GHASH block 4k+3 (t0, t1, t2 and t3 free) pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low movi $mod_constant.8b, #0xc2 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 eor $acc_mb, $acc_mb, $acc_hb @ karatsuba tidy up aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 eor $acc_mb, $acc_mb, $acc_lb aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 pmull $t1.1q, $acc_h.1d, $mod_constant.1d aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 ext $acc_hb, $acc_hb, $acc_hb, #8 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 eor $acc_mb, $acc_mb, $t1.16b aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 9 aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 eor $acc_mb, $acc_mb, $acc_hb aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 9 aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 9 aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 9 pmull $t1.1q, $acc_m.1d, $mod_constant.1d ext $acc_mb, $acc_mb, $acc_mb, #8 aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 10 aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 10 aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 10 aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 10 eor $acc_lb, $acc_lb, $t1.16b aese $ctr0b, $rk11 @ AES block 4k+4 - round 11 aese $ctr3b, $rk11 @ AES block 4k+7 - round 11 aese $ctr2b, $rk11 @ AES block 4k+6 - round 11 aese $ctr1b, $rk11 @ AES block 4k+5 - round 11 eor $acc_lb, $acc_lb, $acc_mb .L192_enc_tail: @ TAIL sub $main_end_input_ptr, $end_input_ptr, $input_ptr @ main_end_input_ptr is number of bytes left to process ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES block 4k+4 - load plaintext eor $input_l0, $input_l0, $rk12_l @ AES block 4k+4 - round 12 low eor $input_h0, $input_h0, $rk12_h @ AES block 4k+4 - round 12 high fmov $ctr_t0d, $input_l0 @ AES block 4k+4 - mov low fmov $ctr_t0.d[1], $input_h0 @ AES block 4k+4 - mov high cmp $main_end_input_ptr, #48 eor $res1b, $ctr_t0b, $ctr0b @ AES block 4k+4 - result ext $t0.16b, $acc_lb, $acc_lb, #8 @ prepare final partial tag b.gt .L192_enc_blocks_more_than_3 sub $rctr32w, $rctr32w, #1 movi $acc_m.8b, #0 mov $ctr3b, $ctr2b movi $acc_h.8b, #0 cmp $main_end_input_ptr, #32 mov $ctr2b, $ctr1b movi $acc_l.8b, #0 b.gt .L192_enc_blocks_more_than_2 sub $rctr32w, $rctr32w, #1 mov $ctr3b, $ctr1b cmp $main_end_input_ptr, #16 b.gt .L192_enc_blocks_more_than_1 sub $rctr32w, $rctr32w, #1 b .L192_enc_blocks_less_than_1 .L192_enc_blocks_more_than_3: @ blocks left > 3 st1 { $res1b}, [$output_ptr], #16 @ AES final-3 block - store result ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES final-2 block - load input low & high rev64 $res0b, $res1b @ GHASH final-3 block eor $input_l0, $input_l0, $rk12_l @ AES final-2 block - round 12 low eor $res0b, $res0b, $t0.16b @ feed in partial tag eor $input_h0, $input_h0, $rk12_h @ AES final-2 block - round 12 high fmov $res1d, $input_l0 @ AES final-2 block - mov low fmov $res1.d[1], $input_h0 @ AES final-2 block - mov high mov $rk4d, $res0.d[1] @ GHASH final-3 block - mid pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH final-3 block - low mov $acc_md, $h34k.d[1] @ GHASH final-3 block - mid eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-3 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH final-3 block - high pmull $acc_m.1q, $rk4v.1d, $acc_m.1d @ GHASH final-3 block - mid eor $res1b, $res1b, $ctr1b @ AES final-2 block - result .L192_enc_blocks_more_than_2: @ blocks left > 2 st1 { $res1b}, [$output_ptr], #16 @ AES final-2 block - store result rev64 $res0b, $res1b @ GHASH final-2 block ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES final-1 block - load input low & high eor $res0b, $res0b, $t0.16b @ feed in partial tag eor $input_h0, $input_h0, $rk12_h @ AES final-1 block - round 12 high pmull2 $rk2q1, $res0.2d, $h3.2d @ GHASH final-2 block - high mov $rk4d, $res0.d[1] @ GHASH final-2 block - mid pmull $rk3q1, $res0.1d, $h3.1d @ GHASH final-2 block - low eor $input_l0, $input_l0, $rk12_l @ AES final-1 block - round 12 low fmov $res1d, $input_l0 @ AES final-1 block - mov low fmov $res1.d[1], $input_h0 @ AES final-1 block - mov high eor $acc_hb, $acc_hb, $rk2 @ GHASH final-2 block - high eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-2 block - mid eor $acc_lb, $acc_lb, $rk3 @ GHASH final-2 block - low pmull $rk4v.1q, $rk4v.1d, $h34k.1d @ GHASH final-2 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in eor $res1b, $res1b, $ctr2b @ AES final-1 block - result eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-2 block - mid .L192_enc_blocks_more_than_1: @ blocks left > 1 st1 { $res1b}, [$output_ptr], #16 @ AES final-1 block - store result ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES final block - load input low & high rev64 $res0b, $res1b @ GHASH final-1 block eor $input_l0, $input_l0, $rk12_l @ AES final block - round 12 low eor $res0b, $res0b, $t0.16b @ feed in partial tag movi $t0.8b, #0 @ suppress further partial tag feed in mov $rk4d, $res0.d[1] @ GHASH final-1 block - mid eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-1 block - mid eor $input_h0, $input_h0, $rk12_h @ AES final block - round 12 high fmov $res1d, $input_l0 @ AES final block - mov low pmull2 $rk2q1, $res0.2d, $h2.2d @ GHASH final-1 block - high fmov $res1.d[1], $input_h0 @ AES final block - mov high ins $rk4v.d[1], $rk4v.d[0] @ GHASH final-1 block - mid eor $acc_hb, $acc_hb, $rk2 @ GHASH final-1 block - high pmull $rk3q1, $res0.1d, $h2.1d @ GHASH final-1 block - low pmull2 $rk4v.1q, $rk4v.2d, $h12k.2d @ GHASH final-1 block - mid eor $res1b, $res1b, $ctr3b @ AES final block - result eor $acc_lb, $acc_lb, $rk3 @ GHASH final-1 block - low eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-1 block - mid .L192_enc_blocks_less_than_1: @ blocks left <= 1 ld1 { $rk0}, [$output_ptr] @ load existing bytes where the possibly partial last block is to be stored rev $ctr32w, $rctr32w and $bit_length, $bit_length, #127 @ bit_length %= 128 sub $bit_length, $bit_length, #128 @ bit_length -= 128 mvn $rk12_h, xzr @ rk12_h = 0xffffffffffffffff neg $bit_length, $bit_length @ bit_length = 128 - #bits in input (in range [1,128]) mvn $rk12_l, xzr @ rk12_l = 0xffffffffffffffff and $bit_length, $bit_length, #127 @ bit_length %= 128 lsr $rk12_h, $rk12_h, $bit_length @ rk12_h is mask for top 64b of last block cmp $bit_length, #64 csel $input_l0, $rk12_l, $rk12_h, lt csel $input_h0, $rk12_h, xzr, lt fmov $ctr0d, $input_l0 @ ctr0b is mask for last block fmov $ctr0.d[1], $input_h0 and $res1b, $res1b, $ctr0b @ possibly partial last block has zeroes in highest bits rev64 $res0b, $res1b @ GHASH final block eor $res0b, $res0b, $t0.16b @ feed in partial tag mov $t0d, $res0.d[1] @ GHASH final block - mid pmull $rk3q1, $res0.1d, $h1.1d @ GHASH final block - low pmull2 $rk2q1, $res0.2d, $h1.2d @ GHASH final block - high eor $t0.8b, $t0.8b, $res0.8b @ GHASH final block - mid eor $acc_lb, $acc_lb, $rk3 @ GHASH final block - low eor $acc_hb, $acc_hb, $rk2 @ GHASH final block - high pmull $t0.1q, $t0.1d, $h12k.1d @ GHASH final block - mid eor $acc_mb, $acc_mb, $t0.16b @ GHASH final block - mid movi $mod_constant.8b, #0xc2 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up shl $mod_constantd, $mod_constantd, #56 @ mod_constant bif $res1b, $rk0, $ctr0b @ insert existing bytes in top end of result before storing eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid pmull $acc_h.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment eor $acc_lb, $acc_lb, $acc_hb @ MODULO - fold into low str $ctr32w, [$counter, #12] @ store the updated counter st1 { $res1b}, [$output_ptr] @ store all 16B eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb mov x0, $len st1 { $acc_l.16b }, [$current_tag] ldp x21, x22, [sp, #16] ldp x23, x24, [sp, #32] ldp d8, d9, [sp, #48] ldp d10, d11, [sp, #64] ldp d12, d13, [sp, #80] ldp d14, d15, [sp, #96] ldp x19, x20, [sp], #112 ret .L192_enc_ret: mov w0, #0x0 ret .size aes_gcm_enc_192_kernel,.-aes_gcm_enc_192_kernel ___ ######################################################################################### # size_t aes_gcm_dec_192_kernel(const unsigned char *in, # size_t len, # unsigned char *out, # const void *key, # unsigned char ivec[16], # u64 *Xi); # $code.=<<___; .global aes_gcm_dec_192_kernel .type aes_gcm_dec_192_kernel,%function .align 4 aes_gcm_dec_192_kernel: cbz x1, .L192_dec_ret stp x19, x20, [sp, #-112]! mov x16, x4 mov x8, x5 stp x21, x22, [sp, #16] stp x23, x24, [sp, #32] stp d8, d9, [sp, #48] stp d10, d11, [sp, #64] stp d12, d13, [sp, #80] stp d14, d15, [sp, #96] add $end_input_ptr, $input_ptr, $bit_length, lsr #3 @ end_input_ptr ldp $ctr96_b64x, $ctr96_t32x, [$counter] @ ctr96_b64, ctr96_t32 ld1 { $ctr0b}, [$counter] @ special case vector load initial counter so we can start first AES block as quickly as possible ldr $rk0q, [$cc, #0] @ load rk0 lsr $main_end_input_ptr, $bit_length, #3 @ byte_len mov $len, $main_end_input_ptr ldr $rk2q, [$cc, #32] @ load rk2 lsr $rctr32x, $ctr96_t32x, #32 orr $ctr96_t32w, $ctr96_t32w, $ctr96_t32w fmov $ctr3d, $ctr96_b64x @ CTR block 3 rev $rctr32w, $rctr32w @ rev_ctr32 fmov $ctr1d, $ctr96_b64x @ CTR block 1 add $rctr32w, $rctr32w, #1 @ increment rev_ctr32 ldr $rk1q, [$cc, #16] @ load rk1 aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 0 rev $ctr32w, $rctr32w @ CTR block 1 add $rctr32w, $rctr32w, #1 @ CTR block 1 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 1 ldr $rk3q, [$cc, #48] @ load rk3 fmov $ctr1.d[1], $ctr32x @ CTR block 1 rev $ctr32w, $rctr32w @ CTR block 2 add $rctr32w, $rctr32w, #1 @ CTR block 2 fmov $ctr2d, $ctr96_b64x @ CTR block 2 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 2 fmov $ctr2.d[1], $ctr32x @ CTR block 2 rev $ctr32w, $rctr32w @ CTR block 3 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 1 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 3 fmov $ctr3.d[1], $ctr32x @ CTR block 3 ldr $rk8q, [$cc, #128] @ load rk8 aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 2 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 0 ldr $rk11q, [$cc, #176] @ load rk11 aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 0 ldr $h4q, [$current_tag, #112] @ load h4l | h4h ext $h4b, $h4b, $h4b, #8 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 0 ldr $h2q, [$current_tag, #64] @ load h2l | h2h ext $h2b, $h2b, $h2b, #8 aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 1 ldr $h3q, [$current_tag, #80] @ load h3l | h3h ext $h3b, $h3b, $h3b, #8 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 1 ldp $rk12_l, $rk12_h, [$cc, #192] @ load rk12 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 1 ldr $h1q, [$current_tag, #32] @ load h1l | h1h ext $h1b, $h1b, $h1b, #8 aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 2 ldr $rk10q, [$cc, #160] @ load rk10 aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 3 ldr $rk9q, [$cc, #144] @ load rk9 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 2 ldr $rk7q, [$cc, #112] @ load rk7 aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 2 ldr $rk4q, [$cc, #64] @ load rk4 aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 3 ld1 { $acc_lb}, [$current_tag] ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 3 add $rctr32w, $rctr32w, #1 @ CTR block 3 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 3 trn1 $acc_h.2d, $h3.2d, $h4.2d @ h4h | h3h aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 4 ldr $rk5q, [$cc, #80] @ load rk5 aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 4 trn2 $h34k.2d, $h3.2d, $h4.2d @ h4l | h3l aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 4 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 4 trn2 $h12k.2d, $h1.2d, $h2.2d @ h2l | h1l aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 5 ldr $rk6q, [$cc, #96] @ load rk6 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 5 aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 5 aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 5 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 6 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 6 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 6 aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 7 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 7 aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 7 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 6 aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 8 aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 7 aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 9 aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 9 aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 8 sub $main_end_input_ptr, $main_end_input_ptr, #1 @ byte_len - 1 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 8 and $main_end_input_ptr, $main_end_input_ptr, #0xffffffffffffffc0 @ number of bytes to be processed in main loop (at least 1 byte must be handled by tail) aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 10 add $main_end_input_ptr, $main_end_input_ptr, $input_ptr aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 9 cmp $input_ptr, $main_end_input_ptr @ check if we have <= 4 blocks aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 9 trn1 $t0.2d, $h1.2d, $h2.2d @ h2h | h1h aese $ctr3b, $rk11 @ AES block 3 - round 11 aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 10 aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 10 aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 10 eor $h12k.16b, $h12k.16b, $t0.16b @ h2k | h1k aese $ctr2b, $rk11 @ AES block 2 - round 11 aese $ctr1b, $rk11 @ AES block 1 - round 11 eor $h34k.16b, $h34k.16b, $acc_h.16b @ h4k | h3k aese $ctr0b, $rk11 @ AES block 0 - round 11 b.ge .L192_dec_tail @ handle tail ldr $res1q, [$input_ptr, #16] @ AES block 1 - load ciphertext ldr $res0q, [$input_ptr, #0] @ AES block 0 - load ciphertext eor $ctr1b, $res1b, $ctr1b @ AES block 1 - result eor $ctr0b, $res0b, $ctr0b @ AES block 0 - result rev $ctr32w, $rctr32w @ CTR block 4 ldr $res3q, [$input_ptr, #48] @ AES block 3 - load ciphertext ldr $res2q, [$input_ptr, #32] @ AES block 2 - load ciphertext mov $output_l1, $ctr1.d[0] @ AES block 1 - mov low mov $output_h1, $ctr1.d[1] @ AES block 1 - mov high mov $output_l0, $ctr0.d[0] @ AES block 0 - mov low orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4 add $rctr32w, $rctr32w, #1 @ CTR block 4 mov $output_h0, $ctr0.d[1] @ AES block 0 - mov high rev64 $res0b, $res0b @ GHASH block 0 add $input_ptr, $input_ptr, #64 @ AES input_ptr update fmov $ctr0d, $ctr96_b64x @ CTR block 4 rev64 $res1b, $res1b @ GHASH block 1 cmp $input_ptr, $main_end_input_ptr @ check if we have <= 8 blocks eor $output_l1, $output_l1, $rk12_l @ AES block 1 - round 12 low fmov $ctr0.d[1], $ctr32x @ CTR block 4 rev $ctr32w, $rctr32w @ CTR block 5 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 5 fmov $ctr1d, $ctr96_b64x @ CTR block 5 eor $output_h1, $output_h1, $rk12_h @ AES block 1 - round 12 high add $rctr32w, $rctr32w, #1 @ CTR block 5 fmov $ctr1.d[1], $ctr32x @ CTR block 5 eor $output_l0, $output_l0, $rk12_l @ AES block 0 - round 12 low rev $ctr32w, $rctr32w @ CTR block 6 eor $output_h0, $output_h0, $rk12_h @ AES block 0 - round 12 high stp $output_l0, $output_h0, [$output_ptr], #16 @ AES block 0 - store result orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 6 stp $output_l1, $output_h1, [$output_ptr], #16 @ AES block 1 - store result add $rctr32w, $rctr32w, #1 @ CTR block 6 eor $ctr2b, $res2b, $ctr2b @ AES block 2 - result b.ge .L192_dec_prepretail @ do prepretail .L192_dec_main_loop: @ main loop start aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low mov $output_l2, $ctr2.d[0] @ AES block 4k+2 - mov low mov $output_h2, $ctr2.d[1] @ AES block 4k+2 - mov high eor $ctr3b, $res3b, $ctr3b @ AES block 4k+3 - result rev64 $res3b, $res3b @ GHASH block 4k+3 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 fmov $ctr2d, $ctr96_b64x @ CTR block 4k+6 aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 eor $res0b, $res0b, $acc_lb @ PRE 1 pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high fmov $ctr2.d[1], $ctr32x @ CTR block 4k+6 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 mov $output_h3, $ctr3.d[1] @ AES block 4k+3 - mov high aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 mov $output_l3, $ctr3.d[0] @ AES block 4k+3 - mov low pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high fmov $ctr3d, $ctr96_b64x @ CTR block 4k+7 mov $t0d, $res0.d[1] @ GHASH block 4k - mid pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid rev $ctr32w, $rctr32w @ CTR block 4k+7 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+7 fmov $ctr3.d[1], $ctr32x @ CTR block 4k+7 eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 eor $output_h2, $output_h2, $rk12_h @ AES block 4k+2 - round 12 high aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 rev64 $res2b, $res2b @ GHASH block 4k+2 aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low eor $output_l2, $output_l2, $rk12_l @ AES block 4k+2 - round 12 low aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 movi $mod_constant.8b, #0xc2 pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 9 eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 10 aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 9 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 10 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 ldr $res2q, [$input_ptr, #32] @ AES block 4k+6 - load ciphertext aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid ldr $res3q, [$input_ptr, #48] @ AES block 4k+7 - load ciphertext eor $output_l3, $output_l3, $rk12_l @ AES block 4k+3 - round 12 low aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment aese $ctr0b, $rk11 @ AES block 4k+4 - round 11 add $rctr32w, $rctr32w, #1 @ CTR block 4k+7 aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 ldr $res0q, [$input_ptr, #0] @ AES block 4k+4 - load ciphertext aese $ctr1b, $rk11 @ AES block 4k+5 - round 11 ldr $res1q, [$input_ptr, #16] @ AES block 4k+5 - load ciphertext rev $ctr32w, $rctr32w @ CTR block 4k+8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 stp $output_l2, $output_h2, [$output_ptr], #16 @ AES block 4k+2 - store result aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 9 eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid add $input_ptr, $input_ptr, #64 @ AES input_ptr update cmp $input_ptr, $main_end_input_ptr @ LOOP CONTROL eor $ctr0b, $res0b, $ctr0b @ AES block 4k+4 - result eor $output_h3, $output_h3, $rk12_h @ AES block 4k+3 - round 12 high eor $ctr1b, $res1b, $ctr1b @ AES block 4k+5 - result aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 10 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+8 aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 9 pmull $mod_constant.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low mov $output_l1, $ctr1.d[0] @ AES block 4k+5 - mov low mov $output_l0, $ctr0.d[0] @ AES block 4k+4 - mov low stp $output_l3, $output_h3, [$output_ptr], #16 @ AES block 4k+3 - store result rev64 $res1b, $res1b @ GHASH block 4k+5 aese $ctr2b, $rk11 @ AES block 4k+6 - round 11 mov $output_h0, $ctr0.d[1] @ AES block 4k+4 - mov high aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 10 mov $output_h1, $ctr1.d[1] @ AES block 4k+5 - mov high fmov $ctr0d, $ctr96_b64x @ CTR block 4k+8 add $rctr32w, $rctr32w, #1 @ CTR block 4k+8 ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment eor $ctr2b, $res2b, $ctr2b @ AES block 4k+6 - result fmov $ctr0.d[1], $ctr32x @ CTR block 4k+8 rev $ctr32w, $rctr32w @ CTR block 4k+9 eor $output_l0, $output_l0, $rk12_l @ AES block 4k+4 - round 12 low orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+9 eor $acc_lb, $acc_lb, $mod_constant.16b @ MODULO - fold into low fmov $ctr1d, $ctr96_b64x @ CTR block 4k+9 add $rctr32w, $rctr32w, #1 @ CTR block 4k+9 eor $output_l1, $output_l1, $rk12_l @ AES block 4k+5 - round 12 low fmov $ctr1.d[1], $ctr32x @ CTR block 4k+9 rev $ctr32w, $rctr32w @ CTR block 4k+10 eor $output_h1, $output_h1, $rk12_h @ AES block 4k+5 - round 12 high eor $output_h0, $output_h0, $rk12_h @ AES block 4k+4 - round 12 high stp $output_l0, $output_h0, [$output_ptr], #16 @ AES block 4k+4 - store result eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low add $rctr32w, $rctr32w, #1 @ CTR block 4k+10 rev64 $res0b, $res0b @ GHASH block 4k+4 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+10 aese $ctr3b, $rk11 @ AES block 4k+7 - round 11 stp $output_l1, $output_h1, [$output_ptr], #16 @ AES block 4k+5 - store result b.lt .L192_dec_main_loop .L192_dec_prepretail: @ PREPRETAIL mov $output_h2, $ctr2.d[1] @ AES block 4k+2 - mov high ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 eor $ctr3b, $res3b, $ctr3b @ AES block 4k+3 - result aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 mov $output_l2, $ctr2.d[0] @ AES block 4k+2 - mov low aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid eor $res0b, $res0b, $acc_lb @ PRE 1 fmov $ctr2d, $ctr96_b64x @ CTR block 4k+6 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 mov $output_l3, $ctr3.d[0] @ AES block 4k+3 - mov low aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 mov $output_h3, $ctr3.d[1] @ AES block 4k+3 - mov high pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low mov $t0d, $res0.d[1] @ GHASH block 4k - mid fmov $ctr3d, $ctr96_b64x @ CTR block 4k+7 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 rev64 $res2b, $res2b @ GHASH block 4k+2 pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high fmov $ctr2.d[1], $ctr32x @ CTR block 4k+6 rev $ctr32w, $rctr32w @ CTR block 4k+7 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+7 eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low eor $output_h3, $output_h3, $rk12_h @ AES block 4k+3 - round 12 high fmov $ctr3.d[1], $ctr32x @ CTR block 4k+7 aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 eor $output_l2, $output_l2, $rk12_l @ AES block 4k+2 - round 12 low pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high eor $output_h2, $output_h2, $rk12_h @ AES block 4k+2 - round 12 high eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid eor $output_l3, $output_l3, $rk12_l @ AES block 4k+3 - round 12 low stp $output_l2, $output_h2, [$output_ptr], #16 @ AES block 4k+2 - store result rev64 $res3b, $res3b @ GHASH block 4k+3 stp $output_l3, $output_h3, [$output_ptr], #16 @ AES block 4k+3 - store result aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid add $rctr32w, $rctr32w, #1 @ CTR block 4k+7 pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high movi $mod_constant.8b, #0xc2 pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 shl $mod_constantd, $mod_constantd, #56 @ mod_constant eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 9 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 10 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 9 aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 9 pmull $mod_constant.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 9 aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 10 aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 10 ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 10 aese $ctr0b, $rk11 eor $acc_lb, $acc_lb, $mod_constant.16b @ MODULO - fold into low aese $ctr2b, $rk11 aese $ctr1b, $rk11 aese $ctr3b, $rk11 eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low .L192_dec_tail: @ TAIL sub $main_end_input_ptr, $end_input_ptr, $input_ptr @ main_end_input_ptr is number of bytes left to process ld1 { $res1b}, [$input_ptr], #16 @ AES block 4k+4 - load ciphertext eor $ctr0b, $res1b, $ctr0b @ AES block 4k+4 - result mov $output_h0, $ctr0.d[1] @ AES block 4k+4 - mov high mov $output_l0, $ctr0.d[0] @ AES block 4k+4 - mov low ext $t0.16b, $acc_lb, $acc_lb, #8 @ prepare final partial tag cmp $main_end_input_ptr, #48 eor $output_h0, $output_h0, $rk12_h @ AES block 4k+4 - round 12 high eor $output_l0, $output_l0, $rk12_l @ AES block 4k+4 - round 12 low b.gt .L192_dec_blocks_more_than_3 movi $acc_l.8b, #0 movi $acc_h.8b, #0 mov $ctr3b, $ctr2b mov $ctr2b, $ctr1b sub $rctr32w, $rctr32w, #1 movi $acc_m.8b, #0 cmp $main_end_input_ptr, #32 b.gt .L192_dec_blocks_more_than_2 mov $ctr3b, $ctr1b cmp $main_end_input_ptr, #16 sub $rctr32w, $rctr32w, #1 b.gt .L192_dec_blocks_more_than_1 sub $rctr32w, $rctr32w, #1 b .L192_dec_blocks_less_than_1 .L192_dec_blocks_more_than_3: @ blocks left > 3 rev64 $res0b, $res1b @ GHASH final-3 block ld1 { $res1b}, [$input_ptr], #16 @ AES final-2 block - load ciphertext stp $output_l0, $output_h0, [$output_ptr], #16 @ AES final-3 block - store result eor $res0b, $res0b, $t0.16b @ feed in partial tag eor $ctr0b, $res1b, $ctr1b @ AES final-2 block - result pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH final-3 block - low mov $output_l0, $ctr0.d[0] @ AES final-2 block - mov low mov $rk4d, $res0.d[1] @ GHASH final-3 block - mid mov $output_h0, $ctr0.d[1] @ AES final-2 block - mov high mov $acc_md, $h34k.d[1] @ GHASH final-3 block - mid eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-3 block - mid pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH final-3 block - high eor $output_l0, $output_l0, $rk12_l @ AES final-2 block - round 12 low movi $t0.8b, #0 @ suppress further partial tag feed in pmull $acc_m.1q, $rk4v.1d, $acc_m.1d @ GHASH final-3 block - mid eor $output_h0, $output_h0, $rk12_h @ AES final-2 block - round 12 high .L192_dec_blocks_more_than_2: @ blocks left > 2 rev64 $res0b, $res1b @ GHASH final-2 block ld1 { $res1b}, [$input_ptr], #16 @ AES final-1 block - load ciphertext eor $res0b, $res0b, $t0.16b @ feed in partial tag movi $t0.8b, #0 @ suppress further partial tag feed in eor $ctr0b, $res1b, $ctr2b @ AES final-1 block - result mov $rk4d, $res0.d[1] @ GHASH final-2 block - mid pmull $rk3q1, $res0.1d, $h3.1d @ GHASH final-2 block - low stp $output_l0, $output_h0, [$output_ptr], #16 @ AES final-2 block - store result eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-2 block - mid mov $output_h0, $ctr0.d[1] @ AES final-1 block - mov high eor $acc_lb, $acc_lb, $rk3 @ GHASH final-2 block - low mov $output_l0, $ctr0.d[0] @ AES final-1 block - mov low pmull2 $rk2q1, $res0.2d, $h3.2d @ GHASH final-2 block - high pmull $rk4v.1q, $rk4v.1d, $h34k.1d @ GHASH final-2 block - mid eor $acc_hb, $acc_hb, $rk2 @ GHASH final-2 block - high eor $output_h0, $output_h0, $rk12_h @ AES final-1 block - round 12 high eor $output_l0, $output_l0, $rk12_l @ AES final-1 block - round 12 low eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-2 block - mid .L192_dec_blocks_more_than_1: @ blocks left > 1 rev64 $res0b, $res1b @ GHASH final-1 block eor $res0b, $res0b, $t0.16b @ feed in partial tag ld1 { $res1b}, [$input_ptr], #16 @ AES final block - load ciphertext mov $rk4d, $res0.d[1] @ GHASH final-1 block - mid pmull2 $rk2q1, $res0.2d, $h2.2d @ GHASH final-1 block - high eor $ctr0b, $res1b, $ctr3b @ AES final block - result stp $output_l0, $output_h0, [$output_ptr], #16 @ AES final-1 block - store result eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-1 block - mid eor $acc_hb, $acc_hb, $rk2 @ GHASH final-1 block - high pmull $rk3q1, $res0.1d, $h2.1d @ GHASH final-1 block - low mov $output_h0, $ctr0.d[1] @ AES final block - mov high ins $rk4v.d[1], $rk4v.d[0] @ GHASH final-1 block - mid mov $output_l0, $ctr0.d[0] @ AES final block - mov low pmull2 $rk4v.1q, $rk4v.2d, $h12k.2d @ GHASH final-1 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in eor $acc_lb, $acc_lb, $rk3 @ GHASH final-1 block - low eor $output_h0, $output_h0, $rk12_h @ AES final block - round 12 high eor $output_l0, $output_l0, $rk12_l @ AES final block - round 12 low eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-1 block - mid .L192_dec_blocks_less_than_1: @ blocks left <= 1 mvn $rk12_l, xzr @ rk12_l = 0xffffffffffffffff ldp $end_input_ptr, $main_end_input_ptr, [$output_ptr] @ load existing bytes we need to not overwrite and $bit_length, $bit_length, #127 @ bit_length %= 128 sub $bit_length, $bit_length, #128 @ bit_length -= 128 neg $bit_length, $bit_length @ bit_length = 128 - #bits in input (in range [1,128]) and $bit_length, $bit_length, #127 @ bit_length %= 128 mvn $rk12_h, xzr @ rk12_h = 0xffffffffffffffff lsr $rk12_h, $rk12_h, $bit_length @ rk12_h is mask for top 64b of last block cmp $bit_length, #64 csel $ctr32x, $rk12_l, $rk12_h, lt csel $ctr96_b64x, $rk12_h, xzr, lt fmov $ctr0d, $ctr32x @ ctr0b is mask for last block and $output_l0, $output_l0, $ctr32x bic $end_input_ptr, $end_input_ptr, $ctr32x @ mask out low existing bytes orr $output_l0, $output_l0, $end_input_ptr mov $ctr0.d[1], $ctr96_b64x rev $ctr32w, $rctr32w and $res1b, $res1b, $ctr0b @ possibly partial last block has zeroes in highest bits str $ctr32w, [$counter, #12] @ store the updated counter rev64 $res0b, $res1b @ GHASH final block eor $res0b, $res0b, $t0.16b @ feed in partial tag bic $main_end_input_ptr, $main_end_input_ptr, $ctr96_b64x @ mask out high existing bytes and $output_h0, $output_h0, $ctr96_b64x pmull2 $rk2q1, $res0.2d, $h1.2d @ GHASH final block - high mov $t0d, $res0.d[1] @ GHASH final block - mid pmull $rk3q1, $res0.1d, $h1.1d @ GHASH final block - low eor $t0.8b, $t0.8b, $res0.8b @ GHASH final block - mid eor $acc_hb, $acc_hb, $rk2 @ GHASH final block - high pmull $t0.1q, $t0.1d, $h12k.1d @ GHASH final block - mid eor $acc_lb, $acc_lb, $rk3 @ GHASH final block - low eor $acc_mb, $acc_mb, $t0.16b @ GHASH final block - mid movi $mod_constant.8b, #0xc2 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up shl $mod_constantd, $mod_constantd, #56 @ mod_constant eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid orr $output_h0, $output_h0, $main_end_input_ptr stp $output_l0, $output_h0, [$output_ptr] ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid pmull $mod_constant.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low eor $acc_lb, $acc_lb, $mod_constant.16b @ MODULO - fold into low ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb mov x0, $len st1 { $acc_l.16b }, [$current_tag] ldp x21, x22, [sp, #16] ldp x23, x24, [sp, #32] ldp d8, d9, [sp, #48] ldp d10, d11, [sp, #64] ldp d12, d13, [sp, #80] ldp d14, d15, [sp, #96] ldp x19, x20, [sp], #112 ret .L192_dec_ret: mov w0, #0x0 ret .size aes_gcm_dec_192_kernel,.-aes_gcm_dec_192_kernel ___ } { my ($end_input_ptr,$main_end_input_ptr,$input_l0,$input_h0)=map("x$_",(4..7)); my ($input_l1,$input_h1,$input_l2,$input_h2,$input_l3,$input_h3)=map("x$_",(19..24)); my ($output_l1,$output_h1,$output_l2,$output_h2,$output_l3,$output_h3)=map("x$_",(19..24)); my ($output_l0,$output_h0)=map("x$_",(6..7)); my $ctr32w="w9"; my ($ctr32x,$ctr96_b64x,$ctr96_t32x,$rctr32x,$rk14_l,$rk14_h,$len)=map("x$_",(9..15)); my ($ctr96_t32w,$rctr32w)=map("w$_",(11..12)); my ($ctr0b,$ctr1b,$ctr2b,$ctr3b,$res0b,$res1b,$res2b,$res3b)=map("v$_.16b",(0..7)); my ($ctr0,$ctr1,$ctr2,$ctr3,$res0,$res1,$res2,$res3)=map("v$_",(0..7)); my ($ctr0d,$ctr1d,$ctr2d,$ctr3d,$res0d,$res1d,$res2d,$res3d)=map("d$_",(0..7)); my ($res0q,$res1q,$res2q,$res3q)=map("q$_",(4..7)); my ($acc_hb,$acc_mb,$acc_lb)=map("v$_.16b",(9..11)); my ($acc_h,$acc_m,$acc_l)=map("v$_",(9..11)); my ($acc_hd,$acc_md,$acc_ld)=map("d$_",(9..11)); my ($h1,$h2,$h3,$h4,$h12k,$h34k)=map("v$_",(12..17)); my ($h1q,$h2q,$h3q,$h4q)=map("q$_",(12..15)); my ($h1b,$h2b,$h3b,$h4b)=map("v$_.16b",(12..15)); my $t0="v8"; my $t0d="d8"; my $t1="v4"; my $t1d="d4"; my $t2="v8"; my $t2d="d8"; my $t3="v4"; my $t3d="d4"; my $t4="v4"; my $t4d="d4"; my $t5="v5"; my $t5d="d5"; my $t6="v8"; my $t6d="d8"; my $t7="v5"; my $t7d="d5"; my $t8="v6"; my $t8d="d6"; my $t9="v4"; my $t9d="d4"; my ($ctr_t0,$ctr_t1,$ctr_t2,$ctr_t3)=map("v$_",(4..7)); my ($ctr_t0d,$ctr_t1d,$ctr_t2d,$ctr_t3d)=map("d$_",(4..7)); my ($ctr_t0b,$ctr_t1b,$ctr_t2b,$ctr_t3b)=map("v$_.16b",(4..7)); my $mod_constantd="d8"; my $mod_constant="v8"; my $mod_t="v7"; my ($rk0,$rk1,$rk2,$rk3,$rk4,$rk5,$rk6,$rk7,$rk8,$rk9,$rk10,$rk11,$rk12,$rk13)=map("v$_.16b",(18..31)); my ($rk0q,$rk1q,$rk2q,$rk3q,$rk4q,$rk5q,$rk6q,$rk7q,$rk8q,$rk9q,$rk10q,$rk11q,$rk12q,$rk13q)=map("q$_",(18..31)); my $rk2q1="v20.1q"; my $rk3q1="v21.1q"; my $rk4v="v22"; my $rk4d="d22"; ######################################################################################### # size_t aes_gcm_enc_256_kernel(const unsigned char *in, # size_t len, # unsigned char *out, # const void *key, # unsigned char ivec[16], # u64 *Xi); # $code.=<<___; .global aes_gcm_enc_256_kernel .type aes_gcm_enc_256_kernel,%function .align 4 aes_gcm_enc_256_kernel: cbz x1, .L256_enc_ret stp x19, x20, [sp, #-112]! mov x16, x4 mov x8, x5 stp x21, x22, [sp, #16] stp x23, x24, [sp, #32] stp d8, d9, [sp, #48] stp d10, d11, [sp, #64] stp d12, d13, [sp, #80] stp d14, d15, [sp, #96] add $end_input_ptr, $input_ptr, $bit_length, lsr #3 @ end_input_ptr lsr $main_end_input_ptr, $bit_length, #3 @ byte_len mov $len, $main_end_input_ptr ldp $ctr96_b64x, $ctr96_t32x, [$counter] @ ctr96_b64, ctr96_t32 ld1 { $ctr0b}, [$counter] @ special case vector load initial counter so we can start first AES block as quickly as possible sub $main_end_input_ptr, $main_end_input_ptr, #1 @ byte_len - 1 ldr $rk0q, [$cc, #0] @ load rk0 and $main_end_input_ptr, $main_end_input_ptr, #0xffffffffffffffc0 @ number of bytes to be processed in main loop (at least 1 byte must be handled by tail) ldr $rk7q, [$cc, #112] @ load rk7 add $main_end_input_ptr, $main_end_input_ptr, $input_ptr lsr $rctr32x, $ctr96_t32x, #32 fmov $ctr2d, $ctr96_b64x @ CTR block 2 orr $ctr96_t32w, $ctr96_t32w, $ctr96_t32w rev $rctr32w, $rctr32w @ rev_ctr32 cmp $input_ptr, $main_end_input_ptr @ check if we have <= 4 blocks fmov $ctr1d, $ctr96_b64x @ CTR block 1 aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 0 add $rctr32w, $rctr32w, #1 @ increment rev_ctr32 rev $ctr32w, $rctr32w @ CTR block 1 fmov $ctr3d, $ctr96_b64x @ CTR block 3 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 1 add $rctr32w, $rctr32w, #1 @ CTR block 1 ldr $rk1q, [$cc, #16] @ load rk1 fmov $ctr1.d[1], $ctr32x @ CTR block 1 rev $ctr32w, $rctr32w @ CTR block 2 add $rctr32w, $rctr32w, #1 @ CTR block 2 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 2 ldr $rk2q, [$cc, #32] @ load rk2 fmov $ctr2.d[1], $ctr32x @ CTR block 2 rev $ctr32w, $rctr32w @ CTR block 3 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 1 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 3 fmov $ctr3.d[1], $ctr32x @ CTR block 3 aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 0 ldr $rk3q, [$cc, #48] @ load rk3 aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 2 ldr $rk6q, [$cc, #96] @ load rk6 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 0 ldr $rk5q, [$cc, #80] @ load rk5 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 1 ldr $h3q, [$current_tag, #80] @ load h3l | h3h ext $h3b, $h3b, $h3b, #8 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 0 ldr $rk13q, [$cc, #208] @ load rk13 aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 1 ldr $rk4q, [$cc, #64] @ load rk4 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 2 ldr $h2q, [$current_tag, #64] @ load h2l | h2h ext $h2b, $h2b, $h2b, #8 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 1 ldr $rk12q, [$cc, #192] @ load rk12 aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 2 ldr $h4q, [$current_tag, #112] @ load h4l | h4h ext $h4b, $h4b, $h4b, #8 aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 3 ldr $rk11q, [$cc, #176] @ load rk11 aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 2 ldr $rk8q, [$cc, #128] @ load rk8 aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 3 add $rctr32w, $rctr32w, #1 @ CTR block 3 aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 3 ldp $rk14_l, $rk14_h, [$cc, #224] @ load rk14 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 3 ld1 { $acc_lb}, [$current_tag] ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 4 aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 4 aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 4 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 4 aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 5 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 5 aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 5 aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 5 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 6 trn2 $h34k.2d, $h3.2d, $h4.2d @ h4l | h3l aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 6 ldr $rk9q, [$cc, #144] @ load rk9 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 6 ldr $h1q, [$current_tag, #32] @ load h1l | h1h ext $h1b, $h1b, $h1b, #8 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 6 ldr $rk10q, [$cc, #160] @ load rk10 aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 7 trn1 $acc_h.2d, $h3.2d, $h4.2d @ h4h | h3h aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 7 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 7 aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 7 trn2 $h12k.2d, $h1.2d, $h2.2d @ h2l | h1l aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 8 aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 8 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 8 aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 9 aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 9 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 8 aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 10 aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 9 aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 9 aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 10 aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 10 aese $ctr1b, $rk11 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 11 aese $ctr2b, $rk11 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 11 aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 10 aese $ctr1b, $rk12 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 12 aese $ctr2b, $rk12 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 12 aese $ctr0b, $rk11 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 11 eor $h34k.16b, $h34k.16b, $acc_h.16b @ h4k | h3k aese $ctr3b, $rk11 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 11 aese $ctr2b, $rk13 @ AES block 2 - round 13 trn1 $t0.2d, $h1.2d, $h2.2d @ h2h | h1h aese $ctr0b, $rk12 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 12 aese $ctr3b, $rk12 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 12 aese $ctr1b, $rk13 @ AES block 1 - round 13 aese $ctr0b, $rk13 @ AES block 0 - round 13 aese $ctr3b, $rk13 @ AES block 3 - round 13 eor $h12k.16b, $h12k.16b, $t0.16b @ h2k | h1k b.ge .L256_enc_tail @ handle tail ldp $input_l1, $input_h1, [$input_ptr, #16] @ AES block 1 - load plaintext rev $ctr32w, $rctr32w @ CTR block 4 ldp $input_l0, $input_h0, [$input_ptr, #0] @ AES block 0 - load plaintext ldp $input_l3, $input_h3, [$input_ptr, #48] @ AES block 3 - load plaintext ldp $input_l2, $input_h2, [$input_ptr, #32] @ AES block 2 - load plaintext add $input_ptr, $input_ptr, #64 @ AES input_ptr update eor $input_l1, $input_l1, $rk14_l @ AES block 1 - round 14 low eor $input_h1, $input_h1, $rk14_h @ AES block 1 - round 14 high fmov $ctr_t1d, $input_l1 @ AES block 1 - mov low eor $input_l0, $input_l0, $rk14_l @ AES block 0 - round 14 low eor $input_h0, $input_h0, $rk14_h @ AES block 0 - round 14 high eor $input_h3, $input_h3, $rk14_h @ AES block 3 - round 14 high fmov $ctr_t0d, $input_l0 @ AES block 0 - mov low cmp $input_ptr, $main_end_input_ptr @ check if we have <= 8 blocks fmov $ctr_t0.d[1], $input_h0 @ AES block 0 - mov high eor $input_l3, $input_l3, $rk14_l @ AES block 3 - round 14 low eor $input_l2, $input_l2, $rk14_l @ AES block 2 - round 14 low fmov $ctr_t1.d[1], $input_h1 @ AES block 1 - mov high fmov $ctr_t2d, $input_l2 @ AES block 2 - mov low add $rctr32w, $rctr32w, #1 @ CTR block 4 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4 fmov $ctr_t3d, $input_l3 @ AES block 3 - mov low eor $input_h2, $input_h2, $rk14_h @ AES block 2 - round 14 high fmov $ctr_t2.d[1], $input_h2 @ AES block 2 - mov high eor $res0b, $ctr_t0b, $ctr0b @ AES block 0 - result fmov $ctr0d, $ctr96_b64x @ CTR block 4 fmov $ctr0.d[1], $ctr32x @ CTR block 4 rev $ctr32w, $rctr32w @ CTR block 5 add $rctr32w, $rctr32w, #1 @ CTR block 5 eor $res1b, $ctr_t1b, $ctr1b @ AES block 1 - result fmov $ctr1d, $ctr96_b64x @ CTR block 5 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 5 fmov $ctr1.d[1], $ctr32x @ CTR block 5 rev $ctr32w, $rctr32w @ CTR block 6 st1 { $res0b}, [$output_ptr], #16 @ AES block 0 - store result fmov $ctr_t3.d[1], $input_h3 @ AES block 3 - mov high orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 6 eor $res2b, $ctr_t2b, $ctr2b @ AES block 2 - result st1 { $res1b}, [$output_ptr], #16 @ AES block 1 - store result add $rctr32w, $rctr32w, #1 @ CTR block 6 fmov $ctr2d, $ctr96_b64x @ CTR block 6 fmov $ctr2.d[1], $ctr32x @ CTR block 6 st1 { $res2b}, [$output_ptr], #16 @ AES block 2 - store result rev $ctr32w, $rctr32w @ CTR block 7 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 7 eor $res3b, $ctr_t3b, $ctr3b @ AES block 3 - result st1 { $res3b}, [$output_ptr], #16 @ AES block 3 - store result b.ge L256_enc_prepretail @ do prepretail .L256_enc_main_loop: @ main loop start aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 rev64 $res0b, $res0b @ GHASH block 4k (only t0 is free) aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 fmov $ctr3d, $ctr96_b64x @ CTR block 4k+3 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 fmov $ctr3.d[1], $ctr32x @ CTR block 4k+3 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 ldp $input_l3, $input_h3, [$input_ptr, #48] @ AES block 4k+7 - load plaintext aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 ldp $input_l2, $input_h2, [$input_ptr, #32] @ AES block 4k+6 - load plaintext aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 eor $res0b, $res0b, $acc_lb @ PRE 1 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 eor $input_l3, $input_l3, $rk14_l @ AES block 4k+7 - round 14 low aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high eor $input_h2, $input_h2, $rk14_h @ AES block 4k+6 - round 14 high mov $t0d, $res0.d[1] @ GHASH block 4k - mid aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 rev64 $res1b, $res1b @ GHASH block 4k+1 (t0 and t1 free) aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 rev64 $res3b, $res3b @ GHASH block 4k+3 (t0, t1, t2 and t3 free) pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid rev64 $res2b, $res2b @ GHASH block 4k+2 (t0, t1, and t2 free) pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 ldp $input_l1, $input_h1, [$input_ptr, #16] @ AES block 4k+5 - load plaintext aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 eor $input_l1, $input_l1, $rk14_l @ AES block 4k+5 - round 14 low aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 9 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 eor $input_l2, $input_l2, $rk14_l @ AES block 4k+6 - round 14 low aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 9 movi $mod_constant.8b, #0xc2 pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high fmov $ctr_t1d, $input_l1 @ AES block 4k+5 - mov low aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 ldp $input_l0, $input_h0, [$input_ptr, #0] @ AES block 4k+4 - load plaintext aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 10 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 9 aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 10 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 9 add $rctr32w, $rctr32w, #1 @ CTR block 4k+3 aese $ctr0b, $rk11 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 11 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up aese $ctr1b, $rk11 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 11 add $input_ptr, $input_ptr, #64 @ AES input_ptr update pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid rev $ctr32w, $rctr32w @ CTR block 4k+8 ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 10 eor $input_l0, $input_l0, $rk14_l @ AES block 4k+4 - round 14 low aese $ctr1b, $rk12 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 12 eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 10 eor $input_h0, $input_h0, $rk14_h @ AES block 4k+4 - round 14 high fmov $ctr_t0d, $input_l0 @ AES block 4k+4 - mov low orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+8 eor $mod_t.16b, $acc_hb, $mod_t.16b @ MODULO - fold into mid aese $ctr0b, $rk12 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 12 eor $input_h1, $input_h1, $rk14_h @ AES block 4k+5 - round 14 high aese $ctr2b, $rk11 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 11 eor $input_h3, $input_h3, $rk14_h @ AES block 4k+7 - round 14 high aese $ctr3b, $rk11 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 11 add $rctr32w, $rctr32w, #1 @ CTR block 4k+8 aese $ctr0b, $rk13 @ AES block 4k+4 - round 13 fmov $ctr_t0.d[1], $input_h0 @ AES block 4k+4 - mov high eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid aese $ctr2b, $rk12 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 12 fmov $ctr_t3d, $input_l3 @ AES block 4k+7 - mov low aese $ctr1b, $rk13 @ AES block 4k+5 - round 13 fmov $ctr_t1.d[1], $input_h1 @ AES block 4k+5 - mov high fmov $ctr_t2d, $input_l2 @ AES block 4k+6 - mov low cmp $input_ptr, $main_end_input_ptr @ LOOP CONTROL fmov $ctr_t2.d[1], $input_h2 @ AES block 4k+6 - mov high pmull $acc_h.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low eor $res0b, $ctr_t0b, $ctr0b @ AES block 4k+4 - result fmov $ctr0d, $ctr96_b64x @ CTR block 4k+8 fmov $ctr0.d[1], $ctr32x @ CTR block 4k+8 rev $ctr32w, $rctr32w @ CTR block 4k+9 add $rctr32w, $rctr32w, #1 @ CTR block 4k+9 eor $res1b, $ctr_t1b, $ctr1b @ AES block 4k+5 - result fmov $ctr1d, $ctr96_b64x @ CTR block 4k+9 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+9 aese $ctr3b, $rk12 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 12 fmov $ctr1.d[1], $ctr32x @ CTR block 4k+9 aese $ctr2b, $rk13 @ AES block 4k+6 - round 13 rev $ctr32w, $rctr32w @ CTR block 4k+10 st1 { $res0b}, [$output_ptr], #16 @ AES block 4k+4 - store result orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+10 eor $acc_lb, $acc_lb, $acc_hb @ MODULO - fold into low fmov $ctr_t3.d[1], $input_h3 @ AES block 4k+7 - mov high ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment st1 { $res1b}, [$output_ptr], #16 @ AES block 4k+5 - store result add $rctr32w, $rctr32w, #1 @ CTR block 4k+10 aese $ctr3b, $rk13 @ AES block 4k+7 - round 13 eor $res2b, $ctr_t2b, $ctr2b @ AES block 4k+6 - result fmov $ctr2d, $ctr96_b64x @ CTR block 4k+10 st1 { $res2b}, [$output_ptr], #16 @ AES block 4k+6 - store result fmov $ctr2.d[1], $ctr32x @ CTR block 4k+10 rev $ctr32w, $rctr32w @ CTR block 4k+11 eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+11 eor $res3b, $ctr_t3b, $ctr3b @ AES block 4k+7 - result st1 { $res3b}, [$output_ptr], #16 @ AES block 4k+7 - store result b.lt L256_enc_main_loop .L256_enc_prepretail: @ PREPRETAIL aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 rev64 $res2b, $res2b @ GHASH block 4k+2 (t0, t1, and t2 free) aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 fmov $ctr3d, $ctr96_b64x @ CTR block 4k+3 aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 rev64 $res0b, $res0b @ GHASH block 4k (only t0 is free) fmov $ctr3.d[1], $ctr32x @ CTR block 4k+3 ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 eor $res0b, $res0b, $acc_lb @ PRE 1 rev64 $res1b, $res1b @ GHASH block 4k+1 (t0 and t1 free) aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low mov $t0d, $res0.d[1] @ GHASH block 4k - mid pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 rev64 $res3b, $res3b @ GHASH block 4k+3 (t0, t1, t2 and t3 free) aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid add $rctr32w, $rctr32w, #1 @ CTR block 4k+3 pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 movi $mod_constant.8b, #0xc2 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 9 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 9 eor $acc_mb, $acc_mb, $acc_hb @ karatsuba tidy up pmull $t1.1q, $acc_h.1d, $mod_constant.1d ext $acc_hb, $acc_hb, $acc_hb, #8 aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 10 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 eor $acc_mb, $acc_mb, $acc_lb aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 10 aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 9 aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 aese $ctr1b, $rk11 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 11 eor $acc_mb, $acc_mb, $t1.16b aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 10 aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 9 aese $ctr1b, $rk12 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 12 aese $ctr0b, $rk11 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 11 eor $acc_mb, $acc_mb, $acc_hb aese $ctr3b, $rk11 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 11 aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 10 aese $ctr0b, $rk12 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 12 pmull $t1.1q, $acc_m.1d, $mod_constant.1d aese $ctr2b, $rk11 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 11 ext $acc_mb, $acc_mb, $acc_mb, #8 aese $ctr3b, $rk12 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 12 aese $ctr1b, $rk13 @ AES block 4k+5 - round 13 eor $acc_lb, $acc_lb, $t1.16b aese $ctr2b, $rk12 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 12 aese $ctr3b, $rk13 @ AES block 4k+7 - round 13 aese $ctr0b, $rk13 @ AES block 4k+4 - round 13 aese $ctr2b, $rk13 @ AES block 4k+6 - round 13 eor $acc_lb, $acc_lb, $acc_mb .L256_enc_tail: @ TAIL ext $t0.16b, $acc_lb, $acc_lb, #8 @ prepare final partial tag sub $main_end_input_ptr, $end_input_ptr, $input_ptr @ main_end_input_ptr is number of bytes left to process ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES block 4k+4 - load plaintext eor $input_l0, $input_l0, $rk14_l @ AES block 4k+4 - round 14 low eor $input_h0, $input_h0, $rk14_h @ AES block 4k+4 - round 14 high cmp $main_end_input_ptr, #48 fmov $ctr_t0d, $input_l0 @ AES block 4k+4 - mov low fmov $ctr_t0.d[1], $input_h0 @ AES block 4k+4 - mov high eor $res1b, $ctr_t0b, $ctr0b @ AES block 4k+4 - result b.gt .L256_enc_blocks_more_than_3 cmp $main_end_input_ptr, #32 mov $ctr3b, $ctr2b movi $acc_l.8b, #0 movi $acc_h.8b, #0 sub $rctr32w, $rctr32w, #1 mov $ctr2b, $ctr1b movi $acc_m.8b, #0 b.gt .L256_enc_blocks_more_than_2 mov $ctr3b, $ctr1b sub $rctr32w, $rctr32w, #1 cmp $main_end_input_ptr, #16 b.gt .L256_enc_blocks_more_than_1 sub $rctr32w, $rctr32w, #1 b .L256_enc_blocks_less_than_1 .L256_enc_blocks_more_than_3: @ blocks left > 3 st1 { $res1b}, [$output_ptr], #16 @ AES final-3 block - store result ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES final-2 block - load input low & high rev64 $res0b, $res1b @ GHASH final-3 block eor $input_l0, $input_l0, $rk14_l @ AES final-2 block - round 14 low eor $res0b, $res0b, $t0.16b @ feed in partial tag eor $input_h0, $input_h0, $rk14_h @ AES final-2 block - round 14 high mov $rk4d, $res0.d[1] @ GHASH final-3 block - mid fmov $res1d, $input_l0 @ AES final-2 block - mov low fmov $res1.d[1], $input_h0 @ AES final-2 block - mov high eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-3 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in mov $acc_md, $h34k.d[1] @ GHASH final-3 block - mid pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH final-3 block - low pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH final-3 block - high pmull $acc_m.1q, $rk4v.1d, $acc_m.1d @ GHASH final-3 block - mid eor $res1b, $res1b, $ctr1b @ AES final-2 block - result .L256_enc_blocks_more_than_2: @ blocks left > 2 st1 { $res1b}, [$output_ptr], #16 @ AES final-2 block - store result ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES final-1 block - load input low & high rev64 $res0b, $res1b @ GHASH final-2 block eor $input_l0, $input_l0, $rk14_l @ AES final-1 block - round 14 low eor $res0b, $res0b, $t0.16b @ feed in partial tag fmov $res1d, $input_l0 @ AES final-1 block - mov low eor $input_h0, $input_h0, $rk14_h @ AES final-1 block - round 14 high fmov $res1.d[1], $input_h0 @ AES final-1 block - mov high movi $t0.8b, #0 @ suppress further partial tag feed in pmull2 $rk2q1, $res0.2d, $h3.2d @ GHASH final-2 block - high mov $rk4d, $res0.d[1] @ GHASH final-2 block - mid pmull $rk3q1, $res0.1d, $h3.1d @ GHASH final-2 block - low eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-2 block - mid eor $res1b, $res1b, $ctr2b @ AES final-1 block - result eor $acc_hb, $acc_hb, $rk2 @ GHASH final-2 block - high pmull $rk4v.1q, $rk4v.1d, $h34k.1d @ GHASH final-2 block - mid eor $acc_lb, $acc_lb, $rk3 @ GHASH final-2 block - low eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-2 block - mid .L256_enc_blocks_more_than_1: @ blocks left > 1 st1 { $res1b}, [$output_ptr], #16 @ AES final-1 block - store result rev64 $res0b, $res1b @ GHASH final-1 block ldp $input_l0, $input_h0, [$input_ptr], #16 @ AES final block - load input low & high eor $res0b, $res0b, $t0.16b @ feed in partial tag movi $t0.8b, #0 @ suppress further partial tag feed in eor $input_l0, $input_l0, $rk14_l @ AES final block - round 14 low mov $rk4d, $res0.d[1] @ GHASH final-1 block - mid pmull2 $rk2q1, $res0.2d, $h2.2d @ GHASH final-1 block - high eor $input_h0, $input_h0, $rk14_h @ AES final block - round 14 high eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-1 block - mid eor $acc_hb, $acc_hb, $rk2 @ GHASH final-1 block - high ins $rk4v.d[1], $rk4v.d[0] @ GHASH final-1 block - mid fmov $res1d, $input_l0 @ AES final block - mov low fmov $res1.d[1], $input_h0 @ AES final block - mov high pmull2 $rk4v.1q, $rk4v.2d, $h12k.2d @ GHASH final-1 block - mid pmull $rk3q1, $res0.1d, $h2.1d @ GHASH final-1 block - low eor $res1b, $res1b, $ctr3b @ AES final block - result eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-1 block - mid eor $acc_lb, $acc_lb, $rk3 @ GHASH final-1 block - low .L256_enc_blocks_less_than_1: @ blocks left <= 1 and $bit_length, $bit_length, #127 @ bit_length %= 128 mvn $rk14_l, xzr @ rk14_l = 0xffffffffffffffff sub $bit_length, $bit_length, #128 @ bit_length -= 128 neg $bit_length, $bit_length @ bit_length = 128 - #bits in input (in range [1,128]) ld1 { $rk0}, [$output_ptr] @ load existing bytes where the possibly partial last block is to be stored mvn $rk14_h, xzr @ rk14_h = 0xffffffffffffffff and $bit_length, $bit_length, #127 @ bit_length %= 128 lsr $rk14_h, $rk14_h, $bit_length @ rk14_h is mask for top 64b of last block cmp $bit_length, #64 csel $input_l0, $rk14_l, $rk14_h, lt csel $input_h0, $rk14_h, xzr, lt fmov $ctr0d, $input_l0 @ ctr0b is mask for last block fmov $ctr0.d[1], $input_h0 and $res1b, $res1b, $ctr0b @ possibly partial last block has zeroes in highest bits rev64 $res0b, $res1b @ GHASH final block eor $res0b, $res0b, $t0.16b @ feed in partial tag bif $res1b, $rk0, $ctr0b @ insert existing bytes in top end of result before storing pmull2 $rk2q1, $res0.2d, $h1.2d @ GHASH final block - high mov $t0d, $res0.d[1] @ GHASH final block - mid rev $ctr32w, $rctr32w pmull $rk3q1, $res0.1d, $h1.1d @ GHASH final block - low eor $acc_hb, $acc_hb, $rk2 @ GHASH final block - high eor $t0.8b, $t0.8b, $res0.8b @ GHASH final block - mid pmull $t0.1q, $t0.1d, $h12k.1d @ GHASH final block - mid eor $acc_lb, $acc_lb, $rk3 @ GHASH final block - low eor $acc_mb, $acc_mb, $t0.16b @ GHASH final block - mid movi $mod_constant.8b, #0xc2 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up shl $mod_constantd, $mod_constantd, #56 @ mod_constant eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid pmull $acc_h.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment str $ctr32w, [$counter, #12] @ store the updated counter st1 { $res1b}, [$output_ptr] @ store all 16B eor $acc_lb, $acc_lb, $acc_hb @ MODULO - fold into low eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb mov x0, $len st1 { $acc_l.16b }, [$current_tag] ldp x21, x22, [sp, #16] ldp x23, x24, [sp, #32] ldp d8, d9, [sp, #48] ldp d10, d11, [sp, #64] ldp d12, d13, [sp, #80] ldp d14, d15, [sp, #96] ldp x19, x20, [sp], #112 ret .L256_enc_ret: mov w0, #0x0 ret .size aes_gcm_enc_256_kernel,.-aes_gcm_enc_256_kernel ___ { my $t8="v4"; my $t8d="d4"; my $t9="v6"; my $t9d="d6"; ######################################################################################### # size_t aes_gcm_dec_256_kernel(const unsigned char *in, # size_t len, # unsigned char *out, # const void *key, # unsigned char ivec[16], # u64 *Xi); # $code.=<<___; .global aes_gcm_dec_256_kernel .type aes_gcm_dec_256_kernel,%function .align 4 aes_gcm_dec_256_kernel: cbz x1, .L256_dec_ret stp x19, x20, [sp, #-112]! mov x16, x4 mov x8, x5 stp x21, x22, [sp, #16] stp x23, x24, [sp, #32] stp d8, d9, [sp, #48] stp d10, d11, [sp, #64] stp d12, d13, [sp, #80] stp d14, d15, [sp, #96] lsr $main_end_input_ptr, $bit_length, #3 @ byte_len mov $len, $main_end_input_ptr ldp $ctr96_b64x, $ctr96_t32x, [$counter] @ ctr96_b64, ctr96_t32 ldr $rk8q, [$cc, #128] @ load rk8 sub $main_end_input_ptr, $main_end_input_ptr, #1 @ byte_len - 1 ldr $rk7q, [$cc, #112] @ load rk7 and $main_end_input_ptr, $main_end_input_ptr, #0xffffffffffffffc0 @ number of bytes to be processed in main loop (at least 1 byte must be handled by tail) add $end_input_ptr, $input_ptr, $bit_length, lsr #3 @ end_input_ptr ldr $rk6q, [$cc, #96] @ load rk6 lsr $rctr32x, $ctr96_t32x, #32 ldr $rk5q, [$cc, #80] @ load rk5 orr $ctr96_t32w, $ctr96_t32w, $ctr96_t32w ldr $rk3q, [$cc, #48] @ load rk3 add $main_end_input_ptr, $main_end_input_ptr, $input_ptr rev $rctr32w, $rctr32w @ rev_ctr32 add $rctr32w, $rctr32w, #1 @ increment rev_ctr32 fmov $ctr3d, $ctr96_b64x @ CTR block 3 rev $ctr32w, $rctr32w @ CTR block 1 add $rctr32w, $rctr32w, #1 @ CTR block 1 fmov $ctr1d, $ctr96_b64x @ CTR block 1 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 1 ld1 { $ctr0b}, [$counter] @ special case vector load initial counter so we can start first AES block as quickly as possible fmov $ctr1.d[1], $ctr32x @ CTR block 1 rev $ctr32w, $rctr32w @ CTR block 2 add $rctr32w, $rctr32w, #1 @ CTR block 2 fmov $ctr2d, $ctr96_b64x @ CTR block 2 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 2 fmov $ctr2.d[1], $ctr32x @ CTR block 2 rev $ctr32w, $rctr32w @ CTR block 3 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 3 ldr $rk0q, [$cc, #0] @ load rk0 fmov $ctr3.d[1], $ctr32x @ CTR block 3 add $rctr32w, $rctr32w, #1 @ CTR block 3 ldr $rk4q, [$cc, #64] @ load rk4 ldr $rk13q, [$cc, #208] @ load rk13 ldr $rk1q, [$cc, #16] @ load rk1 aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 0 ldr $h3q, [$current_tag, #80] @ load h3l | h3h ext $h3b, $h3b, $h3b, #8 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 0 ldr $h4q, [$current_tag, #112] @ load h4l | h4h ext $h4b, $h4b, $h4b, #8 aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 0 ldr $h2q, [$current_tag, #64] @ load h2l | h2h ext $h2b, $h2b, $h2b, #8 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 0 ldr $rk2q, [$cc, #32] @ load rk2 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 1 ldp $rk14_l, $rk14_h, [$cc, #224] @ load rk14 aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 1 ld1 { $acc_lb}, [$current_tag] ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 1 ldr $rk9q, [$cc, #144] @ load rk9 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 1 ldr $rk12q, [$cc, #192] @ load rk12 aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 2 ldr $h1q, [$current_tag, #32] @ load h1l | h1h ext $h1b, $h1b, $h1b, #8 aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 2 ldr $rk10q, [$cc, #160] @ load rk10 aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 2 aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 3 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 2 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 3 aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 4 cmp $input_ptr, $main_end_input_ptr @ check if we have <= 4 blocks aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 3 aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 3 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 4 aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 4 aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 4 aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 5 aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 5 aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 5 aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 5 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 6 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 6 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 6 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 6 aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 7 aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 7 aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 7 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 8 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 7 aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 8 aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 8 aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 9 aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 8 ldr $rk11q, [$cc, #176] @ load rk11 aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 9 aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 10 aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 9 aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 10 aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 9 aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 10 aese $ctr0b, $rk11 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 11 aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 10 aese $ctr3b, $rk11 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 11 aese $ctr1b, $rk11 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 11 aese $ctr2b, $rk11 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 11 trn1 $acc_h.2d, $h3.2d, $h4.2d @ h4h | h3h trn2 $h34k.2d, $h3.2d, $h4.2d @ h4l | h3l trn1 $t0.2d, $h1.2d, $h2.2d @ h2h | h1h trn2 $h12k.2d, $h1.2d, $h2.2d @ h2l | h1l aese $ctr1b, $rk12 \n aesmc $ctr1b, $ctr1b @ AES block 1 - round 12 aese $ctr0b, $rk12 \n aesmc $ctr0b, $ctr0b @ AES block 0 - round 12 aese $ctr2b, $rk12 \n aesmc $ctr2b, $ctr2b @ AES block 2 - round 12 aese $ctr3b, $rk12 \n aesmc $ctr3b, $ctr3b @ AES block 3 - round 12 eor $h34k.16b, $h34k.16b, $acc_h.16b @ h4k | h3k aese $ctr1b, $rk13 @ AES block 1 - round 13 aese $ctr2b, $rk13 @ AES block 2 - round 13 eor $h12k.16b, $h12k.16b, $t0.16b @ h2k | h1k aese $ctr3b, $rk13 @ AES block 3 - round 13 aese $ctr0b, $rk13 @ AES block 0 - round 13 b.ge .L256_dec_tail @ handle tail ldr $res0q, [$input_ptr, #0] @ AES block 0 - load ciphertext ldr $res1q, [$input_ptr, #16] @ AES block 1 - load ciphertext rev $ctr32w, $rctr32w @ CTR block 4 eor $ctr0b, $res0b, $ctr0b @ AES block 0 - result eor $ctr1b, $res1b, $ctr1b @ AES block 1 - result rev64 $res1b, $res1b @ GHASH block 1 ldr $res3q, [$input_ptr, #48] @ AES block 3 - load ciphertext mov $output_h0, $ctr0.d[1] @ AES block 0 - mov high mov $output_l0, $ctr0.d[0] @ AES block 0 - mov low rev64 $res0b, $res0b @ GHASH block 0 add $rctr32w, $rctr32w, #1 @ CTR block 4 fmov $ctr0d, $ctr96_b64x @ CTR block 4 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4 fmov $ctr0.d[1], $ctr32x @ CTR block 4 rev $ctr32w, $rctr32w @ CTR block 5 add $rctr32w, $rctr32w, #1 @ CTR block 5 mov $output_l1, $ctr1.d[0] @ AES block 1 - mov low orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 5 mov $output_h1, $ctr1.d[1] @ AES block 1 - mov high eor $output_h0, $output_h0, $rk14_h @ AES block 0 - round 14 high eor $output_l0, $output_l0, $rk14_l @ AES block 0 - round 14 low stp $output_l0, $output_h0, [$output_ptr], #16 @ AES block 0 - store result fmov $ctr1d, $ctr96_b64x @ CTR block 5 ldr $res2q, [$input_ptr, #32] @ AES block 2 - load ciphertext add $input_ptr, $input_ptr, #64 @ AES input_ptr update fmov $ctr1.d[1], $ctr32x @ CTR block 5 rev $ctr32w, $rctr32w @ CTR block 6 add $rctr32w, $rctr32w, #1 @ CTR block 6 eor $output_l1, $output_l1, $rk14_l @ AES block 1 - round 14 low orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 6 eor $output_h1, $output_h1, $rk14_h @ AES block 1 - round 14 high stp $output_l1, $output_h1, [$output_ptr], #16 @ AES block 1 - store result eor $ctr2b, $res2b, $ctr2b @ AES block 2 - result cmp $input_ptr, $main_end_input_ptr @ check if we have <= 8 blocks b.ge .L256_dec_prepretail @ do prepretail .L256_dec_main_loop: @ main loop start mov $output_l2, $ctr2.d[0] @ AES block 4k+2 - mov low ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 eor $ctr3b, $res3b, $ctr3b @ AES block 4k+3 - result aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 mov $output_h2, $ctr2.d[1] @ AES block 4k+2 - mov high aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 fmov $ctr2d, $ctr96_b64x @ CTR block 4k+6 fmov $ctr2.d[1], $ctr32x @ CTR block 4k+6 eor $res0b, $res0b, $acc_lb @ PRE 1 rev $ctr32w, $rctr32w @ CTR block 4k+7 aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 mov $output_h3, $ctr3.d[1] @ AES block 4k+3 - mov high aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 mov $output_l3, $ctr3.d[0] @ AES block 4k+3 - mov low pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high mov $t0d, $res0.d[1] @ GHASH block 4k - mid fmov $ctr3d, $ctr96_b64x @ CTR block 4k+7 aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+7 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 fmov $ctr3.d[1], $ctr32x @ CTR block 4k+7 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 eor $output_h2, $output_h2, $rk14_h @ AES block 4k+2 - round 14 high aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 rev64 $res2b, $res2b @ GHASH block 4k+2 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 eor $output_l2, $output_l2, $rk14_l @ AES block 4k+2 - round 14 low aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 stp $output_l2, $output_h2, [$output_ptr], #16 @ AES block 4k+2 - store result pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 rev64 $res3b, $res3b @ GHASH block 4k+3 pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid eor $output_l3, $output_l3, $rk14_l @ AES block 4k+3 - round 14 low pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low eor $output_h3, $output_h3, $rk14_h @ AES block 4k+3 - round 14 high eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 add $rctr32w, $rctr32w, #1 @ CTR block 4k+7 aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid rev $ctr32w, $rctr32w @ CTR block 4k+8 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 add $rctr32w, $rctr32w, #1 @ CTR block 4k+8 aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+8 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 9 eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 10 pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid movi $mod_constant.8b, #0xc2 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low aese $ctr0b, $rk11 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 11 aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid aese $ctr0b, $rk12 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 12 pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 9 ldr $res0q, [$input_ptr, #0] @ AES block 4k+4 - load ciphertext aese $ctr0b, $rk13 @ AES block 4k+4 - round 13 ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 10 eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 9 ldr $res1q, [$input_ptr, #16] @ AES block 4k+5 - load ciphertext aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 eor $ctr0b, $res0b, $ctr0b @ AES block 4k+4 - result aese $ctr1b, $rk11 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 11 stp $output_l3, $output_h3, [$output_ptr], #16 @ AES block 4k+3 - store result aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 10 eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 9 ldr $res3q, [$input_ptr, #48] @ AES block 4k+7 - load ciphertext aese $ctr1b, $rk12 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 12 ldr $res2q, [$input_ptr, #32] @ AES block 4k+6 - load ciphertext aese $ctr2b, $rk11 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 11 mov $output_h0, $ctr0.d[1] @ AES block 4k+4 - mov high aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 10 eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid aese $ctr1b, $rk13 @ AES block 4k+5 - round 13 add $input_ptr, $input_ptr, #64 @ AES input_ptr update mov $output_l0, $ctr0.d[0] @ AES block 4k+4 - mov low aese $ctr2b, $rk12 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 12 fmov $ctr0d, $ctr96_b64x @ CTR block 4k+8 aese $ctr3b, $rk11 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 11 fmov $ctr0.d[1], $ctr32x @ CTR block 4k+8 pmull $mod_constant.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low eor $ctr1b, $res1b, $ctr1b @ AES block 4k+5 - result rev $ctr32w, $rctr32w @ CTR block 4k+9 aese $ctr2b, $rk13 @ AES block 4k+6 - round 13 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+9 cmp $input_ptr, $main_end_input_ptr @ LOOP CONTROL add $rctr32w, $rctr32w, #1 @ CTR block 4k+9 eor $output_l0, $output_l0, $rk14_l @ AES block 4k+4 - round 14 low eor $output_h0, $output_h0, $rk14_h @ AES block 4k+4 - round 14 high mov $output_h1, $ctr1.d[1] @ AES block 4k+5 - mov high eor $ctr2b, $res2b, $ctr2b @ AES block 4k+6 - result eor $acc_lb, $acc_lb, $mod_constant.16b @ MODULO - fold into low aese $ctr3b, $rk12 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 12 mov $output_l1, $ctr1.d[0] @ AES block 4k+5 - mov low fmov $ctr1d, $ctr96_b64x @ CTR block 4k+9 ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment fmov $ctr1.d[1], $ctr32x @ CTR block 4k+9 rev $ctr32w, $rctr32w @ CTR block 4k+10 add $rctr32w, $rctr32w, #1 @ CTR block 4k+10 aese $ctr3b, $rk13 @ AES block 4k+7 - round 13 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+10 rev64 $res1b, $res1b @ GHASH block 4k+5 eor $output_h1, $output_h1, $rk14_h @ AES block 4k+5 - round 14 high stp $output_l0, $output_h0, [$output_ptr], #16 @ AES block 4k+4 - store result eor $output_l1, $output_l1, $rk14_l @ AES block 4k+5 - round 14 low stp $output_l1, $output_h1, [$output_ptr], #16 @ AES block 4k+5 - store result rev64 $res0b, $res0b @ GHASH block 4k+4 eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low b.lt .L256_dec_main_loop .L256_dec_prepretail: @ PREPRETAIL ext $acc_lb, $acc_lb, $acc_lb, #8 @ PRE 0 mov $output_l2, $ctr2.d[0] @ AES block 4k+2 - mov low eor $ctr3b, $res3b, $ctr3b @ AES block 4k+3 - result aese $ctr0b, $rk0 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 0 mov $output_h2, $ctr2.d[1] @ AES block 4k+2 - mov high aese $ctr1b, $rk0 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 0 fmov $ctr2d, $ctr96_b64x @ CTR block 4k+6 fmov $ctr2.d[1], $ctr32x @ CTR block 4k+6 rev $ctr32w, $rctr32w @ CTR block 4k+7 eor $res0b, $res0b, $acc_lb @ PRE 1 rev64 $res2b, $res2b @ GHASH block 4k+2 orr $ctr32x, $ctr96_t32x, $ctr32x, lsl #32 @ CTR block 4k+7 mov $output_l3, $ctr3.d[0] @ AES block 4k+3 - mov low aese $ctr1b, $rk1 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 1 mov $output_h3, $ctr3.d[1] @ AES block 4k+3 - mov high pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH block 4k - low mov $t0d, $res0.d[1] @ GHASH block 4k - mid fmov $ctr3d, $ctr96_b64x @ CTR block 4k+7 pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH block 4k - high fmov $ctr3.d[1], $ctr32x @ CTR block 4k+7 aese $ctr2b, $rk0 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 0 mov $acc_md, $h34k.d[1] @ GHASH block 4k - mid aese $ctr0b, $rk1 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 1 eor $t0.8b, $t0.8b, $res0.8b @ GHASH block 4k - mid pmull2 $t1.1q, $res1.2d, $h3.2d @ GHASH block 4k+1 - high aese $ctr2b, $rk1 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 1 rev64 $res3b, $res3b @ GHASH block 4k+3 aese $ctr3b, $rk0 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 0 pmull $acc_m.1q, $t0.1d, $acc_m.1d @ GHASH block 4k - mid eor $acc_hb, $acc_hb, $t1.16b @ GHASH block 4k+1 - high pmull $t2.1q, $res1.1d, $h3.1d @ GHASH block 4k+1 - low aese $ctr3b, $rk1 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 1 mov $t3d, $res1.d[1] @ GHASH block 4k+1 - mid aese $ctr0b, $rk2 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 2 aese $ctr1b, $rk2 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 2 eor $acc_lb, $acc_lb, $t2.16b @ GHASH block 4k+1 - low aese $ctr2b, $rk2 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 2 aese $ctr0b, $rk3 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 3 mov $t6d, $res2.d[1] @ GHASH block 4k+2 - mid aese $ctr3b, $rk2 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 2 eor $t3.8b, $t3.8b, $res1.8b @ GHASH block 4k+1 - mid pmull $t5.1q, $res2.1d, $h2.1d @ GHASH block 4k+2 - low aese $ctr0b, $rk4 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 4 aese $ctr3b, $rk3 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 3 eor $t6.8b, $t6.8b, $res2.8b @ GHASH block 4k+2 - mid pmull $t3.1q, $t3.1d, $h34k.1d @ GHASH block 4k+1 - mid aese $ctr0b, $rk5 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 5 eor $acc_lb, $acc_lb, $t5.16b @ GHASH block 4k+2 - low aese $ctr3b, $rk4 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 4 pmull2 $t7.1q, $res3.2d, $h1.2d @ GHASH block 4k+3 - high eor $acc_mb, $acc_mb, $t3.16b @ GHASH block 4k+1 - mid pmull2 $t4.1q, $res2.2d, $h2.2d @ GHASH block 4k+2 - high aese $ctr3b, $rk5 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 5 ins $t6.d[1], $t6.d[0] @ GHASH block 4k+2 - mid aese $ctr2b, $rk3 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 3 aese $ctr1b, $rk3 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 3 eor $acc_hb, $acc_hb, $t4.16b @ GHASH block 4k+2 - high pmull $t8.1q, $res3.1d, $h1.1d @ GHASH block 4k+3 - low aese $ctr2b, $rk4 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 4 mov $t9d, $res3.d[1] @ GHASH block 4k+3 - mid aese $ctr1b, $rk4 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 4 pmull2 $t6.1q, $t6.2d, $h12k.2d @ GHASH block 4k+2 - mid aese $ctr2b, $rk5 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 5 eor $t9.8b, $t9.8b, $res3.8b @ GHASH block 4k+3 - mid aese $ctr1b, $rk5 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 5 aese $ctr3b, $rk6 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 6 eor $acc_mb, $acc_mb, $t6.16b @ GHASH block 4k+2 - mid aese $ctr2b, $rk6 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 6 aese $ctr0b, $rk6 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 6 movi $mod_constant.8b, #0xc2 aese $ctr1b, $rk6 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 6 eor $acc_lb, $acc_lb, $t8.16b @ GHASH block 4k+3 - low pmull $t9.1q, $t9.1d, $h12k.1d @ GHASH block 4k+3 - mid aese $ctr3b, $rk7 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 7 eor $acc_hb, $acc_hb, $t7.16b @ GHASH block 4k+3 - high aese $ctr1b, $rk7 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 7 aese $ctr0b, $rk7 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 7 eor $acc_mb, $acc_mb, $t9.16b @ GHASH block 4k+3 - mid aese $ctr3b, $rk8 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 8 aese $ctr2b, $rk7 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 7 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up aese $ctr1b, $rk8 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 8 aese $ctr0b, $rk8 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 8 shl $mod_constantd, $mod_constantd, #56 @ mod_constant aese $ctr2b, $rk8 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 8 aese $ctr1b, $rk9 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 9 eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid aese $ctr2b, $rk9 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 9 ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment aese $ctr3b, $rk9 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 9 aese $ctr0b, $rk9 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 9 eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid aese $ctr2b, $rk10 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 10 aese $ctr3b, $rk10 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 10 aese $ctr0b, $rk10 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 10 eor $output_h2, $output_h2, $rk14_h @ AES block 4k+2 - round 14 high aese $ctr1b, $rk10 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 10 eor $output_l3, $output_l3, $rk14_l @ AES block 4k+3 - round 14 low aese $ctr2b, $rk11 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 11 eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid aese $ctr0b, $rk11 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 11 add $rctr32w, $rctr32w, #1 @ CTR block 4k+7 aese $ctr1b, $rk11 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 11 eor $output_l2, $output_l2, $rk14_l @ AES block 4k+2 - round 14 low aese $ctr2b, $rk12 \n aesmc $ctr2b, $ctr2b @ AES block 4k+6 - round 12 pmull $mod_constant.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low eor $output_h3, $output_h3, $rk14_h @ AES block 4k+3 - round 14 high aese $ctr3b, $rk11 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 11 stp $output_l2, $output_h2, [$output_ptr], #16 @ AES block 4k+2 - store result aese $ctr1b, $rk12 \n aesmc $ctr1b, $ctr1b @ AES block 4k+5 - round 12 ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment aese $ctr0b, $rk12 \n aesmc $ctr0b, $ctr0b @ AES block 4k+4 - round 12 stp $output_l3, $output_h3, [$output_ptr], #16 @ AES block 4k+3 - store result aese $ctr3b, $rk12 \n aesmc $ctr3b, $ctr3b @ AES block 4k+7 - round 12 eor $acc_lb, $acc_lb, $mod_constant.16b @ MODULO - fold into low aese $ctr1b, $rk13 @ AES block 4k+5 - round 13 aese $ctr0b, $rk13 @ AES block 4k+4 - round 13 aese $ctr3b, $rk13 @ AES block 4k+7 - round 13 aese $ctr2b, $rk13 @ AES block 4k+6 - round 13 eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low .L256_dec_tail: @ TAIL sub $main_end_input_ptr, $end_input_ptr, $input_ptr @ main_end_input_ptr is number of bytes left to process ld1 { $res1b}, [$input_ptr], #16 @ AES block 4k+4 - load ciphertext eor $ctr0b, $res1b, $ctr0b @ AES block 4k+4 - result mov $output_l0, $ctr0.d[0] @ AES block 4k+4 - mov low mov $output_h0, $ctr0.d[1] @ AES block 4k+4 - mov high ext $t0.16b, $acc_lb, $acc_lb, #8 @ prepare final partial tag cmp $main_end_input_ptr, #48 eor $output_l0, $output_l0, $rk14_l @ AES block 4k+4 - round 14 low eor $output_h0, $output_h0, $rk14_h @ AES block 4k+4 - round 14 high b.gt .L256_dec_blocks_more_than_3 sub $rctr32w, $rctr32w, #1 mov $ctr3b, $ctr2b movi $acc_m.8b, #0 movi $acc_l.8b, #0 cmp $main_end_input_ptr, #32 movi $acc_h.8b, #0 mov $ctr2b, $ctr1b b.gt .L256_dec_blocks_more_than_2 sub $rctr32w, $rctr32w, #1 mov $ctr3b, $ctr1b cmp $main_end_input_ptr, #16 b.gt .L256_dec_blocks_more_than_1 sub $rctr32w, $rctr32w, #1 b .L256_dec_blocks_less_than_1 .L256_dec_blocks_more_than_3: @ blocks left > 3 rev64 $res0b, $res1b @ GHASH final-3 block ld1 { $res1b}, [$input_ptr], #16 @ AES final-2 block - load ciphertext stp $output_l0, $output_h0, [$output_ptr], #16 @ AES final-3 block - store result mov $acc_md, $h34k.d[1] @ GHASH final-3 block - mid eor $res0b, $res0b, $t0.16b @ feed in partial tag eor $ctr0b, $res1b, $ctr1b @ AES final-2 block - result mov $rk4d, $res0.d[1] @ GHASH final-3 block - mid mov $output_l0, $ctr0.d[0] @ AES final-2 block - mov low mov $output_h0, $ctr0.d[1] @ AES final-2 block - mov high eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-3 block - mid movi $t0.8b, #0 @ suppress further partial tag feed in pmull2 $acc_h.1q, $res0.2d, $h4.2d @ GHASH final-3 block - high pmull $acc_m.1q, $rk4v.1d, $acc_m.1d @ GHASH final-3 block - mid eor $output_l0, $output_l0, $rk14_l @ AES final-2 block - round 14 low pmull $acc_l.1q, $res0.1d, $h4.1d @ GHASH final-3 block - low eor $output_h0, $output_h0, $rk14_h @ AES final-2 block - round 14 high .L256_dec_blocks_more_than_2: @ blocks left > 2 rev64 $res0b, $res1b @ GHASH final-2 block ld1 { $res1b}, [$input_ptr], #16 @ AES final-1 block - load ciphertext eor $res0b, $res0b, $t0.16b @ feed in partial tag stp $output_l0, $output_h0, [$output_ptr], #16 @ AES final-2 block - store result eor $ctr0b, $res1b, $ctr2b @ AES final-1 block - result mov $rk4d, $res0.d[1] @ GHASH final-2 block - mid pmull $rk3q1, $res0.1d, $h3.1d @ GHASH final-2 block - low pmull2 $rk2q1, $res0.2d, $h3.2d @ GHASH final-2 block - high eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-2 block - mid mov $output_l0, $ctr0.d[0] @ AES final-1 block - mov low mov $output_h0, $ctr0.d[1] @ AES final-1 block - mov high eor $acc_lb, $acc_lb, $rk3 @ GHASH final-2 block - low movi $t0.8b, #0 @ suppress further partial tag feed in pmull $rk4v.1q, $rk4v.1d, $h34k.1d @ GHASH final-2 block - mid eor $acc_hb, $acc_hb, $rk2 @ GHASH final-2 block - high eor $output_l0, $output_l0, $rk14_l @ AES final-1 block - round 14 low eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-2 block - mid eor $output_h0, $output_h0, $rk14_h @ AES final-1 block - round 14 high .L256_dec_blocks_more_than_1: @ blocks left > 1 stp $output_l0, $output_h0, [$output_ptr], #16 @ AES final-1 block - store result rev64 $res0b, $res1b @ GHASH final-1 block ld1 { $res1b}, [$input_ptr], #16 @ AES final block - load ciphertext eor $res0b, $res0b, $t0.16b @ feed in partial tag movi $t0.8b, #0 @ suppress further partial tag feed in mov $rk4d, $res0.d[1] @ GHASH final-1 block - mid eor $ctr0b, $res1b, $ctr3b @ AES final block - result pmull2 $rk2q1, $res0.2d, $h2.2d @ GHASH final-1 block - high eor $rk4v.8b, $rk4v.8b, $res0.8b @ GHASH final-1 block - mid pmull $rk3q1, $res0.1d, $h2.1d @ GHASH final-1 block - low mov $output_l0, $ctr0.d[0] @ AES final block - mov low ins $rk4v.d[1], $rk4v.d[0] @ GHASH final-1 block - mid mov $output_h0, $ctr0.d[1] @ AES final block - mov high pmull2 $rk4v.1q, $rk4v.2d, $h12k.2d @ GHASH final-1 block - mid eor $output_l0, $output_l0, $rk14_l @ AES final block - round 14 low eor $acc_lb, $acc_lb, $rk3 @ GHASH final-1 block - low eor $acc_hb, $acc_hb, $rk2 @ GHASH final-1 block - high eor $acc_mb, $acc_mb, $rk4v.16b @ GHASH final-1 block - mid eor $output_h0, $output_h0, $rk14_h @ AES final block - round 14 high .L256_dec_blocks_less_than_1: @ blocks left <= 1 and $bit_length, $bit_length, #127 @ bit_length %= 128 mvn $rk14_h, xzr @ rk14_h = 0xffffffffffffffff sub $bit_length, $bit_length, #128 @ bit_length -= 128 mvn $rk14_l, xzr @ rk14_l = 0xffffffffffffffff ldp $end_input_ptr, $main_end_input_ptr, [$output_ptr] @ load existing bytes we need to not overwrite neg $bit_length, $bit_length @ bit_length = 128 - #bits in input (in range [1,128]) and $bit_length, $bit_length, #127 @ bit_length %= 128 lsr $rk14_h, $rk14_h, $bit_length @ rk14_h is mask for top 64b of last block cmp $bit_length, #64 csel $ctr32x, $rk14_l, $rk14_h, lt csel $ctr96_b64x, $rk14_h, xzr, lt fmov $ctr0d, $ctr32x @ ctr0b is mask for last block and $output_l0, $output_l0, $ctr32x mov $ctr0.d[1], $ctr96_b64x bic $end_input_ptr, $end_input_ptr, $ctr32x @ mask out low existing bytes rev $ctr32w, $rctr32w bic $main_end_input_ptr, $main_end_input_ptr, $ctr96_b64x @ mask out high existing bytes orr $output_l0, $output_l0, $end_input_ptr and $output_h0, $output_h0, $ctr96_b64x orr $output_h0, $output_h0, $main_end_input_ptr and $res1b, $res1b, $ctr0b @ possibly partial last block has zeroes in highest bits rev64 $res0b, $res1b @ GHASH final block eor $res0b, $res0b, $t0.16b @ feed in partial tag pmull $rk3q1, $res0.1d, $h1.1d @ GHASH final block - low mov $t0d, $res0.d[1] @ GHASH final block - mid eor $t0.8b, $t0.8b, $res0.8b @ GHASH final block - mid pmull2 $rk2q1, $res0.2d, $h1.2d @ GHASH final block - high pmull $t0.1q, $t0.1d, $h12k.1d @ GHASH final block - mid eor $acc_hb, $acc_hb, $rk2 @ GHASH final block - high eor $acc_lb, $acc_lb, $rk3 @ GHASH final block - low eor $acc_mb, $acc_mb, $t0.16b @ GHASH final block - mid movi $mod_constant.8b, #0xc2 eor $t9.16b, $acc_lb, $acc_hb @ MODULO - karatsuba tidy up shl $mod_constantd, $mod_constantd, #56 @ mod_constant eor $acc_mb, $acc_mb, $t9.16b @ MODULO - karatsuba tidy up pmull $mod_t.1q, $acc_h.1d, $mod_constant.1d @ MODULO - top 64b align with mid ext $acc_hb, $acc_hb, $acc_hb, #8 @ MODULO - other top alignment eor $acc_mb, $acc_mb, $mod_t.16b @ MODULO - fold into mid eor $acc_mb, $acc_mb, $acc_hb @ MODULO - fold into mid pmull $mod_constant.1q, $acc_m.1d, $mod_constant.1d @ MODULO - mid 64b align with low ext $acc_mb, $acc_mb, $acc_mb, #8 @ MODULO - other mid alignment eor $acc_lb, $acc_lb, $mod_constant.16b @ MODULO - fold into low stp $output_l0, $output_h0, [$output_ptr] str $ctr32w, [$counter, #12] @ store the updated counter eor $acc_lb, $acc_lb, $acc_mb @ MODULO - fold into low ext $acc_lb, $acc_lb, $acc_lb, #8 rev64 $acc_lb, $acc_lb mov x0, $len st1 { $acc_l.16b }, [$current_tag] ldp x21, x22, [sp, #16] ldp x23, x24, [sp, #32] ldp d8, d9, [sp, #48] ldp d10, d11, [sp, #64] ldp d12, d13, [sp, #80] ldp d14, d15, [sp, #96] ldp x19, x20, [sp], #112 ret .L256_dec_ret: mov w0, #0x0 ret .size aes_gcm_dec_256_kernel,.-aes_gcm_dec_256_kernel ___ } } $code.=<<___; .asciz "GHASH for ARMv8, CRYPTOGAMS by <appro\@openssl.org>" .align 2 #endif ___ if ($flavour =~ /64/) { ######## 64-bit code sub unvmov { my $arg=shift; $arg =~ m/q([0-9]+)#(lo|hi),\s*q([0-9]+)#(lo|hi)/o && sprintf "ins v%d.d[%d],v%d.d[%d]",$1<8?$1:$1+8,($2 eq "lo")?0:1, $3<8?$3:$3+8,($4 eq "lo")?0:1; } foreach(split("\n",$code)) { s/@\s/\/\//o; # old->new style commentary print $_,"\n"; } } else { ######## 32-bit code sub unvdup32 { my $arg=shift; $arg =~ m/q([0-9]+),\s*q([0-9]+)\[([0-3])\]/o && sprintf "vdup.32 q%d,d%d[%d]",$1,2*$2+($3>>1),$3&1; } sub unvpmullp64 { my ($mnemonic,$arg)=@_; if ($arg =~ m/q([0-9]+),\s*q([0-9]+),\s*q([0-9]+)/o) { my $word = 0xf2a00e00|(($1&7)<<13)|(($1&8)<<19) |(($2&7)<<17)|(($2&8)<<4) |(($3&7)<<1) |(($3&8)<<2); $word |= 0x00010001 if ($mnemonic =~ "2"); # since ARMv7 instructions are always encoded little-endian. # correct solution is to use .inst directive, but older%%%% # assemblers don't implement it:-( sprintf "INST(0x%02x,0x%02x,0x%02x,0x%02x)\t@ %s %s", $word&0xff,($word>>8)&0xff, ($word>>16)&0xff,($word>>24)&0xff, $mnemonic,$arg; } } foreach(split("\n",$code)) { s/\b[wx]([0-9]+)\b/r$1/go; # new->old registers s/\bv([0-9])\.[12468]+[bsd]\b/q$1/go; # new->old registers s/\/\/\s?/@ /o; # new->old style commentary # fix up remaining new-style suffixes s/\],#[0-9]+/]!/o; s/cclr\s+([^,]+),\s*([a-z]+)/mov.$2 $1,#0/o or s/vdup\.32\s+(.*)/unvdup32($1)/geo or s/v?(pmull2?)\.p64\s+(.*)/unvpmullp64($1,$2)/geo or s/\bq([0-9]+)#(lo|hi)/sprintf "d%d",2*$1+($2 eq "hi")/geo or s/^(\s+)b\./$1b/o or s/^(\s+)ret/$1bx\tlr/o; if (s/^(\s+)mov\.([a-z]+)/$1mov$2/) { print " it $2\n"; } print $_,"\n"; } } close STDOUT or die "error closing STDOUT: $!"; # enforce flush
jens-maus/amissl
openssl/crypto/modes/asm/aes-gcm-armv8_64.pl
Perl
bsd-3-clause
278,591
#!/usr/bin/env perl use strict; use warnings; use FindBin; use lib ("$FindBin::Bin/../../PerlLib"); use Fasta_reader; my $usage = "usage: $0 transcripts.fasta jaccard_clips.wig\n\n"; my $transcript_fa = $ARGV[0] or die $usage; my $jaccard_clips = $ARGV[1] or die $usage; main: { my %trans_acc_to_clips = &get_clip_pts($jaccard_clips); my $fasta_reader = new Fasta_reader($transcript_fa); while (my $seq_obj = $fasta_reader->next()) { my $acc = $seq_obj->get_accession(); my $seq = $seq_obj->get_sequence(); my @parts = split(/;/, $acc); my $kmer_cov = pop @parts; if (my $clips_aref = $trans_acc_to_clips{$acc}) { ## my $start = 1; while (@$clips_aref) { my $clip = shift @$clips_aref; my $length = $clip - $start + 1; my $subseq = substr($seq, $start-1, $length); print ">$acc.$start-$clip;$kmer_cov\n$subseq\n"; $start = $clip + 1; } if ($start < length($seq) + 25) { # require subseq to be at least 25 bases long (one kmer length) my $subseq = substr($seq, $start-1, length($seq)-$start + 1); print ">$acc.$start-" . length($seq) . ";$kmer_cov\n$subseq\n"; # coverage value needs to be the last piece of the accession for use by PASA } } else { # no clippint print ">$acc\n$seq\n"; } } exit(0); } #### sub get_clip_pts { my ($jaccard_clips) = @_; my %trans_to_clips; my $trans_acc = ""; open (my $fh, $jaccard_clips) or die "Error, cannot open file $jaccard_clips"; while (<$fh>) { chomp; if (/^variableStep chrom=(\S+)/) { $trans_acc = $1; } elsif (/^(\d+)/) { my ($coord, $val) = split(/\t/); if ($val) { push (@{$trans_to_clips{$trans_acc}}, $coord); } } } close $fh; return(%trans_to_clips); }
ssn1306/trinityrnaseq
util/support_scripts/jaccard_fasta_clipper.pl
Perl
bsd-3-clause
1,821
=head1 NAME XML::LibXML::XPathContext - XPath Evaluation =head1 SYNOPSIS my $xpc = XML::LibXML::XPathContext->new(); my $xpc = XML::LibXML::XPathContext->new($node); $xpc->registerNs($prefix, $namespace_uri) $xpc->unregisterNs($prefix) $uri = $xpc->lookupNs($prefix) $xpc->registerVarLookupFunc($callback, $data) $data = $xpc->getVarLookupData(); $callback = $xpc->getVarLookupFunc(); $xpc->unregisterVarLookupFunc($name); $xpc->registerFunctionNS($name, $uri, $callback) $xpc->unregisterFunctionNS($name, $uri) $xpc->registerFunction($name, $callback) $xpc->unregisterFunction($name) @nodes = $xpc->findnodes($xpath) @nodes = $xpc->findnodes($xpath, $context_node ) $nodelist = $xpc->findnodes($xpath, $context_node ) $object = $xpc->find($xpath ) $object = $xpc->find($xpath, $context_node ) $value = $xpc->findvalue($xpath ) $value = $xpc->findvalue($xpath, $context_node ) $bool = $xpc->exists( $xpath_expression, $context_node ); $xpc->setContextNode($node) my $node = $xpc->getContextNode; $xpc->setContextPosition($position) my $position = $xpc->getContextPosition; $xpc->setContextSize($size) my $size = $xpc->getContextSize; $xpc->setContextNode($node) The XML::LibXML::XPathContext class provides an almost complete interface to libxml2's XPath implementation. With XML::LibXML::XPathContext is is possible to evaluate XPath expressions in the context of arbitrary node, context size, and context position, with a user-defined namespace-prefix mapping, custom XPath functions written in Perl, and even a custom XPath variable resolver. =head1 EXAMPLES =head2 Namespaces This example demonstrates C<<<<<< registerNs() >>>>>> method. It finds all paragraph nodes in an XHTML document. my $xc = XML::LibXML::XPathContext->new($xhtml_doc); $xc->registerNs('xhtml', 'http://www.w3.org/1999/xhtml'); my @nodes = $xc->findnodes('//xhtml:p'); =head2 Custom XPath functions This example demonstrates C<<<<<< registerFunction() >>>>>> method by defining a function filtering nodes based on a Perl regular expression: sub grep_nodes { my ($nodelist,$regexp) = @_; my $result = XML::LibXML::NodeList->new; for my $node ($nodelist->get_nodelist()) { $result->push($node) if $node->textContent =~ $regexp; } return $result; }; my $xc = XML::LibXML::XPathContext->new($node); $xc->registerFunction('grep_nodes', \&grep_nodes); my @nodes = $xc->findnodes('//section[grep_nodes(para,"\bsearch(ing|es)?\b")]'); =head2 Variables This example demonstrates C<<<<<< registerVarLookup() >>>>>> method. We use XPath variables to recycle results of previous evaluations: sub var_lookup { my ($varname,$ns,$data)=@_; return $data->{$varname}; } my $areas = XML::LibXML->new->parse_file('areas.xml'); my $empl = XML::LibXML->new->parse_file('employees.xml'); my $xc = XML::LibXML::XPathContext->new($empl); my %variables = ( A => $xc->find('/employees/employee[@salary>10000]'), B => $areas->find('/areas/area[district='Brooklyn']/street'), ); # get names of employees from $A working in an area listed in $B $xc->registerVarLookupFunc(\&var_lookup, \%variables); my @nodes = $xc->findnodes('$A[work_area/street = $B]/name'); =head1 METHODS =over 4 =item new my $xpc = XML::LibXML::XPathContext->new(); Creates a new XML::LibXML::XPathContext object without a context node. my $xpc = XML::LibXML::XPathContext->new($node); Creates a new XML::LibXML::XPathContext object with the context node set to C<<<<<< $node >>>>>>. =item registerNs $xpc->registerNs($prefix, $namespace_uri) Registers namespace C<<<<<< $prefix >>>>>> to C<<<<<< $namespace_uri >>>>>>. =item unregisterNs $xpc->unregisterNs($prefix) Unregisters namespace C<<<<<< $prefix >>>>>>. =item lookupNs $uri = $xpc->lookupNs($prefix) Returns namespace URI registered with C<<<<<< $prefix >>>>>>. If C<<<<<< $prefix >>>>>> is not registered to any namespace URI returns C<<<<<< undef >>>>>>. =item registerVarLookupFunc $xpc->registerVarLookupFunc($callback, $data) Registers variable lookup function C<<<<<< $prefix >>>>>>. The registered function is executed by the XPath engine each time an XPath variable is evaluated. It takes three arguments: C<<<<<< $data >>>>>>, variable name, and variable ns-URI and must return one value: a number or string or any C<<<<<< XML::LibXML:: >>>>>> object that can be a result of findnodes: Boolean, Literal, Number, Node (e.g. Document, Element, etc.), or NodeList. For convenience, simple (non-blessed) array references containing only L<<<<<< XML::LibXML::Node >>>>>> objects can be used instead of an L<<<<<< XML::LibXML::NodeList >>>>>>. =item getVarLookupData $data = $xpc->getVarLookupData(); Returns the data that have been associated with a variable lookup function during a previous call to C<<<<<< registerVarLookupFunc >>>>>>. =item getVarLookupFunc $callback = $xpc->getVarLookupFunc(); Returns the variable lookup function previously registered with C<<<<<< registerVarLookupFunc >>>>>>. =item unregisterVarLookupFunc $xpc->unregisterVarLookupFunc($name); Unregisters variable lookup function and the associated lookup data. =item registerFunctionNS $xpc->registerFunctionNS($name, $uri, $callback) Registers an extension function C<<<<<< $name >>>>>> in C<<<<<< $uri >>>>>> namespace. C<<<<<< $callback >>>>>> must be a CODE reference. The arguments of the callback function are either simple scalars or C<<<<<< XML::LibXML::* >>>>>> objects depending on the XPath argument types. The function is responsible for checking the argument number and types. Result of the callback code must be a single value of the following types: a simple scalar (number, string) or an arbitrary C<<<<<< XML::LibXML::* >>>>>> object that can be a result of findnodes: Boolean, Literal, Number, Node (e.g. Document, Element, etc.), or NodeList. For convenience, simple (non-blessed) array references containing only L<<<<<< XML::LibXML::Node >>>>>> objects can be used instead of a L<<<<<< XML::LibXML::NodeList >>>>>>. =item unregisterFunctionNS $xpc->unregisterFunctionNS($name, $uri) Unregisters extension function C<<<<<< $name >>>>>> in C<<<<<< $uri >>>>>> namespace. Has the same effect as passing C<<<<<< undef >>>>>> as C<<<<<< $callback >>>>>> to registerFunctionNS. =item registerFunction $xpc->registerFunction($name, $callback) Same as C<<<<<< registerFunctionNS >>>>>> but without a namespace. =item unregisterFunction $xpc->unregisterFunction($name) Same as C<<<<<< unregisterFunctionNS >>>>>> but without a namespace. =item findnodes @nodes = $xpc->findnodes($xpath) @nodes = $xpc->findnodes($xpath, $context_node ) $nodelist = $xpc->findnodes($xpath, $context_node ) Performs the xpath statement on the current node and returns the result as an array. In scalar context, returns an L<<<<<< XML::LibXML::NodeList >>>>>> object. Optionally, a node may be passed as a second argument to set the context node for the query. The xpath expression can be passed either as a string or or as a L<<<<<< XML::LibXML::XPathExpression >>>>>> object. =item find $object = $xpc->find($xpath ) $object = $xpc->find($xpath, $context_node ) Performs the xpath expression using the current node as the context of the expression, and returns the result depending on what type of result the XPath expression had. For example, the XPath C<<<<<< 1 * 3 + 52 >>>>>> results in an L<<<<<< XML::LibXML::Number >>>>>> object being returned. Other expressions might return a L<<<<<< XML::LibXML::Boolean >>>>>> object, or a L<<<<<< XML::LibXML::Literal >>>>>> object (a string). Each of those objects uses Perl's overload feature to ``do the right thing'' in different contexts. Optionally, a node may be passed as a second argument to set the context node for the query. The xpath expression can be passed either as a string or or as a L<<<<<< XML::LibXML::XPathExpression >>>>>> object. =item findvalue $value = $xpc->findvalue($xpath ) $value = $xpc->findvalue($xpath, $context_node ) Is exactly equivalent to: $xpc->find( $xpath, $context_node )->to_literal; That is, it returns the literal value of the results. This enables you to ensure that you get a string back from your search, allowing certain shortcuts. This could be used as the equivalent of <xsl:value-of select=``some_xpath''/>. Optionally, a node may be passed in the second argument to set the context node for the query. The xpath expression can be passed either as a string or or as a L<<<<<< XML::LibXML::XPathExpression >>>>>> object. =item exists $bool = $xpc->exists( $xpath_expression, $context_node ); This method behaves like I<<<<<< findnodes >>>>>>, except that it only returns a boolean value (1 if the expression matches a node, 0 otherwise) and may be faster than I<<<<<< findnodes >>>>>>, because the XPath evaluation may stop early on the first match (this is true for libxml2 >= 2.6.27). For XPath expressions that do not return node-set, the method returns true if the returned value is a non-zero number or a non-empty string. =item setContextNode $xpc->setContextNode($node) Set the current context node. =item getContextNode my $node = $xpc->getContextNode; Get the current context node. =item setContextPosition $xpc->setContextPosition($position) Set the current context position. By default, this value is -1 (and evaluating XPath function C<<<<<< position() >>>>>> in the initial context raises an XPath error), but can be set to any value up to context size. This usually only serves to cheat the XPath engine to return given position when C<<<<<< position() >>>>>> XPath function is called. Setting this value to -1 restores the default behavior. =item getContextPosition my $position = $xpc->getContextPosition; Get the current context position. =item setContextSize $xpc->setContextSize($size) Set the current context size. By default, this value is -1 (and evaluating XPath function C<<<<<< last() >>>>>> in the initial context raises an XPath error), but can be set to any non-negative value. This usually only serves to cheat the XPath engine to return the given value when C<<<<<< last() >>>>>> XPath function is called. If context size is set to 0, position is automatically also set to 0. If context size is positive, position is automatically set to 1. Setting context size to -1 restores the default behavior. =item getContextSize my $size = $xpc->getContextSize; Get the current context size. =item setContextNode $xpc->setContextNode($node) Set the current context node. =back =head1 BUGS AND CAVEATS XML::LibXML::XPathContext objects I<<<<<< are >>>>>> reentrant, meaning that you can call methods of an XML::LibXML::XPathContext even from XPath extension functions registered with the same object or from a variable lookup function. On the other hand, you should rather avoid registering new extension functions, namespaces and a variable lookup function from within extension functions and a variable lookup function, unless you want to experience untested behavior. =head1 AUTHORS Ilya Martynov and Petr Pajas, based on XML::LibXML and XML::LibXSLT code by Matt Sergeant and Christian Glahn. =head1 HISTORICAL REMARK Prior to XML::LibXML 1.61 this module was distributed separately for maintenance reasons. =head1 AUTHORS Matt Sergeant, Christian Glahn, Petr Pajas =head1 VERSION 2.0014 =head1 COPYRIGHT 2001-2007, AxKit.com Ltd. 2002-2006, Christian Glahn. 2006-2009, Petr Pajas. =cut
Dokaponteam/ITF_Project
xampp/perl/vendor/lib/XML/LibXML/XPathContext.pod
Perl
mit
11,621
=pod =head1 NAME SSL_get_current_cipher, SSL_get_cipher_name, SSL_get_cipher, SSL_get_cipher_bits, SSL_get_cipher_version - get SSL_CIPHER of a connection =head1 SYNOPSIS #include <openssl/ssl.h> SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl); const char *SSL_get_cipher_name(const SSL *s); const char *SSL_get_cipher(const SSL *s); int SSL_get_cipher_bits(const SSL *s, int *np) \ const char *SSL_get_cipher_version(const SSL *s); =head1 DESCRIPTION SSL_get_current_cipher() returns a pointer to an SSL_CIPHER object containing the description of the actually used cipher of a connection established with the B<ssl> object. See L<SSL_CIPHER_get_name(3)> for more details. SSL_get_cipher_name() obtains the name of the currently used cipher. SSL_get_cipher() is identical to SSL_get_cipher_name(). SSL_get_cipher_bits() is a macro to obtain the number of secret/algorithm bits used and SSL_get_cipher_version() returns the protocol name. =head1 RETURN VALUES SSL_get_current_cipher() returns the cipher actually used, or NULL if no session has been established. =head1 NOTES These are implemented as macros. =head1 SEE ALSO L<ssl(3)>, L<SSL_CIPHER_get_name(3)> =head1 COPYRIGHT Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L<https://www.openssl.org/source/license.html>. =cut
openweave/openweave-core
third_party/openssl/openssl/doc/ssl/SSL_get_current_cipher.pod
Perl
apache-2.0
1,524
%%%% PRETTY.PL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% portray(A) :- ?quoteAtoms, atom(A), format("'~w'", [A]). writeList([H | T]) :- pwrite(H), (T = [] -> true; T = [_ | _] -> (write(', '), writeList(T)); (write(' | '), write(T))). pwrite(V) :- var(V), !, write(V). pwrite(X) :- atomic(X), !, format('~p', [X]). pwrite({X}) :- !, format("~w", [{X}]). pwrite([H | T]) :- !, write('['), writeList([H | T]), write(']'). pwrite(A=B) :- (B == +; B == -), !, format('~w~p', [B, A]). pwrite(X) :- X =.. ['\\red' | ARGS], !, write('\\red{'), writeList(ARGS), write('}'). pwrite(X) :- X =.. [F, A, B], current_op(_, _, F), !, (?bracketOps -> format('(~p~w~p)', [A, F, B]); format('~p~w~p', [A, F, B])). pwrite(X) :- X =.. [F | ARGS], format('~w(', [F]), writeList(ARGS), write(')'). pretty(X, _) :- var(X), !, write(X). pretty(X, _) :- atomic(X), !, pwrite(X). pretty(X, OFFSET) :- (maxwidth(M) -> true; M = 100), fits(X, OFFSET/_, M), !, pwrite(X). pretty((A, B), OFFSET) :- !, write('('), pretty_args([A, B], OFFSET+1), write(')'). pretty(X, OFFSET) :- X = [_ | _], !, write('['), pretty_args(X, OFFSET+1), write(']'). pretty(F=D, OFFSET) :- !, plength(F, 0/FLENGTH), write(F), write('='), pretty(D, OFFSET+FLENGTH+1). pretty({X}, OFFSET) :- !, write('{'), pretty(X, OFFSET+2), write('}'). pretty(X, OFFSET) :- X =.. [F, A, B], current_op(_, _, F), !, write('('), pretty(A, OFFSET+1), nl, tab(OFFSET+2), print(F), tab(1), atom_codes(F, C), length(C, N), pretty(B, OFFSET+3+N), write(')'). pretty(X, OFFSET) :- \+ X = [_ | _], X =.. [F, A | ARGS], !, plength(F, 0/FLENGTH), write(F), write('('), pretty_args([A | ARGS], OFFSET+FLENGTH+1), write(')'). pretty(X, _) :- write(X). pretty(X) :- call_residue(copy_term(X, Y), _R), nl, \+ \+ ((instantiate(Y), pretty(Y, 0)); true). cpretty(X) :- removeFreeVars(X, Y), pretty(Y). pretty_args(L, _) :- var(L), !. pretty_args([], _) :- !. pretty_args(X, _) :- \+ X = [_ | _], !, pwrite(X). pretty_args([X | L], OFFSET) :- pretty(X, OFFSET), ((var(L); L == []) -> true; \+ L = [_ | _] -> write(' | '); (write(','), nl, tab(OFFSET))), pretty_args(L, OFFSET). plength(V, I/O) :- var(V), !, O is I+3. plength(X, I/O) :- atom(X), !, name(X, L), length(L, N), O is I+N. plength(X, I/O) :- integer(X), !, O is I+1. plength([X | L], I/O) :- !, plength(X, I/T1), plength(L, T1/T2), O is T2+3. plength(T, I/O) :- T =.. [F | ARGS], plength(F, I/T1), argslength(ARGS, T1/O). argslength([], N/N). argslength([H | T], N0/N2) :- plength(H, N0/N1), argslength(T, N1/N2). fits(V, I/O, MAX) :- var(V), !, O is I+1, O < MAX. fits(X, I/O, MAX) :- latex, member(X, [lambda, exists, exists1, forall, subset]), !, O is I+1, O < MAX. fits(X, I/O, MAX) :- atom(X), !, atom_chars(X, L), length(L, N), O is I+N, O < MAX. fits(X, I/O, MAX) :- number(X), !, O is I+1, O < MAX. fits([X | L], I/O, MAX) :- !, fits(X, I/T1, MAX), fits(L, T1/T2, MAX), O is T2+3, O < MAX. fits(T, I/O, MAX) :- T =.. [F | ARGS], fits(F, I/T1, MAX), fits(ARGS, T1/O, MAX). instantiate(X) :- instantiate(X, 1, _N). makeVar(I, V) :- I < 26, !, J is I+64, atom_chars(V, [J]). makeVar(I, V) :- J is I//26, K is I-(26*J)+1, makeVar(J, V0), makeVar(K, V1), atom_concat(V0, V1, V). instantiate(V, I, J) :- var(V), !, makeVar(I, V), J is I+1. instantiate(X, I, I) :- atomic(X), !. instantiate([H | T], I, K) :- !, instantiate(H, I, J), instantiate(T, J, K). instantiate(X, I, J) :- X =.. L, instantiate(L, I, J). treepr(X) :- treepr(X, ''). treepr(X) :- treepr(user_output, X). treepr([H | T0], I0) :- format('~n~w~w', [I0, H]), atom_concat(I0, ' ', I1), sort(T0, T1), treeprdtrs(T1, I1). treeprdtrs([], _I). treeprdtrs([H | T], I) :- treepr(H, I), treeprdtrs(T, I). minipage(GOAL) :- with_output_to_atom(GOAL, T1), format(" \\begin{minipage}[t]{0.5\\linewidth}~w \\end{minipage} ", [T1]). verbatim(G) :- with_output_to_atom(G, T1), format(" \\begin{Verbatim}[commandchars=\\\\\\{\\}]~w \\end{Verbatim} ", [T1]). hbox(G) :- with_output_to_atom(G, T), format(" \\hbox{ ~w }", [T]).
AllanRamsay/dgParser
pretty.pl
Perl
mit
4,726
# Copyright (c) 2010 - Action Without Borders # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. package IFTest::TestMailer; use strict; use base qw( Test::Class ); use Test::More; use IFTest::Application; use IF::Utility; use IF::Log; use utf8; sub setUp : Test(startup => 2) { my ($self) = @_; my $app = IFTest::Application->application(); ok($app, "grabbed app handle"); $self->{mailer} = $app->mailer(); ok($self->{mailer}, "grabbed mailer from app"); } sub test_addresses : Test(7) { my ($self) = @_; ok($self->{mailer}->emailAddressIsValid('foo@bar.baz'), "foo\@bar.baz is valid email"); ok(!$self->{mailer}->emailAddressIsSafe('foo@bar.baz'), "foo\@bar.baz is not safe"); ok($self->{mailer}->emailAddressIsValid('banana@banana.foz'), "banana\@banana.foz is valid email"); ok($self->{mailer}->emailAddressIsSafe('banana@banana.foz'), "banana\@banana.foz is safe because the application allows it"); my $admin = $self->{mailer}->SITE_ADMINISTRATOR(); ok($admin, "Site administrator email present"); ok($self->{mailer}->emailAddressIsValid($admin), "Site administrator email is valid"); ok($self->{mailer}->emailAddressIsSafe($admin), "Site administrator email is safe"); } sub tearDown : Test(shutdown => 0) { my ($self) = @_; } 1;
quile/if-framework
framework/t/IFTest/TestMailer.pm
Perl
mit
2,333
package EnsEMBL::Gramene::Component::Location::GenomeGWAS; ### Module to ... use strict; use warnings; no warnings "uninitialized"; use base qw(EnsEMBL::Web::Component::Location); use CGI qw(escapeHTML); use Data::Dumper; use EnsEMBL::Web::Text::FeatureParser; use EnsEMBL::Web::File::Text; use EnsEMBL::Web::RegObj; sub _init { my $self = shift; $self->cacheable( 0 ); $self->ajaxable( 1 ); $self->configurable( 1 ); } sub content { my $self = shift; my $object = $self->object; my $species = $object->species; return "<h3> here is some content </h3>'; } 1;
warelab/gramene-ensembl
gramene/modules/EnsEMBL/Gramene/Component/GenomeGWAS.pm
Perl
mit
584
% This file is part of the Attempto Parsing Engine (APE). % Copyright 2008-2013, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch). % % The Attempto Parsing Engine (APE) is free software: you can redistribute it and/or modify it % under the terms of the GNU Lesser General Public License as published by the Free Software % Foundation, either version 3 of the License, or (at your option) any later version. % % The Attempto Parsing Engine (APE) is distributed in the hope that it will be useful, but WITHOUT % ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR % PURPOSE. See the GNU Lesser General Public License for more details. % % You should have received a copy of the GNU Lesser General Public License along with the Attempto % Parsing Engine (APE). If not, see http://www.gnu.org/licenses/. :- module(lexicon_interface, [ adv/2, adv_comp/2, adv_sup/2, adj_itr/2, adj_itr_comp/2, adj_itr_sup/2, adj_tr/3, adj_tr_comp/3, adj_tr_sup/3, noun_sg/3, noun_pl/3, noun_mass/3, mn_sg/2, mn_pl/2, pn_sg/3, pn_pl/3, pndef_sg/3, pndef_pl/3, iv_finsg/2, iv_infpl/2, tv_finsg/2, tv_infpl/2, tv_pp/2, dv_finsg/3, dv_infpl/3, dv_pp/3, prep/2, common_noun/1, verb/1, attributive_adjective/1 ]). :- use_module(clex). :- use_module(ulex). % Calls to the lexicon. % The user lexicon (ulex) is preferred to % the common lexicon (clex). % % BUG: it looks ugly, maybe there is a nicer way to do it. adv(WordForm, Word) :- var(WordForm), var(Word), !, fail. adv(WordForm, Word) :- ulex:adv(WordForm, Word). adv(WordForm, Word) :- clex_switch(on), clex:adv(WordForm, Word). adv_comp(WordForm, Word) :- var(WordForm), var(Word), !, fail. adv_comp(WordForm, Word) :- ulex:adv_comp(WordForm, Word). adv_comp(WordForm, Word) :- clex_switch(on), clex:adv_comp(WordForm, Word). adv_sup(WordForm, Word) :- var(WordForm), var(Word), !, fail. adv_sup(WordForm, Word) :- ulex:adv_sup(WordForm, Word). adv_sup(WordForm, Word) :- clex_switch(on), clex:adv_sup(WordForm, Word). adj_itr(WordForm, Word) :- var(WordForm), var(Word), !, fail. adj_itr(WordForm, Word) :- ulex:adj_itr(WordForm, Word). adj_itr(WordForm, Word) :- clex_switch(on), clex:adj_itr(WordForm, Word). adj_itr_comp(WordForm, Word) :- var(WordForm), var(Word), !, fail. adj_itr_comp(WordForm, Word) :- ulex:adj_itr_comp(WordForm, Word). adj_itr_comp(WordForm, Word) :- clex_switch(on), clex:adj_itr_comp(WordForm, Word). adj_itr_sup(WordForm, Word) :- var(WordForm), var(Word), !, fail. adj_itr_sup(WordForm, Word) :- ulex:adj_itr_sup(WordForm, Word). adj_itr_sup(WordForm, Word) :- clex_switch(on), clex:adj_itr_sup(WordForm, Word). adj_tr(WordForm, Word, _Prep) :- var(WordForm), var(Word), !, fail. adj_tr(WordForm, Word, Prep) :- ulex:adj_tr(WordForm, Word, Prep). adj_tr(WordForm, Word, Prep) :- clex_switch(on), clex:adj_tr(WordForm, Word, Prep). adj_tr_comp(WordForm, Word, _Prep) :- var(WordForm), var(Word), !, fail. adj_tr_comp(WordForm, Word, Prep) :- ulex:adj_tr_comp(WordForm, Word, Prep). adj_tr_comp(WordForm, Word, Prep) :- clex_switch(on), clex:adj_tr_comp(WordForm, Word, Prep). adj_tr_sup(WordForm, Word, _Prep) :- var(WordForm), var(Word), !, fail. adj_tr_sup(WordForm, Word, Prep) :- ulex:adj_tr_sup(WordForm, Word, Prep). adj_tr_sup(WordForm, Word, Prep) :- clex_switch(on), clex:adj_tr_sup(WordForm, Word, Prep). noun_sg(WordForm, Word, _Gender) :- var(WordForm), var(Word), !, fail. noun_sg(WordForm, Word, Gender) :- ulex:noun_sg(WordForm, Word, Gender). noun_sg(WordForm, Word, Gender) :- clex_switch(on), clex:noun_sg(WordForm, Word, Gender). noun_pl(WordForm, Word, _Gender) :- var(WordForm), var(Word), !, fail. noun_pl(WordForm, Word, Gender) :- ulex:noun_pl(WordForm, Word, Gender). noun_pl(WordForm, Word, Gender) :- clex_switch(on), clex:noun_pl(WordForm, Word, Gender). noun_mass(WordForm, Word, _Gender) :- var(WordForm), var(Word), !, fail. noun_mass(WordForm, Word, Gender) :- ulex:noun_mass(WordForm, Word, Gender). noun_mass(WordForm, Word, Gender) :- clex_switch(on), clex:noun_mass(WordForm, Word, Gender). mn_sg(WordForm, Word) :- var(WordForm), var(Word), !, fail. mn_sg(WordForm, Word) :- ulex:mn_sg(WordForm, Word). mn_sg(WordForm, Word) :- clex_switch(on), clex:mn_sg(WordForm, Word). mn_pl(WordForm, Word) :- var(WordForm), var(Word), !, fail. mn_pl(WordForm, Word) :- ulex:mn_pl(WordForm, Word). mn_pl(WordForm, Word) :- clex_switch(on), clex:mn_pl(WordForm, Word). pn_sg(WordForm, Word, _Gender) :- var(WordForm), var(Word), !, fail. pn_sg(WordForm, Word, Gender) :- ulex:pn_sg(WordForm, Word, Gender). pn_sg(WordForm, Word, Gender) :- clex_switch(on), clex:pn_sg(WordForm, Word, Gender). pn_pl(WordForm, Word, _Gender) :- var(WordForm), var(Word), !, fail. pn_pl(WordForm, Word, Gender) :- ulex:pn_pl(WordForm, Word, Gender). pn_pl(WordForm, Word, Gender) :- clex_switch(on), clex:pn_pl(WordForm, Word, Gender). pndef_sg(WordForm, Word, _Gender) :- var(WordForm), var(Word), !, fail. pndef_sg(WordForm, Word, Gender) :- ulex:pndef_sg(WordForm, Word, Gender). pndef_sg(WordForm, Word, Gender) :- clex_switch(on), clex:pndef_sg(WordForm, Word, Gender). pndef_pl(WordForm, Word, _Gender) :- var(WordForm), var(Word), !, fail. pndef_pl(WordForm, Word, Gender) :- ulex:pndef_pl(WordForm, Word, Gender). pndef_pl(WordForm, Word, Gender) :- clex_switch(on), clex:pndef_pl(WordForm, Word, Gender). iv_finsg(WordForm, Word) :- var(WordForm), var(Word), !, fail. iv_finsg(WordForm, Word) :- ulex:iv_finsg(WordForm, Word). iv_finsg(WordForm, Word) :- clex_switch(on), clex:iv_finsg(WordForm, Word). iv_infpl(WordForm, Word) :- var(WordForm), var(Word), !, fail. iv_infpl(WordForm, Word) :- ulex:iv_infpl(WordForm, Word). iv_infpl(WordForm, Word) :- clex_switch(on), clex:iv_infpl(WordForm, Word). tv_finsg(WordForm, Word) :- var(WordForm), var(Word), !, fail. tv_finsg(WordForm, Word) :- ulex:tv_finsg(WordForm, Word). tv_finsg(WordForm, Word) :- clex_switch(on), clex:tv_finsg(WordForm, Word). tv_infpl(WordForm, Word) :- var(WordForm), var(Word), !, fail. tv_infpl(WordForm, Word) :- ulex:tv_infpl(WordForm, Word). tv_infpl(WordForm, Word) :- clex_switch(on), clex:tv_infpl(WordForm, Word). tv_pp(WordForm, Word) :- var(WordForm), var(Word), !, fail. tv_pp(WordForm, Word) :- ulex:tv_pp(WordForm, Word). tv_pp(WordForm, Word) :- clex_switch(on), clex:tv_pp(WordForm, Word). dv_finsg(WordForm, Word, _Prep) :- var(WordForm), var(Word), !, fail. dv_finsg(WordForm, Word, Prep) :- ulex:dv_finsg(WordForm, Word, Prep). dv_finsg(WordForm, Word, Prep) :- clex_switch(on), clex:dv_finsg(WordForm, Word, Prep). dv_infpl(WordForm, Word, _Prep) :- var(WordForm), var(Word), !, fail. dv_infpl(WordForm, Word, Prep) :- ulex:dv_infpl(WordForm, Word, Prep). dv_infpl(WordForm, Word, Prep) :- clex_switch(on), clex:dv_infpl(WordForm, Word, Prep). dv_pp(WordForm, Word, _Prep) :- var(WordForm), var(Word), !, fail. dv_pp(WordForm, Word, Prep) :- ulex:dv_pp(WordForm, Word, Prep). dv_pp(WordForm, Word, Prep) :- clex_switch(on), clex:dv_pp(WordForm, Word, Prep). prep(WordForm, Word) :- var(WordForm), var(Word), !, fail. prep(WordForm, Word) :- ulex:prep(WordForm, Word). prep(WordForm, Word) :- clex_switch(on), clex:prep(WordForm, Word). common_noun(WordForm) :- ( noun_sg(WordForm, _, _) ; noun_pl(WordForm, _, _) ; noun_mass(WordForm, _, _) ). verb(WordForm) :- ( iv_finsg(WordForm, _) ; iv_infpl(WordForm, _) ; tv_finsg(WordForm, _) ; tv_infpl(WordForm, _) ; dv_finsg(WordForm, _, _) ; dv_infpl(WordForm, _, _) ). %% attributive_adjective(+WordForm:atom) is det. % % @param WordForm is an ACE token % % Succeeds if WordForm is an attributive adjective attributive_adjective(WordForm) :- ( adj_itr(WordForm, _) ; adj_itr_comp(WordForm, _) ; adj_itr_sup(WordForm, _) ).
TeamSPoon/logicmoo_workspace
packs_sys/logicmoo_nlu/ext/ape/prolog/lexicon/lexicon_interface.pl
Perl
mit
7,823
#!/usr/bin/perl #script integrates the results of clustering and source text (input_file) # output_log input_file out use warnings; use strict; use Encode; sub usage { print "\nUse: $0 claster_log file out_file\n"; exit 1; } usage if ( $#ARGV != 2); my $log = shift @ARGV; my $fls = shift @ARGV; my $f_out = shift @ARGV; ########################################################### open( F_LOG, $log ) or die "Can't open file: $!"; binmode(F_LOG, ":encoding(UTF-8)"); open( F_IN, $fls ) or die "Can't open file: $!"; binmode(F_IN, ":encoding(UTF-8)"); open( F_OUT, '>', $f_out) or die "Can't open file: $!"; binmode(F_OUT, ":encoding(UTF-8)"); my %tmp=(); while (my $lin =<F_IN>) { my @t = split "\t", $lin; if ($#t==1){ my @sym = split(//, $t[1]); my $str; if ($#sym > 170){ for(my $x=0; $x<170; $x++) { $str.= $sym[$x]; } $str.="..."; } else{ $t[1]=~s/[\r\n\"]+//; $str=$t[1]; } $tmp{$t[0]} = $str; } else{ print "error format...\n$lin\n"; } } print F_OUT "cluster_number\tweigth\tIDoc\ttext(limit is 170 symbols)\n"; while (my $line =<F_LOG>) { if ($line =~ /\S/){ my @str = split ":", $line; my %h=(); my @cls = split ";", $str[1]; foreach my $cls (@cls){ if ($cls =~ /\d/){ my @one = split " ", $cls; if(!exists( $h{$one[0]}) ) { $h{$one[0]} = $one[1]; } } } foreach my $h (reverse sort { $h{$a} <=> $h{$b} } keys %h){ if(exists( $tmp{$h})){ my $cnt=$str[0]+1; my $wgt=int ($h{$h}*1000); print F_OUT "$cnt\t$h\t$tmp{$h}\n"; } } } }
lionalion/clusterization
examples/out_claster_log.pl
Perl
mit
1,552
#!/usr/bin/perl -w BEGIN { # Add executable dir to INC to find CPin.pm $0 =~ /^(.*?)\/([^\/]+)$/; # $1 Path $2 filename push @INC, $1; } use strict; use IO::File; use Getopt::Long; use CPin; main(); sub main { my @origArgs = @ARGV; my ($pH, $stepPeriod, $dummy, $stateStr,$stateFile, $sysName, $minpKa, $maxpKa, $resNumStr, $resNameStr, $notResNumStr, $notResNameStr); GetOptions("states=s"=>\$dummy, # Clear flags to find filename "outfile|statefile=s" => \$dummy, "system=s" => \$dummy, "minpKa=f" => \$dummy, "maxpKa=f" => \$dummy, "resnum=s" =>\$dummy, "resname=s" =>\$dummy, "notresnum=s" => \$dummy, "notresname=s" => \$dummy, "help|usage|?" => \&usageMessage ); my $file = defined($ARGV[0]) ? $ARGV[0] : '-'; @ARGV = @origArgs; my $fh = new IO::File($file); $_ = $fh->getc(); $fh->ungetc(ord $_); my $cpin; if (/^\d/) { # Old style charges file $cpin = new CPinFile($fh); } elsif ($_ eq '&' or $_ eq ' ') { # New (namelist) style charges file $cpin = new CPinNamelist($fh); } else { $cpin = new CPinFromPDBFile($fh); $cpin->SysName("Unknown"); } GetOptions("states=s" => \ $stateStr, # Have input stream, now really process flags "outfile|statefile=s" => \ $stateFile, "system=s" => \$sysName, "minpKa=f" => \$minpKa, "maxpKa=f" => \$maxpKa, "resnum=s" => \$resNumStr, "resname=s" =>\$resNameStr, "notresnum=s" => \$notResNumStr, "notresname=s" => \$notResNameStr ); if (defined($sysName)) { $cpin->SysName($sysName); $cpin->setpKas() if $cpin->isa('CPinFromPDBFile'); } if (defined($stateStr)) { $cpin->setStates(split(/,/,$stateStr)); } if (defined($stateFile)) { $cpin->setStatesFromOutputFile($stateFile); } # Filter residues my $i = 0; my (%SelResNums,%SelResNames,%UnselResNums, %UnselResNames); %SelResNums = map {$_ => $_} split(/,/, $resNumStr) if defined $resNumStr; %SelResNames = map {uc($_) => $_} split(/,/, $resNameStr) if defined $resNameStr; %UnselResNums = map {$_ => $_} split(/,/, $notResNumStr) if defined $notResNumStr; %UnselResNames = map {uc($_) => $_} split(/,/, $notResNameStr) if defined $notResNameStr; while ($i < $cpin->ResCount()) { my $res = $cpin->getRes($i); my $deleteRes = 0; if (defined $minpKa and defined $res->pKa() and $res->pKa() < $minpKa) { $deleteRes = 1; } if (defined $maxpKa and defined $res->pKa() and $res->pKa() > $maxpKa) { $deleteRes = 1; } if (defined $resNumStr and not exists $SelResNums{$res->ResNum()}) { $deleteRes = 1; } if (defined $resNameStr and not exists $SelResNames{uc($res->ResName())}) { $deleteRes = 1; } if (defined $notResNumStr and exists $UnselResNums{$res->ResNum()}) { $deleteRes = 1; } if (defined $notResNameStr and exists $UnselResNames{uc($res->ResName())}) { $deleteRes = 1; } if ($deleteRes) { $cpin->DeleteResidueNum($i); } else { $i++; } } print $cpin->outputNml(); } sub usageMessage() { print <<USAGE; CPinUtil -- utility for manipulating constant pH MD charges files cpinutil.pl <cpinfile or PDB file> [-states=<val,val...>] [-system=<string>] [-minpKa=<val>] [-maxpKa=<val>] [-resnum=<val,val...>] [-resname=<val,val...>] [-notresnum=<val,val...>] [-notresname=<val,val...>] cpinfile or PDB file existing cpin file, cprestrt file or PDB file for system (can also read these from STDIN) states list of initial states for residues system System name (for looking up experimental pKa values) The following options delete residues from the cpin file so they don't titrate minpKa Eliminate residues with experimental pKa less than val maxpKa Eliminate residues with experimental pKa higher than val resnum Eliminate residues numbers *not* in the list notresnum Eliminate residues with number that *are* in the list resname Eliminate residue types *not* in the list notresname Eliminate residue types that *are* in the list Example: ambpdb <prmcrd | cpinutil.pl -system HEWL -maxpKa 7 -notresname HIP >cpin This example would create a cpin file from prmtop and prmcrd, loading experimental pKa values for lysozyme. Only non-histidine residues with experimental pkA less than 7 would titrate. USAGE exit; }
dvillega/scripts
cpinutil.pl
Perl
mit
4,641
:- module( ctriples_write_triples, [ ctriples_write_triple/4, % +Write:stream % +State:compound % +BNodePrefix:iri % +Triple:compound ctriples_write_triples/3, % +Write:or([atom,stream]) % +Triples:list(compound) % +Options:list(compound) ctriples_write_triples_to_stream/2 % +Triples:list(compound) % +Options:list(compound) ] ). /** <module> C-Triples write: Triples Serialize RDF in the C-Triples and C-Quads format A simple implementation for emitting RDF data in C-Triples and C-Quads serialization formats, reusing some of the Turtle writer. Intended to work with RDF data stored using SWI-Prolog's Semweb library. In C-Triples/C-Quads only short Turtle strings (delimited by a single double quote) occur. Linefeeds and carriage returns are escaped. This means that we can guarantee that the number of triples is the same as the number of lines in the generated file. Also the number of spaces between the RDF terms is exactly one and lines end in one space, one dot, and a newline character. Simple literals are not emitted, the `xsd:string` datatype is made explicit. Language-tagged strings are made explicit with datatype `rdf:langString`. @author Wouter Beek @version 2015/08 */ :- use_module(library(apply)). :- use_module(library(lists)). :- use_module(library(ctriples/ctriples_write_generics)). :- predicate_options(ctriples_write_triples/3, 3, [ pass_to(ctriples_write_triples_to_stream/2, 2) ]). :- predicate_options(ctriples_write_triples_to_stream/2, 2, [ pass_to(ctriples_write_begin/3, 3), pass_to(ctriples_write_end/2, 2) ]). %! ctriples_write_triple( %! +Write:stream, %! +State:compound, %! +BNodePrefix:iri, %! +Triple:compound %! ) is det. ctriples_write_triple(Write, State, BPrefix, T):- with_output_to(Write, ctriples_write_triple_to_stream(State, BPrefix, T)). %! ctriples_write_triple_to_stream( %! +State:compound, %! +BNodePrefix:iri, %! +Triple:compound %! ) is det. ctriples_write_triple_to_stream(State, BPrefix, T):- inc_number_of_triples(State), ( T = rdf(S,P,O) -> write_triple(S, P, O, BPrefix) ; T = rdf(S,P,O,G) -> write_quadruple(S, P, O, G, BPrefix) ; true ). %! ctriples_write_triples( %! +Source:or([atom,stream]), %! +Triples:list(compound), %! +Options:list(compound) %! ) is det. % Writes RDF data using the C-Triples/C-Quads serialization format. ctriples_write_triples(Write, Ts, Opts):- is_stream(Write), !, with_output_to(Write, ctriples_write_triples_to_stream(Ts, Opts)). ctriples_write_triples(Write, Ts, Opts):- is_absolute_file_name(File), setup_call_cleanup( open(File, write, Write), with_output_to(Write, ctriples_write_triples_to_stream(Ts, Opts)), close(Write) ). %! ctriples_write_triples_to_stream( %! +Triples:list(compound), %! +Options:list(compound) %! ) is det. ctriples_write_triples_to_stream(Ts1, Opts):- ctriples_write_begin(State, BPrefix, Opts), sort(Ts1, Ts2), maplist(ctriples_write_triple_to_stream(State, BPrefix), Ts2), ctriples_write_end(State, Opts).
Anniepoo/plRdf
prolog/ctriples/ctriples_write_triples.pl
Perl
mit
3,264
package CyborgTest; use strict; use warnings; use Test::More; use Test::Deep; use List::MoreUtils 'firstidx'; require Exporter; our @ISA = 'Exporter'; our @EXPORT = qw/clone done Player Game r j c D L N/; use CyborgRally; use JSON; my $json = JSON->new->convert_blessed; my $rally = CyborgRally->new; my $cards = Deck::Movement->new(4); use constant D => { damaged => 1, program => ignore(), locked => 1 }; use constant L => { damaged => '', program => ignore(), locked => 1 }; use constant N => { damaged => '', program => ignore(), locked => '' }; undef &Game::broadcast; *Game::broadcast = sub { my ( $self, $cmd, $msg ) = @_; if ( ref($cmd) eq 'HASH' ) { $msg = $cmd; } else { $msg->{cmd} = $cmd; } push @{ $self->{packets} }, $json->decode( $json->encode($msg) ); }; *Game::drop_packets = sub { my $self = shift; $self->{packets} = []; map { $_->{packets} = [] } values %{ $self->{player} }; }; *Game::give_option = sub { my ($self, $player, $option) = @_; my $idx = firstidx { $_->{name} =~ /$option/i } @{ $self->{options}{cards} }; if ($idx != -1) { my $o = splice @{ $self->{options}{cards} }, $idx, 1; $player->{public}{options}{$o->{name}} = $o; } else { die "No option $option exists\n"; } }; *Game::set_hand = sub { my ($self, $player, @cards) = @_; my $hand = Deck->new; my $movement = Deck::Movement->new( 1 ); for my $c (@cards) { my $idx = firstidx { $_->{name} eq $c } @{ $movement->{cards} }; if ($idx != -1) { my $o = splice @{ $movement->{cards} }, $idx, 1; push @{$hand->{cards}}, $o; } } $player->{private}{cards} = $hand; }; sub clone { return $json->decode( $json->encode(shift) ); } sub Game { my ( $opts, $players ) = @_; $opts->{name} = 'test'; $players ||= 2; my @ret = $rally->{game}{test} = Rally->new($opts); for my $n ( 1 .. $players ) { my $p = TestPlayer->new($n); $p->join('test'); push @ret, $p; } $ret[0]->set_state('SETUP'); $ret[0]->update; return @ret; } sub Player { my ($pkg, $name) = @_; return TestPlayer->new($name); } sub done { for my $p ( values %{ $rally->{game}{test}{player} } ) { $rally->do_quit($p); undef $p->{game}; undef $p->{public}; undef $p->{private}; } $rally->{game} = {}; $rally->{cyborg} = {}; done_testing; } sub j { return $json->decode( $json->encode(shift) ); } sub c { return $cards->{card}[shift]; } sub r { my ( $r, $dmg ) = @_; if ( defined $r && !ref($r) ) { $r = c($r); } my $register = { program => defined($r) ? [$r] : [], damaged => !!$dmg, locked => !!$dmg }; return $register; } package TestPlayer; use strict; use warnings; use Test::More; use Test::Deep ':all'; use Data::Dumper; sub new { my ( $pkg, $name ) = @_; my $self = bless { packets => [], }, $pkg; $rally->on_message( $self, { cmd => 'login', name => $name } ); $self->{packets} = []; return $self; } sub drop_packets { my $self = shift; $self->{game}{packets} = []; map { $_->{packets} = [] } values %{ $self->{game}{player} }; } sub create { my ( $self, $game ) = @_; $rally->on_message( $self, { cmd => 'create_game', name => $game } ); $self->join($game); return $self->{game}; } sub join { my ( $self, $game ) = @_; $rally->{game}{$game}->join( $self, { cmd => 'join', name => $game } ); } sub game { my ( $self, $cmd, $msg ) = @_; if ( ref($cmd) eq '') { $msg->{cmd} = $cmd; } else { $msg = $cmd; } $msg = $json->decode( $json->encode($msg) ); $rally->on_message( $self, $msg ); } sub player { local $Test::Builder::Level = $Test::Builder::Level + 1; my $self = shift; $self->{game}{packets} = []; my $msg = shift; if ( ref($msg) ne 'HASH' ) { $msg = { cmd => $msg }; } my $comment; if ( ref( $_[-1] ) eq '' ) { $comment = pop @_; } $msg = $json->decode( $json->encode($msg) ); $rally->on_message( $self, $msg ); if ($comment && $comment =~ /DEBUG/) { print STDERR Data::Dumper->Dump([$msg, $self->{game}{packets}, $self->{packets}], ['Message', 'Game', 'Player']); } cmp_deeply( $self->{packets}, \@_, $comment ); $self->{packets} = []; } sub broadcast { local $Test::Builder::Level = $Test::Builder::Level + 1; my $self = shift; $self->{packets} = []; $self->{game}{packets} = []; my $msg = shift; if ( ref($msg) ne 'HASH' ) { $msg = { cmd => $msg }; } my $comment; if ( ref( $_[-1] ) eq '' ) { $comment = pop @_; } $msg = $json->decode( $json->encode($msg) ); $rally->on_message( $self, $msg ); if ($comment && $comment =~ /DEBUG/) { print STDERR Data::Dumper->Dump([$msg, $self->{game}{packets}, $self->{packets}], ['Message', 'Game', 'Player']); } cmp_deeply( $self->{game}{packets}, \@_, $comment ); $self->{game}{packets} = []; } sub send { my ( $self, $cmd, $msg ) = @_; if ( ref($cmd) eq '') { $msg->{cmd} = $cmd; } else { $msg = $cmd; } push @{ $self->{packets} }, $json->decode( $json->encode($msg) ); } sub err { my ( $self, $msg ) = @_; $self->send( { cmd => 'error', reason => $msg } ); } 1;
bpa/cyborg-rally
lib/CyborgTest.pm
Perl
mit
5,447
package CXGN::Genotype::ParseUpload::Plugin::GridFileIntertekCSV; use Moose::Role; use SGN::Model::Cvterm; use Data::Dumper; use Text::CSV; # Check that all sample IDs are in the database already sub _validate_with_plugin { my $self = shift; my $filename = $self->get_filename(); my $protocol_id = $self->get_nd_protocol_id(); my $schema = $self->get_chado_schema(); my %errors; my @error_messages; my %missing_accessions; my $csv = Text::CSV->new({ sep_char => ',' }); my $F; # Open GRID FILE and parse open($F, "<", $filename) || die "Can't open file $filename\n"; my $header_row = <$F>; my @header_info; # Get first row, which is the header if ($csv->parse($header_row)) { @header_info = $csv->fields(); } # Remove the first column from the header my $unneeded_first_column = shift @header_info; my @fields = ($unneeded_first_column); my @markers = @header_info; my @observation_unit_names; # Iterate over all rows to get the sample ID and labID while (my $line = <$F>) { my @line_info; if ($csv->parse($line)) { @line_info = $csv->fields(); } my $sample_name = $line_info[0]; chomp $sample_name; $sample_name =~ s/^\s+|\s+$//g; push @observation_unit_names, $sample_name; } close($F); # Check that the first column in the header is equal to 'SampleName.LabID' if ($fields[0] ne 'SampleName.LabID'){ push @error_messages, 'Column 1 header must be "SampleName.LabID" in the Grid File.'; } my $number_observation_units = scalar(@observation_unit_names); print STDERR "Number observation units: $number_observation_units...\n"; my @observation_units_names_trim; # Separates sample name from lab id foreach (@observation_unit_names) { my ($observation_unit_name_with_accession_name, $lab_number) = split(/\./, $_, 2); $observation_unit_name_with_accession_name =~ s/^\s+|\s+$//g; my ($observation_unit_name, $accession_name) = split(/\|\|\|/, $observation_unit_name_with_accession_name); push @observation_units_names_trim, $observation_unit_name; } my $observation_unit_names = \@observation_units_names_trim; my $organism_id = $self->get_organism_id; my $accession_cvterm_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'accession', 'stock_type')->cvterm_id(); # Validate that the sample names are in the database already my $stock_type = $self->get_observation_unit_type_name; my @missing_stocks; my $validator = CXGN::List::Validate->new(); if ($stock_type eq 'tissue_sample'){ @missing_stocks = @{$validator->validate($schema,'tissue_samples',$observation_unit_names)->{'missing'}}; } elsif ($stock_type eq 'accession'){ @missing_stocks = @{$validator->validate($schema,'accessions',$observation_unit_names)->{'missing'}}; } elsif ($stock_type eq 'stocks'){ @missing_stocks = @{$validator->validate($schema,'stocks',$observation_unit_names)->{'missing'}}; } else { push @error_messages, "You can only upload genotype data for a tissue_sample OR accession (including synonyms) OR stocks!" } my %unique_stocks; foreach (@missing_stocks){ $unique_stocks{$_}++; } @missing_stocks = sort keys %unique_stocks; my @missing_stocks_return; # Optionally the missing sample ids can be created in the database as new accessions, but that is not recommended foreach (@missing_stocks){ if (!$self->get_create_missing_observation_units_as_accessions){ push @missing_stocks_return, $_; print STDERR "WARNING! Observation unit name $_ not found for stock type $stock_type. You can pass an option to automatically create accessions.\n"; } else { my $stock = $schema->resultset("Stock::Stock")->create({ organism_id => $organism_id, name => $_, uniquename => $_, type_id => $accession_cvterm_id, }); } } my $protocol = CXGN::Genotype::Protocol->new({ bcs_schema => $schema, nd_protocol_id => $protocol_id }); my $markers_in_protocol = $protocol->marker_names; my %markers_in_protocol_hash; foreach (@$markers_in_protocol) { $markers_in_protocol_hash{$_}++; } my @markers_not_in_protocol; foreach (@markers) { if (!exists($markers_in_protocol_hash{$_})) { push @markers_not_in_protocol, $_; } } #If there are markers in the uploaded file that are not saved in the protocol, they will be returned along in the error message if (scalar(@markers_not_in_protocol)>0){ $errors{'missing_markers'} = \@markers_not_in_protocol; push @error_messages, "The following markers are not in the database for the selected protocol: ".join(',',@markers_not_in_protocol); } # If there are missing sample names, they will be returned along with an error message if (scalar(@missing_stocks_return)>0){ $errors{'missing_stocks'} = \@missing_stocks_return; push @error_messages, "The following stocks are not in the database: ".join(',',@missing_stocks_return); } #store any errors found in the parsed file to parse_errors accessor if (scalar(@error_messages) >= 1) { $errors{'error_messages'} = \@error_messages; $self->_set_parse_errors(\%errors); return; } return 1; #returns true if validation is passed } # After validation, the file data is actually parsed into the expected object sub _parse_with_plugin { my $self = shift; my $filename = $self->get_filename(); my $protocol_id = $self->get_nd_protocol_id(); my $schema = $self->get_chado_schema(); my $stock_type = $self->get_observation_unit_type_name; my @error_messages; my %errors; print STDERR "Reading VCF to parse\n"; my $protocol = CXGN::Genotype::Protocol->new({ bcs_schema => $schema, nd_protocol_id => $protocol_id }); my %protocolprop_info; $protocolprop_info{'header_information_lines'} = $protocol->header_information_lines; $protocolprop_info{'sample_observation_unit_type_name'} = $protocol->sample_observation_unit_type_name; $protocolprop_info{'marker_names'} = $protocol->marker_names; #$protocolprop_info{'markers_array'} = $protocol->markers_array; my $marker_info = $protocol->markers; $protocolprop_info{'markers'} = $marker_info; my $csv = Text::CSV->new({ sep_char => ',' }); my $F; # Open GRID FILE and parse open($F, "<", $filename) || die "Can't open file $filename\n"; my $header_row = <$F>; my @header_info; # Get first row, which is the header if ($csv->parse($header_row)) { @header_info = $csv->fields(); } # Remove the first column from the header my $unneeded_first_column = shift @header_info; my @fields = ($unneeded_first_column); my @markers = @header_info; my %genotype_info; my @observation_unit_names; # Iterate over all rows in file while (my $line = <$F>) { my @line_info; if ($csv->parse($line)) { @line_info = $csv->fields(); } # Get sample id and collect then in an array my $sample_id_with_lab_id = shift @line_info; chomp $sample_id_with_lab_id; $sample_id_with_lab_id =~ s/^\s+|\s+$//g; push @observation_unit_names, $sample_id_with_lab_id; my $counter = 0; foreach my $customer_snp_id (@markers){ my $genotype = $line_info[$counter]; $counter++; my @alleles = split ":", $genotype; my $ref = $marker_info->{$customer_snp_id}->{ref}; my $alt = $marker_info->{$customer_snp_id}->{alt}; my $chrom = $marker_info->{$customer_snp_id}->{chrom}; my $marker_name = $marker_info->{$customer_snp_id}->{name} || $customer_snp_id; my $genotype_obj; if ($ref && $alt) { my @gt_vcf_genotype; my @ref_calls; my @alt_calls; my $gt_dosage = 0; foreach my $a (@alleles){ if ($a eq $ref) { push @gt_vcf_genotype, 0; push @ref_calls, $a; $gt_dosage++; } elsif ($a eq $alt) { push @gt_vcf_genotype, 1; push @alt_calls, $a; } elsif ($a eq '?' || $a eq 'Uncallable') { $gt_dosage = 'NA'; push @gt_vcf_genotype, 'NA'; push @alt_calls, 'NA'; } else { push @error_messages, "Allele Call Does Not Match Ref or Alt for Sample: $sample_id_with_lab_id Marker: $marker_name Alt: $alt Ref: $ref Allele: $a"; } } my @vcf_genotype = (@ref_calls, @alt_calls); my $vcf_genotype_string = join ',', @vcf_genotype; my $vcf_gt_genotype_string = join '/', @gt_vcf_genotype; $genotype_obj = { 'GT' => $vcf_gt_genotype_string, 'NT' => $vcf_genotype_string, 'DS' => "$gt_dosage" }; } else { die "There should always be a ref and alt according to validation above\n"; } $genotype_info{$sample_id_with_lab_id}->{$chrom}->{$marker_name} = $genotype_obj; } } close($F); if (scalar(@error_messages)>0) { $errors{'error_messages'} = \@error_messages; $self->_set_parse_errors(\%errors); return; } my %parsed_data = ( protocol_info => \%protocolprop_info, genotypes_info => \%genotype_info, observation_unit_uniquenames => \@observation_unit_names ); $self->_set_parsed_data(\%parsed_data); return 1; } 1;
solgenomics/sgn
lib/CXGN/Genotype/ParseUpload/Plugin/GridFileIntertekCSV.pm
Perl
mit
10,534
#!/usr/bin/perl -wW # $Id$ use strict; use integer; use LWP::UserAgent; my $postmaster = '/home/postmaster/Maildir/new'; my $sendmail = '/usr/lib/sendmail'; my $rundir = '/home/dsbl_cleaner'; my $timestamp = 0; my $webtext = ''; my $mailhead = "From: dsbl-org-remover\@banana.republic To: abuse\@microsoft.com Subject: [DSBL] - dsbl.org remove confirmation ---------------------------------------------------------- "; if ( -f "$rundir/dsbl-org.dat" ) { open( FD, "$rundir/dsbl-org.dat" ); $timestamp = <FD>; close(FD); } opendir( DIR, $postmaster ); while ( my $file = readdir(DIR) ) { next if ( $file =~ /^\./ ); ( my $test = $file ) =~ s/(^\d+)\.\d+\..*/$1/; if ( $test > $timestamp ) { $timestamp = $test; my $dsbl = 0; open( FD, "$postmaster/$file" ); while (<FD>) { next unless (/dsbl\.org\/removal_confirm/); $dsbl = 1; chomp; my $ua = LWP::UserAgent->new; $ua->agent( "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322" ); my $req = HTTP::Request->new( GET => "$_" ); my $res = $ua->request($req); if ( $res->is_success ) { $webtext = join( " ", $res->content ); $dsbl = 2; } } if ( $dsbl > 0 ) { seek( FD, 0, 0 ); my @txt = <FD>; open( SENDMAIL, "| $sendmail -oi -t " ) or die "Nie mogê otworzyæ sendmail'a: $!\n"; print SENDMAIL $mailhead; if ( $dsbl == 2 ) { print SENDMAIL $webtext; } print SENDMAIL @txt; close(SENDMAIL) or warn "Sendmail nie zamkn±³ siê ³adnie: $!\n"; } close(FD); } } closedir(DIR); open( FD, "> $rundir/dsbl-org.dat" ); print FD "$timestamp"; close(FD);
mmmonk/crap
dsbl_cleanup/dsbl-org.pl
Perl
mit
1,903
# Copyright 2020, Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Google::Ads::GoogleAds::V8::Common::HistoricalMetricsOptions; use strict; use warnings; use base qw(Google::Ads::GoogleAds::BaseEntity); use Google::Ads::GoogleAds::Utils::GoogleAdsHelper; sub new { my ($class, $args) = @_; my $self = {yearMonthRange => $args->{yearMonthRange}}; # Delete the unassigned fields in this object for a more concise JSON payload remove_unassigned_fields($self, $args); bless $self, $class; return $self; } 1;
googleads/google-ads-perl
lib/Google/Ads/GoogleAds/V8/Common/HistoricalMetricsOptions.pm
Perl
apache-2.0
1,040
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2021] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package ORM::EnsEMBL::DB::Accounts::Object::RecordOwner; ### NAME: ORM::EnsEMBL::DB::Accounts::Object::RecordOwner ### Base class for the group, user table in user database (since both group and user can own a record) use strict; use warnings; use parent qw(ORM::EnsEMBL::DB::Accounts::Object); use constant RECORD_TYPE => ''; sub create_record {die('not in use'); ## Creates a record of a given type (does not save it to the db) ## @param Type of the record ## @param Hashref of name value pair for columns of the new object (optional) my ($self, $type, $params) = @_; return ($self->add_records([{ %{$params || {}}, 'type' => $type, 'record_type' => $self->RECORD_TYPE, 'record_type_id' => $self->get_primary_key_value }]))[0]; } sub record_relationship_types {die('not in use'); ## @protected return [ annotations => { 'relationship' => 'records', 'condition' => {'type' => 'annotation'} }, bookmarks => { 'relationship' => 'records', 'condition' => {'type' => 'bookmark'} }, dases => { 'relationship' => 'records', 'condition' => {'type' => 'das'} }, favourite_tracks => { 'relationship' => 'records', 'condition' => {'type' => 'favourite_tracks'} }, histories => { 'relationship' => 'records', 'condition' => {'type' => 'history'} }, invitations => { 'relationship' => 'records', 'condition' => {'type' => 'invitation'} }, # this record only contains the invitations for the users who have not yet registered with ensembl, invitations for existing users are saved as Membership objects newsfilters => { 'relationship' => 'records', 'condition' => {'type' => 'newsfilter'} }, specieslists => { 'relationship' => 'records', 'condition' => {'type' => 'specieslist'} }, uploads => { 'relationship' => 'records', 'condition' => {'type' => 'upload'} }, urls => { 'relationship' => 'records', 'condition' => {'type' => 'url'} } ]; } sub record_relationship_params { ## @protected my ($class, $foreign_key) = @_; return { 'type' => 'one to many', 'class' => 'ORM::EnsEMBL::DB::Accounts::Object::Record', 'column_map' => {$foreign_key => 'record_type_id'}, 'methods' => { map {$_, undef} qw(add_on_save count find get_set_on_save)}, 'join_args' => [ 'record_type' => $class->RECORD_TYPE ] # join_args key is not documented in Rose, so take care of this if something changes in future }; } 1;
Ensembl/ensembl-orm
modules/ORM/EnsEMBL/DB/Accounts/Object/RecordOwner.pm
Perl
apache-2.0
3,337
# # Copyright 2022 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package apps::vmware::connector::mode::statusvm; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); sub custom_status_output { my ($self, %options) = @_; return 'status ' . $self->{result_values}->{connection_state} . ' [' . $self->{result_values}->{power_state} . ']'; } sub custom_overall_output { my ($self, %options) = @_; return 'overall status is ' . $self->{result_values}->{overall_status}; } sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'vm', type => 1, cb_prefix_output => 'prefix_vm_output', message_multiple => 'All virtual machines are ok' } ]; $self->{maps_counters}->{vm} = [ { label => 'status', type => 2, unknown_default => '%{connection_state} !~ /^connected$/i', set => { key_values => [ { name => 'connection_state' }, { name => 'power_state' } ], closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold_ng } }, { label => 'overall-status', type => 2, unknown_default => '%{overall_status} =~ /gray/i', warning_default => '%{overall_status} =~ /yellow/i', critical_default => '%{overall_status} =~ /red/i', set => { key_values => [ { name => 'overall_status' } ], closure_custom_output => $self->can('custom_overall_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold_ng } } ]; } sub prefix_vm_output { my ($self, %options) = @_; my $msg = "Virtual machine '" . $options{instance_value}->{display} . "'"; if (defined($options{instance_value}->{config_annotation})) { $msg .= ' [annotation: ' . $options{instance_value}->{config_annotation} . ']'; } $msg .= ': '; return $msg; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $options{options}->add_options(arguments => { 'vm-hostname:s' => { name => 'vm_hostname' }, 'filter' => { name => 'filter' }, 'scope-datacenter:s' => { name => 'scope_datacenter' }, 'scope-cluster:s' => { name => 'scope_cluster' }, 'scope-host:s' => { name => 'scope_host' }, 'filter-description:s' => { name => 'filter_description' }, 'filter-os:s' => { name => 'filter_os' }, 'filter-uuid:s' => { name => 'filter_uuid' }, 'display-description' => { name => 'display_description' } }); return $self; } sub manage_selection { my ($self, %options) = @_; $self->{vm} = {}; my $response = $options{custom}->execute( params => $self->{option_results}, command => 'statusvm' ); foreach my $vm_id (keys %{$response->{data}}) { my $vm_name = $response->{data}->{$vm_id}->{name}; $self->{vm}->{$vm_name} = { display => $vm_name, connection_state => $response->{data}->{$vm_id}->{connection_state}, power_state => $response->{data}->{$vm_id}->{power_state}, overall_status => $response->{data}->{$vm_id}->{overall_status} }; if (defined($self->{option_results}->{display_description})) { $self->{vm}->{$vm_name}->{config_annotation} = $options{custom}->strip_cr(value => $response->{data}->{$vm_id}->{'config.annotation'}); } } } 1; __END__ =head1 MODE Check virtual machine global status. =over 8 =item B<--vm-hostname> VM hostname to check. If not set, we check all VMs. =item B<--filter> VM hostname is a regexp. =item B<--filter-description> Filter also virtual machines description (can be a regexp). =item B<--filter-os> Filter also virtual machines OS name (can be a regexp). =item B<--scope-datacenter> Search in following datacenter(s) (can be a regexp). =item B<--scope-cluster> Search in following cluster(s) (can be a regexp). =item B<--scope-host> Search in following host(s) (can be a regexp). =item B<--unknown-status> Set unknown threshold for status (Default: '%{connection_state} !~ /^connected$/i'). Can used special variables like: %{connection_state}, %{power_state} =item B<--warning-status> Set warning threshold for status. Can used special variables like: %{connection_state} =item B<--critical-status> Set critical threshold for status. Can used special variables like: %{connection_state}, %{power_state} =item B<--unknown-overall-status> Set unknown threshold for status (Default: '%{overall_status} =~ /gray/i'). Can used special variables like: %{overall_status} =item B<--warning-overall-status> Set warning threshold for status (Default: '%{overall_status} =~ /yellow/i'). Can used special variables like: %{overall_status} =item B<--critical-overall-status> Set critical threshold for status (Default: '%{overall_status} =~ /red/i'). Can used special variables like: %{overall_status} =back =cut
centreon/centreon-plugins
apps/vmware/connector/mode/statusvm.pm
Perl
apache-2.0
6,139
=head1 LICENSE Copyright [2015-2020] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =head1 NAME Bio::DB::HTS::Pileup -- Object passed to pileup() callback =head1 SYNOPSIS See L<Bio::DB::HTS/The generic fetch() and pileup() methods> for how this object is passed to pileup callbacks. =head1 DESCRIPTION A Bio::DB::HTS::Pileup object (or a Bio::DB::HTS::PileupWrapper object) is passed to the callback passed to the Bio::DB::HTS->pileup() method for each column in a sequence alignment. The only difference between the two is that the latter returns the more convenient Bio::DB::HTS::AlignWrapper objects in response to the alignment() method, at the cost of some performance loss. =head2 Methods =over 4 =item $alignment = $pileup->alignment Return the Bio::DB::HTS::Alignment or Bio::DB::HTS::AlignWrapper object representing the aligned read. =item $alignment = $pileup->b This method is an alias for alignment(). It is available for compatibility with the C API. =item $qpos = $pileup->qpos Return the position of this aligned column in read coordinates, using zero-based coordinates. =item $pos = $pileup->pos Return the position of this aligned column in read coordinates, using 1-based coordinates. =item $indel = $pileup->indel If this column is an indel, return a positive integer for an insertion relative to the reference, a negative integer for a deletion relative to the reference, or 0 for no indel at this column. =item $is_del = $pileup->is_del True if the base on the padded read is a deletion. =item $level = $pileup->level If pileup() or fast_pileup() was invoked with the "keep_level" flag, then this method will return a positive integer indicating the level of the read in a printed multiple alignment. =item $pileup->is_head =item $pileup->is_tail These fields are defined in bam.h but their interpretation is obscure. =back =head1 AUTHOR Rishi Nag E<lt>rishi@ebi.ac.uk<gt> =head1 SEE ALSO L<Bio::Perl>, L<Bio::DB::HTS>, L<Bio::DB::HTS::Alignment>, L<Bio::DB::HTS::Constants> =cut # documentation only package Bio::DB::HTS::Pileup; use strict; use warnings; $Bio::DB::HTS::Pileup::VERSION = '3.01'; 1;
Ensembl/Bio-HTS
lib/Bio/DB/HTS/Pileup.pm
Perl
apache-2.0
2,682
#!/usr/bin/perl #### http://search.cpan.org/~exobuzz/MediaWiki-API-0.41/lib/MediaWiki/API.pm use MediaWiki::API; use strict; use warnings; my $mw = MediaWiki::API->new(); $mw->{config}->{api_url} = 'http://en.wikipedia.org/w/api.php'; # # get user info # my $userinfo = $mw->api( { # action => 'query', # meta => 'userinfo', # uiprop => 'blockinfo|hasmsg|groups|rights|options|editcount|ratelimits' } ); # #Which version of true / false constants is more correct? use constant false => 0; use constant true => 1; #use constant false => 1==0; #use constant true => not false; sub usage { print ' wikipedia-update.pl [boilerplate|Wikipage] [stable|preview] [NewVersion] [NewDate] [UserName Password] boilerplate : writes a sample {{ Infobox software }} to "User:Sbts.david/sandbox" You would only use this for testing the script or login credentials. Wikipage : The pagename you wish to edit. Defaults to "User:Sbts.david/sandbox" You can also use the *shared* sandbox "Wikipedia:Sandbox" which will force the boilerplate option. for LedgerSMB you need "LedgerSMB" stable : Edit the Stable Release Version and Date preview : Edit the Preview Release Version and Date NewVersion : The New Version Number (valid characters [a..zA..Z0..9-._] ) NewDate : The New Date (valid characters [0..9-] ) UserName : UserName and Password, if used must BOTH be supplied. Password If either one is missing anonymous edits will be done Anonymous Edits will expose your IP address to the public Any field that is set to "" will use its default value Any field that you want to use the default value for should be set to "" unless there are no following fields that will be needed. ' } # my $pagename = "Wikipedia:Sandbox"; my $WriteBoilerplate = false; my $pagename = shift; if ( length($pagename || '')) { if ( $pagename eq "boilerplate" ) { $pagename = "User:Sbts.david/sandbox"; $WriteBoilerplate = true; } elsif ($pagename eq "Wikipedia:Sandbox" ) { $WriteBoilerplate = true; } } my $EditStable = shift; my $NewVersion = shift; my $NewDate = shift; my $UserName = shift; my $Password = shift; if ( ! length($pagename || '')) { $pagename = "User:Sbts.david/sandbox"; } if ( ! length($EditStable || '')) { $EditStable = "stable"; } if ( ! length($NewVersion || '')) { $NewVersion = '99.99.99'; } if ( ! length($NewDate || '')) { $NewDate = '2999-01-01'; } if ( ! length($UserName || '')) { $UserName = ""; } if ( ! length($Password || '')) { $Password = ""; } print "Updating wikipedia page with the following information\n"; if ( $WriteBoilerplate ) { print "Writing Boilerplate Infobox to sandbox.\n"; } print "pagename = $pagename\n"; print "EditStable = $EditStable\n"; print "NewVersion = $NewVersion\n"; print "NewDate = $NewDate\n"; my $usersandboxheader = '{{User sandbox}}'; my $wikipediasandboxheader = '{{Please leave this line alone (sandbox heading)}}<!-- * Welcome to the sandbox! * * Please leave this part alone * * The page is cleared regularly * * Feel free to try your editing skills below * ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■--> '; if ( $pagename eq "User:Sbts.david/sandbox" ) { my $sandboxheader = "$usersandboxheader"; } elsif ( $pagename eq "Wikipedia:Sandbox" ) { my $sandboxheader = "$wikipediasandboxheader"; } else { my $sandboxheader = ""; } my $infobox = ' {{Infobox software | name = LedgerSMB | logo = | screenshot = [[Image:LedgerSMB Login Screen.png|200px]] | caption = LedgerSMB login screen | author = | developer = | released = 2006-09-06 | latest release version = 0.0.0 | latest release date = 1970-01-01 | latest preview version = 0.0.0-beta1 | latest preview date = 1970-01-01 | operating system = Any [[Unix-like]], [[Mac OS]], [[Microsoft Windows|Windows]], [[Android (operating system)|Android]] | programming language = [[Perl]], [[PL/SQL]] | platform = [[Cross-platform]] | language = | status = Active | genre = [[Accounting]], [[Enterprise resource planning|ERP]], [[Customer relationship management|CRM]] | license = [[GNU General Public License]] | website = [http://ledgersmb.org/ ledgersmb.org] }} '; sub login { if ( length($UserName || '') && length($Password || '') ) { # the username and password is set to something other than null, 0, "0" so we can try logging in # log in to the wiki print "\n\n**** Logging In as $UserName."; $mw->login( { lgname => $UserName, lgpassword => $Password } ) || die $mw->{error}->{code} . ': ' . $mw->{error}->{details}; } } sub logout() { $mw->logout(); ## die $mw->{error}->{code} . ': ' . $mw->{error}->{details}; } sub getpage { # get some page contents my $page = $mw->get_page( { title => $pagename } ); return $page; } sub printpage { # print page contents my $page = shift; my $title = shift; print "\n\n===============================\n"; print "$title\n"; print "===============================\n"; print $page->{'*'}; print "\n==============================\n\n"; } sub editpage { my $editStable = shift; my $newversion = shift; my $newdate = shift; $newversion =~ s/[^\w\-\.]//g; # sanitize by stripping chars that are not whitelisted $newdate =~ s/[^\d\-]//g; # sanitize by stripping chars that are not whitelisted my $ref = $mw->get_page( { title => $pagename } ); my $text = $ref->{'*'}; if ( $WriteBoilerplate ) { $text = $infobox; print $text; } if ( $mw->{config}->{api_url} =~ /en.wiki/ ) { # english regex if ( $editStable eq "stable" ) { $text =~ s/(latest release version) = .*\n/$1 = $newversion \n/m; $text =~ s/(latest release date) = .*\n/$1 = $newdate \n/m; } elsif ( $editStable eq "preview" ) { $text =~ s/(latest preview version) = .*\n/$1 = $newversion \n/m; $text =~ s/(latest preview date) = .*\n/$1 = $newdate \n/m; } else { die "editpage(): Nothing to edit."; } } elsif ( $mw->{config}->{api_url} =~ /es.wiki/ ) { # spanish regex if ( $editStable eq "stable" ) { # $text =~ s/última_versión\s*= .*\n/última_versión = $newversion \n/m; # $text =~ s/fecha_última_versión\s*= .*\n/fecha_última_versión = $newdate \n/m; $text =~ s/(.ltima_versi.n)\s*= .*$/$1 = $newversion \n/m; $text =~ s/(fecha_.ltima_versi.n)\s*= .*\n/$1 = $newdate \n/m; } elsif ( $editStable eq "preview" ) { $text =~ s/(.ltima_versi.n_prueba)\s*= .*\n/$1 = $newversion \n/m; $text =~ s/(fecha_.ltima_versi.n_prueba)\s*= .*\n/$1 = $newdate \n/m; } else { die "editpage(): Nothing to edit."; } } # else we don't alter anything. unless ( $ref->{missing} ) { my $timestamp = $ref->{timestamp}; $mw->edit( { action => 'edit', title => $pagename, basetimestamp => $timestamp, # to avoid edit conflicts minor => '', bot => '', summary => "Release Version Update", text => $text } ) || die $mw->{error}->{code} . ': ' . $mw->{error}->{details}; } } usage(); print "\n"; #printpage( getpage(), "==== Original Page Content ====" ); #### Edit the English Page $mw->{config}->{api_url} = 'http://en.wikipedia.org/w/api.php'; login(); editpage( 'stable', $NewVersion, $NewDate ); print " view the changes at \n"; print " https://en.wikipedia.org/wiki/$pagename\n"; logout(); #### Edit the Spanish Page $mw->{config}->{api_url} = 'http://es.wikipedia.org/w/api.php'; $pagename =~ s/User:/Usuario:/; # if we are using a users pagename then translate the 'User:' portion of the name login(); editpage( 'stable', $NewVersion, $NewDate ); print " view the changes at \n"; print " https://es.wikipedia.org/wiki/$pagename\n"; print "\n\n"; logout(); =head1 =cut exit ;
tridentcodesolution/tridentcodesolution.github.io
projects/CRM/LedgerSMB-master/utils/release/notification-helpers/release-wikipedia.pl
Perl
apache-2.0
8,644
% this package strips out pp_mnf,mnf,pp_call % to use it type: ":- include(runtime_checks_ignore)." :- op(500,yfx,pre). :- op(500,yfx,post). :- op(500,yfx,unit_test). :- load_compilation_module('runtime_checks_ignore_expand'). :- add_sentence_trans(ignore_mnf/3).
leuschel/logen
runtime_checks_ignore.pl
Perl
apache-2.0
268
/* Transpose a matrix */ transpose(Xs,[]) :- nullrows(Xs). transpose(Xs,[Y|Ys]) :- makerow(Xs,Y,Zs), transpose(Zs,Ys). makerow([],[],[]). makerow([[X|Xs]|Ys],[X|Xs1],[Xs|Zs]):- makerow(Ys,Xs1,Zs). nullrows([]). nullrows([[]|Ns]) :- nullrows(Ns). %:- filter(transpose(matrix,dynamic)).
leuschel/logen
old_logen/filter_prop/Tests/trans.pl
Perl
apache-2.0
294
use 5.008001; use strict; use warnings; package Crypt::Diceware; # ABSTRACT: Random passphrase generator loosely based on the Diceware algorithm our $VERSION = '0.005'; # VERSION use Class::Load qw/load_class/; use Crypt::Rijndael; use Crypt::URandom; use Data::Entropy qw/with_entropy_source/; use Data::Entropy::Algorithms qw/pick_r/; use Data::Entropy::RawSource::CryptCounter; use Data::Entropy::Source; use Sub::Exporter -setup => { exports => [ words => \'_build_words' ], groups => { default => [qw/words/] }, }; my $ENTROPY = Data::Entropy::Source->new( Data::Entropy::RawSource::CryptCounter->new( Crypt::Rijndael->new( Crypt::URandom::urandom(32) ) ), "getc" ); sub _build_words { my ( $class, $name, $arg ) = @_; $arg ||= {}; my $list; my $entropy = $arg->{entropy} || $ENTROPY; if ( exists $arg->{file} ) { my @list = do { local (@ARGV) = $arg->{file}; <> }; chomp(@list); $list = \@list; } else { my $word_class = $arg->{wordlist} || 'Common'; unless ( $word_class =~ /::/ ) { $word_class = "Crypt::Diceware::Wordlist::$word_class"; } load_class($word_class); $list = do { no strict 'refs'; \@{"${word_class}::Words"}; }; } return sub { my ($n) = @_; return unless $n && $n > 0; my @w = with_entropy_source( $entropy, sub { map { pick_r($list) } 1 .. int($n); } ); return wantarray ? @w : join( ' ', @w ); }; } 1; # vim: ts=2 sts=2 sw=2 et: __END__ =pod =encoding UTF-8 =head1 NAME Crypt::Diceware - Random passphrase generator loosely based on the Diceware algorithm =head1 VERSION version 0.005 =head1 SYNOPSIS use Crypt::Diceware; my @phrase = words(4); # qw/starker call recur outlaw/ # with alternate word lists use Crypt::Diceware words => { wordlist => 'Original' }; use Crypt::Diceware words => { wordlist => 'Beale' }; =head1 DESCRIPTION This module generates a random passphrase of words based loosely on the L<Diceware|http://world.std.com/~reinhold/diceware.html> algorithm by Arnold G. Reinhold. A Diceware passphrase consists of randomly selected words chosen from a list of over seven thousand words. A passphrase of four or five words is likely to be stronger than typical human-generated passwords, which tend to be too-short and over-sample common letters ("e") and numbers ("1"). Words are randomly selected using L<Data::Entropy> in AES counter mode, seeded with L<Crypt::URandom>, which is reasonably cryptographically strong. =head1 USAGE By default, this module exports a single subroutine, C<words>, which uses the L<Crypt::Diceware::Wordlist::Common> word list. An alternate wordlist may be specified: use Crypt::Diceware words => { wordlist => 'Original' }; This loads the wordlist provided by L<Crypt::Diceware::Wordlist::Original>. If the name of the wordlist contains I<::> the name of the wordlist is not prefixed by I<Crypt::Diceware::Wordlist>. It is also possible to load a wordlist from a file via: use Crypt::Diceware words => { file => 'diceware-german.txt' }; The supplied file should contain one word per line. You can also replace the entropy source with another L<Data::Entropy::Source> object: use Crypt::Diceware words => { entropy => $entropy_source }; Exporting is done via L<Sub::Exporter> so any of its features may be used: use Crypt::Diceware words => { -as => 'passphrase' }; my @phrase = passphrase(4); =head2 words my @phrase = words(4); Takes a positive numeric argument and returns a passphrase of that many randomly-selected words. In a list context it will return a list of words, as above. In a scalar context it will return a string with the words separated with a single space character: my $phrase = words(4); Returns the empty list / string if the argument is missing or not a positive number. =for Pod::Coverage method_names_here =head1 SEE ALSO Diceware and Crypt::Diceware related: =over 4 =item * L<Diceware|http://world.std.com/~reinhold/diceware.html> =item * L<Crypt::Diceware::Wordlist::Common> =item * L<Crypt::Diceware::Wordlist::Original> =item * L<Crypt::Diceware::Wordlist::Beale> =back Other CPAN passphrase generators: =over 4 =item * L<Crypt::PW44> =item * L<Crypt::XkcdPassword> =item * L<Review of CPAN password/phrase generators|http://neilb.org/reviews/passwords.html> =back About password strength in general: =over 4 =item * L<Password Strength (XKCD)|http://xkcd.com/936/> =item * L<Password Strength (Wikipedia)|http://en.wikipedia.org/wiki/Password_strength> =back =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Bugs / Feature Requests Please report any bugs or feature requests through the issue tracker at L<https://github.com/dagolden/Crypt-Diceware/issues>. You will be notified automatically of any progress on your issue. =head2 Source Code This is open source software. The code repository is available for public review and contribution under the terms of the license. L<https://github.com/dagolden/Crypt-Diceware> git clone https://github.com/dagolden/Crypt-Diceware.git =head1 AUTHOR David Golden <dagolden@cpan.org> =head1 CONTRIBUTORS =over 4 =item * Mario Domgoergen <mdom@taz.de> =item * Neil Bowers <neil@bowers.com> =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2013 by David Golden. This is free software, licensed under: The Apache License, Version 2.0, January 2004 =cut
gitpan/Crypt-Diceware
lib/Crypt/Diceware.pm
Perl
apache-2.0
5,701
new8(A,B,C,D,E) :- A=0. new8(A,B,C,D,E) :- F=1+B, A=< -1, new3(F,C,D,E). new8(A,B,C,D,E) :- F=1+B, A>=1, new3(F,C,D,E). new6(A,B,C,D) :- E=1, C=<0, new8(E,A,B,C,D). new6(A,B,C,D) :- E=0, C>=1, new8(E,A,B,C,D). new5(A,B,C,D) :- D>=1, new6(A,B,C,D). new5(A,B,C,D) :- E=1+A, F=1, D=<0, new3(E,B,F,D). new4(A,B,C,D) :- new5(A,B,C,E). new3(A,B,C,D) :- A-B=< -1, new4(A,B,C,D). new2 :- A=0, B=0, new3(A,C,B,D). new1 :- new2. false :- new1.
bishoksan/RAHFT
benchmarks_scp/misc/programs-clp/TRACER-testloop28-unsafe.map.c.map.pl
Perl
apache-2.0
434
# Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use strict; =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <http://lists.ensembl.org/mailman/listinfo/dev>. Questions may also be sent to the Ensembl help desk at <helpdesk.org>. =cut use warnings; use POSIX; use Getopt::Long; use ImportUtils qw(dumpSQL load create_and_load debug); use Bio::EnsEMBL::Utils::Exception qw(warning throw verbose); use Bio::EnsEMBL::Utils::Sequence qw(reverse_comp); use DBI qw(:sql_types); use Bio::EnsEMBL::DBSQL::DBAdaptor; use FindBin qw( $Bin ); use Data::Dumper; my ($TMP_DIR, $TMP_FILE); my ($species,$registry_file); GetOptions( 'tmpdir=s' => \$ImportUtils::TMP_DIR, 'tmpfile=s' => \$ImportUtils::TMP_FILE, 'species=s' => \$species, 'registry_file=s' => \$registry_file, ); usage('-species argument required') if(!$species); warn("Make sure you have an updated ensembl.registry file!\n"); $registry_file ||= $Bin . "./ensembl.registry"; Bio::EnsEMBL::Registry->load_all( $registry_file ); my $cdba = Bio::EnsEMBL::Registry->get_DBAdaptor($species,'core') || usage( "Cannot find core db for $species in $registry_file" ); my $vdba = Bio::EnsEMBL::Registry->get_DBAdaptor($species,'variation') || usage( "Cannot find variation db for $species in $registry_file" ); my $dbVar = $vdba->dbc->db_handle; my $dbCore = $cdba; my $table = "flanking_sequence"; debug("Processing flanking_sequence reverse strand"); $dbVar->do(qq{CREATE TABLE flanking_sequence_before_re LIKE $table}); $dbVar->do(qq{INSERT INTO flanking_sequence_before_re SELECT * FROM $table}); my ($variation_id,$up_seq,$down_seq,$up_seq_start,$up_seq_end,$down_seq_start,$down_seq_end,$seq_region_id,$seq_region_strand); my $sth=$dbVar->prepare(qq{ SELECT fl.* FROM $table fl, variation_to_reverse vtr WHERE fl.variation_id = vtr.variation_id }); $sth->execute(); $sth->bind_columns(\$variation_id,\$up_seq,\$down_seq,\$up_seq_start,\$up_seq_end,\$down_seq_start,\$down_seq_end,\$seq_region_id,\$seq_region_strand); while($sth->fetch()) { #print "$variation_id,$up_seq,$down_seq,$up_seq_start,$up_seq_end,$down_seq_start,$down_seq_end,$seq_region_id,$seq_region_strand\n"; if ($up_seq and $down_seq) { ($up_seq, $down_seq) = ($down_seq, $up_seq); reverse_comp(\$up_seq); reverse_comp(\$down_seq); $up_seq_start = $up_seq_end = $down_seq_start = $down_seq_end = '\N'; } elsif (! $up_seq and ! $down_seq) { my $tmp_seq_start = $up_seq_start; my $tmp_seq_end = $up_seq_end; ($up_seq_start, $up_seq_end) = ($down_seq_start, $down_seq_end); ($down_seq_start, $down_seq_end) = ($tmp_seq_start, $tmp_seq_end); $up_seq = $down_seq = '\N'; } elsif ($up_seq and ! $down_seq) { $down_seq = $up_seq; reverse_comp(\$down_seq); $up_seq = '\N'; ($up_seq_start, $up_seq_end) = ($down_seq_start, $down_seq_end); $down_seq_start = '\N'; $down_seq_end = '\N'; } elsif (! $up_seq and $down_seq) { $up_seq = $down_seq; reverse_comp(\$up_seq); $down_seq = '\N'; ($down_seq_start, $down_seq_end) = ($up_seq_start, $up_seq_end); $up_seq_start = '\N'; $up_seq_end = '\N'; } $seq_region_strand = 1; $dbVar->do(qq{UPDATE $table SET up_seq = "$up_seq", down_seq = "$down_seq", up_seq_region_start = $up_seq_start, up_seq_region_end = $up_seq_end, down_seq_region_start=$down_seq_start, down_seq_region_end=$down_seq_end, seq_region_strand=$seq_region_strand WHERE variation_id = $variation_id and seq_region_id = $seq_region_id and seq_region_strand = -1}); } $dbVar->do(qq{UPDATE $table SET up_seq = null WHERE up_seq = 'N'}); $dbVar->do(qq{UPDATE $table SET down_seq = null WHERE down_seq = 'N'});
dbolser-ebi/ensembl-variation
scripts/import/reverse_flanking.pl
Perl
apache-2.0
4,314
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2020] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <http://lists.ensembl.org/mailman/listinfo/dev>. Questions may also be sent to the Ensembl help desk at <http://www.ensembl.org/Help/Contact>. =cut =head1 NAME =head1 SYNOPSIS =head1 DESCRIPTION =head1 METHODS =cut package Bio::EnsEMBL::Utils::VegaCuration::Gene; use strict; use warnings; use vars qw(@ISA); use Bio::EnsEMBL::Utils::ConversionSupport; @ISA = qw(Bio::EnsEMBL::Utils::ConversionSupport); =head2 find_gaps Args : arrayref of B::E::Transcripts Example : my $gaps = find_gaps($all_transcripts) Description: identifies regions of a gene that are not covered by any transcript Returntype : int Exceptions : none Caller : internal =cut sub find_gaps { my $self = shift; my ($all_transcripts) = @_; my $gaps = 0; my @sorted_transcripts = sort {$a->start <=> $b->start || $b->end <=> $a->end} @{$all_transcripts}; if ( my $first_transcript = shift @sorted_transcripts ) { my $pos = $first_transcript->end; foreach my $transcript (@sorted_transcripts) { next if ($transcript->end < $pos ); if ($transcript->start < $pos && $transcript->end > $pos ) { $pos = $transcript->end; next; } elsif ($transcript->end > $pos) { $gaps++; $pos = $transcript->end; } } } return $gaps; }
james-monkeyshines/ensembl
modules/Bio/EnsEMBL/Utils/VegaCuration/Gene.pm
Perl
apache-2.0
2,105
# # Copyright 2022 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package network::dlink::standard::snmp::mode::cpu; use base qw(centreon::plugins::templates::counter); use strict; use warnings; sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'cpu_avg', type => 0, cb_prefix_output => 'prefix_cpu_avg_output', message_separator => ' ', skipped_code => { -10 => 1 } }, { name => 'cpu_core', type => 1, cb_prefix_output => 'prefix_cpu_core_output', message_separator => ' ', message_multiple => 'All core cpu are ok', skipped_code => { -10 => 1 } } ]; $self->{maps_counters}->{cpu_avg} = [ { label => 'average-5s', nlabel => 'cpu.utilization.5s.percentage', set => { key_values => [ { name => 'average_5s' } ], output_template => '%.2f %% (5s)', perfdatas => [ { template => '%.2f', min => 0, max => 100, unit => '%' } ] } }, { label => 'average-1m', nlabel => 'cpu.utilization.1m.percentage', set => { key_values => [ { name => 'average_1m' } ], output_template => '%.2f %% (1m)', perfdatas => [ { template => '%.2f', min => 0, max => 100, unit => '%' } ] } }, { label => 'average-5m', nlabel => 'cpu.utilization.5m.percentage', set => { key_values => [ { name => 'average_5m' } ], output_template => '%.2f %% (5m)', perfdatas => [ { template => '%.2f', min => 0, max => 100, unit => '%' } ] } } ]; $self->{maps_counters}->{cpu_core} = [ { label => 'core-5s', nlabel => 'core.cpu.utilization.5s.percentage', set => { key_values => [ { name => 'cpu_5s' }, { name => 'display' } ], output_template => '%.2f %% (5s)', perfdatas => [ { template => '%.2f', min => 0, max => 100, unit => '%', label_extra_instance => 1, instance_use => 'display' } ] } }, { label => 'core-1m', nlabel => 'core.cpu.utilization.1m.percentage', set => { key_values => [ { name => 'cpu_1m' }, { name => 'display' } ], output_template => '%.2f %% (1m)', perfdatas => [ { template => '%.2f', min => 0, max => 100, unit => '%', label_extra_instance => 1, instance_use => 'display' } ] } }, { label => 'core-5m', nlabel => 'core.cpu.utilization.5m.percentage', set => { key_values => [ { name => 'cpu_5m' }, { name => 'display' } ], output_template => '%.2f %% (5m)', perfdatas => [ { template => '%.2f', min => 0, max => 100, unit => '%', label_extra_instance => 1, instance_use => 'display' } ] } } ]; } sub prefix_cpu_avg_output { my ($self, %options) = @_; return $self->{cpu_avg}->{count} . " CPU(s) average usage is "; } sub prefix_cpu_core_output { my ($self, %options) = @_; return "CPU '" . $options{instance_value}->{display} . "' usage "; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1); bless $self, $class; $options{options}->add_options(arguments => { 'check-order:s' => { name => 'check_order', default => 'common,industrial,agent' }, }); return $self; } sub check_table_cpu { my ($self, %options) = @_; my $instances = {}; foreach my $oid (keys %{$options{snmp_result}}) { $oid =~ /\.(\d+)\.(\d+)$/; my $display = 'unit' . $1 . $self->{output}->get_instance_perfdata_separator() . $2; my $instance = $1 . '.' . $2; next if (defined($instances->{$instance})); $instances->{$instance} = 1; my $cpu5sec = defined($options{snmp_result}->{$options{sec5} . '.' . $instance}) ? $options{snmp_result}->{$options{sec5} . '.' . $instance} : undef; my $cpu1min = defined($options{snmp_result}->{$options{min1} . '.' . $instance}) ? $options{snmp_result}->{$options{min1} . '.' . $instance} : undef; my $cpu5min = defined($options{snmp_result}->{$options{min5} . '.' . $instance}) ? $options{snmp_result}->{$options{min5} . '.' . $instance} : undef; # Case that it's maybe other CPU oid in table for datas. next if (!defined($cpu5sec) && !defined($cpu1min) && !defined($cpu5min)); $self->{checked_cpu} = 1; $self->{cpu_core}->{$instance} = { display => $display, cpu_5s => $cpu5sec, cpu_1m => $cpu1min, cpu_5m => $cpu5min }; } } sub check_cpu_average { my ($self, %options) = @_; my $count = scalar(keys %{$self->{cpu_core}}); my ($avg_5s, $avg_1m, $avg_5m); foreach (values %{$self->{cpu_core}}) { $avg_5s = defined($avg_5s) ? $avg_5s + $_->{cpu_5s} : $_->{cpu_5s} if (defined($_->{cpu_5s})); $avg_1m = defined($avg_1m) ? $avg_1m + $_->{cpu_1m} : $_->{cpu_1m} if (defined($_->{cpu_1m})); $avg_5m = defined($avg_5m) ? $avg_5m + $_->{cpu_5m} : $_->{cpu_5m} if (defined($_->{cpu_5m})); } $self->{cpu_avg} = { average_5s => defined($avg_5s) ? $avg_5s / $count : undef, average_1m => defined($avg_1m) ? $avg_1m / $count : undef, average_5m => defined($avg_5m) ? $avg_5m / $count : undef, count => $count, }; } sub check_cpu_industrial { my ($self, %options) = @_; return if ($self->{checked_cpu} == 1); my $oid_dEntityExtCpuUtilEntry = '.1.3.6.1.4.1.171.14.5.1.7.1'; my $oid_dEntityExtCpuUtilFiveSeconds = '.1.3.6.1.4.1.171.14.5.1.7.1.3'; my $oid_dEntityExtCpuUtilOneMinute = '.1.3.6.1.4.1.171.14.5.1.7.1.4'; my $oid_dEntityExtCpuUtilFiveMinutes = '.1.3.6.1.4.1.171.14.5.1.7.1.5'; my $snmp_result = $options{snmp}->get_table( oid => $oid_dEntityExtCpuUtilEntry, start => $oid_dEntityExtCpuUtilFiveSeconds, end => $oid_dEntityExtCpuUtilFiveMinutes ); $self->check_table_cpu( snmp_result => $snmp_result, sec5 => $oid_dEntityExtCpuUtilFiveSeconds, min1 => $oid_dEntityExtCpuUtilOneMinute, min5 => $oid_dEntityExtCpuUtilFiveMinutes ); } sub check_cpu_agent { my ($self, %options) = @_; return if ($self->{checked_cpu} == 1); my $oid_agentCPUutilizationIn5sec = '.1.3.6.1.4.1.171.12.1.1.6.1.0'; my $oid_agentCPUutilizationIn1min = '.1.3.6.1.4.1.171.12.1.1.6.2.0'; my $oid_agentCPUutilizationIn5min = '.1.3.6.1.4.1.171.12.1.1.6.3.0'; my $snmp_result = $options{snmp}->get_leef( oids => [$oid_agentCPUutilizationIn5sec, $oid_agentCPUutilizationIn1min, $oid_agentCPUutilizationIn5min] ); if (defined($snmp_result->{$oid_agentCPUutilizationIn5min})) { $self->{checked_cpu} = 1; $self->{cpu_core}->{0} = { display => 0, cpu_5s => $snmp_result->{$oid_agentCPUutilizationIn5sec}, cpu_1m => $snmp_result->{$oid_agentCPUutilizationIn1min}, cpu_5m => $snmp_result->{$oid_agentCPUutilizationIn5min} }; } } sub check_cpu_common { my ($self, %options) = @_; return if ($self->{checked_cpu} == 1); my $oid_esEntityExtCpuUtilEntry = '.1.3.6.1.4.1.171.17.5.1.7.1'; my $oid_esEntityExtCpuUtilFiveSeconds = '.1.3.6.1.4.1.171.17.5.1.7.1.3'; my $oid_esEntityExtCpuUtilOneMinute = '.1.3.6.1.4.1.171.17.5.1.7.1.4'; my $oid_esEntityExtCpuUtilFiveMinutes = '.1.3.6.1.4.1.171.17.5.1.7.1.5'; my $snmp_result = $options{snmp}->get_table( oid => $oid_esEntityExtCpuUtilEntry, start => $oid_esEntityExtCpuUtilFiveSeconds, end => $oid_esEntityExtCpuUtilFiveMinutes ); $self->check_table_cpu( snmp_result => $snmp_result, sec5 => $oid_esEntityExtCpuUtilFiveSeconds, min1 => $oid_esEntityExtCpuUtilOneMinute, min5 => $oid_esEntityExtCpuUtilFiveMinutes ); } sub manage_selection { my ($self, %options) = @_; $self->{cpu_avg} = {}; $self->{cpu_core} = {}; $self->{checked_cpu} = 0; foreach (split /,/, $self->{option_results}->{check_order}) { my $method = $self->can('check_cpu_' . $_); if ($method) { $self->$method(snmp => $options{snmp}); } } if ($self->{checked_cpu} == 0) { $self->{output}->add_option_msg(short_msg => "Cannot find CPU informations"); $self->{output}->option_exit(); } $self->check_cpu_average(); } 1; __END__ =head1 MODE Check cpu usage. =over 8 =item B<--check-order> Check cpu in standard dlink mib. If you have some issue (wrong cpu information in a specific mib), you can change the order (Default: 'common,industrial,agent'). =item B<--warning-*> B<--critical-*> Thresholds. Can be: 'core-5s', 'core-1m', 'core-5m', 'average-5s', 'average-1m', 'average-5m'. =back =cut
centreon/centreon-plugins
network/dlink/standard/snmp/mode/cpu.pm
Perl
apache-2.0
9,841
# Copyright 2020, Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Google::Ads::GoogleAds::V9::Common::KeywordPlanAggregateMetricResults; use strict; use warnings; use base qw(Google::Ads::GoogleAds::BaseEntity); use Google::Ads::GoogleAds::Utils::GoogleAdsHelper; sub new { my ($class, $args) = @_; my $self = {deviceSearches => $args->{deviceSearches}}; # Delete the unassigned fields in this object for a more concise JSON payload remove_unassigned_fields($self, $args); bless $self, $class; return $self; } 1;
googleads/google-ads-perl
lib/Google/Ads/GoogleAds/V9/Common/KeywordPlanAggregateMetricResults.pm
Perl
apache-2.0
1,049
#!/usr/bin/perl use lib "/usr/local/perf-dev/storable/lib"; use Service; use Metric; use Graph; $perfhome = "/usr/local/perf-dev/storable"; #create new service $service = Service->new( operatingSystem => "SunOS", serviceName => "mem", ); #add metric 0 $obj = Metric->new( rrdIndex => 0, metricName => "page_in", friendlyName => "Memory Pages In", hasEvents => 1, warnThreshold => 1024, critThreshold => 2000, thresholdUnit => "KB", ); $service->addMetric($obj); #add metric 1 $obj = Metric->new( rrdIndex => 1, metricName => "page_out", friendlyName => "Memory Pages Out", hasEvents => 1, warnThreshold => 1024, critThreshold => 2000, thresholdUnit => "KB", ); $service->addMetric($obj); #add metric 2 $obj = Metric->new( rrdIndex => 2, metricName => "page_free", friendlyName => "Mem Page Free", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add metric 3 $obj = Metric->new( rrdIndex => 3, metricName => "page_scan", friendlyName => "Mem Page Scan", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add metric 4 $obj = Metric->new( rrdIndex => 4, metricName => "page_flt", friendlyName => "Mem Page Flt", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add metric 5 $obj = Metric->new( rrdIndex => 5, metricName => "vflt", friendlyName => "Mem vflt", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add metric 6 $obj = Metric->new( rrdIndex => 6, metricName => "buffer_read", friendlyName => "Mem Buffer Read", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add metric 7 $obj = Metric->new( rrdIndex => 7, metricName => "buffer_write", friendlyName => "Mem Buffer Write", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add metric 8 $obj = Metric->new( rrdIndex => 8, metricName => "read_cache_pct", friendlyName => "Mem Read Cache Pct", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add metric 9 $obj = Metric->new( rrdIndex => 9, metricName => "write_cache_pct", friendlyName => "Mem Write Cache Pct", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add metric 10 $obj = Metric->new( rrdIndex => 10, metricName => "memory_free", friendlyName => "Mem Memory Free", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add metric 11 $obj = Metric->new( rrdIndex => 11, metricName => "swap_free", friendlyName => "Mem Swap Free", hasEvents => 0, warnThreshold => 0, critThreshold => 0, thresholdUnit => "?", ); $service->addMetric($obj); #add graph 0 $obj = Graph->new( name => "paging", title => "Paging Activity on", y_axis => "KB", legend => "", optionsArray => [qq{-u 100},qq{-r}],, defArray => [q{DEF:page_in=$RRD:mem_page_in:AVERAGE},q{DEF:page_out=$RRD:mem_page_out:AVERAGE}], cdefArray => [], lineArray => [qq{LINE2:page_in#FF0000:Pages In},qq{LINE2:page_out#00CC00:Pages Out}], text => "", ); $service->addGraph($obj); #print out this service print ("Ref: ref($service)\n"); $os = $service->getOS(); $serviceName = $service->getServiceName(); print ("OS: $os\n"); print ("serviceName: $serviceName\n"); #print out this services metrics $arrayLength = $service->getMetricArrayLength(); print ("metric Array Length = $arrayLength\n\n"); for ($counter=0; $counter < $arrayLength; $counter++) { $metricObject = $service->{metricArray}->[$counter]; $rrdIndex = $metricObject->getRRDIndex(); $metricName = $metricObject->getMetricName(); $friendlyName = $metricObject->getFriendlyName(); $hasEvents = $metricObject->getHasEvents(); $warnThreshold = $metricObject->getWarnThreshold(); $critThreshold = $metricObject->getCritThreshold(); $thresholdUnit = $metricObject->getThresholdUnit(); print ("rrdIndex: $rrdIndex\n"); print ("metricName: $metricName\n"); print ("friendlyName: $friendlyName\n"); print ("hasEvents: $hasEvents\n"); print ("warnThreshold: $warnThreshold\n"); print ("critThreshold: $critThreshold\n"); print ("threshUnit: $thresholdUnit\n\n"); } #print out this services graphs $arrayLength = $service->getGraphArrayLength(); print ("graph Array Length = $arrayLength\n\n"); for ($counter=0; $counter < $arrayLength; $counter++) { $graphObject = $service->{graphArray}->[$counter]; $name = $graphObject->getName(); $title = $graphObject->getTitle(); $y_axis = $graphObject->getYaxis(); $legend = $graphObject->getLegend(); $text = $graphObject->getText(); print ("name: $name\n"); print ("title: $title\n"); print ("y_axis: $y_axis\n"); print ("legend: $legend\n"); print ("text: $text\n"); $arrayLength2 = $graphObject->getOptionsArrayLength(); for ($counter2=0; $counter2 < $arrayLength2; $counter2++) { print ("option: $graphObject->{optionsArray}->[$counter2]\n"); } $arrayLength2 = $graphObject->getDefArrayLength(); for ($counter2=0; $counter2 < $arrayLength2; $counter2++) { print ("def: $graphObject->{defArray}->[$counter2]\n"); } $arrayLength2 = $graphObject->getCdefArrayLength(); for ($counter2=0; $counter2 < $arrayLength2; $counter2++) { print ("cdef: $graphObject->{cdefArray}->[$counter2]\n"); } $arrayLength2 = $graphObject->getLineArrayLength(); for ($counter2=0; $counter2 < $arrayLength2; $counter2++) { print ("line: $graphObject->{lineArray}->[$counter2]\n"); } print ("\n"); } #Store the service $service->store("$perfhome/etc/configs/$service->{operatingSystem}/$service->{serviceName}.ser") or die("can't store $service->{serviceName}.ser?\n");
ktenzer/perfstat
misc/serialize/create/SunOs/61503/mem.pl
Perl
apache-2.0
6,305
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2021] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <http://lists.ensembl.org/mailman/listinfo/dev>. Questions may also be sent to the Ensembl help desk at <http://www.ensembl.org/Help/Contact>. =cut =head1 NAME Bio::EnsEMBL::Variation::AlleleSynonym - Ensembl representation of an allele synonym =head1 SYNOPSIS # AlleleSynonym my $allele_synonym = Bio::EnsEMBL::Variation::AlleleSynonym->new (-hgvs_genomic => 'NC_000003.12:g.125439671T>A', -name => 'CA83132407', -variation => $v); print join("\t", $allele_synonym->variation()->name(), $allele_synonym->name(), $allele_synonym->hgvs_genomic()), "\n"; =head1 DESCRIPTION This is a class representing an allele synonym for a variation =head1 METHODS =cut use strict; use warnings; package Bio::EnsEMBL::Variation::AlleleSynonym; use Bio::EnsEMBL::Storable; use Bio::EnsEMBL::Utils::Exception qw(throw warning); use Bio::EnsEMBL::Utils::Argument qw(rearrange); use Bio::EnsEMBL::Variation::DBSQL::VariationAdaptor; our @ISA = ('Bio::EnsEMBL::Storable'); =head2 new Arg [-dbID] : see superclass constructor Arg [-ADAPTOR] : see superclass constructor Arg [-VARIATION] : int - the variation object associated with this allele_synonym Arg [-_VARIATION_ID] : int - the internal id of the variation object associated with this identifier. This may be provided instead of a variation object so that the variation may be lazy-loaded from the database on demand. Arg [-HGVS_GENOMIC] : string - hgvs genomic Arg [-NAME] : string - allele synonym name Example : $asa = $reg->get_adaptor('homo_sapiens', 'variation', 'allelesynonym'); $allele_synonym = Bio::EnsEMBL::Variation::AlleleSynonym->new( -_variation_id => 176456403, -adaptor => $asa, -hgvs_genomic => 'NC_000003.12:g.125439671T>A', -name => 'CA83132407' ); Description: Constructor. Instantiates a Allele Synonym object. Returntype : Bio::EnsEMBL::Variation::AlleleSynonym Exceptions : none Caller : general Status : At Risk =cut sub new { my $caller = shift; my $class = ref($caller) || $caller; my $self = $class->SUPER::new(@_); my ($dbID, $adaptor, $variation, $variation_id, $hgvs_genomic, $name) = rearrange([qw(dbID ADAPTOR VARIATION _VARIATION_ID HGVS_GENOMIC NAME)], @_); return bless { 'dBID' => $dbID, 'adaptor' => $adaptor, 'variation' => $variation, '_variation_id' => $variation_id, 'hgvs_genomic' => $hgvs_genomic, 'name' => $name}, $class; } =head2 name Arg [1] : string $newval (optional) The new value to set the name attribute to Example : $name = $allele_synonym->name() Description: Getter/Setter for the name attribute Returntype : string Exceptions : none Caller : general Status : At Risk =cut sub name { my $self = shift; return $self->{'name'} = shift if(@_); return $self->{'name'}; } =head2 hgvs_genomic Arg [1] : string $newval (optional) The new value to set the hgvs_genomic attribute to Example : $hgvs_genomic = $allele_synonym->hgvs_genomic() Description: Getter/Setter for the hgvs_genomic attribute Returntype : string Exceptions : none Caller : general Status : At Risk =cut sub hgvs_genomic { my $self = shift; return $self->{'hgvs_genomic'} = shift if(@_); return $self->{'hgvs_genomic'}; } =head2 variation Arg [1] : (optional) Bio::EnsEMBL::Variation::Variation $var Example : $v = $allele_synonym->variation(); Description: Getter/Setter for the variation associated with this allele synonym Returntype : Bio::EnsEMBL::Variation::Variation Exceptions : throw on incorrect argument Caller : general Status : At Risk =cut sub variation { my $self = shift; if(@_) { my $v = shift; if(defined($v) && (!ref($v) || !$v->isa('Bio::EnsEMBL::Variation::Variation'))) { throw('Bio::EnsEMBL::Variation::Variation argument expected'); } return $self->{variation} = $v; } if(!defined($self->{variation}) && defined($self->{_variation_id})) { my $va = $self->adaptor->db->get_VariationAdaptor; if(defined($va)) { my $v = $va->fetch_by_dbID($self->{_variation_id}); if(defined($v)) { $self->{variation} = $v; } } } return $self->{'variation'}; } 1;
Ensembl/ensembl-variation
modules/Bio/EnsEMBL/Variation/AlleleSynonym.pm
Perl
apache-2.0
5,290
# input check functions sub checkOSName { my ($osName) = @_; my $osListLen = @$osList; my $osFound = 0; for ($osCount = 0; $osFound == 0 && $osCount < $osListLen; $osCount++) { if ($osList->[$osCount] eq $osName) { $osFound = 1; } } if ($osFound == 0) { die('Error: invalid value for $osName'); } } sub checkHostName { my ($hostName) = @_; if (length($hostName) == 0) {return("Please enter a host name");} if(-d "$perfhome/var/db/hosts/$hostName") {return("Host Name is already taken");} } sub checkIPAddress { my ($ipAddress) = @_; if ($ipAddress !~ /(\d+)(\.\d+){3}/) { return("Please enter a valid IP Address"); } if ($ipAddress !~ /^([\d]+)\.([\d]+)\.([\d]+)\.([\d]+)$/) { return("Please enter a valid IP Address"); } foreach $s (($1, $2, $3, $4)) { if (0 > $s || $s > 255) { return("Please enter a valid IP Address");} } } sub securityCheckHostName { my ($adminName, $hostName) = @_; if (length($hostName) == 0) {die('Error: missing required value for $hostName');} if(!(-d "$perfhome/var/db/hosts/$hostName")) {die('Error: invalid value for $hostName: no host directory');} if(!(-d "$perfhome/var/db/hosts/$hostName/services")) {die('Error: invalid value for $hostName: no host services directory');} if(!(-e "$perfhome/var/db/hosts/$hostName/$hostName.ser")) {die('Error: invalid value for $hostName: no host file');} } 1;
ktenzer/perfstat
server/unix/build/1.52/cgi/appConfigs/hostConfig/level1/lib_inputCheck.pl
Perl
apache-2.0
1,373
#!/usr/bin/env perl # Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute # Copyright [2016-2019] EMBL-European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. =head1 NAME merge_cmp_gaps.pl - merge small gaps between mappings and bridge mappings without gaps =head1 SYNOPSIS fix_overlaps.pl [arguments] Required arguments: --dbname, db_name=NAME database name NAME --host, --dbhost, --db_host=HOST database host HOST --port, --dbport, --db_port=PORT database port PORT --user, --dbuser, --db_user=USER database username USER --pass, --dbpass, --db_pass=PASS database passwort PASS --assembly=ASSEMBLY assembly version ASSEMBLY --altassembly=ASSEMBLY alternative assembly version ASSEMBLY --chromosomes, --chr=LIST only process LIST seq_regions Optional arguments: --conffile, --conf=FILE read parameters from FILE (default: conf/Conversion.ini) --logfile, --log=FILE log to FILE (default: *STDOUT) --logpath=PATH write logfile to PATH (default: .) --logappend, --log_append append to logfile (default: truncate) -v, --verbose=0|1 verbose logging (default: false) -i, --interactive=0|1 run script interactively (default: true) -n, --dry_run, --dry=0|1 don't write results to database -h, --help, -? print help (this message) =head1 DESCRIPTION The script merges adjacent assembly segments which can result from alternating alignments from clone identity and blastz alignment. =head1 AUTHOR Monika Komorowska <monika@ebi.ac.uk>, Ensembl core API team =head1 CONTACT Please post comments/questions to the Ensembl development list <http://lists.ensembl.org/mailman/listinfo/dev> =cut use strict; use warnings; no warnings 'uninitialized'; use FindBin qw($Bin); use Getopt::Long; use Pod::Usage; use Bio::EnsEMBL::Utils::ConversionSupport; $| = 1; my $support = new Bio::EnsEMBL::Utils::ConversionSupport("$Bin/../../.."); # parse options $support->parse_common_options(@_); $support->parse_extra_options( 'assembly=s', 'altassembly=s', 'chromosomes|chr=s@', ); $support->allowed_params( $support->get_common_params, 'assembly', 'altassembly', 'chromosomes', ); if ($support->param('help') or $support->error) { warn $support->error if $support->error; pod2usage(1); } $support->comma_to_list('chromosomes'); # ask user to confirm parameters to proceed $support->confirm_params; # get log filehandle and print heading and parameters to logfile $support->init_log; $support->check_required_params( 'assembly', 'altassembly', 'chromosomes' ); # database connection my $dba = $support->get_database('ensembl'); my $dbh = $dba->dbc->db_handle; my $assembly = $support->param('assembly'); my $altassembly = $support->param('altassembly'); my $sql = qq( SELECT a.* FROM assembly a, seq_region sr1, seq_region sr2, coord_system cs1, coord_system cs2 WHERE a.asm_seq_region_id = sr1.seq_region_id AND a.cmp_seq_region_id = sr2.seq_region_id AND sr1.coord_system_id = cs1.coord_system_id AND sr2.coord_system_id = cs2.coord_system_id AND cs1.version = '$assembly' AND cs2.version = '$altassembly' AND sr2.name = ? ORDER BY a.ori, a.cmp_start ); my $sth = $dbh->prepare($sql); my $fmt1 = "%10s %10s %10s %10s %3s\n"; foreach my $chr ($support->param('chromosomes')) { $support->log_stamped("\nToplevel seq_region $chr...\n"); $sth->execute($chr); my @rows = (); # do an initial fetch my $last = $sth->fetchrow_hashref; # skip seq_regions for which we don't have data unless ($last) { $support->log("No mappings found. Skipping.\n", 1); next; } push @rows, $last; my $i = 0; my $j = 0; my $k = 0; while ($last and (my $r = $sth->fetchrow_hashref)) { # merge adjacent assembly segments (these can result from alternating # alignments from clone identity and blastz alignment) if ($last->{'asm_end'} == ($r->{'asm_start'} - 1) and $last->{'cmp_end'} == ($r->{'cmp_start'} - 1)) { $j++; # debug warnings $support->log_verbose('merging - last: '.sprintf($fmt1, map { $last->{$_} } qw(asm_start asm_end cmp_start cmp_end ori)), 1); $support->log_verbose('this: '.sprintf($fmt1, map { $r->{$_} } qw(asm_start asm_end cmp_start cmp_end ori)), 1); # remove last row pop(@rows); # merge segments and add new row $last->{'asm_end'} = $r->{'asm_end'}; $last->{'cmp_end'} = $r->{'cmp_end'}; push @rows, $last; next; } # bridge small gaps (again, these can result from alternating alignments # from clone identity and blastz alignment). A maximum gap size of 10bp is # allowed my $asm_gap = $r->{'asm_start'} - $last->{'asm_end'} - 1; my $cmp_gap = $r->{'cmp_start'} - $last->{'cmp_end'} - 1; if ($asm_gap == $cmp_gap and $asm_gap <= 10 and $asm_gap > 0) { $k++; # debug warnings $support->log_verbose('bridging - last: '.sprintf($fmt1, map { $last->{$_} } qw(asm_start asm_end cmp_start cmp_end ori)), 1); $support->log_verbose('this: '.sprintf($fmt1, map { $r->{$_} } qw(asm_start asm_end cmp_start cmp_end ori)), 1); # remove last row pop(@rows); # merge segments and add new row $last->{'asm_end'} = $r->{'asm_end'}; $last->{'cmp_end'} = $r->{'cmp_end'}; push @rows, $last; next; } push @rows, $r; $last = $r; } $support->log("Merged $j mappings.\n", 1); $support->log("Bridged $k gaps.\n", 1); if ((!$support->param('dry_run')) && ($j + $k > 0) ) { # delete all current mappings from the db and insert the corrected ones my $c = $dbh->do(qq( DELETE a FROM assembly a, seq_region sr1, seq_region sr2, coord_system cs1, coord_system cs2 WHERE a.asm_seq_region_id = sr1.seq_region_id AND a.cmp_seq_region_id = sr2.seq_region_id AND sr1.coord_system_id = cs1.coord_system_id AND sr2.coord_system_id = cs2.coord_system_id AND cs1.version = '$assembly' AND cs2.version = '$altassembly' AND sr2.name = '$chr' )); $support->log("\nDeleted $c entries from the assembly table.\n"); # now insert the fixed entries $sql = qq(INSERT IGNORE INTO assembly VALUES (?, ?, ?, ?, ?, ?, ?)); my $sth1 = $dbh->prepare($sql); foreach my $r (@rows) { $sth1->execute(map { $r->{$_} } qw(asm_seq_region_id cmp_seq_region_id asm_start asm_end cmp_start cmp_end ori)); } $support->log("Added ".scalar(@rows)." fixed entries to the assembly table.\n"); } } $sth->finish; # finish logfile $support->finish_log;
muffato/ensembl
misc-scripts/assembly/merge_cmp_gaps.pl
Perl
apache-2.0
7,448
# Copyright 2020, Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Google::Ads::GoogleAds::V8::Services::BillingSetupService::GetBillingSetupRequest; use strict; use warnings; use base qw(Google::Ads::GoogleAds::BaseEntity); use Google::Ads::GoogleAds::Utils::GoogleAdsHelper; sub new { my ($class, $args) = @_; my $self = {resourceName => $args->{resourceName}}; # Delete the unassigned fields in this object for a more concise JSON payload remove_unassigned_fields($self, $args); bless $self, $class; return $self; } 1;
googleads/google-ads-perl
lib/Google/Ads/GoogleAds/V8/Services/BillingSetupService/GetBillingSetupRequest.pm
Perl
apache-2.0
1,057
print "> "; while (my $next_cmd = <>) { chomp $next_cmd; process($next_cmd); print "> "; }
jmcveigh/komodo-tools
scripts/perl/interact_correctly_on_the_command_line/process_line.pl
Perl
bsd-2-clause
103
package Sisimai::Bite::Email::Exchange2003; use parent 'Sisimai::Bite::Email'; use feature ':5.10'; use strict; use warnings; my $Indicators = __PACKAGE__->INDICATORS; my $StartingOf = { 'message' => ['Your message'], 'rfc822' => ['Content-Type: message/rfc822'], 'error' => ['did not reach the following recipient(s):'], }; my $ErrorCodes = { 'onhold' => [ '000B099C', # Host Unknown, Message exceeds size limit, ... '000B09AA', # Unable to relay for, Message exceeds size limit,... '000B09B6', # Error messages by remote MTA ], 'userunknown' => [ '000C05A6', # Unknown Recipient, ], 'systemerror' => [ '00010256', # Too many recipients. '000D06B5', # No proxy for recipient (non-smtp mail?) ], 'networkerror' => [ '00120270', # Too Many Hops ], 'contenterr' => [ '00050311', # Conversion to Internet format failed '000502CC', # Conversion to Internet format failed ], 'securityerr' => [ '000B0981', # 502 Server does not support AUTH ], 'filtered' => [ '000C0595', # Ambiguous Recipient ], }; # X-MS-TNEF-Correlator: <00000000000000000000000000000000000000@example.com> # X-Mailer: Internet Mail Service (5.5.1960.3) # X-MS-Embedded-Report: sub headerlist { return ['x-ms-embedded-report', 'x-mimeole'] }; sub description { 'Microsoft Exchange Server 2003' } sub scan { # Detect an error from Microsoft Exchange Server 2003 # @param [Hash] mhead Message headers of a bounce email # @options mhead [String] from From header # @options mhead [String] date Date header # @options mhead [String] subject Subject header # @options mhead [Array] received Received headers # @options mhead [String] others Other required headers # @param [String] mbody Message body of a bounce email # @return [Hash, Undef] Bounce data list and message/rfc822 part # or Undef if it failed to parse or the # arguments are missing # @since v4.1.1 my $class = shift; my $mhead = shift // return undef; my $mbody = shift // return undef; my $match = 0; $match ||= 1 if defined $mhead->{'x-ms-embedded-report'}; EXCHANGE_OR_NOT: while(1) { # Check the value of X-Mailer header last if $match; if( defined $mhead->{'x-mailer'} ) { # X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63 # X-Mailer: Internet Mail Service (5.5.2232.9) my $tryto = ['Internet Mail Service (', 'Microsoft Exchange Server Internet Mail Connector']; my $value = $mhead->{'x-mailer'} || ''; $match ||= 1 if index($value, $tryto->[0]) == 0 || index($value, $tryto->[1]) == 0; last if $match; } if( defined $mhead->{'x-mimeole'} ) { # X-MimeOLE: Produced By Microsoft Exchange V6.5 $match ||= 1 if index($mhead->{'x-mimeole'}, 'Produced By Microsoft Exchange') == 0; last if $match; } last unless scalar @{ $mhead->{'received'} }; for my $e ( @{ $mhead->{'received'} } ) { # Received: by ***.**.** with Internet Mail Service (5.5.2657.72) next unless rindex($e, ' with Internet Mail Service (') > -1; $match = 1; last(EXCHANGE_OR_NOT); } last; } return undef unless $match; my $dscontents = [__PACKAGE__->DELIVERYSTATUS]; my $rfc822part = ''; # (String) message/rfc822-headers part my $rfc822list = []; # (Array) Each line in message/rfc822 part string my $blanklines = 0; # (Integer) The number of blank lines my $readcursor = 0; # (Integer) Points the current cursor position my $recipients = 0; # (Integer) The number of 'Final-Recipient' header my $statuspart = 0; # (Integer) Flag, 1 = have got delivery status part. my $connvalues = 0; # (Integer) Flag, 1 if all the value of $connheader have been set my $connheader = { 'to' => '', # The value of "To" 'date' => '', # The value of "Date" 'subject' => '', # The value of "Subject" }; my $v = undef; for my $e ( split("\n", $$mbody) ) { # Read each line between the start of the message and the start of rfc822 part. unless( $readcursor ) { # Beginning of the bounce message or delivery status part if( index($e, $StartingOf->{'message'}->[0]) == 0 ) { $readcursor |= $Indicators->{'deliverystatus'}; next; } } unless( $readcursor & $Indicators->{'message-rfc822'} ) { # Beginning of the original message part if( index($e, $StartingOf->{'rfc822'}->[0]) == 0 ) { $readcursor |= $Indicators->{'message-rfc822'}; next; } } if( $readcursor & $Indicators->{'message-rfc822'} ) { # Inside of the original message unless( length $e ) { last if ++$blanklines > 1; next; } push @$rfc822list, $e; } else { # Error message part next unless $readcursor & $Indicators->{'deliverystatus'}; next if $statuspart; if( $connvalues == scalar(keys %$connheader) ) { # did not reach the following recipient(s): # # kijitora@example.co.jp on Thu, 29 Apr 2007 16:51:51 -0500 # The recipient name is not recognized # The MTS-ID of the original message is: c=jp;a= ;p=neko # ;l=EXCHANGE000000000000000000 # MSEXCH:IMS:KIJITORA CAT:EXAMPLE:EXCHANGE 0 (000C05A6) Unknown Recipient # mikeneko@example.co.jp on Thu, 29 Apr 2007 16:51:51 -0500 # The recipient name is not recognized # The MTS-ID of the original message is: c=jp;a= ;p=neko # ;l=EXCHANGE000000000000000000 # MSEXCH:IMS:KIJITORA CAT:EXAMPLE:EXCHANGE 0 (000C05A6) Unknown Recipient $v = $dscontents->[-1]; if( $e =~ /\A[ \t]*([^ ]+[@][^ ]+) on[ \t]*.*\z/ || $e =~ /\A[ \t]*.+(?:SMTP|smtp)=([^ ]+[@][^ ]+) on[ \t]*.*\z/ ) { # kijitora@example.co.jp on Thu, 29 Apr 2007 16:51:51 -0500 # kijitora@example.com on 4/29/99 9:19:59 AM if( $v->{'recipient'} ) { # There are multiple recipient addresses in the message body. push @$dscontents, __PACKAGE__->DELIVERYSTATUS; $v = $dscontents->[-1]; } $v->{'recipient'} = $1; $v->{'msexch'} = 0; $recipients++; } elsif( $e =~ /\A[ \t]+(MSEXCH:.+)\z/ ) { # MSEXCH:IMS:KIJITORA CAT:EXAMPLE:EXCHANGE 0 (000C05A6) Unknown Recipient $v->{'diagnosis'} .= $1; } else { next if $v->{'msexch'}; if( index($v->{'diagnosis'}, 'MSEXCH:') == 0 ) { # Continued from MEEXCH in the previous line $v->{'msexch'} = 1; $v->{'diagnosis'} .= ' '.$e; $statuspart = 1; } else { # Error message in the body part $v->{'alterrors'} .= ' '.$e; } } } else { # Your message # # To: shironeko@example.jp # Subject: ... # Sent: Thu, 29 Apr 2010 18:14:35 +0000 # if( $e =~ /\A[ \t]+To:[ \t]+(.+)\z/ ) { # To: shironeko@example.jp next if $connheader->{'to'}; $connheader->{'to'} = $1; $connvalues++; } elsif( $e =~ /\A[ \t]+Subject:[ \t]+(.+)\z/ ) { # Subject: ... next if length $connheader->{'subject'}; $connheader->{'subject'} = $1; $connvalues++; } elsif( $e =~ m|\A[ \t]+Sent:[ \t]+([A-Z][a-z]{2},.+[-+]\d{4})\z| || $e =~ m|\A[ \t]+Sent:[ \t]+(\d+[/]\d+[/]\d+[ \t]+\d+:\d+:\d+[ \t].+)|) { # Sent: Thu, 29 Apr 2010 18:14:35 +0000 # Sent: 4/29/99 9:19:59 AM next if $connheader->{'date'}; $connheader->{'date'} = $1; $connvalues++; } } } # End of error message part } return undef unless $recipients; for my $e ( @$dscontents ) { $e->{'agent'} = __PACKAGE__->smtpagent; $e->{'diagnosis'} = Sisimai::String->sweep($e->{'diagnosis'}); delete $e->{'msexch'}; if( $e->{'diagnosis'} =~ /\AMSEXCH:.+[ \t]*[(]([0-9A-F]{8})[)][ \t]*(.*)\z/ ) { # MSEXCH:IMS:KIJITORA CAT:EXAMPLE:EXCHANGE 0 (000C05A6) Unknown Recipient my $capturedcode = $1; my $errormessage = $2; for my $r ( keys %$ErrorCodes ) { # Find captured code from the error code table next unless grep { $capturedcode eq $_ } @{ $ErrorCodes->{ $r } }; $e->{'reason'} = $r; $e->{'status'} = Sisimai::SMTP::Status->code($r) || ''; last; } $e->{'diagnosis'} = $errormessage; } # Could not detect the reason from the value of "diagnosis", copy alternative error message next if $e->{'reason'}; next unless exists $e->{'alterrors'}; next unless length $e->{'alterrors'}; $e->{'diagnosis'} = $e->{'alterrors'}.' '.$e->{'diagnosis'}; $e->{'diagnosis'} = Sisimai::String->sweep($e->{'diagnosis'}); delete $e->{'alterrors'}; } unless( @$rfc822list ) { # When original message does not included in the bounce message push @$rfc822list, 'From: '.$connheader->{'to'}; push @$rfc822list, 'Date: '.$connheader->{'date'}; push @$rfc822list, 'Subject: '.$connheader->{'subject'}; } $rfc822part = Sisimai::RFC5322->weedout($rfc822list); return { 'ds' => $dscontents, 'rfc822' => $$rfc822part }; } 1; __END__ =encoding utf-8 =head1 NAME Sisimai::Bite::Email::Exchange2003 - bounce mail parser class for C<Microsft Exchange Server 2003>. =head1 SYNOPSIS use Sisimai::Bite::Email::Exchange2003; =head1 DESCRIPTION Sisimai::Bite::Email::Exchange parses a bounce email which created by C<Microsoft Exchange Server 2003>. Methods in the module are called from only Sisimai::Message. =head1 CLASS METHODS =head2 C<B<description()>> C<description()> returns description string of this module. print Sisimai::Bite::Email::Exchange2003->description; =head2 C<B<smtpagent()>> C<smtpagent()> returns MTA name. print Sisimai::Bite::Email::Exchange2003->smtpagent; =head2 C<B<scan(I<header data>, I<reference to body string>)>> C<scan()> method parses a bounced email and return results as a array reference. See Sisimai::Message for more details. =head1 AUTHOR azumakuniyuki =head1 COPYRIGHT Copyright (C) 2014-2018 azumakuniyuki, All rights reserved. =head1 LICENSE This software is distributed under The BSD 2-Clause License. =cut
azumakuniyuki/p5-Sisimai
lib/Sisimai/Bite/Email/Exchange2003.pm
Perl
bsd-2-clause
11,746
package WWW::Easy::Daemon; use strict; use Proc::PID::File; use Sys::Syslog; use File::Slurp; use Net::Server::Daemonize; use JSON::XS; use Devel::StackTrace; use Pod::Usage; our @ISA = qw(Exporter); our @EXPORT = qw(start_script read_config pod2usage daemonize easy_try); ######################## некие полезные функции для скриптов sub start_script { if ( my $pid = Proc::PID::File->running({dir=>'/tmp', verify=>1}) ) { die '$0 already running, pid='.$pid; } openlog($0, "perror,pid,ndelay", "local0"); # don't forget this $SIG{__WARN__} = sub { syslog('info', join(' ', @_)); }; $SIG{__DIE__} = sub { syslog('crit', join(' ', @_)); exit(1); }; } sub daemonize { my ($name, $user, $group, $logdir) = @_; my $pidfile = "/tmp/$name.pid"; if($ARGV[0] eq 'stop' || $ARGV[0] eq 'restart') { my $pid = (-f $pidfile) ? File::Slurp::read_file($pidfile) : undef; if($pid) { chomp($pid); warn "Killing $pid with TERM\n"; kill TERM => $pid; foreach my $i (0..15) { sleep 1; last unless -d "/proc/$pid"; } if(-d "/proc/$pid") { die "Process did not exist\n"; } } if($ARGV[0] eq 'stop') { exit(0); } } my $log; my $logfile; if($logdir) { $logfile = "$logdir/$name.log"; open($log, '>>', $logfile) || die("Cannot open $logfile: $!"); select $log; $|=1; } else { openlog($name, "perror,pid,ndelay", "local0"); # don't forget this } my $dolog = sub { if($logdir) { my @t=localtime(time); my $str = join(' ', @_); if($str !~ /\n$/) { $str.="\n"; } print $log sprintf("[%04d-%02d-%02d %02d:%02d:%02d][$$] ", $t[5]+1900,$t[4]+1,$t[3],$t[2],$t[1],$t[0]).$str; } else { syslog('info', join(' ', @_)); } }; $SIG{__WARN__} = $dolog; $SIG{__DIE__} = sub { if($logdir) { $dolog->(@_); } else { syslog('crit', join(' ', @_)); syslog('crit', 'at '.Devel::StackTrace->new()->as_string); } exit(1); }; $user ||= 'nobody'; $group ||= 'nogroup'; ### start Net::Server::Daemonize::daemonize remake Net::Server::Daemonize::check_pid_file($pidfile) if defined $pidfile; my $uid = Net::Server::Daemonize::get_uid($user); my $gid = Net::Server::Daemonize::get_gid($group); # returns list of groups my $pid = Net::Server::Daemonize::safe_fork(); exit(0) if $pid; # exit parent # child Net::Server::Daemonize::create_pid_file($pidfile) if defined $pidfile; my $gid0 = (split(/\s+/, $gid))[0]; chown($uid, $gid0, $pidfile) if defined $pidfile; Net::Server::Daemonize::set_user($uid, $gid); open STDIN, '<', '/dev/null' or die "Can't open STDIN from /dev/null: [$!]\n"; open STDOUT, '>', '/dev/null' or die "Can't open STDOUT to /dev/null: [$!]\n"; open STDERR, '>&STDOUT' or die "Can't open STDERR to STDOUT: [$!]\n"; ### does this mean to be chroot ? chdir '/' or die "Can't chdir to \"/\": [$!]"; POSIX::setsid(); # Turn process into session leader, and ensure no controlling terminal ### install a signal handler to make sure SIGINT's remove our pid_file $SIG{'INT'} = sub { HUNTSMAN($pidfile) } if defined $pidfile; ### end et::Server::Daemonize::daemonize remake if($logdir) { open(STDOUT, '>>', $logfile) || die("Cannot open $logfile: $!"); # "Daemonize" redirects stderr to stdout and stdout to /dev/null open(STDERR, '>>', $logfile) || die("Cannot open $logfile: $!"); # "Daemonize" redirects stderr to stdout and stdout to /dev/null } } sub read_config { my $config_file = shift; -f $config_file or pod2usage (-msg=>"Config file $config_file doesn't exist"); -r $config_file or pod2usage (-msg=>"Config file $config_file is not readable"); return decode_json(File::Slurp::read_file($config_file) || pod2usage(-msg=>"Config file $config_file empty")); } sub easy_try(&) { my $func = shift; local $SIG{__DIE__} = undef; if(wantarray) { my @f = eval { &$func; } ; return @f; } else { my $f = eval { &$func; } ; return $f; } } 1;
waaeer/perl-www-easy
lib/WWW/Easy/Daemon.pm
Perl
bsd-2-clause
4,273
% % scheme.pl % marelle-deps % command_pkg(chicken). installs_with_brew(chicken). installs_with_apt(chicken, 'chicken-bin'). pkg('racket'). met('racket', _) :- isfile('~/.local/racket-5.3.6/bin/raco'). meet('racket', _). depends('racket', _, [ '__racket installed', '__racket in profile' ]). pkg('__racket in profile'). met('__racket in profile', _) :- bash('fgrep -q "racket-5.3.6" ~/.profile'). meet('__racket in profile', _) :- bash('echo \'export PATH=~/.local/racket-5.3.6/bin:${PATH}\' >> ~/.profile'). pkg('__racket installed'). met('__racket installed', _) :- isfile('~/.local/racket-5.3.6/bin/raco'). meet('__racket installed', linux(_)) :- bash('cd /tmp/racket-5.3.6/src && ./configure --prefix=$HOME/.local/racket-5.3.6 && make && make install'). meet('__racket installed', osx) :- bash('cd /tmp/racket-5.3.6/src && ./configure --prefix=$HOME/.local/racket-5.3.6 --enable-xonx && make && make install'). depends('__racket installed', _, [ '__racket tarball unpacked' ]). pkg('__racket tarball downloaded'). met('__racket tarball downloaded', _) :- isfile('/tmp/racket-5.3.6-src-unix.tgz'). meet('__racket tarball downloaded', _) :- bash('cd /tmp && wget http://download.racket-lang.org/installers/5.3.6/racket/racket-5.3.6-src-unix.tgz'). met('__racket tarball downloaded', _, [wget]). pkg('__racket tarball unpacked'). met('__racket tarball unpacked', _) :- isdir('/tmp/racket-5.3.6'). meet('__racket tarball unpacked', _) :- bash('cd /tmp && tar xfz /tmp/racket-5.3.6-src-unix.tgz'). depends('__racket tarball unpacked', _, [ '__racket tarball downloaded' ]). command_pkg(wget).
larsyencken/marelle-deps
scheme.pl
Perl
bsd-2-clause
1,657
#!/usr/bin/env perl -w my (@alph, %initial, %mutate); while (<>) { if (/initial..state..(.)....prob.([0-9\.e\+\-]+)/) { $initial{$1} = $2; push @alph, $1; } elsif (/mutate..from..(.)....to..(.)....rate.([0-9\.e\+\-]+)/) { $mutate{$1}->{$2} = $3; } } print "{\n", " \"alphabet\": \"", join("",@alph), "\",\n", " \"rootprob\":\n", " {\n", join (",\n", map (" \"$_\": $initial{$_}", @alph)), "\n", " },\n", " \"subrate\":\n", " {\n"; for my $i (@alph) { print " \"$i\": { ", join (", ", map ("\"$_\": ".$mutate{$i}->{$_}, grep(exists $mutate{$i}->{$_},@alph))), " }", ($i eq $alph[$#alph] ? "" : ","), "\n"; } print " },\n", " \"insrate\": 0.01,\n", " \"delrate\": 0.01,\n", " \"insextprob\": 0.66,\n", " \"delextprob\": 0.66\n", "}\n";
evoldoers/historian
perl/xrate2json.pl
Perl
bsd-3-clause
828
cha(1,46,509). cha(1,48,688). cha(1,56,1793). cha(1,92,1794). cha(1,100,1374). cha(1,108,1795). cha(1,132,1796). cha(1,133,1795). cha(1,145,1374). cha(1,153,1594). cha(1,210,1797). cha(1,485,1795). cha(1,754,651). cha(1,865,867). cha(1,920,969). cha(1,1192,1562). cha(1,1262,1728). cha(1,1265,1793). cha(1,1266,1793). cha(1,1267,1794). cha(1,1268,1794). cha(1,1269,1795). cha(1,1270,1796). cha(1,1271,1797). cha(1,1272,1797). cha(2,14,42). cha(2,24,1798). cha(2,25,1799). cha(2,33,1677). cha(2,46,509). cha(2,48,688). cha(2,100,1374). cha(2,137,1800). cha(2,145,1374). cha(2,153,1594). cha(2,235,757). cha(2,339,990). cha(2,347,17). cha(2,380,1798). cha(2,485,2161). cha(2,595,1799). cha(2,701,1800). cha(2,702,1800). cha(2,754,651). cha(2,865,867). cha(2,920,969). cha(2,1192,1562). cha(2,1262,1728). cha(2,1273,1798). cha(2,1274,1799). cha(2,1275,1800). cha(3,46,509). cha(3,48,688). cha(3,100,1374). cha(3,145,1374). cha(3,153,1594). cha(3,754,651). cha(3,865,867). cha(3,920,969). cha(3,1192,1562). cha(3,1262,1728). cha(4,46,509). cha(4,48,688). cha(4,100,1374). cha(4,145,1374). cha(4,153,1801). cha(4,754,651). cha(4,865,867). cha(4,920,969). cha(4,1192,1562). cha(4,1262,1728). cha(4,1276,1801). cha(5,46,509). cha(5,48,688). cha(5,100,1374). cha(5,145,1374). cha(5,153,1594). cha(5,188,61). cha(5,246,1619). cha(5,265,1802). cha(5,275,1167). cha(5,485,2162). cha(5,702,2163). cha(5,754,651). cha(5,865,867). cha(5,920,969). cha(5,1192,1562). cha(5,1220,1619). cha(5,1262,1728). cha(5,1277,1802). cha(6,21,167). cha(6,22,119). cha(6,46,482). cha(6,48,19). cha(6,100,1374). cha(6,145,1374). cha(6,152,137). cha(6,153,282). cha(6,377,19). cha(6,394,282). cha(6,407,68). cha(6,451,119). cha(6,465,137). cha(6,467,141). cha(6,478,161). cha(6,481,167). cha(6,488,180). cha(6,569,282). cha(6,576,292). cha(6,591,316). cha(6,648,423). cha(6,661,441). cha(6,671,464). cha(6,676,482). cha(6,682,500). cha(6,752,647). cha(6,754,651). cha(6,760,668). cha(6,765,677). cha(6,775,696). cha(6,862,860). cha(6,865,867). cha(6,907,943). cha(6,920,969). cha(6,962,1054). cha(6,994,1134). cha(6,1023,1178). cha(6,1041,1213). cha(6,1098,1338). cha(6,1114,1386). cha(6,1125,1409). cha(6,1189,1554). cha(6,1192,1562). cha(6,1222,1621). cha(6,1262,1728). cha(7,46,509). cha(7,48,688). cha(7,100,1374). cha(7,145,1374). cha(7,153,1594). cha(7,754,651). cha(7,865,867). cha(7,920,969). cha(7,1192,1562). cha(7,1262,1728). cha(8,24,1510). cha(8,25,1803). cha(8,46,509). cha(8,48,688). cha(8,100,1374). cha(8,137,1360). cha(8,145,1374). cha(8,153,1594). cha(8,485,2164). cha(8,702,1360). cha(8,754,651). cha(8,865,867). cha(8,920,969). cha(8,1168,1510). cha(8,1192,1562). cha(8,1262,2165). cha(8,1278,1803). cha(9,46,509). cha(9,48,688). cha(9,100,1374). cha(9,145,1374). cha(9,153,1594). cha(9,754,651). cha(9,865,867). cha(9,920,969). cha(9,1192,1562). cha(9,1262,1728). cha(10,11,1804). cha(10,46,509). cha(10,48,688). cha(10,100,1374). cha(10,145,1374). cha(10,153,1594). cha(10,163,387). cha(10,754,651). cha(10,865,867). cha(10,920,969). cha(10,1192,1562). cha(10,1262,1728). cha(10,1279,1804). cha(11,46,1805). cha(11,48,1806). cha(11,100,1374). cha(11,145,1374). cha(11,153,1807). cha(11,754,651). cha(11,865,867). cha(11,920,969). cha(11,1192,1562). cha(11,1262,1728). cha(11,1280,1805). cha(11,1281,1806). cha(11,1282,1807). cha(12,32,139). cha(12,46,509). cha(12,48,688). cha(12,100,1374). cha(12,145,1374). cha(12,153,1594). cha(12,754,651). cha(12,865,867). cha(12,920,969). cha(12,1192,1562). cha(12,1232,1634). cha(12,1262,1728). cha(13,46,509). cha(13,48,688). cha(13,100,1374). cha(13,145,1374). cha(13,153,1594). cha(13,754,651). cha(13,865,867). cha(13,920,969). cha(13,1192,1562). cha(13,1262,1728). cha(14,46,509). cha(14,48,688). cha(14,100,1374). cha(14,145,1374). cha(14,153,1594). cha(14,754,651). cha(14,865,867). cha(14,920,969). cha(14,1192,1562). cha(14,1262,1728). cha(15,46,509). cha(15,48,688). cha(15,100,1374). cha(15,145,1374). cha(15,153,1808). cha(15,754,651). cha(15,865,867). cha(15,920,969). cha(15,1192,1562). cha(15,1262,1728). cha(15,1283,1808). cha(16,36,1809). cha(16,46,509). cha(16,48,688). cha(16,100,1374). cha(16,145,1374). cha(16,153,1594). cha(16,246,1810). cha(16,265,1811). cha(16,275,1167). cha(16,358,1810). cha(16,485,2166). cha(16,702,2167). cha(16,754,651). cha(16,865,867). cha(16,920,969). cha(16,1192,1562). cha(16,1262,1728). cha(16,1284,1811). cha(17,46,509). cha(17,48,688). cha(17,100,1374). cha(17,145,1374). cha(17,153,1594). cha(17,754,651). cha(17,865,867). cha(17,920,969). cha(17,1192,1562). cha(17,1262,1728). cha(18,46,509). cha(18,48,688). cha(18,100,1374). cha(18,145,1374). cha(18,153,1594). cha(18,754,651). cha(18,865,867). cha(18,920,969). cha(18,1192,1562). cha(18,1262,1728). cha(19,3,583). cha(19,46,509). cha(19,48,688). cha(19,56,1284). cha(19,92,1168). cha(19,100,1374). cha(19,108,583). cha(19,145,1374). cha(19,153,1594). cha(19,210,133). cha(19,461,133). cha(19,485,583). cha(19,754,651). cha(19,865,867). cha(19,920,969). cha(19,1016,1168). cha(19,1074,1284). cha(19,1192,1562). cha(19,1261,1697). cha(19,1262,1697). cha(19,1270,2168). cha(20,46,1812). cha(20,48,1813). cha(20,100,1374). cha(20,145,1374). cha(20,153,1814). cha(20,754,651). cha(20,865,867). cha(20,920,969). cha(20,1192,1562). cha(20,1262,1728). cha(20,1285,1812). cha(20,1286,1813). cha(20,1287,1814). cha(21,24,1815). cha(21,25,1816). cha(21,46,509). cha(21,48,688). cha(21,100,1374). cha(21,137,531). cha(21,145,1374). cha(21,153,1594). cha(21,380,1815). cha(21,485,2169). cha(21,595,1816). cha(21,700,531). cha(21,701,531). cha(21,702,531). cha(21,754,651). cha(21,865,867). cha(21,920,969). cha(21,1192,1562). cha(21,1262,1728). cha(21,1288,1815). cha(21,1289,1816). cha(22,46,509). cha(22,48,688). cha(22,100,1374). cha(22,145,1374). cha(22,153,1594). cha(22,186,1507). cha(22,187,1074). cha(22,246,1817). cha(22,265,1123). cha(22,275,1167). cha(22,485,2170). cha(22,702,2171). cha(22,754,651). cha(22,865,867). cha(22,920,969). cha(22,987,1123). cha(22,1192,1562). cha(22,1262,1728). cha(22,1290,1817). cha(23,46,509). cha(23,48,688). cha(23,100,1374). cha(23,145,1374). cha(23,153,1592). cha(23,391,43). cha(23,469,145). cha(23,487,179). cha(23,492,185). cha(23,556,262). cha(23,587,310). cha(23,598,325). cha(23,612,352). cha(23,633,391). cha(23,636,395). cha(23,643,408). cha(23,651,429). cha(23,708,545). cha(23,725,586). cha(23,754,651). cha(23,771,686). cha(23,827,800). cha(23,863,862). cha(23,865,867). cha(23,920,969). cha(23,973,1088). cha(23,1018,1172). cha(23,1126,1410). cha(23,1192,1562). cha(23,1205,1592). cha(23,1262,1728). cha(24,46,509). cha(24,48,688). cha(24,100,1374). cha(24,145,1374). cha(24,153,1594). cha(24,754,651). cha(24,865,867). cha(24,920,969). cha(24,1192,1562). cha(24,1262,1728). cha(25,1,361). cha(25,2,1055). cha(25,46,509). cha(25,48,688). cha(25,100,1374). cha(25,145,1374). cha(25,153,1594). cha(25,297,1296). cha(25,298,1032). cha(25,754,651). cha(25,865,867). cha(25,920,969). cha(25,1192,1562). cha(25,1262,1728). cha(26,21,1818). cha(26,22,1336). cha(26,45,458). cha(26,46,509). cha(26,48,688). cha(26,100,1374). cha(26,101,1336). cha(26,102,597). cha(26,145,1374). cha(26,152,1819). cha(26,153,45). cha(26,237,1235). cha(26,370,6). cha(26,378,20). cha(26,392,45). cha(26,393,45). cha(26,394,45). cha(26,459,2172). cha(26,471,150). cha(26,558,265). cha(26,574,289). cha(26,590,315). cha(26,629,2173). cha(26,743,625). cha(26,754,651). cha(26,815,2174). cha(26,816,774). cha(26,865,867). cha(26,920,969). cha(26,947,2175). cha(26,1049,1235). cha(26,1073,2176). cha(26,1124,2177). cha(26,1156,1486). cha(26,1167,2178). cha(26,1192,1562). cha(26,1262,1728). cha(26,1291,1818). cha(26,1292,1819). cha(27,30,853). cha(27,46,1820). cha(27,48,1821). cha(27,85,859). cha(27,100,1374). cha(27,124,598). cha(27,125,1216). cha(27,145,1822). cha(27,153,1823). cha(27,190,1226). cha(27,238,1824). cha(27,313,1825). cha(27,470,853). cha(27,615,355). cha(27,716,859). cha(27,721,1226). cha(27,728,598). cha(27,754,651). cha(27,854,853). cha(27,861,859). cha(27,865,867). cha(27,920,969). cha(27,979,1824). cha(27,1010,1825). cha(27,1042,1216). cha(27,1047,1226). cha(27,1149,2179). cha(27,1150,2179). cha(27,1192,1562). cha(27,1262,1728). cha(27,1293,1820). cha(27,1294,1820). cha(27,1295,1821). cha(27,1296,1821). cha(27,1297,1822). cha(27,1298,1823). cha(27,1299,1824). cha(27,1300,1825). cha(28,11,1826). cha(28,46,509). cha(28,48,688). cha(28,100,1374). cha(28,145,1374). cha(28,153,1594). cha(28,163,387). cha(28,754,651). cha(28,865,867). cha(28,920,969). cha(28,1192,1562). cha(28,1262,1728). cha(29,4,149). cha(29,30,149). cha(29,46,1820). cha(29,47,1533). cha(29,48,1821). cha(29,83,841). cha(29,85,561). cha(29,93,507). cha(29,100,1827). cha(29,140,742). cha(29,145,1828). cha(29,153,1823). cha(29,190,574). cha(29,192,1110). cha(29,195,561). cha(29,225,251). cha(29,238,1110). cha(29,291,1460). cha(29,313,1156). cha(29,344,972). cha(29,367,70). cha(29,470,149). cha(29,716,561). cha(29,720,574). cha(29,721,574). cha(29,754,651). cha(29,865,867). cha(29,920,969). cha(29,979,1110). cha(29,1009,1156). cha(29,1010,1156). cha(29,1149,1460). cha(29,1150,1460). cha(29,1192,1562). cha(29,1262,1728). cha(29,1293,1820). cha(29,1294,1820). cha(29,1295,1821). cha(29,1296,1821). cha(29,1297,1828). cha(29,1298,1823). cha(29,1302,1828). cha(30,46,1293). cha(30,48,1829). cha(30,100,1374). cha(30,145,1374). cha(30,153,1589). cha(30,560,267). cha(30,754,651). cha(30,865,867). cha(30,920,969). cha(30,1077,1293). cha(30,1192,1562). cha(30,1202,1589). cha(30,1262,1728). cha(30,1303,1829). cha(31,46,509). cha(31,48,688). cha(31,100,1374). cha(31,145,1374). cha(31,153,1594). cha(31,754,651). cha(31,865,867). cha(31,920,969). cha(31,1192,1562). cha(31,1262,1728). cha(32,46,509). cha(32,48,688). cha(32,100,1374). cha(32,145,1374). cha(32,153,1594). cha(32,754,651). cha(32,865,867). cha(32,920,969). cha(32,1192,1562). cha(32,1262,1728). cha(33,46,509). cha(33,48,688). cha(33,100,1374). cha(33,145,1374). cha(33,153,1594). cha(33,754,651). cha(33,865,867). cha(33,920,969). cha(33,1192,1562). cha(33,1262,1728). cha(34,13,1830). cha(34,46,509). cha(34,48,688). cha(34,100,1374). cha(34,104,1831). cha(34,134,1832). cha(34,145,1374). cha(34,153,1594). cha(34,176,1833). cha(34,305,1834). cha(34,328,1835). cha(34,754,651). cha(34,865,867). cha(34,920,969). cha(34,1192,1562). cha(34,1262,1728). cha(35,46,509). cha(35,48,688). cha(35,100,1374). cha(35,145,1374). cha(35,153,1594). cha(35,754,651). cha(35,865,867). cha(35,920,969). cha(35,1192,1562). cha(35,1262,1728). cha(36,46,509). cha(36,48,688). cha(36,100,1374). cha(36,145,1374). cha(36,153,1594). cha(36,585,306). cha(36,631,389). cha(36,754,651). cha(36,832,806). cha(36,865,867). cha(36,911,956). cha(36,920,969). cha(36,946,1026). cha(36,1100,1340). cha(36,1192,1562). cha(36,1262,1728). cha(37,46,1836). cha(37,48,1837). cha(37,100,1374). cha(37,145,1374). cha(37,153,1838). cha(37,754,651). cha(37,865,867). cha(37,920,969). cha(37,1104,1348). cha(37,1192,1562). cha(37,1262,1728). cha(37,1304,1836). cha(37,1305,1836). cha(37,1306,1837). cha(37,1307,1837). cha(37,1308,1838). cha(38,46,1839). cha(38,48,1840). cha(38,100,1374). cha(38,145,1374). cha(38,153,1841). cha(38,754,651). cha(38,865,867). cha(38,920,969). cha(38,1192,1562). cha(38,1262,1728). cha(38,1309,1839). cha(38,1310,1840). cha(38,1311,1841). cha(39,46,509). cha(39,48,688). cha(39,100,1374). cha(39,145,1374). cha(39,153,1594). cha(39,754,651). cha(39,865,867). cha(39,920,969). cha(39,1192,1562). cha(39,1262,1728). cha(40,18,578). cha(40,19,623). cha(40,23,418). cha(40,46,509). cha(40,48,688). cha(40,82,1642). cha(40,100,1374). cha(40,145,1374). cha(40,153,319). cha(40,212,1027). cha(40,227,680). cha(40,236,1504). cha(40,280,319). cha(40,754,651). cha(40,865,867). cha(40,920,969). cha(40,1192,1562). cha(40,1262,1728). cha(41,46,509). cha(41,48,688). cha(41,100,1374). cha(41,145,1374). cha(41,153,1594). cha(41,754,651). cha(41,865,867). cha(41,920,969). cha(41,1192,1562). cha(41,1262,1728). cha(42,46,509). cha(42,48,688). cha(42,100,1374). cha(42,145,1374). cha(42,153,1594). cha(42,754,651). cha(42,865,867). cha(42,920,969). cha(42,1192,1562). cha(42,1262,1728). cha(43,26,559). cha(43,28,1654). cha(43,43,412). cha(43,46,1842). cha(43,48,1843). cha(43,52,1844). cha(43,86,1045). cha(43,88,1845). cha(43,90,559). cha(43,91,1846). cha(43,95,1508). cha(43,100,1847). cha(43,107,1093). cha(43,116,559). cha(43,145,365). cha(43,153,1848). cha(43,155,1849). cha(43,182,795). cha(43,202,740). cha(43,203,353). cha(43,206,852). cha(43,207,365). cha(43,215,1850). cha(43,222,1045). cha(43,224,1851). cha(43,241,412). cha(43,290,1045). cha(43,302,1093). cha(43,314,1045). cha(43,342,1844). cha(43,343,1850). cha(43,348,1852). cha(43,349,1851). cha(43,361,353). cha(43,404,1845). cha(43,405,1845). cha(43,406,1845). cha(43,408,559). cha(43,450,1045). cha(43,613,353). cha(43,614,353). cha(43,754,651). cha(43,796,740). cha(43,797,740). cha(43,798,740). cha(43,865,867). cha(43,915,1842). cha(43,916,1842). cha(43,917,1842). cha(43,920,969). cha(43,958,1843). cha(43,959,1843). cha(43,960,1843). cha(43,967,1846). cha(43,968,1846). cha(43,1105,1849). cha(43,1192,1562). cha(43,1203,1848). cha(43,1245,1852). cha(43,1246,1852). cha(43,1247,1852). cha(43,1254,2180). cha(43,1255,2180). cha(43,1262,1728). cha(43,1312,1842). cha(43,1313,1843). cha(43,1314,1844). cha(43,1315,1845). cha(43,1316,1846). cha(43,1318,1848). cha(43,1319,1849). cha(43,1320,1850). cha(43,1321,1851). cha(43,1322,1852). cha(44,26,559). cha(44,27,1013). cha(44,28,1654). cha(44,43,412). cha(44,46,1842). cha(44,48,1843). cha(44,52,1844). cha(44,86,1045). cha(44,88,1845). cha(44,90,559). cha(44,91,1846). cha(44,95,1508). cha(44,100,1469). cha(44,107,1093). cha(44,116,559). cha(44,145,365). cha(44,153,1848). cha(44,155,1849). cha(44,182,795). cha(44,202,740). cha(44,203,353). cha(44,204,24). cha(44,205,736). cha(44,206,852). cha(44,207,365). cha(44,215,1850). cha(44,222,1045). cha(44,224,1851). cha(44,241,412). cha(44,290,1045). cha(44,302,1093). cha(44,314,1045). cha(44,342,1844). cha(44,343,1850). cha(44,348,1852). cha(44,349,1851). cha(44,361,353). cha(44,404,1845). cha(44,405,1845). cha(44,406,1845). cha(44,408,559). cha(44,450,1045). cha(44,613,353). cha(44,614,353). cha(44,754,651). cha(44,796,740). cha(44,797,740). cha(44,798,740). cha(44,865,867). cha(44,915,1842). cha(44,916,1842). cha(44,917,1842). cha(44,920,969). cha(44,958,1843). cha(44,959,1843). cha(44,960,1843). cha(44,967,1846). cha(44,968,1846). cha(44,1105,1849). cha(44,1192,1562). cha(44,1203,1848). cha(44,1245,1852). cha(44,1246,1852). cha(44,1247,1852). cha(44,1254,2180). cha(44,1255,2180). cha(44,1262,1728). cha(44,1312,1842). cha(44,1313,1843). cha(44,1314,1844). cha(44,1315,1845). cha(44,1316,1846). cha(44,1318,1848). cha(44,1319,1849). cha(44,1320,1850). cha(44,1321,1851). cha(44,1322,1852). cha(45,5,1363). cha(45,46,509). cha(45,48,688). cha(45,100,1374). cha(45,145,1374). cha(45,153,1594). cha(45,285,1076). cha(45,286,556). cha(45,287,904). cha(45,288,1500). cha(45,754,651). cha(45,865,867). cha(45,920,969). cha(45,1192,1562). cha(45,1262,1728). cha(47,6,1241). cha(47,8,1552). cha(47,30,1552). cha(47,46,1853). cha(47,48,1854). cha(47,85,1241). cha(47,100,1855). cha(47,145,1856). cha(47,153,1857). cha(47,190,1858). cha(47,238,1859). cha(47,313,1860). cha(47,346,1503). cha(47,754,651). cha(47,865,867). cha(47,920,969). cha(47,1054,1241). cha(47,1150,2181). cha(47,1188,1552). cha(47,1192,1562). cha(47,1262,1728). cha(47,1294,1853). cha(47,1296,1854). cha(47,1323,1853). cha(47,1324,1854). cha(47,1326,1856). cha(47,1327,1857). cha(47,1328,1858). cha(47,1329,1858). cha(47,1330,1859). cha(47,1331,1860). cha(48,46,933). cha(48,48,705). cha(48,100,1374). cha(48,145,1374). cha(48,153,1861). cha(48,409,75). cha(48,410,75). cha(48,711,2182). cha(48,754,651). cha(48,779,705). cha(48,801,2183). cha(48,865,867). cha(48,892,2184). cha(48,903,933). cha(48,920,969). cha(48,1192,1562). cha(48,1238,2185). cha(48,1262,1728). cha(48,1332,1861). cha(49,7,1489). cha(49,46,1862). cha(49,48,1863). cha(49,100,1864). cha(49,116,1865). cha(49,145,1866). cha(49,153,1590). cha(49,226,1334). cha(49,281,769). cha(49,282,1489). cha(49,290,1334). cha(49,292,1334). cha(49,314,1334). cha(49,405,1489). cha(49,406,1489). cha(49,408,1865). cha(49,450,1334). cha(49,613,769). cha(49,614,769). cha(49,754,651). cha(49,796,2186). cha(49,797,2186). cha(49,814,769). cha(49,865,867). cha(49,917,1862). cha(49,920,969). cha(49,960,1863). cha(49,967,1332). cha(49,968,1332). cha(49,1192,1562). cha(49,1203,1590). cha(49,1246,2187). cha(49,1247,2187). cha(49,1262,1728). cha(49,1333,1862). cha(49,1334,1862). cha(49,1335,1863). cha(49,1336,1863). cha(49,1338,1865). cha(49,1339,1865). cha(49,1340,1866). cha(50,46,509). cha(50,48,688). cha(50,100,1374). cha(50,145,1374). cha(50,153,1594). cha(50,754,651). cha(50,865,867). cha(50,920,969). cha(50,1192,1562). cha(50,1262,1728). cha(51,46,509). cha(51,48,688). cha(51,78,1277). cha(51,100,1374). cha(51,145,1374). cha(51,153,1594). cha(51,754,651). cha(51,865,867). cha(51,920,969). cha(51,1192,1562). cha(51,1262,1728). cha(52,46,509). cha(52,48,688). cha(52,100,1374). cha(52,145,1374). cha(52,153,1594). cha(52,754,651). cha(52,865,867). cha(52,920,969). cha(52,1192,1562). cha(52,1262,1728). cha(53,46,509). cha(53,48,688). cha(53,100,1374). cha(53,145,1374). cha(53,153,1594). cha(53,754,651). cha(53,865,867). cha(53,920,969). cha(53,1192,1562). cha(53,1262,1728). cha(54,46,509). cha(54,48,688). cha(54,100,1374). cha(54,138,889). cha(54,139,512). cha(54,145,1374). cha(54,153,1867). cha(54,252,490). cha(54,253,619). cha(54,354,718). cha(54,355,1120). cha(54,364,299). cha(54,365,254). cha(54,754,651). cha(54,865,867). cha(54,920,969). cha(54,1192,1562). cha(54,1262,1728). cha(54,1341,1867). cha(55,46,509). cha(55,48,688). cha(55,56,1868). cha(55,92,1869). cha(55,100,1374). cha(55,108,1870). cha(55,145,1374). cha(55,153,1594). cha(55,210,1871). cha(55,485,1870). cha(55,754,651). cha(55,865,867). cha(55,920,969). cha(55,1192,1562). cha(55,1262,1728). cha(55,1270,2188). cha(56,46,1836). cha(56,48,1837). cha(56,100,1374). cha(56,145,1374). cha(56,153,1838). cha(56,754,651). cha(56,865,867). cha(56,920,969). cha(56,1104,1348). cha(56,1192,1562). cha(56,1262,1728). cha(56,1304,1836). cha(56,1305,1836). cha(56,1306,1837). cha(56,1307,1837). cha(56,1308,1838). cha(57,30,808). cha(57,46,1820). cha(57,48,1821). cha(57,85,1215). cha(57,100,1374). cha(57,145,1822). cha(57,153,1823). cha(57,190,1872). cha(57,220,1215). cha(57,221,808). cha(57,238,1873). cha(57,274,599). cha(57,313,1874). cha(57,470,808). cha(57,716,1215). cha(57,721,1872). cha(57,754,651). cha(57,865,867). cha(57,920,969). cha(57,979,1873). cha(57,1010,1874). cha(57,1149,2189). cha(57,1150,2189). cha(57,1192,1562). cha(57,1262,1728). cha(57,1293,1820). cha(57,1294,1820). cha(57,1295,1821). cha(57,1296,1821). cha(57,1297,1822). cha(57,1298,1823). cha(57,1342,1872). cha(57,1343,1873). cha(58,46,509). cha(58,48,688). cha(58,100,1374). cha(58,145,1374). cha(58,153,1594). cha(58,754,651). cha(58,865,867). cha(58,920,969). cha(58,1192,1562). cha(58,1262,1728). cha(59,9,1736). cha(59,10,968). cha(59,46,509). cha(59,48,688). cha(59,100,1374). cha(59,145,1374). cha(59,153,1875). cha(59,299,1478). cha(59,320,1261). cha(59,572,286). cha(59,577,293). cha(59,681,492). cha(59,727,592). cha(59,754,651). cha(59,865,867). cha(59,920,969). cha(59,961,1052). cha(59,1030,1194). cha(59,1034,1202). cha(59,1076,1292). cha(59,1121,1403). cha(59,1166,1505). cha(59,1192,1562). cha(59,1262,1728). cha(59,1263,1736). cha(59,1344,1875). cha(60,9,1876). cha(60,46,509). cha(60,48,688). cha(60,100,1374). cha(60,145,1374). cha(60,153,1594). cha(60,754,651). cha(60,865,867). cha(60,920,969). cha(60,1192,1562). cha(60,1262,1728). cha(61,9,1738). cha(61,10,968). cha(61,46,509). cha(61,48,688). cha(61,100,1374). cha(61,145,1374). cha(61,153,1875). cha(61,299,1478). cha(61,320,1261). cha(61,572,286). cha(61,577,293). cha(61,681,492). cha(61,727,592). cha(61,754,651). cha(61,865,867). cha(61,920,969). cha(61,961,1052). cha(61,1030,1194). cha(61,1034,1202). cha(61,1076,1292). cha(61,1121,1403). cha(61,1166,1505). cha(61,1192,1562). cha(61,1262,1728). cha(61,1263,1738). cha(61,1264,1738). cha(61,1344,1875). cha(62,46,509). cha(62,48,688). cha(62,100,1374). cha(62,145,1374). cha(62,153,1594). cha(62,754,651). cha(62,865,867). cha(62,920,969). cha(62,1192,1562). cha(62,1262,1728). cha(63,46,509). cha(63,48,688). cha(63,100,1374). cha(63,145,1374). cha(63,153,1877). cha(63,223,1878). cha(63,319,1879). cha(63,557,264). cha(63,754,651). cha(63,842,828). cha(63,865,867). cha(63,920,969). cha(63,942,1014). cha(63,1192,1562). cha(63,1262,1728). cha(63,1345,1877). cha(64,32,139). cha(64,46,509). cha(64,48,688). cha(64,100,1374). cha(64,145,1374). cha(64,153,1594). cha(64,754,651). cha(64,865,867). cha(64,920,969). cha(64,1192,1562). cha(64,1232,1634). cha(64,1262,1728). cha(65,12,1880). cha(65,32,1881). cha(65,46,509). cha(65,48,688). cha(65,100,1374). cha(65,145,1374). cha(65,153,1594). cha(65,754,651). cha(65,865,867). cha(65,920,969). cha(65,1192,1562). cha(65,1232,1634). cha(65,1262,1728). cha(65,1346,1881). cha(66,46,1836). cha(66,48,1837). cha(66,100,1374). cha(66,145,1374). cha(66,153,1838). cha(66,754,651). cha(66,865,867). cha(66,920,969). cha(66,1104,1348). cha(66,1192,1562). cha(66,1262,1728). cha(66,1304,1836). cha(66,1305,1836). cha(66,1306,1837). cha(66,1307,1837). cha(66,1308,1838). cha(67,46,509). cha(67,48,688). cha(67,100,1374). cha(67,145,1374). cha(67,153,1594). cha(67,754,651). cha(67,865,867). cha(67,920,969). cha(67,1192,1562). cha(67,1262,1728). cha(68,30,1584). cha(68,46,1820). cha(68,48,1821). cha(68,85,560). cha(68,100,1374). cha(68,145,1822). cha(68,153,1823). cha(68,190,1882). cha(68,238,1275). cha(68,283,1673). cha(68,313,1883). cha(68,353,1580). cha(68,470,1584). cha(68,715,560). cha(68,716,560). cha(68,721,1882). cha(68,754,651). cha(68,865,867). cha(68,920,969). cha(68,979,1275). cha(68,1010,1883). cha(68,1070,1275). cha(68,1149,2190). cha(68,1150,2190). cha(68,1192,1562). cha(68,1198,1584). cha(68,1262,1728). cha(68,1293,1820). cha(68,1294,1820). cha(68,1295,1821). cha(68,1296,1821). cha(68,1297,1822). cha(68,1298,1823). cha(68,1347,1882). cha(68,1348,1883). cha(69,46,509). cha(69,48,688). cha(69,100,1374). cha(69,145,1374). cha(69,153,1594). cha(69,264,1635). cha(69,754,651). cha(69,865,867). cha(69,920,969). cha(69,1192,1562). cha(69,1262,1728). cha(70,46,1862). cha(70,48,1863). cha(70,100,1374). cha(70,116,1884). cha(70,145,1374). cha(70,153,1590). cha(70,281,1885). cha(70,282,1886). cha(70,290,1887). cha(70,292,1887). cha(70,314,1887). cha(70,405,1886). cha(70,406,1886). cha(70,408,1884). cha(70,450,1887). cha(70,613,1885). cha(70,614,1885). cha(70,754,651). cha(70,796,2191). cha(70,797,2191). cha(70,865,867). cha(70,917,1862). cha(70,920,969). cha(70,960,1863). cha(70,967,1332). cha(70,968,1332). cha(70,1192,1562). cha(70,1203,1590). cha(70,1246,2192). cha(70,1247,2192). cha(70,1262,1728). cha(70,1333,1862). cha(70,1334,1862). cha(70,1335,1863). cha(70,1336,1863). cha(70,1339,1884). cha(70,1349,1884). cha(70,1350,1885). cha(70,1351,1887). cha(71,43,412). cha(71,46,963). cha(71,48,1051). cha(71,52,1888). cha(71,86,1045). cha(71,88,1889). cha(71,90,1890). cha(71,91,1332). cha(71,100,1374). cha(71,107,1093). cha(71,116,1890). cha(71,145,1374). cha(71,153,1590). cha(71,155,1351). cha(71,215,1891). cha(71,222,1045). cha(71,224,1177). cha(71,241,412). cha(71,290,1045). cha(71,302,1093). cha(71,314,1045). cha(71,342,1888). cha(71,343,1891). cha(71,348,1892). cha(71,349,1177). cha(71,361,1893). cha(71,404,1889). cha(71,405,1889). cha(71,406,1889). cha(71,408,1890). cha(71,450,1045). cha(71,613,1893). cha(71,614,1893). cha(71,754,651). cha(71,796,2191). cha(71,797,2191). cha(71,798,2191). cha(71,865,867). cha(71,915,963). cha(71,916,963). cha(71,917,963). cha(71,920,969). cha(71,958,1051). cha(71,959,1051). cha(71,960,1051). cha(71,967,1332). cha(71,968,1332). cha(71,1105,1351). cha(71,1192,1562). cha(71,1203,1590). cha(71,1245,1892). cha(71,1246,1892). cha(71,1247,1892). cha(71,1254,2193). cha(71,1255,2193). cha(71,1262,1728). cha(71,1352,1888). cha(71,1353,1890). cha(71,1354,1893). cha(72,30,1894). cha(72,46,1895). cha(72,48,1896). cha(72,85,1897). cha(72,100,1374). cha(72,145,1822). cha(72,153,1823). cha(72,190,1898). cha(72,238,1899). cha(72,313,1900). cha(72,470,1894). cha(72,716,1897). cha(72,721,1898). cha(72,754,651). cha(72,865,867). cha(72,920,969). cha(72,979,1899). cha(72,1010,1900). cha(72,1149,2194). cha(72,1150,2194). cha(72,1192,1562). cha(72,1262,1728). cha(72,1293,1895). cha(72,1294,1895). cha(72,1295,1896). cha(72,1296,1896). cha(72,1297,1822). cha(72,1298,1823). cha(72,1355,1895). cha(72,1356,1896). cha(72,1357,1897). cha(72,1358,1899). cha(72,1359,1900). cha(73,46,509). cha(73,48,688). cha(73,100,1374). cha(73,145,1374). cha(73,153,1594). cha(73,754,651). cha(73,865,867). cha(73,920,969). cha(73,1192,1562). cha(73,1262,1728). cha(74,30,1901). cha(74,46,1902). cha(74,48,1903). cha(74,85,1904). cha(74,100,1374). cha(74,145,1374). cha(74,153,1594). cha(74,190,1905). cha(74,238,1906). cha(74,313,1907). cha(74,754,651). cha(74,865,867). cha(74,920,969). cha(74,1150,2195). cha(74,1192,1562). cha(74,1262,1728). cha(74,1294,1902). cha(74,1296,1903). cha(75,46,509). cha(75,48,688). cha(75,100,1374). cha(75,145,1374). cha(75,153,1594). cha(75,754,651). cha(75,865,867). cha(75,920,969). cha(75,1192,1562). cha(75,1262,1728). cha(76,46,509). cha(76,48,688). cha(76,100,1374). cha(76,145,1374). cha(76,153,1594). cha(76,754,651). cha(76,865,867). cha(76,920,969). cha(76,1192,1562). cha(76,1262,1728). cha(77,46,509). cha(77,48,688). cha(77,100,1374). cha(77,145,1374). cha(77,153,1594). cha(77,754,651). cha(77,865,867). cha(77,920,969). cha(77,1192,1562). cha(77,1262,1728). cha(78,46,509). cha(78,48,688). cha(78,100,1374). cha(78,145,1374). cha(78,153,1594). cha(78,754,651). cha(78,865,867). cha(78,920,969). cha(78,1192,1562). cha(78,1262,1728). cha(79,46,509). cha(79,48,688). cha(79,100,1374). cha(79,145,1374). cha(79,153,1594). cha(79,754,651). cha(79,865,867). cha(79,920,969). cha(79,1192,1562). cha(79,1262,1728). cha(80,46,509). cha(80,48,688). cha(80,100,1374). cha(80,145,1374). cha(80,153,1594). cha(80,754,651). cha(80,865,867). cha(80,920,969). cha(80,1192,1562). cha(80,1262,1728). cha(81,46,509). cha(81,48,688). cha(81,100,1374). cha(81,145,1374). cha(81,153,1594). cha(81,754,651). cha(81,865,867). cha(81,920,969). cha(81,1192,1562). cha(81,1262,1728). cha(82,46,509). cha(82,48,688). cha(82,100,1374). cha(82,145,1374). cha(82,153,1594). cha(82,754,651). cha(82,865,867). cha(82,920,969). cha(82,1192,1562). cha(82,1262,1728). cha(83,46,509). cha(83,48,688). cha(83,100,1374). cha(83,145,1374). cha(83,153,1594). cha(83,754,651). cha(83,865,867). cha(83,920,969). cha(83,1192,1562). cha(83,1262,1728). cha(84,46,509). cha(84,48,688). cha(84,100,1374). cha(84,145,1374). cha(84,153,1594). cha(84,754,651). cha(84,865,867). cha(84,920,969). cha(84,1192,1562). cha(84,1262,1728). cha(85,46,509). cha(85,48,688). cha(85,100,1374). cha(85,145,1374). cha(85,153,1594). cha(85,754,651). cha(85,865,867). cha(85,920,969). cha(85,1192,1562). cha(85,1262,1728). cha(86,46,509). cha(86,48,688). cha(86,100,1374). cha(86,145,1374). cha(86,153,1594). cha(86,754,651). cha(86,865,867). cha(86,920,969). cha(86,1192,1562). cha(86,1262,1728). cha(87,46,509). cha(87,48,688). cha(87,100,1374). cha(87,145,1374). cha(87,153,1594). cha(87,183,1595). cha(87,754,651). cha(87,865,867). cha(87,920,969). cha(87,1192,1562). cha(87,1262,1728). cha(88,46,509). cha(88,48,688). cha(88,100,1374). cha(88,145,1374). cha(88,153,1594). cha(88,754,651). cha(88,865,867). cha(88,920,969). cha(88,1192,1562). cha(88,1262,1728). cha(89,46,509). cha(89,48,688). cha(89,100,1374). cha(89,145,1374). cha(89,153,1594). cha(89,359,1908). cha(89,360,1909). cha(89,754,651). cha(89,865,867). cha(89,920,969). cha(89,1192,1562). cha(89,1262,1728). cha(89,1360,1908). cha(89,1361,1909). cha(90,46,509). cha(90,48,688). cha(90,87,1910). cha(90,89,1911). cha(90,100,1374). cha(90,145,1374). cha(90,153,1594). cha(90,754,651). cha(90,865,867). cha(90,920,969). cha(90,923,2196). cha(90,1192,1562). cha(90,1262,1728). cha(90,1362,1910). cha(90,1363,1911). cha(91,46,1912). cha(91,48,1633). cha(91,100,1913). cha(91,145,1914). cha(91,153,1915). cha(91,754,651). cha(91,865,867). cha(91,878,890). cha(91,920,969). cha(91,1192,1562). cha(91,1231,1633). cha(91,1262,1728). cha(91,1364,1912). cha(91,1366,1914). cha(91,1367,1915). cha(92,46,1916). cha(92,48,1917). cha(92,100,1918). cha(92,145,1919). cha(92,153,1594). cha(92,754,651). cha(92,865,867). cha(92,920,969). cha(92,1192,1562). cha(92,1262,1728). cha(92,1368,1916). cha(92,1369,1917). cha(92,1371,1919). cha(93,46,1920). cha(93,48,1921). cha(93,100,1374). cha(93,145,1374). cha(93,153,1922). cha(93,396,716). cha(93,754,651). cha(93,786,716). cha(93,865,867). cha(93,909,950). cha(93,920,969). cha(93,999,2197). cha(93,1051,2198). cha(93,1192,1562). cha(93,1262,1728). cha(93,1372,1920). cha(93,1373,1921). cha(93,1374,1922). cha(94,18,578). cha(94,19,623). cha(94,23,418). cha(94,46,509). cha(94,48,688). cha(94,82,1642). cha(94,100,1374). cha(94,145,1374). cha(94,153,319). cha(94,212,1027). cha(94,227,680). cha(94,236,1504). cha(94,280,319). cha(94,754,651). cha(94,865,867). cha(94,920,969). cha(94,1192,1562). cha(94,1262,1728). cha(95,46,509). cha(95,48,688). cha(95,100,1374). cha(95,145,1374). cha(95,153,1594). cha(95,754,651). cha(95,865,867). cha(95,920,969). cha(95,1091,1324). cha(95,1192,1562). cha(95,1262,1728). cha(96,41,99). cha(96,46,509). cha(96,48,688). cha(96,60,189). cha(96,100,1374). cha(96,103,1208). cha(96,145,1374). cha(96,153,1594). cha(96,433,99). cha(96,494,189). cha(96,754,651). cha(96,865,867). cha(96,920,969). cha(96,1037,1208). cha(96,1192,1562). cha(96,1262,1728). cha(97,41,97). cha(97,46,509). cha(97,48,688). cha(97,60,221). cha(97,100,1374). cha(97,103,1209). cha(97,145,1374). cha(97,153,1594). cha(97,431,97). cha(97,524,221). cha(97,754,651). cha(97,865,867). cha(97,920,969). cha(97,1038,1209). cha(97,1192,1562). cha(97,1262,1728). cha(98,41,108). cha(98,46,509). cha(98,48,688). cha(98,60,238). cha(98,100,1374). cha(98,103,1210). cha(98,145,1374). cha(98,153,1594). cha(98,441,108). cha(98,542,238). cha(98,754,651). cha(98,865,867). cha(98,920,969). cha(98,1039,1210). cha(98,1192,1562). cha(98,1262,1728). cha(99,41,84). cha(99,46,509). cha(99,48,688). cha(99,60,199). cha(99,100,1374). cha(99,103,1211). cha(99,145,1374). cha(99,153,1594). cha(99,419,84). cha(99,504,199). cha(99,754,651). cha(99,865,867). cha(99,920,969). cha(99,1040,1211). cha(99,1192,1562). cha(99,1262,1728). cha(100,41,1923). cha(100,46,509). cha(100,48,688). cha(100,60,1924). cha(100,100,1374). cha(100,103,1207). cha(100,145,1374). cha(100,153,1594). cha(100,754,651). cha(100,865,867). cha(100,920,969). cha(100,1036,1207). cha(100,1192,1562). cha(100,1262,1728). cha(100,1375,1923). cha(100,1376,1924). cha(101,41,1923). cha(101,46,509). cha(101,48,688). cha(101,60,1924). cha(101,100,1374). cha(101,103,1207). cha(101,145,1374). cha(101,153,1594). cha(101,754,651). cha(101,865,867). cha(101,920,969). cha(101,1036,1207). cha(101,1192,1562). cha(101,1262,1728). cha(101,1375,1923). cha(101,1376,1924). cha(102,41,1923). cha(102,46,509). cha(102,48,688). cha(102,60,1924). cha(102,100,1374). cha(102,103,1207). cha(102,145,1374). cha(102,153,1594). cha(102,754,651). cha(102,865,867). cha(102,920,969). cha(102,1036,1207). cha(102,1192,1562). cha(102,1262,1728). cha(102,1375,1923). cha(102,1376,1924). cha(103,41,1923). cha(103,46,509). cha(103,48,688). cha(103,60,1924). cha(103,100,1374). cha(103,103,1207). cha(103,145,1374). cha(103,153,1594). cha(103,754,651). cha(103,865,867). cha(103,920,969). cha(103,1036,1207). cha(103,1192,1562). cha(103,1262,1728). cha(103,1375,1923). cha(103,1376,1924). cha(104,41,1923). cha(104,46,509). cha(104,48,688). cha(104,60,1924). cha(104,100,1374). cha(104,103,1207). cha(104,145,1374). cha(104,153,1594). cha(104,754,651). cha(104,865,867). cha(104,920,969). cha(104,1036,1207). cha(104,1192,1562). cha(104,1262,1728). cha(104,1375,1923). cha(104,1376,1924). cha(105,41,1923). cha(105,46,509). cha(105,48,688). cha(105,60,1924). cha(105,100,1374). cha(105,103,1207). cha(105,145,1374). cha(105,153,1594). cha(105,754,651). cha(105,865,867). cha(105,920,969). cha(105,1036,1207). cha(105,1192,1562). cha(105,1262,1728). cha(105,1375,1923). cha(105,1376,1924). cha(106,41,1923). cha(106,46,509). cha(106,48,688). cha(106,60,1924). cha(106,100,1374). cha(106,103,1207). cha(106,145,1374). cha(106,153,1594). cha(106,754,651). cha(106,865,867). cha(106,920,969). cha(106,1036,1207). cha(106,1192,1562). cha(106,1262,1728). cha(106,1375,1923). cha(106,1376,1924). cha(107,41,1923). cha(107,46,509). cha(107,48,688). cha(107,60,1924). cha(107,100,1374). cha(107,103,1207). cha(107,145,1374). cha(107,153,1594). cha(107,754,651). cha(107,865,867). cha(107,920,969). cha(107,1036,1207). cha(107,1192,1562). cha(107,1262,1728). cha(107,1375,1923). cha(107,1376,1924). cha(108,41,1923). cha(108,46,509). cha(108,48,688). cha(108,60,1924). cha(108,100,1374). cha(108,103,1207). cha(108,145,1374). cha(108,153,1594). cha(108,754,651). cha(108,865,867). cha(108,920,969). cha(108,1036,1207). cha(108,1192,1562). cha(108,1262,1728). cha(108,1375,1923). cha(108,1376,1924). cha(109,41,1923). cha(109,46,509). cha(109,48,688). cha(109,60,1924). cha(109,100,1374). cha(109,103,1207). cha(109,145,1374). cha(109,153,1594). cha(109,754,651). cha(109,865,867). cha(109,920,969). cha(109,1036,1207). cha(109,1192,1562). cha(109,1262,1728). cha(109,1375,1923). cha(109,1376,1924). cha(110,41,1923). cha(110,46,509). cha(110,48,688). cha(110,60,1924). cha(110,100,1374). cha(110,103,1207). cha(110,145,1374). cha(110,153,1594). cha(110,754,651). cha(110,865,867). cha(110,920,969). cha(110,1036,1207). cha(110,1192,1562). cha(110,1262,1728). cha(110,1375,1923). cha(110,1376,1924). cha(111,41,1923). cha(111,46,509). cha(111,48,688). cha(111,60,1924). cha(111,100,1374). cha(111,103,1207). cha(111,145,1374). cha(111,153,1594). cha(111,754,651). cha(111,865,867). cha(111,920,969). cha(111,1036,1207). cha(111,1192,1562). cha(111,1262,1728). cha(111,1375,1923). cha(111,1376,1924). cha(112,41,1923). cha(112,46,509). cha(112,48,688). cha(112,60,1924). cha(112,100,1374). cha(112,103,1207). cha(112,145,1374). cha(112,153,1594). cha(112,754,651). cha(112,865,867). cha(112,920,969). cha(112,1036,1207). cha(112,1192,1562). cha(112,1262,1728). cha(112,1375,1923). cha(112,1376,1924). cha(113,41,1923). cha(113,46,509). cha(113,48,688). cha(113,60,1924). cha(113,100,1374). cha(113,103,1207). cha(113,145,1374). cha(113,153,1594). cha(113,754,651). cha(113,865,867). cha(113,920,969). cha(113,1036,1207). cha(113,1192,1562). cha(113,1262,1728). cha(113,1375,1923). cha(113,1376,1924). cha(114,41,1923). cha(114,46,509). cha(114,48,688). cha(114,60,1924). cha(114,100,1374). cha(114,103,1207). cha(114,145,1374). cha(114,153,1594). cha(114,754,651). cha(114,865,867). cha(114,920,969). cha(114,1036,1207). cha(114,1192,1562). cha(114,1262,1728). cha(114,1375,1923). cha(114,1376,1924). cha(115,41,1923). cha(115,46,509). cha(115,48,688). cha(115,60,1924). cha(115,100,1374). cha(115,103,1207). cha(115,145,1374). cha(115,153,1594). cha(115,754,651). cha(115,865,867). cha(115,920,969). cha(115,1036,1207). cha(115,1192,1562). cha(115,1262,1728). cha(115,1375,1923). cha(115,1376,1924). cha(116,41,90). cha(116,46,509). cha(116,48,688). cha(116,60,210). cha(116,100,1374). cha(116,103,1433). cha(116,145,1374). cha(116,153,1594). cha(116,754,651). cha(116,865,867). cha(116,920,969). cha(116,1192,1562). cha(116,1262,1728). cha(117,41,90). cha(117,46,509). cha(117,48,688). cha(117,60,226). cha(117,100,1374). cha(117,103,1433). cha(117,145,1374). cha(117,153,1594). cha(117,530,226). cha(117,754,651). cha(117,865,867). cha(117,920,969). cha(117,1192,1562). cha(117,1262,1728). cha(118,46,509). cha(118,48,688). cha(118,100,1374). cha(118,145,1374). cha(118,153,1594). cha(118,194,1925). cha(118,211,1926). cha(118,754,651). cha(118,865,867). cha(118,920,969). cha(118,1192,1562). cha(118,1262,1728). cha(119,16,1548). cha(119,17,1191). cha(119,46,509). cha(119,48,688). cha(119,100,1374). cha(119,145,1374). cha(119,153,1594). cha(119,754,651). cha(119,865,867). cha(119,920,969). cha(119,1192,1562). cha(119,1262,1728). cha(120,15,589). cha(120,46,509). cha(120,48,688). cha(120,100,1374). cha(120,145,1374). cha(120,153,1594). cha(120,754,651). cha(120,865,867). cha(120,920,969). cha(120,1192,1562). cha(120,1262,1728). cha(121,46,509). cha(121,48,688). cha(121,100,1374). cha(121,145,1374). cha(121,153,1594). cha(121,266,1927). cha(121,268,1928). cha(121,754,651). cha(121,865,867). cha(121,920,969). cha(121,1192,1562). cha(121,1262,1728). cha(121,1377,1927). cha(121,1378,1928). cha(122,18,578). cha(122,19,623). cha(122,23,418). cha(122,46,509). cha(122,48,688). cha(122,82,1642). cha(122,100,1374). cha(122,145,1374). cha(122,153,319). cha(122,212,1027). cha(122,227,680). cha(122,236,1504). cha(122,280,319). cha(122,754,651). cha(122,865,867). cha(122,920,969). cha(122,1192,1562). cha(122,1262,1728). cha(123,46,509). cha(123,48,688). cha(123,100,1374). cha(123,120,1196). cha(123,121,881). cha(123,122,1626). cha(123,145,1374). cha(123,153,1594). cha(123,213,1929). cha(123,277,468). cha(123,754,651). cha(123,865,867). cha(123,872,881). cha(123,920,969). cha(123,1192,1562). cha(123,1262,1728). cha(124,46,509). cha(124,48,688). cha(124,100,1374). cha(124,145,1374). cha(124,153,1930). cha(124,742,622). cha(124,754,651). cha(124,865,867). cha(124,877,888). cha(124,920,969). cha(124,1192,1562). cha(124,1223,1624). cha(124,1262,1728). cha(124,1379,1930). cha(125,46,509). cha(125,48,688). cha(125,100,1374). cha(125,145,1374). cha(125,153,1594). cha(125,754,651). cha(125,865,867). cha(125,920,969). cha(125,1192,1562). cha(125,1262,1728). cha(126,46,509). cha(126,48,688). cha(126,100,1374). cha(126,145,1374). cha(126,153,1594). cha(126,754,651). cha(126,865,867). cha(126,920,969). cha(126,1192,1562). cha(126,1262,1728). cha(127,46,509). cha(127,48,688). cha(127,100,1374). cha(127,145,1374). cha(127,153,1594). cha(127,754,651). cha(127,865,867). cha(127,920,969). cha(127,1192,1562). cha(127,1262,1728). cha(128,46,1931). cha(128,48,1497). cha(128,100,1374). cha(128,145,1374). cha(128,153,1932). cha(128,389,38). cha(128,395,46). cha(128,396,46). cha(128,670,457). cha(128,697,526). cha(128,750,644). cha(128,754,651). cha(128,813,768). cha(128,865,867). cha(128,920,969). cha(128,991,1129). cha(128,998,1141). cha(128,999,1141). cha(128,1051,1531). cha(128,1163,1497). cha(128,1179,1531). cha(128,1192,1562). cha(128,1262,1728). cha(128,1380,1931). cha(128,1381,1932). cha(129,18,578). cha(129,19,623). cha(129,23,418). cha(129,46,509). cha(129,48,688). cha(129,82,1642). cha(129,100,1374). cha(129,145,1374). cha(129,153,319). cha(129,212,1027). cha(129,227,680). cha(129,236,1504). cha(129,280,319). cha(129,754,651). cha(129,865,867). cha(129,920,969). cha(129,1192,1562). cha(129,1262,1728). cha(130,46,1933). cha(130,48,1934). cha(130,100,1374). cha(130,145,1374). cha(130,153,1838). cha(130,754,651). cha(130,865,867). cha(130,920,969). cha(130,1104,1348). cha(130,1192,1562). cha(130,1262,1728). cha(130,1305,1933). cha(130,1307,1934). cha(130,1308,1838). cha(130,1382,1933). cha(130,1383,1934). cha(131,46,1836). cha(131,48,1837). cha(131,100,1374). cha(131,145,1374). cha(131,153,1838). cha(131,754,651). cha(131,865,867). cha(131,920,969). cha(131,1104,1348). cha(131,1192,1562). cha(131,1262,1728). cha(131,1304,1836). cha(131,1305,1836). cha(131,1306,1837). cha(131,1307,1837). cha(131,1308,1838). cha(132,46,1836). cha(132,48,1837). cha(132,100,1374). cha(132,145,1374). cha(132,153,1838). cha(132,754,651). cha(132,865,867). cha(132,920,969). cha(132,1104,1348). cha(132,1192,1562). cha(132,1262,1728). cha(132,1304,1836). cha(132,1305,1836). cha(132,1306,1837). cha(132,1307,1837). cha(132,1308,1838). cha(133,46,1836). cha(133,48,1837). cha(133,100,1374). cha(133,145,1374). cha(133,153,1838). cha(133,754,651). cha(133,865,867). cha(133,920,969). cha(133,1104,1348). cha(133,1192,1562). cha(133,1262,1728). cha(133,1304,1836). cha(133,1305,1836). cha(133,1306,1837). cha(133,1307,1837). cha(133,1308,1838). cha(134,46,1935). cha(134,48,1936). cha(134,100,1374). cha(134,145,1374). cha(134,153,1838). cha(134,754,651). cha(134,865,867). cha(134,920,969). cha(134,1104,1348). cha(134,1192,1562). cha(134,1262,1728). cha(134,1305,1935). cha(134,1307,1936). cha(134,1308,1838). cha(134,1384,1935). cha(134,1385,1936). cha(135,46,1836). cha(135,48,1837). cha(135,100,1374). cha(135,145,1374). cha(135,153,1838). cha(135,754,651). cha(135,865,867). cha(135,920,969). cha(135,1104,1348). cha(135,1192,1562). cha(135,1262,1728). cha(135,1304,1836). cha(135,1305,1836). cha(135,1306,1837). cha(135,1307,1837). cha(135,1308,1838). cha(136,46,509). cha(136,48,688). cha(136,100,1374). cha(136,145,1374). cha(136,153,1594). cha(136,754,651). cha(136,865,867). cha(136,920,969). cha(136,1192,1562). cha(136,1262,1728). cha(137,46,509). cha(137,48,688). cha(137,100,1374). cha(137,145,1374). cha(137,153,1594). cha(137,754,651). cha(137,865,867). cha(137,920,969). cha(137,1192,1562). cha(137,1262,1728). cha(138,46,509). cha(138,48,688). cha(138,100,1374). cha(138,145,1374). cha(138,153,1594). cha(138,754,651). cha(138,865,867). cha(138,920,969). cha(138,1192,1562). cha(138,1262,1728). cha(139,46,509). cha(139,48,688). cha(139,100,1374). cha(139,145,1374). cha(139,153,1594). cha(139,754,651). cha(139,865,867). cha(139,920,969). cha(139,1192,1562). cha(139,1262,1728). cha(140,46,509). cha(140,48,688). cha(140,100,1374). cha(140,145,1374). cha(140,153,1594). cha(140,754,651). cha(140,865,867). cha(140,920,969). cha(140,1192,1562). cha(140,1262,1728). cha(141,46,509). cha(141,48,688). cha(141,100,1374). cha(141,145,1374). cha(141,153,1594). cha(141,754,651). cha(141,865,867). cha(141,920,969). cha(141,1192,1562). cha(141,1262,1728). cha(142,46,509). cha(142,48,688). cha(142,100,1374). cha(142,145,1374). cha(142,153,1594). cha(142,754,651). cha(142,865,867). cha(142,920,969). cha(142,1192,1562). cha(142,1262,1728). cha(143,46,509). cha(143,48,688). cha(143,100,1374). cha(143,145,1374). cha(143,153,1594). cha(143,754,651). cha(143,865,867). cha(143,920,969). cha(143,1192,1562). cha(143,1262,1728). cha(144,18,578). cha(144,19,623). cha(144,23,418). cha(144,46,509). cha(144,48,688). cha(144,82,1642). cha(144,100,1374). cha(144,145,1374). cha(144,153,319). cha(144,212,1027). cha(144,227,680). cha(144,236,1504). cha(144,280,319). cha(144,754,651). cha(144,865,867). cha(144,920,969). cha(144,1192,1562). cha(144,1262,1728). cha(145,18,578). cha(145,19,623). cha(145,23,418). cha(145,46,509). cha(145,48,688). cha(145,82,1642). cha(145,100,1374). cha(145,145,1374). cha(145,153,319). cha(145,212,1027). cha(145,227,680). cha(145,236,1504). cha(145,280,319). cha(145,754,651). cha(145,865,867). cha(145,920,969). cha(145,1192,1562). cha(145,1262,1728). cha(146,20,588). cha(146,38,435). cha(146,46,509). cha(146,48,688). cha(146,56,588). cha(146,70,672). cha(146,71,1025). cha(146,72,323). cha(146,73,1034). cha(146,74,1477). cha(146,75,2). cha(146,92,1937). cha(146,94,879). cha(146,97,584). cha(146,100,1374). cha(146,108,176). cha(146,115,1061). cha(146,135,1233). cha(146,143,478). cha(146,145,1374). cha(146,153,1594). cha(146,162,453). cha(146,209,176). cha(146,210,1501). cha(146,219,823). cha(146,248,652). cha(146,321,868). cha(146,322,1198). cha(146,323,1643). cha(146,324,563). cha(146,325,1082). cha(146,326,1335). cha(146,327,566). cha(146,369,2). cha(146,480,1061). cha(146,485,176). cha(146,605,2199). cha(146,655,435). cha(146,674,478). cha(146,699,2200). cha(146,718,823). cha(146,724,584). cha(146,754,651). cha(146,859,2201). cha(146,865,867). cha(146,894,2202). cha(146,920,969). cha(146,932,2203). cha(146,1165,1501). cha(146,1192,1562). cha(146,1262,1728). cha(146,1270,2188). cha(146,1386,1937). cha(147,18,578). cha(147,19,623). cha(147,23,418). cha(147,46,509). cha(147,48,688). cha(147,82,1642). cha(147,100,1374). cha(147,145,1374). cha(147,153,319). cha(147,212,1027). cha(147,227,680). cha(147,236,1504). cha(147,280,319). cha(147,754,651). cha(147,865,867). cha(147,920,969). cha(147,1192,1562). cha(147,1262,1728). cha(148,46,1938). cha(148,48,1939). cha(148,100,1374). cha(148,145,1374). cha(148,153,1940). cha(148,316,1941). cha(148,754,651). cha(148,853,2204). cha(148,865,867). cha(148,920,969). cha(148,986,2205). cha(148,1192,1562). cha(148,1262,1728). cha(148,1387,1938). cha(148,1388,1939). cha(148,1389,1940). cha(149,46,509). cha(149,48,688). cha(149,100,1374). cha(149,145,1374). cha(149,153,1594). cha(149,754,651). cha(149,865,867). cha(149,920,969). cha(149,1192,1562). cha(149,1262,1728). cha(150,32,426). cha(150,46,509). cha(150,48,688). cha(150,100,1374). cha(150,145,1374). cha(150,153,1594). cha(150,228,426). cha(150,754,651). cha(150,865,867). cha(150,920,969). cha(150,1192,1562). cha(150,1232,1634). cha(150,1262,1728). cha(151,21,1818). cha(151,22,1336). cha(151,45,458). cha(151,46,509). cha(151,48,688). cha(151,100,1374). cha(151,101,1336). cha(151,102,597). cha(151,145,1374). cha(151,152,1819). cha(151,153,1942). cha(151,237,1232). cha(151,393,1942). cha(151,394,1942). cha(151,459,130). cha(151,629,380). cha(151,754,651). cha(151,815,771). cha(151,865,867). cha(151,920,969). cha(151,947,1028). cha(151,1073,1281). cha(151,1124,1407). cha(151,1167,1506). cha(151,1192,1562). cha(151,1262,1728). cha(151,1291,1818). cha(151,1292,1819). cha(152,21,1943). cha(152,22,532). cha(152,45,458). cha(152,46,509). cha(152,48,688). cha(152,100,1374). cha(152,101,532). cha(152,102,1944). cha(152,145,1374). cha(152,152,1945). cha(152,153,450). cha(152,237,1680). cha(152,384,26). cha(152,393,450). cha(152,394,450). cha(152,459,2206). cha(152,568,278). cha(152,629,2207). cha(152,667,450). cha(152,683,502). cha(152,703,532). cha(152,754,651). cha(152,815,2208). cha(152,865,867). cha(152,920,969). cha(152,947,2209). cha(152,1026,1181). cha(152,1073,2210). cha(152,1124,2211). cha(152,1167,2212). cha(152,1192,1562). cha(152,1257,1680). cha(152,1262,1728). cha(152,1291,1943). cha(152,1292,1945). cha(152,1390,1943). cha(152,1391,1944). cha(152,1392,1945). cha(153,18,578). cha(153,19,623). cha(153,23,418). cha(153,46,509). cha(153,48,688). cha(153,82,1642). cha(153,100,1374). cha(153,145,1374). cha(153,153,319). cha(153,212,1027). cha(153,227,680). cha(153,236,1504). cha(153,280,319). cha(153,754,651). cha(153,865,867). cha(153,920,969). cha(153,1192,1562). cha(153,1262,1728). cha(154,18,578). cha(154,19,623). cha(154,23,418). cha(154,46,509). cha(154,48,688). cha(154,82,1642). cha(154,100,1374). cha(154,145,1374). cha(154,153,319). cha(154,212,1027). cha(154,227,680). cha(154,236,1504). cha(154,280,319). cha(154,754,651). cha(154,865,867). cha(154,920,969). cha(154,1192,1562). cha(154,1262,1728). cha(155,21,1946). cha(155,22,1947). cha(155,46,509). cha(155,48,688). cha(155,100,1374). cha(155,145,1374). cha(155,152,1948). cha(155,153,1949). cha(155,394,1949). cha(155,754,651). cha(155,865,867). cha(155,920,969). cha(155,1192,1562). cha(155,1262,1728). cha(156,24,21). cha(156,25,321). cha(156,46,509). cha(156,48,688). cha(156,100,1374). cha(156,137,1950). cha(156,145,1374). cha(156,153,1594). cha(156,357,21). cha(156,379,21). cha(156,380,21). cha(156,382,23). cha(156,383,23). cha(156,485,2169). cha(156,561,268). cha(156,562,268). cha(156,578,294). cha(156,579,294). cha(156,594,321). cha(156,595,321). cha(156,596,321). cha(156,665,449). cha(156,666,449). cha(156,701,1950). cha(156,702,1950). cha(156,754,651). cha(156,802,748). cha(156,803,748). cha(156,865,867). cha(156,920,969). cha(156,1031,1195). cha(156,1032,1195). cha(156,1064,1267). cha(156,1065,1267). cha(156,1192,1562). cha(156,1262,1728). cha(156,1393,1950). cha(157,37,631). cha(157,43,412). cha(157,46,963). cha(157,48,1051). cha(157,52,675). cha(157,86,1045). cha(157,88,65). cha(157,90,69). cha(157,91,1066). cha(157,100,1951). cha(157,107,1093). cha(157,116,69). cha(157,145,1952). cha(157,151,69). cha(157,153,1590). cha(157,154,65). cha(157,155,1351). cha(157,156,675). cha(157,158,1676). cha(157,215,936). cha(157,222,1045). cha(157,224,1174). cha(157,241,412). cha(157,273,1066). cha(157,290,1045). cha(157,302,1093). cha(157,314,1045). cha(157,342,675). cha(157,343,936). cha(157,348,1667). cha(157,349,1174). cha(157,361,636). cha(157,404,65). cha(157,405,65). cha(157,406,65). cha(157,408,69). cha(157,450,1045). cha(157,613,636). cha(157,614,636). cha(157,746,636). cha(157,754,651). cha(157,796,2213). cha(157,797,2213). cha(157,798,2213). cha(157,865,867). cha(157,904,936). cha(157,915,963). cha(157,916,963). cha(157,917,963). cha(157,920,969). cha(157,958,1051). cha(157,959,1051). cha(157,960,1051). cha(157,967,1066). cha(157,968,1066). cha(157,1019,1174). cha(157,1105,1351). cha(157,1192,1562). cha(157,1203,1590). cha(157,1244,1667). cha(157,1245,1667). cha(157,1246,1667). cha(157,1247,1667). cha(157,1254,1676). cha(157,1255,1676). cha(157,1262,1728). cha(157,1395,1952). cha(158,46,509). cha(158,48,688). cha(158,100,1374). cha(158,145,1374). cha(158,153,1594). cha(158,359,1953). cha(158,360,1954). cha(158,754,651). cha(158,865,867). cha(158,920,969). cha(158,1192,1562). cha(158,1262,1728). cha(158,1396,1953). cha(158,1397,1954). cha(159,24,1955). cha(159,25,1956). cha(159,46,509). cha(159,48,688). cha(159,100,1374). cha(159,137,1360). cha(159,145,1374). cha(159,153,1594). cha(159,485,2214). cha(159,702,1360). cha(159,754,651). cha(159,865,867). cha(159,920,969). cha(159,1192,1562). cha(159,1262,1728). cha(160,46,509). cha(160,48,688). cha(160,100,1374). cha(160,145,1374). cha(160,153,1957). cha(160,381,22). cha(160,754,651). cha(160,865,867). cha(160,920,969). cha(160,1192,1562). cha(160,1262,1728). cha(160,1398,1957). cha(161,18,578). cha(161,19,623). cha(161,23,418). cha(161,46,509). cha(161,48,688). cha(161,82,1642). cha(161,100,1374). cha(161,145,1374). cha(161,153,319). cha(161,212,1027). cha(161,227,680). cha(161,236,1504). cha(161,280,319). cha(161,754,651). cha(161,865,867). cha(161,920,969). cha(161,1192,1562). cha(161,1262,1728). cha(162,46,509). cha(162,48,688). cha(162,100,1374). cha(162,145,1374). cha(162,153,1594). cha(162,754,651). cha(162,865,867). cha(162,920,969). cha(162,1192,1562). cha(162,1262,1728). cha(163,46,509). cha(163,48,688). cha(163,76,1005). cha(163,87,733). cha(163,100,1374). cha(163,145,1374). cha(163,153,1594). cha(163,754,651). cha(163,794,733). cha(163,865,867). cha(163,920,969). cha(163,923,2215). cha(163,1192,1562). cha(163,1262,1728). cha(164,46,1958). cha(164,48,1959). cha(164,49,379). cha(164,100,1374). cha(164,117,178). cha(164,145,1374). cha(164,153,1960). cha(164,185,1170). cha(164,486,178). cha(164,754,651). cha(164,865,867). cha(164,920,969). cha(164,1192,1562). cha(164,1262,1728). cha(164,1399,1958). cha(164,1400,1958). cha(164,1401,1959). cha(164,1402,1959). cha(164,1403,1960). cha(165,46,509). cha(165,48,688). cha(165,100,1374). cha(165,145,1374). cha(165,153,1594). cha(165,754,651). cha(165,865,867). cha(165,920,969). cha(165,1192,1562). cha(165,1262,1728). cha(166,46,509). cha(166,48,688). cha(166,100,1374). cha(166,128,32). cha(166,129,392). cha(166,130,849). cha(166,145,1374). cha(166,153,1594). cha(166,229,962). cha(166,230,1280). cha(166,231,1541). cha(166,232,466). cha(166,233,1087). cha(166,234,485). cha(166,345,1582). cha(166,754,651). cha(166,865,867). cha(166,920,969). cha(166,1192,1562). cha(166,1262,1728). cha(167,46,509). cha(167,48,688). cha(167,100,1374). cha(167,145,1374). cha(167,153,1594). cha(167,754,651). cha(167,836,812). cha(167,865,867). cha(167,920,969). cha(167,944,1017). cha(167,1192,1562). cha(167,1262,1728). cha(168,46,509). cha(168,48,688). cha(168,87,437). cha(168,89,153). cha(168,100,1374). cha(168,145,1374). cha(168,153,1594). cha(168,474,153). cha(168,630,382). cha(168,657,437). cha(168,754,651). cha(168,865,867). cha(168,920,969). cha(168,922,971). cha(168,923,971). cha(168,1192,1562). cha(168,1262,1728). cha(169,43,412). cha(169,46,963). cha(169,48,1051). cha(169,52,1961). cha(169,86,1045). cha(169,88,1889). cha(169,90,1962). cha(169,91,1332). cha(169,100,1374). cha(169,107,1093). cha(169,116,1962). cha(169,145,1374). cha(169,153,1590). cha(169,155,1351). cha(169,215,1891). cha(169,222,1045). cha(169,224,1177). cha(169,241,412). cha(169,290,1045). cha(169,302,1093). cha(169,314,1045). cha(169,342,1961). cha(169,343,1891). cha(169,348,1892). cha(169,349,1177). cha(169,361,1963). cha(169,404,1889). cha(169,405,1889). cha(169,406,1889). cha(169,408,1962). cha(169,450,1045). cha(169,613,1963). cha(169,614,1963). cha(169,754,651). cha(169,796,2191). cha(169,797,2191). cha(169,798,2191). cha(169,865,867). cha(169,915,963). cha(169,916,963). cha(169,917,963). cha(169,920,969). cha(169,958,1051). cha(169,959,1051). cha(169,960,1051). cha(169,967,1332). cha(169,968,1332). cha(169,1105,1351). cha(169,1192,1562). cha(169,1203,1590). cha(169,1245,1892). cha(169,1246,1892). cha(169,1247,1892). cha(169,1254,2193). cha(169,1255,2193). cha(169,1262,1728). cha(170,46,509). cha(170,48,688). cha(170,100,1374). cha(170,145,1374). cha(170,153,1594). cha(170,754,651). cha(170,865,867). cha(170,920,969). cha(170,1192,1562). cha(170,1262,1728). cha(171,29,116). cha(171,39,445). cha(171,40,36). cha(171,46,509). cha(171,48,688). cha(171,100,1374). cha(171,145,1374). cha(171,153,1594). cha(171,172,1305). cha(171,173,71). cha(171,174,374). cha(171,332,1474). cha(171,336,1600). cha(171,356,820). cha(171,754,651). cha(171,865,867). cha(171,920,969). cha(171,1192,1562). cha(171,1262,1728). cha(172,46,777). cha(172,48,687). cha(172,100,1374). cha(172,145,1374). cha(172,153,1594). cha(172,329,684). cha(172,754,651). cha(172,769,684). cha(172,772,687). cha(172,818,777). cha(172,865,867). cha(172,920,969). cha(172,1192,1562). cha(172,1262,1728). cha(173,46,509). cha(173,48,688). cha(173,100,1374). cha(173,145,1374). cha(173,153,1594). cha(173,754,651). cha(173,865,867). cha(173,920,969). cha(173,1192,1562). cha(173,1262,1728). cha(174,31,1964). cha(174,46,509). cha(174,48,688). cha(174,100,1374). cha(174,145,1374). cha(174,153,1594). cha(174,754,651). cha(174,865,867). cha(174,920,969). cha(174,1192,1562). cha(174,1262,1728). cha(175,46,509). cha(175,48,688). cha(175,100,1374). cha(175,145,1374). cha(175,153,1594). cha(175,754,651). cha(175,865,867). cha(175,920,969). cha(175,1192,1562). cha(175,1262,1728). cha(176,46,509). cha(176,48,688). cha(176,100,1374). cha(176,120,1196). cha(176,121,1965). cha(176,122,1626). cha(176,145,1374). cha(176,153,1594). cha(176,213,1929). cha(176,277,468). cha(176,754,651). cha(176,865,867). cha(176,920,969). cha(176,1192,1562). cha(176,1262,1728). cha(177,32,139). cha(177,46,509). cha(177,48,688). cha(177,100,1374). cha(177,145,1374). cha(177,153,1594). cha(177,754,651). cha(177,865,867). cha(177,920,969). cha(177,1192,1562). cha(177,1232,1634). cha(177,1262,1728). cha(178,46,509). cha(178,48,688). cha(178,100,1374). cha(178,145,1374). cha(178,153,1594). cha(178,754,651). cha(178,865,867). cha(178,920,969). cha(178,1192,1562). cha(178,1262,1728). cha(179,46,509). cha(179,48,688). cha(179,55,155). cha(179,62,864). cha(179,64,731). cha(179,98,1214). cha(179,99,1679). cha(179,100,1374). cha(179,112,44). cha(179,114,1140). cha(179,145,1374). cha(179,153,1594). cha(179,254,357). cha(179,278,695). cha(179,754,651). cha(179,865,867). cha(179,920,969). cha(179,1192,1562). cha(179,1262,1728). cha(180,46,509). cha(180,48,688). cha(180,53,49). cha(180,54,1459). cha(180,96,922). cha(180,100,1374). cha(180,145,1374). cha(180,153,1594). cha(180,754,651). cha(180,865,867). cha(180,920,969). cha(180,1192,1562). cha(180,1262,1728). cha(181,41,85). cha(181,46,509). cha(181,48,688). cha(181,60,215). cha(181,100,1374). cha(181,103,1425). cha(181,145,1374). cha(181,153,1594). cha(181,399,55). cha(181,420,85). cha(181,519,215). cha(181,754,651). cha(181,865,867). cha(181,920,969). cha(181,1132,1425). cha(181,1192,1562). cha(181,1262,1728). cha(182,18,578). cha(182,19,623). cha(182,23,418). cha(182,46,509). cha(182,48,688). cha(182,82,1642). cha(182,100,1374). cha(182,145,1374). cha(182,153,319). cha(182,212,1027). cha(182,227,680). cha(182,236,1504). cha(182,280,319). cha(182,754,651). cha(182,865,867). cha(182,920,969). cha(182,1192,1562). cha(182,1262,1728). cha(183,46,1966). cha(183,48,1967). cha(183,59,506). cha(183,65,1355). cha(183,100,1179). cha(183,145,277). cha(183,146,814). cha(183,147,367). cha(183,148,606). cha(183,149,954). cha(183,150,1192). cha(183,153,1968). cha(183,175,1567). cha(183,208,277). cha(183,216,1559). cha(183,262,187). cha(183,263,713). cha(183,295,1617). cha(183,350,942). cha(183,351,620). cha(183,567,277). cha(183,620,367). cha(183,685,506). cha(183,736,610). cha(183,754,651). cha(183,785,713). cha(183,865,867). cha(183,920,969). cha(183,1057,1251). cha(183,1192,1562). cha(183,1195,1567). cha(183,1262,1728). cha(183,1404,1966). cha(183,1405,1967). cha(183,1406,1968). cha(184,34,1969). cha(184,35,1970). cha(184,46,509). cha(184,48,688). cha(184,77,1971). cha(184,79,1972). cha(184,84,1973). cha(184,100,1374). cha(184,136,1974). cha(184,145,1971). cha(184,153,1594). cha(184,159,1975). cha(184,160,1976). cha(184,161,1977). cha(184,754,651). cha(184,865,867). cha(184,920,969). cha(184,1192,1562). cha(184,1262,1728). cha(185,18,578). cha(185,19,623). cha(185,23,418). cha(185,46,509). cha(185,48,688). cha(185,82,1642). cha(185,100,1374). cha(185,145,1374). cha(185,153,319). cha(185,212,1027). cha(185,227,680). cha(185,236,1504). cha(185,280,319). cha(185,754,651). cha(185,865,867). cha(185,920,969). cha(185,1192,1562). cha(185,1262,1728). cha(186,34,394). cha(186,35,135). cha(186,46,1978). cha(186,48,1979). cha(186,77,912). cha(186,79,700). cha(186,84,444). cha(186,100,1346). cha(186,136,1058). cha(186,145,912). cha(186,153,1594). cha(186,159,59). cha(186,160,331). cha(186,161,710). cha(186,402,59). cha(186,463,135). cha(186,601,331). cha(186,635,394). cha(186,663,444). cha(186,754,651). cha(186,776,700). cha(186,783,710). cha(186,865,867). cha(186,889,912). cha(186,920,969). cha(186,964,1058). cha(186,1192,1562). cha(186,1262,1728). cha(186,1407,1978). cha(186,1408,1979). cha(187,36,1809). cha(187,46,509). cha(187,48,688). cha(187,100,1374). cha(187,145,1374). cha(187,153,1594). cha(187,246,1810). cha(187,265,1811). cha(187,275,1167). cha(187,358,1810). cha(187,485,2166). cha(187,702,2167). cha(187,754,651). cha(187,865,867). cha(187,920,969). cha(187,1192,1562). cha(187,1262,1728). cha(187,1284,1811). cha(188,46,509). cha(188,48,688). cha(188,100,1374). cha(188,145,1374). cha(188,153,1594). cha(188,754,651). cha(188,865,867). cha(188,920,969). cha(188,1192,1562). cha(188,1262,1728). cha(189,46,509). cha(189,48,688). cha(189,56,1980). cha(189,92,1981). cha(189,100,1374). cha(189,108,1982). cha(189,132,1983). cha(189,145,1374). cha(189,153,1594). cha(189,210,1984). cha(189,369,2216). cha(189,479,166). cha(189,480,166). cha(189,485,1982). cha(189,604,339). cha(189,605,339). cha(189,655,2217). cha(189,674,958). cha(189,698,528). cha(189,699,528). cha(189,717,562). cha(189,718,562). cha(189,724,1406). cha(189,754,651). cha(189,858,857). cha(189,859,857). cha(189,865,867). cha(189,893,916). cha(189,894,916). cha(189,912,958). cha(189,920,969). cha(189,931,995). cha(189,932,995). cha(189,1123,1406). cha(189,1192,1562). cha(189,1262,1728). cha(189,1266,1980). cha(189,1268,1981). cha(189,1269,1982). cha(189,1270,1983). cha(189,1272,1984). cha(189,1409,1983). cha(189,1410,1984). cha(190,46,509). cha(190,48,688). cha(190,56,1985). cha(190,63,1009). cha(190,92,1986). cha(190,100,1374). cha(190,108,883). cha(190,145,1374). cha(190,153,1594). cha(190,177,67). cha(190,178,946). cha(190,179,1265). cha(190,180,662). cha(190,181,1069). cha(190,191,587). cha(190,210,1987). cha(190,217,1447). cha(190,270,861). cha(190,271,1042). cha(190,331,883). cha(190,341,1660). cha(190,369,1265). cha(190,480,2218). cha(190,485,883). cha(190,605,2219). cha(190,655,67). cha(190,674,662). cha(190,699,2220). cha(190,718,946). cha(190,724,2221). cha(190,754,651). cha(190,859,2222). cha(190,865,867). cha(190,874,883). cha(190,894,2223). cha(190,920,969). cha(190,932,2224). cha(190,1171,1516). cha(190,1172,1516). cha(190,1192,1562). cha(190,1262,1728). cha(190,1270,2188). cha(190,1411,1985). cha(190,1412,1985). cha(190,1413,1986). cha(190,1414,1986). cha(190,1415,1987). cha(190,1416,1987). cha(191,46,509). cha(191,48,688). cha(191,76,1005). cha(191,87,733). cha(191,89,439). cha(191,100,1374). cha(191,145,1374). cha(191,153,1594). cha(191,659,439). cha(191,754,651). cha(191,794,733). cha(191,865,867). cha(191,920,969). cha(191,923,2215). cha(191,1192,1562). cha(191,1262,1728). cha(192,18,1325). cha(192,19,623). cha(192,23,418). cha(192,46,509). cha(192,48,688). cha(192,82,1642). cha(192,100,1374). cha(192,145,1374). cha(192,153,319). cha(192,212,1027). cha(192,227,680). cha(192,236,1504). cha(192,280,319). cha(192,754,651). cha(192,865,867). cha(192,920,969). cha(192,1092,1325). cha(192,1192,1562). cha(192,1262,1728). cha(193,46,509). cha(193,48,688). cha(193,100,1374). cha(193,145,1374). cha(193,153,1988). cha(193,171,1989). cha(193,296,1990). cha(193,564,274). cha(193,621,368). cha(193,754,651). cha(193,773,692). cha(193,865,867). cha(193,920,969). cha(193,1056,1250). cha(193,1109,1367). cha(193,1157,1488). cha(193,1192,1562). cha(193,1262,1728). cha(193,1417,1988). cha(194,46,509). cha(194,48,688). cha(194,100,1374). cha(194,145,1374). cha(194,153,1594). cha(194,754,651). cha(194,865,867). cha(194,920,969). cha(194,1192,1562). cha(194,1262,1728). cha(195,41,77). cha(195,46,509). cha(195,48,688). cha(195,60,193). cha(195,100,1374). cha(195,103,1428). cha(195,145,1374). cha(195,153,1594). cha(195,412,77). cha(195,498,193). cha(195,754,651). cha(195,865,867). cha(195,920,969). cha(195,1135,1428). cha(195,1192,1562). cha(195,1262,1728). cha(196,46,509). cha(196,48,688). cha(196,100,1374). cha(196,145,1374). cha(196,153,1594). cha(196,754,651). cha(196,820,783). cha(196,865,867). cha(196,920,969). cha(196,1192,1562). cha(196,1262,1728). cha(197,41,78). cha(197,46,509). cha(197,48,688). cha(197,60,245). cha(197,100,1374). cha(197,103,1433). cha(197,145,1374). cha(197,153,1594). cha(197,413,78). cha(197,549,245). cha(197,754,651). cha(197,865,867). cha(197,920,969). cha(197,1192,1562). cha(197,1262,1728). cha(198,41,79). cha(198,46,509). cha(198,48,688). cha(198,60,201). cha(198,100,1374). cha(198,103,1435). cha(198,145,1374). cha(198,153,1594). cha(198,414,79). cha(198,506,201). cha(198,754,651). cha(198,865,867). cha(198,920,969). cha(198,1131,1435). cha(198,1192,1562). cha(198,1262,1728). cha(199,41,80). cha(199,46,509). cha(199,48,688). cha(199,60,229). cha(199,100,1374). cha(199,103,1430). cha(199,145,1374). cha(199,153,1594). cha(199,415,80). cha(199,533,229). cha(199,754,651). cha(199,865,867). cha(199,920,969). cha(199,1137,1430). cha(199,1192,1562). cha(199,1262,1728). cha(200,41,81). cha(200,46,509). cha(200,48,688). cha(200,60,233). cha(200,100,1374). cha(200,103,1433). cha(200,145,1374). cha(200,153,1594). cha(200,416,81). cha(200,537,233). cha(200,754,651). cha(200,865,867). cha(200,920,969). cha(200,1192,1562). cha(200,1262,1728). cha(201,41,101). cha(201,42,101). cha(201,46,509). cha(201,48,688). cha(201,60,228). cha(201,61,1607). cha(201,100,1374). cha(201,103,1433). cha(201,145,1374). cha(201,153,1594). cha(201,532,228). cha(201,754,651). cha(201,865,867). cha(201,920,969). cha(201,1192,1562). cha(201,1262,1728). cha(202,41,82). cha(202,46,509). cha(202,48,688). cha(202,60,232). cha(202,100,1374). cha(202,103,1433). cha(202,145,1374). cha(202,153,1594). cha(202,417,82). cha(202,536,232). cha(202,754,651). cha(202,865,867). cha(202,920,969). cha(202,1192,1562). cha(202,1262,1728). cha(203,41,83). cha(203,46,509). cha(203,48,688). cha(203,60,204). cha(203,100,1374). cha(203,103,1433). cha(203,145,1374). cha(203,153,1594). cha(203,418,83). cha(203,509,204). cha(203,754,651). cha(203,865,867). cha(203,920,969). cha(203,1192,1562). cha(203,1262,1728). cha(204,41,86). cha(204,46,509). cha(204,48,688). cha(204,60,198). cha(204,100,1374). cha(204,103,1433). cha(204,145,1374). cha(204,153,1594). cha(204,421,86). cha(204,503,198). cha(204,754,651). cha(204,865,867). cha(204,920,969). cha(204,1192,1562). cha(204,1262,1728). cha(205,41,87). cha(205,46,509). cha(205,48,688). cha(205,60,224). cha(205,100,1374). cha(205,103,1433). cha(205,145,1374). cha(205,153,1594). cha(205,422,87). cha(205,529,224). cha(205,754,651). cha(205,865,867). cha(205,920,969). cha(205,1192,1562). cha(205,1262,1728). cha(206,41,88). cha(206,46,509). cha(206,48,688). cha(206,60,194). cha(206,100,1374). cha(206,103,1433). cha(206,145,1374). cha(206,153,1594). cha(206,423,88). cha(206,499,194). cha(206,754,651). cha(206,865,867). cha(206,910,953). cha(206,920,969). cha(206,936,1000). cha(206,1192,1562). cha(206,1243,1665). cha(206,1262,1728). cha(207,41,89). cha(207,46,509). cha(207,48,688). cha(207,60,225). cha(207,100,1374). cha(207,103,1433). cha(207,145,1374). cha(207,153,1594). cha(207,424,89). cha(207,526,225). cha(207,754,651). cha(207,865,867). cha(207,920,969). cha(207,1192,1562). cha(207,1262,1728). cha(208,41,91). cha(208,46,509). cha(208,48,688). cha(208,60,197). cha(208,100,1374). cha(208,103,1427). cha(208,145,1374). cha(208,153,1594). cha(208,425,91). cha(208,502,197). cha(208,754,651). cha(208,865,867). cha(208,920,969). cha(208,1134,1427). cha(208,1192,1562). cha(208,1262,1728). cha(209,41,92). cha(209,46,509). cha(209,48,688). cha(209,60,239). cha(209,100,1374). cha(209,103,1423). cha(209,145,1374). cha(209,153,1594). cha(209,426,92). cha(209,543,239). cha(209,754,651). cha(209,865,867). cha(209,920,969). cha(209,1129,1423). cha(209,1192,1562). cha(209,1262,1728). cha(210,41,93). cha(210,46,509). cha(210,48,688). cha(210,60,202). cha(210,100,1374). cha(210,103,1433). cha(210,145,1374). cha(210,153,1594). cha(210,427,93). cha(210,507,202). cha(210,754,651). cha(210,865,867). cha(210,920,969). cha(210,1192,1562). cha(210,1262,1728). cha(211,41,94). cha(211,46,509). cha(211,48,688). cha(211,60,234). cha(211,100,1374). cha(211,103,1433). cha(211,145,1374). cha(211,153,1594). cha(211,428,94). cha(211,538,234). cha(211,754,651). cha(211,865,867). cha(211,920,969). cha(211,1192,1562). cha(211,1262,1728). cha(212,41,95). cha(212,46,509). cha(212,48,688). cha(212,60,211). cha(212,100,1374). cha(212,103,1433). cha(212,145,1374). cha(212,153,1594). cha(212,429,95). cha(212,515,211). cha(212,754,651). cha(212,865,867). cha(212,920,969). cha(212,1192,1562). cha(212,1262,1728). cha(213,41,96). cha(213,46,509). cha(213,48,688). cha(213,60,203). cha(213,100,1374). cha(213,103,1433). cha(213,145,1374). cha(213,153,1594). cha(213,430,96). cha(213,508,203). cha(213,754,651). cha(213,865,867). cha(213,920,969). cha(213,1192,1562). cha(213,1262,1728). cha(214,41,98). cha(214,46,509). cha(214,48,688). cha(214,60,235). cha(214,100,1374). cha(214,103,1433). cha(214,145,1374). cha(214,153,1594). cha(214,432,98). cha(214,539,235). cha(214,754,651). cha(214,865,867). cha(214,920,969). cha(214,1192,1562). cha(214,1262,1728). cha(215,41,100). cha(215,46,509). cha(215,48,688). cha(215,60,222). cha(215,100,1374). cha(215,103,1429). cha(215,145,1374). cha(215,153,1594). cha(215,434,100). cha(215,527,222). cha(215,754,651). cha(215,865,867). cha(215,920,969). cha(215,1136,1429). cha(215,1192,1562). cha(215,1262,1728). cha(216,41,102). cha(216,46,509). cha(216,48,688). cha(216,60,190). cha(216,100,1374). cha(216,103,1432). cha(216,145,1374). cha(216,153,1594). cha(216,435,102). cha(216,495,190). cha(216,754,651). cha(216,865,867). cha(216,920,969). cha(216,1139,1432). cha(216,1192,1562). cha(216,1194,1566). cha(216,1262,1728). cha(217,41,103). cha(217,46,509). cha(217,48,688). cha(217,60,195). cha(217,100,1374). cha(217,103,1426). cha(217,145,1374). cha(217,153,1594). cha(217,436,103). cha(217,500,195). cha(217,754,651). cha(217,865,867). cha(217,920,969). cha(217,1133,1426). cha(217,1192,1562). cha(217,1262,1728). cha(218,41,104). cha(218,42,104). cha(218,46,509). cha(218,48,688). cha(218,60,240). cha(218,61,1608). cha(218,100,1374). cha(218,103,1433). cha(218,145,1374). cha(218,153,1594). cha(218,437,104). cha(218,532,240). cha(218,544,240). cha(218,754,651). cha(218,865,867). cha(218,920,969). cha(218,1192,1562). cha(218,1211,1608). cha(218,1262,1728). cha(219,41,105). cha(219,46,509). cha(219,48,688). cha(219,60,209). cha(219,100,1374). cha(219,103,1433). cha(219,145,1374). cha(219,153,1594). cha(219,438,105). cha(219,514,209). cha(219,677,486). cha(219,735,609). cha(219,754,651). cha(219,865,867). cha(219,869,876). cha(219,920,969). cha(219,1192,1562). cha(219,1262,1728). cha(220,41,106). cha(220,46,509). cha(220,48,688). cha(220,60,188). cha(220,100,1374). cha(220,103,1433). cha(220,145,1374). cha(220,153,1594). cha(220,439,106). cha(220,493,188). cha(220,754,651). cha(220,865,867). cha(220,920,969). cha(220,1192,1562). cha(220,1262,1728). cha(221,41,107). cha(221,46,509). cha(221,48,688). cha(221,60,218). cha(221,100,1374). cha(221,103,1433). cha(221,145,1374). cha(221,153,1594). cha(221,440,107). cha(221,522,218). cha(221,754,651). cha(221,865,867). cha(221,920,969). cha(221,1192,1562). cha(221,1262,1728). cha(222,41,109). cha(222,46,509). cha(222,48,688). cha(222,60,230). cha(222,100,1374). cha(222,103,1434). cha(222,145,1374). cha(222,153,1594). cha(222,442,109). cha(222,534,230). cha(222,754,651). cha(222,865,867). cha(222,920,969). cha(222,1140,1434). cha(222,1192,1562). cha(222,1262,1728). cha(223,41,110). cha(223,46,509). cha(223,48,688). cha(223,60,192). cha(223,100,1374). cha(223,103,1433). cha(223,145,1374). cha(223,153,1594). cha(223,443,110). cha(223,497,192). cha(223,754,651). cha(223,865,867). cha(223,920,969). cha(223,1192,1562). cha(223,1262,1728). cha(224,41,111). cha(224,46,509). cha(224,48,688). cha(224,60,241). cha(224,100,1374). cha(224,103,1433). cha(224,145,1374). cha(224,153,1594). cha(224,421,111). cha(224,444,111). cha(224,503,241). cha(224,545,241). cha(224,754,651). cha(224,865,867). cha(224,920,969). cha(224,1192,1562). cha(224,1262,1728). cha(225,41,112). cha(225,46,509). cha(225,48,688). cha(225,60,208). cha(225,100,1374). cha(225,103,1433). cha(225,145,1374). cha(225,153,1594). cha(225,445,112). cha(225,513,208). cha(225,754,651). cha(225,865,867). cha(225,920,969). cha(225,1192,1562). cha(225,1262,1728). cha(226,41,113). cha(226,46,509). cha(226,48,688). cha(226,60,217). cha(226,100,1374). cha(226,103,1433). cha(226,145,1374). cha(226,153,1594). cha(226,446,113). cha(226,521,217). cha(226,754,651). cha(226,865,867). cha(226,920,969). cha(226,1192,1562). cha(226,1262,1728). cha(227,46,1991). cha(227,48,1992). cha(227,100,1374). cha(227,145,1374). cha(227,153,1993). cha(227,396,2225). cha(227,447,114). cha(227,457,128). cha(227,733,605). cha(227,754,651). cha(227,860,858). cha(227,865,867). cha(227,920,969). cha(227,999,2226). cha(227,1050,1238). cha(227,1051,1238). cha(227,1192,1562). cha(227,1262,1728). cha(227,1418,1991). cha(227,1419,1992). cha(227,1420,1993). cha(228,44,1994). cha(228,46,509). cha(228,48,688). cha(228,100,1374). cha(228,145,1374). cha(228,153,1594). cha(228,754,651). cha(228,865,867). cha(228,920,969). cha(228,1192,1562). cha(228,1262,1728). cha(229,18,578). cha(229,19,623). cha(229,23,418). cha(229,46,509). cha(229,48,688). cha(229,82,1642). cha(229,100,1374). cha(229,145,1374). cha(229,153,319). cha(229,212,1027). cha(229,227,680). cha(229,236,1504). cha(229,280,319). cha(229,754,651). cha(229,865,867). cha(229,920,969). cha(229,1192,1562). cha(229,1262,1728). cha(230,43,412). cha(230,46,963). cha(230,48,1051). cha(230,52,1040). cha(230,86,117). cha(230,88,1889). cha(230,90,723). cha(230,91,1332). cha(230,100,1374). cha(230,107,1629). cha(230,116,723). cha(230,145,1374). cha(230,153,1590). cha(230,155,1995). cha(230,215,1144). cha(230,222,117). cha(230,224,1176). cha(230,241,412). cha(230,290,117). cha(230,302,1629). cha(230,314,117). cha(230,342,1040). cha(230,343,1144). cha(230,348,1892). cha(230,349,1176). cha(230,361,1963). cha(230,404,1889). cha(230,405,1889). cha(230,406,1889). cha(230,408,723). cha(230,449,117). cha(230,450,117). cha(230,613,1963). cha(230,614,1963). cha(230,754,651). cha(230,790,723). cha(230,796,2191). cha(230,797,2191). cha(230,798,2191). cha(230,865,867). cha(230,915,963). cha(230,916,963). cha(230,917,963). cha(230,920,969). cha(230,953,1040). cha(230,958,1051). cha(230,959,1051). cha(230,960,1051). cha(230,967,1332). cha(230,968,1332). cha(230,1001,1144). cha(230,1022,1176). cha(230,1105,1995). cha(230,1192,1562). cha(230,1203,1590). cha(230,1227,1629). cha(230,1245,1892). cha(230,1246,1892). cha(230,1247,1892). cha(230,1254,2193). cha(230,1255,2193). cha(230,1262,1728). cha(230,1421,1995). cha(231,46,509). cha(231,48,688). cha(231,51,1996). cha(231,87,1997). cha(231,89,1996). cha(231,100,1374). cha(231,145,1374). cha(231,153,1594). cha(231,214,1998). cha(231,242,1997). cha(231,244,1999). cha(231,303,2000). cha(231,338,2001). cha(231,754,651). cha(231,865,867). cha(231,920,969). cha(231,923,2001). cha(231,1192,1562). cha(231,1262,1728). cha(232,46,509). cha(232,48,688). cha(232,100,1374). cha(232,145,1374). cha(232,153,2002). cha(232,452,120). cha(232,453,120). cha(232,553,257). cha(232,647,422). cha(232,754,651). cha(232,811,766). cha(232,829,804). cha(232,830,804). cha(232,835,811). cha(232,865,867). cha(232,920,969). cha(232,1192,1562). cha(232,1262,1728). cha(232,1422,2002). cha(233,18,578). cha(233,19,623). cha(233,23,418). cha(233,46,509). cha(233,48,688). cha(233,82,1642). cha(233,100,1374). cha(233,145,1374). cha(233,153,319). cha(233,212,1027). cha(233,227,680). cha(233,236,1504). cha(233,280,319). cha(233,754,651). cha(233,865,867). cha(233,920,969). cha(233,1192,1562). cha(233,1262,1728). cha(234,46,509). cha(234,48,688). cha(234,100,1374). cha(234,105,580). cha(234,106,666). cha(234,145,1374). cha(234,153,2003). cha(234,157,608). cha(234,256,1349). cha(234,257,1090). cha(234,258,122). cha(234,259,1381). cha(234,754,651). cha(234,865,867). cha(234,920,969). cha(234,1192,1562). cha(234,1262,1728). cha(234,1423,2003). cha(235,18,578). cha(235,19,623). cha(235,23,418). cha(235,46,509). cha(235,48,688). cha(235,82,1642). cha(235,100,1374). cha(235,145,1374). cha(235,153,319). cha(235,212,1027). cha(235,227,680). cha(235,236,1504). cha(235,280,319). cha(235,754,651). cha(235,865,867). cha(235,920,969). cha(235,1192,1562). cha(235,1262,1728). cha(236,18,578). cha(236,19,623). cha(236,23,418). cha(236,46,509). cha(236,48,688). cha(236,82,1642). cha(236,100,1374). cha(236,145,1374). cha(236,153,319). cha(236,212,1027). cha(236,227,680). cha(236,236,1504). cha(236,280,319). cha(236,754,651). cha(236,865,867). cha(236,920,969). cha(236,1192,1562). cha(236,1262,1728). cha(237,43,412). cha(237,46,963). cha(237,48,1051). cha(237,52,1039). cha(237,86,1101). cha(237,88,1285). cha(237,90,770). cha(237,91,2004). cha(237,100,2005). cha(237,107,1628). cha(237,116,770). cha(237,145,2006). cha(237,153,1590). cha(237,155,1351). cha(237,215,1146). cha(237,222,1101). cha(237,224,1175). cha(237,241,412). cha(237,290,1101). cha(237,302,1628). cha(237,314,1101). cha(237,342,1039). cha(237,343,1146). cha(237,348,2007). cha(237,349,1175). cha(237,361,2008). cha(237,362,770). cha(237,363,1285). cha(237,404,1285). cha(237,405,1285). cha(237,406,1285). cha(237,408,770). cha(237,450,1101). cha(237,613,2008). cha(237,614,2008). cha(237,754,651). cha(237,796,2191). cha(237,797,2191). cha(237,798,2191). cha(237,865,867). cha(237,915,963). cha(237,916,963). cha(237,917,963). cha(237,920,969). cha(237,951,1039). cha(237,952,1039). cha(237,958,1051). cha(237,959,1051). cha(237,960,1051). cha(237,967,2004). cha(237,968,2004). cha(237,977,1101). cha(237,1003,1146). cha(237,1004,1146). cha(237,1020,1175). cha(237,1021,1175). cha(237,1105,1351). cha(237,1192,1562). cha(237,1203,1590). cha(237,1225,1628). cha(237,1226,1628). cha(237,1245,2007). cha(237,1246,2007). cha(237,1247,2007). cha(237,1254,2227). cha(237,1255,2227). cha(237,1262,1728). cha(237,1424,2004). cha(237,1426,2006). cha(237,1427,2007). cha(237,1428,2008). cha(238,46,509). cha(238,48,688). cha(238,100,1374). cha(238,145,1374). cha(238,153,1594). cha(238,754,651). cha(238,865,867). cha(238,920,969). cha(238,1192,1562). cha(238,1262,1728). cha(239,46,509). cha(239,48,688). cha(239,100,1374). cha(239,145,1374). cha(239,153,1594). cha(239,754,651). cha(239,865,867). cha(239,920,969). cha(239,1192,1562). cha(239,1262,1728). cha(240,46,509). cha(240,48,688). cha(240,100,1374). cha(240,145,1374). cha(240,153,1594). cha(240,754,651). cha(240,865,867). cha(240,920,969). cha(240,1192,1562). cha(240,1262,1728). cha(241,34,393). cha(241,35,136). cha(241,46,509). cha(241,48,688). cha(241,77,913). cha(241,79,701). cha(241,84,481). cha(241,100,1201). cha(241,136,1059). cha(241,145,913). cha(241,153,1594). cha(241,159,618). cha(241,160,332). cha(241,161,711). cha(241,464,136). cha(241,602,332). cha(241,634,393). cha(241,675,481). cha(241,740,618). cha(241,754,651). cha(241,777,701). cha(241,784,711). cha(241,865,867). cha(241,890,913). cha(241,920,969). cha(241,965,1059). cha(241,1192,1562). cha(241,1262,1728). cha(242,46,509). cha(242,48,688). cha(242,100,1374). cha(242,145,1374). cha(242,153,1594). cha(242,196,1647). cha(242,359,2009). cha(242,360,2010). cha(242,754,651). cha(242,865,867). cha(242,920,969). cha(242,1192,1562). cha(242,1262,1728). cha(242,1429,2009). cha(242,1430,2010). cha(243,46,509). cha(243,48,688). cha(243,51,151). cha(243,87,809). cha(243,89,151). cha(243,100,1374). cha(243,145,1374). cha(243,153,1594). cha(243,214,929). cha(243,242,809). cha(243,244,2011). cha(243,303,2012). cha(243,338,1496). cha(243,472,151). cha(243,565,275). cha(243,754,651). cha(243,834,809). cha(243,865,867). cha(243,899,929). cha(243,920,969). cha(243,923,1496). cha(243,1162,1496). cha(243,1192,1562). cha(243,1262,1728). cha(243,1431,2011). cha(243,1432,2012). cha(244,18,578). cha(244,19,623). cha(244,23,418). cha(244,46,509). cha(244,48,688). cha(244,82,1642). cha(244,100,1374). cha(244,145,1374). cha(244,153,319). cha(244,212,1027). cha(244,227,680). cha(244,236,1504). cha(244,280,319). cha(244,754,651). cha(244,865,867). cha(244,920,969). cha(244,1192,1562). cha(244,1262,1728). cha(245,46,509). cha(245,48,688). cha(245,50,810). cha(245,51,152). cha(245,87,810). cha(245,89,152). cha(245,100,1374). cha(245,145,1374). cha(245,153,1594). cha(245,199,1065). cha(245,214,928). cha(245,242,810). cha(245,244,1065). cha(245,303,2013). cha(245,338,1495). cha(245,473,152). cha(245,754,651). cha(245,865,867). cha(245,898,928). cha(245,920,969). cha(245,923,1495). cha(245,1161,1495). cha(245,1192,1562). cha(245,1262,1728). cha(245,1433,2013). cha(246,18,578). cha(246,19,623). cha(246,23,418). cha(246,46,509). cha(246,48,688). cha(246,82,1642). cha(246,100,1374). cha(246,145,1374). cha(246,153,319). cha(246,212,1027). cha(246,227,679). cha(246,236,1504). cha(246,280,319). cha(246,754,651). cha(246,766,679). cha(246,865,867). cha(246,920,969). cha(246,1192,1562). cha(246,1262,1728). cha(247,46,509). cha(247,48,688). cha(247,100,1374). cha(247,145,1374). cha(247,153,1594). cha(247,754,651). cha(247,865,867). cha(247,920,969). cha(247,1192,1562). cha(247,1262,1728). cha(248,32,139). cha(248,46,2014). cha(248,48,2015). cha(248,100,1374). cha(248,145,1374). cha(248,153,2016). cha(248,486,2228). cha(248,754,651). cha(248,865,867). cha(248,920,969). cha(248,1192,1562). cha(248,1232,1634). cha(248,1262,1728). cha(248,1400,2014). cha(248,1402,2015). cha(248,1434,2014). cha(248,1435,2015). cha(248,1436,2016). cha(249,46,509). cha(249,48,688). cha(249,68,2017). cha(249,69,2018). cha(249,100,1374). cha(249,110,2019). cha(249,118,2020). cha(249,145,1374). cha(249,153,1594). cha(249,197,2021). cha(249,198,2022). cha(249,243,2023). cha(249,284,2024). cha(249,317,2025). cha(249,318,2026). cha(249,754,651). cha(249,865,867). cha(249,920,969). cha(249,1192,1562). cha(249,1262,1728). cha(250,32,426). cha(250,46,509). cha(250,48,688). cha(250,100,1374). cha(250,145,1374). cha(250,153,1594). cha(250,228,426). cha(250,754,651). cha(250,865,867). cha(250,920,969). cha(250,1192,1562). cha(250,1232,1634). cha(250,1262,1728). cha(251,46,509). cha(251,48,688). cha(251,100,1374). cha(251,145,1374). cha(251,153,1594). cha(251,754,651). cha(251,865,867). cha(251,920,969). cha(251,1192,1562). cha(251,1262,1728). cha(252,46,509). cha(252,48,688). cha(252,100,1374). cha(252,145,1374). cha(252,153,2027). cha(252,754,651). cha(252,865,867). cha(252,920,969). cha(252,1192,1562). cha(252,1262,1728). cha(252,1437,2027). cha(253,46,509). cha(253,48,688). cha(253,100,1374). cha(253,111,175). cha(253,113,303). cha(253,141,892). cha(253,145,1374). cha(253,153,1593). cha(253,164,1689). cha(253,165,2028). cha(253,166,2029). cha(253,167,2030). cha(253,168,2031). cha(253,169,2032). cha(253,200,728). cha(253,218,655). cha(253,239,416). cha(253,247,2033). cha(253,249,2034). cha(253,250,2035). cha(253,251,2036). cha(253,255,2037). cha(253,261,724). cha(253,272,1350). cha(253,293,546). cha(253,306,1473). cha(253,307,1186). cha(253,308,935). cha(253,309,1579). cha(253,310,1558). cha(253,311,1400). cha(253,754,651). cha(253,865,867). cha(253,920,969). cha(253,1192,1562). cha(253,1206,1593). cha(253,1262,1728). cha(254,46,509). cha(254,48,688). cha(254,56,291). cha(254,57,415). cha(254,66,1077). cha(254,92,343). cha(254,100,1374). cha(254,108,415). cha(254,123,253). cha(254,144,291). cha(254,145,1374). cha(254,153,1594). cha(254,210,1077). cha(254,300,343). cha(254,301,1121). cha(254,485,415). cha(254,754,651). cha(254,865,867). cha(254,920,969). cha(254,1192,1562). cha(254,1262,1728). cha(254,1270,2188). cha(255,46,509). cha(255,48,688). cha(255,58,1517). cha(255,67,1089). cha(255,100,1374). cha(255,145,1374). cha(255,153,1594). cha(255,754,651). cha(255,865,867). cha(255,920,969). cha(255,1192,1562). cha(255,1262,1728). cha(256,46,509). cha(256,48,688). cha(256,59,2038). cha(256,100,2039). cha(256,145,782). cha(256,153,1594). cha(256,208,782). cha(256,262,187). cha(256,263,2040). cha(256,620,2229). cha(256,754,651). cha(256,865,867). cha(256,920,969). cha(256,1192,1562). cha(256,1195,2230). cha(256,1262,1728). cha(257,41,90). cha(257,46,509). cha(257,48,688). cha(257,60,191). cha(257,100,1374). cha(257,103,1433). cha(257,145,1374). cha(257,153,1594). cha(257,496,191). cha(257,754,651). cha(257,865,867). cha(257,920,969). cha(257,1192,1562). cha(257,1262,1728). cha(258,41,90). cha(258,46,509). cha(258,48,688). cha(258,60,196). cha(258,100,1374). cha(258,103,1433). cha(258,145,1374). cha(258,153,1594). cha(258,501,196). cha(258,754,651). cha(258,865,867). cha(258,920,969). cha(258,1192,1562). cha(258,1262,1728). cha(259,41,90). cha(259,46,509). cha(259,48,688). cha(259,60,200). cha(259,100,1374). cha(259,103,1433). cha(259,145,1374). cha(259,153,1594). cha(259,505,200). cha(259,754,651). cha(259,865,867). cha(259,920,969). cha(259,1192,1562). cha(259,1224,1625). cha(259,1262,1728). cha(260,41,90). cha(260,46,509). cha(260,48,688). cha(260,60,205). cha(260,100,1374). cha(260,103,1433). cha(260,145,1374). cha(260,153,1594). cha(260,510,205). cha(260,754,651). cha(260,865,867). cha(260,920,969). cha(260,1192,1562). cha(260,1262,1728). cha(261,41,90). cha(261,46,509). cha(261,48,688). cha(261,60,206). cha(261,100,1374). cha(261,103,1433). cha(261,145,1374). cha(261,153,1594). cha(261,511,206). cha(261,754,651). cha(261,865,867). cha(261,920,969). cha(261,1192,1562). cha(261,1262,1728). cha(262,41,90). cha(262,46,509). cha(262,48,688). cha(262,60,207). cha(262,100,1374). cha(262,103,1433). cha(262,145,1374). cha(262,153,1594). cha(262,512,207). cha(262,754,651). cha(262,865,867). cha(262,920,969). cha(262,1192,1562). cha(262,1262,1728). cha(263,41,93). cha(263,46,509). cha(263,48,688). cha(263,60,212). cha(263,100,1374). cha(263,103,1433). cha(263,145,1374). cha(263,153,1594). cha(263,427,93). cha(263,507,212). cha(263,516,212). cha(263,754,651). cha(263,865,867). cha(263,920,969). cha(263,1192,1562). cha(263,1262,1728). cha(264,41,90). cha(264,46,509). cha(264,48,688). cha(264,60,213). cha(264,100,1374). cha(264,103,1433). cha(264,145,1374). cha(264,153,1594). cha(264,517,213). cha(264,754,651). cha(264,865,867). cha(264,920,969). cha(264,1192,1562). cha(264,1262,1728). cha(265,41,79). cha(265,46,509). cha(265,48,688). cha(265,60,214). cha(265,100,1374). cha(265,103,1424). cha(265,145,1374). cha(265,153,1594). cha(265,414,79). cha(265,506,214). cha(265,518,214). cha(265,754,651). cha(265,865,867). cha(265,920,969). cha(265,1130,1424). cha(265,1131,1424). cha(265,1192,1562). cha(265,1262,1728). cha(266,41,90). cha(266,46,509). cha(266,48,688). cha(266,60,216). cha(266,100,1374). cha(266,103,1433). cha(266,145,1374). cha(266,153,1594). cha(266,501,216). cha(266,520,216). cha(266,754,651). cha(266,865,867). cha(266,920,969). cha(266,1192,1562). cha(266,1262,1728). cha(267,41,97). cha(267,46,509). cha(267,48,688). cha(267,60,219). cha(267,100,1374). cha(267,103,1431). cha(267,145,1374). cha(267,153,1594). cha(267,431,97). cha(267,523,219). cha(267,524,219). cha(267,754,651). cha(267,865,867). cha(267,920,969). cha(267,1038,1431). cha(267,1138,1431). cha(267,1192,1562). cha(267,1262,1728). cha(268,41,89). cha(268,46,509). cha(268,48,688). cha(268,60,220). cha(268,100,1374). cha(268,103,1433). cha(268,145,1374). cha(268,153,1594). cha(268,424,89). cha(268,525,220). cha(268,526,220). cha(268,754,651). cha(268,865,867). cha(268,920,969). cha(268,1192,1562). cha(268,1262,1728). cha(269,41,90). cha(269,46,509). cha(269,48,688). cha(269,60,223). cha(269,100,1374). cha(269,103,1433). cha(269,145,1374). cha(269,153,1594). cha(269,528,223). cha(269,754,651). cha(269,865,867). cha(269,920,969). cha(269,1192,1562). cha(269,1262,1728). cha(270,41,90). cha(270,46,509). cha(270,48,688). cha(270,60,227). cha(270,100,1374). cha(270,103,1433). cha(270,145,1374). cha(270,153,1594). cha(270,531,227). cha(270,754,651). cha(270,865,867). cha(270,920,969). cha(270,1192,1562). cha(270,1262,1728). cha(271,41,90). cha(271,46,509). cha(271,48,688). cha(271,60,231). cha(271,100,1374). cha(271,103,1433). cha(271,145,1374). cha(271,153,1594). cha(271,511,231). cha(271,535,231). cha(271,754,651). cha(271,865,867). cha(271,920,969). cha(271,1192,1562). cha(271,1262,1728). cha(272,41,87). cha(272,46,509). cha(272,48,688). cha(272,60,236). cha(272,100,1374). cha(272,103,1433). cha(272,145,1374). cha(272,153,1594). cha(272,422,87). cha(272,529,236). cha(272,540,236). cha(272,754,651). cha(272,865,867). cha(272,920,969). cha(272,1192,1562). cha(272,1262,1728). cha(273,41,90). cha(273,46,509). cha(273,48,688). cha(273,60,237). cha(273,100,1374). cha(273,103,1433). cha(273,145,1374). cha(273,153,1594). cha(273,541,237). cha(273,754,651). cha(273,865,867). cha(273,920,969). cha(273,1192,1562). cha(273,1262,1728). cha(274,41,90). cha(274,46,509). cha(274,48,688). cha(274,60,242). cha(274,100,1374). cha(274,103,1433). cha(274,145,1374). cha(274,153,1594). cha(274,546,242). cha(274,754,651). cha(274,865,867). cha(274,920,969). cha(274,1192,1562). cha(274,1262,1728). cha(275,41,90). cha(275,46,509). cha(275,48,688). cha(275,60,243). cha(275,100,1374). cha(275,103,1433). cha(275,145,1374). cha(275,153,1594). cha(275,547,243). cha(275,754,651). cha(275,865,867). cha(275,920,969). cha(275,1192,1562). cha(275,1262,1728). cha(276,41,90). cha(276,46,509). cha(276,48,688). cha(276,60,244). cha(276,100,1374). cha(276,103,1433). cha(276,145,1374). cha(276,153,1594). cha(276,548,244). cha(276,754,651). cha(276,865,867). cha(276,920,969). cha(276,1192,1562). cha(276,1262,1728). cha(277,46,509). cha(277,48,688). cha(277,100,1374). cha(277,145,1374). cha(277,153,1594). cha(277,194,1073). cha(277,211,1354). cha(277,245,410). cha(277,754,651). cha(277,865,867). cha(277,920,969). cha(277,970,1073). cha(277,1106,1354). cha(277,1192,1562). cha(277,1262,1728). cha(278,46,509). cha(278,48,688). cha(278,100,1374). cha(278,145,1374). cha(278,153,1594). cha(278,189,2041). cha(278,552,255). cha(278,754,651). cha(278,806,759). cha(278,865,867). cha(278,920,969). cha(278,1062,1263). cha(278,1159,1493). cha(278,1192,1562). cha(278,1262,1728). cha(279,18,578). cha(279,19,623). cha(279,23,418). cha(279,46,509). cha(279,48,688). cha(279,82,1642). cha(279,100,1374). cha(279,145,1374). cha(279,153,319). cha(279,212,1027). cha(279,227,680). cha(279,236,1504). cha(279,280,319). cha(279,754,651). cha(279,865,867). cha(279,920,969). cha(279,1192,1562). cha(279,1262,1728). cha(280,46,2042). cha(280,48,2043). cha(280,100,1374). cha(280,145,1374). cha(280,153,1594). cha(280,754,651). cha(280,865,867). cha(280,920,969). cha(280,1090,1320). cha(280,1192,1562). cha(280,1262,1728). cha(280,1439,2042). cha(280,1440,2043). cha(281,46,509). cha(281,48,688). cha(281,100,1374). cha(281,145,1374). cha(281,153,1594). cha(281,330,2044). cha(281,754,651). cha(281,865,867). cha(281,920,969). cha(281,1192,1562). cha(281,1262,1728). cha(282,46,509). cha(282,48,688). cha(282,100,1374). cha(282,145,1374). cha(282,153,1594). cha(282,754,651). cha(282,865,867). cha(282,920,969). cha(282,1192,1562). cha(282,1262,1728). cha(283,46,509). cha(283,48,688). cha(283,100,1374). cha(283,126,359). cha(283,127,261). cha(283,145,1374). cha(283,153,1594). cha(283,289,1370). cha(283,754,651). cha(283,865,867). cha(283,920,969). cha(283,1192,1562). cha(283,1262,1728). cha(284,46,509). cha(284,48,688). cha(284,100,1374). cha(284,145,1374). cha(284,153,1594). cha(284,754,651). cha(284,865,867). cha(284,920,969). cha(284,1192,1562). cha(284,1262,1728). cha(285,46,509). cha(285,48,688). cha(285,100,1374). cha(285,145,1374). cha(285,153,1594). cha(285,279,263). cha(285,340,781). cha(285,754,651). cha(285,865,867). cha(285,920,969). cha(285,1192,1562). cha(285,1262,1728). cha(286,46,509). cha(286,48,688). cha(286,80,1131). cha(286,81,980). cha(286,100,1374). cha(286,145,1374). cha(286,153,2045). cha(286,559,266). cha(286,586,308). cha(286,607,342). cha(286,754,651). cha(286,865,867). cha(286,920,969). cha(286,927,980). cha(286,980,1111). cha(286,993,1131). cha(286,1072,1279). cha(286,1119,1398). cha(286,1185,1547). cha(286,1192,1562). cha(286,1262,1728). cha(286,1441,2045). cha(287,46,509). cha(287,48,688). cha(287,100,1374). cha(287,145,1374). cha(287,153,1594). cha(287,754,651). cha(287,865,867). cha(287,920,969). cha(287,1192,1562). cha(287,1262,1728). cha(288,46,509). cha(288,48,688). cha(288,100,1374). cha(288,145,1374). cha(288,153,1594). cha(288,754,651). cha(288,865,867). cha(288,920,969). cha(288,1192,1562). cha(288,1262,1728). cha(289,46,2046). cha(289,48,2047). cha(289,100,1374). cha(289,145,2048). cha(289,153,2049). cha(289,754,651). cha(289,865,867). cha(289,920,969). cha(289,1192,1562). cha(289,1230,1632). cha(289,1262,1728). cha(289,1442,2046). cha(289,1443,2047). cha(289,1444,2048). cha(289,1445,2049). cha(290,18,1327). cha(290,19,623). cha(290,23,418). cha(290,46,509). cha(290,48,688). cha(290,82,1642). cha(290,100,1374). cha(290,145,1374). cha(290,153,319). cha(290,212,1027). cha(290,227,681). cha(290,236,1504). cha(290,280,319). cha(290,754,651). cha(290,767,681). cha(290,865,867). cha(290,920,969). cha(290,1094,1327). cha(290,1192,1562). cha(290,1262,1728). cha(291,18,578). cha(291,19,623). cha(291,23,418). cha(291,46,509). cha(291,48,688). cha(291,82,1642). cha(291,100,1374). cha(291,145,1374). cha(291,153,319). cha(291,212,1027). cha(291,227,680). cha(291,236,1504). cha(291,280,319). cha(291,754,651). cha(291,865,867). cha(291,920,969). cha(291,1192,1562). cha(291,1262,1728). cha(292,18,578). cha(292,19,623). cha(292,23,418). cha(292,46,509). cha(292,48,688). cha(292,82,1642). cha(292,100,1374). cha(292,145,1374). cha(292,153,319). cha(292,212,1027). cha(292,227,680). cha(292,236,1504). cha(292,280,319). cha(292,754,651). cha(292,865,867). cha(292,920,969). cha(292,1192,1562). cha(292,1262,1728). cha(293,46,509). cha(293,48,688). cha(293,100,1374). cha(293,145,1374). cha(293,153,1594). cha(293,754,651). cha(293,865,867). cha(293,920,969). cha(293,1192,1562). cha(293,1262,1728). cha(294,46,2050). cha(294,48,2051). cha(294,100,1374). cha(294,145,1374). cha(294,153,1594). cha(294,281,2052). cha(294,282,2053). cha(294,292,2054). cha(294,314,2054). cha(294,406,2053). cha(294,408,2231). cha(294,450,2054). cha(294,614,2052). cha(294,754,651). cha(294,797,2232). cha(294,865,867). cha(294,917,2050). cha(294,920,969). cha(294,960,2051). cha(294,968,2233). cha(294,1192,1562). cha(294,1247,2234). cha(294,1262,1728). cha(294,1334,2050). cha(294,1336,2051). cha(294,1339,2231). cha(295,46,509). cha(295,48,688). cha(295,100,1374). cha(295,145,1374). cha(295,153,2055). cha(295,754,651). cha(295,865,867). cha(295,920,969). cha(295,1192,1562). cha(295,1262,1728). cha(295,1446,2055). cha(296,46,509). cha(296,48,688). cha(296,76,1005). cha(296,87,733). cha(296,89,273). cha(296,100,1374). cha(296,145,1374). cha(296,153,1594). cha(296,563,273). cha(296,754,651). cha(296,794,733). cha(296,865,867). cha(296,920,969). cha(296,923,2215). cha(296,1192,1562). cha(296,1262,1728). cha(297,18,578). cha(297,19,623). cha(297,23,418). cha(297,46,509). cha(297,48,688). cha(297,82,1642). cha(297,100,1374). cha(297,145,1374). cha(297,153,319). cha(297,212,1027). cha(297,227,680). cha(297,236,1504). cha(297,280,319). cha(297,754,651). cha(297,865,867). cha(297,920,969). cha(297,1192,1562). cha(297,1262,1728). cha(298,18,578). cha(298,19,623). cha(298,23,418). cha(298,46,509). cha(298,48,688). cha(298,82,1642). cha(298,100,1374). cha(298,145,1374). cha(298,153,319). cha(298,212,1027). cha(298,227,680). cha(298,236,1504). cha(298,280,319). cha(298,754,651). cha(298,865,867). cha(298,920,969). cha(298,1192,1562). cha(298,1262,1728). cha(299,46,776). cha(299,48,283). cha(299,100,1374). cha(299,145,1374). cha(299,153,1588). cha(299,570,283). cha(299,754,651). cha(299,817,776). cha(299,865,867). cha(299,920,969). cha(299,937,1001). cha(299,1190,1555). cha(299,1192,1562). cha(299,1201,1588). cha(299,1262,1728). cha(300,18,578). cha(300,19,623). cha(300,23,418). cha(300,46,509). cha(300,48,688). cha(300,82,1642). cha(300,100,1374). cha(300,145,1374). cha(300,153,319). cha(300,212,1027). cha(300,227,680). cha(300,236,1504). cha(300,280,319). cha(300,754,651). cha(300,865,867). cha(300,920,969). cha(300,1192,1562). cha(300,1262,1728). cha(301,46,509). cha(301,48,688). cha(301,100,1374). cha(301,145,1374). cha(301,153,1594). cha(301,410,2235). cha(301,711,2236). cha(301,754,651). cha(301,801,2237). cha(301,865,867). cha(301,892,2238). cha(301,920,969). cha(301,1192,1562). cha(301,1238,2239). cha(301,1262,1728). cha(302,46,509). cha(302,48,688). cha(302,100,1374). cha(302,145,1374). cha(302,153,1594). cha(302,170,312). cha(302,754,651). cha(302,865,867). cha(302,920,969). cha(302,1192,1562). cha(302,1262,1728). cha(303,24,330). cha(303,25,320). cha(303,46,509). cha(303,48,688). cha(303,100,1374). cha(303,137,1360). cha(303,145,1374). cha(303,153,2056). cha(303,315,487). cha(303,333,884). cha(303,337,569). cha(303,485,2240). cha(303,593,320). cha(303,600,330). cha(303,702,1360). cha(303,754,651). cha(303,865,867). cha(303,920,969). cha(303,1192,1562). cha(303,1262,1728). cha(303,1447,2056). cha(304,46,509). cha(304,48,688). cha(304,100,1374). cha(304,116,2057). cha(304,145,1374). cha(304,153,1590). cha(304,290,326). cha(304,314,326). cha(304,405,1886). cha(304,406,1886). cha(304,408,2057). cha(304,450,326). cha(304,599,326). cha(304,613,2241). cha(304,614,2241). cha(304,754,651). cha(304,796,2191). cha(304,797,2191). cha(304,865,867). cha(304,917,509). cha(304,920,969). cha(304,960,688). cha(304,967,1332). cha(304,968,1332). cha(304,1192,1562). cha(304,1203,1590). cha(304,1246,2242). cha(304,1247,2242). cha(304,1262,1728). cha(304,1448,2057). cha(305,46,509). cha(305,48,688). cha(305,87,2058). cha(305,89,2059). cha(305,100,1374). cha(305,145,1374). cha(305,153,1594). cha(305,754,651). cha(305,865,867). cha(305,920,969). cha(305,923,2243). cha(305,1192,1562). cha(305,1262,1728). cha(306,46,509). cha(306,48,688). cha(306,100,1374). cha(306,145,1374). cha(306,153,1594). cha(306,189,2060). cha(306,552,255). cha(306,754,651). cha(306,806,759). cha(306,865,867). cha(306,920,969). cha(306,956,1047). cha(306,1015,1165). cha(306,1062,1263). cha(306,1159,1493). cha(306,1192,1562). cha(306,1208,1597). cha(306,1262,1728). cha(306,1449,2060). cha(307,46,509). cha(307,48,688). cha(307,100,1374). cha(307,145,1374). cha(307,153,1594). cha(307,754,651). cha(307,865,867). cha(307,920,969). cha(307,1192,1562). cha(307,1262,1728). cha(308,46,2061). cha(308,48,2062). cha(308,86,2063). cha(308,88,2064). cha(308,90,2065). cha(308,91,2066). cha(308,100,1374). cha(308,145,1374). cha(308,153,1594). cha(308,241,2067). cha(308,302,2068). cha(308,314,2063). cha(308,342,2069). cha(308,343,2070). cha(308,348,2071). cha(308,349,2072). cha(308,361,2073). cha(308,406,2064). cha(308,408,2065). cha(308,450,2063). cha(308,614,2073). cha(308,754,651). cha(308,797,2244). cha(308,798,2244). cha(308,865,867). cha(308,916,2061). cha(308,917,2061). cha(308,920,969). cha(308,959,2062). cha(308,960,2062). cha(308,968,2066). cha(308,1105,2245). cha(308,1192,1562). cha(308,1247,2071). cha(308,1255,2246). cha(308,1262,1728). cha(309,46,509). cha(309,48,688). cha(309,100,1374). cha(309,145,1374). cha(309,153,1594). cha(309,754,651). cha(309,865,867). cha(309,920,969). cha(309,1192,1562). cha(309,1262,1728). cha(310,46,509). cha(310,48,688). cha(310,100,1374). cha(310,145,1374). cha(310,153,1594). cha(310,754,651). cha(310,865,867). cha(310,920,969). cha(310,1192,1562). cha(310,1262,1728). cha(311,18,578). cha(311,19,623). cha(311,23,418). cha(311,46,509). cha(311,48,688). cha(311,82,1642). cha(311,100,1374). cha(311,145,1374). cha(311,153,319). cha(311,212,1027). cha(311,227,680). cha(311,236,1504). cha(311,280,319). cha(311,754,651). cha(311,865,867). cha(311,920,969). cha(311,1192,1562). cha(311,1262,1728). cha(312,46,509). cha(312,48,688). cha(312,100,1374). cha(312,145,1374). cha(312,153,1594). cha(312,754,651). cha(312,865,867). cha(312,920,969). cha(312,1192,1562). cha(312,1262,1728). cha(313,18,578). cha(313,19,623). cha(313,23,418). cha(313,46,509). cha(313,48,688). cha(313,82,1642). cha(313,100,1374). cha(313,145,1374). cha(313,153,319). cha(313,212,1027). cha(313,227,680). cha(313,236,1504). cha(313,280,319). cha(313,754,651). cha(313,865,867). cha(313,920,969). cha(313,1192,1562). cha(313,1262,1728). cha(314,46,509). cha(314,48,688). cha(314,100,1374). cha(314,145,1374). cha(314,153,1594). cha(314,754,651). cha(314,865,867). cha(314,920,969). cha(314,1192,1562). cha(314,1262,1728). cha(315,18,578). cha(315,19,623). cha(315,23,418). cha(315,46,509). cha(315,48,688). cha(315,82,1642). cha(315,100,1374). cha(315,145,1374). cha(315,153,319). cha(315,212,1027). cha(315,227,680). cha(315,236,1504). cha(315,280,319). cha(315,754,651). cha(315,865,867). cha(315,920,969). cha(315,1192,1562). cha(315,1262,1728). cha(316,46,1966). cha(316,48,1967). cha(316,59,997). cha(316,65,1355). cha(316,100,1180). cha(316,145,277). cha(316,146,814). cha(316,147,367). cha(316,148,606). cha(316,149,773). cha(316,150,1192). cha(316,153,1968). cha(316,175,1645). cha(316,201,773). cha(316,208,277). cha(316,216,1559). cha(316,262,187). cha(316,263,713). cha(316,295,1617). cha(316,350,942). cha(316,351,694). cha(316,567,277). cha(316,620,367). cha(316,685,997). cha(316,736,610). cha(316,754,651). cha(316,774,694). cha(316,785,713). cha(316,865,867). cha(316,920,969). cha(316,933,997). cha(316,1057,1251). cha(316,1192,1562). cha(316,1195,1645). cha(316,1235,1645). cha(316,1262,1728). cha(316,1404,1966). cha(316,1405,1967). cha(316,1406,1968). cha(317,30,1258). cha(317,46,2074). cha(317,48,2075). cha(317,85,1311). cha(317,100,1374). cha(317,145,1374). cha(317,153,2076). cha(317,190,2077). cha(317,238,1033). cha(317,313,2078). cha(317,754,651). cha(317,865,867). cha(317,920,969). cha(317,949,1033). cha(317,1060,1258). cha(317,1085,1311). cha(317,1150,2247). cha(317,1192,1562). cha(317,1262,1728). cha(317,1294,2074). cha(317,1296,2075). cha(317,1450,2074). cha(317,1451,2075). cha(317,1452,2076). cha(317,1453,2077). cha(317,1454,2078). cha(318,46,1836). cha(318,48,1837). cha(318,100,1374). cha(318,145,1374). cha(318,153,1838). cha(318,754,651). cha(318,865,867). cha(318,920,969). cha(318,1104,1348). cha(318,1192,1562). cha(318,1262,1728). cha(318,1304,1836). cha(318,1305,1836). cha(318,1306,1837). cha(318,1307,1837). cha(318,1308,1838). cha(319,18,1326). cha(319,19,623). cha(319,23,418). cha(319,46,509). cha(319,48,688). cha(319,82,1642). cha(319,100,1374). cha(319,145,1374). cha(319,153,319). cha(319,212,1027). cha(319,227,680). cha(319,236,1504). cha(319,280,319). cha(319,754,651). cha(319,865,867). cha(319,920,969). cha(319,1093,1326). cha(319,1192,1562). cha(319,1262,1728). cha(320,46,509). cha(320,48,688). cha(320,100,1374). cha(320,145,1374). cha(320,153,1594). cha(320,754,651). cha(320,865,867). cha(320,920,969). cha(320,1192,1562). cha(320,1262,1728). cha(321,46,509). cha(321,48,688). cha(321,100,1374). cha(321,145,1374). cha(321,153,1594). cha(321,754,651). cha(321,865,867). cha(321,920,969). cha(321,1192,1562). cha(321,1262,1728). cha(322,18,578). cha(322,19,623). cha(322,23,418). cha(322,46,509). cha(322,48,688). cha(322,82,1642). cha(322,100,1374). cha(322,145,1374). cha(322,153,319). cha(322,212,1027). cha(322,227,680). cha(322,236,1504). cha(322,280,319). cha(322,754,651). cha(322,865,867). cha(322,920,969). cha(322,1192,1562). cha(322,1262,1728). cha(323,46,509). cha(323,48,688). cha(323,100,1374). cha(323,145,1374). cha(323,153,1594). cha(323,754,651). cha(323,865,867). cha(323,920,969). cha(323,1192,1562). cha(323,1262,1728). cha(324,32,139). cha(324,46,397). cha(324,48,658). cha(324,100,1374). cha(324,145,1374). cha(324,153,1594). cha(324,637,397). cha(324,754,651). cha(324,758,658). cha(324,865,867). cha(324,920,969). cha(324,1192,1562). cha(324,1232,1634). cha(324,1262,1728). cha(325,32,139). cha(325,46,398). cha(325,48,659). cha(325,100,1374). cha(325,145,1374). cha(325,153,1594). cha(325,638,398). cha(325,754,651). cha(325,759,659). cha(325,865,867). cha(325,920,969). cha(325,1192,1562). cha(325,1232,1634). cha(325,1262,1728). cha(326,30,1894). cha(326,46,1820). cha(326,48,1821). cha(326,85,2079). cha(326,100,1374). cha(326,145,1822). cha(326,153,1823). cha(326,190,1898). cha(326,238,2080). cha(326,313,1874). cha(326,470,1894). cha(326,716,2079). cha(326,721,1898). cha(326,754,651). cha(326,865,867). cha(326,920,969). cha(326,979,2080). cha(326,1010,1874). cha(326,1149,2189). cha(326,1150,2189). cha(326,1192,1562). cha(326,1262,1728). cha(326,1293,1820). cha(326,1294,1820). cha(326,1295,1821). cha(326,1296,1821). cha(326,1297,1822). cha(326,1298,1823). cha(327,18,578). cha(327,19,623). cha(327,23,418). cha(327,46,509). cha(327,48,688). cha(327,82,1642). cha(327,100,1374). cha(327,145,1374). cha(327,153,319). cha(327,212,1027). cha(327,227,680). cha(327,236,1504). cha(327,280,319). cha(327,754,651). cha(327,865,867). cha(327,920,969). cha(327,1192,1562). cha(327,1262,1728). cha(328,46,509). cha(328,48,688). cha(328,100,1374). cha(328,145,1374). cha(328,153,1594). cha(328,754,651). cha(328,865,867). cha(328,920,969). cha(328,1192,1562). cha(328,1262,1728). cha(329,24,2081). cha(329,25,2082). cha(329,46,509). cha(329,48,688). cha(329,100,1374). cha(329,137,2083). cha(329,145,1374). cha(329,153,1594). cha(329,380,2081). cha(329,485,2169). cha(329,595,2082). cha(329,701,2083). cha(329,702,2083). cha(329,754,651). cha(329,865,867). cha(329,920,969). cha(329,1192,1562). cha(329,1262,1728). cha(330,46,2084). cha(330,48,2085). cha(330,100,1374). cha(330,109,1067). cha(330,145,1374). cha(330,153,2086). cha(330,754,651). cha(330,865,867). cha(330,920,969). cha(330,1192,1562). cha(330,1262,1728). cha(330,1455,2084). cha(330,1456,2085). cha(330,1457,2086). cha(331,46,509). cha(331,48,688). cha(331,56,1980). cha(331,92,1981). cha(331,100,1374). cha(331,108,1982). cha(331,132,1796). cha(331,145,1374). cha(331,153,1594). cha(331,210,2087). cha(331,485,1982). cha(331,754,651). cha(331,865,867). cha(331,920,969). cha(331,1192,1562). cha(331,1262,1728). cha(331,1266,1980). cha(331,1268,1981). cha(331,1269,1982). cha(331,1270,1796). cha(331,1272,2087). cha(332,46,509). cha(332,48,688). cha(332,100,1374). cha(332,145,1374). cha(332,153,1594). cha(332,754,651). cha(332,865,867). cha(332,920,969). cha(332,1192,1562). cha(332,1262,1728). cha(333,46,2088). cha(333,48,2089). cha(333,100,1374). cha(333,145,1374). cha(333,153,2090). cha(333,754,651). cha(333,865,867). cha(333,920,969). cha(333,941,1011). cha(333,1192,1562). cha(333,1262,1728). cha(333,1458,2088). cha(333,1459,2089). cha(333,1460,2090). cha(334,46,2091). cha(334,48,2092). cha(334,100,1374). cha(334,145,1374). cha(334,153,2093). cha(334,410,2248). cha(334,711,2249). cha(334,754,651). cha(334,800,743). cha(334,801,743). cha(334,865,867). cha(334,892,2250). cha(334,920,969). cha(334,1192,1562). cha(334,1238,2251). cha(334,1262,1728). cha(334,1461,2091). cha(334,1462,2092). cha(334,1463,2093). cha(335,46,509). cha(335,48,688). cha(335,100,1374). cha(335,145,1374). cha(335,153,1594). cha(335,754,651). cha(335,865,867). cha(335,920,969). cha(335,1192,1562). cha(335,1262,1728). cha(336,6,1241). cha(336,8,1552). cha(336,30,1552). cha(336,46,1853). cha(336,48,1854). cha(336,85,1241). cha(336,100,2094). cha(336,119,2095). cha(336,145,1856). cha(336,153,1857). cha(336,190,1858). cha(336,238,1859). cha(336,313,1860). cha(336,346,1503). cha(336,754,651). cha(336,865,867). cha(336,920,969). cha(336,1054,1241). cha(336,1150,2181). cha(336,1188,1552). cha(336,1192,1562). cha(336,1262,1728). cha(336,1294,1853). cha(336,1296,1854). cha(336,1323,1853). cha(336,1324,1854). cha(336,1326,1856). cha(336,1327,1857). cha(336,1328,1858). cha(336,1329,1858). cha(336,1330,1859). cha(336,1331,1860). cha(337,46,509). cha(337,48,688). cha(337,100,1374). cha(337,124,2096). cha(337,125,2097). cha(337,145,1374). cha(337,153,1594). cha(337,754,651). cha(337,865,867). cha(337,920,969). cha(337,1192,1562). cha(337,1262,1728). cha(337,1294,509). cha(337,1296,688). cha(338,46,509). cha(338,48,688). cha(338,100,1374). cha(338,145,1374). cha(338,153,1594). cha(338,294,1148). cha(338,754,651). cha(338,865,867). cha(338,920,969). cha(338,1192,1562). cha(338,1262,1728). cha(339,46,2098). cha(339,48,2099). cha(339,100,1374). cha(339,145,1374). cha(339,153,1594). cha(339,754,651). cha(339,865,867). cha(339,920,969). cha(339,1192,1562). cha(339,1262,1728). cha(339,1465,2098). cha(339,1466,2099). cha(340,18,578). cha(340,19,623). cha(340,23,418). cha(340,46,509). cha(340,48,688). cha(340,82,1642). cha(340,100,1374). cha(340,145,1374). cha(340,153,319). cha(340,212,1027). cha(340,227,680). cha(340,236,1504). cha(340,280,319). cha(340,754,651). cha(340,865,867). cha(340,920,969). cha(340,1192,1562). cha(340,1262,1728). cha(341,46,509). cha(341,48,688). cha(341,100,1374). cha(341,145,1374). cha(341,153,1594). cha(341,754,651). cha(341,865,867). cha(341,920,969). cha(341,1192,1562). cha(341,1262,1728). cha(342,46,509). cha(342,48,688). cha(342,100,2100). cha(342,145,2100). cha(342,153,1594). cha(342,754,651). cha(342,865,867). cha(342,920,969). cha(342,1061,1262). cha(342,1192,1562). cha(342,1262,1728). cha(343,46,2101). cha(343,48,2102). cha(343,100,2103). cha(343,145,2104). cha(343,153,1594). cha(343,754,651). cha(343,865,867). cha(343,918,966). cha(343,920,969). cha(343,1192,1562). cha(343,1262,1728). cha(343,1468,2101). cha(343,1469,2102). cha(343,1471,2104). cha(344,46,509). cha(344,48,688). cha(344,100,1374). cha(344,145,1374). cha(344,153,1594). cha(344,754,651). cha(344,865,867). cha(344,920,969). cha(344,1192,1562). cha(344,1262,1728). cha(345,46,509). cha(345,48,688). cha(345,100,1374). cha(345,145,1374). cha(345,153,2105). cha(345,312,1252). cha(345,754,651). cha(345,865,867). cha(345,920,969). cha(345,1192,1562). cha(345,1262,1728). cha(345,1472,2105). cha(346,46,509). cha(346,48,688). cha(346,100,1374). cha(346,145,1374). cha(346,153,1594). cha(346,754,651). cha(346,865,867). cha(346,920,969). cha(346,1192,1562). cha(346,1262,1728). cha(347,4,149). cha(347,30,149). cha(347,46,1820). cha(347,47,2106). cha(347,48,1821). cha(347,83,2107). cha(347,85,2108). cha(347,93,508). cha(347,100,2109). cha(347,140,742). cha(347,145,1828). cha(347,153,1823). cha(347,190,574). cha(347,192,1110). cha(347,195,2108). cha(347,225,2110). cha(347,238,1110). cha(347,291,1460). cha(347,313,1156). cha(347,344,972). cha(347,367,2111). cha(347,470,149). cha(347,686,508). cha(347,716,2108). cha(347,720,574). cha(347,721,574). cha(347,754,651). cha(347,865,867). cha(347,920,969). cha(347,979,1110). cha(347,1009,1156). cha(347,1010,1156). cha(347,1149,1460). cha(347,1150,1460). cha(347,1192,1562). cha(347,1262,1728). cha(347,1293,1820). cha(347,1294,1820). cha(347,1295,1821). cha(347,1296,1821). cha(347,1297,1828). cha(347,1298,1823). cha(347,1302,1828). cha(347,1473,2106). cha(347,1474,2107). cha(347,1475,2108). cha(347,1477,2110). cha(347,1478,2111). cha(348,46,1958). cha(348,48,1959). cha(348,49,2112). cha(348,100,1374). cha(348,117,178). cha(348,145,1374). cha(348,153,1960). cha(348,185,2113). cha(348,486,178). cha(348,754,651). cha(348,865,867). cha(348,920,969). cha(348,1192,1562). cha(348,1262,1728). cha(348,1399,1958). cha(348,1400,1958). cha(348,1401,1959). cha(348,1402,1959). cha(348,1403,1960). cha(348,1479,2112). cha(348,1480,2113). cha(349,46,509). cha(349,48,688). cha(349,100,1374). cha(349,145,1374). cha(349,153,1594). cha(349,754,651). cha(349,865,867). cha(349,920,969). cha(349,1192,1562). cha(349,1262,1728). cha(350,41,1923). cha(350,46,509). cha(350,48,688). cha(350,60,1924). cha(350,100,1374). cha(350,103,1207). cha(350,145,1374). cha(350,153,1594). cha(350,754,651). cha(350,865,867). cha(350,920,969). cha(350,1036,1207). cha(350,1192,1562). cha(350,1262,1728). cha(350,1375,1923). cha(350,1376,1924). cha(351,46,509). cha(351,48,688). cha(351,100,1374). cha(351,145,1374). cha(351,153,1594). cha(351,754,651). cha(351,865,867). cha(351,920,969). cha(351,1192,1562). cha(351,1262,1728). cha(352,18,578). cha(352,19,623). cha(352,23,418). cha(352,46,509). cha(352,48,688). cha(352,82,1642). cha(352,100,1374). cha(352,145,1374). cha(352,153,319). cha(352,212,1027). cha(352,227,680). cha(352,236,1504). cha(352,280,319). cha(352,754,651). cha(352,865,867). cha(352,920,969). cha(352,1192,1562). cha(352,1262,1728). cha(353,46,509). cha(353,48,688). cha(353,100,1374). cha(353,145,1374). cha(353,153,1594). cha(353,754,651). cha(353,865,867). cha(353,920,969). cha(353,1192,1562). cha(353,1262,1728). cha(354,46,509). cha(354,48,688). cha(354,100,1374). cha(354,145,1374). cha(354,153,1594). cha(354,754,651). cha(354,865,867). cha(354,920,969). cha(354,1192,1562). cha(354,1262,1728). cha(355,46,509). cha(355,48,688). cha(355,100,1374). cha(355,145,1374). cha(355,153,1594). cha(355,329,2114). cha(355,754,651). cha(355,865,867). cha(355,920,969). cha(355,1192,1562). cha(355,1262,1728). cha(356,46,1862). cha(356,48,1863). cha(356,100,1374). cha(356,116,2115). cha(356,145,1374). cha(356,153,1590). cha(356,281,2116). cha(356,282,1886). cha(356,290,1668). cha(356,292,1668). cha(356,314,1668). cha(356,405,1886). cha(356,406,1886). cha(356,408,2115). cha(356,450,1668). cha(356,613,2116). cha(356,614,2116). cha(356,754,651). cha(356,796,2191). cha(356,797,2191). cha(356,865,867). cha(356,917,1862). cha(356,920,969). cha(356,960,1863). cha(356,967,1332). cha(356,968,1332). cha(356,1192,1562). cha(356,1203,1590). cha(356,1246,2252). cha(356,1247,2252). cha(356,1248,1668). cha(356,1262,1728). cha(356,1333,1862). cha(356,1334,1862). cha(356,1335,1863). cha(356,1336,1863). cha(356,1339,2115). cha(356,1481,2115). cha(356,1482,2116). cha(357,46,1294). cha(357,48,2117). cha(357,100,1374). cha(357,145,1374). cha(357,153,1591). cha(357,410,2253). cha(357,710,551). cha(357,711,551). cha(357,754,651). cha(357,801,2254). cha(357,865,867). cha(357,892,2255). cha(357,920,969). cha(357,1078,1294). cha(357,1192,1562). cha(357,1204,1591). cha(357,1238,2256). cha(357,1262,1728). cha(357,1483,2117). cha(358,46,509). cha(358,48,688). cha(358,100,1374). cha(358,145,1374). cha(358,153,1594). cha(358,754,651). cha(358,865,867). cha(358,920,969). cha(358,1192,1562). cha(358,1262,1728). cha(359,46,509). cha(359,48,688). cha(359,100,1374). cha(359,145,1374). cha(359,153,2118). cha(359,410,2257). cha(359,711,2258). cha(359,712,552). cha(359,754,651). cha(359,801,2237). cha(359,865,867). cha(359,892,2259). cha(359,920,969). cha(359,1192,1562). cha(359,1238,2260). cha(359,1262,1728). cha(359,1484,2118). cha(360,46,509). cha(360,48,688). cha(360,100,1374). cha(360,142,2119). cha(360,145,1374). cha(360,153,1594). cha(360,754,651). cha(360,865,867). cha(360,920,969). cha(360,1192,1562). cha(360,1262,1728). cha(361,46,509). cha(361,48,688). cha(361,100,1374). cha(361,145,1374). cha(361,153,1594). cha(361,754,651). cha(361,865,867). cha(361,920,969). cha(361,1192,1562). cha(361,1262,1728). cha(362,46,509). cha(362,48,688). cha(362,100,1374). cha(362,145,1374). cha(362,153,1594). cha(362,366,2120). cha(362,485,1661). cha(362,754,651). cha(362,865,867). cha(362,920,969). cha(362,1192,1562). cha(362,1239,1661). cha(362,1240,1661). cha(362,1241,1661). cha(362,1262,1728). cha(363,46,509). cha(363,48,688). cha(363,100,1374). cha(363,145,1374). cha(363,153,1594). cha(363,754,651). cha(363,865,867). cha(363,920,969). cha(363,1192,1562). cha(363,1262,1728). cha(364,46,1862). cha(364,48,1863). cha(364,100,1374). cha(364,116,1962). cha(364,145,1374). cha(364,153,1590). cha(364,281,1963). cha(364,282,1886). cha(364,290,2121). cha(364,292,2121). cha(364,314,2121). cha(364,405,1886). cha(364,406,1886). cha(364,408,1962). cha(364,450,2121). cha(364,613,1963). cha(364,614,1963). cha(364,754,651). cha(364,796,2191). cha(364,797,2191). cha(364,865,867). cha(364,917,1862). cha(364,920,969). cha(364,960,1863). cha(364,967,1332). cha(364,968,1332). cha(364,1192,1562). cha(364,1203,1590). cha(364,1246,2192). cha(364,1247,2192). cha(364,1262,1728). cha(364,1333,1862). cha(364,1334,1862). cha(364,1335,1863). cha(364,1336,1863). cha(364,1339,1962). cha(365,46,509). cha(365,48,688). cha(365,100,1374). cha(365,145,1374). cha(365,153,1594). cha(365,754,651). cha(365,865,867). cha(365,920,969). cha(365,1192,1562). cha(365,1262,1728). cha(366,46,509). cha(366,48,688). cha(366,100,1374). cha(366,145,1374). cha(366,153,1594). cha(366,754,651). cha(366,865,867). cha(366,920,969). cha(366,1192,1562). cha(366,1262,1728). cha(367,18,578). cha(367,19,623). cha(367,23,418). cha(367,46,509). cha(367,48,688). cha(367,82,1642). cha(367,100,1374). cha(367,145,1374). cha(367,153,319). cha(367,212,1027). cha(367,227,680). cha(367,236,1504). cha(367,280,319). cha(367,754,651). cha(367,865,867). cha(367,920,969). cha(367,1192,1562). cha(367,1262,1728). cha(368,46,509). cha(368,48,688). cha(368,100,1374). cha(368,145,1374). cha(368,153,1594). cha(368,329,683). cha(368,754,651). cha(368,768,683). cha(368,865,867). cha(368,920,969). cha(368,1192,1562). cha(368,1262,1728). cha(369,46,2122). cha(369,48,2123). cha(369,100,1374). cha(369,145,1374). cha(369,153,2124). cha(369,410,2261). cha(369,711,2262). cha(369,754,651). cha(369,801,2263). cha(369,865,867). cha(369,891,914). cha(369,892,914). cha(369,920,969). cha(369,1192,1562). cha(369,1238,2264). cha(369,1262,1728). cha(369,1485,2122). cha(369,1486,2123). cha(369,1487,2124). cha(370,46,2125). cha(370,48,2126). cha(370,100,1374). cha(370,145,1374). cha(370,153,2127). cha(370,410,2265). cha(370,711,2266). cha(370,754,651). cha(370,801,2267). cha(370,865,867). cha(370,892,2268). cha(370,920,969). cha(370,1192,1562). cha(370,1237,1655). cha(370,1238,1655). cha(370,1262,1728). cha(370,1488,2125). cha(370,1489,2126). cha(370,1490,2127). cha(371,46,509). cha(371,48,688). cha(371,100,1374). cha(371,145,1374). cha(371,153,1594). cha(371,754,651). cha(371,865,867). cha(371,920,969). cha(371,1192,1562). cha(371,1262,1728). cha(372,46,509). cha(372,48,688). cha(372,100,1374). cha(372,145,1374). cha(372,153,1594). cha(372,754,651). cha(372,865,867). cha(372,920,969). cha(372,1192,1562). cha(372,1262,1728). cha(373,46,509). cha(373,48,688). cha(373,100,1374). cha(373,145,1374). cha(373,153,1594). cha(373,754,651). cha(373,865,867). cha(373,920,969). cha(373,1192,1562). cha(373,1262,1728). cha(374,46,509). cha(374,48,688). cha(374,100,1374). cha(374,145,1374). cha(374,153,1594). cha(374,184,2128). cha(374,754,651). cha(374,865,867). cha(374,920,969). cha(374,1192,1562). cha(374,1262,1728). cha(375,46,509). cha(375,48,688). cha(375,100,1374). cha(375,145,1374). cha(375,153,1594). cha(375,754,651). cha(375,865,867). cha(375,920,969). cha(375,1192,1562). cha(375,1262,1728). cha(376,46,2129). cha(376,48,2130). cha(376,100,1374). cha(376,145,1374). cha(376,153,1940). cha(376,316,2131). cha(376,754,651). cha(376,853,2269). cha(376,865,867). cha(376,920,969). cha(376,986,2270). cha(376,1192,1562). cha(376,1262,1728). cha(376,1387,2129). cha(376,1388,2130). cha(376,1389,1940). cha(376,1491,2129). cha(376,1492,2130). cha(376,1493,2131). cha(377,46,509). cha(377,48,688). cha(377,100,1374). cha(377,145,1374). cha(377,153,1594). cha(377,193,2132). cha(377,754,651). cha(377,865,867). cha(377,920,969). cha(377,1192,1562). cha(377,1262,1728). cha(378,46,509). cha(378,48,688). cha(378,100,1374). cha(378,145,1374). cha(378,153,1594). cha(378,754,651). cha(378,865,867). cha(378,920,969). cha(378,1192,1562). cha(378,1262,1728). cha(379,18,578). cha(379,19,623). cha(379,23,418). cha(379,46,509). cha(379,48,688). cha(379,82,1642). cha(379,100,1374). cha(379,145,1374). cha(379,153,319). cha(379,212,1027). cha(379,227,680). cha(379,236,1504). cha(379,280,319). cha(379,754,651). cha(379,865,867). cha(379,920,969). cha(379,1192,1562). cha(379,1262,1728). cha(380,18,578). cha(380,19,623). cha(380,23,418). cha(380,46,509). cha(380,48,688). cha(380,82,1642). cha(380,100,1374). cha(380,145,1374). cha(380,153,319). cha(380,212,1027). cha(380,227,680). cha(380,236,1504). cha(380,280,319). cha(380,754,651). cha(380,865,867). cha(380,920,969). cha(380,1192,1562). cha(380,1262,1728). cha(381,46,509). cha(381,48,688). cha(381,100,1374). cha(381,145,1374). cha(381,153,1594). cha(381,754,651). cha(381,865,867). cha(381,920,969). cha(381,1192,1562). cha(381,1262,1728). cha(382,46,2133). cha(382,48,2134). cha(382,100,1374). cha(382,145,1374). cha(382,153,1940). cha(382,316,2135). cha(382,754,651). cha(382,852,851). cha(382,853,851). cha(382,865,867). cha(382,920,969). cha(382,985,1122). cha(382,986,1122). cha(382,1192,1562). cha(382,1262,1728). cha(382,1387,2133). cha(382,1388,2134). cha(382,1389,1940). cha(382,1494,2133). cha(382,1495,2134). cha(382,1496,2135). cha(383,18,578). cha(383,19,623). cha(383,23,418). cha(383,46,509). cha(383,48,688). cha(383,82,1642). cha(383,100,1374). cha(383,145,1374). cha(383,153,319). cha(383,212,1027). cha(383,227,680). cha(383,236,1504). cha(383,280,319). cha(383,754,651). cha(383,865,867). cha(383,920,969). cha(383,1192,1562). cha(383,1262,1728). cha(384,46,509). cha(384,48,688). cha(384,100,1374). cha(384,145,1374). cha(384,153,1594). cha(384,754,651). cha(384,865,867). cha(384,920,969). cha(384,1192,1562). cha(384,1262,1728). cha(385,46,509). cha(385,48,688). cha(385,100,1374). cha(385,145,1374). cha(385,153,1594). cha(385,754,651). cha(385,865,867). cha(385,920,969). cha(385,1192,1562). cha(385,1262,1728). cha(386,18,578). cha(386,19,623). cha(386,23,418). cha(386,46,509). cha(386,48,688). cha(386,82,1642). cha(386,100,1374). cha(386,145,1374). cha(386,153,319). cha(386,212,1027). cha(386,227,680). cha(386,236,1504). cha(386,280,319). cha(386,754,651). cha(386,865,867). cha(386,920,969). cha(386,1192,1562). cha(386,1262,1728). cha(387,46,509). cha(387,48,688). cha(387,100,1374). cha(387,145,1374). cha(387,153,1594). cha(387,754,651). cha(387,865,867). cha(387,873,882). cha(387,920,969). cha(387,1116,1390). cha(387,1192,1562). cha(387,1262,1728). cha(388,46,509). cha(388,48,688). cha(388,100,1374). cha(388,145,1374). cha(388,153,1594). cha(388,754,651). cha(388,865,867). cha(388,920,969). cha(388,1192,1562). cha(388,1262,1728). cha(389,46,509). cha(389,48,688). cha(389,100,1374). cha(389,145,1374). cha(389,153,1988). cha(389,171,902). cha(389,260,1356). cha(389,296,974). cha(389,564,274). cha(389,621,368). cha(389,754,651). cha(389,773,692). cha(389,865,867). cha(389,885,902). cha(389,920,969). cha(389,925,974). cha(389,1045,1222). cha(389,1056,1250). cha(389,1107,1356). cha(389,1109,1367). cha(389,1157,1488). cha(389,1192,1562). cha(389,1262,1728). cha(389,1417,1988). cha(390,43,412). cha(390,46,963). cha(390,48,1051). cha(390,52,1038). cha(390,86,1045). cha(390,88,1889). cha(390,90,906). cha(390,91,1332). cha(390,100,1374). cha(390,107,1093). cha(390,116,906). cha(390,145,1374). cha(390,153,1590). cha(390,155,1351). cha(390,215,1145). cha(390,222,1045). cha(390,224,1177). cha(390,241,412). cha(390,290,1045). cha(390,302,1093). cha(390,314,1045). cha(390,342,1038). cha(390,343,1145). cha(390,348,1892). cha(390,349,1177). cha(390,361,2136). cha(390,404,1889). cha(390,405,1889). cha(390,406,1889). cha(390,408,906). cha(390,450,1045). cha(390,613,2136). cha(390,614,2136). cha(390,754,651). cha(390,796,2191). cha(390,797,2191). cha(390,798,2191). cha(390,865,867). cha(390,886,906). cha(390,915,963). cha(390,916,963). cha(390,917,963). cha(390,920,969). cha(390,950,1038). cha(390,958,1051). cha(390,959,1051). cha(390,960,1051). cha(390,967,1332). cha(390,968,1332). cha(390,1002,1145). cha(390,1105,1351). cha(390,1192,1562). cha(390,1203,1590). cha(390,1245,1892). cha(390,1246,1892). cha(390,1247,1892). cha(390,1254,2271). cha(390,1255,2271). cha(390,1262,1728). cha(390,1497,2136). cha(391,46,509). cha(391,48,688). cha(391,51,153). cha(391,87,437). cha(391,89,153). cha(391,100,1374). cha(391,145,1374). cha(391,153,1594). cha(391,214,930). cha(391,242,437). cha(391,244,1303). cha(391,303,1319). cha(391,338,971). cha(391,474,153). cha(391,630,382). cha(391,657,437). cha(391,754,651). cha(391,865,867). cha(391,900,930). cha(391,920,969). cha(391,922,971). cha(391,923,971). cha(391,1083,1303). cha(391,1089,1319). cha(391,1192,1562). cha(391,1262,1728). cha(392,43,412). cha(392,46,963). cha(392,48,1051). cha(392,52,2137). cha(392,86,1101). cha(392,88,1889). cha(392,90,1962). cha(392,91,1332). cha(392,100,1374). cha(392,107,2138). cha(392,116,1962). cha(392,145,1374). cha(392,153,1590). cha(392,155,1351). cha(392,215,2139). cha(392,222,1101). cha(392,224,2140). cha(392,241,412). cha(392,290,1101). cha(392,302,2138). cha(392,314,1101). cha(392,342,2137). cha(392,343,2139). cha(392,348,1892). cha(392,349,2140). cha(392,361,1963). cha(392,404,1889). cha(392,405,1889). cha(392,406,1889). cha(392,408,1962). cha(392,450,1101). cha(392,613,1963). cha(392,614,1963). cha(392,754,651). cha(392,796,2191). cha(392,797,2191). cha(392,798,2191). cha(392,865,867). cha(392,915,963). cha(392,916,963). cha(392,917,963). cha(392,920,969). cha(392,952,2137). cha(392,958,1051). cha(392,959,1051). cha(392,960,1051). cha(392,967,1332). cha(392,968,1332). cha(392,977,1101). cha(392,1004,2139). cha(392,1021,2140). cha(392,1105,1351). cha(392,1192,1562). cha(392,1203,1590). cha(392,1226,2138). cha(392,1245,1892). cha(392,1246,1892). cha(392,1247,1892). cha(392,1254,2193). cha(392,1255,2193). cha(392,1262,1728). cha(393,46,509). cha(393,48,688). cha(393,100,1374). cha(393,116,1962). cha(393,145,1374). cha(393,153,1590). cha(393,290,2121). cha(393,314,2121). cha(393,405,1886). cha(393,406,1886). cha(393,408,1962). cha(393,450,2121). cha(393,613,1963). cha(393,614,1963). cha(393,754,651). cha(393,796,2191). cha(393,797,2191). cha(393,865,867). cha(393,917,509). cha(393,920,969). cha(393,960,688). cha(393,967,1332). cha(393,968,1332). cha(393,1192,1562). cha(393,1203,1590). cha(393,1246,2192). cha(393,1247,2192). cha(393,1262,1728). cha(394,46,509). cha(394,48,688). cha(394,100,1374). cha(394,145,1374). cha(394,153,1988). cha(394,171,1989). cha(394,260,2141). cha(394,296,974). cha(394,564,274). cha(394,621,368). cha(394,754,651). cha(394,773,692). cha(394,865,867). cha(394,920,969). cha(394,925,974). cha(394,1045,1222). cha(394,1056,1250). cha(394,1109,1367). cha(394,1157,1488). cha(394,1192,1562). cha(394,1262,1728). cha(394,1417,1988). cha(395,46,509). cha(395,48,688). cha(395,80,1131). cha(395,81,980). cha(395,100,1374). cha(395,145,1374). cha(395,153,2045). cha(395,754,651). cha(395,865,867). cha(395,920,969). cha(395,927,980). cha(395,993,1131). cha(395,1192,1562). cha(395,1262,1728). cha(395,1441,2045). cha(396,46,509). cha(396,48,688). cha(396,100,1374). cha(396,145,1374). cha(396,153,1594). cha(396,276,2142). cha(396,754,651). cha(396,865,867). cha(396,920,969). cha(396,939,1004). cha(396,1053,1240). cha(396,1174,1524). cha(396,1192,1562). cha(396,1262,1728). cha(397,46,509). cha(397,48,688). cha(397,100,1374). cha(397,145,1374). cha(397,153,1594). cha(397,352,1096). cha(397,359,1270). cha(397,360,1571). cha(397,754,651). cha(397,865,867). cha(397,920,969). cha(397,1067,1270). cha(397,1192,1562). cha(397,1196,1571). cha(397,1262,1728). cha(398,46,509). cha(398,48,688). cha(398,100,1374). cha(398,145,1374). cha(398,153,1594). cha(398,240,2143). cha(398,754,651). cha(398,865,867). cha(398,920,969). cha(398,1192,1562). cha(398,1262,1728). cha(399,46,509). cha(399,48,688). cha(399,100,1374). cha(399,145,1374). cha(399,153,1594). cha(399,754,651). cha(399,865,867). cha(399,920,969). cha(399,1192,1562). cha(399,1262,1728). cha(400,46,509). cha(400,48,688). cha(400,100,1374). cha(400,145,1374). cha(400,153,1594). cha(400,246,2144). cha(400,265,2145). cha(400,275,1167). cha(400,485,2272). cha(400,702,2273). cha(400,754,651). cha(400,865,867). cha(400,920,969). cha(400,1192,1562). cha(400,1262,1728). cha(401,18,578). cha(401,19,623). cha(401,23,418). cha(401,46,509). cha(401,48,688). cha(401,82,1642). cha(401,100,1374). cha(401,145,1374). cha(401,153,319). cha(401,212,1027). cha(401,227,680). cha(401,236,1504). cha(401,280,319). cha(401,754,651). cha(401,865,867). cha(401,920,969). cha(401,1192,1562). cha(401,1262,1728). cha(402,46,509). cha(402,48,688). cha(402,100,1374). cha(402,145,1374). cha(402,153,1594). cha(402,754,651). cha(402,865,867). cha(402,920,969). cha(402,1192,1562). cha(402,1262,1728). cha(403,46,509). cha(403,48,688). cha(403,100,1374). cha(403,145,1374). cha(403,153,1594). cha(403,754,651). cha(403,865,867). cha(403,920,969). cha(403,1192,1562). cha(403,1262,1728). cha(404,43,412). cha(404,46,963). cha(404,48,1051). cha(404,52,1040). cha(404,86,117). cha(404,88,1889). cha(404,90,723). cha(404,91,1332). cha(404,100,1374). cha(404,107,1629). cha(404,116,723). cha(404,145,1374). cha(404,153,1590). cha(404,155,2146). cha(404,215,1144). cha(404,222,117). cha(404,224,1176). cha(404,241,412). cha(404,290,117). cha(404,302,1629). cha(404,314,117). cha(404,342,1040). cha(404,343,1144). cha(404,348,1892). cha(404,349,1176). cha(404,361,1963). cha(404,404,1889). cha(404,405,1889). cha(404,406,1889). cha(404,408,723). cha(404,449,117). cha(404,450,117). cha(404,613,1963). cha(404,614,1963). cha(404,754,651). cha(404,790,723). cha(404,796,2191). cha(404,797,2191). cha(404,798,2191). cha(404,865,867). cha(404,915,963). cha(404,916,963). cha(404,917,963). cha(404,920,969). cha(404,953,1040). cha(404,958,1051). cha(404,959,1051). cha(404,960,1051). cha(404,967,1332). cha(404,968,1332). cha(404,1001,1144). cha(404,1022,1176). cha(404,1105,2146). cha(404,1192,1562). cha(404,1203,1590). cha(404,1227,1629). cha(404,1245,1892). cha(404,1246,1892). cha(404,1247,1892). cha(404,1254,2193). cha(404,1255,2193). cha(404,1262,1728). cha(404,1421,2146). cha(404,1498,2146). cha(405,46,509). cha(405,48,688). cha(405,100,1374). cha(405,145,1374). cha(405,153,1594). cha(405,334,1490). cha(405,754,651). cha(405,865,867). cha(405,920,969). cha(405,1192,1562). cha(405,1262,1728). cha(406,46,509). cha(406,48,688). cha(406,100,1374). cha(406,145,1374). cha(406,153,1594). cha(406,754,651). cha(406,865,867). cha(406,920,969). cha(406,1192,1562). cha(406,1262,1728). cha(407,18,578). cha(407,19,623). cha(407,23,418). cha(407,46,509). cha(407,48,688). cha(407,82,1642). cha(407,100,1374). cha(407,145,1374). cha(407,153,319). cha(407,212,1027). cha(407,227,680). cha(407,236,1504). cha(407,280,319). cha(407,754,651). cha(407,865,867). cha(407,920,969). cha(407,1192,1562). cha(407,1262,1728). cha(408,46,2147). cha(408,48,2148). cha(408,100,1374). cha(408,145,1374). cha(408,153,1594). cha(408,314,2149). cha(408,406,2274). cha(408,408,2275). cha(408,450,2149). cha(408,614,2276). cha(408,754,651). cha(408,797,2277). cha(408,865,867). cha(408,917,2147). cha(408,920,969). cha(408,960,2148). cha(408,968,2278). cha(408,1192,1562). cha(408,1247,2279). cha(408,1262,1728). cha(409,46,509). cha(409,48,688). cha(409,100,1374). cha(409,145,1374). cha(409,153,1594). cha(409,267,2150). cha(409,269,2151). cha(409,754,651). cha(409,865,867). cha(409,920,969). cha(409,1192,1562). cha(409,1262,1728). cha(410,46,2152). cha(410,48,2153). cha(410,100,1374). cha(410,145,2154). cha(410,153,2155). cha(410,486,2280). cha(410,754,651). cha(410,865,867). cha(410,920,969). cha(410,1192,1562). cha(410,1262,1728). cha(410,1400,2152). cha(410,1402,2153). cha(410,1499,2152). cha(410,1500,2153). cha(410,1501,2154). cha(410,1502,2155). cha(411,46,509). cha(411,48,688). cha(411,100,1374). cha(411,145,1374). cha(411,153,1594). cha(411,754,651). cha(411,865,867). cha(411,920,969). cha(411,1192,1562). cha(411,1262,1728). cha(412,18,578). cha(412,19,623). cha(412,23,418). cha(412,46,509). cha(412,48,688). cha(412,82,1642). cha(412,100,1374). cha(412,145,1374). cha(412,153,319). cha(412,212,1027). cha(412,227,680). cha(412,236,1504). cha(412,280,319). cha(412,754,651). cha(412,865,867). cha(412,920,969). cha(412,1192,1562). cha(412,1262,1728). cha(413,46,2156). cha(413,48,2157). cha(413,100,1374). cha(413,145,1374). cha(413,153,1838). cha(413,754,651). cha(413,865,867). cha(413,920,969). cha(413,1104,1348). cha(413,1192,1562). cha(413,1262,1728). cha(413,1305,2156). cha(413,1307,2157). cha(413,1308,1838). cha(414,46,509). cha(414,48,688). cha(414,100,1374). cha(414,145,1374). cha(414,153,1594). cha(414,335,1372). cha(414,754,651). cha(414,865,867). cha(414,920,969). cha(414,1192,1562). cha(414,1262,1728). cha(415,46,509). cha(415,48,688). cha(415,100,1374). cha(415,145,1374). cha(415,153,1594). cha(415,754,651). cha(415,865,867). cha(415,920,969). cha(415,1192,1562). cha(415,1262,1728). cha(416,18,578). cha(416,19,623). cha(416,23,418). cha(416,46,509). cha(416,48,688). cha(416,82,1642). cha(416,100,1374). cha(416,145,1374). cha(416,153,319). cha(416,212,1027). cha(416,227,680). cha(416,236,1504). cha(416,280,319). cha(416,754,651). cha(416,865,867). cha(416,920,969). cha(416,1192,1562). cha(416,1262,1728). cha(417,46,509). cha(417,48,688). cha(417,100,1374). cha(417,145,1374). cha(417,153,1594). cha(417,754,651). cha(417,865,867). cha(417,920,969). cha(417,1054,2281). cha(417,1188,2282). cha(417,1192,1562). cha(417,1262,1728). cha(417,1329,2283). cha(418,46,1839). cha(418,48,1840). cha(418,100,1374). cha(418,145,1374). cha(418,153,1841). cha(418,754,651). cha(418,865,867). cha(418,920,969). cha(418,1192,1562). cha(418,1262,1728). cha(418,1309,1839). cha(418,1310,1840). cha(418,1311,1841). cha(419,46,509). cha(419,48,688). cha(419,100,1374). cha(419,145,1374). cha(419,153,1594). cha(419,754,651). cha(419,865,867). cha(419,920,969). cha(419,1192,1562). cha(419,1262,1728). cha(420,46,509). cha(420,48,688). cha(420,100,1374). cha(420,145,1374). cha(420,153,1594). cha(420,357,2158). cha(420,383,2284). cha(420,562,2285). cha(420,579,2286). cha(420,596,2287). cha(420,666,2288). cha(420,754,651). cha(420,803,2289). cha(420,865,867). cha(420,920,969). cha(420,1032,2290). cha(420,1065,2291). cha(420,1192,1562). cha(420,1262,1728). cha(421,46,509). cha(421,48,688). cha(421,100,1374). cha(421,145,1374). cha(421,153,1594). cha(421,359,2159). cha(421,360,2160). cha(421,754,651). cha(421,865,867). cha(421,920,969). cha(421,1192,1562). cha(421,1262,1728). cha(422,46,509). cha(422,48,688). cha(422,100,1374). cha(422,145,1374). cha(422,153,1594). cha(422,366,2120). cha(422,485,1661). cha(422,754,651). cha(422,865,867). cha(422,920,969). cha(422,1192,1562). cha(422,1239,1661). cha(422,1240,1661). cha(422,1241,1661). cha(422,1262,1728). cha(423,46,509). cha(423,48,688). cha(423,100,1374). cha(423,145,1374). cha(423,153,1594). cha(423,754,651). cha(423,865,867). cha(423,920,969). cha(423,1192,1562). cha(423,1262,1728).
datalaude/datalaude
examples/examples/datalog/joone/cha.pl
Perl
bsd-3-clause
132,894
#!/usr/bin/perl =pod this starts our multiline comment of what this script does This script is a barebones perl script that uses many of the most common perl features as a reference to how they can be used for any other basic perl script. We go through printing, taking input, some basic math, variables, arrays, logic/comparisons, loops, subroutines, and handling files. These are enough basics to get most people started in the right direction. Next steps of learing would be perl regular expressions, reading a perl book, and asking every question to google with site:stackoverflow.com added to it What this script does: asks for a filename (a text file that should exist in the same directory as this script), opens the file and notes the last line, how many lines there are, and stores each line in an array. We then go through a loop to discover how many total characters were in the file. The script then reports on some of these stats. Finally, The script asks us for another line (that has to be less than 30 characters) and adds this line back to our text file. Although this script may look like a longish intimidating perl script, without comments it is only really 44 lines of code, which isn't bad for a script that does a little bit of everything. =cut #Below is how you use perl modules, in this case we used "warnings" and "strict." #We Don't even need these ones, they mostly just harass you when you are coding #Wrong. And if you haven't noticed, lines that start with a # are not interpreted #as code, except for line 1, that is a unixy thing. use warnings; use strict; #Consider the below our, "hello world". the \n is a way to tell the script #to go to the next line. print "Welcome to our example perl script\n"; #Just another print statement prompting for an input print "please enter your file name: "; #There's a few things going on here. Things that start with the $ are variables. #Before using a variable, you have to declare it; you do this with the word "my" #in front of it. You can assign text, numbers, and all things to a variable; the #variable will "contain" these values. In the case below, <STDIN> is a specail #way of saying "whatever the user types in, until they hit enter"; my $filename = <STDIN>; #Chomp is a cool function that removes the "enter" from a variable. Otherwise, #if I printed $filename out to the screen, it would also have the side-effect #of going to the next line chomp($filename); #We get to try and open the filename that the user typed in. These are called #"FileHandles". We are using "open" to make a filehandle called FILE. You then #specify the file name in quotes, you could literally type a path in, but in #this case we are using a variable. If it doesn't exist, the command follows the #path in our "or" statement and quits the program with a useful error message. open FILE, "$filename" or die "Couldn't open $filename, $!\n"; my $last_line; #we can use underscores in variable names my $line_count = 0; #We are putting the value of 0 in our variable named $line_count #This is an array, it's like a variable, but it can hold multiple values. You treat #just like a variable, but you also tell it which value. $line_length[0] = "whatever";, #$line_length[1] = "a different value";, $line_length[2] = 4;...those are all valid #statements. Note that arrays are declared with "@", but used with "$" if only #refering to one value/element my @line_length; my $i = 0; #We will use this variable to note how many times we have "while'd" while (<FILE>) { #While there are still lines in the file #Overwrite what is in $last_line with our current line. $_ is a special variable that #contains the current value of the thing being looped. $last_line = $_; $line_count = $line_count + 1; #adds 1 to our variable. $line_count++; is a quicker way #Ok, this next line looks like a mouthfull. Lets start at the right. $_ is still our #current line in the file we are on. We are calculating its length (in characters). We #are next assigning this value to our $line_length array, the slot we put it in is within #the []'s; which happens to be whichever number $i currently has. Remember that $i gets #one value larger each time we go through this loop $line_length[$i] = length($_); $i++; #Increment the $i variable by 1 } #Go to the next line in our file #$last_line will have the side-effect of containing the last line in the file close FILE; #Now we will close our read-only version of the filehandle #Tell the user how many lines were in the file and what the last line of the file was print "There were $line_count lines in our file\n"; print "Our last line was:\n$last_line\n"; #We are now about to count how many lines of text are in the whole file #in a unconventional way. But it is an example of how to loop through a whole array $i = 0; #reset $i (our iterator) back to 0 #below is an obscure perl hack. when assigning an @array to a $variable, the number #of elements of the array is what is actually stored in the $variable. So if an #array had 7 values, $lines would contain '7' after the below command my $lines = $line_count; my $total_chars = 0; #total characters in whole file #a foreach loop would be much more appriopriate, but this method is just more #exposure to some fundamentals while ($lines > $i) { #while the amount of lines is still greater than times looped #take the nth ($i) value of $line_length and add it to our total chars $total_chars += $line_length[$i]; $i++; } #This command could have been more sane, but it shows how you can peice together #multiple components into one print statement with the . character. It is called #concatenating. print "The file had " . $lines . " lines and " . $total_chars . " total " . "characters\n"; #Prompt user to enter a line of text print "Enter another line that is less than 30 characters:\n"; my $line = <STDIN>; #Take the user input #Below is a function that we created called check_length. We pass this function the #variable that the user just typed in. The function checks to make sure that the #user didn't type more than 30 characters. check_length($line); #We are opening our file back up for writing to. It is almost the same command, but #you put 1 or 2 >'s before the filename. 1 > will overwrite the file, and >> will #append to the file; below we are choosing to add to the file (append) open FILE, ">>$filename" or die "Couldn't open $filename, $!\n"; #normally print goes to stdout be default (your screen). We are now specifing to #print to the file, and we adding the user supplied line to the file print FILE $line; close FILE; #close it back up #This is the actual subroutine/function that checks to see if a variable is more than #30 characters long sub check_length { #We declare the subroutine with the "sub" keyword my $value = shift; #the "shift" word gets us the value passed to the subroutine my $length = length($value); #the length() function computes the length of a variable if ($length gt 30) { #is $length greater than (gt) 30? print "You didn't follow the rules, enter a line that is less than 30 characters:\n"; $line = <STDIN>; #Ask for a different input check_length($line); #OMG recursion } else { #No need to do anything else, but any code that you wanted to execute in the case that #the length is not gt that 30 could go here, but we want the length to be less than 30 #...for some reason } } #Now do something totally stupid my $x="02345678cf";my @y;my ($a,$b)=('',''); if ($x=~/(\d{8}\w{2})|Really?\d+|a..{4}$/) {@y=split(//,$1); $a=$y[5].$y[8];$a=$a.$a;$a=$y[3].$y[7].$y[5].$y[4].$a.$y[5].$y[9].$y[1] .$y[0].$y[4].$y[6].$y[5].$y[9].$y[6].$y[1].$a.$y[5].$y[3].$y[2].$y[9];} while ($a=~/^(.)(.)/){$b.=pack("C*",map{$_?hex($_):()}$1.$2);$a=~s/^..//;} print "$b\n";
XlogicX/Learn
perl/skeleton_(liberal commenting).pl
Perl
mit
7,824
package # Date::Manip::TZ::eutira00; # Copyright (c) 2008-2014 Sullivan Beck. All rights reserved. # This program is free software; you can redistribute it and/or modify it # under the same terms as Perl itself. # This file was automatically generated. Any changes to this file will # be lost the next time 'tzdata' is run. # Generated on: Fri Nov 21 10:41:42 EST 2014 # Data version: tzdata2014j # Code version: tzcode2014j # This module contains data from the zoneinfo time zone database. The original # data was obtained from the URL: # ftp://ftp.iana.org/tz use strict; use warnings; require 5.010000; our (%Dates,%LastRule); END { undef %Dates; undef %LastRule; } our ($VERSION); $VERSION='6.48'; END { undef $VERSION; } %Dates = ( 1 => [ [ [1,1,2,0,0,0],[1,1,2,1,19,20],'+01:19:20',[1,19,20], 'LMT',0,[1913,12,31,22,40,39],[1913,12,31,23,59,59], '0001010200:00:00','0001010201:19:20','1913123122:40:39','1913123123:59:59' ], ], 1913 => [ [ [1913,12,31,22,40,40],[1913,12,31,23,40,40],'+01:00:00',[1,0,0], 'CET',0,[1940,6,15,22,59,59],[1940,6,15,23,59,59], '1913123122:40:40','1913123123:40:40','1940061522:59:59','1940061523:59:59' ], ], 1940 => [ [ [1940,6,15,23,0,0],[1940,6,16,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1942,11,2,0,59,59],[1942,11,2,2,59,59], '1940061523:00:00','1940061601:00:00','1942110200:59:59','1942110202:59:59' ], ], 1942 => [ [ [1942,11,2,1,0,0],[1942,11,2,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1943,3,29,0,59,59],[1943,3,29,1,59,59], '1942110201:00:00','1942110202:00:00','1943032900:59:59','1943032901:59:59' ], ], 1943 => [ [ [1943,3,29,1,0,0],[1943,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1943,4,10,0,59,59],[1943,4,10,2,59,59], '1943032901:00:00','1943032903:00:00','1943041000:59:59','1943041002:59:59' ], [ [1943,4,10,1,0,0],[1943,4,10,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1974,5,3,22,59,59],[1974,5,3,23,59,59], '1943041001:00:00','1943041002:00:00','1974050322:59:59','1974050323:59:59' ], ], 1974 => [ [ [1974,5,3,23,0,0],[1974,5,4,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1974,10,1,21,59,59],[1974,10,1,23,59,59], '1974050323:00:00','1974050401:00:00','1974100121:59:59','1974100123:59:59' ], [ [1974,10,1,22,0,0],[1974,10,1,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1975,4,30,22,59,59],[1975,4,30,23,59,59], '1974100122:00:00','1974100123:00:00','1975043022:59:59','1975043023:59:59' ], ], 1975 => [ [ [1975,4,30,23,0,0],[1975,5,1,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1975,10,1,21,59,59],[1975,10,1,23,59,59], '1975043023:00:00','1975050101:00:00','1975100121:59:59','1975100123:59:59' ], [ [1975,10,1,22,0,0],[1975,10,1,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1976,5,1,22,59,59],[1976,5,1,23,59,59], '1975100122:00:00','1975100123:00:00','1976050122:59:59','1976050123:59:59' ], ], 1976 => [ [ [1976,5,1,23,0,0],[1976,5,2,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1976,10,2,21,59,59],[1976,10,2,23,59,59], '1976050123:00:00','1976050201:00:00','1976100221:59:59','1976100223:59:59' ], [ [1976,10,2,22,0,0],[1976,10,2,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1977,5,7,22,59,59],[1977,5,7,23,59,59], '1976100222:00:00','1976100223:00:00','1977050722:59:59','1977050723:59:59' ], ], 1977 => [ [ [1977,5,7,23,0,0],[1977,5,8,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1977,10,1,21,59,59],[1977,10,1,23,59,59], '1977050723:00:00','1977050801:00:00','1977100121:59:59','1977100123:59:59' ], [ [1977,10,1,22,0,0],[1977,10,1,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1978,5,5,22,59,59],[1978,5,5,23,59,59], '1977100122:00:00','1977100123:00:00','1978050522:59:59','1978050523:59:59' ], ], 1978 => [ [ [1978,5,5,23,0,0],[1978,5,6,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1978,9,30,21,59,59],[1978,9,30,23,59,59], '1978050523:00:00','1978050601:00:00','1978093021:59:59','1978093023:59:59' ], [ [1978,9,30,22,0,0],[1978,9,30,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1979,5,4,22,59,59],[1979,5,4,23,59,59], '1978093022:00:00','1978093023:00:00','1979050422:59:59','1979050423:59:59' ], ], 1979 => [ [ [1979,5,4,23,0,0],[1979,5,5,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1979,9,29,21,59,59],[1979,9,29,23,59,59], '1979050423:00:00','1979050501:00:00','1979092921:59:59','1979092923:59:59' ], [ [1979,9,29,22,0,0],[1979,9,29,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1980,5,2,22,59,59],[1980,5,2,23,59,59], '1979092922:00:00','1979092923:00:00','1980050222:59:59','1980050223:59:59' ], ], 1980 => [ [ [1980,5,2,23,0,0],[1980,5,3,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1980,10,3,21,59,59],[1980,10,3,23,59,59], '1980050223:00:00','1980050301:00:00','1980100321:59:59','1980100323:59:59' ], [ [1980,10,3,22,0,0],[1980,10,3,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1981,4,25,22,59,59],[1981,4,25,23,59,59], '1980100322:00:00','1980100323:00:00','1981042522:59:59','1981042523:59:59' ], ], 1981 => [ [ [1981,4,25,23,0,0],[1981,4,26,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1981,9,26,21,59,59],[1981,9,26,23,59,59], '1981042523:00:00','1981042601:00:00','1981092621:59:59','1981092623:59:59' ], [ [1981,9,26,22,0,0],[1981,9,26,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1982,5,1,22,59,59],[1982,5,1,23,59,59], '1981092622:00:00','1981092623:00:00','1982050122:59:59','1982050123:59:59' ], ], 1982 => [ [ [1982,5,1,23,0,0],[1982,5,2,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1982,10,2,21,59,59],[1982,10,2,23,59,59], '1982050123:00:00','1982050201:00:00','1982100221:59:59','1982100223:59:59' ], [ [1982,10,2,22,0,0],[1982,10,2,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1983,4,17,22,59,59],[1983,4,17,23,59,59], '1982100222:00:00','1982100223:00:00','1983041722:59:59','1983041723:59:59' ], ], 1983 => [ [ [1983,4,17,23,0,0],[1983,4,18,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1983,9,30,21,59,59],[1983,9,30,23,59,59], '1983041723:00:00','1983041801:00:00','1983093021:59:59','1983093023:59:59' ], [ [1983,9,30,22,0,0],[1983,9,30,23,0,0],'+01:00:00',[1,0,0], 'CET',0,[1984,3,31,22,59,59],[1984,3,31,23,59,59], '1983093022:00:00','1983093023:00:00','1984033122:59:59','1984033123:59:59' ], ], 1984 => [ [ [1984,3,31,23,0,0],[1984,4,1,1,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1984,9,30,0,59,59],[1984,9,30,2,59,59], '1984033123:00:00','1984040101:00:00','1984093000:59:59','1984093002:59:59' ], [ [1984,9,30,1,0,0],[1984,9,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1985,3,31,0,59,59],[1985,3,31,1,59,59], '1984093001:00:00','1984093002:00:00','1985033100:59:59','1985033101:59:59' ], ], 1985 => [ [ [1985,3,31,1,0,0],[1985,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1985,9,29,0,59,59],[1985,9,29,2,59,59], '1985033101:00:00','1985033103:00:00','1985092900:59:59','1985092902:59:59' ], [ [1985,9,29,1,0,0],[1985,9,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1986,3,30,0,59,59],[1986,3,30,1,59,59], '1985092901:00:00','1985092902:00:00','1986033000:59:59','1986033001:59:59' ], ], 1986 => [ [ [1986,3,30,1,0,0],[1986,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1986,9,28,0,59,59],[1986,9,28,2,59,59], '1986033001:00:00','1986033003:00:00','1986092800:59:59','1986092802:59:59' ], [ [1986,9,28,1,0,0],[1986,9,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1987,3,29,0,59,59],[1987,3,29,1,59,59], '1986092801:00:00','1986092802:00:00','1987032900:59:59','1987032901:59:59' ], ], 1987 => [ [ [1987,3,29,1,0,0],[1987,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1987,9,27,0,59,59],[1987,9,27,2,59,59], '1987032901:00:00','1987032903:00:00','1987092700:59:59','1987092702:59:59' ], [ [1987,9,27,1,0,0],[1987,9,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1988,3,27,0,59,59],[1988,3,27,1,59,59], '1987092701:00:00','1987092702:00:00','1988032700:59:59','1988032701:59:59' ], ], 1988 => [ [ [1988,3,27,1,0,0],[1988,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1988,9,25,0,59,59],[1988,9,25,2,59,59], '1988032701:00:00','1988032703:00:00','1988092500:59:59','1988092502:59:59' ], [ [1988,9,25,1,0,0],[1988,9,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1989,3,26,0,59,59],[1989,3,26,1,59,59], '1988092501:00:00','1988092502:00:00','1989032600:59:59','1989032601:59:59' ], ], 1989 => [ [ [1989,3,26,1,0,0],[1989,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1989,9,24,0,59,59],[1989,9,24,2,59,59], '1989032601:00:00','1989032603:00:00','1989092400:59:59','1989092402:59:59' ], [ [1989,9,24,1,0,0],[1989,9,24,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1990,3,25,0,59,59],[1990,3,25,1,59,59], '1989092401:00:00','1989092402:00:00','1990032500:59:59','1990032501:59:59' ], ], 1990 => [ [ [1990,3,25,1,0,0],[1990,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1990,9,30,0,59,59],[1990,9,30,2,59,59], '1990032501:00:00','1990032503:00:00','1990093000:59:59','1990093002:59:59' ], [ [1990,9,30,1,0,0],[1990,9,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1991,3,31,0,59,59],[1991,3,31,1,59,59], '1990093001:00:00','1990093002:00:00','1991033100:59:59','1991033101:59:59' ], ], 1991 => [ [ [1991,3,31,1,0,0],[1991,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1991,9,29,0,59,59],[1991,9,29,2,59,59], '1991033101:00:00','1991033103:00:00','1991092900:59:59','1991092902:59:59' ], [ [1991,9,29,1,0,0],[1991,9,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1992,3,29,0,59,59],[1992,3,29,1,59,59], '1991092901:00:00','1991092902:00:00','1992032900:59:59','1992032901:59:59' ], ], 1992 => [ [ [1992,3,29,1,0,0],[1992,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1992,9,27,0,59,59],[1992,9,27,2,59,59], '1992032901:00:00','1992032903:00:00','1992092700:59:59','1992092702:59:59' ], [ [1992,9,27,1,0,0],[1992,9,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1993,3,28,0,59,59],[1993,3,28,1,59,59], '1992092701:00:00','1992092702:00:00','1993032800:59:59','1993032801:59:59' ], ], 1993 => [ [ [1993,3,28,1,0,0],[1993,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1993,9,26,0,59,59],[1993,9,26,2,59,59], '1993032801:00:00','1993032803:00:00','1993092600:59:59','1993092602:59:59' ], [ [1993,9,26,1,0,0],[1993,9,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1994,3,27,0,59,59],[1994,3,27,1,59,59], '1993092601:00:00','1993092602:00:00','1994032700:59:59','1994032701:59:59' ], ], 1994 => [ [ [1994,3,27,1,0,0],[1994,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1994,9,25,0,59,59],[1994,9,25,2,59,59], '1994032701:00:00','1994032703:00:00','1994092500:59:59','1994092502:59:59' ], [ [1994,9,25,1,0,0],[1994,9,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1995,3,26,0,59,59],[1995,3,26,1,59,59], '1994092501:00:00','1994092502:00:00','1995032600:59:59','1995032601:59:59' ], ], 1995 => [ [ [1995,3,26,1,0,0],[1995,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1995,9,24,0,59,59],[1995,9,24,2,59,59], '1995032601:00:00','1995032603:00:00','1995092400:59:59','1995092402:59:59' ], [ [1995,9,24,1,0,0],[1995,9,24,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1996,3,31,0,59,59],[1996,3,31,1,59,59], '1995092401:00:00','1995092402:00:00','1996033100:59:59','1996033101:59:59' ], ], 1996 => [ [ [1996,3,31,1,0,0],[1996,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1996,10,27,0,59,59],[1996,10,27,2,59,59], '1996033101:00:00','1996033103:00:00','1996102700:59:59','1996102702:59:59' ], [ [1996,10,27,1,0,0],[1996,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1997,3,30,0,59,59],[1997,3,30,1,59,59], '1996102701:00:00','1996102702:00:00','1997033000:59:59','1997033001:59:59' ], ], 1997 => [ [ [1997,3,30,1,0,0],[1997,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1997,10,26,0,59,59],[1997,10,26,2,59,59], '1997033001:00:00','1997033003:00:00','1997102600:59:59','1997102602:59:59' ], [ [1997,10,26,1,0,0],[1997,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1998,3,29,0,59,59],[1998,3,29,1,59,59], '1997102601:00:00','1997102602:00:00','1998032900:59:59','1998032901:59:59' ], ], 1998 => [ [ [1998,3,29,1,0,0],[1998,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1998,10,25,0,59,59],[1998,10,25,2,59,59], '1998032901:00:00','1998032903:00:00','1998102500:59:59','1998102502:59:59' ], [ [1998,10,25,1,0,0],[1998,10,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[1999,3,28,0,59,59],[1999,3,28,1,59,59], '1998102501:00:00','1998102502:00:00','1999032800:59:59','1999032801:59:59' ], ], 1999 => [ [ [1999,3,28,1,0,0],[1999,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[1999,10,31,0,59,59],[1999,10,31,2,59,59], '1999032801:00:00','1999032803:00:00','1999103100:59:59','1999103102:59:59' ], [ [1999,10,31,1,0,0],[1999,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2000,3,26,0,59,59],[2000,3,26,1,59,59], '1999103101:00:00','1999103102:00:00','2000032600:59:59','2000032601:59:59' ], ], 2000 => [ [ [2000,3,26,1,0,0],[2000,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2000,10,29,0,59,59],[2000,10,29,2,59,59], '2000032601:00:00','2000032603:00:00','2000102900:59:59','2000102902:59:59' ], [ [2000,10,29,1,0,0],[2000,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2001,3,25,0,59,59],[2001,3,25,1,59,59], '2000102901:00:00','2000102902:00:00','2001032500:59:59','2001032501:59:59' ], ], 2001 => [ [ [2001,3,25,1,0,0],[2001,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2001,10,28,0,59,59],[2001,10,28,2,59,59], '2001032501:00:00','2001032503:00:00','2001102800:59:59','2001102802:59:59' ], [ [2001,10,28,1,0,0],[2001,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2002,3,31,0,59,59],[2002,3,31,1,59,59], '2001102801:00:00','2001102802:00:00','2002033100:59:59','2002033101:59:59' ], ], 2002 => [ [ [2002,3,31,1,0,0],[2002,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2002,10,27,0,59,59],[2002,10,27,2,59,59], '2002033101:00:00','2002033103:00:00','2002102700:59:59','2002102702:59:59' ], [ [2002,10,27,1,0,0],[2002,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2003,3,30,0,59,59],[2003,3,30,1,59,59], '2002102701:00:00','2002102702:00:00','2003033000:59:59','2003033001:59:59' ], ], 2003 => [ [ [2003,3,30,1,0,0],[2003,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2003,10,26,0,59,59],[2003,10,26,2,59,59], '2003033001:00:00','2003033003:00:00','2003102600:59:59','2003102602:59:59' ], [ [2003,10,26,1,0,0],[2003,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2004,3,28,0,59,59],[2004,3,28,1,59,59], '2003102601:00:00','2003102602:00:00','2004032800:59:59','2004032801:59:59' ], ], 2004 => [ [ [2004,3,28,1,0,0],[2004,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2004,10,31,0,59,59],[2004,10,31,2,59,59], '2004032801:00:00','2004032803:00:00','2004103100:59:59','2004103102:59:59' ], [ [2004,10,31,1,0,0],[2004,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2005,3,27,0,59,59],[2005,3,27,1,59,59], '2004103101:00:00','2004103102:00:00','2005032700:59:59','2005032701:59:59' ], ], 2005 => [ [ [2005,3,27,1,0,0],[2005,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2005,10,30,0,59,59],[2005,10,30,2,59,59], '2005032701:00:00','2005032703:00:00','2005103000:59:59','2005103002:59:59' ], [ [2005,10,30,1,0,0],[2005,10,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2006,3,26,0,59,59],[2006,3,26,1,59,59], '2005103001:00:00','2005103002:00:00','2006032600:59:59','2006032601:59:59' ], ], 2006 => [ [ [2006,3,26,1,0,0],[2006,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2006,10,29,0,59,59],[2006,10,29,2,59,59], '2006032601:00:00','2006032603:00:00','2006102900:59:59','2006102902:59:59' ], [ [2006,10,29,1,0,0],[2006,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2007,3,25,0,59,59],[2007,3,25,1,59,59], '2006102901:00:00','2006102902:00:00','2007032500:59:59','2007032501:59:59' ], ], 2007 => [ [ [2007,3,25,1,0,0],[2007,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2007,10,28,0,59,59],[2007,10,28,2,59,59], '2007032501:00:00','2007032503:00:00','2007102800:59:59','2007102802:59:59' ], [ [2007,10,28,1,0,0],[2007,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2008,3,30,0,59,59],[2008,3,30,1,59,59], '2007102801:00:00','2007102802:00:00','2008033000:59:59','2008033001:59:59' ], ], 2008 => [ [ [2008,3,30,1,0,0],[2008,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2008,10,26,0,59,59],[2008,10,26,2,59,59], '2008033001:00:00','2008033003:00:00','2008102600:59:59','2008102602:59:59' ], [ [2008,10,26,1,0,0],[2008,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2009,3,29,0,59,59],[2009,3,29,1,59,59], '2008102601:00:00','2008102602:00:00','2009032900:59:59','2009032901:59:59' ], ], 2009 => [ [ [2009,3,29,1,0,0],[2009,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2009,10,25,0,59,59],[2009,10,25,2,59,59], '2009032901:00:00','2009032903:00:00','2009102500:59:59','2009102502:59:59' ], [ [2009,10,25,1,0,0],[2009,10,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2010,3,28,0,59,59],[2010,3,28,1,59,59], '2009102501:00:00','2009102502:00:00','2010032800:59:59','2010032801:59:59' ], ], 2010 => [ [ [2010,3,28,1,0,0],[2010,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2010,10,31,0,59,59],[2010,10,31,2,59,59], '2010032801:00:00','2010032803:00:00','2010103100:59:59','2010103102:59:59' ], [ [2010,10,31,1,0,0],[2010,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2011,3,27,0,59,59],[2011,3,27,1,59,59], '2010103101:00:00','2010103102:00:00','2011032700:59:59','2011032701:59:59' ], ], 2011 => [ [ [2011,3,27,1,0,0],[2011,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2011,10,30,0,59,59],[2011,10,30,2,59,59], '2011032701:00:00','2011032703:00:00','2011103000:59:59','2011103002:59:59' ], [ [2011,10,30,1,0,0],[2011,10,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2012,3,25,0,59,59],[2012,3,25,1,59,59], '2011103001:00:00','2011103002:00:00','2012032500:59:59','2012032501:59:59' ], ], 2012 => [ [ [2012,3,25,1,0,0],[2012,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2012,10,28,0,59,59],[2012,10,28,2,59,59], '2012032501:00:00','2012032503:00:00','2012102800:59:59','2012102802:59:59' ], [ [2012,10,28,1,0,0],[2012,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2013,3,31,0,59,59],[2013,3,31,1,59,59], '2012102801:00:00','2012102802:00:00','2013033100:59:59','2013033101:59:59' ], ], 2013 => [ [ [2013,3,31,1,0,0],[2013,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2013,10,27,0,59,59],[2013,10,27,2,59,59], '2013033101:00:00','2013033103:00:00','2013102700:59:59','2013102702:59:59' ], [ [2013,10,27,1,0,0],[2013,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2014,3,30,0,59,59],[2014,3,30,1,59,59], '2013102701:00:00','2013102702:00:00','2014033000:59:59','2014033001:59:59' ], ], 2014 => [ [ [2014,3,30,1,0,0],[2014,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2014,10,26,0,59,59],[2014,10,26,2,59,59], '2014033001:00:00','2014033003:00:00','2014102600:59:59','2014102602:59:59' ], [ [2014,10,26,1,0,0],[2014,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2015,3,29,0,59,59],[2015,3,29,1,59,59], '2014102601:00:00','2014102602:00:00','2015032900:59:59','2015032901:59:59' ], ], 2015 => [ [ [2015,3,29,1,0,0],[2015,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2015,10,25,0,59,59],[2015,10,25,2,59,59], '2015032901:00:00','2015032903:00:00','2015102500:59:59','2015102502:59:59' ], [ [2015,10,25,1,0,0],[2015,10,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2016,3,27,0,59,59],[2016,3,27,1,59,59], '2015102501:00:00','2015102502:00:00','2016032700:59:59','2016032701:59:59' ], ], 2016 => [ [ [2016,3,27,1,0,0],[2016,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2016,10,30,0,59,59],[2016,10,30,2,59,59], '2016032701:00:00','2016032703:00:00','2016103000:59:59','2016103002:59:59' ], [ [2016,10,30,1,0,0],[2016,10,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2017,3,26,0,59,59],[2017,3,26,1,59,59], '2016103001:00:00','2016103002:00:00','2017032600:59:59','2017032601:59:59' ], ], 2017 => [ [ [2017,3,26,1,0,0],[2017,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2017,10,29,0,59,59],[2017,10,29,2,59,59], '2017032601:00:00','2017032603:00:00','2017102900:59:59','2017102902:59:59' ], [ [2017,10,29,1,0,0],[2017,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2018,3,25,0,59,59],[2018,3,25,1,59,59], '2017102901:00:00','2017102902:00:00','2018032500:59:59','2018032501:59:59' ], ], 2018 => [ [ [2018,3,25,1,0,0],[2018,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2018,10,28,0,59,59],[2018,10,28,2,59,59], '2018032501:00:00','2018032503:00:00','2018102800:59:59','2018102802:59:59' ], [ [2018,10,28,1,0,0],[2018,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2019,3,31,0,59,59],[2019,3,31,1,59,59], '2018102801:00:00','2018102802:00:00','2019033100:59:59','2019033101:59:59' ], ], 2019 => [ [ [2019,3,31,1,0,0],[2019,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2019,10,27,0,59,59],[2019,10,27,2,59,59], '2019033101:00:00','2019033103:00:00','2019102700:59:59','2019102702:59:59' ], [ [2019,10,27,1,0,0],[2019,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2020,3,29,0,59,59],[2020,3,29,1,59,59], '2019102701:00:00','2019102702:00:00','2020032900:59:59','2020032901:59:59' ], ], 2020 => [ [ [2020,3,29,1,0,0],[2020,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2020,10,25,0,59,59],[2020,10,25,2,59,59], '2020032901:00:00','2020032903:00:00','2020102500:59:59','2020102502:59:59' ], [ [2020,10,25,1,0,0],[2020,10,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2021,3,28,0,59,59],[2021,3,28,1,59,59], '2020102501:00:00','2020102502:00:00','2021032800:59:59','2021032801:59:59' ], ], 2021 => [ [ [2021,3,28,1,0,0],[2021,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2021,10,31,0,59,59],[2021,10,31,2,59,59], '2021032801:00:00','2021032803:00:00','2021103100:59:59','2021103102:59:59' ], [ [2021,10,31,1,0,0],[2021,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2022,3,27,0,59,59],[2022,3,27,1,59,59], '2021103101:00:00','2021103102:00:00','2022032700:59:59','2022032701:59:59' ], ], 2022 => [ [ [2022,3,27,1,0,0],[2022,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2022,10,30,0,59,59],[2022,10,30,2,59,59], '2022032701:00:00','2022032703:00:00','2022103000:59:59','2022103002:59:59' ], [ [2022,10,30,1,0,0],[2022,10,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2023,3,26,0,59,59],[2023,3,26,1,59,59], '2022103001:00:00','2022103002:00:00','2023032600:59:59','2023032601:59:59' ], ], 2023 => [ [ [2023,3,26,1,0,0],[2023,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2023,10,29,0,59,59],[2023,10,29,2,59,59], '2023032601:00:00','2023032603:00:00','2023102900:59:59','2023102902:59:59' ], [ [2023,10,29,1,0,0],[2023,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2024,3,31,0,59,59],[2024,3,31,1,59,59], '2023102901:00:00','2023102902:00:00','2024033100:59:59','2024033101:59:59' ], ], 2024 => [ [ [2024,3,31,1,0,0],[2024,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2024,10,27,0,59,59],[2024,10,27,2,59,59], '2024033101:00:00','2024033103:00:00','2024102700:59:59','2024102702:59:59' ], [ [2024,10,27,1,0,0],[2024,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2025,3,30,0,59,59],[2025,3,30,1,59,59], '2024102701:00:00','2024102702:00:00','2025033000:59:59','2025033001:59:59' ], ], 2025 => [ [ [2025,3,30,1,0,0],[2025,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2025,10,26,0,59,59],[2025,10,26,2,59,59], '2025033001:00:00','2025033003:00:00','2025102600:59:59','2025102602:59:59' ], [ [2025,10,26,1,0,0],[2025,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2026,3,29,0,59,59],[2026,3,29,1,59,59], '2025102601:00:00','2025102602:00:00','2026032900:59:59','2026032901:59:59' ], ], 2026 => [ [ [2026,3,29,1,0,0],[2026,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2026,10,25,0,59,59],[2026,10,25,2,59,59], '2026032901:00:00','2026032903:00:00','2026102500:59:59','2026102502:59:59' ], [ [2026,10,25,1,0,0],[2026,10,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2027,3,28,0,59,59],[2027,3,28,1,59,59], '2026102501:00:00','2026102502:00:00','2027032800:59:59','2027032801:59:59' ], ], 2027 => [ [ [2027,3,28,1,0,0],[2027,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2027,10,31,0,59,59],[2027,10,31,2,59,59], '2027032801:00:00','2027032803:00:00','2027103100:59:59','2027103102:59:59' ], [ [2027,10,31,1,0,0],[2027,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2028,3,26,0,59,59],[2028,3,26,1,59,59], '2027103101:00:00','2027103102:00:00','2028032600:59:59','2028032601:59:59' ], ], 2028 => [ [ [2028,3,26,1,0,0],[2028,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2028,10,29,0,59,59],[2028,10,29,2,59,59], '2028032601:00:00','2028032603:00:00','2028102900:59:59','2028102902:59:59' ], [ [2028,10,29,1,0,0],[2028,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2029,3,25,0,59,59],[2029,3,25,1,59,59], '2028102901:00:00','2028102902:00:00','2029032500:59:59','2029032501:59:59' ], ], 2029 => [ [ [2029,3,25,1,0,0],[2029,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2029,10,28,0,59,59],[2029,10,28,2,59,59], '2029032501:00:00','2029032503:00:00','2029102800:59:59','2029102802:59:59' ], [ [2029,10,28,1,0,0],[2029,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2030,3,31,0,59,59],[2030,3,31,1,59,59], '2029102801:00:00','2029102802:00:00','2030033100:59:59','2030033101:59:59' ], ], 2030 => [ [ [2030,3,31,1,0,0],[2030,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2030,10,27,0,59,59],[2030,10,27,2,59,59], '2030033101:00:00','2030033103:00:00','2030102700:59:59','2030102702:59:59' ], [ [2030,10,27,1,0,0],[2030,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2031,3,30,0,59,59],[2031,3,30,1,59,59], '2030102701:00:00','2030102702:00:00','2031033000:59:59','2031033001:59:59' ], ], 2031 => [ [ [2031,3,30,1,0,0],[2031,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2031,10,26,0,59,59],[2031,10,26,2,59,59], '2031033001:00:00','2031033003:00:00','2031102600:59:59','2031102602:59:59' ], [ [2031,10,26,1,0,0],[2031,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2032,3,28,0,59,59],[2032,3,28,1,59,59], '2031102601:00:00','2031102602:00:00','2032032800:59:59','2032032801:59:59' ], ], 2032 => [ [ [2032,3,28,1,0,0],[2032,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2032,10,31,0,59,59],[2032,10,31,2,59,59], '2032032801:00:00','2032032803:00:00','2032103100:59:59','2032103102:59:59' ], [ [2032,10,31,1,0,0],[2032,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2033,3,27,0,59,59],[2033,3,27,1,59,59], '2032103101:00:00','2032103102:00:00','2033032700:59:59','2033032701:59:59' ], ], 2033 => [ [ [2033,3,27,1,0,0],[2033,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2033,10,30,0,59,59],[2033,10,30,2,59,59], '2033032701:00:00','2033032703:00:00','2033103000:59:59','2033103002:59:59' ], [ [2033,10,30,1,0,0],[2033,10,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2034,3,26,0,59,59],[2034,3,26,1,59,59], '2033103001:00:00','2033103002:00:00','2034032600:59:59','2034032601:59:59' ], ], 2034 => [ [ [2034,3,26,1,0,0],[2034,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2034,10,29,0,59,59],[2034,10,29,2,59,59], '2034032601:00:00','2034032603:00:00','2034102900:59:59','2034102902:59:59' ], [ [2034,10,29,1,0,0],[2034,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2035,3,25,0,59,59],[2035,3,25,1,59,59], '2034102901:00:00','2034102902:00:00','2035032500:59:59','2035032501:59:59' ], ], 2035 => [ [ [2035,3,25,1,0,0],[2035,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2035,10,28,0,59,59],[2035,10,28,2,59,59], '2035032501:00:00','2035032503:00:00','2035102800:59:59','2035102802:59:59' ], [ [2035,10,28,1,0,0],[2035,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2036,3,30,0,59,59],[2036,3,30,1,59,59], '2035102801:00:00','2035102802:00:00','2036033000:59:59','2036033001:59:59' ], ], 2036 => [ [ [2036,3,30,1,0,0],[2036,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2036,10,26,0,59,59],[2036,10,26,2,59,59], '2036033001:00:00','2036033003:00:00','2036102600:59:59','2036102602:59:59' ], [ [2036,10,26,1,0,0],[2036,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2037,3,29,0,59,59],[2037,3,29,1,59,59], '2036102601:00:00','2036102602:00:00','2037032900:59:59','2037032901:59:59' ], ], 2037 => [ [ [2037,3,29,1,0,0],[2037,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2037,10,25,0,59,59],[2037,10,25,2,59,59], '2037032901:00:00','2037032903:00:00','2037102500:59:59','2037102502:59:59' ], [ [2037,10,25,1,0,0],[2037,10,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2038,3,28,0,59,59],[2038,3,28,1,59,59], '2037102501:00:00','2037102502:00:00','2038032800:59:59','2038032801:59:59' ], ], 2038 => [ [ [2038,3,28,1,0,0],[2038,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2038,10,31,0,59,59],[2038,10,31,2,59,59], '2038032801:00:00','2038032803:00:00','2038103100:59:59','2038103102:59:59' ], [ [2038,10,31,1,0,0],[2038,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2039,3,27,0,59,59],[2039,3,27,1,59,59], '2038103101:00:00','2038103102:00:00','2039032700:59:59','2039032701:59:59' ], ], 2039 => [ [ [2039,3,27,1,0,0],[2039,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2039,10,30,0,59,59],[2039,10,30,2,59,59], '2039032701:00:00','2039032703:00:00','2039103000:59:59','2039103002:59:59' ], [ [2039,10,30,1,0,0],[2039,10,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2040,3,25,0,59,59],[2040,3,25,1,59,59], '2039103001:00:00','2039103002:00:00','2040032500:59:59','2040032501:59:59' ], ], 2040 => [ [ [2040,3,25,1,0,0],[2040,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2040,10,28,0,59,59],[2040,10,28,2,59,59], '2040032501:00:00','2040032503:00:00','2040102800:59:59','2040102802:59:59' ], [ [2040,10,28,1,0,0],[2040,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2041,3,31,0,59,59],[2041,3,31,1,59,59], '2040102801:00:00','2040102802:00:00','2041033100:59:59','2041033101:59:59' ], ], 2041 => [ [ [2041,3,31,1,0,0],[2041,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2041,10,27,0,59,59],[2041,10,27,2,59,59], '2041033101:00:00','2041033103:00:00','2041102700:59:59','2041102702:59:59' ], [ [2041,10,27,1,0,0],[2041,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2042,3,30,0,59,59],[2042,3,30,1,59,59], '2041102701:00:00','2041102702:00:00','2042033000:59:59','2042033001:59:59' ], ], 2042 => [ [ [2042,3,30,1,0,0],[2042,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2042,10,26,0,59,59],[2042,10,26,2,59,59], '2042033001:00:00','2042033003:00:00','2042102600:59:59','2042102602:59:59' ], [ [2042,10,26,1,0,0],[2042,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2043,3,29,0,59,59],[2043,3,29,1,59,59], '2042102601:00:00','2042102602:00:00','2043032900:59:59','2043032901:59:59' ], ], 2043 => [ [ [2043,3,29,1,0,0],[2043,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2043,10,25,0,59,59],[2043,10,25,2,59,59], '2043032901:00:00','2043032903:00:00','2043102500:59:59','2043102502:59:59' ], [ [2043,10,25,1,0,0],[2043,10,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2044,3,27,0,59,59],[2044,3,27,1,59,59], '2043102501:00:00','2043102502:00:00','2044032700:59:59','2044032701:59:59' ], ], 2044 => [ [ [2044,3,27,1,0,0],[2044,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2044,10,30,0,59,59],[2044,10,30,2,59,59], '2044032701:00:00','2044032703:00:00','2044103000:59:59','2044103002:59:59' ], [ [2044,10,30,1,0,0],[2044,10,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2045,3,26,0,59,59],[2045,3,26,1,59,59], '2044103001:00:00','2044103002:00:00','2045032600:59:59','2045032601:59:59' ], ], 2045 => [ [ [2045,3,26,1,0,0],[2045,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2045,10,29,0,59,59],[2045,10,29,2,59,59], '2045032601:00:00','2045032603:00:00','2045102900:59:59','2045102902:59:59' ], [ [2045,10,29,1,0,0],[2045,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2046,3,25,0,59,59],[2046,3,25,1,59,59], '2045102901:00:00','2045102902:00:00','2046032500:59:59','2046032501:59:59' ], ], 2046 => [ [ [2046,3,25,1,0,0],[2046,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2046,10,28,0,59,59],[2046,10,28,2,59,59], '2046032501:00:00','2046032503:00:00','2046102800:59:59','2046102802:59:59' ], [ [2046,10,28,1,0,0],[2046,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2047,3,31,0,59,59],[2047,3,31,1,59,59], '2046102801:00:00','2046102802:00:00','2047033100:59:59','2047033101:59:59' ], ], 2047 => [ [ [2047,3,31,1,0,0],[2047,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2047,10,27,0,59,59],[2047,10,27,2,59,59], '2047033101:00:00','2047033103:00:00','2047102700:59:59','2047102702:59:59' ], [ [2047,10,27,1,0,0],[2047,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2048,3,29,0,59,59],[2048,3,29,1,59,59], '2047102701:00:00','2047102702:00:00','2048032900:59:59','2048032901:59:59' ], ], 2048 => [ [ [2048,3,29,1,0,0],[2048,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2048,10,25,0,59,59],[2048,10,25,2,59,59], '2048032901:00:00','2048032903:00:00','2048102500:59:59','2048102502:59:59' ], [ [2048,10,25,1,0,0],[2048,10,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2049,3,28,0,59,59],[2049,3,28,1,59,59], '2048102501:00:00','2048102502:00:00','2049032800:59:59','2049032801:59:59' ], ], 2049 => [ [ [2049,3,28,1,0,0],[2049,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2049,10,31,0,59,59],[2049,10,31,2,59,59], '2049032801:00:00','2049032803:00:00','2049103100:59:59','2049103102:59:59' ], [ [2049,10,31,1,0,0],[2049,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2050,3,27,0,59,59],[2050,3,27,1,59,59], '2049103101:00:00','2049103102:00:00','2050032700:59:59','2050032701:59:59' ], ], 2050 => [ [ [2050,3,27,1,0,0],[2050,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2050,10,30,0,59,59],[2050,10,30,2,59,59], '2050032701:00:00','2050032703:00:00','2050103000:59:59','2050103002:59:59' ], [ [2050,10,30,1,0,0],[2050,10,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2051,3,26,0,59,59],[2051,3,26,1,59,59], '2050103001:00:00','2050103002:00:00','2051032600:59:59','2051032601:59:59' ], ], 2051 => [ [ [2051,3,26,1,0,0],[2051,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2051,10,29,0,59,59],[2051,10,29,2,59,59], '2051032601:00:00','2051032603:00:00','2051102900:59:59','2051102902:59:59' ], [ [2051,10,29,1,0,0],[2051,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2052,3,31,0,59,59],[2052,3,31,1,59,59], '2051102901:00:00','2051102902:00:00','2052033100:59:59','2052033101:59:59' ], ], 2052 => [ [ [2052,3,31,1,0,0],[2052,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2052,10,27,0,59,59],[2052,10,27,2,59,59], '2052033101:00:00','2052033103:00:00','2052102700:59:59','2052102702:59:59' ], [ [2052,10,27,1,0,0],[2052,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2053,3,30,0,59,59],[2053,3,30,1,59,59], '2052102701:00:00','2052102702:00:00','2053033000:59:59','2053033001:59:59' ], ], 2053 => [ [ [2053,3,30,1,0,0],[2053,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2053,10,26,0,59,59],[2053,10,26,2,59,59], '2053033001:00:00','2053033003:00:00','2053102600:59:59','2053102602:59:59' ], [ [2053,10,26,1,0,0],[2053,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2054,3,29,0,59,59],[2054,3,29,1,59,59], '2053102601:00:00','2053102602:00:00','2054032900:59:59','2054032901:59:59' ], ], 2054 => [ [ [2054,3,29,1,0,0],[2054,3,29,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2054,10,25,0,59,59],[2054,10,25,2,59,59], '2054032901:00:00','2054032903:00:00','2054102500:59:59','2054102502:59:59' ], [ [2054,10,25,1,0,0],[2054,10,25,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2055,3,28,0,59,59],[2055,3,28,1,59,59], '2054102501:00:00','2054102502:00:00','2055032800:59:59','2055032801:59:59' ], ], 2055 => [ [ [2055,3,28,1,0,0],[2055,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2055,10,31,0,59,59],[2055,10,31,2,59,59], '2055032801:00:00','2055032803:00:00','2055103100:59:59','2055103102:59:59' ], [ [2055,10,31,1,0,0],[2055,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2056,3,26,0,59,59],[2056,3,26,1,59,59], '2055103101:00:00','2055103102:00:00','2056032600:59:59','2056032601:59:59' ], ], 2056 => [ [ [2056,3,26,1,0,0],[2056,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2056,10,29,0,59,59],[2056,10,29,2,59,59], '2056032601:00:00','2056032603:00:00','2056102900:59:59','2056102902:59:59' ], [ [2056,10,29,1,0,0],[2056,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2057,3,25,0,59,59],[2057,3,25,1,59,59], '2056102901:00:00','2056102902:00:00','2057032500:59:59','2057032501:59:59' ], ], 2057 => [ [ [2057,3,25,1,0,0],[2057,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2057,10,28,0,59,59],[2057,10,28,2,59,59], '2057032501:00:00','2057032503:00:00','2057102800:59:59','2057102802:59:59' ], [ [2057,10,28,1,0,0],[2057,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2058,3,31,0,59,59],[2058,3,31,1,59,59], '2057102801:00:00','2057102802:00:00','2058033100:59:59','2058033101:59:59' ], ], 2058 => [ [ [2058,3,31,1,0,0],[2058,3,31,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2058,10,27,0,59,59],[2058,10,27,2,59,59], '2058033101:00:00','2058033103:00:00','2058102700:59:59','2058102702:59:59' ], [ [2058,10,27,1,0,0],[2058,10,27,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2059,3,30,0,59,59],[2059,3,30,1,59,59], '2058102701:00:00','2058102702:00:00','2059033000:59:59','2059033001:59:59' ], ], 2059 => [ [ [2059,3,30,1,0,0],[2059,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2059,10,26,0,59,59],[2059,10,26,2,59,59], '2059033001:00:00','2059033003:00:00','2059102600:59:59','2059102602:59:59' ], [ [2059,10,26,1,0,0],[2059,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2060,3,28,0,59,59],[2060,3,28,1,59,59], '2059102601:00:00','2059102602:00:00','2060032800:59:59','2060032801:59:59' ], ], 2060 => [ [ [2060,3,28,1,0,0],[2060,3,28,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2060,10,31,0,59,59],[2060,10,31,2,59,59], '2060032801:00:00','2060032803:00:00','2060103100:59:59','2060103102:59:59' ], [ [2060,10,31,1,0,0],[2060,10,31,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2061,3,27,0,59,59],[2061,3,27,1,59,59], '2060103101:00:00','2060103102:00:00','2061032700:59:59','2061032701:59:59' ], ], 2061 => [ [ [2061,3,27,1,0,0],[2061,3,27,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2061,10,30,0,59,59],[2061,10,30,2,59,59], '2061032701:00:00','2061032703:00:00','2061103000:59:59','2061103002:59:59' ], [ [2061,10,30,1,0,0],[2061,10,30,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2062,3,26,0,59,59],[2062,3,26,1,59,59], '2061103001:00:00','2061103002:00:00','2062032600:59:59','2062032601:59:59' ], ], 2062 => [ [ [2062,3,26,1,0,0],[2062,3,26,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2062,10,29,0,59,59],[2062,10,29,2,59,59], '2062032601:00:00','2062032603:00:00','2062102900:59:59','2062102902:59:59' ], [ [2062,10,29,1,0,0],[2062,10,29,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2063,3,25,0,59,59],[2063,3,25,1,59,59], '2062102901:00:00','2062102902:00:00','2063032500:59:59','2063032501:59:59' ], ], 2063 => [ [ [2063,3,25,1,0,0],[2063,3,25,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2063,10,28,0,59,59],[2063,10,28,2,59,59], '2063032501:00:00','2063032503:00:00','2063102800:59:59','2063102802:59:59' ], [ [2063,10,28,1,0,0],[2063,10,28,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2064,3,30,0,59,59],[2064,3,30,1,59,59], '2063102801:00:00','2063102802:00:00','2064033000:59:59','2064033001:59:59' ], ], 2064 => [ [ [2064,3,30,1,0,0],[2064,3,30,3,0,0],'+02:00:00',[2,0,0], 'CEST',1,[2064,10,26,0,59,59],[2064,10,26,2,59,59], '2064033001:00:00','2064033003:00:00','2064102600:59:59','2064102602:59:59' ], [ [2064,10,26,1,0,0],[2064,10,26,2,0,0],'+01:00:00',[1,0,0], 'CET',0,[2065,3,29,0,59,59],[2065,3,29,1,59,59], '2064102601:00:00','2064102602:00:00','2065032900:59:59','2065032901:59:59' ], ], ); %LastRule = ( 'zone' => { 'dstoff' => '+02:00:00', 'stdoff' => '+01:00:00', }, 'rules' => { '03' => { 'flag' => 'last', 'dow' => '7', 'num' => '0', 'type' => 'u', 'time' => '01:00:00', 'isdst' => '1', 'abb' => 'CEST', }, '10' => { 'flag' => 'last', 'dow' => '7', 'num' => '0', 'type' => 'u', 'time' => '01:00:00', 'isdst' => '0', 'abb' => 'CET', }, }, ); 1;
nriley/Pester
Source/Manip/TZ/eutira00.pm
Perl
bsd-2-clause
45,026